/* =============================================================================
   Sahabat Karpet — Stylesheet
   -----------------------------------------------------------------------------
   Tanpa framework. Mobile-first, responsif (HP → tablet → desktop),
   mendukung mode gelap otomatis mengikuti pengaturan perangkat.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --primary: #0f766e;
  --primary-600: #0d6660;
  --primary-50: #ecfdf8;
  --accent: #f59e0b;

  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --success-bg: #ecfdf5;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgb(15 23 42 / .04), 0 4px 16px rgb(15 23 42 / .06);
  --sidebar-w: 248px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #2dd4bf;
    --primary-600: #5eead4;
    --primary-50: #0f2e2b;
    --bg: #0b1120;
    --surface: #111827;
    --surface-2: #0f172a;
    --text: #e5e7eb;
    --muted: #94a3b8;
    --border: #1f2a3c;
    --danger: #f87171;
    --danger-bg: #2a1215;
    --success-bg: #0f2a20;
    --shadow: 0 1px 2px rgb(0 0 0 / .3);
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font: 15px/1.5 var(--font); color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--muted); }
.text-danger { color: var(--danger); }
[hidden] { display: none !important; }

/* ---------- Layout: sidebar + main ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 40; width: var(--sidebar-w);
  display: flex; flex-direction: column; gap: 4px; padding: 16px 12px;
  background: var(--surface); border-right: 1px solid var(--border);
  transform: translateX(-100%); transition: transform .25s ease;
  overflow-y: auto;
}
.sidebar.open { transform: none; box-shadow: 0 0 40px rgb(0 0 0 / .2); }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 18px; font-weight: 700; font-size: 17px; color: var(--text); }
.sidebar nav { display: grid; gap: 2px; }
.sidebar nav a, .nav-logout {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: var(--radius-sm); color: var(--muted); font-weight: 500;
}
.sidebar nav a:hover, .nav-logout:hover { background: var(--surface-2); color: var(--text); }
.sidebar nav a.active { background: var(--primary-50); color: var(--primary); }
/* Grup menu dengan sub menu (mis. Laporan) */
.nav-group summary {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--muted); font-weight: 500; cursor: pointer; list-style: none; user-select: none;
}
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary:hover { background: var(--surface-2); color: var(--text); }
.nav-group summary span { flex: 1; }
.nav-group summary .icon:last-child { width: 16px; height: 16px; transition: transform .2s; }
.nav-group[open] summary .icon:last-child { transform: rotate(90deg); }
.nav-group a { padding-left: 44px !important; font-size: 14px; }
.nav-group a .icon { width: 18px; height: 18px; }
.nav-logout { margin-top: auto; }
.app-version { padding: 4px 12px 0; color: var(--muted); font-size: 11px; }
.backdrop { position: fixed; inset: 0; z-index: 30; background: rgb(15 23 42 / .45); opacity: 0; pointer-events: none; transition: opacity .25s; }
.sidebar.open + .backdrop { opacity: 1; pointer-events: auto; }

.main { min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
}
.topbar h1 { font-size: 18px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me { display: flex; align-items: center; gap: 10px; }
.me-text { display: none; line-height: 1.2; }
.me-text small { display: block; color: var(--muted); font-size: 12px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary); color: #fff; font-weight: 700;
}
.content { padding: 16px; max-width: 1200px; margin: 0 auto; }

@media (min-width: 1024px) {
  .sidebar { transform: none; }
  .backdrop, .topbar .menu-btn { display: none; }
  .main { margin-left: var(--sidebar-w); }
  .content { padding: 28px; }
  .topbar { padding: 14px 28px; }
}
@media (min-width: 640px) { .me-text { display: block; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 16px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-600); }
@media (prefers-color-scheme: dark) { .btn-primary, .btn-primary:hover { color: #042f2c; } }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-danger { background: transparent; border-color: color-mix(in srgb, var(--danger) 40%, transparent); color: var(--danger); }
.btn-danger:hover { background: var(--danger-bg); }
.modal .btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-block { width: 100%; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--text); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); }

