/* ===================================================================
   WooCommerce Frontend Admin – Dashboard Styles
   Design: Olamilekan Adebisi
=================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Variables ── */
:root {
  --bg:       #0d0d0d;
  --surface:  #161616;
  --surface2: #1f1f1f;
  --surface3: #282828;
  --border:   rgba(255,255,255,0.07);
  --border2:  rgba(255,255,255,0.12);
  --text:     #ffffff;
  --text2:    #a0a0a0;
  --text3:    #555555;
  --green:    #4ade80;
  --red:      #f87171;
  --blue:     #818cf8;
  --accent:   #ffffff;
  --r:        10px;
  --sidebar:  188px;
  --font:     'Inter', -apple-system, sans-serif;
}

/* ── Reset ── */
#wfa-app, #wfa-app * { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Shell ── */
#wfa-app {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  font-size: 13px;
  line-height: 1.5;
}

/* ══════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════ */
.wfa-sidebar {
  width: 188px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  padding: 0 10px;
  border-right: 1px solid var(--border);
}

.wfa-logo {
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 4px;
}

.wfa-logo-icon {
  width: 28px; height: 28px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 7px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 6px;
}

.wfa-logo-dot { background: var(--text2); border-radius: 1px; }

.wfa-nav { flex: 1; overflow-y: auto; padding-bottom: 12px; }
.wfa-nav::-webkit-scrollbar { display: none; }

.wfa-nav-group { margin-bottom: 20px; }

.wfa-nav-group-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text3);
  padding: 14px 8px 5px !important;
  display: block;
}

.wfa-nav-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 7px 20px !important;
  border-radius: 7px;
  cursor: pointer;
  color: var(--text2);
  font-size: 13px;
  font-weight: 400;
  transition: all 0.12s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.wfa-nav-item:hover { background: var(--surface2); color: #2BABE1 !important; }

.wfa-nav-item.active {
  background: var(--surface2);
  color: #2BABE1 !important;
  font-weight: 500;
}

.wfa-nav-icon {
  width: 16px; height: 16px;
  flex-shrink: 0;
  opacity: 0.55;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wfa-nav-item.active .wfa-nav-icon { opacity: 1; }

.wfa-nav-arrow {
  margin-left: auto;
  font-size: 9px;
  opacity: 0.3;
  color: var(--text2);
}

.wfa-sidebar-footer {
  padding: 10px 4px 14px;
  border-top: 1px solid var(--border);
}

.wfa-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px;
  border-radius: 7px;
}

.wfa-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface2);
  border: 1px solid var(--border2);
  flex-shrink: 0;
}

.wfa-user-name { font-size: 12px; font-weight: 500; color: var(--text); line-height: 1.3; }
.wfa-user-email { font-size: 10.5px; color: var(--text3); }

/* ══════════════════════════════════════════
   MAIN
══════════════════════════════════════════ */
.wfa-main {
  margin-left: 188px !important;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 100vw;
  padding: 50px;
}

/* Top bar */
.wfa-topbar {
  height: 56px;
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
}

.wfa-breadcrumb {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--text2);
}

.wfa-breadcrumb-icon {
  width: 26px; height: 26px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  margin-right: 2px;
}

.wfa-breadcrumb-sep { color: var(--text3); font-size: 12px; }

.wfa-breadcrumb a {
  color: var(--text2);
  text-decoration: none;
  transition: color 0.12s;
}
.wfa-breadcrumb a:hover { color: var(--text); }

.wfa-breadcrumb-current { color: var(--text); font-weight: 500; }

.wfa-topbar-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.wfa-topbar-btn {
  width: 32px; height: 32px;
  border-radius: 7px;
  background: none;
  border: 1px solid transparent;
  color: var(--text2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.12s;
  font-size: 14px;
}

.wfa-topbar-btn:hover { background: var(--surface2); border-color: var(--border2); color: var(--text); }

.wfa-topbar-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--border2);
  cursor: pointer;
  margin-left: 4px;
}

/* Content area */
.wfa-content { padding: 24px !important; flex: 1; }
.wfa-section { display: none; }
.wfa-section.active { display: block; }

