:root {
    color-scheme: dark;
    --auth-night: #07100c;
    --auth-ink: #0c1711;
    --auth-panel: rgba(17, 29, 22, .94);
    --auth-panel-strong: #14241b;
    --auth-line: rgba(185, 216, 197, .16);
    --auth-text: #edf5ef;
    --auth-muted: #9bad9f;
    --auth-moss: #8fb55f;
    --auth-moss-bright: #b6dc83;
    --auth-copper: #c77d3f;
    --auth-danger: #ef8a8a;
    --auth-display: 'Bungee', 'Oswald', Impact, sans-serif;
    --auth-body: 'Oswald', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
.auth-body {
    margin: 0; min-height: 100vh; overflow-x: hidden; color: var(--auth-text); font-family: var(--auth-body);
    background:
        radial-gradient(circle at 12% 84%, rgba(93, 137, 77, .19), transparent 34rem),
        radial-gradient(circle at 90% 6%, rgba(78, 118, 99, .16), transparent 32rem),
        linear-gradient(145deg, #050a07, var(--auth-night) 46%, #0b1710);
}
.auth-body::after {
    content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .055;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.86' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.auth-atmosphere { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.auth-atmosphere i { position: absolute; bottom: -18vh; width: 10vw; height: 90vh; transform-origin: bottom; filter: blur(12px); opacity: .12; background: linear-gradient(to top, var(--auth-moss), transparent 72%); }
.auth-atmosphere i:nth-child(1) { left: 8%; transform: rotate(-24deg); }
.auth-atmosphere i:nth-child(2) { left: 50%; transform: translateX(-50%) rotate(4deg); opacity: .07; }
.auth-atmosphere i:nth-child(3) { right: 7%; transform: rotate(25deg); background: linear-gradient(to top, var(--auth-copper), transparent 72%); }
.auth-stage {
    position: relative; z-index: 1; width: min(1020px, calc(100% - 2rem)); min-height: calc(100vh - 80px);
    margin: 0 auto; display: grid; grid-template-columns: minmax(280px, .88fr) minmax(390px, 1.12fr); align-items: center; gap: clamp(2rem, 7vw, 6.5rem); padding: 3rem 0;
}
.auth-brand-panel { align-self: center; }
.auth-logo { width: 116px; height: 116px; object-fit: contain; filter: drop-shadow(0 14px 30px rgba(0,0,0,.42)); }
.auth-eyebrow, .auth-step { margin: 1.25rem 0 .45rem; color: var(--auth-moss-bright); text-transform: uppercase; letter-spacing: .16em; font-size: .72rem; font-weight: 700; }
.auth-brand-panel h1 { margin: 0; font: 400 clamp(2.8rem, 6vw, 5.5rem)/.92 var(--auth-display); letter-spacing: -.055em; color: var(--auth-text); text-transform: uppercase; }
.auth-brand-panel h1 span { color: var(--auth-moss); }
.auth-brand-copy { max-width: 25rem; color: var(--auth-muted); font-size: 1.05rem; letter-spacing: .02em; }
.auth-signal { display: flex; align-items: end; gap: 5px; height: 25px; margin-top: 1.5rem; }
.auth-signal span { width: 4px; border-radius: 2px; background: var(--auth-moss); opacity: .65; animation: signal 1.7s ease-in-out infinite alternate; }
.auth-signal span:nth-child(1), .auth-signal span:nth-child(5) { height: 30%; }
.auth-signal span:nth-child(2), .auth-signal span:nth-child(4) { height: 62%; animation-delay: -.4s; }
.auth-signal span:nth-child(3) { height: 100%; animation-delay: -.8s; }
.auth-card {
    position: relative; overflow: hidden; padding: clamp(1.6rem, 4vw, 3rem); border: 1px solid var(--auth-line); border-radius: 18px;
    background: linear-gradient(155deg, rgba(28, 45, 34, .96), var(--auth-panel) 58%); box-shadow: 0 35px 90px rgba(0,0,0,.48), inset 0 1px rgba(210, 235, 218, .08); backdrop-filter: blur(20px);
}
.auth-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, transparent, var(--auth-moss), var(--auth-copper), transparent); opacity: .82; }
.auth-card-head { margin-bottom: 1.65rem; }
.auth-card-head .auth-step { margin-top: 0; }
.auth-card-head h2 { margin: 0; font-size: clamp(1.9rem, 5vw, 2.7rem); line-height: 1; letter-spacing: -.035em; }
.auth-card-head p:last-child { margin: .75rem 0 0; color: var(--auth-muted); line-height: 1.55; font-family: system-ui, sans-serif; font-size: .93rem; }
.auth-form { display: grid; gap: .55rem; }
.auth-form label { margin-top: .55rem; color: #cbd8ce; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.auth-form input {
    width: 100%; min-height: 48px; padding: .75rem .9rem; border: 1px solid var(--auth-line); border-radius: 9px;
    background: rgba(5, 13, 8, .72); color: var(--auth-text); font: 500 1rem system-ui, sans-serif; outline: none; transition: border-color .18s, box-shadow .18s, transform .18s;
}
.auth-form input:focus { border-color: var(--auth-moss); box-shadow: 0 0 0 3px rgba(143,181,95,.14); transform: translateY(-1px); }
.auth-form .auth-code { text-align: center; font: 700 1.55rem/1 var(--auth-body); letter-spacing: .35em; }
.auth-primary, .auth-secondary, .auth-danger {
    width: 100%; min-height: 48px; margin-top: 1rem; padding: .78rem 1rem; border: 0; border-radius: 9px; cursor: pointer;
    font: 700 .92rem var(--auth-body); letter-spacing: .04em; text-decoration: none; text-align: center;
}
.auth-primary { display: flex; justify-content: space-between; align-items: center; color: #10180d; background: linear-gradient(100deg, var(--auth-moss-bright), var(--auth-moss)); box-shadow: 0 10px 28px rgba(107, 143, 70, .22); }
.auth-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.auth-secondary { color: var(--auth-text); background: rgba(255,255,255,.07); border: 1px solid var(--auth-line); }
.auth-danger { color: var(--auth-danger); background: rgba(181,69,69,.09); border: 1px solid rgba(239,138,138,.25); }
.auth-link-button { margin-top: 1.25rem; }
.auth-card-foot { display: flex; justify-content: center; margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--auth-line); }
.auth-card-foot.split { justify-content: space-between; }
.auth-card-foot a, .link-button { color: var(--auth-moss-bright); background: none; border: 0; padding: 0; font: 500 .88rem var(--auth-body); text-decoration: none; cursor: pointer; }
.auth-card-foot form, .auth-inline-form { margin: 0; }
.auth-error:empty, .auth-field-error:empty { display: none; }
.auth-error { padding: .75rem .9rem; border: 1px solid rgba(239,138,138,.32); border-radius: 8px; background: rgba(181,69,69,.1); color: #ffb3b3; font-family: system-ui, sans-serif; font-size: .83rem; }
.auth-error ul { margin: 0; padding-left: 1.2rem; }
.auth-field-error { color: var(--auth-danger); font-family: system-ui, sans-serif; font-size: .75rem; }
.auth-success { padding: 1rem; border: 1px solid rgba(143,181,95,.34); border-radius: 9px; background: rgba(143,181,95,.1); font-family: system-ui, sans-serif; }
.auth-success p { margin: .35rem 0 0; color: var(--auth-muted); }
.mfa-setup { display: grid; grid-template-columns: 160px 1fr; gap: 1.25rem; align-items: center; margin-bottom: 1.2rem; }
.qr-frame { padding: 10px; border-radius: 10px; background: #f5f7f4; }
.qr-frame img { display: block; width: 100%; }
.auth-hint { margin: 0 0 .5rem; color: var(--auth-muted); font: .8rem system-ui, sans-serif; }
.setup-key { display: block; color: var(--auth-moss-bright); overflow-wrap: anywhere; line-height: 1.7; }
.recovery-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: 1rem; }
.recovery-grid code { padding: .55rem; border-radius: 6px; background: rgba(0,0,0,.26); color: var(--auth-moss-bright); text-align: center; }
.account-status { display: grid; grid-template-columns: 1fr auto; gap: .85rem 1rem; padding: 1rem 0; border-block: 1px solid var(--auth-line); }
.account-status span { color: var(--auth-muted); }.account-status strong { text-align: right; }.account-status .is-on { color: var(--auth-moss-bright); }.account-status .is-off { color: var(--auth-danger); }
.auth-footer { position: relative; z-index: 1; display: flex; justify-content: space-between; width: min(1020px, calc(100% - 2rem)); margin: -1rem auto 0; padding-bottom: 1.2rem; color: #607066; font-size: .68rem; text-transform: uppercase; letter-spacing: .11em; }
@keyframes signal { to { height: 18%; opacity: .3; } }
@media (max-width: 760px) {
    .auth-stage { grid-template-columns: 1fr; gap: 1.5rem; align-content: center; padding: 1.5rem 0 2.5rem; }
    .auth-brand-panel { display: grid; grid-template-columns: 70px 1fr; column-gap: 1rem; align-items: center; }
    .auth-logo { width: 70px; height: 70px; grid-row: 1 / 4; }
    .auth-eyebrow { margin: 0 0 .2rem; }.auth-brand-panel h1 { font-size: 2.45rem; }.auth-brand-copy, .auth-signal { display: none; }
    .auth-card { padding: 1.5rem; }.auth-footer { display: none; }.mfa-setup { grid-template-columns: 120px 1fr; }
}
@media (max-width: 430px) { .mfa-setup { grid-template-columns: 1fr; }.qr-frame { width: 170px; margin: 0 auto; }.recovery-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