/* ---------- Cards & alerts ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card-title { font-size: 16px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.card-title::before { content: ""; width: 4px; height: 18px; border-radius: 4px; background: var(--primary); }
.card > .muted:first-of-type { margin: -8px 0 14px; font-size: 13px; }
.empty { text-align: center; padding: 40px 16px; }
.empty h2 { margin-bottom: 8px; }
.empty p { color: var(--muted); }

.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-weight: 500; border: 1px solid; }
.alert-success { background: var(--success-bg); border-color: color-mix(in srgb, #10b981 35%, transparent); color: #047857; }
.alert-error { background: var(--danger-bg); border-color: color-mix(in srgb, var(--danger) 35%, transparent); color: var(--danger); }
@media (prefers-color-scheme: dark) { .alert-success { color: #6ee7b7; } }

/* ---------- Popup notifikasi ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px;
  background: rgb(15 23 42 / .55); backdrop-filter: blur(3px); animation: fade .15s ease-out;
}
.modal {
  width: 100%; max-width: 420px; max-height: calc(100vh - 32px); overflow-y: auto; text-align: center;
  background: var(--surface); border-radius: 18px; padding: 28px 24px 20px; box-shadow: 0 24px 64px rgb(0 0 0 / .3);
  animation: pop .18s ease-out;
}
.modal h3 { font-size: 19px; margin: 14px 0 6px; }
.modal p { margin: 0; color: var(--muted); }
.modal-icon { width: 60px; height: 60px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; }
.modal-icon .icon { width: 30px; height: 30px; stroke-width: 2.4; }
.modal-ok   { background: #dcfce7; color: #16a34a; }
.modal-err  { background: #fee2e2; color: #dc2626; }
.modal-warn { background: #fef3c7; color: #d97706; }
.modal-details { text-align: left; margin: 14px 0 0; padding: 12px 12px 12px 30px; background: var(--danger-bg); color: var(--danger); border-radius: var(--radius-sm); font-size: 14px; }
.modal-details li + li { margin-top: 4px; }
.modal-actions { display: flex; gap: 10px; justify-content: center; margin-top: 22px; }
.modal-actions .btn { min-width: 120px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(8px); } }

/* ---------- Badges ---------- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge-red    { background: #fee2e2; color: #b91c1c; }
.badge-orange { background: #ffedd5; color: #c2410c; }
.badge-amber  { background: #fef3c7; color: #b45309; }
.badge-yellow { background: #fef9c3; color: #a16207; }
.badge-green  { background: #dcfce7; color: #15803d; }
.badge-blue   { background: #dbeafe; color: #1d4ed8; }
.badge-gray   { background: #f1f5f9; color: #475569; }
@media (prefers-color-scheme: dark) {
  .badge { background: color-mix(in srgb, currentColor 18%, transparent) !important; }
  .badge-red { color: #fca5a5; } .badge-orange { color: #fdba74; } .badge-amber { color: #fcd34d; }
  .badge-yellow { color: #fde047; } .badge-green { color: #86efac; } .badge-blue { color: #93c5fd; } .badge-gray { color: #cbd5e1; }
}

/* ---------- Forms ---------- */
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px)  { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field > label, .field > .label { font-size: 13px; font-weight: 600; }
.req { color: var(--danger); font-weight: 700; }
.hint { color: var(--muted); font-size: 12px; }
.error { color: var(--danger); font-size: 12px; font-weight: 500; }

input:not([type=checkbox]):not([type=radio]), select, textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 84px; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent);
}
.has-error input, .has-error select, .has-error textarea, [aria-invalid=true] { border-color: var(--danger) !important; }
.static {
  min-height: 42px; display: flex; align-items: center; padding: 9px 12px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px dashed var(--border); font-weight: 600;
}

/* Input dengan tempelan teks: "Rp" di kiri, satuan di kanan */
.affix { display: flex; align-items: stretch; }
.affix input { flex: 1; min-width: 0; }
.affix-pre, .affix-suf {
  display: grid; place-items: center; padding: 0 12px; font-weight: 600; font-size: 14px;
  color: var(--muted); background: var(--surface-2); border: 1px solid var(--border);
}
.affix-pre { border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.affix-suf { border-left: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.affix-pre ~ input { border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important; }
.affix input:has(+ .affix-suf) { border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; }

/* Pilihan radio / checkbox berbentuk chip */
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 7px 14px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: 14px;
  transition: all .15s; user-select: none;
}
.choice span::before {
  content: ""; width: 14px; height: 14px; border: 1.5px solid var(--muted); border-radius: 4px; flex: none;
}
.choice input[type=radio] + span::before { border-radius: 50%; }
.choice:hover span { border-color: var(--primary); }
.choice input:checked + span { background: var(--primary-50); border-color: var(--primary); color: var(--primary); font-weight: 600; }
.choice input:checked + span::before { background: var(--primary); border-color: var(--primary); box-shadow: inset 0 0 0 2px var(--surface); }
.choice input:focus-visible + span { box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent); }

