:root {
    --auth-ink: #172033;
    --auth-muted: #697386;
    --auth-line: #dfe4eb;
    --auth-soft: #f5f7fa;
    --auth-red: #b42318;
    --auth-red-dark: #8c1c14;
    --auth-green: #087a55;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #fff; }
body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: var(--auth-ink);
    background: #fff;
    font: 15px/1.5 "DM Sans", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.auth-shell { display: grid; grid-template-columns: minmax(440px, 1.08fr) minmax(520px, .92fr); min-height: 100vh; }
.auth-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 42px clamp(42px, 5vw, 78px) 36px;
    overflow: hidden;
    isolation: isolate;
    color: #fff;
    background:
        radial-gradient(circle at 77% 19%, rgba(255,255,255,.13) 0 1px, transparent 2px) 0 0 / 27px 27px,
        radial-gradient(circle at 9% 91%, rgba(242,180,124,.3), transparent 27%),
        linear-gradient(145deg, #54120e 0%, #8e2118 48%, #ba3828 100%);
}
.auth-stage::before {
    content: "";
    position: absolute;
    z-index: -1;
    width: min(44vw, 620px);
    aspect-ratio: 1;
    right: -25%;
    top: -12%;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 50%;
    box-shadow: 0 0 0 80px rgba(255,255,255,.035), 0 0 0 160px rgba(255,255,255,.025);
}
.auth-stage::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: auto -8% -14% 18%;
    height: 42%;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 50% 50% 0 0;
    transform: rotate(-8deg);
    background: linear-gradient(150deg, rgba(255,255,255,.07), transparent 55%);
}

