:root {
    --auth-primary: #5b4fe5;
    --auth-primary-dark: #4338ca;
    --auth-ink: #172033;
    --auth-muted: #667085;
    --auth-border: #dfe3ea;
    --auth-surface: #ffffff;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body.auth-page {
    min-height: 100vh; margin: 0; padding: 0; display: block;
    color: var(--auth-ink); background: #f6f7fb;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input, select { font: inherit; }

.auth-skip-link { position: fixed; left: 16px; top: -70px; z-index: 10; padding: 10px 14px; border-radius: 10px; background: #fff; color: var(--auth-primary); font-weight: 700; }
.auth-skip-link:focus { top: 14px; }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, .9fr) minmax(520px, 1.1fr); }

.auth-brand-panel {
    position: relative; isolation: isolate; overflow: hidden; padding: clamp(34px, 5vw, 76px);
    display: flex; flex-direction: column; justify-content: space-between;
    color: #fff; background: linear-gradient(145deg, #080d2c 0%, #16154d 55%, #4438bd 100%);
}
.auth-brand-panel::before, .auth-brand-panel::after { content: ""; position: absolute; z-index: -1; border-radius: 999px; filter: blur(2px); }
.auth-brand-panel::before { width: 480px; height: 480px; right: -250px; top: -210px; background: radial-gradient(circle, rgba(132,118,255,.55), transparent 68%); }
.auth-brand-panel::after { width: 420px; height: 420px; left: -240px; bottom: -220px; background: radial-gradient(circle, rgba(50,195,255,.22), transparent 68%); }
.auth-brand-logo { display: inline-flex; align-items: center; gap: 12px; width: max-content; color: #fff; text-decoration: none; font-weight: 800; letter-spacing: .06em; }
.auth-brand-mark { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,.18); border-radius: 13px; background: rgba(255,255,255,.09); font-size: 22px; }
.auth-brand-copy { max-width: 560px; margin: clamp(50px, 10vh, 120px) 0; }
.auth-brand-kicker { display: inline-flex; padding: 7px 11px; margin-bottom: 22px; border: 1px solid rgba(255,255,255,.15); border-radius: 999px; background: rgba(255,255,255,.08); color: rgba(255,255,255,.84); font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.auth-brand-copy h2 { max-width: 620px; margin: 0 0 18px; color: #fff; font-size: clamp(34px, 4.4vw, 62px); line-height: 1.05; letter-spacing: -.045em; }
.auth-brand-copy > p { max-width: 520px; margin: 0; color: rgba(255,255,255,.72); font-size: clamp(15px, 1.4vw, 18px); line-height: 1.7; }
.auth-benefits { display: grid; gap: 13px; margin: 30px 0 0; padding: 0; list-style: none; }
.auth-benefits li { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.86); font-size: 14px; }
.auth-benefits i { color: #9c92ff; }
.auth-brand-footer { color: rgba(255,255,255,.48); font-size: 12px; }

.auth-form-panel { display: flex; align-items: center; justify-content: center; padding: clamp(26px, 5vw, 72px); }
.auth-container { width: min(100%, 500px); max-width: 500px; overflow: visible; border: 0; border-radius: 0; background: transparent; box-shadow: none; animation: authEnter .32s ease-out; }
@keyframes authEnter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.auth-header { padding: 0 0 28px; color: var(--auth-ink); background: transparent; text-align: left; }
.auth-mobile-logo { display: none; margin-bottom: 28px; color: var(--auth-ink); }
.auth-eyebrow { display: block; margin-bottom: 10px; color: var(--auth-primary); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.auth-header h1 { margin: 0 0 10px; color: var(--auth-ink); font-size: clamp(28px, 3vw, 38px); line-height: 1.15; letter-spacing: -.035em; }
.auth-header p { max-width: 440px; margin: 0; color: var(--auth-muted); font-size: 15px; line-height: 1.6; opacity: 1; }
.auth-body { padding: 0; }
.auth-footer { margin-top: 24px; padding: 20px 0 0; border-top: 1px solid var(--auth-border); background: transparent; color: var(--auth-muted); }
.auth-home-link { display: inline-flex; align-items: center; gap: 7px; margin-top: 24px; color: var(--auth-muted); text-decoration: none; font-size: 13px; }
.auth-home-link:hover { color: var(--auth-primary); }

.form-group { margin-bottom: 19px; }
.form-group label { display: block; margin-bottom: 7px; color: var(--auth-ink); font-size: 13px; font-weight: 700; }
.required-mark { color: #d92d20; }
.form-group input, .form-group select {
    width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid #cfd4dc; border-radius: 11px;
    color: var(--auth-ink); background: #fff; font-size: 15px; transition: border-color .16s ease, box-shadow .16s ease;
}
.form-group input::placeholder { color: #98a2b3; }
.form-group input:hover, .form-group select:hover { border-color: #aeb5c1; }
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--auth-primary); box-shadow: 0 0 0 4px rgba(91,79,229,.11); }
.password-field { position: relative; }
.password-field input { padding-right: 48px; }
.password-toggle { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 9px; color: #667085; background: transparent; cursor: pointer; }
.password-toggle:hover { color: var(--auth-primary); background: #f1f0ff; }

.auth-primary-button, .auth-secondary-link {
    width: 100%; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    padding: 12px 18px; border-radius: 11px; font-size: 15px; font-weight: 750; text-decoration: none; cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.auth-primary-button { border: 1px solid var(--auth-primary); color: #fff; background: linear-gradient(135deg, #6558eb, #5043d4); box-shadow: 0 10px 24px rgba(91,79,229,.2); }
.auth-primary-button:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(91,79,229,.27); }
.auth-secondary-link { border: 1px solid var(--auth-border); color: var(--auth-primary); background: #fff; }
.auth-secondary-link:hover { border-color: #b9b1ff; background: #f8f7ff; }
.auth-primary-button:focus-visible, .auth-secondary-link:focus-visible, .password-toggle:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid rgba(91,79,229,.22); outline-offset: 2px; }

.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 4px 0 22px; }
.auth-check { display: flex; align-items: center; gap: 9px; color: #475467; font-size: 13px; }
.auth-check input { width: 18px; height: 18px; accent-color: var(--auth-primary); }
.auth-text-link { color: var(--auth-primary); text-decoration: none; font-size: 13px; font-weight: 650; }
.auth-text-link:hover { text-decoration: underline; }
.auth-divider { display: flex; align-items: center; gap: 14px; margin: 25px 0; color: #98a2b3; font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--auth-border); }
.auth-note, .auth-plan-note { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 20px; padding: 13px 14px; border: 1px solid #e7e4ff; border-radius: 11px; color: #4338ca; background: #f7f6ff; font-size: 13px; line-height: 1.5; }
.auth-note-warning { border-color: #f7dfad; color: #854d0e; background: #fffbeb; }
.auth-terms { display: flex; align-items: flex-start; gap: 10px; margin: 20px 0; padding: 14px; border: 1px solid var(--auth-border); border-radius: 11px; background: #fafbfc; }
.auth-terms input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--auth-primary); }
.auth-terms label { margin: 0; color: #475467; font-size: 13px; line-height: 1.55; }
.auth-terms a { color: var(--auth-primary); }

.error-message, .success-message, .alert { border-radius: 11px; box-shadow: none; }
.error-message { border: 1px solid #f5c2c0; border-left: 4px solid #d92d20; color: #912018; background: #fff5f4; }
.success-message { border: 1px solid #abefc6; border-left: 4px solid #17b26a; color: #067647; background: #ecfdf3; }
.field-error-text, .text-danger { display: flex !important; align-items: center; gap: 6px; margin-top: 7px !important; color: #b42318 !important; font-size: 12px !important; }
.error-field { border-color: #f04438 !important; background: #fff !important; }
.password-strength { height: 5px; margin-top: 9px; border-radius: 999px; background: #eaecf0; overflow: hidden; }
.password-strength-bar { height: 100%; border-radius: inherit; transition: width .2s ease, background .2s ease; }
.auth-help { display: block; margin-top: 7px; color: var(--auth-muted); font-size: 12px; line-height: 1.5; }
.verification-state { text-align: center; }
.verification-icon { width: 72px; height: 72px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 20px; border-radius: 22px; color: var(--auth-primary); background: #efedff; font-size: 32px; }

@media (max-width: 960px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-brand-panel { display: none; }
    .auth-form-panel { min-height: 100vh; padding: 36px 22px; }
    .auth-mobile-logo { display: inline-flex; }
}
@media (max-width: 520px) {
    .auth-form-panel { align-items: flex-start; padding: 24px 18px 36px; }
    .auth-header { padding-bottom: 24px; }
    .auth-header h1 { font-size: 30px; }
    .auth-row { align-items: flex-start; flex-direction: column; gap: 11px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
