/* ============================================================
   ParkirinAja — Design System
   ============================================================ */

:root {
  /* Palet dasar */
  --bg:            #0d1117;
  --bg-soft:       #131a24;
  --surface:       #161d29;
  --surface-2:     #1c2533;
  --surface-3:     #232d3d;
  --border:        #263041;
  --border-soft:   #1e2735;

  --text:          #e6edf6;
  --text-muted:    #94a3b8;
  --text-dim:      #64748b;

  --brand:         #14b8a6;
  --brand-strong:  #0d9488;
  --brand-soft:    rgba(20, 184, 166, .12);
  --brand-line:    rgba(20, 184, 166, .35);

  --info:          #38bdf8;
  --success:       #34d399;
  --warning:       #fbbf24;
  --danger:        #f87171;
  --violet:        #a78bfa;
  --pink:          #f472b6;

  --success-soft:  rgba(52, 211, 153, .12);
  --warning-soft:  rgba(251, 191, 36, .12);
  --danger-soft:   rgba(248, 113, 113, .12);
  --info-soft:     rgba(56, 189, 248, .12);

  --radius:        12px;
  --radius-sm:     8px;
  --radius-lg:     18px;
  --shadow:        0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6);
  --shadow-lg:     0 24px 60px -24px rgba(0,0,0,.8);

  --sidebar-w:     248px;
  --header-h:      60px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

[data-theme="light"] {
  --bg:            #f1f5f9;
  --bg-soft:       #e9eef5;
  --surface:       #ffffff;
  --surface-2:     #f8fafc;
  --surface-3:     #eef2f7;
  --border:        #dbe3ec;
  --border-soft:   #e7edf4;

  --text:          #0f1b2a;
  --text-muted:    #52657c;
  --text-dim:      #7d8da3;

  --brand:         #0d9488;
  --brand-strong:  #0f766e;
  --brand-soft:    rgba(13, 148, 136, .10);
  --brand-line:    rgba(13, 148, 136, .30);

  --info:          #0284c7;
  --success:       #059669;
  --warning:       #b45309;
  --danger:        #dc2626;
  --violet:        #7c3aed;
  --pink:          #db2777;

  --shadow:        0 1px 2px rgba(15,27,42,.06), 0 8px 24px -14px rgba(15,27,42,.18);
  --shadow-lg:     0 24px 60px -24px rgba(15,27,42,.28);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--border); }

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

.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; z-index: 40;
}

.sidebar-brand {
  height: var(--header-h); display: flex; align-items: center; gap: 10px;
  padding: 0 18px; border-bottom: 1px solid var(--border); flex: 0 0 auto;
}
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; flex: 0 0 auto;
  background: linear-gradient(140deg, var(--brand), #0891b2);
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 15px;
  box-shadow: 0 4px 14px -4px var(--brand-line);
}
.brand-name { font-weight: 700; font-size: 15px; letter-spacing: -.2px; }
.brand-sub { font-size: 10.5px; color: var(--text-dim); letter-spacing: .5px; text-transform: uppercase; }

.nav { flex: 1; overflow-y: auto; padding: 12px 10px 20px; }
.nav-group { margin-bottom: 4px; }
.nav-label {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .8px;
  color: var(--text-dim); padding: 14px 10px 6px; font-weight: 600;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  color: var(--text-muted); font-size: 13.5px; font-weight: 500;
  cursor: pointer; user-select: none; transition: background .12s, color .12s;
  text-decoration: none;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav-item.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.nav-item .ico { width: 18px; text-align: center; font-size: 14px; flex: 0 0 18px; }
.nav-item .badge-count {
  margin-left: auto; background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 20px;
}

.sidebar-foot { padding: 12px; border-top: 1px solid var(--border); flex: 0 0 auto; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: var(--radius-sm); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: 0 0 32px;
  background: var(--surface-3); display: grid; place-items: center;
  font-weight: 700; font-size: 12.5px; color: var(--brand);
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: var(--header-h); flex: 0 0 auto;
  display: flex; align-items: center; gap: 14px; padding: 0 20px;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 30;
}
.topbar h1 { font-size: 17px; font-weight: 650; margin: 0; letter-spacing: -.2px; }
.topbar .spacer { flex: 1; }

.content { padding: 20px; flex: 1; max-width: 1600px; width: 100%; }

/* ------------------------------------------------------------
   Komponen
   ------------------------------------------------------------ */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card-head {
  padding: 14px 16px; border-bottom: 1px solid var(--border-soft);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.card-head h3 { margin: 0; font-size: 14px; font-weight: 650; letter-spacing: -.1px; }
.card-head .sub { font-size: 12px; color: var(--text-dim); }
.card-body { padding: 16px; }
.card-body.tight { padding: 10px 12px; }
.card-body.flush { padding: 0; }

.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }

.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: 4px; }

