:root {
  --navy: #192d50;
  --navy-deep: #10223f;
  --blue: #4a91dd;
  --blue-hover: #367fc9;
  --page: #f5f8fc;
  --surface: #ffffff;
  --text: #10274a;
  --muted: #6f819e;
  --border: #d8e1ec;
  --danger: #bd3345;
}

* { box-sizing: border-box; }
html { min-height: 100%; font-size: 16px; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--page);
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.auth-page {
  display: grid;
  grid-template-rows: 66px 1fr auto;
  overflow-x: hidden;
  background: radial-gradient(circle at 12% 35%, rgba(74, 145, 221, .08), transparent 29rem), radial-gradient(circle at 88% 72%, rgba(25, 45, 80, .055), transparent 26rem), var(--page);
}

.auth-header {
  display: flex;
  align-items: center;
  padding: 0 clamp(1.25rem, 4vw, 3.25rem);
  background: var(--navy);
  box-shadow: 0 3px 10px rgba(16, 34, 63, .18);
}

.brand { display: inline-flex; align-items: center; gap: .8rem; color: #fff; font-size: 1.15rem; font-weight: 700; letter-spacing: .02em; text-decoration: none; }
.brand:hover, .brand:focus { color: #fff; }
.brand-mark { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 8px; background: var(--blue); }
.brand-mark svg { width: 21px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }

.auth-main { display: grid; place-items: center; width: 100%; padding: 3rem 1rem; }
.login-card { width: min(100%, 440px); padding: 2.4rem 2.5rem 2.5rem; border: 1px solid rgba(216, 225, 236, .92); border-radius: 12px; background: var(--surface); box-shadow: 0 14px 38px rgba(25, 45, 80, .08), 0 2px 6px rgba(25, 45, 80, .04); }
.login-heading { margin-bottom: 2rem; text-align: center; }
.login-icon { display: grid; width: 48px; height: 48px; margin: 0 auto 1rem; place-items: center; border-radius: 12px; color: var(--blue); background: #edf5fe; }
.login-icon svg { width: 26px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.login-heading h1 { margin: 0 0 .45rem; color: var(--navy-deep); font-size: 1.55rem; font-weight: 700; letter-spacing: -.015em; }
.login-heading p { margin: 0; color: var(--muted); font-size: .94rem; }

.form-field { margin-bottom: 1.2rem; }
.form-field label, .label-row label { margin-bottom: .5rem; color: var(--navy-deep); font-size: .88rem; font-weight: 600; }
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.forgot-link { color: #3f82ca; font-size: .8rem; font-weight: 500; text-decoration: none; }
.forgot-link:hover { color: var(--blue-hover); text-decoration: underline; }
.input-shell { position: relative; }
.input-shell > svg { position: absolute; z-index: 2; top: 50%; left: .9rem; width: 19px; transform: translateY(-50%); fill: none; stroke: #8494aa; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.65; pointer-events: none; }
.input-shell .form-control { min-height: 46px; padding: .65rem 2.8rem .65rem 2.65rem; border-color: var(--border); border-radius: 7px; color: var(--navy-deep); background: #fbfcfe; font-size: .9rem; }
.input-shell .form-control::placeholder { color: #98a6b9; }
.input-shell .form-control:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(74, 145, 221, .14); }

.password-toggle { position: absolute; z-index: 3; top: 50%; right: .65rem; display: grid; width: 34px; height: 34px; padding: 0; transform: translateY(-50%); place-items: center; border: 0; border-radius: 6px; color: #75869e; background: transparent; }
.password-toggle:hover { color: var(--blue-hover); background: #edf5fe; }
.password-toggle:focus-visible, .forgot-link:focus-visible, .brand:focus-visible { outline: 3px solid rgba(74, 145, 221, .35); outline-offset: 2px; }
.password-toggle svg { width: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }

.remember-check { display: inline-flex; align-items: center; gap: .55rem; margin: 0 0 1.55rem; color: #526781; font-size: .84rem; cursor: pointer; }
.remember-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--blue); }
.btn-login { display: flex; width: 100%; min-height: 46px; align-items: center; justify-content: center; gap: .65rem; border: 0; border-radius: 7px; color: #fff; background: var(--blue); box-shadow: 0 5px 12px rgba(74, 145, 221, .22); font-size: .92rem; font-weight: 650; transition: background-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.btn-login:hover { background: var(--blue-hover); box-shadow: 0 7px 16px rgba(54, 127, 201, .26); transform: translateY(-1px); }
.btn-login:focus-visible { outline: 3px solid rgba(74, 145, 221, .3); outline-offset: 3px; }
.btn-login svg { width: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }

.field-validation, .validation-summary { color: var(--danger); font-size: .78rem; }
.field-validation:not(:empty) { display: block; margin-top: .35rem; }
.validation-summary ul { margin: 0 0 1rem; padding: .7rem .9rem .7rem 1.9rem; border-radius: 6px; background: #fff1f3; }
.input-validation-error { border-color: var(--danger) !important; }
.auth-footer { display: flex; align-items: center; justify-content: center; gap: .7rem; padding: 0 1rem 1.5rem; color: #8493a8; font-size: .76rem; }
.footer-dot { width: 3px; height: 3px; border-radius: 50%; background: #aeb9c8; }

@media (max-width: 575.98px) {
  .auth-page { grid-template-rows: 60px 1fr auto; }
  .auth-main { align-items: start; padding: 2rem 1rem; }
  .login-card { padding: 2rem 1.35rem; }
  .auth-footer { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