/* Checkbox tunggal (switch) */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; min-height: 42px; font-weight: 600; font-size: 14px; }
.switch input { appearance: none; width: 42px; height: 24px; border-radius: 999px; background: var(--border); position: relative; cursor: pointer; transition: background .2s; margin: 0; flex: none; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgb(0 0 0 / .2); }
.switch input:checked { background: var(--primary); }
.switch input:checked::after { transform: translateX(18px); }
.switch input:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent); }

/* Autocomplete */
.lookup { position: relative; }
.lookup-list {
  position: absolute; z-index: 15; top: calc(100% + 4px); left: 0; right: 0; max-height: 300px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: 0 12px 32px rgb(15 23 42 / .15);
  padding: 4px;
}
.lookup-item { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; border-radius: 8px; background: none; font: inherit; color: var(--text); cursor: pointer; }
.lookup-item small { display: block; color: var(--muted); font-size: 12px; }
.lookup-item:hover, .lookup-item.active { background: var(--primary-50); }
.lookup-empty { padding: 10px; color: var(--muted); font-size: 13px; }

/* Follow-up */
.followups { display: grid; gap: 12px; }
@media (min-width: 900px) { .followups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fu-row { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); border-left: 4px solid var(--border); background: var(--surface-2); }
.fu-row label { font-size: 13px; display: flex; gap: 8px; align-items: baseline; }
.fu-row label b { color: var(--primary); }
.fu-row .fu-head { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
.fu-row .fu-head input { width: auto; min-height: 36px; padding: 5px 10px; }
.fu-row .fu-head .error { flex-basis: 100%; }
.fu-locked { font-size: 13px; color: var(--muted); }
.fu-row textarea { min-height: 60px; }
.fu-row.done  { border-left-color: #10b981; }
.fu-row.today { border-left-color: #3b82f6; }
.fu-row.late  { border-left-color: var(--danger); }
.fu-row textarea { scroll-margin-top: 120px; }
.fu-row:has(textarea:target) { box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 35%, transparent); }
.list-head { margin: 0 0 12px; font-size: 14px; }

/* Tombol aksi form menempel di bawah */
.form-actions {
  position: sticky; bottom: 0; z-index: 10; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px;
  margin: 16px -16px -16px; padding: 12px 16px; background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(8px); border-top: 1px solid var(--border);
}
.form-actions small { margin-right: auto; font-size: 12px; }
@media (max-width: 639px) { .form-actions small { display: none; } .form-actions .btn-primary { flex: 1; } }
@media (min-width: 1024px) { .form-actions { margin: 20px 0 0; border: 1px solid var(--border); border-radius: var(--radius); bottom: 12px; } }

.page-head { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.page-head h2 { font-size: 18px; }
.page-head .btn { padding: 0 10px; }

/* ---------- Toolbar & tabel daftar ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; margin-bottom: 16px; }
.search { display: flex; flex-wrap: wrap; gap: 10px; flex: 1; min-width: 0; }
.search-box { position: relative; flex: 1; min-width: 200px; }
.search-box .icon { position: absolute; left: 12px; top: 11px; color: var(--muted); }
.search-box input { padding-left: 40px !important; }
.search select { width: auto; flex: none; }
.date-filter { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.date-filter input { width: auto !important; }
.toolbar > .btn { flex: none; }

.table-card { padding: 0; overflow: hidden; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); padding: 12px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { cursor: pointer; transition: background .1s; }
.table tbody tr:hover { background: var(--surface-2); }
.table td a { font-weight: 600; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.list-info { text-align: right; font-size: 13px; margin-top: 10px; }

/* Tabel menjadi kartu di layar kecil */
@media (max-width: 767px) {
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; }
  .table tr { padding: 12px 14px; border-bottom: 1px solid var(--border); }
  .table td { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: 4px 0; border: 0; }
  .table td::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 600; padding-top: 2px; }
  .table td:first-child { grid-template-columns: 1fr; font-size: 16px; padding-bottom: 6px; }
  .table td:first-child::before { display: none; }
}

/* ---------- Dashboard ---------- */
.hero { margin-bottom: 20px; }
.hero h2 { font-size: 22px; margin-bottom: 4px; }
.hero p { margin: 0; }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 16px; }
@media (min-width: 768px)  { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .stats { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.stats .card + .card { margin-top: 0; }
@media (max-width: 767px) { .stats .stat:last-child:nth-child(odd) { grid-column: 1 / -1; } }
.stat { display: grid; gap: 2px; color: var(--text); transition: transform .15s, border-color .15s; }
.stat:hover { transform: translateY(-2px); border-color: var(--primary); }
.stat-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); margin-bottom: 8px; }
.stat-num { font-size: 26px; font-weight: 700; }
.stat-label { color: var(--muted); font-size: 13px; }
.dash-grid { display: grid; gap: 16px; }
.dash-grid .card + .card { margin-top: 0; }
/* Desktop: menu sudah ada di sidebar kiri, jadi kartu Menu disembunyikan */
@media (min-width: 1024px) { .dash-menu { display: none; } }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.list li:last-child { border-bottom: 0; }
.list a { display: grid; color: var(--text); min-width: 0; }
.list small { font-size: 12px; }

