/* ================================================================
   MFS HARDWARE — admin.css  v3 (Kilimall/Jumia Seller Center style)
   Font: Plus Jakarta Sans (headings) + DM Sans (body)
   Palette: #0d1117 sidebar · #f7f8fc bg · #ff6600 brand
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

/* ── RESET ────────────────────────────────────────────────── */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
a{text-decoration:none;color:inherit}
button{font-family:var(--font-body);cursor:pointer}
img{display:block}

/* ── TOKENS ───────────────────────────────────────────────── */
:root{
  --brand:       #ff6600;
  --brand-dark:  #d95400;
  --brand-light: #fff3eb;
  --brand-muted: #ffe4cc;

  --sidebar-bg:  #0d1117;
  --sidebar-w:   248px;

  --bg:          #f7f8fc;
  --surface:     #ffffff;
  --surface-2:   #f3f4f8;

  --border:      #e9eaef;
  --border-focus:#ff6600;

  --text-h:      #0d1117;
  --text:        #1e2330;
  --text-2:      #5c6070;
  --text-3:      #9ba3b4;

  --green:       #10b981;
  --green-bg:    #ecfdf5;
  --red:         #ef4444;
  --red-bg:      #fef2f2;
  --amber:       #f59e0b;
  --amber-bg:    #fffbeb;
  --blue:        #3b82f6;
  --blue-bg:     #eff6ff;

  --radius-sm:   6px;
  --radius:      10px;
  --radius-lg:   14px;

  --shadow-xs:   0 1px 3px rgba(0,0,0,.06),0 1px 2px rgba(0,0,0,.04);
  --shadow-sm:   0 2px 8px rgba(0,0,0,.07),0 1px 3px rgba(0,0,0,.04);
  --shadow-md:   0 4px 16px rgba(0,0,0,.09),0 2px 6px rgba(0,0,0,.05);
  --shadow-lg:   0 12px 36px rgba(0,0,0,.13),0 4px 12px rgba(0,0,0,.06);

  --font-head:   'Plus Jakarta Sans',sans-serif;
  --font-body:   'DM Sans',sans-serif;

  --topbar-h:    60px;
  --transition:  .18s ease;
}

/* ── BASE ─────────────────────────────────────────────────── */
html{font-size:14px}
body{
  font-family:var(--font-body);
  background:var(--bg);
  color:var(--text);
  min-height:100vh;
  display:flex;
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
}

/* ── SIDEBAR ──────────────────────────────────────────────── */
.admin-sidebar{
  width:var(--sidebar-w);
  background:var(--sidebar-bg);
  min-height:100vh;
  position:fixed;
  top:0;left:0;bottom:0;
  display:flex;flex-direction:column;
  z-index:200;
  transition:transform .28s cubic-bezier(.4,0,.2,1);
}

.sidebar-logo{
  padding:22px 20px 18px;
  border-bottom:1px solid rgba(255,255,255,.06);
  display:flex;align-items:center;gap:11px;
}
.logo-icon{
  width:38px;height:38px;
  background:var(--brand);
  border-radius:9px;
  display:flex;align-items:center;justify-content:center;
  font-size:18px;flex-shrink:0;
}
.logo-name,.logo-text{
  font-family:var(--font-head);
  font-size:15px;font-weight:800;
  color:#fff;line-height:1.15;display:block;
}
.logo-sub,.logo-motto{
  font-size:10px;font-weight:500;
  color:rgba(255,255,255,.35);
  letter-spacing:.6px;text-transform:uppercase;display:block;
}

.sidebar-nav{
  flex:1;padding:14px 10px;overflow-y:auto;
  scrollbar-width:none;
}
.sidebar-nav::-webkit-scrollbar{display:none}

.nav-label{
  font-size:10px;font-weight:700;text-transform:uppercase;
  letter-spacing:1.2px;color:rgba(255,255,255,.25);
  padding:14px 10px 6px;
}

