:root {
  --bg: #0b1020;
  --surface: #161d3d;
  --surface-2: #1d254a;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e7ecff;
  --muted: #9aa4c7;
  --accent: #6ea8ff;
  --accent-2: #8b5cf6;
  --danger: #f87171;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); line-height: 1.55; }

.auth-wrapper {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.auth-card {
  width: 100%; max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 32px;
  box-shadow: 0 16px 48px rgba(0,0,0,.4);
}
.auth-brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 18px; margin-bottom: 24px;
}
.brand-mark {
  width: 24px; height: 24px; border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.auth-card h1 {
  font-size: 22px; font-weight: 700; margin: 0 0 20px;
}
.auth-field { margin-bottom: 14px; }
.auth-field label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--muted); margin-bottom: 5px;
  text-transform: uppercase; letter-spacing: .04em;
}
.auth-field input {
  width: 100%; font: inherit; font-size: 14px;
  color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 14px; outline: none;
  transition: border-color .2s;
}
.auth-field input:focus { border-color: var(--accent); }
.auth-field input::placeholder { color: var(--muted); }

.auth-error {
  font-size: 13px; color: var(--danger);
  background: rgba(248,113,113,.06);
  border: 1px solid rgba(248,113,113,.15);
  border-radius: 8px;
  padding: 8px 12px; margin-bottom: 14px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: 14px;
  border: 1px solid transparent; cursor: pointer; font-family: inherit;
  transition: transform .1s, background .2s, filter .2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  width: 100%; background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white; margin-top: 6px;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:disabled { opacity: .6; cursor: default; filter: none; }
.btn-ghost {
  background: transparent; border-color: var(--border); color: var(--text);
  text-decoration: none; margin-top: 10px;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.auth-toggle {
  text-align: center; margin-top: 18px; font-size: 13px; color: var(--muted);
}
.auth-toggle-btn {
  font: inherit; font-size: 13px; font-weight: 600;
  color: var(--accent); background: transparent;
  border: none; cursor: pointer; padding: 0;
  text-decoration: underline; transition: color .2s;
}
.auth-toggle-btn:hover { color: var(--text); }

.auth-terms {
  margin-bottom: 14px;
}
.auth-terms-label {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px; color: var(--muted); cursor: pointer;
  line-height: 1.5;
}
.auth-terms-label input[type="checkbox"] {
  margin-top: 2px; flex-shrink: 0;
  width: 15px; height: 15px; cursor: pointer;
  accent-color: var(--accent);
}
.auth-terms-label a { color: var(--accent); text-decoration: underline; }
.auth-terms-label a:hover { color: var(--text); }

.auth-no-config {
  text-align: center; color: var(--muted); font-size: 14px;
}
.auth-no-config p { margin: 6px 0; }
.auth-no-config code {
  font-size: 12px; background: var(--surface-2);
  padding: 2px 6px; border-radius: 4px;
}
.auth-no-config .btn { display: inline-flex; }
