/* Shared styles for /login and /register.
 *
 * Served at /static/auth.css so we can drop 'unsafe-inline' from the CSP
 * style-src directive (see P4 hardening, audit finding #9).
 *
 * The two pages were effectively identical; `.login-input.invalid` is the
 * only register-specific rule — it's harmless on the login page.
 */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0F172A; --surface: #1E293B; --primary: #F1F5F9;
  --accent: #34D399; --accent-light: rgba(52,211,153,0.08);
  --muted: #9CA3AF; --border: #334155; --error: #F87171;
  --radius: 12px; --font-ui: system-ui, -apple-system, sans-serif;
}

body {
  font-family: var(--font-ui); background: var(--bg); color: var(--primary);
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  -webkit-font-smoothing: antialiased;
  position: relative; overflow: hidden;
}

body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 70% 20%, rgba(52,211,153,0.1) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(5,150,105,0.06) 0%, transparent 60%);
  z-index: -2;
}

body::after {
  content: '';
  position: fixed; inset: 0;
  background-image: radial-gradient(circle, rgba(52,211,153,0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 20%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 20%, transparent 100%);
  z-index: -1;
}

.login-card {
  width: 90%; max-width: 360px;
  background: rgba(30,41,59,0.75);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-radius: 20px; padding: 40px 28px; text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,0.3), 0 8px 24px rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.08);
}

.login-title { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 6px; }
.login-sub { font-size: 14px; color: var(--muted); margin-bottom: 28px; }

.login-input {
  width: 100%; padding: 14px 16px; font-size: 16px; font-family: var(--font-ui);
  background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--radius);
  color: var(--primary); outline: none; text-align: left;
  transition: border-color 0.2s, box-shadow 0.2s; -webkit-appearance: none;
  margin-bottom: 12px;
}
.login-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(52,211,153,0.1); }
.login-input.invalid { border-color: var(--error); }

.login-btn {
  width: 100%; padding: 14px; margin-top: 6px; font-size: 16px; font-weight: 700;
  background: var(--accent); color: #fff; border: none; border-radius: var(--radius);
  cursor: pointer; box-shadow: 0 4px 12px rgba(52,211,153,0.25);
  transition: opacity 0.15s, transform 0.1s;
}
.login-btn:hover { opacity: 0.9; }
.login-btn:active { transform: scale(0.98); }

.login-error {
  display: none; margin-top: 14px; padding: 10px 14px; font-size: 13px; font-weight: 600;
  background: rgba(248,113,113,0.1); border: 1px solid rgba(248,113,113,0.2);
  color: var(--error); border-radius: 10px;
}
.login-error.show { display: block; }

.login-footer { margin-top: 20px; font-size: 13px; color: var(--muted); }
.login-footer a { color: var(--accent); text-decoration: none; font-weight: 600; }
.login-footer a:hover { text-decoration: underline; }

/* Footer injected server-side (previously an inline style attribute). */
.site-footer {
  text-align: center;
  padding: 20px 0 0;
  font-size: 11px;
  color: #94A3B8;
  letter-spacing: 0.3px;
}
