/* Authentication pages: shared by user and admin login. */
.auth-page {
  --auth-ink: #20263a;
  --auth-muted: #65708a;
  --auth-line: #dfe3eb;
  --auth-surface: #ffffff;
  --auth-coral: #f15f5d;
  --auth-coral-dark: #d84d50;
  --auth-coral-tint: #fff0ec;
  --auth-navy: #1e2b4a;
  min-height: calc(100vh - 48px);
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 52px);
  color: var(--auth-ink);
}

.auth-page *,
.auth-page *::before,
.auth-page *::after { box-sizing: border-box; }

.auth-shell {
  width: min(1040px, 100%);
  display: grid;
  grid-template-columns: minmax(290px, .86fr) minmax(420px, 1.14fr);
  align-items: stretch;
  overflow: hidden;
  background: var(--auth-surface);
  border: 1px solid rgba(32, 38, 58, .12);
  border-radius: 24px 8px 24px 8px;
  box-shadow: 0 22px 52px rgba(32, 38, 58, .12);
}

.auth-intro {
  display: flex;
  flex-direction: column;
  min-height: 610px;
  padding: clamp(28px, 5vw, 54px);
  background: var(--auth-coral-tint);
  border-right: 1px solid rgba(241, 95, 93, .18);
}

.auth-brand,
.auth-mobile-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  color: var(--auth-ink);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -.02em;
}

.auth-brand img,
.auth-mobile-brand img {
  width: 38px;
  height: 38px;
  object-fit: cover;
  border-radius: 11px;
  box-shadow: 0 7px 16px rgba(32, 38, 58, .12);
}

.auth-intro-copy {
  margin: auto 0 30px;
}

