:root {
    --auth-accent: #8b7cf3;
    --auth-accent-soft: #b4aaff;
    --auth-cyan: #58d3df;
    --auth-ink: #080b17;
    --auth-panel: rgba(14, 19, 35, .8);
    --auth-line: rgba(164, 175, 216, .2);
    --auth-muted: #929bb4;
}

html { background: var(--auth-ink); }

body.auth-program {
    background:
        radial-gradient(circle at 15% 8%, rgba(83, 77, 145, .15), transparent 31%),
        radial-gradient(circle at 90% 88%, rgba(39, 97, 122, .1), transparent 30%),
        linear-gradient(145deg, #090c18 0%, #0c1020 54%, #080b16 100%);
    color: #edf0fa;
    min-height: 100vh;
    overflow-x: hidden;
}

body.auth-program::before {
    background-image:
        radial-gradient(circle, rgba(218, 225, 255, .5) 0 1px, transparent 1.3px),
        radial-gradient(circle, rgba(117, 208, 224, .32) 0 1px, transparent 1.2px);
    background-position: 0 0, 62px 39px;
    background-size: 155px 155px, 213px 213px;
    content: "";
    inset: 0;
    opacity: .14;
    pointer-events: none;
    position: fixed;
}

.auth-shell { min-height: 100vh; padding: 27px clamp(22px, 4vw, 64px) 34px; position: relative; z-index: 1; }
.auth-shell *, .auth-shell *::before, .auth-shell *::after { box-sizing: border-box; }

.auth-brand {
    align-items: center;
    color: #7f89a5;
    display: inline-flex;
    gap: 17px;
    min-height: 30px;
    text-decoration: none;
}
.auth-brand:hover { color: #aeb6cb; }
.auth-brand img { display: block; height: 18px; width: auto; }
.auth-brand span { border-left: 1px solid rgba(164, 175, 216, .24); font-size: 9px; font-weight: 700; letter-spacing: .15em; padding-left: 17px; text-transform: uppercase; }

.auth-stage {
    display: grid;
    grid-template-columns: minmax(0, 1.16fr) minmax(420px, .84fr);
    margin: 24px auto 0;
    max-width: 1480px;
    min-height: calc(100vh - 112px);
}

.auth-visual {
    background: linear-gradient(135deg, rgba(17, 23, 43, .62), rgba(9, 13, 27, .34));
    border: 1px solid var(--auth-line);
    border-right: 0;
    min-height: 690px;
    overflow: hidden;
    padding: clamp(40px, 5vw, 76px);
    position: relative;
}

.auth-visual::before { background: radial-gradient(circle, rgba(135, 119, 243, .2), transparent 66%); content: ""; height: 500px; left: 16%; pointer-events: none; position: absolute; top: 23%; width: 500px; }
.auth-visual__grid { background-image: linear-gradient(rgba(150, 164, 214, .055) 1px, transparent 1px), linear-gradient(90deg, rgba(150, 164, 214, .055) 1px, transparent 1px); background-size: 52px 52px; inset: 0; mask-image: linear-gradient(145deg, #000, transparent 75%); opacity: .55; position: absolute; }

.auth-eyebrow { align-items: center; color: var(--auth-accent-soft); display: inline-flex; font-size: 9px; font-weight: 750; gap: 7px; letter-spacing: .16em; text-transform: uppercase; }
.auth-eyebrow i { font-size: 15px; }
.auth-visual__intro { max-width: 650px; position: relative; z-index: 2; }
.auth-visual__intro h2 { font-size: clamp(38px, 4vw, 64px); font-weight: 320; letter-spacing: -.05em; line-height: .98; margin: 22px 0 18px; }
.auth-visual__intro h2 span { color: var(--auth-accent-soft); }
.auth-visual__intro p { color: #9aa3ba; font-size: 14px; line-height: 1.75; margin: 0; max-width: 540px; }

.auth-constellation { aspect-ratio: 620 / 330; margin: 25px auto 0; max-width: 680px; position: relative; width: 100%; }
.auth-constellation svg { display: block; height: 100%; overflow: visible; width: 100%; }
.auth-route { fill: none; filter: drop-shadow(0 0 5px rgba(89, 211, 224, .25)); stroke: url(#auth-login-route); stroke-width: 1.5; }
.auth-route--signup { stroke: url(#auth-signup-route); }
.auth-route--device { stroke: url(#auth-device-route); }
.auth-route--device-dim { filter: none; opacity: .23; stroke: #77819e; stroke-width: 5; }
.auth-route--dim, .auth-route--branch { filter: none; opacity: .25; stroke: #77819e; }
.auth-constellation circle { fill: #dcd8ff; filter: drop-shadow(0 0 8px #8b7cf3); }
.auth-constellation circle.is-dim { fill: #677089; filter: none; }

.auth-node { align-items: center; color: #c9cfe0; display: grid; font-size: 10px; grid-template-columns: 34px auto; position: absolute; }
.auth-node > i { align-items: center; background: #12172a; border: 1px solid rgba(180, 170, 255, .45); color: var(--auth-accent-soft); display: flex; font-size: 16px; grid-row: 1 / 3; height: 34px; justify-content: center; margin-right: 10px; transform: rotate(45deg); width: 34px; }
.auth-node > i::before { transform: rotate(-45deg); }
.auth-node b { font-weight: 600; letter-spacing: .02em; }
.auth-node small { color: #657089; font-size: 8px; letter-spacing: .08em; text-transform: uppercase; }
.auth-node.is-accounts { left: 9.35%; top: 69.7%; transform: translate(-17px, -17px); }
.auth-node.is-experts { left: 60.65%; top: 32.73%; transform: translate(-17px, -17px); }
.auth-node.is-training { left: 88.39%; top: 44.85%; transform: translate(-17px, -17px); }
.auth-node.is-profile { left: 10%; top: 52.73%; transform: translate(-17px, -17px); }
.auth-node.is-workflow { left: 27.42%; top: 52.73%; transform: translate(-17px, -17px); }
.auth-node.is-growth { left: 66.77%; top: 23.64%; transform: translate(-17px, -17px); }
.auth-node.is-device { left: 10.32%; top: 63.64%; transform: translate(-17px, -17px); }
.auth-node.is-vault { left: 48.39%; top: 35.76%; transform: translate(-17px, -17px); }
.auth-node.is-engine { left: 89.03%; top: 63.64%; transform: translate(-17px, -17px); }
.auth-node.is-experts > i { border-color: rgba(88, 211, 223, .5); color: var(--auth-cyan); }
.auth-node.is-training { opacity: .66; }
.auth-node.is-workflow > i, .auth-node.is-vault > i { border-color: rgba(88, 211, 223, .55); color: var(--auth-cyan); }
.auth-node.is-growth > i { border-color: rgba(112, 215, 169, .5); color: #70d7a9; }
.auth-node.is-engine > i { border-color: rgba(180, 170, 255, .58); box-shadow: 0 0 18px rgba(139, 124, 243, .14); }

.auth-visual__status { align-items: center; bottom: 30px; color: #68728d; display: flex; font-size: 8px; font-weight: 650; justify-content: space-between; left: clamp(40px, 5vw, 76px); letter-spacing: .12em; position: absolute; right: clamp(40px, 5vw, 76px); text-transform: uppercase; }
.auth-visual__status span:first-child { align-items: center; color: #7bbda9; display: inline-flex; gap: 8px; }
.auth-visual__status i { background: #50d49e; border-radius: 50%; box-shadow: 0 0 8px rgba(80, 212, 158, .75); height: 5px; width: 5px; }

.auth-panel-wrap { align-items: center; background: rgba(8, 11, 23, .58); border: 1px solid var(--auth-line); display: flex; flex-direction: column; justify-content: center; min-height: 690px; padding: 42px clamp(28px, 4vw, 66px) 28px; }
.auth-panel { max-width: 440px; width: 100%; }
.auth-stage > *, .auth-panel-wrap, .auth-panel { min-width: 0; }
.auth-panel--signup { max-width: 470px; }
.auth-panel__header { margin-bottom: 28px; }
.auth-panel__header h1 { font-size: clamp(29px, 3vw, 39px); font-weight: 400; letter-spacing: -.035em; margin: 14px 0 8px; }
.auth-panel__header p { color: var(--auth-muted); font-size: 12px; margin: 0; }

.auth-notice { align-items: flex-start; background: rgba(84, 202, 159, .08); border-left: 2px solid #54ca9f; color: #a9ddca; display: flex; font-size: 10px; gap: 10px; line-height: 1.5; margin-bottom: 18px; padding: 11px 13px; }
.auth-notice.is-error, .auth-notice.is-danger { background: rgba(222, 95, 116, .08); border-color: #de5f74; color: #efadb8; }
.auth-notice i { font-size: 16px; }
.auth-notice span { display: block; }

.auth-form { display: grid; gap: 17px; }
.auth-field { display: grid; gap: 7px; }
.auth-field > label { color: #afb6c9; font-size: 9px; font-weight: 700; letter-spacing: .08em; margin: 0; text-transform: uppercase; }
.auth-input { align-items: center; background: rgba(5, 8, 18, .56); border: 1px solid rgba(158, 171, 217, .2); display: flex; min-height: 50px; position: relative; transition: border-color .18s, box-shadow .18s, background .18s; }
.auth-input:focus-within { background: rgba(8, 11, 24, .82); border-color: rgba(139, 124, 243, .68); box-shadow: 0 0 0 3px rgba(139, 124, 243, .08), 0 0 22px rgba(139, 124, 243, .08); }
.auth-field.has-error .auth-input { border-color: rgba(222, 95, 116, .65); }
.auth-input > i { color: #65708b; flex: 0 0 44px; font-size: 17px; text-align: center; }
.auth-input .form-control { background: transparent !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; color: #eef0f8 !important; font-size: 12px; height: 48px; margin: 0 !important; padding: 0 44px 0 0; }
.auth-input .form-control::placeholder { color: #596279; opacity: 1; }
.auth-input .form-control:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px #0b1020 inset !important; -webkit-text-fill-color: #eef0f8 !important; }
.auth-password-toggle { align-items: center; background: transparent; border: 0; color: #6e7892; display: flex; height: 44px; justify-content: center; position: absolute; right: 3px; width: 40px; }
.auth-password-toggle:hover { color: var(--auth-accent-soft); }
.auth-password-toggle i { font-size: 17px; }
.auth-field__error { color: #e78191; font-size: 9px; line-height: 1.45; }
.auth-field__help { color: #68728a; font-size: 8px; line-height: 1.5; margin-top: -2px; }
.auth-field__help ul { display: grid; gap: 3px; margin: 2px 0 0; padding-left: 16px; }

.auth-form__utility { align-items: center; display: flex; justify-content: space-between; margin-top: -2px; }
.auth-check { align-items: center; color: #818ba3; cursor: pointer; display: inline-flex; font-size: 10px; gap: 8px; }
.auth-check input { appearance: none; background: rgba(5, 8, 18, .6); border: 1px solid rgba(158, 171, 217, .3); height: 14px; margin: 0; position: relative; width: 14px; }
.auth-check input:checked { background: var(--auth-accent); border-color: var(--auth-accent); }
.auth-check input:checked::after { border: solid #fff; border-width: 0 1.5px 1.5px 0; content: ""; height: 7px; left: 4px; position: absolute; top: 2px; transform: rotate(45deg); width: 4px; }
.auth-form__utility a { color: #9d95e8; font-size: 10px; text-decoration: none; }
.auth-form__utility a:hover { color: #c6bfff; }

.auth-submit { align-items: center; background: linear-gradient(100deg, #7466da, #8779ee); border: 1px solid rgba(196, 188, 255, .5); box-shadow: 0 13px 30px rgba(47, 39, 111, .22); color: #fff; display: flex; font-size: 10px; font-weight: 750; justify-content: space-between; letter-spacing: .09em; min-height: 50px; padding: 0 18px; text-decoration: none; text-transform: uppercase; transition: transform .18s, box-shadow .18s, filter .18s; width: 100%; }
.auth-submit:hover { box-shadow: 0 16px 35px rgba(72, 60, 158, .34); filter: brightness(1.08); transform: translateY(-1px); }
.auth-submit i { font-size: 20px; }

.auth-panel__footer { align-items: center; border-top: 1px solid rgba(158, 171, 217, .13); color: #747e96; display: flex; font-size: 10px; justify-content: space-between; margin-top: 26px; padding-top: 19px; }
.auth-panel__footer a { align-items: center; color: var(--auth-accent-soft); display: inline-flex; font-weight: 650; gap: 4px; text-decoration: none; }
.auth-panel__footer a:hover { color: #d1ccff; }
.auth-security-note { color: #566078; font-size: 8px; letter-spacing: .08em; margin: 25px 0 0; text-align: center; text-transform: uppercase; }
.auth-security-note i { color: #719d91; font-size: 12px; margin-right: 5px; vertical-align: -2px; }

.auth-referral-signal { align-items: center; background: rgba(88, 211, 223, .06); border: 1px solid rgba(88, 211, 223, .22); display: grid; gap: 12px; grid-template-columns: 35px 1fr auto; margin: -8px 0 21px; padding: 11px 13px; }
.auth-referral-signal > span { align-items: center; border: 1px solid rgba(88, 211, 223, .42); color: var(--auth-cyan); display: flex; height: 30px; justify-content: center; transform: rotate(45deg); width: 30px; }
.auth-referral-signal > span i { font-size: 15px; transform: rotate(-45deg); }
.auth-referral-signal strong { display: block; font-size: 10px; font-weight: 600; }
.auth-referral-signal small { color: #778299; display: block; font-size: 8px; margin-top: 2px; }
.auth-referral-signal > i { color: #5dd7a8; font-size: 17px; }
.auth-consent { align-items: flex-start; color: #667089; display: flex; font-size: 8px; gap: 8px; line-height: 1.5; margin: -2px 0 0; }
.auth-consent i { color: #6fc0ad; font-size: 14px; }

.auth-panel--state { max-width: 470px; }
.auth-state-icon { align-items: center; background: rgba(139, 124, 243, .08); border: 1px solid rgba(180, 170, 255, .42); color: var(--auth-accent-soft); display: flex; height: 54px; justify-content: center; margin-bottom: 24px; transform: rotate(45deg); width: 54px; }
.auth-state-icon > i { font-size: 25px; transform: rotate(-45deg); }
.auth-state-icon.is-success { background: rgba(84, 202, 159, .08); border-color: rgba(84, 202, 159, .46); color: #72dbb5; }
.auth-state-icon.is-warning { background: rgba(236, 180, 86, .07); border-color: rgba(236, 180, 86, .42); color: #efc679; }
.auth-state-copy { color: var(--auth-muted); font-size: 12px; line-height: 1.75; margin: 0 0 24px; }
.auth-state-copy strong, .auth-state-copy a { color: #d7d2ff; font-weight: 600; }
.auth-state-copy a { text-decoration: none; }
.auth-state-copy a:hover { color: #fff; }
.auth-action-row { display: grid; gap: 10px; max-width: 100%; min-width: 0; }
.auth-secondary-action { align-items: center; background: rgba(8, 12, 25, .54); border: 1px solid rgba(158, 171, 217, .2); color: #aeb6ca; display: flex; font-size: 9px; font-weight: 700; justify-content: space-between; letter-spacing: .08em; min-height: 46px; padding: 0 17px; text-decoration: none; text-transform: uppercase; transition: border-color .18s, color .18s, background .18s; }
.auth-secondary-action:hover { background: rgba(17, 22, 41, .76); border-color: rgba(180, 170, 255, .42); color: #e4e1ff; }
.auth-secondary-action i { font-size: 18px; }
.auth-inline-status { align-items: flex-start; background: rgba(88, 211, 223, .055); border-left: 2px solid rgba(88, 211, 223, .62); color: #a5b7ca; display: flex; font-size: 10px; gap: 11px; line-height: 1.65; margin-bottom: 22px; padding: 13px 14px; }
.auth-inline-status i { color: var(--auth-cyan); flex: 0 0 auto; font-size: 17px; margin-top: 1px; }
.auth-email-address { color: #d7d2ff; overflow-wrap: anywhere; }
.auth-state-copy, .auth-submit, .auth-secondary-action { max-width: 100%; min-width: 0; }

@media (max-width: 1099.98px) {
    .auth-shell { padding: 23px; }
    .auth-stage { grid-template-columns: minmax(0, 1fr) minmax(390px, .9fr); }
    .auth-visual { padding: 50px 36px; }
    .auth-visual__status { left: 36px; right: 36px; }
    .auth-node.is-training { display: none; }
    .auth-node.is-growth, .auth-node.is-engine { display: none; }
}

@media (max-width: 899.98px) {
    .auth-stage { display: block; margin-top: 20px; min-height: 0; }
    .auth-visual { border-right: 1px solid var(--auth-line); min-height: 210px; padding: 31px; }
    .auth-visual__intro h2 { font-size: 35px; margin: 14px 0 10px; }
    .auth-visual__intro p { font-size: 11px; }
    .auth-constellation { height: auto; position: absolute; right: 0; top: 2px; width: 48%; }
    .auth-node { display: none; }
    .auth-visual__status { display: none; }
    .auth-panel-wrap { min-height: 0; padding: 45px 28px 30px; }
}

@media (max-width: 575.98px) {
    .auth-shell { padding: 18px 13px 22px; }
    .auth-brand { margin-left: 8px; }
    .auth-stage { margin-top: 17px; }
    .auth-visual { min-height: 165px; padding: 25px 23px; }
    .auth-visual__intro h2 { font-size: 29px; }
    .auth-visual__intro p { display: none; }
    .auth-constellation { opacity: .48; width: 58%; }
    .auth-panel-wrap { padding: 35px 21px 25px; }
    .auth-panel__header h1 { font-size: 30px; }
    .auth-panel__footer { align-items: flex-start; flex-direction: column; gap: 8px; }
    .auth-state-copy { overflow-wrap: anywhere; }
}

@media (prefers-reduced-motion: no-preference) {
    .auth-constellation circle:not(.is-dim) { animation: auth-node-pulse 2.8s ease-in-out infinite; }
    .auth-constellation circle:nth-of-type(2) { animation-delay: .65s; }
    .auth-constellation circle:nth-of-type(3) { animation-delay: 1.2s; }
}

@keyframes auth-node-pulse { 50% { filter: drop-shadow(0 0 13px #8b7cf3); opacity: .72; } }