/* Page header */
.wfa-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 12px;
  flex-wrap: wrap;
	padding: 20px !important;
}

.wfa-page-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 2px;
}

.wfa-page-sub { font-size: 12.5px; color: var(--text2); }

.wfa-page-actions { display: flex; align-items: center; gap: 8px; }

.wfa-date-range {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 13px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 8px;
  font-size: 12px;
  color: var(--text2);
  cursor: pointer;
  white-space: nowrap;
}

/* ══════════════════════════════════════════
   STAT CARDS
══════════════════════════════════════════ */
.wfa-stat-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 16px !important;
	padding: 20px !important;
}

.wfa-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px !important;
  min-width: 0;
}

.wfa-stat-title { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.wfa-stat-desc { font-size: 11px; color: var(--text3); margin-bottom: 12px; }

.wfa-stat-value {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 3px;
}

.wfa-stat-change { font-size: 11.5px; font-weight: 500; margin-bottom: 10px; }
.wfa-stat-change.up { color: var(--green); }
.wfa-stat-change.down { color: var(--red); }
.wfa-stat-change.neutral { color: var(--text3); }

.wfa-sparkline-wrap { height: 40px; }

/* ══════════════════════════════════════════
   CHART SECTION
══════════════════════════════════════════ */
.wfa-chart-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px !important;
  margin-bottom: 16px !important;
	margin-left: 20px !important;
	margin-right: 20px !important
}

.wfa-chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.wfa-chart-title { font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.wfa-chart-sub { font-size: 12px; color: var(--text3); }

.wfa-chart-wrap { height: 260px; }

/* ══════════════════════════════════════════
   BOTTOM PANELS
══════════════════════════════════════════ */
.wfa-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
	padding: 20px !important;
}

.wfa-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
	padding: 20px !important;
}

.wfa-panel-header {
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.wfa-panel-title { font-size: 13.5px; font-weight: 600; }
.wfa-panel-sub { font-size: 11.5px; color: var(--text3); margin-top: 2px; }

.wfa-panel-legend {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--text2);
}

.wfa-legend-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.wfa-legend-dot.green { background: var(--green); }

.wfa-panel-body { padding: 14px 18px; }
.wfa-panel-empty { text-align: center; padding: 32px; color: var(--text3); font-size: 12px; }

.wfa-top-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.wfa-top-item:last-child { border-bottom: none; }
.wfa-top-item-name { color: var(--text); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-right: 12px; }
.wfa-top-item-meta { color: var(--text3); font-size: 12px; flex-shrink: 0; text-align: right; }

/* ══════════════════════════════════════════
   PERIOD TABS
══════════════════════════════════════════ */
.wfa-period-tabs {
  display: flex; gap: 3px;
  background: var(--surface2);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--border2);
}

.wfa-period-tab {
  padding: 5px 12px;
  font-size: 12px; font-weight: 500;
  border-radius: 6px;
  border: none; background: none;
  color: var(--text3);
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.12s;
}

.wfa-period-tab.active { background: var(--surface3); color: var(--text); }

/* ══════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════ */
.wfa-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px !important;
  border-radius: 8px;
  font-family: var(--font); font-size: 12.5px; font-weight: 500;
  cursor: pointer; border: none;
  transition: all 0.12s;
  white-space: nowrap;
}

.wfa-btn--primary { background: var(--text); color: #000; }
.wfa-btn--primary:hover { opacity: 0.88; }

.wfa-btn--ghost {
  background: var(--surface2); color: var(--text2);
  border: 1px solid var(--border2);
}
.wfa-btn--ghost:hover { color: var(--text); border-color: rgba(255,255,255,0.22); }

.wfa-btn--danger { background: rgba(248,113,113,0.1); color: var(--red); border: 1px solid rgba(248,113,113,0.18); }
.wfa-btn--danger:hover { background: rgba(248,113,113,0.18); }

.wfa-btn--sm { padding: 5px 10px; font-size: 12px; }

/* ══════════════════════════════════════════
   TABLE CARD
══════════════════════════════════════════ */
.wfa-section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; flex-wrap: wrap; gap: 10px;
}

.wfa-section-head h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }

.wfa-table-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
	padding: 20px !important;
	margin: 0 20px 0 20px !important;
}

