:root {
  --bg: #0a0a0e;
  --surface: #131319;
  --surface-2: #1b1b23;
  --line: #2a2a34;
  --accent: #d4ff3f;
  --accent-dim: #7c8f2a;
  --text: #f3f1e8;
  --text-muted: #8c8b93;
  --danger: #ff6b57;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Menlo", monospace;
  --sans: -apple-system, "Segoe UI", system-ui, sans-serif;
}
:root[data-theme="light"] {
  --bg: #f3f1e8; --surface: #ffffff; --surface-2: #eae7da; --line: #d8d4c2;
  --accent: #6b7f16; --accent-dim: #a8b86a; --text: #0a0a0e; --text-muted: #5b5a63;
  --danger: #b3261e;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f3f1e8; --surface: #ffffff; --surface-2: #eae7da; --line: #d8d4c2;
    --accent: #6b7f16; --accent-dim: #a8b86a; --text: #0a0a0e; --text-muted: #5b5a63;
    --danger: #b3261e;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; }
::selection { background: var(--accent); color: #0a0a0e; }

nav.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 28px;
  border-bottom: 1px solid var(--line);
}
.logo {
  font-family: var(--sans); font-weight: 900; font-size: 20px;
  letter-spacing: -0.02em; transform: skewX(-6deg); display: inline-block;
  text-decoration: none;
}
.logo .dot { color: var(--accent); }

.auth-shell {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}
.auth-card {
  width: 100%;
  max-width: 380px;
}
.auth-eyebrow {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--accent-dim);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.auth-card h1 {
  font-family: var(--sans);
  font-weight: 900;
  font-size: 30px;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  transform: skewX(-3deg);
  transform-origin: left;
  margin: 0 0 28px;
  text-wrap: balance;
}

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  padding: 12px 14px;
  border-radius: 2px;
}
.field input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.btn-primary {
  width: 100%;
  background: var(--accent);
  color: #0a0a0e;
  font-weight: 700;
  font-size: 15px;
  padding: 13px 26px;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  margin-top: 6px;
  transition: transform .12s ease, opacity .12s ease;
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-primary:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.btn-primary:disabled { opacity: 0.5; cursor: default; transform: none; }

.auth-foot {
  margin-top: 22px;
  font-size: 13.5px;
  color: var(--text-muted);
  text-align: center;
}
.auth-foot a { color: var(--accent); text-decoration: none; font-weight: 600; }
.auth-foot a:hover { text-decoration: underline; }

.msg {
  display: none;
  font-size: 13.5px;
  padding: 11px 13px;
  border-radius: 2px;
  margin-bottom: 18px;
  line-height: 1.4;
}
.msg.visible { display: block; }
.msg.err { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent); }
.msg.ok { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--text); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }

.status-card {
  text-align: center;
}
.status-icon {
  font-family: var(--mono);
  font-size: 44px;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1;
}
.status-icon.ok { color: var(--accent); }
.status-icon.err { color: var(--danger); }

@media (prefers-reduced-motion: reduce) {
  .btn-primary { transition: none; }
}
