:root {
 color-scheme: light;
 --ink: #102f54;
 --muted: #395976;
 --focus: #075bb7;
 --edge: #88b8e0;
 --shine: #ffffffec;
 --blue-lip: #0a3584;
 font: 16px/1.5 system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
 margin: 0;
 min-height: 100vh;
 min-height: 100dvh;
 color: var(--ink);
 background:
  radial-gradient(ellipse at 49% 36%, #fbfeff 0%, #ddf8ff 29%, transparent 65%),
  radial-gradient(ellipse at 82% 10%, #9fdef9, transparent 51%),
  linear-gradient(145deg, #edf8ff, #b8daf6 62%, #d5effc);
}

.auth-shell {
 min-height: inherit;
 display: grid;
 align-content: center;
 justify-items: center;
 gap: 14px;
 padding: clamp(18px, 4vh, 40px) 18px clamp(32px, 6vh, 62px);
 overflow: clip;
}

.auth-brand { position: relative; z-index: 1; }
.auth-brand img {
 display: block;
 width: clamp(112px, 15vh, 150px);
 height: auto;
 filter: drop-shadow(0 5px 8px #2263a13b);
}

.auth-portal {
 position: relative;
 isolation: isolate;
 width: min(100%, 440px);
}

.portal-art {
 position: absolute;
 inset: 0;
 z-index: -1;
 pointer-events: none;
}

.portal-pane {
 position: absolute;
 top: 50%;
 left: 50%;
 width: clamp(325px, 66vw, 690px);
 height: clamp(220px, 77%, 375px);
 border: 1px solid #85b6dfb3;
 border-radius: clamp(30px, 5vw, 53px);
 background: linear-gradient(142deg, #fcffffcc, #d3f5ff62 57%, #a7d9f572);
 box-shadow: inset 0 2px 0 #ffffffec, 0 12px 0 -5px #8fbfe57f, 0 25px 43px -13px #2e6eb951;
}

.pane-left { transform: translate(-65%, -53%) rotate(-13deg); }
.pane-right { transform: translate(-35%, -47%) rotate(13deg); }
.pane-center { transform: translate(-50%, -50%); }

.portal-art::after {
 content: "";
 position: absolute;
 top: 50%;
 left: 50%;
 width: clamp(310px, 62vw, 665px);
 aspect-ratio: 1;
 transform: translate(-50%, -50%);
 background: center / contain no-repeat url("/assets/qintorava-financials-logo.png");
 opacity: .13;
 filter: saturate(.75) brightness(1.12);
}

.auth-card {
 min-width: 0;
 padding: clamp(22px, 4.5vw, 34px);
 border: 1px solid var(--edge);
 border-radius: 27px;
 background: linear-gradient(151deg, #ffffffed, #f2fbffdd 54%, #ddf3fbd6);
 backdrop-filter: blur(12px);
 box-shadow:
  inset 0 2px var(--shine),
  inset 0 0 0 4px #ffffff4d,
  0 8px 0 -1px #8db8df,
  0 27px 45px -16px #2564a75e;
}

.auth-card h1 {
 margin: 7px 0 9px;
 font-size: clamp(27px, 5vw, 37px);
 letter-spacing: -.045em;
 line-height: 1.14;
}

.auth-card p { overflow-wrap: anywhere; }
.eyebrow {
 margin: 0;
 color: #15558e;
 font-size: .75rem;
 font-weight: 700;
 letter-spacing: .08em;
}

#auth-description { margin: 0 0 17px; color: var(--muted); font-size: .9375rem; }
#auth-error { color: #97172d; font-weight: 650; }
#auth-error:empty { display: none; }

.auth-card label {
 display: block;
 margin: 12px 0 5px;
 font-size: .875rem;
 font-weight: 650;
}

.auth-card input:not([type="checkbox"]) {
 width: 100%;
 min-width: 0;
 min-height: 47px;
 padding: 9px 12px;
 border: 1px solid #81a7cc;
 border-radius: 10px;
 background: #f8fcffec;
 box-shadow: inset 0 2px 5px #5279ac1a;
 color: var(--ink);
 font: inherit;
}

.auth-card :is(input, button, summary):focus-visible {
 outline: 3px solid var(--focus);
 outline-offset: 3px;
}

.auth-card button {
 width: 100%;
 min-height: 46px;
 margin-top: 17px;
 padding: 10px 14px;
 border: 1px solid #1656a6;
 border-radius: 11px;
 background: linear-gradient(160deg, #1779cb, #1055b7 54%, #0b3c96);
 box-shadow: inset 0 1px #cbf2ffac, 0 6px var(--blue-lip), 0 12px 17px -5px #124b9a77;
 color: white;
 font: 650 1rem/1.35 system-ui, sans-serif;
 cursor: pointer;
 overflow-wrap: anywhere;
}

.auth-card button:not(:disabled):not(.text-button):active {
 transform: translateY(3px);
 box-shadow: inset 0 1px #cbf2ffac, 0 2px var(--blue-lip);
}

.auth-card button:disabled { opacity: .62; cursor: default; }
.auth-card .secondary {
 margin-top: 14px;
 border-color: #81add5;
 background: linear-gradient(160deg, #fff, #dceffc);
 box-shadow: inset 0 1px white, 0 4px #95bfe1;
 color: #164c82;
}

.auth-card .secondary:not(:disabled):active { box-shadow: inset 0 1px white, 0 2px #95bfe1; }
.auth-card .text-button {
 margin-top: 4px;
 border-color: transparent;
 background: transparent;
 box-shadow: none;
 color: #23537c;
 font-size: .875rem;
 text-decoration: underline;
 text-underline-offset: 3px;
}

.auth-card footer {
 margin-top: 24px;
 padding-top: 13px;
 border-top: 1px solid #b6d4e8;
 color: var(--muted);
 font-size: .8125rem;
}

.environment-note {
 padding: 10px 12px;
 border: 1px solid #76b0d1;
 border-radius: 10px;
 background: #e4f6ff;
 color: #123e60;
 font-size: .875rem;
 font-weight: 650;
}

#enrollment > img {
 display: block;
 max-width: 100%;
 height: auto;
 margin: 16px auto;
 background: white;
}

.auth-card summary { cursor: pointer; font-weight: 650; }
#mfa-secret, #recovery-codes {
 display: block;
 padding: 11px;
 border: 1px solid #b6d4e8;
 border-radius: 8px;
 background: #edf8ff;
 font-size: .9375rem;
 white-space: pre-wrap;
 overflow-wrap: anywhere;
}

.auth-card .check-label {
 display: flex;
 align-items: flex-start;
 gap: 10px;
 min-height: 44px;
 margin-top: 18px;
 padding-block: 8px;
}

.check-label input {
 flex: none;
 width: 20px;
 height: 20px;
 margin: 0;
 accent-color: var(--focus);
}

@media (max-width: 480px) {
 .auth-shell { gap: 10px; padding-inline: 15px; }
 .auth-card { border-radius: 22px; }
 .portal-art::after { top: 34%; transform: translate(-50%, -68%); }
}

@media (prefers-reduced-motion: no-preference) {
 .auth-card button { transition: transform .15s ease, box-shadow .15s ease; }
}