.wfa-table-header {
  padding: 12px 16px !important;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.wfa-search {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 7px;
  padding: 6px 11px !important;
  color: var(--text);
  font-family: var(--font); font-size: 12.5px;
  outline: none; width: 210px;
  transition: border-color 0.12s;
}
.wfa-search:focus { border-color: rgba(255,255,255,0.28); }
.wfa-search::placeholder { color: var(--text3); }

.wfa-filter-select {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 7px;
  padding: 6px 11px !important;
  color: var(--text2);
  font-family: var(--font); font-size: 12.5px;
  outline: none; cursor: pointer;
}

table.wfa-table { width: 100%; border-collapse: collapse; }

.wfa-table th {
  text-align: left !important;
  padding: 9px 16px !important;
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text3);
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}

.wfa-table td {
  padding: 10px 16px !important;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  vertical-align: middle;
  color: var(--text2);
}

.wfa-table td.strong { color: var(--text); font-weight: 500; }
.wfa-table tr:last-child td { border-bottom: none; }
.wfa-table tr:hover td { background: rgba(255,255,255,0.018); }

/* ── Badge ── */
.wfa-badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 5px;
  font-size: 11px; font-weight: 500;
}

.wfa-badge--completed  { background: rgba(74,222,128,.12); color: #4ade80; }
.wfa-badge--processing { background: rgba(129,140,248,.12); color: #818cf8; }
.wfa-badge--on-hold    { background: rgba(251,191,36,.12);  color: #fbbf24; }
.wfa-badge--pending    { background: rgba(160,160,160,.1);  color: #a0a0a0; }
.wfa-badge--cancelled  { background: rgba(248,113,113,.12); color: #f87171; }
.wfa-badge--refunded   { background: rgba(248,113,113,.10); color: #f87171; }
.wfa-badge--failed     { background: rgba(248,113,113,.10); color: #f87171; }
.wfa-badge--publish    { background: rgba(74,222,128,.12);  color: #4ade80; }
.wfa-badge--draft      { background: rgba(160,160,160,.1);  color: #a0a0a0; }
.wfa-badge--instock    { background: rgba(74,222,128,.12);  color: #4ade80; }
.wfa-badge--outofstock { background: rgba(248,113,113,.12); color: #f87171; }
.wfa-badge--onbackorder{ background: rgba(251,191,36,.12);  color: #fbbf24; }

/* ── Pagination ── */
.wfa-pagination {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 16px !important;
  border-top: 1px solid var(--border);
  font-size: 12px; color: var(--text3);
}

.wfa-pagination-btns { display: flex; gap: 5px; }

.wfa-page-btn {
  padding: 4px 10px !important;
  border-radius: 6px;
  border: 1px solid var(--border2);
  background: var(--surface2);
  color: var(--text2);
  cursor: pointer;
  font-size: 12px;
  font-family: var(--font);
  transition: all 0.12s;
}

.wfa-page-btn:hover:not(:disabled) { border-color: rgba(255,255,255,0.25); color: var(--text); }
.wfa-page-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.wfa-page-btn.current { background: var(--text); border-color: var(--text); color: #000; }

/* ── Modal ── */
.wfa-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(6px);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.16s;
}

.wfa-modal-backdrop.open { opacity: 1; pointer-events: all; }

.wfa-modal {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 12px;
  width: 100%; max-width: 640px;
  max-height: 88vh; overflow-y: auto;
  transform: translateY(10px);
  transition: transform 0.16s;
	padding: 20px !important;
}

.wfa-modal-backdrop.open .wfa-modal { transform: translateY(0); }

.wfa-modal-head {
  padding: 18px 22px !important;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}

.wfa-modal-title { font-size: 14px; font-weight: 600; }

.wfa-modal-close {
  background: none; border: none; color: var(--text3);
  cursor: pointer; font-size: 18px; line-height: 1; padding: 0;
  transition: color 0.12s;
}
.wfa-modal-close:hover { color: var(--text); }

.wfa-modal-body { padding: 22px; }
.wfa-modal-foot {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 8px;
}

/* ── Form ── */
.wfa-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.wfa-form-group { display: flex; flex-direction: column; gap: 5px; }
.wfa-form-group.span-2 { grid-column: span 2; }

.wfa-label {
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text3);
}

.wfa-input, .wfa-select, .wfa-textarea {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 7px;
  padding: 8px 11px !important;
  color: var(--text);
  font-family: var(--font); font-size: 13px;
  outline: none; width: 100%;
  transition: border-color 0.12s;
}

.wfa-input:focus, .wfa-select:focus, .wfa-textarea:focus { border-color: rgba(255,255,255,0.28); }
.wfa-textarea { resize: vertical; min-height: 80px; }

/* ── Order Detail ── */
.wfa-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wfa-detail-row { display: flex; flex-direction: column; gap: 2px; }
.wfa-detail-key { font-size: 11px; color: var(--text3); }
.wfa-detail-val { font-size: 13px; color: var(--text); }
.wfa-detail-section { 
	margin-bottom: 20px; 
	padding: 20px !important;
}
.wfa-detail-section-title {
  font-size: 10px; font-weight: 600; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--text3); margin-bottom: 10px;
}

.wfa-items-mini { display: flex; flex-direction: column; gap: 5px; }
.wfa-item-mini {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--surface2); border-radius: 7px; padding: 8px 12px;
	padding: 15px !important;
}
.wfa-item-mini-qty { color: var(--text3); font-size: 12px; margin-left: 6px; }
.wfa-item-mini-price { font-size: 12.5px; color: var(--text); }

.wfa-totals-grid {
  background: var(--surface2); border-radius: 8px;
  padding: 13px 15px !important; display: flex; flex-direction: column; gap: 7px;
}

.wfa-total-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--text2); }
.wfa-total-row.grand {
  border-top: 1px solid var(--border); margin-top: 5px; padding-top: 8px;
  font-weight: 700; color: var(--text);
}

/* ── Product thumb ── */
.wfa-product-thumb {
  width: 32px; height: 32px;
  object-fit: cover; border-radius: 6px;
  border: 1px solid var(--border2);
  background: var(--surface2);
}

/* ── Loading / Empty ── */
.wfa-loading {
  display: flex; align-items: center; justify-content: center;
  padding: 60px; color: var(--text3); font-size: 13px; gap: 10px;
}

.wfa-spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--surface2);
  border-top-color: var(--text2);
  border-radius: 50%;
  animation: wfa-spin 0.7s linear infinite; flex-shrink: 0;
}

@keyframes wfa-spin { to { transform: rotate(360deg); } }

.wfa-empty { text-align: center; padding: 48px 24px; color: var(--text3); }
.wfa-empty-icon { font-size: 32px; margin-bottom: 10px; }
.wfa-empty-text { font-size: 13px; }

/* ── Toast ── */
.wfa-toasts {
  position: fixed; bottom: 20px; right: 20px;
  z-index: 999; display: flex; flex-direction: column; gap: 8px;
}

.wfa-toast {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 13px;
  max-width: 300px;
  animation: wfa-slide-in 0.2s ease;
  display: flex; align-items: center; gap: 8px;
}

.wfa-toast--success { border-left: 3px solid var(--green); }
.wfa-toast--error   { border-left: 3px solid var(--red); }

@keyframes wfa-slide-in {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Mobile ── */
.wfa-mobile-menu-btn {
  display: none;
  background: none; border: none;
  color: var(--text2); cursor: pointer; font-size: 18px;
}

.wfa-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.5); z-index: 99;
}
.wfa-overlay.open { display: block; }

@media (max-width: 1280px) {
  .wfa-stat-row { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .wfa-bottom-grid { grid-template-columns: 1fr; }
  .wfa-chart-wrap { height: 200px; }
}

@media (max-width: 768px) {
  .wfa-sidebar { transform: translateX(-100%); }
  .wfa-sidebar.open { transform: translateX(0); }
  .wfa-main { margin-left: 0; }
  .wfa-mobile-menu-btn { display: flex; }
  .wfa-stat-row { grid-template-columns: repeat(2, 1fr); }
  .wfa-form-grid { grid-template-columns: 1fr; }
  .wfa-form-group.span-2 { grid-column: span 1; }
  .wfa-detail-grid { grid-template-columns: 1fr; }
  .wfa-content { padding: 16px; }
  .hide-mobile { display: none; }
}

.wfa-no-access {
  padding: 40px; text-align: center;
  color: var(--text2); font-family: var(--font);
}

/* ── Anchor nav items (external links in sidebar) ── */
a.wfa-nav-item {
  text-decoration: none;
}
a.wfa-nav-item:visited { color: var(--text2); }

/* ── Topbar anchor button ── */
a.wfa-topbar-btn {
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Product image picker ── */
#pf-image-preview { transition: border-color 0.15s, opacity 0.15s; }
#pf-image-preview:hover { border-color: rgba(255,255,255,0.28) !important; opacity: 0.9; }

/* ── Category checklist scrollbar ── */
.wfa-form-group div::-webkit-scrollbar { width: 4px; }
.wfa-form-group div::-webkit-scrollbar-track { background: transparent; }
.wfa-form-group div::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

/* ══════════════════════════════════════════
   SETTINGS CARDS (used in Setup, Settings, Tools)
══════════════════════════════════════════ */
.wfa-settings-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: 14px;
	padding: 20px !important;
	margin: 0 20px 20px 20px !important;
}

.wfa-settings-card:last-child { margin-bottom: 0; }

.wfa-settings-card-head {
  padding: 16px 20px 13px;
  border-bottom: 1px solid var(--border);
}

.wfa-settings-card-title {
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 2px;
}

.wfa-settings-card-sub {
  font-size: 11.5px;
  color: var(--text3);
}

.wfa-settings-card-body {
  padding: 20px;
}

/* ── Tab bar ── */
.wfa-tab-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 16px !important;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.wfa-tab {
  padding: 9px 18px !important;
  font-size: 13px;
  font-weight: 500;
  border: none;
  background: none;
  color: var(--text3);
  cursor: pointer;
  font-family: var(--font);
  position: relative;
  transition: color 0.15s;
}

.wfa-tab:hover { color: var(--text2); }

.wfa-tab.active {
  color: var(--text);
}

.wfa-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0; right: 0;
  height: 2px;
  background: var(--text);
  border-radius: 1px 1px 0 0;
}

/* ── Toggle switch ── */
.wfa-toggle {
  display: inline-block;
  width: 34px;
  height: 19px;
  background: var(--surface3);
  border-radius: 10px;
  position: relative;
  flex-shrink: 0;
  border: 1px solid var(--border2);
  transition: background 0.2s, border-color 0.2s;
  cursor: pointer;
}

.wfa-toggle::after {
  content: '';
  position: absolute;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--text3);
  top: 2px;
  left: 2px;
  transition: transform 0.2s, background 0.2s;
}

.wfa-toggle.on {
  background: var(--green);
  border-color: var(--green);
}

.wfa-toggle.on::after {
  background: #000;
  transform: translateX(15px);
}

/* ── Payment gateways list ── */
.wfa-gateways-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wfa-gateway-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px 18px !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  transition: border-color 0.15s;
}

.wfa-gateway-card.enabled {
  border-color: rgba(74, 222, 128, 0.25);
}

.wfa-gateway-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.wfa-gateway-icon {
  width: 44px;
  height: 28px;
  object-fit: contain;
  border-radius: 4px;
  background: var(--surface2);
  padding: 2px;
  flex-shrink: 0;
}

.wfa-gateway-icon-placeholder {
  width: 44px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text2);
  flex-shrink: 0;
}

.wfa-gateway-name {
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 2px;
}

.wfa-gateway-desc {
  font-size: 12px;
  color: var(--text3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 400px;
}

.wfa-gateway-right {
  flex-shrink: 0;
}

/* ── Shipping zones ── */
.wfa-zone-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
	padding: 20px !important;
}

.wfa-zone-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px !important;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
  gap: 10px;
}

