/* ============================================================
   Hantarin - Clean Modern Design
   Default Theme: Light
   Copyright DITZNET TECHNOLOGY
   ============================================================ */

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

/* ── Variables — Light (Default) ─────────────────────────── */
:root {
  /* Accent palette — violet + amber */
  --accent:        #7c6ff7;
  --accent-2:      #f5a623;
  --accent-light:  #f0effe;
  --accent-mid:    rgba(124,111,247,.18);
  --accent-dark:   #6155e8;

  /* Backgrounds */
  --bg:        #ede9fe;       /* lavender outer bg */
  --surface:   #ffffff;
  --surface2:  #f8f7ff;
  --surface3:  #f0effe;

  /* Borders */
  --border:    #e8e4fd;
  --border2:   #d4cffa;

  /* Text */
  --text:      #1a1535;
  --text2:     #4a4270;
  --text3:     #9b94c4;

  /* Semantic */
  --green:       #10b981;
  --green-bg:    #d1fae5;
  --green-text:  #065f46;
  --yellow:      #f59e0b;
  --yellow-bg:   #fef3c7;
  --yellow-text: #92400e;
  --red:         #ef4444;
  --red-bg:      #fee2e2;
  --red-text:    #b91c1c;
  --blue:        #6366f1;
  --blue-bg:     #e0e7ff;
  --blue-text:   #3730a3;

  /* Neon aliases — mapped ke warna modern */
  --neon-cyan:   #7c6ff7;
  --neon-pink:   #ef4444;
  --neon-yellow: #f59e0b;
  --neon-green:  #10b981;
  --neon-purple: #8b5cf6;
  --neon-orange: #f97316;

  /* Layout */
  --sidebar-w:    240px;
  --topbar-h:     60px;
  --bottom-nav-h: 62px;
  --r:    12px;
  --r-lg: 18px;

  /* Shadows — clean, no glow */
  --shadow:    0 2px 8px rgba(100,80,220,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 6px 24px rgba(100,80,220,.12), 0 2px 6px rgba(0,0,0,.05);
  --shadow-lg: 0 16px 48px rgba(100,80,220,.14), 0 4px 12px rgba(0,0,0,.07);

  --trans: .18s ease;

  /* Rainbow nav */
  --nav-dashboard:  #7c6ff7;
  --nav-items:      #ef4444;
  --nav-vendors:    #f59e0b;
  --nav-categories: #10b981;
  --nav-finance:    #8b5cf6;
  --nav-settings:   #f97316;
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}
a   { color: var(--accent); text-decoration: none; }
img { max-width: 100%; }
button { font-family: inherit; }

/* ── Layout ───────────────────────────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  box-shadow: 4px 0 20px rgba(100,80,220,.06);
  border-radius: 0 20px 20px 0;
}
.sidebar-brand {
  padding: 22px 18px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-logo {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, #7c6ff7, #a78bfa);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 16px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(124,111,247,.35);
}
.brand-text .name {
  font-size: 15px; font-weight: 800;
  color: var(--text);
  letter-spacing: -.3px;
  line-height: 1.2;
}
.brand-text .copy {
  font-size: 9px; color: var(--text3);
  text-transform: uppercase; letter-spacing: 1.2px;
  margin-top: 1px;
}
.sidebar-nav {
  flex: 1;
  padding: 14px 12px;
  overflow-y: auto;
}
.nav-group-label {
  font-size: 9px; font-weight: 700;
  color: var(--text3);
  text-transform: uppercase; letter-spacing: 1.5px;
  padding: 12px 10px 5px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r);
  color: var(--text3);
  cursor: pointer;
  transition: all var(--trans);
  font-size: 13px; font-weight: 500;
  margin-bottom: 3px;
  border: 1px solid transparent;
  background: none; width: 100%; text-align: left;
  position: relative;
}
.nav-item i { width: 18px; text-align: center; font-size: 14px; transition: all var(--trans); }
.nav-item:hover { background: var(--surface2); color: var(--text2); }

/* Rainbow icon colors */
.nav-item[data-page="dashboard"] i  { color: var(--nav-dashboard); }
.nav-item[data-page="items"] i      { color: var(--nav-items); }
.nav-item[data-page="vendors"] i    { color: var(--nav-vendors); }
.nav-item[data-page="categories"] i { color: var(--nav-categories); }
.nav-item[data-page="finance"] i    { color: var(--nav-finance); }
.nav-item[data-page="settings"] i   { color: var(--nav-settings); }
.nav-item[data-page="about"] i      { color: var(--blue); }

/* Active — pill style seperti di gambar */
.nav-item.active {
  background: var(--accent-light);
  border-color: var(--border2);
  color: var(--accent);
  font-weight: 600;
}
.nav-item[data-page="dashboard"].active  { background: #f0effe; border-color: #d4cffa; color: #7c6ff7; }
.nav-item[data-page="items"].active      { background: #fff0f0; border-color: #fca5a5; color: #ef4444; }
.nav-item[data-page="vendors"].active    { background: #fffbeb; border-color: #fde68a; color: #d97706; }
.nav-item[data-page="categories"].active { background: #f0fdf4; border-color: #bbf7d0; color: #10b981; }
.nav-item[data-page="finance"].active    { background: #faf5ff; border-color: #ddd6fe; color: #8b5cf6; }
.nav-item[data-page="settings"].active   { background: #fff7ed; border-color: #fed7aa; color: #f97316; }
.nav-item[data-page="about"].active      { background: #eef2ff; border-color: #c7d2fe; color: #6366f1; }

.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  font-size: 9px; font-weight: 700;
  padding: 1px 6px;
  border-radius: 20px;
  min-width: 18px; text-align: center;
}
.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border);
}

/* ── Main content ─────────────────────────────────────────── */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex; flex-direction: column;
  min-width: 0; overflow-x: hidden;
}

/* ── Topbar ───────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 24px; gap: 12px;
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow);
  border-radius: 0 0 0 0;
}
.topbar-title {
  font-size: 15px; font-weight: 700;
  color: var(--text); flex: 1;
  letter-spacing: -.2px;
}
.topbar-actions { display: flex; align-items: center; gap: 8px; }

/* ── Page ─────────────────────────────────────────────────── */
.page { flex: 1; padding: 24px; display: none; }
.page.active { display: block; animation: fadeUp .18s ease forwards; }
@keyframes fadeUp {
  from { opacity:0; transform:translateY(6px); }
  to   { opacity:1; transform:translateY(0); }
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border-radius: var(--r);
  font-size: 12px; font-weight: 600;
  font-family: inherit; cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text2);
  transition: all var(--trans);
  white-space: nowrap;
}
.btn:hover  { background: var(--surface2); border-color: var(--border2); color: var(--text); }
.btn:active { transform: scale(.97); }
.btn-accent {
  background: var(--accent); border-color: var(--accent); color: #fff;
  box-shadow: 0 3px 10px rgba(124,111,247,.35);
}
.btn-accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); box-shadow: 0 5px 16px rgba(124,111,247,.45); color: #fff; }
.btn-ghost  { border-color: transparent; background: transparent; color: var(--text3); }
.btn-ghost:hover { background: var(--surface2); color: var(--text2); border-color: transparent; }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 3px 10px rgba(239,68,68,.25); }
.btn-danger:hover { background: #dc2626; border-color: #dc2626; }
.btn-sm  { padding: 5px 12px; font-size: 11px; }
.btn-icon { padding: 7px 9px; }

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  padding: 20px;
  box-shadow: var(--shadow);
}
.card-sm { padding: 14px 16px; }

/* ── Dashboard layout ─────────────────────────────────────── */
.dash-stat-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 14px; margin-bottom: 20px;
}
.dash-row-2      { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dash-row-charts { display: grid; grid-template-columns: 220px 1fr; gap: 16px; }
.dash-mb         { margin-bottom: 18px; }

/* ── Stat cards — gradient style seperti di gambar ────────── */
.stat-card {
  border-radius: var(--r-lg);
  padding: 20px 18px;
  display: flex; align-items: center; gap: 14px;
  position: relative; overflow: hidden;
  border: 1px solid transparent;
  transition: transform var(--trans), box-shadow var(--trans);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-card__icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
  background: rgba(255,255,255,.35);
}
.stat-card__body { flex: 1; min-width: 0; }

/* Stat card color variants — gradient fills */
.stat-card--accent {
  background: linear-gradient(135deg, #7c6ff7 0%, #a78bfa 100%);
  border-color: rgba(124,111,247,.3);
  box-shadow: 0 6px 24px rgba(124,111,247,.3);
}
.stat-card--accent .stat-card__icon { background: rgba(255,255,255,.25); color: #fff; }
.stat-card--accent .stat-label,
.stat-card--accent .stat-value,
.stat-card--accent .stat-value--md  { color: #fff; }
.stat-card--accent .stat-label      { color: rgba(255,255,255,.8); }

.stat-card--green {
  background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
  border-color: rgba(16,185,129,.3);
  box-shadow: 0 6px 24px rgba(16,185,129,.25);
}
.stat-card--green .stat-card__icon  { background: rgba(255,255,255,.25); color: #fff; }
.stat-card--green .stat-label,
.stat-card--green .stat-value,
.stat-card--green .stat-value--md   { color: #fff; }
.stat-card--green .stat-label       { color: rgba(255,255,255,.8); }

.stat-card--blue {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  border-color: rgba(245,158,11,.3);
  box-shadow: 0 6px 24px rgba(245,158,11,.25);
}
.stat-card--blue .stat-card__icon   { background: rgba(255,255,255,.25); color: #fff; }
.stat-card--blue .stat-label,
.stat-card--blue .stat-value,
.stat-card--blue .stat-value--md    { color: #fff; }
.stat-card--blue .stat-label        { color: rgba(255,255,255,.8); }

.stat-card--purple {
  background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
  border-color: rgba(239,68,68,.3);
  box-shadow: 0 6px 24px rgba(239,68,68,.22);
}
.stat-card--purple .stat-card__icon { background: rgba(255,255,255,.25); color: #fff; }
.stat-card--purple .stat-label,
.stat-card--purple .stat-value,
.stat-card--purple .stat-value--md  { color: #fff; }
.stat-card--purple .stat-label      { color: rgba(255,255,255,.8); }

.stat-label   { font-size: 11px; color: var(--text3); font-weight: 500; text-transform: uppercase; letter-spacing: .6px; margin-bottom: 4px; }
.stat-value   { font-size: 24px; font-weight: 800; color: var(--text); line-height: 1.1; }
.stat-value--md { font-size: 16px; font-weight: 700; }
.stat-sub     { font-size: 11px; color: var(--text3); margin-top: 4px; }
.stat-icon    { font-size: 14px; color: var(--accent); margin-bottom: 8px; }

/* ── Dashboard specifics ──────────────────────────────────── */
.dash-card-header    { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.dash-progress-pct   { font-size: 26px; font-weight: 800; color: var(--accent); line-height: 1; }
.dash-status-grid    { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.dash-priority-grid  { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dash-status-chip    { border-radius: var(--r); padding: 10px 8px; text-align: center; border: 1px solid transparent; }
.dash-chip-val       { font-size: 20px; font-weight: 800; line-height: 1.2; }
.dash-chip-label     { font-size: 10px; margin-top: 3px; font-weight: 500; color: var(--text3); }
.dash-card-budget    { display: flex; flex-direction: column; }
.dash-budget-row     { display: flex; justify-content: space-between; align-items: baseline; }
.dash-budget-label   { font-size: 10px; color: var(--text3); font-weight: 600; text-transform: uppercase; letter-spacing: .8px; }
.dash-budget-spent   { font-size: 17px; font-weight: 700; color: var(--accent); }
.dash-budget-total   { font-size: 13px; font-weight: 600; color: var(--text2); }

.dash-status-chip--red    { background: #fff0f0; border-color: #fecaca; }
.dash-status-chip--red    .dash-chip-val   { color: #ef4444; }
.dash-status-chip--yellow { background: #fffbeb; border-color: #fde68a; }
.dash-status-chip--yellow .dash-chip-val   { color: #d97706; }
.dash-status-chip--green  { background: #f0fdf4; border-color: #bbf7d0; }
.dash-status-chip--green  .dash-chip-val   { color: #10b981; }
.dash-status-chip--gray   { background: var(--surface2); border-color: var(--border); }
.dash-status-chip--gray   .dash-chip-val   { color: var(--text2); }

/* ── Form ─────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block; font-size: 11px; font-weight: 600;
  color: var(--text2); margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: .6px;
}
.form-control {
  width: 100%; padding: 9px 12px;
  border-radius: var(--r); border: 1px solid var(--border);
  background: var(--surface); color: var(--text);
  font-size: 13px; font-family: inherit;
  transition: border-color var(--trans), box-shadow var(--trans);
  outline: none;
}
.form-control:focus   { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-mid); }
.form-control::placeholder { color: var(--text3); }
textarea.form-control { resize: vertical; min-height: 80px; }
select.form-control   { cursor: pointer; }
.form-hint  { font-size: 11px; color: var(--text3); margin-top: 4px; }
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.input-group { display: flex; }
.input-group .form-control { border-radius: var(--r) 0 0 var(--r); flex: 1; }
.input-group .btn          { border-radius: 0 var(--r) var(--r) 0; border-left: none; }

/* ── Star rating ──────────────────────────────────────────── */
.star-rating { display: flex; gap: 4px; }
.star-rating i { font-size: 18px; color: var(--border2); cursor: pointer; transition: all var(--trans); }
.star-rating i.active, .star-rating i:hover { color: var(--yellow); transform: scale(1.1); }

/* ── Badges ───────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 20px;
  font-size: 10px; font-weight: 600;
  border: 1px solid transparent;
}
.badge-green  { background: var(--green-bg);  color: var(--green-text); border-color: #a7f3d0; }
.badge-yellow { background: var(--yellow-bg); color: var(--yellow-text);border-color: #fde68a; }
.badge-red    { background: var(--red-bg);    color: var(--red-text);   border-color: #fca5a5; }
.badge-blue   { background: var(--blue-bg);   color: var(--blue-text);  border-color: #a5b4fc; }
.badge-gray   { background: var(--surface2);  color: var(--text2);      border-color: var(--border); }
.badge-accent { background: var(--accent-light); color: var(--accent);  border-color: var(--border2); }

/* ── Table ────────────────────────────────────────────────── */
.table-wrap   { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--border); box-shadow: var(--shadow); }
table         { width: 100%; border-collapse: collapse; background: var(--surface); }
thead th {
  padding: 11px 14px; font-size: 10px; font-weight: 700;
  color: var(--text3); text-transform: uppercase; letter-spacing: .8px;
  background: var(--surface2); border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td      { padding: 12px 14px; font-size: 13px; color: var(--text); border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surface2); }

/* ── Modal ────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(26,21,53,.4);
  backdrop-filter: blur(6px);
  z-index: 500;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  opacity: 0; pointer-events: none;
  transition: opacity .18s ease;
  will-change: opacity;
}
.modal-backdrop.show { opacity: 1; pointer-events: all; }
.modal {
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 540px;
  max-height: 90vh; overflow-y: auto;
  transform: scale(.97) translateY(6px); 
  transition: transform .10s ease-out;
  will-change: transform;
}
.modal-backdrop.show .modal { transform: scale(1) translateY(0); }
.modal-lg { max-width: 720px; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.modal-title  { font-size: 15px; font-weight: 700; color: var(--text); }
.modal-body   { padding: 20px; }
.modal-footer {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 10px; padding: 14px 20px;
  border-top: 1px solid var(--border);
}

/* ── Confirm dialog ───────────────────────────────────────── */
.confirm-modal { max-width: 380px; }
.confirm-icon  { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; margin: 0 auto 14px; }

/* ── Toast ────────────────────────────────────────────────── */
.toast-container { position: fixed; bottom: 80px; right: 20px; z-index: 1000; display: flex; flex-direction: column; gap: 8px; }
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  font-size: 12px; font-weight: 600;
  min-width: 240px; max-width: 320px;
  animation: toastIn .28s cubic-bezier(.34,1.56,.64,1);
  transition: opacity .2s, transform .2s;
}
.toast.hiding { opacity: 0; transform: translateX(20px); }
.toast i { font-size: 15px; }
.toast-success { border-left: 3px solid var(--green);  }
.toast-success i { color: var(--green); }
.toast-error   { border-left: 3px solid var(--red);    }
.toast-error i   { color: var(--red); }
.toast-info    { border-left: 3px solid var(--accent);  }
.toast-info i    { color: var(--accent); }
.toast-warning { border-left: 3px solid var(--yellow); }
.toast-warning i { color: var(--yellow); }
@keyframes toastIn {
  from { opacity:0; transform:translateX(20px) scale(.95); }
  to   { opacity:1; transform:translateX(0) scale(1); }
}

/* ── Progress bar ─────────────────────────────────────────── */
.progress-wrap {
  background: var(--surface2);
  border-radius: 99px; height: 8px; overflow: hidden;
  border: 1px solid var(--border);
}
.progress-fill {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, #7c6ff7, #a78bfa);
  transition: width .5s cubic-bezier(.34,1.56,.64,1);
}

/* ── Filter bar ───────────────────────────────────────────── */
.filter-bar {
  display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px;
  padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow);
}
.filter-row { display: flex; align-items: center; gap: 10px; width: 100%; }
.filter-bar .form-control { width: auto; flex: 1; min-width: 0; }
.search-wrap { position: relative; flex: 3; min-width: 0; }
#cdd-category { flex: 2; }
.search-wrap i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--accent); font-size: 12px; }
.search-wrap input { padding-left: 32px; }

/* ── Custom Dropdown ──────────────────────────────────────── */
.cdd-wrap { position: relative; flex: 1; min-width: 0; }
.cdd-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 0 14px; height: 42px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--r-md); cursor: pointer;
  font-size: 13px; font-weight: 500; color: var(--text1);
  transition: border-color .15s, box-shadow .15s;
}
.cdd-btn:hover { border-color: var(--accent); }
.cdd-wrap.open .cdd-btn { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.cdd-label { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cdd-arrow { font-size: 10px; color: var(--text3); flex-shrink: 0; transition: transform .2s; }
.cdd-wrap.open .cdd-arrow { transform: rotate(180deg); }
.cdd-menu {
  display: none; position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); box-shadow: 0 8px 24px rgba(0,0,0,.12);
  z-index: 200; overflow: hidden; min-width: 160px;
}
.cdd-wrap.open .cdd-menu { display: block; }
.cdd-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; font-size: 13px; color: var(--text2);
  cursor: pointer; transition: background .12s;
}
.cdd-item:hover { background: var(--accent-light); color: var(--accent); }
.cdd-item.active { color: var(--accent); font-weight: 600; background: var(--accent-light); }
.cdd-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* ── Item cards ───────────────────────────────────────────── */
.item-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  display: flex; align-items: flex-start; gap: 14px;
  transition: all var(--trans);
  margin-bottom: 10px; cursor: pointer;
  box-shadow: var(--shadow);
}
.item-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.item-thumb {
  width: 48px; height: 48px; border-radius: 13px;
  background: var(--surface2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; overflow: hidden; flex-shrink: 0;
}
.item-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.item-info  { flex: 1; min-width: 0; }
.item-name  { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 5px; }
.item-meta  { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.item-price { font-size: 14px; font-weight: 700; color: var(--accent); margin-left: auto; white-space: nowrap; }
.item-actions { display: flex; gap: 4px; margin-left: 8px; }

/* ── Vendor card ──────────────────────────────────────────── */
.vendor-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 16px;
  transition: all var(--trans); cursor: pointer; box-shadow: var(--shadow);
}
.vendor-card:hover { border-color: var(--yellow); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.vendor-avatar {
  width: 44px; height: 44px; border-radius: 13px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #d97706;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; margin-bottom: 10px;
  border: 1px solid #fde68a;
}
.vendor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 14px; }

/* ── Color dot ────────────────────────────────────────────── */
.color-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

/* ── Section header ───────────────────────────────────────── */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 12px; flex-wrap: wrap; }
.section-title  { font-size: 14px; font-weight: 700; color: var(--text); letter-spacing: -.2px; }
.section-sub    { font-size: 12px; color: var(--text3); margin-top: 2px; }

/* ── Empty state ──────────────────────────────────────────── */
.empty-state { text-align: center; padding: 52px 24px; color: var(--text3); }
.empty-state i  { font-size: 46px; margin-bottom: 14px; color: var(--accent); opacity: .2; display: block; }
.empty-state h3 { color: var(--text2); font-size: 16px; font-weight: 600; }
.empty-state p  { font-size: 13px; margin-top: 6px; }

/* ── Tabs ─────────────────────────────────────────────────── */
.tabs {
  display: flex; gap: 4px; background: var(--surface2);
  padding: 4px; border-radius: var(--r); margin-bottom: 20px;
  border: 1px solid var(--border);
}
.tab-btn {
  flex: 1; padding: 7px 12px; border-radius: 9px;
  font-size: 11px; font-weight: 600; color: var(--text3);
  cursor: pointer; border: none; background: none;
  transition: all var(--trans); font-family: inherit;
  text-transform: uppercase; letter-spacing: .5px;
}
.tab-btn.active { background: var(--surface); color: var(--accent); border: 1px solid var(--border); box-shadow: var(--shadow); }
.tab-btn:hover:not(.active) { color: var(--text2); }

/* ── Status dot ───────────────────────────────────────────── */
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* ── Chart canvas ─────────────────────────────────────────── */
.chart-wrap   { position: relative; display: flex; flex-direction: column; align-items: center; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; justify-content: center; }
.legend-item  { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text2); }
.legend-dot   { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* ── Finance ──────────────────────────────────────────────── */
.stat-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.stat-grid .stat-card { flex-direction: column; align-items: flex-start; gap: 6px; padding: 18px; min-width: 0; }
.stat-grid .stat-card .stat-value { font-size: 16px !important; word-break: break-word; }
.fin-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r-lg); border: 1px solid var(--border); box-shadow: var(--shadow); }
.fin-table { min-width: 480px; width: 100%; }

/* ── Settings ─────────────────────────────────────────────── */
.settings-section { margin-bottom: 28px; }
.settings-title {
  font-size: 10px; font-weight: 700; color: var(--text3);
  text-transform: uppercase; letter-spacing: 1.5px;
  margin-bottom: 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.settings-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid var(--border); gap: 16px;
}
.settings-row:last-child { border-bottom: none; }
.settings-key  { font-size: 13px; font-weight: 600; color: var(--text); }
.settings-desc { font-size: 11px; color: var(--text3); margin-top: 2px; }
.toggle { width: 40px; height: 22px; background: var(--border2); border-radius: 11px; position: relative; cursor: pointer; transition: background var(--trans); flex-shrink: 0; }
.toggle.on { background: var(--accent); }
.toggle::after { content: ''; width: 16px; height: 16px; background: #fff; border-radius: 50%; position: absolute; top: 3px; left: 3px; transition: transform var(--trans); box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.toggle.on::after { transform: translateX(18px); }

/* ── Icon picker ──────────────────────────────────────────── */
.icon-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(40px,1fr)); gap: 6px;
  max-height: 200px; overflow-y: auto;
  border: 1px solid var(--border); border-radius: var(--r);
  padding: 8px; background: var(--surface2);
}
.icon-pick {
  width: 38px; height: 38px; border-radius: 9px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text3);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; cursor: pointer; transition: all var(--trans);
}
.icon-pick:hover, .icon-pick.active { background: var(--accent-light); color: var(--accent); border-color: var(--accent); }

/* ── Export modal ─────────────────────────────────────────── */
.export-option {
  border: 2px solid var(--border); border-radius: var(--r-lg);
  padding: 16px; cursor: pointer;
  transition: all var(--trans); text-align: center;
  background: var(--surface2);
}
.export-option:hover, .export-option.selected { border-color: var(--accent); background: var(--accent-light); box-shadow: var(--shadow-md); }
.export-option i  { font-size: 28px; color: var(--accent); margin-bottom: 8px; display: block; }
.export-option h4 { font-size: 12px; font-weight: 700; color: var(--text); }
.export-option p  { font-size: 11px; color: var(--text3); margin-top: 4px; }
.export-grid      { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.export-grid-3    { grid-template-columns: 1fr 1fr 1fr; }

/* ── Color picker ─────────────────────────────────────────── */
.color-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.color-swatch { width: 28px; height: 28px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: transform var(--trans), border-color var(--trans); }
.color-swatch:hover, .color-swatch.active { transform: scale(1.2); border-color: var(--text); }

/* ── Bottom nav (mobile) ──────────────────────────────────── */
.bottom-nav {
  display: none; position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bottom-nav-h);
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 200; padding: 0 4px;
  box-shadow: 0 -4px 20px rgba(100,80,220,.08);
}
.bottom-nav-inner { display: flex; align-items: center; justify-content: space-around; height: 100%; }
.bnav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 10px; cursor: pointer;
  border-radius: var(--r); flex: 1;
  border: none; background: none; font-family: inherit;
  transition: all var(--trans);
}
.bnav-item i    { font-size: 19px; color: var(--text3); transition: all var(--trans); }
.bnav-item span { font-size: 9px; color: var(--text3); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.bnav-item[data-page="dashboard"].active i    { color: var(--nav-dashboard); transform: translateY(-2px); }
.bnav-item[data-page="dashboard"].active span { color: var(--nav-dashboard); }
.bnav-item[data-page="items"].active i        { color: var(--nav-items);     transform: translateY(-2px); }
.bnav-item[data-page="items"].active span     { color: var(--nav-items); }
.bnav-item[data-page="vendors"].active i      { color: var(--nav-vendors);   transform: translateY(-2px); }
.bnav-item[data-page="vendors"].active span   { color: var(--nav-vendors); }
.bnav-item[data-page="categories"].active i   { color: var(--nav-categories);transform: translateY(-2px); }
.bnav-item[data-page="categories"].active span{ color: var(--nav-categories); }
.bnav-item#more-btn.active i   { color: var(--accent); transform: translateY(-2px); }
.bnav-item#more-btn.active span{ color: var(--accent); }

/* ── More drawer ──────────────────────────────────────────── */
.more-drawer {
  position: fixed; bottom: var(--bottom-nav-h); left: 0; right: 0;
  background: var(--surface); border-top: 1px solid var(--border);
  border-radius: 20px 20px 0 0; z-index: 199; padding: 16px;
  transform: translateY(100%);
  transition: transform .28s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 -8px 32px rgba(100,80,220,.1);
}
.more-drawer.show { transform: translateY(0); }
.more-drawer-handle { width: 36px; height: 3px; background: var(--border2); border-radius: 2px; margin: 0 auto 16px; }
.more-drawer-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.more-drawer-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 8px; border-radius: var(--r-lg);
  background: var(--surface2); cursor: pointer;
  border: 1px solid var(--border); font-family: inherit;
  transition: all var(--trans);
}
.more-drawer-item:hover { background: var(--surface3); border-color: var(--border2); }
.more-drawer-item[data-page="finance"] i   { color: var(--nav-finance); }
.more-drawer-item[data-page="settings"] i  { color: var(--nav-settings); }
.more-drawer-item[data-page="about"] i     { color: var(--blue); }
.more-drawer-item[data-page="finance"].active  { background: #faf5ff; border-color: #ddd6fe; }
.more-drawer-item[data-page="settings"].active { background: #fff7ed; border-color: #fed7aa; }
.more-drawer-item i    { font-size: 22px; }
.more-drawer-item span { font-size: 10px; color: var(--text2); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.drawer-overlay { position: fixed; inset: 0; background: rgba(26,21,53,.25); z-index: 198; display: none; }
.drawer-overlay.show { display: block; }

/* ── Mobile topbar ────────────────────────────────────────── */
.mobile-topbar {
  display: none; height: 56px;
  background: var(--surface); border-bottom: 1px solid var(--border);
  align-items: center; padding: 0 16px; gap: 12px;
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow);
}
.mobile-topbar .brand-logo { width: 30px; height: 30px; font-size: 13px; }
.mobile-topbar .brand-name { font-size: 14px; font-weight: 800; color: var(--text); }

/* ── Divider ──────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

/* ── Skeleton ─────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--surface2) 25%, var(--surface3) 50%, var(--surface2) 75%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--r);
}
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* ── Photo picker ─────────────────────────────────────────── */
.photo-picker { border: 2px dashed var(--border2); border-radius: var(--r-lg); cursor: pointer; transition: all var(--trans); overflow: hidden; }
.photo-picker:hover { border-color: var(--accent); background: var(--accent-light); }
.photo-picker__preview { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px; gap: 8px; }
.photo-picker__actions { padding: 8px; display: flex; gap: 8px; }
.photo-source-sheet { display: flex; gap: 8px; padding: 12px 0 4px; flex-wrap: wrap; }
.photo-source-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px; border-radius: var(--r); background: var(--surface2);
  border: 1px solid var(--border); cursor: pointer; font-family: inherit;
  font-size: 11px; color: var(--text2); font-weight: 600; min-width: 72px;
  transition: all var(--trans);
}
.photo-source-btn:hover { background: var(--surface3); border-color: var(--border2); }
.photo-source-btn i { font-size: 20px; }
.photo-source-cancel { color: var(--text3); }

/* ── Countdown ────────────────────────────────────────────── */
.countdown-banner {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; margin-bottom: 18px;
  background: linear-gradient(135deg, #7c6ff7 0%, #a78bfa 100%);
  border-radius: var(--r-lg);
  box-shadow: 0 6px 24px rgba(124,111,247,.3);
  border: none;
}
.countdown-empty {
  background: var(--surface);
  border: 1px dashed var(--border2);
  box-shadow: none; cursor: pointer;
}
.countdown-empty:hover { border-color: var(--accent); }
.countdown-icon  { font-size: 22px; flex-shrink: 0; color: rgba(255,255,255,.9); }
.countdown-body  { flex: 1; }
.countdown-label { font-size: 10px; color: rgba(255,255,255,.7); font-weight: 600; text-transform: uppercase; letter-spacing: .8px; }
.countdown-date  { font-size: 13px; font-weight: 600; color: #fff; margin-top: 2px; }
.countdown-days  { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; }
.countdown-num   { font-size: 30px; font-weight: 800; line-height: 1; color: #fff; }
.countdown-unit  { font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: .8px; color: rgba(255,255,255,.7); }
.countdown-empty .countdown-icon  { color: var(--text3); }
.countdown-empty .countdown-label { color: var(--text3); }
.countdown-empty .countdown-date  { color: var(--text2); }

/* ── Budget warning ───────────────────────────────────────── */
.budget-warning-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: var(--r);
  border: 1px solid; margin-bottom: 16px;
}

/* ── Group bar ────────────────────────────────────────────── */
.group-bar   { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.group-label { font-size: 10px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: .8px; margin-right: 4px; }
.group-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 13px; border-radius: 20px;
  font-size: 11px; font-weight: 600;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text3); cursor: pointer; font-family: inherit;
  transition: all var(--trans);
}
.group-btn:hover  { border-color: var(--accent); color: var(--accent); }
.group-btn.active { background: var(--accent-light); border-color: var(--accent); color: var(--accent); }

/* ── Group header ─────────────────────────────────────────── */
.group-header {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 4px; margin-top: 10px; margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-size: 12px; font-weight: 700; color: var(--text2);
  text-transform: uppercase; letter-spacing: .8px;
}
.group-dot   { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.group-count { margin-left: auto; font-size: 10px; font-weight: 500; color: var(--text3); text-transform: none; letter-spacing: 0; }

/* ── Theme toggle btn ─────────────────────────────────────── */
.theme-toggle-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface2);
  color: var(--text2); cursor: pointer; font-size: 15px; flex-shrink: 0;
  transition: all var(--trans);
}
.theme-toggle-btn:hover { background: var(--accent-light); border-color: var(--accent); color: var(--accent); transform: rotate(20deg); }

/* ── Vendor summary bar ───────────────────────────────────── */
.vendor-summary-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; margin-bottom: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); box-shadow: var(--shadow);
}

/* ── Status badge btn ─────────────────────────────────────── */
.status-badge-btn { cursor: pointer; font-family: inherit; }

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main-content { margin-left: 0; padding-bottom: var(--bottom-nav-h); }
  .topbar { display: none; }
  .mobile-topbar { display: flex; }
  .bottom-nav { display: block; }
  .page { padding: 14px; }

  .dash-stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
  .stat-card { padding: 14px 12px; gap: 10px; }
  .stat-card__icon { width: 40px; height: 40px; font-size: 17px; border-radius: 12px; }
  .stat-value { font-size: 20px; }
  .stat-value--md { font-size: 14px; }
  .dash-row-2 { grid-template-columns: 1fr; gap: 12px; }
  .dash-row-charts { grid-template-columns: 1fr; gap: 12px; }
  .dash-mb { margin-bottom: 14px; }
  .dash-progress-pct { font-size: 22px; }
  .dash-chip-val { font-size: 16px; }

  .stat-grid { grid-template-columns: 1fr; gap: 8px; }
  .stat-grid .stat-card { flex-direction: row; align-items: center; gap: 12px; padding: 14px; }
  .stat-grid .stat-card .stat-value { font-size: 14px !important; }
  #budget-chart-canvas { height: 150px !important; }
  .fin-table-wrap { border-radius: var(--r); }
  .table-wrap { border-radius: var(--r); }
  .fin-table-progress { display: none; }
  .fin-table thead th:last-child { display: none; }

  .settings-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .settings-row .form-control,
  .settings-row input,
  .settings-row select { width: 100% !important; }

  .form-row { grid-template-columns: 1fr; }
  .form-row-3 { grid-template-columns: 1fr; }
  .export-grid { grid-template-columns: 1fr; }
  .export-grid-3 { grid-template-columns: 1fr; }
  .toast-container { bottom: calc(var(--bottom-nav-h) + 12px); right: 12px; left: 12px; }
  .toast { min-width: unset; max-width: unset; width: 100%; }
  .modal { max-width: 100%; margin: 0; border-radius: var(--r-lg) var(--r-lg) 0 0; max-height: 85vh; }
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .vendor-grid { grid-template-columns: 1fr 1fr; }
  .card { padding: 14px; }
  .section-header { gap: 8px; }
  .item-card { flex-wrap: wrap; }
  .item-card > div:last-child { width: 100%; display: flex; flex-direction: row !important; align-items: center !important; justify-content: space-between; gap: 8px; }
}

@media (max-width: 480px) {
  .dash-stat-grid { grid-template-columns: 1fr 1fr; }
  .dash-status-grid { gap: 6px; }
  .dash-priority-grid { gap: 6px; }
  .dash-chip-val { font-size: 14px; }
  .dash-chip-label { font-size: 9px; }
  .vendor-grid { grid-template-columns: 1fr; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-row { flex-direction: row; flex-wrap: nowrap; }
  .filter-bar .form-control { width: 100% !important; min-width: unset; }
  .search-wrap { max-width: 100%; min-width: unset; flex: 1; }
  .cdd-wrap { flex: 1; min-width: 0; }
  .cdd-menu { min-width: unset; }
  #budget-chart-canvas { height: 130px !important; }
  .stat-value--md { font-size: 13px; }
  .stat-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   DARK THEME — [data-theme="dark"]
   ============================================================ */
[data-theme="dark"] {
  --accent:        #a78bfa;
  --accent-2:      #fbbf24;
  --accent-light:  rgba(167,139,250,.14);
  --accent-mid:    rgba(167,139,250,.22);
  --accent-dark:   #8b5cf6;

  --bg:        #13111e;
  --surface:   #1c1a2e;
  --surface2:  #231f38;
  --surface3:  #2a2644;

  --border:    rgba(167,139,250,.1);
  --border2:   rgba(167,139,250,.18);

  --text:      #e2dff8;
  --text2:     #9d94d0;
  --text3:     #5a5280;

  --green:       #34d399;
  --green-bg:    rgba(52,211,153,.12);
  --green-text:  #34d399;
  --yellow:      #fbbf24;
  --yellow-bg:   rgba(251,191,36,.1);
  --yellow-text: #fbbf24;
  --red:         #f87171;
  --red-bg:      rgba(248,113,113,.12);
  --red-text:    #f87171;
  --blue:        #818cf8;
  --blue-bg:     rgba(129,140,248,.12);
  --blue-text:   #818cf8;

  --neon-cyan:   #a78bfa;
  --neon-pink:   #f87171;
  --neon-yellow: #fbbf24;
  --neon-green:  #34d399;
  --neon-purple: #c084fc;
  --neon-orange: #fb923c;

  --shadow:    0 2px 8px rgba(0,0,0,.3), 0 1px 2px rgba(0,0,0,.2);
  --shadow-md: 0 6px 24px rgba(0,0,0,.4);
  --shadow-lg: 0 16px 48px rgba(0,0,0,.5);

  --nav-dashboard:  #a78bfa;
  --nav-items:      #f87171;
  --nav-vendors:    #fbbf24;
  --nav-categories: #34d399;
  --nav-finance:    #c084fc;
  --nav-settings:   #fb923c;
}

[data-theme="dark"] body { background: var(--bg); }

[data-theme="dark"] .topbar,
[data-theme="dark"] .mobile-topbar {
  background: rgba(28,26,46,.97);
  backdrop-filter: blur(12px);
}

[data-theme="dark"] .sidebar {
  background: var(--surface);
  border-right-color: var(--border);
  box-shadow: 4px 0 20px rgba(0,0,0,.3);
}

[data-theme="dark"] .modal-backdrop { background: rgba(0,0,0,.65); }
[data-theme="dark"] .form-control { background: var(--surface2); border-color: var(--border2); }

/* Stat card dark overrides — tetap gradient tapi lebih dalam */
[data-theme="dark"] .stat-card--accent  { background: linear-gradient(135deg, #5b50d6 0%, #7c6ff7 100%); }
[data-theme="dark"] .stat-card--green   { background: linear-gradient(135deg, #059669 0%, #10b981 100%); }
[data-theme="dark"] .stat-card--blue    { background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%); }
[data-theme="dark"] .stat-card--purple  { background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%); }

[data-theme="dark"] .dash-status-chip--red    { background: rgba(248,113,113,.1); border-color: rgba(248,113,113,.2); }
[data-theme="dark"] .dash-status-chip--red    .dash-chip-val { color: #f87171; }
[data-theme="dark"] .dash-status-chip--yellow { background: rgba(251,191,36,.08); border-color: rgba(251,191,36,.18); }
[data-theme="dark"] .dash-status-chip--yellow .dash-chip-val { color: #fbbf24; }
[data-theme="dark"] .dash-status-chip--green  { background: rgba(52,211,153,.08); border-color: rgba(52,211,153,.18); }
[data-theme="dark"] .dash-status-chip--green  .dash-chip-val { color: #34d399; }

[data-theme="dark"] .btn         { background: var(--surface2); border-color: var(--border2); color: var(--text2); }
[data-theme="dark"] .btn:hover   { background: var(--surface3); color: var(--text); }
[data-theme="dark"] .btn-accent  { background: var(--accent); border-color: var(--accent); color: #fff; }
[data-theme="dark"] .bottom-nav  { background: rgba(28,26,46,.97); backdrop-filter: blur(12px); }
[data-theme="dark"] .more-drawer { background: var(--surface); }
[data-theme="dark"] .drawer-overlay { background: rgba(0,0,0,.5); }
[data-theme="dark"] .icon-grid   { background: var(--surface2); }
[data-theme="dark"] .icon-pick   { background: var(--surface2); }
[data-theme="dark"] .export-option { background: var(--surface2); }
[data-theme="dark"] .filter-bar  { background: var(--surface); }
[data-theme="dark"] .toast       { background: var(--surface2); }
[data-theme="dark"] thead th     { background: var(--surface2); }
[data-theme="dark"] .tab-btn.active { background: var(--surface2); }

[data-theme="dark"] .countdown-banner:not(.countdown-empty) {
  background: linear-gradient(135deg, #5b50d6 0%, #7c6ff7 100%);
}

/* Nav active dark */
[data-theme="dark"] .nav-item[data-page="dashboard"].active  { background: rgba(167,139,250,.12); border-color: rgba(167,139,250,.22); color: #a78bfa; }
[data-theme="dark"] .nav-item[data-page="items"].active      { background: rgba(248,113,113,.1);  border-color: rgba(248,113,113,.2);  color: #f87171; }
[data-theme="dark"] .nav-item[data-page="vendors"].active    { background: rgba(251,191,36,.1);   border-color: rgba(251,191,36,.2);   color: #fbbf24; }
[data-theme="dark"] .nav-item[data-page="categories"].active { background: rgba(52,211,153,.1);   border-color: rgba(52,211,153,.2);   color: #34d399; }
[data-theme="dark"] .nav-item[data-page="finance"].active    { background: rgba(192,132,252,.1);  border-color: rgba(192,132,252,.2);  color: #c084fc; }
[data-theme="dark"] .nav-item[data-page="settings"].active   { background: rgba(251,146,60,.1);   border-color: rgba(251,146,60,.2);   color: #fb923c; }
[data-theme="dark"] .nav-item[data-page="about"].active      { background: rgba(129,140,248,.1);  border-color: rgba(129,140,248,.2);  color: #818cf8; }