:root {
    --bg: #f7faf9;
    --surface: #fff;
    --surface-soft: #eef6f4;
    --ink: #102a2e;
    --muted: #607477;
    --brand: #147c72;
    --brand-dark: #0b5c55;
    --accent: #9be2d9;
    --dark: #071a1e;
    --line: #d8e6e4;
    --danger: #c93e45;
    --success: #16856a;
    --shadow: 0 24px 60px rgba(11, 57, 59, .13);
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; }
body { min-height: 100vh; margin: 0; overflow-x: clip; color: var(--ink); background: var(--bg); font-family: "Open Sans", sans-serif; line-height: 1.5; }
button, input { font: inherit; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid #51bcb0; outline-offset: 3px; }

.back-link { position: fixed; z-index: 20; top: 24px; left: 28px; display: inline-flex; min-height: 44px; align-items: center; gap: 9px; padding: 8px 13px; border-radius: 10px; color: #d8e8e7; font-size: .82rem; font-weight: 700; text-decoration: none; transition: color .2s ease, background .2s ease, transform .2s ease; }
.back-link:hover { color: #fff; background: rgba(255,255,255,.08); transform: translateX(-2px); }
.auth-layout { display: grid; min-height: 100vh; grid-template-columns: minmax(390px, .88fr) minmax(520px, 1.12fr); }

.auth-showcase { position: relative; display: flex; overflow: hidden; flex-direction: column; justify-content: space-between; padding: clamp(88px, 9vh, 112px) clamp(38px, 5vw, 80px) clamp(34px, 5vh, 54px); color: #fff; background: linear-gradient(145deg, #06181c 0%, #0b3638 62%, #0c5c56 100%); }
.auth-showcase::before, .auth-showcase::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.auth-showcase::before { top: -18vw; left: -15vw; width: 42vw; height: 42vw; background: radial-gradient(circle, rgba(95, 207, 194, .17), transparent 68%); }
.auth-showcase::after { right: -20%; bottom: -16%; width: 420px; height: 420px; border: 1px solid rgba(155,226,217,.13); box-shadow: 0 0 0 70px rgba(155,226,217,.025), 0 0 0 140px rgba(155,226,217,.018); }
.auth-showcase .brand { position: relative; z-index: 1; display: inline-flex; align-self: flex-start; }
.auth-showcase .brand img { width: 156px; }
.showcase-copy { position: relative; z-index: 1; max-width: 560px; margin-block: clamp(40px, 8vh, 92px) 32px; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 14px; color: var(--brand); font-size: .73rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 20px; height: 2px; background: currentColor; }
.auth-showcase .eyebrow { color: var(--accent); }
.showcase-copy h1 { margin: 0 0 22px; color: #fff; font-size: clamp(2.5rem, 4.5vw, 4.65rem); line-height: 1.05; letter-spacing: -.045em; }
.showcase-copy > p { max-width: 49ch; margin: 0; color: #b8cecf; font-size: clamp(.98rem, 1.4vw, 1.12rem); }

.journey-preview { position: relative; z-index: 1; width: min(100%, 530px); padding: clamp(20px, 3vw, 28px); border: 1px solid rgba(255,255,255,.12); border-radius: 22px; background: rgba(255,255,255,.075); box-shadow: 0 22px 45px rgba(0,0,0,.2); backdrop-filter: blur(10px); }
.preview-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.preview-heading div { display: grid; }
.preview-heading small { color: #9bb5b7; font-size: .67rem; }
.preview-heading strong { color: #fff; font-size: .94rem; }
.preview-heading b { color: var(--accent); font-size: 1.5rem; }
.progress-track { height: 6px; margin-block: 16px 20px; overflow: hidden; border-radius: 10px; background: rgba(255,255,255,.12); }
.progress-track span { display: block; width: 42%; height: 100%; border-radius: inherit; background: var(--accent); }
.journey-preview ul { display: grid; margin: 0; padding: 0; list-style: none; }
.journey-preview li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid rgba(255,255,255,.08); }
.journey-preview li i { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border-radius: 9px; color: #82aaa7; background: rgba(255,255,255,.07); font-size: .7rem; font-style: normal; font-weight: 800; }
.journey-preview li:first-child i { color: var(--dark); background: var(--accent); }
.journey-preview li.is-current i { color: #fff; background: var(--brand); box-shadow: 0 0 0 4px rgba(155,226,217,.08); }
.journey-preview li > span { display: grid; }
.journey-preview li strong { color: #e9f4f3; font-size: .78rem; }
.journey-preview li small { color: #8ca7a9; font-size: .65rem; }
.trust-line { position: relative; z-index: 1; display: flex; align-items: center; gap: 9px; margin-top: 24px; color: #a8c0c1; font-size: .76rem; }
.trust-line span { display: grid; width: 20px; height: 20px; place-items: center; border-radius: 50%; color: var(--dark); background: var(--accent); font-size: .65rem; font-weight: 900; }

.auth-area { display: flex; min-width: 0; align-items: center; justify-content: center; flex-direction: column; padding: clamp(38px, 6vw, 80px); background: radial-gradient(circle at 100% 0, rgba(82, 186, 174, .1), transparent 30%), var(--bg); }
.mobile-brand { display: none; }
.auth-card { width: 100%; max-width: 510px; min-width: 0; padding: clamp(28px, 4vw, 44px); border: 1px solid var(--line); border-radius: 24px; background: rgba(255,255,255,.94); box-shadow: var(--shadow); }
.auth-header { margin-bottom: 25px; }
.auth-header h2 { margin: 0 0 10px; color: var(--ink); font-size: clamp(1.75rem, 3vw, 2.35rem); line-height: 1.12; letter-spacing: -.03em; }
.subtitle { margin: 0; color: var(--muted); font-size: .91rem; overflow-wrap: anywhere; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-bottom: 27px; padding: 5px; border-radius: 12px; background: var(--surface-soft); }
.tab-btn { min-height: 43px; padding: 9px 14px; border: 0; border-radius: 9px; color: #687c7e; background: transparent; font-size: .85rem; font-weight: 800; cursor: pointer; transition: color .2s ease, background .2s ease, box-shadow .2s ease; }
.tab-btn.is-active { color: var(--brand-dark); background: #fff; box-shadow: 0 4px 12px rgba(16, 65, 66, .08); }
.form-panel { display: none; }
.form-panel.is-active { display: block; }
.field-group { margin-bottom: 15px; }
.field-label { display: block; margin-bottom: 7px; color: #294447; font-size: .79rem; font-weight: 800; }
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.action-link { margin-bottom: 7px; color: var(--brand); font-size: .72rem; font-weight: 700; text-decoration: none; }
.action-link:hover { color: var(--brand-dark); text-decoration: underline; }
input { width: 100%; min-height: 49px; padding: 11px 13px; border: 1px solid #cfdedc; border-radius: 11px; outline: none; color: var(--ink); background: #fff; font-size: .88rem; transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; }
input::placeholder { color: #93a3a5; }
input:hover { border-color: #abc7c3; }
input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(20,124,114,.11); }
input.error { border-color: var(--danger); background: #fff8f8; box-shadow: 0 0 0 3px rgba(201,62,69,.08); }
input:disabled { cursor: not-allowed; opacity: .72; background: #f1f5f4; }
input[type="date"] { color-scheme: light; }
.password-field { position: relative; }
.password-field input { padding-right: 77px; }
.toggle-password { position: absolute; top: 50%; right: 7px; min-width: 62px; min-height: 35px; padding: 6px 8px; border: 0; border-radius: 8px; color: var(--brand-dark); background: var(--surface-soft); font-size: .7rem; font-weight: 800; cursor: pointer; transform: translateY(-50%); }
.toggle-password:hover { background: #dcefeb; }
.field-error { min-height: 17px; margin: 4px 0 0; color: var(--danger); font-size: .68rem; line-height: 1.35; }
.strength-wrap { margin-top: 8px; }
.strength-track { height: 5px; overflow: hidden; border-radius: 10px; background: #e6eeed; }
.strength { width: 0; height: 100%; border-radius: inherit; transition: width .25s ease, background .25s ease; }
.strength-text { margin: 5px 0 0; color: var(--muted); font-size: .66rem; }
.privacy-acknowledgment { margin-top: 5px; }
.privacy-acknowledgment__label { display: flex; align-items: flex-start; gap: 11px; color: #526b6e; font-size: .75rem; line-height: 1.55; cursor: pointer; }
.privacy-acknowledgment__label span { min-width: 0; overflow-wrap: anywhere; }
.privacy-acknowledgment__label a { color: var(--brand-dark); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.privacy-acknowledgment__control { width: 19px; min-width: 19px; height: 19px; min-height: 19px; flex: 0 0 auto; margin: 2px 0 0; padding: 0; accent-color: var(--brand); cursor: pointer; }
.privacy-acknowledgment__control.error { outline: 3px solid rgba(201,62,69,.25); outline-offset: 2px; }
.submit-button { display: flex; width: 100%; min-height: 50px; align-items: center; justify-content: center; gap: 10px; margin-top: 3px; padding: 11px 18px; border: 1px solid var(--brand); border-radius: 11px; color: #fff; background: var(--brand); font-size: .87rem; font-weight: 800; cursor: pointer; box-shadow: 0 10px 24px rgba(20,124,114,.2); transition: transform .2s ease, background .2s ease, box-shadow .2s ease; }
.submit-button:hover { background: var(--brand-dark); box-shadow: 0 13px 28px rgba(20,124,114,.24); transform: translateY(-2px); }
.submit-button:disabled { opacity: .65; cursor: wait; transform: none; }
.terms-note { margin: 13px auto 0; color: #819295; font-size: .65rem; text-align: center; }
.mobile-switch { margin: 21px 0 0; color: var(--muted); font-size: .75rem; text-align: center; overflow-wrap: anywhere; }
.mobile-switch button { padding: 2px; border: 0; color: var(--brand-dark); background: transparent; font-weight: 800; cursor: pointer; }
.mobile-switch button:hover { text-decoration: underline; }
.auth-footer { margin: 22px 0 0; color: #829396; font-size: .68rem; text-align: center; }
.auth-footer a { color: var(--brand-dark); font-weight: 700; text-underline-offset: 3px; }
.toast { position: fixed; z-index: 100; top: 20px; right: 20px; max-width: min(360px, calc(100vw - 32px)); padding: 13px 16px; border-radius: 11px; color: #fff; background: var(--dark); box-shadow: var(--shadow); font-size: .8rem; font-weight: 700; opacity: 0; pointer-events: none; transform: translateY(-12px); transition: opacity .25s ease, transform .25s ease; }
.toast.show { opacity: 1; transform: none; }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

@media (max-width: 980px) {
    .auth-layout { grid-template-columns: minmax(330px, .8fr) minmax(440px, 1.2fr); }
    .auth-showcase { padding-inline: 34px; }
    .journey-preview { padding: 18px; }
    .auth-area { padding-inline: 34px; }
}

@media (max-width: 780px) {
    .back-link { top: 14px; left: 14px; color: var(--ink); background: rgba(255,255,255,.9); box-shadow: 0 5px 18px rgba(12,55,56,.08); }
    .back-link:hover { color: var(--brand-dark); background: #fff; }
    .auth-layout { display: block; }
    .auth-showcase { display: none; }
    .auth-area { min-height: 100vh; justify-content: flex-start; padding: 74px 16px 24px; }
    .mobile-brand { display: block; margin-bottom: 20px; }
    .mobile-brand img { width: 146px; }
    .auth-card { padding: 28px; }
}

@media (max-width: 430px) {
    .back-link { min-height: 40px; padding: 6px 10px; font-size: .73rem; }
    .auth-area { padding-inline: 12px; }
    .auth-card { max-width: calc(100vw - 24px); padding: 24px 18px; border-radius: 19px; }
    .auth-header { margin-bottom: 21px; }
    .auth-tabs { margin-bottom: 23px; }
    .label-row { align-items: flex-start; }
    input { min-height: 48px; font-size: 16px; }
    .toast { top: 12px; right: 12px; left: 12px; max-width: none; }
}

@media (max-width: 340px) {
    .auth-area { padding-inline: 8px; }
    .auth-card { max-width: calc(100vw - 16px); padding-inline: 15px; }
    .mobile-brand img { width: 132px; }
    .label-row { display: block; }
    .action-link { display: inline-block; margin-top: -2px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