.wfa-zone-name {
  font-size: 13.5px;
  font-weight: 600;
}

.wfa-zone-locs {
  font-size: 11.5px;
  color: var(--text3);
  margin-top: 2px;
}

.wfa-zone-methods {
  padding: 14px 18px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wfa-method-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  background: var(--surface2);
  border-radius: 7px;
  gap: 10px;
}

.wfa-method-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.wfa-zone-add-method {
  padding: 0 18px 14px;
}

/* ── Tools grid ── */
.wfa-tools-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 14px;
  align-items: start;
}

@media (max-width: 900px) {
  .wfa-tools-grid { grid-template-columns: 1fr; }
}

/* ── System status table ── */
.wfa-status-table {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 !important;
}

.wfa-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 20px;
  font-size: 12.5px;
  border-bottom: 1px solid var(--border);
  gap: 8px;
}

.wfa-status-row:last-child { border-bottom: none; }

.wfa-status-label { color: var(--text3); flex-shrink: 0; }
.wfa-status-val   { color: var(--text); text-align: right; display: flex; align-items: center; font-size: 12px; }

/* ── Tool rows ── */
.wfa-tool-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.wfa-tool-info { flex: 1; }
.wfa-tool-name { font-size: 13px; font-weight: 500; margin-bottom: 2px; }
.wfa-tool-desc { font-size: 11.5px; color: var(--text3); }

