:root {
  /* Palet Utama Merah Crimson / Marun Profesional + Aksen Emas */
  --brand-950: #450a0a;
  --brand-900: #7f1d1d;
  --brand-800: #991b1b;
  --brand-700: #b91c1c;
  --brand-600: #dc2626;
  --brand-100: #fee2e2;
  --brand-50: #fef2f2;

  /* Alias kompatibel untuk modul existing + warna semantik keuangan */
  --emerald-950: #450a0a;
  --emerald-900: #7f1d1d;
  --emerald-800: #991b1b;
  --emerald-700: #b91c1c;
  --emerald-600: #dc2626;
  --emerald-100: #fee2e2;
  --emerald-50: #fef2f2;

  --income: #059669;
  --income-soft: #d1fae5;
  --amber-600: #d97706;
  --amber-500: #f59e0b;
  --amber-50: #fffbeb;
  --slate-900: #0f172a;
  --slate-700: #334155;
  --slate-500: #64748b;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --danger: #dc2626;
  --radius: 16px;
  --shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
  --shadow-hover: 0 10px 28px rgba(153, 27, 27, 0.12);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  background: #f6f7fb;
  color: var(--slate-900);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-700); text-decoration: none; }
button, input, select, textarea { font-family: inherit; }

/* Layout Shell */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 274px;
  background: linear-gradient(180deg, #991b1b 0%, #7f1d1d 45%, #450a0a 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  z-index: 40;
  transition: transform .25s ease;
  box-shadow: 4px 0 24px rgba(69, 10, 10, 0.24);
}
.sidebar-brand {
  padding: 20px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-brand img { width: 42px; height: 42px; border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.sidebar-brand h2 { margin: 0; font-size: 1.02rem; line-height: 1.2; font-weight: 800; }
.sidebar-brand small { color: #fecaca; font-size: .74rem; display: block; margin-top: 2px; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 10px 10px 24px; }
.sidebar-nav::-webkit-scrollbar { width: 5px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.22); border-radius: 99px; }

.nav-group-title {
  font-size: .67rem; text-transform: uppercase; letter-spacing: .09em;
  color: #fde68a; padding: 13px 12px 5px; font-weight: 800; opacity: .9;
}
.nav-item {
  width: 100%; background: transparent; border: none; color: #fee2e2;
  text-align: left; padding: 9px 12px; border-radius: 11px;
  font-size: .87rem; font-weight: 500; cursor: pointer;
  display: flex; align-items: center; gap: 10px; margin-bottom: 3px;
  transition: all .18s ease;
  position: relative;
}
.nav-item .nav-ic {
  width: 28px; height: 28px; border-radius: 8px;
  background: rgba(255,255,255,.1);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all .18s ease;
}
.nav-item .nav-ic svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav-item:hover { background: rgba(255,255,255,.12); color: #fff; transform: translateX(2px); }
.nav-item:hover .nav-ic { background: rgba(255,255,255,.2); }
.nav-item.active {
  background: linear-gradient(90deg, #ffffff 0%, #fef2f2 100%);
  color: var(--brand-800); font-weight: 800;
  box-shadow: 0 6px 16px rgba(0,0,0,.22);
}
.nav-item.active .nav-ic { background: var(--brand-700); color: #fff; }
.nav-badge {
  margin-left: auto; background: #f59e0b; color: #450a0a;
  font-size: .68rem; font-weight: 800; padding: 2px 7px; border-radius: 999px;
}
.sidebar-footer { padding: 12px; border-top: 1px solid rgba(255,255,255,.12); font-size: .8rem; }

.main-area { flex: 1; margin-left: 274px; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--slate-200);
  padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  position: sticky; top: 0; z-index: 30;
}
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.btn-menu-mobile {
  display: none; background: var(--brand-50); color: var(--brand-800);
  border: 1px solid var(--brand-100); border-radius: 10px;
  width: 38px; height: 38px; font-size: 1.2rem; cursor: pointer;
}
.topbar-title h1 { margin: 0; font-size: 1.08rem; color: var(--slate-900); font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-title small { color: var(--slate-500); font-size: .76rem; }
.topbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.content-wrap { padding: 20px; max-width: 1280px; width: 100%; margin: 0 auto; padding-bottom: 104px; }

/* Module Hero Banner & KPI Strip */
.module-hero {
  background: linear-gradient(135deg, #991b1b 0%, #b91c1c 58%, #7f1d1d 100%);
  color: #fff; border-radius: 18px; padding: 18px 22px; margin-bottom: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  box-shadow: 0 10px 26px rgba(153, 27, 27, 0.22);
  position: relative; overflow: hidden;
}
.module-hero::after {
  content: ''; position: absolute; right: -30px; top: -30px; width: 140px; height: 140px;
  border-radius: 50%; background: rgba(255,255,255,.07); pointer-events: none;
}
.module-hero-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.module-hero-icon {
  width: 48px; height: 48px; border-radius: 14px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.22);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.module-hero-icon svg { width: 24px; height: 24px; stroke: #fde68a; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.module-hero h2 { margin: 0; font-size: 1.15rem; font-weight: 800; }
.module-hero p { margin: 3px 0 0; font-size: .8rem; color: #fee2e2; opacity: .92; }
.module-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; z-index: 1; }
.module-hero .btn-hero {
  background: #fff; color: var(--brand-800); font-weight: 700; border: none;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.module-hero .btn-hero:hover { background: #fef2f2; transform: translateY(-1px); }
.module-hero .btn-hero-ghost {
  background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.3);
}
.module-hero .btn-hero-ghost:hover { background: rgba(255,255,255,.24); }

/* Cards & Grids */
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.card {
  background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 14px; flex-wrap: wrap;
}
.card-header h3 { margin: 0; font-size: .98rem; color: var(--slate-900); font-weight: 800; display: flex; align-items: center; gap: 8px; }

.stat-card {
  background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow); position: relative; overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.stat-card.primary, .stat-card.crimson {
  background: linear-gradient(135deg, #b91c1c, #7f1d1d);
  color: #fff; border: none;
}
.stat-card.teal { background: linear-gradient(135deg, #b91c1c, #7f1d1d); color: #fff; border: none; }
.stat-card.blue { background: linear-gradient(135deg, #059669, #047857); color: #fff; border: none; }
.stat-card.rose { background: linear-gradient(135deg, #d97706, #b45309); color: #fff; border: none; }
.stat-card.sky  { background: linear-gradient(135deg, #1e293b, #0f172a); color: #fff; border: none; }
.stat-label { font-size: .77rem; color: var(--slate-500); font-weight: 700; display: flex; align-items: center; justify-content: space-between; }
.stat-card.primary .stat-label, .stat-card.crimson .stat-label, .stat-card.teal .stat-label, .stat-card.blue .stat-label, .stat-card.rose .stat-label, .stat-card.sky .stat-label { color: rgba(255,255,255,.88); }
.stat-top-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
svg.sm-svg { display: inline-block; vertical-align: middle; flex-shrink: 0; }
.kpi-ic-pill {
  width: 36px; height: 36px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.kpi-ic-dark { background: rgba(255,255,255,.18); color: #fde68a; }
.head-ic-pill {
  width: 28px; height: 28px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.stat-value { font-size: 1.38rem; font-weight: 800; margin-top: 6px; letter-spacing: -.02em; }
.stat-sub { font-size: .74rem; margin-top: 4px; opacity: .88; }

.mini-card {
  background: #fff; border: 1px solid var(--slate-200); border-radius: 14px;
  padding: 13px 15px; display: flex; align-items: center; gap: 12px;
  cursor: pointer; transition: all .18s ease; box-shadow: var(--shadow);
}
.mini-card:hover { border-color: var(--brand-600); background: var(--brand-50); transform: translateY(-2px); }
.mini-ic {
  width: 40px; height: 40px; border-radius: 11px;
  background: var(--brand-50); color: var(--brand-700);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.mini-ic svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Buttons & Badges */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid transparent; border-radius: 10px; padding: 9px 14px;
  font-size: .84rem; font-weight: 700; cursor: pointer; transition: all .16s ease;
}
.btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { background: linear-gradient(135deg, #dc2626, #991b1b); color: #fff; box-shadow: 0 4px 12px rgba(185, 28, 28, 0.22); }
.btn-primary:hover { background: linear-gradient(135deg, #b91c1c, #7f1d1d); transform: translateY(-1px); }
.btn-amber { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; }
.btn-amber:hover { filter: brightness(.95); transform: translateY(-1px); }
.btn-outline { background: #fff; border-color: #cbd5e1; color: var(--slate-700); }
.btn-outline:hover { background: var(--brand-50); border-color: var(--brand-600); color: var(--brand-800); }
.btn-danger { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.btn-danger:hover { background: #dc2626; color: #fff; }
.btn-sm { padding: 6px 10px; font-size: .77rem; border-radius: 8px; }
.btn-icon { padding: 6px 9px; font-size: .76rem; border-radius: 8px; }

.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px;
  font-size: .71rem; font-weight: 700; white-space: nowrap;
}
.badge-green { background: #d1fae5; color: #065f46; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-amber { background: #fef3c7; color: #92400e; }
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-slate { background: #e2e8f0; color: #334155; }

/* Tables & Search */
.search-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.search-input-wrap { position: relative; display: flex; align-items: center; }
.search-input-wrap svg { position: absolute; left: 10px; width: 15px; height: 15px; stroke: var(--slate-500); fill: none; stroke-width: 2; }
.search-input-wrap input { padding-left: 32px; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .85rem; }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--slate-200); text-align: left; vertical-align: top; }
th { background: #fef2f2; color: var(--brand-900); font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 800; }
tr:hover td { background: #fffafa; }

/* Forms & Modals */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-group { margin-bottom: 12px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { display: block; font-size: .8rem; font-weight: 700; color: var(--slate-700); margin-bottom: 5px; }
.form-control {
  width: 100%; padding: 9px 12px; border: 1px solid #cbd5e1; border-radius: 10px;
  font-size: .88rem; background: #fff; color: var(--slate-900); transition: border .15s, box-shadow .15s;
}
.form-control:focus { outline: none; border-color: var(--brand-600); box-shadow: 0 0 0 3px rgba(220, 38, 38, .15); }

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15,23,42,.58); backdrop-filter: blur(3px); z-index: 60;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal-box {
  background: #fff; border-radius: 18px; max-width: 660px; width: 100%;
  max-height: 90vh; overflow-y: auto; padding: 22px; box-shadow: 0 24px 60px rgba(0,0,0,.28);
  border-top: 4px solid var(--brand-700);
}

/* Login Page */
.login-page {
  min-height: 100vh;
  background: radial-gradient(circle at top right, #dc2626 0%, #991b1b 38%, #450a0a 100%);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.login-card {
  background: #fff; border-radius: 22px; max-width: 440px; width: 100%;
  padding: 28px; box-shadow: 0 28px 65px rgba(0,0,0,.35);
  border-top: 5px solid #f59e0b;
}
.demo-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.demo-pill {
  background: var(--brand-50); border: 1px solid var(--brand-100); color: var(--brand-800);
  border-radius: 8px; padding: 6px 10px; font-size: .75rem; font-weight: 700; cursor: pointer; transition: .15s;
}
.demo-pill:hover { background: var(--brand-100); }

/* Bottom Nav Mobile (Safe-Area Aware untuk APK & PWA) */
.bottom-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0;
  background: #fff; border-top: 1px solid var(--slate-200);
  z-index: 35;
  padding: 7px 6px calc(7px + env(safe-area-inset-bottom, 0px));
  justify-content: space-around;
  box-shadow: 0 -4px 18px rgba(15, 23, 42, 0.08);
}
.bottom-nav button {
  background: none; border: none; color: var(--slate-500);
  font-size: .69rem; font-weight: 700; display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer;
  padding: 4px 10px; border-radius: 10px; transition: .15s;
}
.bottom-nav button svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bottom-nav button.active { color: var(--brand-700); background: var(--brand-50); }

/* Toast Banner Auto-Close */
.toast-box {
  position: fixed; top: 18px; right: 18px; z-index: 95;
  background: #065f46; color: #fff; padding: 13px 20px;
  border-radius: 12px; font-size: .88rem; font-weight: 700;
  box-shadow: 0 12px 32px rgba(0,0,0,.24); max-width: 420px;
  display: flex; align-items: center; gap: 10px;
  border-left: 5px solid #34d399;
  animation: smSlideIn .22s ease-out;
}
.toast-box.error { background: #991b1b; border-left-color: #fca5a5; }
.toast-box.info { background: #1e40af; border-left-color: #93c5fd; }
@keyframes smSlideIn { from { opacity:0; transform:translateY(-12px); } to { opacity:1; transform:translateY(0); } }

/* Progress Bar, Tabs, Action Group, Detail Row */
.prog-track { width:100%; height:9px; background:#fee2e2; border-radius:999px; overflow:hidden; margin:6px 0; }
.prog-fill { height:100%; background:linear-gradient(90deg, #b91c1c, #f59e0b); border-radius:999px; transition:width .35s; }
.tab-pills { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:16px; }
.tab-pill { border:1px solid var(--slate-200); background:#fff; color:var(--slate-700); padding:9px 16px; border-radius:10px; font-weight:700; font-size:.84rem; cursor:pointer; display:inline-flex; align-items:center; gap:6px; transition:.15s; }
.tab-pill:hover { border-color: var(--brand-600); color: var(--brand-700); }
.tab-pill.active { background:linear-gradient(135deg,#dc2626,#991b1b); color:#fff; border-color:transparent; box-shadow:0 4px 12px rgba(185,28,28,.25); }
.action-group { display:inline-flex; gap:4px; flex-wrap:wrap; }
.detail-row { display:flex; justify-content:space-between; gap:12px; padding:8px 0; border-bottom:1px solid var(--slate-100); font-size:.87rem; }
.detail-row span:first-child { color:var(--slate-500); font-weight:700; min-width:130px; }
.detail-row span:last-child { text-align:right; color:var(--slate-900); word-break:break-word; }

/* Chart Bar */
.bar-chart { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding-top: 14px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.bar-pair { display: flex; align-items: flex-end; gap: 4px; width: 100%; justify-content: center; height: 112px; }
.bar-in { width: 13px; background: linear-gradient(180deg, #10b981, #047857); border-radius: 4px 4px 0 0; min-height: 4px; }
.bar-out { width: 13px; background: linear-gradient(180deg, #ef4444, #991b1b); border-radius: 4px 4px 0 0; min-height: 4px; }
.bar-lbl { font-size: .68rem; color: var(--slate-500); font-weight: 600; }

/* ==================== DASHBOARD GAYA E-COMMERCE / SUPER-APP (v2.2) ==================== */
.ecom-greeting {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 10px;
  margin-bottom: 14px;
}
.ecom-greeting h2 { margin: 0; font-size: 1.12rem; font-weight: 800; color: var(--slate-900); }
.ecom-online { display: inline-flex; align-items: center; gap: 5px; font-size: .76rem; color: #059669; font-weight: 700; margin-top: 3px; }
.ecom-online::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #10b981; display: inline-block; }
.ecom-date-pill {
  background: var(--brand-50); color: var(--brand-800); border: 1px solid var(--brand-100);
  padding: 5px 11px; border-radius: 999px; font-size: .75rem; font-weight: 700; white-space: nowrap;
}

.ecom-wallet-card {
  background: linear-gradient(135deg, #b91c1c 0%, #991b1b 52%, #7f1d1d 100%);
  color: #fff; border-radius: 22px; padding: 20px; margin-bottom: 18px;
  box-shadow: 0 14px 32px rgba(153, 27, 27, 0.28);
  position: relative; overflow: hidden;
}
.ecom-wallet-card::after {
  content: ''; position: absolute; right: -26px; top: -26px; width: 130px; height: 130px;
  border-radius: 50%; background: rgba(255,255,255,.08); pointer-events: none;
}
.ecom-wallet-top { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.ecom-wallet-ic {
  width: 48px; height: 48px; border-radius: 14px; background: rgba(255,255,255,.16);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ecom-wallet-ic svg { width: 24px; height: 24px; stroke: #fde68a; fill: none; stroke-width: 2; }
.ecom-wallet-bal { font-size: 1.75rem; font-weight: 900; letter-spacing: -.02em; line-height: 1.15; }
.ecom-wallet-subs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ecom-wallet-sub {
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.16);
  border-radius: 14px; padding: 11px 13px;
}
.ecom-wallet-sub small { display: block; font-size: .72rem; color: #fecaca; font-weight: 600; }
.ecom-wallet-sub strong { display: block; font-size: .96rem; font-weight: 800; margin-top: 3px; color: #fff; }

.ecom-section-head {
  display: flex; justify-content: space-between; align-items: center;
  margin: 4px 2px 12px;
}
.ecom-section-head h3 { margin: 0; font-size: .98rem; font-weight: 800; color: var(--slate-900); }
.ecom-section-head span { font-size: .75rem; color: var(--slate-500); font-weight: 600; }

.ecom-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.ecom-tile {
  background: #fff; border: 1px solid var(--slate-200); border-radius: 18px;
  padding: 15px 8px 13px; text-align: center; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  position: relative;
}
.ecom-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: var(--brand-600); }
.ecom-tile:active { transform: scale(.96); }
.ecom-tile-ic {
  width: 46px; height: 46px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
}
.ecom-tile-ic svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ecom-tile-lbl { font-size: .77rem; font-weight: 700; color: var(--slate-900); line-height: 1.25; }
.ecom-tile-badge {
  position: absolute; top: 8px; right: 8px;
  background: #dc2626; color: #fff; font-size: .65rem; font-weight: 800;
  padding: 2px 6px; border-radius: 999px;
}
.ic-red    { background: #fee2e2; color: #b91c1c; }
.ic-green  { background: #d1fae5; color: #047857; }
.ic-blue   { background: #dbeafe; color: #1d4ed8; }
.ic-amber  { background: #fef3c7; color: #b45309; }
.ic-purple { background: #ede9fe; color: #6d28d9; }
.ic-teal   { background: #ccfbf1; color: #0f766e; }
.ic-rose   { background: #ffe4e6; color: #be123c; }
.ic-slate  { background: #e2e8f0; color: #334155; }

.mobile-back-bar {
  display: none; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--slate-200); border-radius: 14px;
  padding: 10px 14px; margin-bottom: 14px; cursor: pointer;
  font-weight: 700; color: var(--brand-800); box-shadow: var(--shadow);
}
.mobile-back-bar:active { transform: scale(.98); }

.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.gallery-card { background: #fff; border: 1px solid var(--slate-200); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.gallery-thumb { width: 100%; height: 165px; object-fit: cover; background: linear-gradient(135deg, #fee2e2, #fef3c7); display: flex; align-items: center; justify-content: center; color: var(--brand-800); font-weight: 700; }

@media (max-width: 960px) {
  .ecom-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .mobile-back-bar { display: flex; }
  .gallery-grid { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-area { margin-left: 0; }
  .btn-menu-mobile { display: inline-flex; align-items: center; justify-content: center; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .bottom-nav { display: flex; }
}
@media (max-width: 520px) {
  .grid-4 { grid-template-columns: 1fr; }
  .content-wrap { padding: 14px 12px 96px; }
  .module-hero { padding: 14px 16px; }
}
