/* ============================================================
   Relay — base tokens & komponen bersama
   Brand: hitam · putih · biru.
   Default = tema dark (landing/auth). html.light = tema app.
   ============================================================ */
:root {
  --bg: #0a0b0e;
  --panel: #12141a;
  --panel-2: #171a21;
  --ink: #eef1f6;
  --muted: #9aa3b2;
  --line: rgba(255, 255, 255, 0.10);
  --line-2: rgba(255, 255, 255, 0.20);
  --accent: #3b74ff;
  --accent-hi: #5b8cff;
  --accent-ink: #ffffff;
  --danger: #ff5d5d;
  --ok: #46d39a;
  --radius: 14px;
  --font-ui: "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  --font-display: "Bricolage Grotesque", var(--font-ui);
  --font-serif: "Source Serif 4", Georgia, serif;
  --max: 1200px;
}

html.light {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --panel-2: #eef1f5;
  --ink: #0c1017;
  --muted: #5a6473;
  --line: rgba(12, 16, 23, 0.10);
  --line-2: rgba(12, 16, 23, 0.18);
  --accent: #2f6bff;
  --accent-hi: #1f5bef;
  /* permukaan khusus app (terang) */
  --app-bg: #fbfbfd;
  --sidebar-bg: #f7f8fa;
  --text-2: #36404f;
  --hover: rgba(12, 16, 23, .055);
  --hover-2: rgba(12, 16, 23, .085);
  --accent-soft: rgba(47, 107, 255, .10);
  --bubble: #eceff5;
  --code-inline-bg: #eef1f6;
}

/* ---------- Tema gelap (app) ---------- */
html.dark {
  --bg: #0f1117;
  --panel: #1b1e26;
  --panel-2: #23272f;
  --ink: #e9edf4;
  --muted: #9aa3b2;
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .16);
  --accent: #4d7cff;
  --accent-hi: #6f97ff;
  /* permukaan khusus app (gelap) */
  --app-bg: #0f1117;
  --sidebar-bg: #161922;
  --text-2: #c4cad4;
  --hover: rgba(255, 255, 255, .06);
  --hover-2: rgba(255, 255, 255, .10);
  --accent-soft: rgba(77, 124, 255, .18);
  --bubble: #262a33;
  --code-inline-bg: #23272f;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--font-ui);
  line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
em { font-style: normal; color: var(--accent); }
button { font-family: inherit; cursor: pointer; }
code, pre, kbd { font-family: ui-monospace, "SF Mono", "JetBrains Mono", monospace; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent); color: #fff; }

/* ---------- Brand / logo ---------- */
.brand { display: inline-flex; align-items: center; gap: 9px; }
.logo-mark { width: 24px; height: 24px; object-fit: contain; flex-shrink: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 100px; font-weight: 500; font-size: 15px;
  border: 1px solid transparent; transition: transform .3s cubic-bezier(.2,.8,.2,1), background .25s, border-color .25s, color .25s;
  will-change: transform; white-space: nowrap;
}
.btn:active { transform: scale(.98); }
/* #3568e6 = kontras 4.91 vs putih (lolos WCAG AA); --accent dibiarkan brand utk teks/aksen */
.btn-primary { background: #3568e6; color: #fff; }
.btn-primary:hover { background: #2d5fd6; }
.btn-ghost { border-color: var(--line-2); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); }
.btn-block { width: 100%; }

/* ---------- Inputs ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field > span { font-size: 13px; color: var(--muted); }
.input {
  width: 100%; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 13px 15px; color: var(--ink); font-family: inherit; font-size: 15px;
  transition: border-color .25s, background .25s;
}
.input::placeholder { color: var(--muted); opacity: .7; }
.input:focus { outline: none; border-color: var(--accent); }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
