:root {
  color-scheme: light;
  --white: #ffffff;
  --cyan: #00a7e1;
  --ink: #00171f;
  --navy: #003459;
  --blue: #007ea7;
  --pale: #eaf8fd;
  --line: #c8e4ef;
  --muted: #426674;
  --display: "Archivo", sans-serif;
  --body: "Public Sans", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-height: 100%; scrollbar-color: var(--blue) var(--pale); }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--pale); color: var(--ink); font: 400 16px/1.6 var(--body); }
::selection { background: var(--cyan); color: var(--ink); }
a { color: var(--navy); text-underline-offset: .2em; }
img { display: block; max-width: 100%; height: auto; }
svg { width: 24px; height: 24px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.skip-link { position: absolute; z-index: 10; top: -100px; left: 1rem; padding: .8rem 1rem; background: var(--white); font-weight: 700; }
.skip-link:focus { top: 1rem; }

.login-header, .l-split { width: min(calc(100% - 48px), 1240px); margin-inline: auto; }
.login-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 24px; }
.brand { display: block; width: 212px; }
.public-link { display: inline-flex; align-items: center; gap: .5rem; min-height: 48px; font-size: .9rem; font-weight: 700; text-decoration: none; }
.public-link:hover { color: var(--blue); text-decoration: underline; }

