/* Login page — standalone styles, intentionally not sharing with the
   main app's styles.css to keep this surface tiny and load-fast. */

:root {
  --bg: #0e1116;
  --panel: #1a1f27;
  --panel-2: #232934;
  --border: #2c333f;
  --text: #e6e9ef;
  --text-dim: #9099a8;
  --accent: #5b8def;
  --accent-hover: #7aa0f3;
  --danger: #e16464;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(circle at 20% 20%, #1e2532 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, #1c2330 0%, transparent 50%),
    var(--bg);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  width: min(380px, calc(100% - 32px));
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.login-head {
  text-align: center;
  margin-bottom: 24px;
}
.login-logo {
  color: var(--accent);
  margin-bottom: 12px;
}
.login-head h1 {
  margin: 0 0 4px 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.login-sub {
  margin: 0;
  color: var(--text-dim);
  font-size: 14px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.login-form.hidden { display: none; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field span {
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 500;
}
.field input {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.15s;
}
.field input:focus {
  border-color: var(--accent);
}
#totpCode {
  font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
  letter-spacing: 0.08em;
  font-size: 18px;
  text-align: center;
}

button.primary, button.ghost {
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  padding: 11px 16px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
button.primary {
  background: var(--accent);
  color: white;
}
button.primary:hover  { background: var(--accent-hover); }
button.primary:active { transform: translateY(1px); }
button.primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
button.ghost {
  background: transparent;
  color: var(--text-dim);
  border-color: var(--border);
}
button.ghost:hover { color: var(--text); }

.login-error {
  color: var(--danger);
  font-size: 13px;
  padding: 8px 10px;
  background: rgba(225, 100, 100, 0.08);
  border: 1px solid rgba(225, 100, 100, 0.2);
  border-radius: 6px;
}
.login-error.hidden { display: none; }

.totp-help {
  margin: 0 0 4px 0;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.45;
}