.auth-brand { display: inline-flex; width: max-content; align-items: center; gap: 11px; text-decoration: none; }
.auth-brand-mark {
    display: grid;
    width: 41px;
    height: 41px;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(145deg, #e45745, #80170f);
    box-shadow: 0 9px 20px rgba(67, 6, 2, .25);
    font-size: 21px;
    font-weight: 900;
}
.auth-brand strong, .auth-brand small { display: block; }
.auth-brand strong { font-size: 18px; line-height: 1.1; letter-spacing: .12em; }
.auth-brand small { margin-top: 3px; font-size: 8px; font-weight: 700; letter-spacing: .17em; opacity: .66; }
.auth-brand--light { color: #fff; }
.auth-brand--light .auth-brand-mark { border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.12); backdrop-filter: blur(8px); }
.auth-brand--dark { display: none; color: var(--auth-ink); }

.auth-stage-content { width: min(590px, 92%); margin: auto 0; padding: 66px 0 160px; }
.auth-kicker, .auth-section-label { text-transform: uppercase; font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.auth-kicker { display: flex; align-items: center; gap: 9px; color: rgba(255,255,255,.78); }
.auth-kicker i { width: 28px; height: 1px; background: #f7b79c; }
.auth-stage h1 { margin: 21px 0 20px; font-size: clamp(42px, 5vw, 69px); line-height: 1.01; letter-spacing: -.055em; }
.auth-stage h1 em { color: #fac4ac; font-style: normal; font-weight: 500; }
.auth-stage-content > p { width: min(500px, 90%); margin: 0; color: rgba(255,255,255,.72); font-size: 17px; line-height: 1.7; }
.auth-proof { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin-top: 38px; }
.auth-proof article { display: flex; align-items: center; gap: 12px; }
.auth-proof-icon { display: grid; flex: 0 0 38px; width: 38px; height: 38px; place-items: center; border: 1px solid rgba(255,255,255,.18); border-radius: 11px; background: rgba(255,255,255,.08); }
.auth-proof svg { width: 19px; fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.auth-proof strong, .auth-proof small { display: block; }
.auth-proof strong { font-size: 12px; }
.auth-proof small { margin-top: 2px; color: rgba(255,255,255,.55); font-size: 9px; }

.auth-market-card {
    position: absolute;
    right: clamp(28px, 4vw, 64px);
    bottom: 67px;
    display: grid;
    grid-template-columns: 1.25fr .9fr 1fr;
    width: min(530px, 71%);
    align-items: center;
    gap: 22px;
    padding: 17px 19px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 18px;
    background: rgba(88, 15, 10, .48);
    box-shadow: 0 22px 70px rgba(50, 5, 2, .3);
    backdrop-filter: blur(16px);
}
.auth-market-card > div:first-child { display: flex; align-items: center; gap: 10px; }
.market-symbol { display: grid; width: 41px; height: 41px; flex: 0 0 41px; place-items: center; border-radius: 11px; color: #8e2118; background: #fff; font-weight: 900; }
.auth-market-card small, .auth-market-card strong { display: block; }
.auth-market-card small { color: rgba(255,255,255,.56); font-size: 8px; text-transform: uppercase; letter-spacing: .08em; }
.auth-market-card strong { margin-top: 2px; font-size: 11px; }
.market-chart { display: flex; height: 34px; align-items: end; gap: 4px; }
.market-chart i { width: 8px; border-radius: 3px 3px 1px 1px; background: rgba(255,255,255,.4); }
.market-chart i:nth-child(1) { height: 32%; }.market-chart i:nth-child(2) { height: 48%; }.market-chart i:nth-child(3) { height: 41%; }.market-chart i:nth-child(4) { height: 66%; }.market-chart i:nth-child(5) { height: 58%; }.market-chart i:nth-child(6) { height: 79%; }.market-chart i:nth-child(7) { height: 100%; background: #fac4ac; }
.market-price strong { font-size: 15px; }.market-price strong b { font-size: 8px; }.market-price > span { display: inline-block; margin-top: 3px; color: #b8f3d3; font-size: 8px; font-weight: 700; }
.auth-stage-foot { position: absolute; left: clamp(42px, 5vw, 78px); bottom: 29px; margin: 0; color: rgba(255,255,255,.42); font-size: 9px; letter-spacing: .04em; }
.auth-stage-foot span { display: inline-block; width: 3px; height: 3px; margin: 0 8px 2px; border-radius: 50%; background: currentColor; }

.auth-panel { position: relative; display: flex; min-height: 100vh; flex-direction: column; padding: 34px clamp(38px, 5vw, 80px) 25px; background: #fff; }
.auth-panel-inner { width: min(438px, 100%); margin: auto; padding: 36px 0; }
.auth-heading { margin-bottom: 29px; }
.auth-section-label { color: var(--auth-red); }
.auth-heading h2, .auth-success-state h2 { margin: 7px 0 8px; font-size: clamp(31px, 3vw, 40px); line-height: 1.15; letter-spacing: -.045em; }
.auth-heading p, .auth-success-state > p { margin: 0; color: var(--auth-muted); font-size: 14px; line-height: 1.65; }
.auth-heading--compact { margin-bottom: 22px; }

.auth-alert { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 19px; padding: 12px 14px; border: 1px solid; border-radius: 12px; font-size: 12px; }
.auth-alert > span { display: grid; flex: 0 0 21px; width: 21px; height: 21px; place-items: center; border-radius: 50%; font-size: 11px; font-weight: 900; }
.auth-alert p { margin: 0 0 3px; }.auth-alert p:last-child { margin-bottom: 0; }
.auth-alert--error { color: #912018; border-color: #fecdca; background: #fff5f4; }.auth-alert--error > span { color: #fff; background: #d92d20; }
.auth-alert--success { color: #05603f; border-color: #abefc6; background: #f0fdf5; }.auth-alert--success > span { color: #fff; background: #12b76a; }

.auth-form { display: grid; gap: 18px; }
.auth-form--register { gap: 14px; }
.auth-field { display: grid; gap: 7px; color: #344054; font-size: 11px; font-weight: 750; }
.auth-input-wrap { position: relative; display: block; }
.auth-input-wrap > svg { position: absolute; z-index: 1; left: 15px; top: 50%; width: 18px; transform: translateY(-50%); fill: none; stroke: #98a2b3; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.auth-input-wrap input {
    width: 100%;
    height: 52px;
    padding: 0 46px 0 45px;
    border: 1px solid var(--auth-line);
    border-radius: 12px;
    outline: 0;
    color: var(--auth-ink);
    background: #fff;
    box-shadow: 0 1px 2px rgba(16,24,40,.025);
    font-size: 14px;
    transition: border-color .18s, box-shadow .18s, background .18s;
}
.auth-input-wrap input::placeholder { color: #a8afb9; }
.auth-input-wrap input:hover { border-color: #b8c0cc; }
.auth-input-wrap input:focus { border-color: #c23e32; box-shadow: 0 0 0 4px rgba(180,35,24,.09); }
.password-toggle { position: absolute; right: 8px; top: 50%; display: grid; width: 36px; height: 36px; padding: 0; transform: translateY(-50%); place-items: center; border: 0; border-radius: 9px; color: #667085; background: transparent; cursor: pointer; }
.password-toggle:hover { background: var(--auth-soft); }.password-toggle svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.password-toggle.is-visible::after { content: ""; position: absolute; width: 21px; height: 1px; transform: rotate(-45deg); background: currentColor; }

.auth-form-options { display: flex; min-height: 22px; align-items: center; justify-content: space-between; gap: 15px; margin-top: -2px; color: #475467; font-size: 11px; }
.auth-form-options a, .auth-switch a { color: var(--auth-red); font-weight: 800; text-decoration: none; }.auth-form-options a:hover, .auth-switch a:hover { text-decoration: underline; }
.auth-check { display: flex; align-items: center; gap: 8px; cursor: pointer; }.auth-check input { position: absolute; opacity: 0; pointer-events: none; }.auth-check span { position: relative; width: 17px; height: 17px; border: 1px solid #c7ced8; border-radius: 5px; background: #fff; }.auth-check input:checked + span { border-color: var(--auth-red); background: var(--auth-red); }.auth-check input:checked + span::after { content: ""; position: absolute; left: 5px; top: 2px; width: 4px; height: 8px; transform: rotate(45deg); border: solid #fff; border-width: 0 2px 2px 0; }.auth-check input:focus-visible + span { box-shadow: 0 0 0 4px rgba(180,35,24,.1); }

.auth-submit, .auth-secondary { display: flex; width: 100%; height: 52px; align-items: center; justify-content: center; gap: 10px; border-radius: 12px; text-decoration: none; font-weight: 800; cursor: pointer; transition: transform .16s, box-shadow .16s, background .16s; }
.auth-submit { position: relative; border: 1px solid var(--auth-red); color: #fff; background: linear-gradient(135deg, #bd3025, #991f17); box-shadow: 0 10px 24px rgba(180,35,24,.19); font-size: 13px; }
.auth-submit i { position: absolute; right: 17px; font-size: 18px; font-style: normal; font-weight: 400; transition: transform .16s; }.auth-submit:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(180,35,24,.25); }.auth-submit:hover i { transform: translateX(3px); }.auth-submit:disabled { opacity: .68; cursor: wait; transform: none; }
.auth-secondary { border: 1px solid var(--auth-line); color: #344054; background: #fff; font-size: 12px; }.auth-secondary:hover { border-color: #bac2cd; background: var(--auth-soft); }.auth-secondary svg { width: 18px; fill: none; stroke: var(--auth-red); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.auth-separator { display: flex; align-items: center; gap: 12px; color: #98a2b3; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }.auth-separator::before, .auth-separator::after { content: ""; height: 1px; flex: 1; background: #edf0f3; }.auth-separator span { white-space: nowrap; }
.auth-switch { margin: 1px 0 0; color: #667085; text-align: center; font-size: 11px; }
.auth-consent { margin: 0; color: #98a2b3; font-size: 9px; line-height: 1.5; text-align: center; }
.auth-legal { margin: auto auto 0; color: #a0a7b1; font-size: 9px; }

.password-strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 1px; }.password-strength i { height: 3px; border-radius: 99px; background: #e6e9ee; transition: background .2s; }.password-strength small { grid-column: 1/-1; margin-top: 1px; color: #98a2b3; font-size: 8px; font-weight: 500; }.password-strength[data-score="1"] i:nth-child(1) { background: #d92d20; }.password-strength[data-score="2"] i:nth-child(-n+2) { background: #f79009; }.password-strength[data-score="3"] i:nth-child(-n+3) { background: #17b26a; }.password-strength[data-score="4"] i { background: #079455; }

.auth-feature-icon, .auth-success-icon { display: grid; place-items: center; color: var(--auth-red); background: #fff2f0; border: 1px solid #fbd0cb; }
.auth-feature-icon { width: 49px; height: 49px; margin-bottom: 19px; border-radius: 14px; }.auth-feature-icon svg { width: 23px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.auth-tip { display: flex; gap: 9px; margin: -2px 0 0; padding: 11px 13px; border-radius: 10px; color: #667085; background: var(--auth-soft); font-size: 9px; line-height: 1.5; }.auth-tip span { display: grid; flex: 0 0 17px; width: 17px; height: 17px; place-items: center; border: 1px solid #cfd5de; border-radius: 50%; font-size: 9px; font-weight: 800; }
.auth-success-state { text-align: center; }.auth-success-icon { width: 76px; height: 76px; margin: 0 auto 24px; border-radius: 22px; box-shadow: 0 10px 25px rgba(180,35,24,.08); }.auth-success-icon svg { width: 36px; fill: none; stroke: currentColor; stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; }.auth-success-state > p { max-width: 370px; margin: 0 auto; }.auth-message-note { display: flex; align-items: flex-start; gap: 11px; margin: 28px 0 20px; padding: 14px; border-radius: 12px; color: #475467; background: var(--auth-soft); text-align: left; font-size: 10px; }.auth-message-note > span { color: var(--auth-red); }.auth-message-note p { margin: 0; }

@media (max-width: 1040px) {
    .auth-shell { grid-template-columns: minmax(390px, .85fr) minmax(480px, 1.15fr); }
    .auth-stage { padding-left: 40px; padding-right: 40px; }
    .auth-stage h1 { font-size: 47px; }
    .auth-proof { grid-template-columns: 1fr; gap: 14px; }
    .auth-market-card { display: none; }
    .auth-stage-content { padding-bottom: 70px; }
}

@media (max-width: 780px) {
    .auth-shell { display: block; min-height: 100vh; background: #fff; }
    .auth-stage { display: none; }
    .auth-panel { min-height: 100vh; padding: 25px 22px 22px; }
    .auth-brand--dark { display: inline-flex; }
    .auth-panel-inner { padding: 48px 0 28px; }
    .auth-legal { padding-top: 20px; }
}

@media (max-width: 480px) {
    .auth-panel { padding: 20px 18px; }
    .auth-panel-inner { padding-top: 38px; }
    .auth-heading h2, .auth-success-state h2 { font-size: 31px; }
    .auth-heading { margin-bottom: 23px; }
    .auth-input-wrap input, .auth-submit, .auth-secondary { height: 50px; }
    .auth-form-options { align-items: flex-start; }
}

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