.l-split { flex: 1; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; padding-block: 16px 40px; }
.l-split > * { min-width: 0; }
.l-left { position: relative; isolation: isolate; overflow: hidden; align-self: stretch; display: flex; flex-direction: column; justify-content: center; padding: clamp(2rem, 4vw, 3.5rem); border-radius: 16px 100px 16px 16px; background: var(--navy); color: var(--white); }
.l-left::after { content: ""; position: absolute; z-index: -1; inset: auto -70px -130px auto; width: 300px; height: 230px; border-radius: 60% 50% 0 0; background: var(--blue); transform: rotate(-22deg); }
.hero-title { max-width: 13ch; margin: 0; font: 700 clamp(2.25rem, 4vw, 3.5rem)/1.08 var(--display); letter-spacing: -.035em; text-wrap: balance; }
.hero-desc { margin: 1.4rem 0 2rem; max-width: 46ch; color: #c8e4ef; font-size: 1rem; }
.feature-list { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }
.feature-list li { display: flex; align-items: flex-start; gap: 1rem; }
.feature-list svg { margin-top: .25rem; color: #65d2f7; }
.feature-list strong { display: block; font: 600 1rem/1.5 var(--display); }
.feature-list span { display: block; color: #c8e4ef; font-size: .88rem; }
.panel-brand { margin-top: 2.5rem; }

.l-right { width: 100%; }
.form-card { width: 100%; padding: clamp(1.5rem, 3.5vw, 3rem); border-radius: 16px; background: var(--white); border: 1px solid var(--line); }
.form-card h2 { margin: 0; font: 700 clamp(1.75rem, 2.5vw, 2.25rem)/1.15 var(--display); letter-spacing: -.03em; text-wrap: balance; }
.form-subtitle { margin: 1rem 0 2rem; color: var(--muted); font-size: .95rem; }
.field { min-width: 0; margin-bottom: 1.25rem; }
.field label { display: block; margin-bottom: .45rem; font-size: .9rem; font-weight: 700; }
.input-wrap { position: relative; min-width: 0; }
.input-wrap svg { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--blue); pointer-events: none; }
.input-wrap input { width: 100%; min-width: 0; min-height: 56px; padding: .85rem 1rem .85rem 2.9rem; border: 1px solid #7da8ba; border-radius: 8px; background: var(--white); color: var(--ink); font: inherit; caret-color: var(--blue); }
.input-wrap input::placeholder { opacity: 1; color: #526c79; }
.input-wrap input:hover { border-color: var(--blue); }
.input-wrap input:focus { border-color: var(--blue); outline: 3px solid var(--blue); outline-offset: 2px; }
.input-wrap input[aria-invalid="true"] { border-color: #a02222; }
.input-wrap--password input { padding-right: 3.5rem; }
.password-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--blue); cursor: pointer; }
.password-toggle svg { position: static; transform: none; width: 22px; height: 22px; color: inherit; }
.password-toggle[hidden], .password-toggle svg[hidden] { display: none; }
.password-toggle:hover { background: var(--pale); color: var(--navy); }
.password-toggle:focus-visible { outline-offset: -3px; }
.input-wrap--password input::-ms-reveal { display: none; }
.btn-submit { width: 100%; min-height: 56px; margin-top: .5rem; padding: .85rem 1rem; border: 0; border-radius: 8px; background: var(--navy); color: var(--white); font: 700 1rem/1.4 var(--body); cursor: pointer; }
.btn-submit:hover { background: var(--blue); }
.btn-submit:active { background: var(--ink); }
.btn-submit:disabled { opacity: .65; cursor: wait; }
.alert-err { margin-bottom: 1.5rem; padding: .8rem 1rem; border-radius: 8px; background: #fff0f0; color: #8c1d1d; font-size: .9rem; }
.tip-box { display: flex; align-items: flex-start; gap: .7rem; margin: 1.5rem 0 0; padding-block: 1.25rem 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.tip-box svg { color: var(--blue); width: 20px; height: 20px; margin-top: .15rem; }
.tip-box strong { color: var(--navy); }
.no-recovery { margin: 1rem 0 0; color: var(--muted); font-size: .8rem; }
.back-link { display: inline-flex; align-items: center; min-height: 48px; margin-top: .7rem; font-size: .9rem; font-weight: 700; }
.back-link:hover { color: var(--blue); }
.login-footer { background: var(--ink); color: #b9d6df; }
.login-footer-inner { width: min(calc(100% - 48px), 1240px); margin-inline: auto; display: flex; flex-direction: column; align-items: center; gap: 1rem; padding-block: 40px 28px; text-align: center; }
.login-footer-brand { display: block; width: 150px; }
.login-footer-brand img { width: 100%; height: auto; }
.login-footer p { margin: 0; font-size: .9rem; }
.login-footer a { color: inherit; }
.login-footer a:hover { color: var(--white); }
.login-footer :focus-visible { outline-color: var(--cyan); }
.login-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.5rem; }
.login-footer-links a { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; font-size: .85rem; }
.login-footer-links svg { width: 20px; height: 20px; }
.login-footer small { width: 100%; margin-top: .3rem; padding-top: 20px; border-top: 1px solid #264a59; font-size: .75rem; }

@media (max-width: 1023px) {
  .l-split { gap: 24px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .l-left { padding: 32px; border-top-right-radius: 64px; }
  .hero-title { font-size: clamp(2rem, 4.2vw, 2.7rem); }
  .form-card { padding: 28px; }
}
@media (max-width: 767px) {
  .login-header, .l-split { width: calc(100% - 32px); }
  .login-header { padding-block: 16px; gap: .5rem; }
  .brand { width: 156px; }
  .public-link { gap: .3rem; font-size: .8rem; }
  .public-link svg { width: 18px; height: 18px; }
  .l-split { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-block: 8px 32px; align-items: start; }
  .l-right { grid-row: 1; }
  .form-card { padding: 24px; }
  .form-card h2 { font-size: 1.8rem; }
  .form-subtitle { margin-bottom: 1.5rem; }
  .l-left { padding: 32px; border-top-right-radius: 64px; }
  .hero-title { max-width: 17ch; font-size: 2rem; }
  .hero-desc { margin-bottom: 1.5rem; }
  .panel-brand { margin-top: 2rem; }
  .login-footer-inner { width: calc(100% - 32px); padding-top: 32px; }
  .login-footer-brand { width: 138px; }
}
@media (max-width: 359px) {
  .form-card { padding: 20px; }
  .l-left { padding: 24px; }
  .hero-title { font-size: 1.85rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