.tiles { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tile { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); color: var(--text); font-weight: 600; font-size: 14px; }
.tile:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- Login ---------- */
.login-page {
  min-height: 100vh; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(1200px 600px at 10% -10%, color-mix(in srgb, var(--primary) 25%, transparent), transparent),
              radial-gradient(800px 500px at 110% 110%, color-mix(in srgb, var(--accent) 20%, transparent), transparent), var(--bg);
}
.login-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 32px 24px; box-shadow: 0 20px 60px rgb(15 23 42 / .12); }
.login-card .form { display: grid; gap: 16px; }
.login-brand { text-align: center; margin-bottom: 24px; }
.pw-box { position: relative; }
.pw-box input { padding-right: 48px !important; }
.pw-box .icon-btn { position: absolute; right: 1px; top: 1px; height: 40px; color: var(--muted); }
.login-brand h1 { font-size: 24px; margin: 12px 0 6px; }
.login-logo { display: inline-block; margin: 0 0 14px !important; border-radius: 14px; }
.login-logo img { display: block; width: 220px; height: auto; }
/* Tulisan logo berwarna gelap → beri latar putih saat mode gelap agar tetap terbaca */
@media (prefers-color-scheme: dark) { .login-logo { background: #fff; padding: 12px 16px; } }
.login-brand p { color: var(--muted); margin: 0; font-size: 14px; }

.install { max-width: 560px; margin: 40px auto; }
.install h2 { margin-bottom: 12px; }

/* ---------- Laporan Omset ---------- */
.report-filter { align-items: flex-end; }
.report-filter .field { font-size: 13px; font-weight: 600; flex: 0 1 200px; }
.report-stats { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important; }
.report-stats .stat-num { font-size: 22px; }
.table .num, .table tfoot .num { text-align: right; white-space: nowrap; }
.table tfoot th { padding: 12px 14px; border-top: 1px solid var(--border); text-align: left; font-size: 14px; color: var(--text); background: var(--surface-2); }
@media (max-width: 767px) {
  .table tfoot, .table tfoot tr { display: flex; justify-content: space-between; }
  .table tfoot tr { width: 100%; }
  .table .num { text-align: left; }
}

/* Grafik garis (digambar oleh initLineChart di app.js) */
.line-chart { position: relative; min-height: 280px; outline: none; touch-action: pan-y; }
.line-chart:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent); border-radius: var(--radius-sm); }
.line-chart svg { display: block; overflow: visible; }
.chart-grid { stroke: var(--border); stroke-width: 1; }
.chart-axis { stroke: color-mix(in srgb, var(--muted) 45%, transparent); stroke-width: 1; }
.chart-label { fill: var(--muted); font-size: 11px; }
.chart-value { fill: var(--text); font-size: 12px; font-weight: 600; }
.chart-line { fill: none; stroke: var(--primary); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-area { fill: var(--primary); opacity: .1; }
.chart-dot { fill: var(--primary); stroke: var(--surface); stroke-width: 2; }
.chart-cross { stroke: var(--muted); stroke-width: 1; }
.chart-tip {
  position: absolute; z-index: 5; pointer-events: none; display: grid; gap: 2px; padding: 8px 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgb(15 23 42 / .15); white-space: nowrap; font-size: 13px;
}
.chart-tip small { color: var(--muted); }
.chart-table { margin-top: 12px; }
.chart-table summary { cursor: pointer; color: var(--primary); font-size: 14px; font-weight: 600; }
.chart-table .table { margin-top: 10px; }