/* KPI */
.kpi { padding: 15px 16px; }
.kpi-label { font-size: 11.5px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.kpi-value { font-size: 25px; font-weight: 700; letter-spacing: -.7px; margin: 5px 0 2px; font-variant-numeric: tabular-nums; }
.kpi-value.sm { font-size: 20px; }
.kpi-foot { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.kpi-icon {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  font-size: 16px; flex: 0 0 34px;
}

.delta { font-weight: 650; font-size: 12px; display: inline-flex; align-items: center; gap: 2px; }
.delta.up { color: var(--success); }
.delta.down { color: var(--danger); }
.delta.flat { color: var(--text-dim); }

/* Badge & pill */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px; border-radius: 20px;
  font-size: 11px; font-weight: 650; letter-spacing: .2px;
  background: var(--surface-3); color: var(--text-muted);
  white-space: nowrap;
}
.badge.success { background: var(--success-soft); color: var(--success); }
.badge.warning { background: var(--warning-soft); color: var(--warning); }
.badge.danger  { background: var(--danger-soft);  color: var(--danger); }
.badge.info    { background: var(--info-soft);    color: var(--info); }
.badge.brand   { background: var(--brand-soft);   color: var(--brand); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.pulse { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .35 } }

/* Tombol */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background .12s, border-color .12s, transform .06s;
  white-space: nowrap; text-decoration: none;
}
.btn:hover { background: var(--surface-3); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #04231f; }
.btn.primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 5px 10px; font-size: 12px; }
.btn.lg { padding: 12px 20px; font-size: 15px; border-radius: var(--radius); }
.btn.block { width: 100%; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.btn-group .btn.active { background: var(--brand-soft); color: var(--brand); border-color: var(--brand-line); z-index: 1; }

/* Form */
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.field .hint { font-size: 11.5px; color: var(--text-dim); }
input, select, textarea {
  font-family: inherit; font-size: 13.5px;
  padding: 8px 11px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  width: 100%; transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}
input[type="checkbox"] { width: auto; accent-color: var(--brand); }
select { cursor: pointer; }
.input-mono { font-family: var(--mono); letter-spacing: .5px; }

/* Tabel */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  text-align: left; font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .5px;
  color: var(--text-dim); padding: 10px 12px; border-bottom: 1px solid var(--border);
  background: var(--surface-2); position: sticky; top: 0; white-space: nowrap;
}
tbody td { padding: 9px 12px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
tbody tr:hover { background: var(--surface-2); }
tbody tr.clickable { cursor: pointer; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .3px; }
.table-empty { padding: 40px 16px; text-align: center; color: var(--text-dim); }

/* Progress */
.bar { height: 7px; background: var(--surface-3); border-radius: 20px; overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 20px; background: var(--brand); transition: width .4s ease; }
.bar.warning > span { background: var(--warning); }
.bar.danger > span  { background: var(--danger); }

/* Feed realtime */
.feed { max-height: 420px; overflow-y: auto; }
.feed-item {
  display: flex; gap: 10px; padding: 9px 14px;
  border-bottom: 1px solid var(--border-soft); font-size: 12.5px;
  animation: slideIn .28s ease;
}
@keyframes slideIn { from { opacity: 0; transform: translateY(-6px) } to { opacity: 1; transform: none } }
.feed-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: 0 0 8px; background: var(--text-dim); }
.feed-dot.in { background: var(--success); }
.feed-dot.out { background: var(--info); }
.feed-dot.pay { background: var(--brand); }
.feed-dot.warn { background: var(--warning); }
.feed-dot.crit { background: var(--danger); }
.feed-time { margin-left: auto; color: var(--text-dim); font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(3, 7, 13, .6); backdrop-filter: blur(3px);
  display: grid; place-items: center; z-index: 100; padding: 20px;
  animation: fade .15s ease;
}
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 560px; max-height: 88vh; display: flex; flex-direction: column;
  animation: pop .18s cubic-bezier(.2,.9,.3,1.2);
}
.modal.wide { max-width: 880px; }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(8px) } to { opacity: 1; transform: none } }
.modal-head { padding: 16px 18px; border-bottom: 1px solid var(--border-soft); display: flex; align-items: center; gap: 10px; }
.modal-head h3 { margin: 0; font-size: 15.5px; font-weight: 650; }
.modal-body { padding: 18px; overflow-y: auto; }
.modal-foot { padding: 14px 18px; border-top: 1px solid var(--border-soft); display: flex; gap: 8px; justify-content: flex-end; }
.close-x {
  margin-left: auto; background: none; border: 0; color: var(--text-dim);
  font-size: 20px; cursor: pointer; line-height: 1; padding: 0 4px; width: auto;
}
.close-x:hover { color: var(--text); }

