/* ==========================================================================
   Login / Authentication Screen (Scoped to .auth-* classes)
   Brand Design System: Deep Navy (#081C36, #0B2A52, #123B70) + Royal Blue (#2563EB) + Gold (#F4B942)
   ========================================================================== */

:root {
  --auth-navy-950: #051427;
  --auth-navy-900: #081C36;
  --auth-navy-800: #0B2A52;
  --auth-navy-700: #123B70;
  --auth-royal: #2563EB;
  --auth-royal-dark: #1D4ED8;
  --auth-royal-light: #60A5FA;
  --auth-gold: #F4B942;
  --auth-gold-dark: #B45309;
  --auth-gold-soft: #FEF3C7;
  --auth-body: #F4F8FD;
  --auth-text: #0F172A;
  --auth-muted: #64748B;
  --auth-border: #E2E8F0;
  --auth-danger: #DC2626;
  --auth-danger-soft: #FEF2F2;
  --auth-radius: 20px;
}

body.auth-body {
  margin: 0;
  min-height: 100vh;
  background: var(--auth-body);
  color: var(--auth-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: .925rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.auth-shell {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  min-height: 100vh;
}

/* ---------- Left Brand Hero Panel ---------- */

.auth-brand {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2.5rem;
  padding: 3.5rem 4rem;
  color: #E2E8F0;
  background:
    radial-gradient(850px 500px at 10% 10%, rgba(37, 99, 235, 0.45), transparent 65%),
    radial-gradient(750px 450px at 90% 90%, rgba(244, 185, 66, 0.2), transparent 60%),
    linear-gradient(145deg, var(--auth-navy-950) 0%, var(--auth-navy-900) 40%, var(--auth-navy-800) 80%, #0F3260 100%);
}

.auth-brand::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.auth-brand > * {
  position: relative;
  z-index: 1;
}

.auth-brand-head {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.auth-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  font-size: 1.5rem;
  color: #081C36;
  background: linear-gradient(135deg, #FDE68A 0%, #F4B942 50%, #D97706 100%);
  box-shadow: 0 12px 28px rgba(244, 185, 66, .35);
  border: 2px solid rgba(255, 255, 255, 0.25);
}

.auth-brand-name {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: #FFFFFF;
}

.auth-brand-kicker {
  margin: 0;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--auth-gold);
}

.auth-brand-copy h2 {
  margin: 0 0 1rem;
  font-size: 2.25rem;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -.03em;
  color: #FFFFFF;
}

.auth-brand-copy p {
  margin: 0;
  max-width: 48ch;
  color: #CBD5E1;
  font-size: 1rem;
  line-height: 1.6;
}

.auth-brand-points {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: .85rem;
}

.auth-brand-points li {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  font-size: .92rem;
  color: #E2E8F0;
}

.auth-brand-points i {
  flex: none;
  width: 24px;
  height: 24px;
  margin-top: 2px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  color: #081C36;
  background: #F4B942;
  box-shadow: 0 4px 10px rgba(244, 185, 66, 0.3);
}

.auth-brand-foot {
  font-size: .84rem;
  color: #94A3B8;
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-brand-foot a {
  color: var(--auth-gold);
  text-decoration: none;
  font-weight: 600;
}

.auth-brand-foot a:hover {
  text-decoration: underline;
}

/* ---------- Right Form Panel ---------- */

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2.5rem;
  background: var(--auth-body);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  padding: 2.75rem 2.5rem;
  background: #FFFFFF;
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-radius);
  box-shadow: 0 24px 64px rgba(11, 42, 82, .09);
}

.auth-card-head {
  margin-bottom: 1.75rem;
}

.auth-card-head h1 {
  margin: 0 0 .35rem;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -.025em;
  color: var(--auth-navy-800);
}

.auth-card-head p {
  margin: 0;
  color: var(--auth-muted);
  font-size: .88rem;
}

.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  margin-bottom: 1.25rem;
  padding: .8rem 1rem;
  border: 1px solid #FECACA;
  border-radius: 12px;
  background: var(--auth-danger-soft);
  color: var(--auth-danger);
  font-size: .86rem;
  font-weight: 500;
}

.auth-alert i {
  margin-top: 2px;
}

.auth-field {
  margin-bottom: 1.2rem;
}

.auth-field label {
  display: block;
  margin-bottom: .45rem;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: #334155;
}

.auth-input-wrap {
  position: relative;
  display: block;
}

.auth-input-wrap > i {
  position: absolute;
  top: 50%;
  left: 1rem;
  transform: translateY(-50%);
  font-size: .95rem;
  color: #94A3B8;
  pointer-events: none;
  transition: color .18s ease;
}

.auth-control {
  width: 100%;
  height: 48px;
  padding: .6rem 2.75rem;
  font-size: .925rem;
  color: var(--auth-text);
  background: #F8FAFC;
  border: 1px solid var(--auth-border);
  border-radius: 12px;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
  -webkit-appearance: none;
  appearance: none;
}

.auth-control::placeholder {
  color: #94A3B8;
}

.auth-control:focus {
  outline: none;
  background: #FFFFFF;
  border-color: var(--auth-royal);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .16);
}

