/* ── ARI Commercial Lines — Identity Server Theme ──────────────────── */
/* No Bootstrap — pure glassmorphism */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(139,30,30,0.30) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(60,20,80,0.25) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(100,20,20,0.10) 0%, transparent 70%),
    linear-gradient(160deg, #0a0408 0%, #140a0a 30%, #0c0812 60%, #0a0610 100%);
  min-height: 100vh;
  color: #f5f0eb;
  overflow-x: hidden;
}

/* ── Nav Bar (mirrors the SPA's app-header pattern at localhost:4200) ── */
.ari-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.75rem;
  height: 80px;
  min-height: 80px;
  background: #0c0202;
  border-bottom: 2px solid rgba(220, 38, 38, 0.4);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 500;
  flex-shrink: 0;
}
@media (min-width: 768px) { .ari-nav { padding: 0 2.5rem; } }

.ari-nav__left {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

/* Logo wrapper: white rounded card around the ARI image, matches SPA exactly */
.ari-nav__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #fff;
  border-radius: 8px;
  padding: 5px 8px;
  text-decoration: none;
  transition: opacity 0.15s, box-shadow 0.15s;
}
.ari-nav__logo:hover { opacity: 0.88; box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.40); }
.ari-nav__logo:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.5); }

.ari-nav__logo-img {
  height: 54px;
  width: auto;
  object-fit: contain;
  display: block;
}

.ari-nav__identity {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  padding-left: 1.1rem;
}

.ari-nav__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.01em;
  line-height: 1.1;
}
.ari-nav__title em {
  font-style: italic;
  color: #c2873a;
  font-weight: 700;
}
@media (max-width: 480px) { .ari-nav__title { font-size: 1.05rem; } }

.ari-nav__tagline {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #c2873a;
}
@media (max-width: 480px) { .ari-nav__tagline { font-size: 0.68rem; } }

.ari-nav__right {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.ari-nav__name {
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
}

/* Buttons in the nav match SPA's .btn .btn-primary / .btn-secondary look */
.ari-nav__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.55rem 1.25rem;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 0.88rem;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s, box-shadow 0.2s;
}

.ari-nav__btn--primary {
  background: rgba(194, 135, 58, 0.12);
  border-color: #c2873a;
  color: #e8a84a;
}
.ari-nav__btn--primary:hover {
  background: rgba(194, 135, 58, 0.20);
  border-color: #e8a84a;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(194, 135, 58, 0.25);
}
.ari-nav__btn--primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 164, 239, 0.40);
}

.ari-nav__btn--secondary {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.75);
}
.ari-nav__btn--secondary:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.ari-nav__btn-logo {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ── Body Container ──────────────────────────────────────────────────── */
/* align-items: flex-start so tall pages (MFA Setup, Recovery Codes) start at
   the top instead of being centered into a viewport "void" when content
   exceeds the viewport height. Short pages (Login) still sit near the top
   with comfortable breathing room from the padding-top. */
.body-container {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: calc(100vh - 80px);
  padding: 2.5rem 1rem 2rem;
}

/* ── Login Page ──────────────────────────────────────────────────────── */
.login-page {
  width: 100%;
  max-width: 520px;
}

/* Legacy lead (kept for other pages that still use it) */
.login-page .lead {
  text-align: center;
  margin-bottom: 1.75rem;
}

.login-page .lead h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.6rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.login-page .lead p {
  color: rgba(255,255,255,0.55);
  font-size: 1rem;
}


/* ── Login Card ──────────────────────────────────────────────────────── */
.login-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    0 12px 40px rgba(0,0,0,0.45),
    0 0 80px rgba(139,30,30,0.10);
  padding: 2.5rem;
}


/* Readable instruction lists inside the card (MFA Setup, etc). Plain
   bright white — 88% opacity tested as too marginal on darker monitors
   (text blended into the glass card; only readable when highlighted). */
.login-card ol,
.login-card ul {
  color: #ffffff;
  font-size: 0.98rem;
  font-weight: 500;
}
.login-card ol li,
.login-card ul li {
  margin-bottom: 0.45rem;
  color: #ffffff;
}
.login-card ol strong,
.login-card ul strong {
  color: #fbbf24;
  font-weight: 700;
}

/* ── Form Fields ─────────────────────────────────────────────────────── */
.login-field {
  margin-bottom: 1.15rem;
}

.login-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: rgba(255,255,255,0.70);
  margin-bottom: 8px;
}

.login-input {
  width: 100%;
  padding: 14px 18px;
  background: rgba(255,255,255,0.10);
  border: 1.5px solid rgba(255,255,255,0.20);
  border-radius: 10px;
  color: #fff;
  font-size: 1rem;
  font-family: inherit;
  caret-color: #fff;
  -webkit-text-fill-color: #fff;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.login-input:focus {
  outline: none;
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220,38,38,0.2);
  background: rgba(255,255,255,0.12);
}

.login-input::placeholder { color: rgba(255,255,255,0.30); }

/* Override Safari/Chrome autofill — these browsers force a yellow/dark
   background and dark text fill on autofilled inputs, which on our dark
   glass theme makes typed values nearly invisible. The inset box-shadow
   is the canonical workaround for hiding the autofill bg color. */
