:root {
  --a-ink: #111827;
  --a-muted: #6b7280;
  --a-line: #e5e7eb;
  --a-bg: #f3f4f6;
  --a-surface: #ffffff;
  --a-brand: #0d4a3c;
  --font: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html {
  width: 100%;
}
body.auth-page {
  margin: 0;
  min-height: 100vh;
  width: 100%;
  font-family: var(--font);
  color: var(--a-ink);
  background: var(--a-bg);
}
.auth-shell {
  min-height: 100vh;
  width: 100%;
  display: grid;
  place-items: center;
  padding: 28px 16px;
}
.auth-box .stack {
  display: grid;
  gap: 0;
}
.auth-box {
  width: min(420px, 100%);
  background: var(--a-surface);
  border: 1px solid var(--a-line);
  border-radius: 16px;
  padding: 28px 26px;
  box-shadow: 0 10px 30px rgba(17,24,39,.06);
}
.auth-kicker {
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--a-muted); font-weight: 700; margin-bottom: 8px;
}
.auth-box h1 { margin: 0 0 6px; font-size: 22px; }
.auth-system-title {
  margin: 0 0 10px !important;
  text-align: center;
  font-size: 22px !important;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: #0b0b0b;
}
.auth-box .sub {
  margin: 0 0 20px;
  color: var(--a-muted);
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
}
.auth-box label { display: block; font-weight: 600; font-size: 12px; margin: 0 0 5px; }
.auth-box input {
  width: 100%; padding: 11px 12px; border-radius: 10px;
  border: 1px solid var(--a-line); font: inherit; background: #fff; margin-bottom: 12px;
}
.auth-box .btn {
  width: 100%; margin-top: 4px;
  display: inline-flex; justify-content: center; align-items: center;
  background: #111827; color: #fff !important; border: none;
  border-radius: 10px; padding: 11px 14px; font-weight: 650; cursor: pointer;
  text-decoration: none !important;
}
.auth-box .btn:hover { background: #000; }
.auth-box .btn.secondary {
  background: #fff; color: var(--a-ink) !important; border: 1px solid var(--a-line);
}
.auth-links { margin-top: 16px; font-size: 13px; color: var(--a-muted); line-height: 1.6; }
.auth-links a { color: var(--a-brand); }
.flash { padding: 11px 12px; border-radius: 10px; margin-bottom: 14px; font-size: 13px; font-weight: 500; }
.flash.ok { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.flash.err { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.auth-foot {
  margin-top: 18px; text-align: center; color: var(--a-muted); font-size: 12px;
}
.auth-logo {
  display: block;
  height: 48px;
  width: auto;
  max-width: 240px;
  background: #fff;
  border: 1px solid var(--a-line);
  border-radius: 12px;
  padding: 8px 14px;
  margin: 0 auto 18px;
}
.otp-boxes input { letter-spacing: .35em; font-size: 22px; text-align: center; font-weight: 700; }

.id-card {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px;
  margin: 0 0 18px;
  border: 1px solid var(--a-line);
  border-radius: 14px;
  background: #f9fafb;
}
.id-photo {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--a-line);
  background: #fff;
}
.id-fallback {
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  background: #111827;
  border-color: #111827;
}
.id-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.id-meta strong {
  font-size: 16px;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.id-email,
.id-title {
  font-size: 13px;
  color: var(--a-muted);
  word-break: break-word;
}
.id-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.id-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--a-line);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: var(--a-ink);
}
.id-chip.id-status {
  background: #111827;
  border-color: #111827;
  color: #fff;
}

/* Intranet auth: desktop only (CSS backup + dedicated mobile page) */
.auth-desktop-gate { display: none; }
.auth-desktop-only {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #f3f4f6;
}
.auth-desktop-card {
  width: min(420px, 100%);
  background: #fff;
  border: 1px solid var(--a-line);
  border-radius: 18px;
  padding: 28px 24px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(17, 24, 39, .08);
}
.auth-desktop-card img {
  height: 44px;
  width: auto;
  margin: 0 auto 16px;
  display: block;
}
.auth-desktop-card h1 {
  margin: 0 0 8px;
  font-size: 24px;
  color: #0b0b0b;
}
.auth-desktop-card p {
  margin: 0 0 10px;
  color: var(--a-muted);
  font-size: 14px;
  line-height: 1.5;
}
.auth-desktop-card .muted {
  color: #9ca3af;
  font-size: 13px;
}
.auth-desktop-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}
.auth-desktop-actions .btn {
  width: 100%;
  margin: 0;
}
.auth-desktop-actions .btn.secondary {
  background: #fff;
  color: var(--a-ink) !important;
  border: 1px solid var(--a-line);
}
@media (max-width: 900px) {
  body.auth-intranet .auth-desktop-gate {
    display: grid;
    place-items: center;
    position: fixed;
    inset: 0;
    z-index: 50;
    padding: 24px;
    background: #f3f4f6;
  }
  body.auth-intranet .auth-intranet-shell {
    display: none !important;
  }
}

/* Candidate auth stays mobile-friendly */
@media (max-width: 480px) {
  body.auth-page:not(.auth-intranet) .auth-box {
    padding: 22px 18px;
    border-radius: 14px;
  }
  body.auth-page:not(.auth-intranet) .auth-system-title,
  body.auth-page:not(.auth-intranet) .auth-box h1 {
    font-size: 20px !important;
  }
}
