:root {
  --ink: #0b1b2b;
  --ink-2: #13283d;
  --sky: #00a3c4;
  --sky-600: #0088a6;
  --sky-50: #e6f7fb;
  --gold: #f5b800;
  --gold-50: #fff7db;
  --green: #12a150;
  --green-50: #e3f6ec;
  --red: #e5484d;
  --red-50: #fdecec;

  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #f0f3f7;
  --border: #e3e8ef;
  --text: #0f1c2b;
  --text-2: #506176;
  --text-3: #8795a8;
  --shadow: 0 1px 2px rgba(16, 32, 56, .04), 0 4px 16px rgba(16, 32, 56, .06);
  --radius: 16px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Unbounded", "Inter", system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #081421;
    --surface: #0e1f31;
    --surface-2: #14283d;
    --border: #1e3550;
    --text: #e8eef5;
    --text-2: #a3b3c6;
    --text-3: #6f8399;
    --sky-50: #0a3040;
    --gold-50: #3a2f08;
    --green-50: #0d3222;
    --red-50: #3a1618;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #081421;
  --surface: #0e1f31;
  --surface-2: #14283d;
  --border: #1e3550;
  --text: #e8eef5;
  --text-2: #a3b3c6;
  --text-3: #6f8399;
  --sky-50: #0a3040;
  --gold-50: #3a2f08;
  --green-50: #0d3222;
  --red-50: #3a1618;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -.01em; margin: 0; }

.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -.02em; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--sky), #0bc5d9); color: #fff; position: relative;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.12);
}
.logo-mark::after {
  content: ""; position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--gold); border: 2px solid var(--bg);
}
.logo b { color: var(--sky); font-weight: 700; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 600; cursor: pointer; transition: transform .08s, background .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--sky); color: #fff; box-shadow: 0 6px 16px rgba(0, 163, 196, .28); }
.btn-primary:hover:not(:disabled) { background: var(--sky-600); }
.btn-gold { background: var(--gold); color: #1d1600; }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 16px; border-radius: 14px; }

.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.badge-sky { background: var(--sky-50); color: var(--sky-600); }
.badge-gold { background: var(--gold-50); color: #9a6f00; }
.badge-green { background: var(--green-50); color: var(--green); }
.badge-red { background: var(--red-50); color: var(--red); }
.badge-muted { background: var(--surface-2); color: var(--text-2); }
:root[data-theme="dark"] .badge-gold { color: var(--gold); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .badge-gold { color: var(--gold); } }

.input, .textarea, .select {
  width: 100%; height: 42px; padding: 0 14px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 140px; padding: 12px 14px; resize: vertical; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--sky); box-shadow: 0 0 0 4px rgba(0, 163, 196, .14); }
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 500; color: var(--text-2); }
.hint { font-size: 12px; color: var(--text-3); }