.login-input:-webkit-autofill,
.login-input:-webkit-autofill:hover,
.login-input:-webkit-autofill:focus,
.login-input:-webkit-autofill:active {
  -webkit-text-fill-color: #fff !important;
  -webkit-box-shadow: 0 0 0 1000px rgba(40, 18, 18, 0.85) inset !important;
  caret-color: #fff;
  transition: background-color 5000s ease-in-out 0s;
}

/* ── Checkbox ────────────────────────────────────────────────────────── */
.login-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1.25rem;
}

.login-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #8b1e1e;
  cursor: pointer;
}

.login-check label {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
}

/* ── Buttons ─────────────────────────────────────────────────────────── */
.login-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 1rem;
}

.login-btn {
  display: block;
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: all 0.2s;
  border: none;
  letter-spacing: 0.01em;
}

.login-btn--primary {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.20),
    0 6px 20px rgba(220,38,38,0.45);
  flex: 2;
}
.login-btn--primary:hover {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.25),
    0 8px 28px rgba(220,38,38,0.60);
  transform: translateY(-1px);
}

.login-btn--secondary {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.6);
  flex: 1;
}
.login-btn--secondary:hover { background: rgba(255,255,255,0.12); color: #fff; }

.login-btn--outline {
  background: transparent;
  border: 1.5px solid rgba(139,30,30,0.5);
  color: #f87171;
  transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.login-btn--outline:hover {
  background: rgba(220, 38, 38, 0.18);
  border-color: rgba(248, 113, 113, 0.85);
  color: #ffffff;
  box-shadow:
    0 0 0 1px rgba(248, 113, 113, 0.30),
    0 6px 18px rgba(220, 38, 38, 0.22);
  transform: translateY(-1px);
}
.login-btn--outline:active { transform: translateY(0); }

/* ── Links & Divider ─────────────────────────────────────────────────── */
.login-links {
  text-align: center;
  margin-bottom: 1rem;
}

.login-links a {
  color: #c2873a;
  font-size: 0.92rem;
  text-decoration: none;
}
.login-links a:hover { color: #e8a84a; text-decoration: underline; }

.login-divider {
  height: 1px;
  background: rgba(255,255,255,0.10);
  margin: 1.5rem 0;
}

.login-alt-text {
  text-align: center;
  font-size: 0.92rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: 0.85rem;
}

/* ── Error ────────────────────────────────────────────────────────────── */
.login-error {
  background: rgba(220,38,38,0.12);
  border: 1px solid rgba(220,38,38,0.3);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  color: #fca5a5;
  font-size: 0.85rem;
}

.validation-summary-errors {
  background: rgba(220,38,38,0.12);
  border: 1px solid rgba(220,38,38,0.3);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  color: #fca5a5;
  font-size: 0.85rem;
  list-style: none;
}
.validation-summary-errors ul { margin: 0; padding: 0 0 0 16px; }

/* ── Welcome / Home Page ─────────────────────────────────────────────── */
.welcome-page {
  text-align: center;
  padding: 4rem 2rem;
}
.welcome-page .logo { display: none; }
.welcome-page h1 { font-family: 'Playfair Display', Georgia, serif; font-size: 1.8rem; font-weight: 800; color: #fff; }
.welcome-page h1 small { display: none; }
.welcome-page ul, .welcome-page h2, .welcome-page dl { display: none; }

/* ── Logged Out ──────────────────────────────────────────────────────── */
.logged-out-page { text-align: center; padding: 3rem 2rem; }
.logged-out-page h1 { font-family: 'Playfair Display', Georgia, serif; font-size: 1.8rem; font-weight: 800; color: #fff; }
.logged-out-page p { color: rgba(255,255,255,0.6); font-size: 0.9rem; }
.logged-out-page iframe { display: none; }

/* ── Responsive ──────────────────────────────────────────────────────── */
/* Phone — keep usable, slightly tighter than the iPad/desktop default */
@media (max-width: 480px) {
  .login-page { padding: 0 0.75rem; }
  .login-card { padding: 1.75rem; }
  .login-page .lead h1 { font-size: 2rem; }
  .login-page .lead p { font-size: 0.9rem; }
  .login-input { padding: 12px 14px; font-size: 1rem; /* keep 16px to avoid iOS zoom */ }
  .login-btn { padding: 12px; font-size: 0.95rem; }
  .login-actions { flex-direction: column; }
}

/* Large desktop / TV — let the card breathe more, bigger heading */
@media (min-width: 1536px) {
  .login-page { max-width: 600px; }
  .login-page .lead h1 { font-size: 3rem; }
  .login-card { padding: 3rem; }
}

/* ── Hide old Bootstrap classes that might linger ────────────────────── */
.navbar { display: none !important; }
.container { max-width: none; padding: 0; margin: 0; }
.row { display: block; margin: 0; }
.col-sm-6 { max-width: none; padding: 0; }
.card { background: none; border: none; }
.card-header { display: none; }
.card-body { padding: 0; }
.form-group { margin-bottom: 1rem; }
.form-control { display: none; }
.form-check { display: none; }
.btn { display: none; }
.mt-2, .mt-3 { display: none; }
.alert { display: none; }