.auth-input-wrap:focus-within > i {
  color: var(--auth-royal);
}

.auth-toggle {
  position: absolute;
  top: 50%;
  right: .55rem;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: .9rem;
  color: #94A3B8;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: color .18s ease, background .18s ease;
}

.auth-toggle:hover {
  color: var(--auth-navy-700);
  background: #EEF2F6;
}

.auth-submit {
  width: 100%;
  height: 48px;
  margin-top: .5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .01em;
  color: #FFFFFF;
  background: linear-gradient(135deg, var(--auth-royal) 0%, var(--auth-navy-800) 100%);
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(18, 59, 112, .26);
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.auth-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(18, 59, 112, .32);
  color: #FFFFFF;
}

.auth-submit:active {
  transform: translateY(0);
}

.auth-submit:disabled {
  opacity: .75;
  cursor: progress;
  transform: none;
}

.auth-submit.is-loading .auth-submit-label {
  visibility: hidden;
}

.auth-submit .auth-spinner {
  position: absolute;
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, .4);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: auth-spin .7s linear infinite;
}

.auth-submit.is-loading .auth-spinner {
  display: block;
}

@keyframes auth-spin {
  to { transform: rotate(360deg); }
}

.auth-hint {
  margin: 1.35rem 0 0;
  padding: .85rem 1rem;
  font-size: .82rem;
  color: var(--auth-muted);
  background: #F8FAFC;
  border: 1px solid var(--auth-border);
  border-radius: 12px;
}

.auth-hint code {
  color: var(--auth-royal-dark);
  background: #EFF6FF;
  padding: 2px 6px;
  border-radius: 6px;
  font-weight: 700;
}

.auth-foot {
  margin: 1.35rem 0 0;
  text-align: center;
  font-size: .82rem;
  color: #94A3B8;
}

.auth-foot a {
  color: var(--auth-royal);
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.18s ease;
}

.auth-foot a:hover {
  color: var(--auth-royal-dark);
  text-decoration: underline;
}

/* ---------- Responsive ---------- */

@media (max-width: 991.98px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    padding: 2.5rem 1.75rem 2rem;
    gap: 1.25rem;
  }

  .auth-brand-copy h2 {
    font-size: 1.6rem;
  }

  .auth-brand-copy p,
  .auth-brand-points,
  .auth-brand-foot {
    display: none;
  }

  .auth-panel {
    padding: 2.5rem 1.5rem 3.5rem;
  }
}

@media (max-width: 480px) {
  .auth-card {
    padding: 2rem 1.5rem;
    border-radius: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-submit,
  .auth-control {
    transition: none;
  }
}
