/* ── AccessiScan — Auth Pages Dark Theme ────────────────── */
/* Shared by: login, register, forgot-password, reset-password */

:root {
  --navy:       #0a1628;
  --blue-600:   #2563eb;
  --blue-700:   #1d4ed8;
  --blue-800:   #1e40af;
  --blue-300:   #93c5fd;
  --orange-500: #f97316;
  --orange-600: #ea580c;
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body:    'DM Sans', system-ui, -apple-system, sans-serif;
}

html, body {
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-5%, -10%); }
  30% { transform: translate(3%, -15%); }
  50% { transform: translate(12%, 9%); }
  70% { transform: translate(9%, 4%); }
  90% { transform: translate(-1%, 7%); }
}

/* ── FULL PAGE BACKGROUND ── */
body {
  background: var(--navy);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}
body::before {
  content: ''; position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(37,99,235,.18) 0%, transparent 65%),
    radial-gradient(ellipse 40% 40% at 80% 80%, rgba(30,64,175,.12) 0%, transparent 60%),
    radial-gradient(ellipse 30% 50% at 10% 60%, rgba(249,115,22,.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: ''; position: fixed; inset: -50%;
  width: 200%; height: 200%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  animation: grain 6s steps(10) infinite;
  pointer-events: none; opacity: 0.6;
  z-index: 0;
}

/* ── LAYOUT ── */
.page {
  min-height: 100vh; display: flex; flex-direction: column;
  position: relative; z-index: 1;
}

/* ── NAV (frosted glass) ── */
nav {
  padding: 0 2rem;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.logo {
  font-family: var(--font-body);
  font-size: 1.15rem; font-weight: 800; color: #fff;
  text-decoration: none;
  display: flex; align-items: center; gap: 0.15rem;
  letter-spacing: -0.03em;
}
.logo-dot {
  width: 6px; height: 6px;
  background: var(--orange-500);
  border-radius: 50%;
  display: inline-block;
  margin-left: 1px; margin-bottom: -2px;
}

nav a.nav-link {
  font-family: var(--font-body);
  font-size: 0.84rem; font-weight: 500;
  color: rgba(148,163,184,.7);
  text-decoration: none;
  transition: color 0.15s;
  letter-spacing: -0.01em;
}
nav a.nav-link:hover { color: #fff; }

/* ── MAIN ── */
.main {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 2rem 1rem;
}

/* ── CARD (glassmorphic) ── */
.card {
  width: 100%; max-width: 440px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  box-shadow:
    0 24px 48px rgba(0,0,0,0.25),
    0 0 0 1px rgba(255,255,255,0.05) inset;
  padding: 2.75rem 2.25rem;
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ── CARD HEADER ── */
.card-header { margin-bottom: 2rem; text-align: center; }

.card-icon {
  width: 52px; height: 52px;
  background: rgba(37,99,235,0.15);
  border: 1px solid rgba(96,165,250,0.2);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.25rem;
}
.card-icon svg {
  width: 24px; height: 24px;
  color: var(--blue-300);
}

h1 {
  font-family: var(--font-display);
  font-size: 1.75rem; font-weight: 400; font-style: normal;
  color: #fff;
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
}
.subtitle {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: rgba(148,163,184,.7);
  font-weight: 400;
}

/* ── FORM ── */
.form-group { margin-bottom: 1.25rem; }

label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.84rem; font-weight: 500;
  color: rgba(203,213,225,.85);
  margin-bottom: 0.45rem;
  letter-spacing: -0.01em;
}

.input-wrap { position: relative; }

/* Override common.css inputs for dark theme */
input[type="email"],
input[type="password"],
input[type="text"] {
  background: rgba(255,255,255,0.07);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.92rem;
  padding: 0.8rem 1.1rem;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
input::placeholder {
  color: rgba(148,163,184,.4);
  font-weight: 400;
}
input:focus {
  border-color: rgba(96,165,250,.45);
  box-shadow: 0 0 0 3px rgba(37,99,235,.15);
  background: rgba(255,255,255,0.09);
}
input.error-input {
  border-color: rgba(239,68,68,.6);
}
input.error-input:focus {
  box-shadow: 0 0 0 3px rgba(239,68,68,.12);
}

.pw-toggle {
  color: rgba(148,163,184,.5);
}
.pw-toggle:hover { color: rgba(203,213,225,.9); }

/* ── ERROR BOX (dark-adapted) ── */
.error-box {
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.25);
  color: #fca5a5;
  border-radius: 10px;
}

/* ── SUCCESS BOX ── */
.success-box {
  display: none;
  background: rgba(34,197,94,.1);
  border: 1px solid rgba(34,197,94,.25);
  color: #86efac;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
  margin-bottom: 1.25rem;
  text-align: center;
  line-height: 1.5;
}
.success-box.active { display: block; }

/* ── PRIMARY BUTTON ── */
.btn-primary {
  width: 100%;
  padding: 0.85rem 1.5rem;
  background: var(--blue-600);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  letter-spacing: -0.01em;
  margin-top: 0.25rem;
}
.btn-primary:hover:not(:disabled) {
  background: var(--blue-700);
  box-shadow: 0 4px 16px rgba(37,99,235,.3);
  transform: translateY(-1px);
}
.btn-primary:active:not(:disabled) {
  transform: scale(0.98) translateY(0);
}
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── SECONDARY BUTTON ── */
.btn-secondary {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: var(--blue-300);
  border: 1.5px solid rgba(96,165,250,.3);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  letter-spacing: -0.01em;
  margin-top: 1rem;
  width: 100%;
}
.btn-secondary:hover {
  background: rgba(96,165,250,.08);
  border-color: rgba(96,165,250,.5);
  color: #fff;
}

/* ── DIVIDER ── */
.divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin: 1.75rem 0;
}

/* ── CARD FOOTER ── */
.card-footer {
  text-align: center;
  font-family: var(--font-body);
  font-size: 0.84rem;
  color: rgba(148,163,184,.6);
}
.card-footer a {
  color: var(--blue-300);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}
.card-footer a:hover {
  color: #fff;
  text-decoration: none;
}

/* ── FIELD ERRORS (dark-adapted) ── */
.field-error {
  color: #fca5a5;
  font-size: 0.78rem;
}

/* ── RESPONSIVE ── */
@media (max-width: 480px) {
  .card {
    padding: 2rem 1.5rem;
    border-radius: 16px;
  }
  nav { padding: 0 1.25rem; }
}