.sidebar-nav a{
  display:flex;align-items:center;gap:10px;
  padding:9px 12px;border-radius:var(--radius-sm);
  color:rgba(255,255,255,.5);
  font-size:13.5px;font-weight:500;
  transition:background var(--transition),color var(--transition);
  margin-bottom:1px;position:relative;
}
.sidebar-nav a i{
  width:17px;text-align:center;font-size:13.5px;flex-shrink:0;
  opacity:.8;
}
.sidebar-nav a:hover{background:rgba(255,255,255,.06);color:rgba(255,255,255,.85)}
.sidebar-nav a:hover i{opacity:1}
.sidebar-nav a.active{
  background:rgba(255,102,0,.18);
  color:var(--brand);font-weight:600;
}
.sidebar-nav a.active i{opacity:1;color:var(--brand)}
.sidebar-nav a.active::before{
  content:'';position:absolute;left:0;top:6px;bottom:6px;
  width:3px;background:var(--brand);border-radius:0 3px 3px 0;
}

.sidebar-footer{
  padding:14px 10px 18px;
  border-top:1px solid rgba(255,255,255,.06);
}
.admin-user-pill{
  display:flex;align-items:center;gap:10px;
  padding:9px 12px;border-radius:var(--radius);
  background:rgba(255,255,255,.05);
}
.admin-avatar{
  width:30px;height:30px;background:var(--brand);
  border-radius:50%;display:flex;align-items:center;justify-content:center;
  font-size:12px;font-weight:800;color:#fff;flex-shrink:0;
}
.admin-user-info{flex:1;overflow:hidden}
.admin-user-name{
  font-size:12px;font-weight:600;color:#fff;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.admin-user-role{font-size:10px;color:rgba(255,255,255,.3)}
.btn-logout{
  background:none;border:none;color:rgba(255,255,255,.3);
  cursor:pointer;padding:4px;font-size:14px;
  transition:color var(--transition);flex-shrink:0;
}
.btn-logout:hover{color:#ef4444}

/* ── MAIN AREA ────────────────────────────────────────────── */
.admin-main{
  margin-left:var(--sidebar-w);
  flex:1;display:flex;flex-direction:column;
  min-height:100vh;
}

/* ── TOPBAR ───────────────────────────────────────────────── */
.admin-topbar{
  height:var(--topbar-h);
  background:var(--surface);
  border-bottom:1px solid var(--border);
  display:flex;align-items:center;
  justify-content:space-between;
  padding:0 28px;
  position:sticky;top:0;z-index:100;
  box-shadow:var(--shadow-xs);
}
.topbar-left h1{
  font-family:var(--font-head);
  font-size:17px;font-weight:700;color:var(--text-h);
}
.topbar-left p{font-size:12px;color:var(--text-2);margin-top:1px}
.topbar-right{display:flex;align-items:center;gap:10px}
.topbar-badge{
  background:var(--green-bg);color:var(--green);
  border:1px solid #a7f3d0;
  border-radius:20px;padding:4px 11px;
  font-size:11.5px;font-weight:600;
  display:flex;align-items:center;gap:5px;
}
.hamburger{
  display:none;background:none;border:none;
  font-size:19px;cursor:pointer;color:var(--text-2);padding:4px;
}
.topbar-menu{
  display:none;background:none;border:none;
  font-size:19px;cursor:pointer;color:var(--text-2);padding:4px 8px;
}

/* ── CONTENT ──────────────────────────────────────────────── */
.admin-content{padding:24px 28px;flex:1}

/* ── STAT CARDS ───────────────────────────────────────────── */
.stats-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(195px,1fr));
  gap:14px;margin-bottom:24px;
}
.stat-card{
  background:var(--surface);border-radius:var(--radius-lg);
  padding:18px 20px;box-shadow:var(--shadow-sm);
  border:1px solid var(--border);
  display:flex;align-items:center;gap:14px;
  transition:transform var(--transition),box-shadow var(--transition);
}
.stat-card:hover{transform:translateY(-2px);box-shadow:var(--shadow-md)}
.stat-icon{
  width:44px;height:44px;border-radius:var(--radius);
  display:flex;align-items:center;justify-content:center;
  font-size:18px;flex-shrink:0;
}
.stat-icon.orange{background:#fff3eb;color:var(--brand)}
.stat-icon.green {background:var(--green-bg);color:var(--green)}
.stat-icon.blue  {background:var(--blue-bg);color:var(--blue)}
.stat-icon.amber {background:var(--amber-bg);color:var(--amber)}
.stat-info{flex:1}
.stat-label{font-size:11.5px;color:var(--text-2);font-weight:500;margin-bottom:5px}
.stat-value{
  font-family:var(--font-head);font-size:22px;
  font-weight:800;color:var(--text-h);line-height:1;
}

/* ── ADMIN CARD ───────────────────────────────────────────── */
.admin-card{
  background:var(--surface);border-radius:var(--radius-lg);
  border:1px solid var(--border);box-shadow:var(--shadow-sm);
  margin-bottom:20px;overflow:hidden;
}
.admin-card-header{
  padding:16px 22px;border-bottom:1px solid var(--border);
  display:flex;align-items:center;justify-content:space-between;
  flex-wrap:wrap;gap:12px;background:var(--surface);
}
.admin-card-title{
  font-family:var(--font-head);font-size:15px;
  font-weight:700;color:var(--text-h);
  display:flex;align-items:center;gap:8px;
}
.admin-card-title i{color:var(--brand);font-size:15px}
.admin-card-body{padding:18px 22px}

/* ── TABLE ────────────────────────────────────────────────── */
.table-wrap{overflow-x:auto}
table{width:100%;border-collapse:collapse;font-size:13.5px}
thead th{
  background:var(--surface-2);
  padding:11px 14px;text-align:left;
  font-size:11px;font-weight:700;text-transform:uppercase;
  letter-spacing:.7px;color:var(--text-2);
  border-bottom:1.5px solid var(--border);white-space:nowrap;
}
tbody td{
  padding:12px 14px;border-bottom:1px solid #f0f1f6;
  vertical-align:middle;color:var(--text);
  font-size:13.5px;
}
tbody tr:last-child td{border-bottom:none}
tbody tr{transition:background var(--transition)}
tbody tr:hover td{background:#f9fafd}
td select{
  padding:5px 10px;border-radius:var(--radius-sm);
  border:1.5px solid var(--border);font-size:12px;font-weight:600;
  cursor:pointer;font-family:var(--font-body);outline:none;background:#fff;
  transition:border-color var(--transition);
}
td select:focus{border-color:var(--brand)}

/* ── FILTERS ROW ──────────────────────────────────────────── */
.filters-row{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.filters-row input,.filters-row select{
  padding:8px 13px;border:1.5px solid var(--border);
  border-radius:var(--radius);font-size:13px;
  font-family:var(--font-body);background:var(--surface);
  color:var(--text);outline:none;
  transition:border-color var(--transition);min-width:155px;
}
.filters-row input:focus,.filters-row select:focus{border-color:var(--brand)}
.filters-row input[type="text"]{min-width:210px}

/* ── BADGES ───────────────────────────────────────────────── */
.badge{
  display:inline-flex;align-items:center;gap:4px;
  padding:3px 9px;border-radius:20px;
  font-size:11px;font-weight:700;letter-spacing:.2px;
}
.badge-pending    {background:var(--amber-bg);color:#92400e;border:1px solid #fde68a}
.badge-processing {background:var(--blue-bg);color:#1e40af;border:1px solid #bfdbfe}
.badge-completed,
.badge-delivered  {background:var(--green-bg);color:#065f46;border:1px solid #a7f3d0}
.badge-cancelled  {background:var(--red-bg);color:#b91c1c;border:1px solid #fecaca}
.badge-active     {background:var(--green-bg);color:#065f46;border:1px solid #a7f3d0}
.badge-disabled   {background:var(--red-bg);color:#b91c1c;border:1px solid #fecaca}
.badge-flash      {background:var(--amber-bg);color:#92400e;border:1px solid #fde68a}

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn{
  display:inline-flex;align-items:center;gap:7px;
  padding:8px 16px;border:none;border-radius:var(--radius);
  font-size:13px;font-weight:600;font-family:var(--font-body);
  cursor:pointer;transition:all var(--transition);
  text-decoration:none;white-space:nowrap;
}
.btn:active{transform:scale(.97)}
.btn-primary{background:var(--brand);color:#fff;box-shadow:0 2px 8px rgba(255,102,0,.25)}
.btn-primary:hover{background:var(--brand-dark);box-shadow:0 4px 14px rgba(255,102,0,.35)}
.btn-secondary{background:var(--surface-2);color:var(--text);border:1.5px solid var(--border)}
.btn-secondary:hover{background:var(--border);border-color:#d0d3df}
.btn-success{background:var(--green);color:#fff}
.btn-success:hover{background:#059669}
.btn-danger{background:var(--red);color:#fff}
.btn-danger:hover{background:#dc2626}
.btn-info{background:var(--blue);color:#fff}
.btn-info:hover{background:#2563eb}
.btn-warning{background:var(--amber);color:#fff}
.btn-warning:hover{background:#d97706}
.btn-sm{padding:5px 11px;font-size:12px;border-radius:var(--radius-sm)}
.btn-lg{padding:11px 24px;font-size:14.5px;border-radius:var(--radius)}

/* ── TABLE ACTION BUTTONS ─────────────────────────────────── */
.table-actions{display:flex;gap:5px;flex-wrap:wrap}

/* ── PAGINATION ───────────────────────────────────────────── */
.pagination{
  display:flex;gap:5px;flex-wrap:wrap;
  padding:14px 22px;border-top:1px solid var(--border);
  background:var(--surface-2);
}
.pagination button{
  min-width:32px;height:32px;padding:0 9px;
  border:1.5px solid var(--border);background:var(--surface);
  color:var(--text-2);font-size:13px;font-weight:600;
  border-radius:var(--radius-sm);cursor:pointer;
  font-family:var(--font-body);transition:all .15s;
}
.pagination button:hover{border-color:var(--brand);color:var(--brand)}
.pagination button.active{background:var(--brand);color:#fff;border-color:var(--brand)}
.pagination button:disabled{opacity:.4;cursor:default}

/* ── MODAL ────────────────────────────────────────────────── */
.modal{
  display:none;position:fixed;inset:0;
  background:rgba(13,17,23,.6);
  z-index:999;align-items:center;justify-content:center;
  padding:20px;backdrop-filter:blur(4px);
}
.modal.open{display:flex}
.modal-content{
  background:var(--surface);border-radius:var(--radius-lg);
  width:100%;max-width:540px;max-height:88vh;overflow-y:auto;
  box-shadow:var(--shadow-lg);
  animation:modalIn .22s cubic-bezier(.34,1.2,.64,1);
}
@keyframes modalIn{
  from{opacity:0;transform:scale(.94) translateY(12px)}
  to  {opacity:1;transform:scale(1) translateY(0)}
}
.modal-header{padding:20px 24px 0;display:flex;align-items:center;justify-content:space-between}
.modal-header h3{font-family:var(--font-head);font-size:17px;font-weight:700;color:var(--text-h)}
.modal-close{
  width:30px;height:30px;border:none;background:var(--surface-2);
  border-radius:var(--radius-sm);cursor:pointer;font-size:14px;
  color:var(--text-2);display:flex;align-items:center;justify-content:center;
  transition:all var(--transition);
}
.modal-close:hover{background:var(--red-bg);color:var(--red)}
#modalBody{padding:20px 24px 24px}

/* ═══════════════════════════════════════════════════════════
   PRODUCT FORM — Kilimall Seller Center style
   ═══════════════════════════════════════════════════════════ */

/* Numbered section cards */
.form-section{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  margin-bottom:14px;overflow:hidden;
  box-shadow:var(--shadow-xs);
  transition:box-shadow var(--transition);
}
.form-section:focus-within{box-shadow:var(--shadow-sm)}
.form-section.collapsed .form-section-body{display:none}
.form-section.collapsed .sec-toggle{transform:rotate(-90deg)}

.form-section-header{
  padding:15px 20px;
  display:flex;align-items:center;gap:12px;
  cursor:pointer;user-select:none;
  border-bottom:1px solid var(--border);
  background:var(--surface);
  transition:background var(--transition);
}
.form-section-header:hover{background:var(--surface-2)}
.section-icon{
  width:32px;height:32px;border-radius:8px;
  background:var(--brand-light);
  display:flex;align-items:center;justify-content:center;
  color:var(--brand);font-size:14px;flex-shrink:0;
}
.form-section-header h3{
  font-family:var(--font-head);font-size:14px;
  font-weight:700;color:var(--text-h);flex:1;
}
.form-section-header h3 .sec-sub{
  font-size:11.5px;color:var(--text-2);font-weight:400;margin-left:6px;
}
.sec-toggle{font-size:12px;color:var(--text-3);transition:transform .2s}

.form-section-body{padding:22px}

/* Grid layouts */
.pf-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.pf-grid.thirds{grid-template-columns:1fr 1fr 1fr}
.pf-group{display:flex;flex-direction:column;gap:6px}
.pf-group.span2{grid-column:span 2}
.pf-group.span3{grid-column:span 3}

/* Labels */
.pf-label{
  font-size:12px;font-weight:700;
  color:var(--text-h);letter-spacing:.2px;
  display:flex;align-items:center;gap:6px;
}
.pf-label .req{color:var(--red);font-size:13px;line-height:1}
.pf-label .hint{font-size:11px;color:var(--text-2);font-weight:400}
.sku-auto-badge{
  font-size:10px;background:#ecfdf5;color:#065f46;
  border:1px solid #a7f3d0;
  padding:2px 7px;border-radius:20px;font-weight:700;
}

/* Inputs */
.pf-input,.pf-select,.pf-textarea{
  width:100%;padding:10px 13px;
  border:1.5px solid var(--border);border-radius:var(--radius);
  font-size:13.5px;font-family:var(--font-body);
  color:var(--text-h);background:var(--surface);outline:none;
  transition:border-color var(--transition),box-shadow var(--transition);
  line-height:1.4;
}
.pf-input:hover,.pf-select:hover{border-color:#c8cad8}
.pf-input:focus,.pf-select:focus,.pf-textarea:focus{
  border-color:var(--brand);
  box-shadow:0 0 0 3px rgba(255,102,0,.1);
}
.pf-input::placeholder,.pf-textarea::placeholder{color:var(--text-3)}
.pf-textarea{resize:vertical;min-height:84px;line-height:1.55}
.pf-select{cursor:pointer;appearance:auto}
.pf-hint{font-size:11.5px;color:var(--text-2);line-height:1.4}

/* KES prefix input */
.pf-input-prefix{
  display:flex;border:1.5px solid var(--border);
  border-radius:var(--radius);overflow:hidden;
  transition:border-color var(--transition),box-shadow var(--transition);
  background:var(--surface);
}
.pf-input-prefix:hover{border-color:#c8cad8}
.pf-input-prefix:focus-within{
  border-color:var(--brand);
  box-shadow:0 0 0 3px rgba(255,102,0,.1);
}
.pf-prefix-label{
  background:var(--surface-2);padding:10px 13px;
  font-size:12px;font-weight:700;color:var(--text-2);
  border-right:1.5px solid var(--border);white-space:nowrap;
  display:flex;align-items:center;
}
.pf-input-prefix input{
  flex:1;padding:10px 13px;border:none;outline:none;
  font-size:13.5px;font-family:var(--font-body);color:var(--text-h);
  background:transparent;
}
.pf-input-prefix input::placeholder{color:var(--text-3)}

/* ── IMAGE UPLOAD ─────────────────────────────────────────── */
.img-upload-grid{
  display:grid;grid-template-columns:repeat(4,1fr);
  gap:12px;margin-top:4px;
}
.img-slot{
  border:1.5px dashed var(--border);border-radius:var(--radius);
  aspect-ratio:1;display:flex;flex-direction:column;
  align-items:center;justify-content:center;gap:6px;
  cursor:pointer;transition:all .2s;background:var(--surface-2);
  overflow:hidden;position:relative;
}
.img-slot:hover{border-color:var(--brand);background:var(--brand-light)}
.img-slot.has-img{border-style:solid;border-color:var(--brand);background:var(--surface)}
.img-slot img{width:100%;height:100%;object-fit:contain;padding:8px}
.img-slot-placeholder{display:flex;flex-direction:column;align-items:center;gap:6px}
.img-slot-placeholder i{font-size:22px;color:var(--text-3)}
.img-slot-placeholder span{font-size:11px;color:var(--text-3);text-align:center}
.img-slot-label{
  position:absolute;top:7px;left:7px;
  background:var(--brand);color:#fff;
  font-size:9px;font-weight:700;padding:2px 6px;border-radius:4px;
  text-transform:uppercase;letter-spacing:.4px;
}
.img-slot-overlay{
  position:absolute;inset:0;background:rgba(13,17,23,.55);
  display:none;align-items:center;justify-content:center;gap:6px;
  backdrop-filter:blur(2px);
}
.img-slot:hover .img-slot-overlay{display:flex}
.img-slot-overlay button{
  background:#fff;border:none;border-radius:6px;
  padding:5px 10px;font-size:11px;font-weight:700;
  cursor:pointer;font-family:var(--font-body);
  transition:all .15s;
}
.img-slot-overlay button:hover{background:var(--brand);color:#fff}
.img-url-inputs{margin-top:12px;display:flex;flex-direction:column;gap:8px}
.img-url-row{display:flex;gap:8px;align-items:center}
.img-url-row .pf-input{flex:1}
.img-num{
  width:22px;height:22px;border-radius:50%;
  font-size:10px;font-weight:800;
  display:flex;align-items:center;justify-content:center;
  flex-shrink:0;background:var(--brand);color:#fff;
}

/* Cloudinary upload buttons */
.cld-upload-btn{
  display:inline-flex;align-items:center;gap:7px;
  padding:9px 15px;background:var(--surface);
  border:1.5px dashed var(--brand);border-radius:var(--radius);
  font-size:12px;font-weight:700;color:var(--brand);
  cursor:pointer;transition:all .2s;font-family:var(--font-body);
}
.cld-upload-btn:hover{background:var(--brand);color:#fff;border-style:solid}
.cld-upload-btn.main-slot{background:var(--brand-light);border-style:solid}
.cld-url-filled{border-color:var(--green)!important;background:var(--green-bg)!important}

/* ── SPECS ────────────────────────────────────────────────── */
.spec-presets{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:14px}
.spec-preset-chip{
  padding:5px 12px;background:var(--surface-2);
  border:1.5px solid var(--border);border-radius:20px;
  font-size:11.5px;font-weight:600;color:var(--text-2);
  cursor:pointer;transition:all .15s;
}
.spec-preset-chip:hover{
  background:var(--brand-light);border-color:var(--brand);color:var(--brand);
}
.specs-builder{display:flex;flex-direction:column;gap:8px}
.spec-row{display:grid;grid-template-columns:1fr 1fr auto;gap:8px;align-items:center}
.spec-del-btn{
  width:32px;height:32px;background:var(--red-bg);
  border:1.5px solid #fecaca;border-radius:var(--radius-sm);
  color:var(--red);font-size:12px;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  flex-shrink:0;transition:all .15s;
}
.spec-del-btn:hover{background:var(--red);color:#fff;border-color:var(--red)}
.add-row-btn{
  display:inline-flex;align-items:center;gap:7px;
  padding:8px 15px;background:var(--surface-2);
  border:1.5px dashed var(--border);border-radius:var(--radius);
  font-size:12.5px;font-weight:600;color:var(--text-2);
  cursor:pointer;transition:all .2s;margin-top:6px;
  font-family:var(--font-body);
}
.add-row-btn:hover{
  background:var(--brand-light);border-color:var(--brand);
  color:var(--brand);border-style:dashed;
}

/* ── VARIANTS ─────────────────────────────────────────────── */
.variants-builder{display:flex;flex-direction:column;gap:10px}
.variant-card{
  border:1.5px solid var(--border);border-radius:var(--radius);
  overflow:hidden;transition:border-color var(--transition);
}
.variant-card:hover{border-color:#c8cad8}
.variant-card-header{
  background:var(--surface-2);padding:10px 16px;
  display:flex;align-items:center;gap:10px;
  font-size:13px;font-weight:700;color:var(--text-h);
  border-bottom:1px solid var(--border);
}
.var-num{
  width:22px;height:22px;background:var(--brand);color:#fff;
  border-radius:50%;font-size:11px;font-weight:800;
  display:flex;align-items:center;justify-content:center;flex-shrink:0;
}
.variant-card-header button{
  margin-left:auto;background:none;border:none;
  color:var(--red);cursor:pointer;font-size:13px;
  padding:3px 7px;border-radius:var(--radius-sm);
  transition:all .15s;
}
.variant-card-header button:hover{background:var(--red-bg)}
.variant-card-body{
  padding:16px;
  display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px;
}

/* ── TOGGLE ITEMS ─────────────────────────────────────────── */
.toggle-row{display:flex;flex-wrap:wrap;gap:10px}
.toggle-item{
  display:flex;align-items:center;gap:11px;
  background:var(--surface);border:1.5px solid var(--border);
  border-radius:var(--radius);padding:12px 16px;
  flex:1;min-width:150px;cursor:pointer;
  transition:all var(--transition);
}
.toggle-item:hover{border-color:#c8cad8;background:var(--surface-2)}
.toggle-item.on{border-color:var(--brand);background:var(--brand-light)}
.toggle-icon{
  width:36px;height:36px;border-radius:var(--radius-sm);
  display:flex;align-items:center;justify-content:center;
  font-size:15px;flex-shrink:0;
}
.toggle-text{flex:1}
.toggle-text strong{display:block;font-size:13px;font-weight:700;color:var(--text-h)}
.toggle-text span{font-size:11px;color:var(--text-2)}
.toggle-switch{
  width:38px;height:21px;background:#d1d5db;
  border-radius:11px;position:relative;flex-shrink:0;
  transition:background .2s;
}
.toggle-switch::after{
  content:'';position:absolute;top:2px;left:2px;
  width:17px;height:17px;background:#fff;border-radius:50%;
  transition:left .2s;box-shadow:0 1px 4px rgba(0,0,0,.18);
}
.toggle-item.on .toggle-switch{background:var(--brand)}
.toggle-item.on .toggle-switch::after{left:19px}

/* ── FORM SAVE BAR ────────────────────────────────────────── */
.form-save-bar{
  display:flex;align-items:center;gap:12px;
  padding:16px 22px;
  background:var(--surface);
  border-top:2px solid var(--brand);
  box-shadow:0 -4px 20px rgba(0,0,0,.07);
  border-radius:0 0 var(--radius-lg) var(--radius-lg);
}
.save-hint{font-size:12px;color:var(--text-2);flex:1}

/* ── PRODUCT TABLE CELLS ──────────────────────────────────── */
.prod-thumb-cell{display:flex;align-items:center;gap:10px}
.prod-thumb-cell img{
  width:44px;height:44px;object-fit:contain;
  border:1px solid var(--border);border-radius:var(--radius-sm);
  background:var(--surface-2);padding:3px;flex-shrink:0;
}
.prod-name-info strong{
  display:block;font-size:13.5px;font-weight:700;color:var(--text-h);
  max-width:200px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.prod-name-info .prod-sku{font-size:11px;color:var(--text-2);font-family:monospace}
.prod-name-info .prod-brand{font-size:11.5px;color:var(--brand);font-weight:700}
.status-dot{
  display:inline-flex;align-items:center;gap:5px;
  font-size:11.5px;font-weight:700;padding:3px 9px;border-radius:20px;
}
.status-dot.active {background:var(--green-bg);color:#065f46;border:1px solid #a7f3d0}
.status-dot.inactive{background:var(--red-bg);color:#b91c1c;border:1px solid #fecaca}
.stock-cell{font-weight:700;font-size:13px}
.stock-cell.ok {color:var(--green)}
.stock-cell.low{color:var(--amber)}
.stock-cell.out{color:var(--red)}
.flash-badge{
  display:inline-flex;align-items:center;gap:4px;
  background:var(--amber-bg);color:#92400e;
  font-size:11px;font-weight:700;padding:2px 7px;border-radius:4px;
  border:1px solid #fde68a;
}

/* ── EMPTY STATE ──────────────────────────────────────────── */
.table-empty-state{text-align:center;padding:52px 20px;color:var(--text-2)}
.table-empty-state i{font-size:36px;color:var(--text-3);display:block;margin-bottom:14px}
.table-empty-state strong{display:block;font-size:15px;color:var(--text-2);margin-bottom:6px}
.empty-state{text-align:center;padding:40px 20px;color:var(--text-2)}
.empty-state i{font-size:34px;margin-bottom:12px;display:block;opacity:.35}

/* ── TOAST ────────────────────────────────────────────────── */
#adminToast{
  position:fixed;bottom:24px;right:24px;
  background:var(--text-h);color:#fff;
  padding:12px 20px;border-radius:var(--radius);
  font-size:13px;font-weight:600;
  z-index:9999;box-shadow:var(--shadow-lg);
  transition:opacity .3s;pointer-events:none;max-width:320px;
  font-family:var(--font-body);
}

/* ── CHARTS ───────────────────────────────────────────────── */
.charts-row{display:grid;grid-template-columns:2fr 1fr;gap:20px;margin-bottom:24px}
.analytics-chart canvas{width:100%!important}
#top-products{list-style:none}
#top-products li{
  display:flex;justify-content:space-between;align-items:center;
  padding:10px 0;font-size:13px;
  border-bottom:1px solid var(--border);color:var(--text);
}
#top-products li:last-child{border-bottom:none}

/* ── MISC UTILS ───────────────────────────────────────────── */
.divider{border:none;border-top:1px solid var(--border);margin:18px 0}
.sidebar-overlay{
  display:none;position:fixed;inset:0;
  background:rgba(13,17,23,.55);z-index:199;
}
.sidebar-overlay.open{display:block}

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media(max-width:960px){
  .admin-sidebar{transform:translateX(-100%)}
  .admin-sidebar.open{transform:translateX(0);box-shadow:var(--shadow-lg)}
  .admin-main{margin-left:0}
  .hamburger,.topbar-menu{display:flex}
  .charts-row{grid-template-columns:1fr}
  .admin-content{padding:16px}
  .admin-topbar{padding:0 16px}
  .admin-card-header{padding:14px 16px}
  .admin-card-body{padding:14px 16px}
  #modalBody{padding:14px 16px 20px}
  .pf-grid{grid-template-columns:1fr}
  .pf-grid.thirds{grid-template-columns:1fr 1fr}
  .pf-group.span2,.pf-group.span3{grid-column:span 1}
  .img-upload-grid{grid-template-columns:1fr 1fr}
  .variant-card-body{grid-template-columns:1fr 1fr}
  .stats-grid{grid-template-columns:repeat(2,1fr)}
  .form-section-body{padding:16px}
}
@media(max-width:480px){
  .stats-grid{grid-template-columns:1fr 1fr}
  .stat-value{font-size:19px}
  .toggle-row{flex-direction:column}
  .pf-grid.thirds{grid-template-columns:1fr}
}