/* ══════════════════════════════════════════
   CSV IMPORT MODAL
══════════════════════════════════════════ */

/* ── Step bar ── */
.wfa-import-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin: -4px -4px 0;
  flex-wrap: wrap;
}

.wfa-import-step {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text3);
  padding: 4px 8px;
}

.wfa-import-step.active {
  color: var(--text);
}

.wfa-import-step.done {
  color: var(--green);
}

.wfa-import-step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--surface3);
  border: 2px solid var(--border2);
  flex-shrink: 0;
  transition: all 0.2s;
}

.wfa-import-step.active .wfa-import-step-dot {
  background: var(--text);
  border-color: var(--text);
}

.wfa-import-step.done .wfa-import-step-dot {
  background: var(--green);
  border-color: var(--green);
}

.wfa-import-step-line {
  width: 28px;
  height: 1px;
  background: var(--border2);
  flex-shrink: 0;
}

/* ── Drop zone ── */
.wfa-import-dropzone {
  border: 2px dashed var(--border2);
  border-radius: var(--r);
  padding: 36px 24px;
  text-align: center;
  cursor: pointer;
  background: var(--surface2);
  transition: border-color 0.15s, background 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.wfa-import-dropzone:hover,
.wfa-import-dropzone.drag-over {
  border-color: var(--text2);
  background: var(--surface3);
}

.wfa-import-drop-icon {
  font-size: 36px;
  margin-bottom: 4px;
  opacity: 0.7;
}

.wfa-import-drop-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.wfa-import-drop-sub {
  font-size: 12px;
  color: var(--text3);
}

/* ── Column mapper ── */
.wfa-map-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
}