/* Toast */
.toasts { position: fixed; top: 16px; right: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--brand);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  padding: 11px 15px; min-width: 260px; max-width: 400px; font-size: 13px;
  animation: toastIn .22s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes toastIn { from { opacity: 0; transform: translateX(20px) } to { opacity: 1; transform: none } }
.toast.success { border-left-color: var(--success); }
.toast.error   { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
.toast .t-title { font-weight: 650; margin-bottom: 2px; }
.toast .t-msg { color: var(--text-muted); font-size: 12.5px; }

/* Utilitas */
.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }
.small { font-size: 12px; }
.xs { font-size: 11px; }
.bold { font-weight: 650; }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt { margin-top: 14px; } .mt-sm { margin-top: 8px; } .mt-lg { margin-top: 22px; }
.mb { margin-bottom: 14px; } .mb-sm { margin-bottom: 8px; }
.hidden { display: none !important; }
.success-text { color: var(--success); } .danger-text { color: var(--danger); }
.warning-text { color: var(--warning); } .brand-text { color: var(--brand); }
.tabular { font-variant-numeric: tabular-nums; }

.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: var(--radius-sm);
}
@keyframes shimmer { 0% { background-position: 200% 0 } 100% { background-position: -200% 0 } }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tab {
  padding: 9px 14px; font-size: 13px; font-weight: 600; color: var(--text-muted);
  cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); }

.empty { padding: 44px 20px; text-align: center; color: var(--text-dim); }
.empty .ico { font-size: 30px; opacity: .5; margin-bottom: 8px; }

/* ------------------------------------------------------------
   Tampilan kiosk / gate (layar besar)
   ------------------------------------------------------------ */
