/* NEZI — token desain bersama (landing, app, docs).
   Konsep warna: "hyaku-nezumi" — seratus abu-abu tikus zaman Edo.
   Abu-abu adalah bahasa utama; aksen biru Shinbashi dipakai hemat (±5–10% layar). */

@font-face { font-family: 'Inter Tight'; src: url(/fonts/InterTight-300_700.woff2) format('woff2'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url(/fonts/IBMPlexMono-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url(/fonts/IBMPlexMono-500.woff2) format('woff2'); font-weight: 500; font-display: swap; }

:root {
  /* tangga abu-abu (g0 = latar AMOLED) */
  --g0: #050506;
  --g1: #0a0a0c;
  --g2: #101013;
  --g3: #17171b;
  --g4: #222227;
  --g5: #34343a;
  --g6: #55555c;
  --g7: #86868e;
  --g8: #b4b4bb;
  --g9: #e3e3e6;
  --g10: #f6f6f7;

  --bg: var(--g0);
  --panel: var(--g1);
  --panel-2: var(--g2);
  --line: rgba(255, 255, 255, 0.075);
  --line-2: rgba(255, 255, 255, 0.13);
  --text: var(--g9);
  --muted: var(--g7);
  --faint: var(--g6);

  /* aksen: Shinbashi (biru-hijau era Meiji) — satu-satunya warna jenuh */
  --accent: #41cfd6;
  --accent-ink: #062022;
  --accent-soft: rgba(65, 207, 214, 0.12);
  /* status */
  --ok: #41cfd6;
  --warn: #e7b24c;
  --bad: #ee6b5c;

  --font: 'Inter Tight', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --r1: 4px;
  --r2: 8px;
  --r3: 14px;
  --gut: clamp(16px, 4vw, 40px);
  --maxw: 1240px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg, canvas, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 0.92em; letter-spacing: -0.01em; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.accent { color: var(--accent); }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* label kecil huruf besar berjarak */
.eyebrow {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* tombol: utama = putih (AMOLED premium), kedua = garis */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  font-weight: 600; font-size: 14px; letter-spacing: -0.005em;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease), opacity 0.2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--g10); color: #08080a; }
.btn-primary:hover { background: #fff; }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.28); background: rgba(255, 255, 255, 0.03); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn[disabled], .btn.is-disabled { opacity: 0.45; cursor: not-allowed; }
.btn-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text); }
.btn-link:hover { color: #fff; }
.btn-link .arr { transition: transform 0.2s var(--ease); }
.btn-link:hover .arr { transform: translateX(3px); }

/* masukan */
.field {
  display: flex; align-items: center; gap: 8px;
  height: 46px; padding: 0 6px 0 14px; border-radius: 999px;
  background: var(--panel-2); border: 1px solid var(--line-2);
  transition: border-color 0.2s;
}
.field:focus-within { border-color: rgba(65, 207, 214, 0.55); }
.field input { flex: 1; min-width: 0; height: 100%; background: transparent; border: 0; outline: 0; font-family: var(--mono); font-size: 13.5px; }
.field input::placeholder { color: var(--faint); }

/* pil status datar */
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  height: 26px; padding: 0 10px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.045); color: var(--g8);
  font-size: 12px; font-weight: 500;
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--g6); }
.pill.live .dot { background: var(--accent); box-shadow: 0 0 0 3px rgba(65, 207, 214, 0.18); }
.pill.warn .dot { background: var(--warn); }
.pill.bad .dot { background: var(--bad); }

/* garis rambut & tabel data */
.hr { height: 1px; background: var(--line); border: 0; margin: 0; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; letter-spacing: 0.04em; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }

/* fokus keyboard */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* toast */
.toast-host { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; pointer-events: none; width: min(92vw, 420px); }
.toast { pointer-events: auto; background: var(--g3); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; font-size: 13.5px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); animation: toast-in 0.35s var(--ease); }
.toast.bad { border-color: rgba(238, 107, 92, 0.5); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
