/* ── Auth screens ─────────────────────────────────────────────────────────
   Split layout: navy brand panel beside a white form card. Palette matches the
   portal (#0866FF on deep navy) rather than the grey default. */

:root {
  --navy-950: #081533;
  --navy-900: #0B1A3D;
  --navy-800: #102149;
  --brand: #0866FF;
  --brand-deep: #0A55D6;
  --ink: #0B1A3D;
  --body: #4A5A72;
  --line: #E4EAF4;
}

* { box-sizing: border-box; }
html, body {
  height: 100%;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: 'Readex Pro', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: #F6F8FC;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  overflow-x: hidden;
}

a { text-decoration: none; }

.auth-split { display: grid; grid-template-columns: 1fr; min-height: 100%; }
@media (min-width: 992px) { .auth-split { grid-template-columns: 1.05fr 1fr; } }

/* ── Brand panel ─────────────────────────────────────────────────────────── */
.auth-brand {
  display: none; position: relative; overflow: hidden;
  padding: 3.5rem 3rem; color: #fff;
  background:
    radial-gradient(900px 420px at 8% -10%, #16305C 0%, transparent 58%),
    radial-gradient(700px 360px at 95% 5%, #0A3A7A 0%, transparent 55%),
    linear-gradient(165deg, var(--navy-950) 0%, var(--navy-800) 100%);
}
@media (min-width: 992px) { .auth-brand { display: flex; align-items: center; } }

.auth-brand::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(120,160,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120,160,255,.06) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 30% 40%, #000 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 30% 40%, #000 20%, transparent 80%);
}

.auth-brand-inner { position: relative; z-index: 1; max-width: 34rem; }

.auth-logo { display: inline-flex; align-items: center; gap: .75rem; margin-bottom: 3rem; color: inherit; }
.auth-logo img { height: 46px; width: auto; max-width: 190px; object-fit: contain; }
.auth-logo strong { display: block; font-size: 1.05rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.auth-logo small { display: block; font-size: .6rem; text-transform: uppercase; letter-spacing: .16em; opacity: .6; font-weight: 600; }

.auth-logo-mark {
  width: 46px; height: 46px; display: grid; place-items: center;
  border-radius: 14px; font-size: 1.3rem; color: #fff;
  background: linear-gradient(135deg, var(--brand), #4F9BFF);
}

.auth-brand h1 {
  font-size: clamp(1.9rem, 3vw, 2.65rem); font-weight: 600;
  letter-spacing: -.03em; line-height: 1.12; margin: 0 0 1.15rem;
}

.auth-brand-copy { font-size: .95rem; color: rgba(255,255,255,.68); margin-bottom: 2.5rem; }

.auth-points { list-style: none; padding: 0; margin: 0 0 2.5rem; display: grid; gap: 1rem; }
.auth-points li { display: flex; align-items: center; gap: .85rem; font-size: .92rem; color: rgba(255,255,255,.9); }
.auth-point-icon {
  width: 38px; height: 38px; flex-shrink: 0; display: grid; place-items: center;
  border-radius: 11px; font-size: 1rem; color: #9CC5FF;
  background: rgba(120,160,255,.10); border: 1px solid rgba(120,160,255,.20);
}

.auth-legal { font-size: .78rem; color: rgba(255,255,255,.5); margin: 0; }
.auth-legal a { color: rgba(255,255,255,.8); border-bottom: 1px solid rgba(255,255,255,.3); }
.auth-legal a:hover { color: #fff; }

/* ── Form side ───────────────────────────────────────────────────────────── */
.auth-form-side {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 2rem 1.25rem; background: #F6F8FC;
}
@media (min-width: 992px) { .auth-form-side { padding: 3rem; } }

.auth-card {
  width: 100%; max-width: 27rem;
  background: #fff; border: 1px solid var(--line);
  border-radius: 22px; padding: 2.25rem;
  box-shadow: 0 1px 2px rgba(11,26,61,.04), 0 24px 60px rgba(11,26,61,.08);
}
@media (max-width: 575.98px) { .auth-card { padding: 1.6rem; border-radius: 18px; } }

.auth-logo-mobile { margin-bottom: 1.75rem; color: var(--ink); }
.auth-logo-mobile strong { color: var(--ink); }
@media (min-width: 992px) { .auth-logo-mobile { display: none; } }

.auth-card h2 { font-size: 1.5rem; font-weight: 600; letter-spacing: -.02em; margin: 0 0 .35rem; }
.auth-sub { font-size: .88rem; color: var(--body); margin-bottom: 1.75rem; }

.auth-card label { display: block; font-size: .78rem; font-weight: 600; color: var(--ink); margin-bottom: .35rem; }

.auth-card .form-control,
.auth-card .form-select {
  width: 100%; border-radius: 12px; border: 1px solid var(--line);
  padding: .72rem .9rem; font-size: .92rem; font-family: inherit;
  background: #FBFCFE; color: var(--ink);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.auth-card .form-control::placeholder { color: #9AA9BF; }
.auth-card .form-control:focus,
.auth-card .form-select:focus {
  outline: none; border-color: var(--brand); background: #fff;
  box-shadow: 0 0 0 4px rgba(8,102,255,.12);
}
.auth-card .form-control.is-invalid { border-color: #DC2626; }
.auth-card .invalid-feedback { display: block; font-size: .76rem; color: #DC2626; margin-top: .3rem; }

.field { margin-bottom: 1.1rem; }
.field-inline { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1.35rem; font-size: .84rem; }
.field-inline label { margin: 0; font-weight: 400; color: var(--body); display: inline-flex; align-items: center; gap: .45rem; }
.field-inline a { color: var(--brand); font-weight: 600; }

.pw-wrap { position: relative; }
.pw-wrap .form-control { padding-right: 2.75rem; }
.pw-toggle {
  position: absolute; right: .5rem; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: #9AA9BF; padding: .35rem .5rem; font-size: 1rem; line-height: 1;
}
.pw-toggle:hover { color: var(--brand); }

.btn-auth {
  width: 100%; border: 0; border-radius: 12px;
  background: var(--brand); color: #fff;
  font-size: .95rem; font-weight: 600; font-family: inherit;
  padding: .82rem 1rem; cursor: pointer;
  box-shadow: 0 10px 24px rgba(8,102,255,.22);
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.btn-auth:hover { background: var(--brand-deep); transform: translateY(-1px); box-shadow: 0 14px 30px rgba(8,102,255,.28); }

.auth-switch { margin: 1.5rem 0 0; text-align: center; font-size: .86rem; color: var(--body); }
.auth-switch a { color: var(--brand); font-weight: 600; }

.auth-alert {
  border-radius: 12px; padding: .75rem .9rem; font-size: .85rem; margin-bottom: 1.25rem;
  background: #FEF2F2; border: 1px solid #FECACA; color: #B91C1C;
}
.auth-alert.success { background: #F0FDF4; border-color: #BBF7D0; color: #15803D; }

.auth-foot { margin-top: 1.75rem; font-size: .78rem; color: #8B9AB0; text-align: center; }
.auth-foot a { color: #8B9AB0; border-bottom: 1px solid transparent; }
.auth-foot a:hover { color: var(--brand); }

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; }
  .btn-auth:hover { transform: none; }
}
