:root {
  --bg: #0a0d10;
  --bg-elev: #12161b;
  --bg-elev-2: #1a1f26;
  --bg-elev-3: #232a33;
  --border: #232a33;
  --border-strong: #2f3845;
  --text: #e6ebf2;
  --text-dim: #8a95a3;
  --text-mute: #5d6773;
  --accent: #2dd4bf;
  --accent-dim: #14857a;
  --danger: #f87171;
  --warn: #fbbf24;
  --ok: #34d399;
  --info: #60a5fa;
  --purple: #c084fc;
  --mono: ui-monospace, 'JetBrains Mono', 'Fira Code', Consolas, 'Courier New', monospace;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: 12px; background: var(--bg-elev-2); padding: 1px 6px; border-radius: 3px; color: var(--text); }

.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 20px; border-bottom: 1px solid var(--border);
  background: var(--bg-elev); gap: 24px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.02em; color: var(--text);
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-mark { width: 10px; height: 10px; background: var(--accent); border-radius: 2px; }
.brand-name { color: var(--text); font-weight: 600; }
.brand-sub { color: var(--text-mute); }
.topbar-actions { display: flex; gap: 12px; align-items: center; }

button, .btn {
  font-family: var(--sans); font-size: 13px; font-weight: 500;
  padding: 8px 14px; border-radius: 4px;
  border: 1px solid var(--border-strong); background: var(--bg-elev-2);
  color: var(--text); cursor: pointer;
  transition: background 0.1s ease, border-color 0.1s ease;
  white-space: nowrap; display: inline-block; text-decoration: none;
}
button:hover:not(:disabled), .btn:hover { background: var(--border); border-color: var(--border-strong); text-decoration: none; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
button.primary, .btn.primary {
  background: var(--accent); border-color: var(--accent); color: #06201d; font-weight: 600;
}
button.primary:hover:not(:disabled), .btn.primary:hover {
  background: #4ae3d0; border-color: #4ae3d0;
}
button.danger { color: var(--danger); border-color: var(--border-strong); }
button.danger:hover:not(:disabled) { background: rgba(248,113,113,0.08); border-color: var(--danger); }
button.ghost { background: transparent; border-color: transparent; color: var(--text-dim); padding: 6px 10px; }
button.ghost:hover:not(:disabled) { background: var(--bg-elev-2); color: var(--text); }
button.large, .btn.large { padding: 12px 24px; font-size: 14px; }

label {
  display: block; font-family: var(--mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-dim); margin-bottom: 6px;
}
input[type="password"], input[type="text"], input[type="email"], textarea, select {
  width: 100%; background: var(--bg);
  border: 1px solid var(--border-strong); border-radius: 4px;
  color: var(--text); padding: 10px 12px;
  font-family: var(--mono); font-size: 13px; outline: none;
  transition: border-color 0.1s ease;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
input:disabled, textarea:disabled, select:disabled { opacity: 0.6; cursor: not-allowed; }

.field { margin-bottom: 16px; }
.field-hint { margin-top: 6px; font-size: 12px; color: var(--text-mute); }

.card {
  width: 100%; max-width: 440px;
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: 6px; padding: 32px; margin: 0 auto;
}
.card h1 { margin: 0 0 6px 0; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.card .subtitle { margin: 0 0 24px 0; color: var(--text-dim); font-size: 13px; }

.error {
  margin-top: 16px; padding: 10px 12px;
  background: rgba(248,113,113,0.08); border: 1px solid rgba(248,113,113,0.3);
  border-radius: 4px; color: var(--danger); font-size: 13px;
}
.success {
  margin-top: 16px; padding: 10px 12px;
  background: rgba(52,211,153,0.06); border: 1px solid rgba(52,211,153,0.3);
  border-radius: 4px; color: var(--ok); font-size: 13px;
}
.notice {
  margin: 0 auto 16px auto; padding: 10px 14px; max-width: 720px;
  background: rgba(96,165,250,0.06); border: 1px solid rgba(96,165,250,0.25);
  border-radius: 4px; color: var(--info); font-size: 12px;
}

.appfoot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 20px; background: var(--bg-elev);
  border-top: 1px solid var(--border);
  font-family: var(--mono); font-size: 10px;
  color: var(--text-mute); letter-spacing: 0.04em;
  position: fixed; bottom: 0; left: 0; right: 0;
}
.appfoot a { color: var(--text-dim); }
.appfoot a:hover { color: var(--accent); }