.kiosk {
  min-height: 100vh; display: flex; flex-direction: column;
  background: radial-gradient(1100px 600px at 50% -10%, #16283a 0%, var(--bg) 60%);
}
.kiosk-head {
  padding: 14px 22px; display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 60%, transparent);
}
.kiosk-body { flex: 1; display: grid; place-items: center; padding: 24px; }
.kiosk-panel {
  width: 100%; max-width: 520px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.kiosk-panel.wide { max-width: 760px; }
.kiosk-screen { padding: 26px; text-align: center; }
.kiosk-title { font-size: 21px; font-weight: 700; letter-spacing: -.4px; margin: 0 0 6px; }
.kiosk-sub { color: var(--text-muted); font-size: 14px; margin: 0 0 20px; }
.kiosk-amount { font-size: 44px; font-weight: 800; letter-spacing: -1.5px; color: var(--brand); font-variant-numeric: tabular-nums; }
.kiosk-status {
  padding: 14px 18px; font-size: 15px; font-weight: 650; text-align: center;
  border-radius: var(--radius); margin-bottom: 16px;
}
.kiosk-status.ok   { background: var(--success-soft); color: var(--success); }
.kiosk-status.err  { background: var(--danger-soft);  color: var(--danger); }
.kiosk-status.warn { background: var(--warning-soft); color: var(--warning); }
.kiosk-status.wait { background: var(--info-soft);    color: var(--info); }

.qr-frame {
  background: #fff; padding: 14px; border-radius: 16px; display: inline-block;
  box-shadow: 0 10px 40px -12px rgba(0,0,0,.6);
}
.qr-frame img, .qr-frame svg { display: block; width: 220px; height: 220px; }

.big-btn {
  width: 100%; padding: 22px; font-size: 19px; font-weight: 700;
  border-radius: 16px; border: 0; cursor: pointer;
  background: linear-gradient(140deg, var(--brand), #0891b2); color: #04231f;
  box-shadow: 0 12px 30px -12px var(--brand-line);
  transition: transform .08s, filter .12s;
}
.big-btn:hover { filter: brightness(1.06); }
.big-btn:active { transform: translateY(2px); }
.big-btn.secondary { background: var(--surface-3); color: var(--text); box-shadow: none; }
.big-btn.danger { background: linear-gradient(140deg, #ef4444, #b91c1c); color: #fff; }

.gate-visual { display: flex; align-items: flex-end; justify-content: center; gap: 4px; height: 92px; margin: 10px 0 18px; }
.gate-post { width: 15px; height: 62px; background: var(--surface-3); border-radius: 4px 4px 0 0; }
.gate-arm {
  width: 168px; height: 13px; border-radius: 4px; transform-origin: left center;
  background: repeating-linear-gradient(45deg, #ef4444 0 13px, #f8fafc 13px 26px);
  transition: transform .8s cubic-bezier(.4,1.4,.5,1); margin-bottom: 49px;
}
.gate-arm.open { transform: rotate(-78deg); }
.gate-lamp { width: 13px; height: 13px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 14px var(--danger); }
.gate-lamp.open { background: var(--success); box-shadow: 0 0 14px var(--success); }

.scan-box {
  position: relative; width: 100%; max-width: 400px; aspect-ratio: 1;
  background: #000; border-radius: 16px; overflow: hidden; margin: 0 auto;
  border: 2px solid var(--border);
}
.scan-box video { width: 100%; height: 100%; object-fit: cover; }
.scan-line {
  position: absolute; left: 8%; right: 8%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  box-shadow: 0 0 12px var(--brand); animation: scan 2.1s ease-in-out infinite;
}
@keyframes scan { 0%,100% { top: 12% } 50% { top: 88% } }
.scan-corner { position: absolute; width: 30px; height: 30px; border: 3px solid var(--brand); }
.scan-corner.tl { top: 12px; left: 12px; border-right: 0; border-bottom: 0; border-radius: 8px 0 0 0; }
.scan-corner.tr { top: 12px; right: 12px; border-left: 0; border-bottom: 0; border-radius: 0 8px 0 0; }
.scan-corner.bl { bottom: 12px; left: 12px; border-right: 0; border-top: 0; border-radius: 0 0 0 8px; }
.scan-corner.br { bottom: 12px; right: 12px; border-left: 0; border-top: 0; border-radius: 0 0 8px 0; }

.pay-method {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  cursor: pointer; background: var(--surface-2); transition: border-color .12s, background .12s;
  text-align: left; width: 100%; font-family: inherit; color: var(--text);
}
.pay-method:hover { border-color: var(--brand-line); background: var(--surface-3); }
.pay-method.selected { border-color: var(--brand); background: var(--brand-soft); }
.pay-method .pm-ico { font-size: 22px; width: 38px; text-align: center; flex: 0 0 38px; }
.pay-method .pm-name { font-weight: 650; font-size: 14.5px; }
.pay-method .pm-note { font-size: 11.5px; color: var(--text-dim); }

.receipt-line { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; font-size: 13px; }
.receipt-line.total { border-top: 1px dashed var(--border); margin-top: 8px; padding-top: 9px; font-size: 17px; font-weight: 700; }

/* Login */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(1000px 560px at 50% -5%, #16303a 0%, var(--bg) 58%);
}
.login-card {
  width: 100%; max-width: 400px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-lg);
  padding: 30px 28px;
}
.demo-accounts {
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border-soft);
  font-size: 11.5px; color: var(--text-dim);
}
.demo-accounts button {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted);
  padding: 4px 8px; border-radius: 6px; font-size: 11px; cursor: pointer; margin: 3px 3px 0 0; width: auto;
  font-family: inherit;
}
.demo-accounts button:hover { border-color: var(--brand-line); color: var(--brand); }

/* Chart */
.chart { width: 100%; display: block; overflow: visible; }
.chart text { font-family: var(--font); }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--text-muted); }
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-swatch { width: 10px; height: 10px; border-radius: 3px; }

.tooltip {
  position: fixed; pointer-events: none; z-index: 300;
  background: var(--surface-3); border: 1px solid var(--border);
  border-radius: 8px; padding: 7px 10px; font-size: 12px;
  box-shadow: var(--shadow-lg); white-space: nowrap; opacity: 0; transition: opacity .1s;
}

/* Responsif */
@media (max-width: 1200px) {
  .grid-5 { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 900px) {
  .sidebar {
    position: fixed; left: 0; top: 0; transform: translateX(-100%);
    transition: transform .22s ease; box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: none; }
  .grid-3, .grid-2, .span-2, .span-3 { grid-template-columns: 1fr; grid-column: span 1; }
  .content { padding: 14px; }
}
@media (max-width: 640px) {
  .grid-4, .grid-5 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .kpi-value { font-size: 21px; }
  .topbar { padding: 0 14px; }
}

@media print {
  .sidebar, .topbar, .btn, .toasts { display: none !important; }
  .content { padding: 0; }
  body { background: #fff; color: #000; }
}
