:root {
  --bg: #0b1015; --surface: #151c23; --text: #e8eef2; --muted: #93a1ad;
  --accent: #6ae055; --danger: #ff5a6a; --radius: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
.top { padding: max(16px, env(safe-area-inset-top)) 16px 4px; }
.top h1 { margin: 0; font-size: 1.5rem; }
main { padding: 8px 16px; display: grid; gap: 12px; max-width: 640px; margin: 0 auto; }
.card { background: var(--surface); border-radius: var(--radius); padding: 16px; }
.card h2 { margin: 0 0 8px; font-size: 1.05rem; }
.card h2 small { color: var(--muted); font-weight: 400; margin-left: 6px; }
.stack { display: grid; gap: 12px; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; }
.stats dt { color: var(--muted); font-size: .8rem; }
.stats dd { margin: 0; font-size: 1.25rem; font-weight: 600; }
.stats dd small { font-size: .8rem; color: var(--muted); font-weight: 400; }
.big { font-size: 2rem; font-weight: 700; margin: 0; }
.muted { color: var(--muted); }
.center { text-align: center; }
.alert { background: color-mix(in srgb, var(--danger) 18%, transparent); border: 1px solid var(--danger); border-radius: 10px; padding: 10px 12px; margin: 0; }
.notice { background: color-mix(in srgb, var(--accent) 15%, transparent); border-radius: 10px; padding: 10px 12px; margin: 0; }
label { display: grid; gap: 4px; font-size: .9rem; color: var(--muted); }
input, select { min-height: 44px; font: inherit; color: var(--text); background: var(--bg); border: 1px solid #2a3540; border-radius: 10px; padding: 8px 12px; }
button { min-height: 44px; width: 100%; font: inherit; font-weight: 600; border: 0; border-radius: 10px; background: var(--accent); color: #0b1015; }
button.secondary { background: transparent; color: var(--text); border: 1px solid #2a3540; }
.tabs { position: fixed; inset: auto 0 0 0; display: grid; grid-template-columns: repeat(6, 1fr); background: var(--surface); padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid #222c35; }
.tabs a { min-height: 56px; display: grid; place-items: center; color: var(--muted); text-decoration: none; font-size: .75rem; }
.tabs a[aria-current="page"] { color: var(--accent); font-weight: 600; }

/* Brand hanya tampil di menu samping desktop */
.tabs .brand { display: none; }
body.bare { padding-bottom: 0; }
body.bare main { max-width: 440px; }

@media (min-width: 900px) {
  body { padding-bottom: 0; padding-left: 232px; }
  body.bare { padding-left: 0; }
  .tabs {
    inset: 0 auto 0 0; width: 232px; grid-template-columns: 1fr; grid-auto-rows: min-content; align-content: start;
    gap: 4px; padding: max(20px, env(safe-area-inset-top)) 12px 20px; border-top: 0; border-right: 1px solid #222c35;
  }
  .tabs .brand { display: block; min-height: auto; padding: 8px 12px 16px; color: var(--text); font-size: 1.2rem; font-weight: 700; }
  .tabs a { place-items: center start; padding: 0 12px; border-radius: 10px; font-size: .95rem; min-height: 44px; }
  .tabs a[aria-current="page"] { background: color-mix(in srgb, var(--accent) 14%, transparent); }
  .tabs a:hover { color: var(--text); }
  .top { max-width: 1100px; margin: 0 auto; padding: 28px 24px 4px; }
  main { max-width: 1100px; padding: 8px 24px 40px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  main > form, main > p, main > nav, main > .alert, main > .notice, main > .wide { grid-column: 1 / -1; }
  body.bare main { grid-template-columns: 1fr; }
  body.bare .top { max-width: 440px; }
}