.auth-kicker {
  margin: 0 0 10px;
  color: var(--auth-coral-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.auth-intro h1,
.auth-heading h2 {
  margin: 0;
  color: var(--auth-ink);
  font-weight: 800;
  letter-spacing: -.045em;
}

.auth-intro h1 {
  max-width: 430px;
  font-size: clamp(30px, 3.5vw, 45px);
  line-height: 1.08;
}

.auth-intro-copy > p:last-child,
.auth-heading > p:last-child,
.auth-intro-note,
.auth-switch,
.auth-security-note {
  color: var(--auth-muted);
  font-size: 14px;
  line-height: 1.6;
}

.auth-intro-copy > p:last-child { margin: 18px 0 0; max-width: 405px; }

.auth-benefits {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--auth-ink);
  font-size: 14px;
  font-weight: 650;
}

.auth-benefits li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.auth-benefits li::before {
  content: '';
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin-top: 7px;
  background: var(--auth-coral);
  border-radius: 2px;
  transform: rotate(45deg);
}

.auth-intro-note {
  margin: auto 0 0;
  padding-top: 24px;
  border-top: 1px solid rgba(241, 95, 93, .2);
}

.auth-panel {
  align-self: center;
  width: min(100%, 610px);
  padding: clamp(30px, 5vw, 56px);
}

.auth-mobile-brand { display: none; }

.auth-heading { margin-bottom: 28px; }
.auth-heading h2 { font-size: clamp(28px, 3.2vw, 37px); line-height: 1.12; }
.auth-heading > p:last-child { margin: 10px 0 0; }
.auth-heading .auth-kicker { margin-bottom: 8px; }

.auth-page .alert {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid #f3b5b1;
  border-radius: 10px;
  background: #fff5f4;
  color: #a73539;
  font-size: 14px;
  line-height: 1.45;
}

.auth-page .alert.success {
  border-color: #afd8c4;
  background: #f1fbf5;
  color: #28734e;
}

.auth-form-fields { display: grid; gap: 18px; }
.auth-field { display: grid; gap: 7px; min-width: 0; }
.auth-field label,
.auth-fieldset legend {
  color: var(--auth-ink);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.3;
}

.auth-field input {
  width: 100%;
  min-height: 48px;
  padding: 12px 13px;
  border: 1px solid var(--auth-line);
  border-radius: 9px;
  background: #fff;
  color: var(--auth-ink);
  font: inherit;
  line-height: 1.2;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.auth-field input::placeholder { color: #9aa3b5; }
.auth-field input:focus {
  border-color: var(--auth-coral);
  box-shadow: 0 0 0 3px rgba(241, 95, 93, .14);
}

.auth-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.auth-label-row a,
.auth-switch a {
  color: var(--auth-coral-dark);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.auth-label-row a:hover,
.auth-switch a:hover { text-decoration: underline; }

.auth-page .password-field {
  display: flex;
  align-items: center;
  min-height: 48px;
  overflow: hidden;
  border: 1px solid var(--auth-line);
  border-radius: 9px;
  background: #fff;
  padding: 0 6px 0 0;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.auth-page .password-field:focus-within {
  border-color: var(--auth-coral);
  box-shadow: 0 0 0 3px rgba(241, 95, 93, .14);
}

.auth-page .password-field input,
.auth-page .password-field input:focus {
  min-height: 46px;
  border: 0;
  box-shadow: none;
}

.auth-page .eye-btn {
  display: inline-grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  min-height: 34px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--auth-coral-dark);
  cursor: pointer;
  font: inherit;
  padding: 6px;
}

.auth-page .eye-icon { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.auth-page .eye-icon-hide { display: none; }
.auth-page .eye-btn.is-visible .eye-icon-show { display: none; }
.auth-page .eye-btn.is-visible .eye-icon-hide { display: block; }

.auth-page .eye-btn:hover,
.auth-page .eye-btn:focus-visible { background: #fff0ec; outline: none; }

.auth-page .auth-submit {
  min-height: 50px;
  margin-top: 4px;
  border-radius: 9px;
  font-weight: 800;
}

.auth-switch { margin: 22px 0 0; text-align: center; }

.auth-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.auth-fieldset + .auth-fieldset {
  padding-top: 22px;
  border-top: 1px solid var(--auth-line);
}

.auth-fieldset legend { float: none; width: auto; margin: 0 0 14px; padding: 0; }
.auth-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.auth-field-wide { grid-column: 1 / -1; }
.auth-field-help { margin: 0; color: var(--auth-muted); font-size: 12px; line-height: 1.45; }
.auth-field-help.is-match { color: #23724e; }
.auth-field-help.is-mismatch { color: #b43a3e; }

.auth-page-admin { --auth-coral: #f2ad42; --auth-coral-dark: #ad6610; --auth-coral-tint: #1e2b4a; }
.auth-page-admin .auth-intro { color: #eef3ff; border-right-color: rgba(255, 255, 255, .14); }
.auth-page-admin .auth-brand,
.auth-page-admin .auth-intro h1,
.auth-page-admin .auth-benefits { color: #fff; }
.auth-page-admin .auth-kicker { color: #ffd58b; }
.auth-page-admin .auth-intro-copy > p:last-child,
.auth-page-admin .auth-intro-note { color: #cbd5ea; }
.auth-page-admin .auth-intro-note { border-top-color: rgba(255, 255, 255, .16); }
.auth-security-note { margin: 20px 0 0; font-size: 12px; text-align: center; }

@media (max-width: 820px) {
  .auth-page { min-height: auto; padding: 0; place-items: stretch; }
  .auth-shell { width: 100%; min-height: 100vh; grid-template-columns: 1fr; border: 0; border-radius: 0; box-shadow: none; }
  .auth-intro { display: none; }
  .auth-panel { width: 100%; max-width: 640px; margin: auto; padding: clamp(28px, 8vw, 48px) clamp(20px, 7vw, 42px); }
  .auth-mobile-brand { display: inline-flex; margin-bottom: 42px; }
}

@media (max-width: 520px) {
  .auth-heading { margin-bottom: 24px; }
  .auth-heading h2 { font-size: 29px; }
  .auth-field-grid { grid-template-columns: 1fr; gap: 16px; }
  .auth-field-wide { grid-column: auto; }
  .auth-label-row { align-items: flex-start; flex-direction: column; gap: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-page .auth-field input,
  .auth-page .password-field { transition: none; }
}