.wfa-map-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface2);
  border-radius: 7px;
  padding: 8px 12px;
}

.wfa-map-csv-col {
  flex: 0 0 180px;
  font-size: 12px;
  font-family: monospace;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wfa-map-arrow {
  color: var(--text3);
  font-size: 14px;
  flex-shrink: 0;
}

/* ── Import log ── */
.wfa-import-log {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 260px;
  overflow-y: auto;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 10px;
}

.wfa-log-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 3px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  min-height: 24px;
}

.wfa-log-row:last-child { border-bottom: none; }

.wfa-log-icon {
  font-size: 12px;
  flex-shrink: 0;
  width: 16px;
}

/* ── Done summary stats ── */
.wfa-import-summary {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.wfa-import-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 20px;
  min-width: 90px;
}

.wfa-import-stat--green { border-color: rgba(74,222,128,.2); }
.wfa-import-stat--blue  { border-color: rgba(129,140,248,.2); }
.wfa-import-stat--red   { border-color: rgba(248,113,113,.2); }

.wfa-import-stat-num {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.wfa-import-stat--green .wfa-import-stat-num { color: var(--green); }
.wfa-import-stat--blue  .wfa-import-stat-num { color: var(--blue);  }
.wfa-import-stat--red   .wfa-import-stat-num { color: var(--red);   }

.wfa-import-stat-label {
  font-size: 11px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── Make the modal wider for the import wizard ── */
.wfa-modal { max-width: 720px; }
