/* ===== Token & elemen dasar ===== */
:root {
  --bg: #0b0b0f;
  --surface: #14151b;
  --surface-2: #1d1f28;
  --input: #0f1015;
  --line: #2a2d39;
  --red: #e50914;
  --red-hover: #ff1f2a;
  --gold: #f5c518;
  --green: #34d399;
  --amber: #fbbf24;
  --text: #f4f4f6;
  --muted: #9ca0ad;
  --radius: 10px;
  --display: 'Bebas Neue', Impact, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.muted { color: var(--muted); font-size: 14px; }
.grow { flex: 1; min-width: 0; }

.brand { font-family: var(--display); font-size: 28px; letter-spacing: 1px; color: var(--red); white-space: nowrap; }
.brand span { color: var(--text); }
.brand-lg { font-size: 44px; text-align: center; line-height: 1; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 15px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface-2);
  font-size: 14px; font-weight: 600; white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.btn:hover:not(:disabled) { border-color: #4b4f60; background: #272a36; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--red-hover); border-color: var(--red-hover); }
.btn-light { background: #fff; border-color: #fff; color: #101014; }
.btn-light:hover:not(:disabled) { background: #dcdce2; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-danger { color: #fca5a5; border-color: rgba(248, 113, 113, .4); }
.btn-sm { padding: 6px 11px; font-size: 13px; }
.btn-block { width: 100%; margin-top: 6px; }

.input {
  width: 100%; padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--input); font-size: 14px;
}
.input:focus { border-color: #70758a; outline: none; }
.input-sm { padding: 6px 9px; font-size: 13px; width: auto; }
.field { display: block; margin-bottom: 14px; font-size: 13px; font-weight: 500; color: #cfd1da; }
.field .input { margin-top: 6px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 14px; cursor: pointer; }
.check input { accent-color: var(--red); }

.alert {
  padding: 10px 12px; margin-bottom: 14px; border-radius: 8px; font-size: 13px;
  background: rgba(239, 68, 68, .13); border: 1px solid #b91c1c; color: #fecaca;
}

.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--input); border-radius: 10px; }
.tabs button { padding: 9px; border: 0; border-radius: 7px; background: none; color: var(--muted); font-weight: 600; font-size: 13px; }
.tabs button.active { background: var(--red); color: #fff; }

.dialog {
  margin: auto; width: min(430px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
  padding: 24px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--surface); color: var(--text); overflow-y: auto;
}
.dialog::backdrop { background: rgba(0, 0, 0, .75); backdrop-filter: blur(3px); }
.dialog h3 { font-size: 19px; margin-bottom: 8px; }
.dialog p { margin-bottom: 14px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.code-input { text-align: center; text-transform: uppercase; letter-spacing: 3px; font-size: 20px; font-weight: 700; margin-bottom: 12px; }

.toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.toast { padding: 11px 16px; border-radius: var(--radius); background: #f4f4f6; color: #101014; font-size: 14px; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.5); text-align: center; }
.toast.error { background: #fee2e2; color: #7f1d1d; }

.boot { min-height: 100vh; display: grid; place-items: center; color: var(--muted); }

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