:root {
  --navy: #102b45;
  --navy-deep: #071c2e;
  --gold: #eab35a;
  --ink: #162c40;
  --muted: #6c7b89;
  --line: #dfe5e9;
  --surface: #fbfcfc;
  --error: #b44c42;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--surface); }
body { margin: 0; color: var(--ink); font-family: "DM Sans", sans-serif; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
a { color: inherit; }

.login-page { min-height: 100svh; display: grid; grid-template-columns: minmax(420px, 1.08fr) minmax(460px, .92fr); background: var(--surface); }
.brand-panel { position: relative; min-height: 100svh; overflow: hidden; isolation: isolate; background: var(--navy); background-image: url("assets/qori-hero.png"); background-position: center; background-size: cover; }
.brand-panel::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(145deg, rgba(7,28,46,.8) 0%, rgba(7,28,46,.22) 48%, rgba(7,28,46,.72) 100%); }
.brand-overlay { position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(7,28,46,.62), transparent 38%); }
.brand-content { min-height: 100%; padding: clamp(32px, 5vw, 72px) clamp(30px, 6vw, 96px) clamp(28px, 4vw, 54px); display: flex; flex-direction: column; justify-content: space-between; }
.brand-message { color: #fff; max-width: 480px; margin: auto 0; padding: 7vh 0; }
.eyebrow, .welcome-kicker { margin: 0 0 20px; color: var(--gold); letter-spacing: .17em; font-size: 11px; font-weight: 700; }
.brand-message h2 { margin: 0; font: 700 clamp(34px, 4vw, 58px)/1.06 Manrope, sans-serif; letter-spacing: -.04em; }
.brand-message h2 em { color: var(--gold); font-style: normal; }
.brand-caption { max-width: 300px; margin: 25px 0 0; color: rgba(255,255,255,.78); font-size: 15px; line-height: 1.6; }
.brand-footer { margin: 0; color: rgba(255,255,255,.58); font-size: 12px; }

.form-panel { display: grid; place-items: center; padding: 54px clamp(32px, 7vw, 110px); }
.form-container { width: min(100%, 430px); }
.form-logo { display: block; width: min(100%, 290px); height: auto; margin: 0 auto 42px; object-fit: contain; }
.welcome { margin-bottom: 42px; }
.welcome-kicker { margin-bottom: 13px; color: var(--navy); letter-spacing: .1em; }
.welcome h1 { margin: 0 0 12px; color: var(--navy); font: 700 clamp(31px, 3vw, 40px)/1.15 Manrope, sans-serif; letter-spacing: -.035em; }
.welcome p:last-child { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.field-group { margin-bottom: 23px; }
.field-group label { display: block; margin-bottom: 9px; color: #304454; font-size: 13px; font-weight: 600; }
.input-wrap { position: relative; }
.input-wrap input { width: 100%; height: 54px; border: 1px solid var(--line); border-radius: 8px; padding: 0 47px; color: var(--ink); background: #fff; outline: none; transition: border .2s, box-shadow .2s; }
.input-wrap input::placeholder { color: #9ba7b0; }
.input-wrap input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(234,179,90,.16); }
.input-wrap.has-error input { border-color: var(--error); }
.input-icon { position: absolute; top: 17px; left: 16px; width: 20px; height: 20px; fill: none; stroke: #83909a; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; pointer-events: none; }
.password-toggle { position: absolute; top: 9px; right: 10px; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 6px; color: #85929b; background: transparent; cursor: pointer; }
.password-toggle:hover, .password-toggle:focus-visible { color: var(--navy); background: #f2f5f6; outline: none; }
.password-toggle svg { width: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; }
.field-error { min-height: 17px; margin: 5px 0 0; color: var(--error); font-size: 12px; }
.form-options { display: flex; align-items: center; justify-content: space-between; margin: -2px 0 28px; font-size: 13px; }
.checkbox-label { display: inline-flex; align-items: center; gap: 9px; color: #62717e; cursor: pointer; user-select: none; }
.checkbox-label input { position: absolute; opacity: 0; }
.checkbox-custom { width: 17px; height: 17px; border: 1px solid #c5d0d7; border-radius: 4px; background: #fff; }
.checkbox-label input:checked + .checkbox-custom { border-color: var(--navy); background: var(--navy); box-shadow: inset 0 0 0 3px #fff; }
.forgot-link { color: var(--navy); font-weight: 600; text-decoration: none; }
.forgot-link:hover, .support-note a:hover { text-decoration: underline; }
.submit-button { display: flex; align-items: center; justify-content: center; gap: 13px; width: 100%; height: 56px; border: 0; border-radius: 8px; color: #fff; background: var(--navy); font-weight: 700; cursor: pointer; transition: background .2s, transform .2s, box-shadow .2s; }
.submit-button:hover { background: var(--navy-deep); box-shadow: 0 8px 20px rgba(16,43,69,.18); transform: translateY(-1px); }
.submit-button:focus-visible { outline: 3px solid rgba(234,179,90,.55); outline-offset: 3px; }
.submit-button.is-loading { opacity: .76; pointer-events: none; }
.button-arrow { color: var(--gold); font-size: 22px; line-height: 0; }
.form-status { min-height: 20px; margin: 14px 0 0; color: var(--muted); text-align: center; font-size: 13px; }
.form-status.success { color: #337458; }
.support-note { margin: 42px 0 0; color: #86929a; text-align: center; font-size: 13px; }
.support-note a { color: var(--navy); font-weight: 600; text-decoration: none; }
.demo-note { margin: 13px 0 0; color: #9aa5ab; text-align: center; font-size: 11px; }
.demo-note code { padding: 2px 5px; border-radius: 4px; color: var(--navy); background: #eef2f3; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }

@media (max-width: 820px) {
  .login-page { display: block; }
  .brand-panel { min-height: 295px; height: 37svh; }
  .brand-content { padding: 27px 28px; }
  .brand-message { margin: auto 0 0; padding: 0; }
  .brand-message h2 { font-size: clamp(29px, 7vw, 42px); }
  .brand-caption, .brand-footer { display: none; }
  .eyebrow { margin-bottom: 12px; font-size: 10px; }
  .form-panel { display: block; padding: 42px 28px 36px; }
  .form-container { max-width: 490px; margin: 0 auto; }
}
@media (max-width: 480px) {
  .brand-panel { min-height: 238px; height: 31svh; }
  .brand-message h2 br { display: none; }
  .form-panel { padding: 34px 21px 30px; }
  .form-logo { width: min(100%, 250px); margin-bottom: 31px; }
  .welcome { margin-bottom: 32px; }
  .welcome h1 { font-size: 31px; }
  .form-options { align-items: flex-start; gap: 15px; }
  .forgot-link { text-align: right; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }
