@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800;900&family=Poppins:wght@400;500;600;700;800&display=swap');

:root {
    --after-red: #f3293d;
    --after-red-dark: #d91831;
    --after-navy: #102b59;
    --after-blue: #3f83f8;
    --after-yellow: #ffc83d;
    --after-pink: #ff7fa1;
    --after-mint: #64d8c1;
    --after-bg: #f7faff;
    --after-text: #19345e;
    --after-muted: #72809a;
    --after-border: #dce5f2;
    --card-shadow: 0 24px 70px rgba(24, 52, 94, .16);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
    margin: 0;
    font-family: 'Nunito', 'Poppins', sans-serif;
    color: var(--after-text);
    background:
        radial-gradient(circle at 5% 10%, rgba(255, 200, 61, .20), transparent 25%),
        radial-gradient(circle at 95% 15%, rgba(63, 131, 248, .18), transparent 25%),
        linear-gradient(135deg, #f7fbff 0%, #fff8f8 48%, #f7fbff 100%);
}

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

.auth-page {
    min-height: 100svh;
    padding: 22px;
    display: grid;
    place-items: center;
    overflow: hidden;
    position: relative;
}

.auth-page::before,
.auth-page::after {
    content: '';
    position: fixed;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    filter: blur(2px);
    pointer-events: none;
    z-index: 0;
}
.auth-page::before { background: rgba(255, 127, 161, .15); top: -100px; left: -80px; }
.auth-page::after { background: rgba(100, 216, 193, .18); bottom: -100px; right: -80px; }

.auth-shell {
    width: min(1380px, 100%);
    min-height: min(850px, calc(100svh - 44px));
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(480px, .96fr);
    background: rgba(255,255,255,.76);
    border: 1px solid rgba(255,255,255,.9);
    border-radius: 34px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(18px);
}

.auth-hero {
    position: relative;
    min-height: 700px;
    background: #d9edff;
    overflow: hidden;
}
.auth-hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}
.auth-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,.04) 45%, rgba(13,35,74,.18) 100%);
    pointer-events: none;
}

.auth-brand {
    position: absolute;
    top: 28px;
    left: 32px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    padding: 9px 14px;
    border-radius: 18px;
    background: rgba(255,255,255,.90);
    box-shadow: 0 12px 30px rgba(13,35,74,.12);
}
.auth-brand img { width: 190px; max-width: 40vw; height: auto; display: block; }

.auth-hero-caption {
    display: none;
    position: absolute;
    z-index: 2;
    left: 32px;
    bottom: 28px;
    max-width: 470px;
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,.15);
}
.auth-hero-caption strong { display:block; font-size: 15px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 7px; }
.auth-hero-caption span { font-size: 18px; font-weight: 700; }

.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 42px clamp(28px, 5vw, 76px);
    background: rgba(255,255,255,.93);
}

.auth-card { width: min(470px, 100%); }
.auth-logo-mobile { display: none; justify-content: center; margin-bottom: 22px; }
.auth-logo-mobile img { width: min(280px, 76vw); height: auto; }

.eyebrow {
    color: var(--after-red);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .16em;
    text-transform: uppercase;
    margin-bottom: 9px;
}
.auth-title { margin: 0; font-family: 'Poppins', sans-serif; font-size: clamp(28px, 3vw, 40px); line-height: 1.12; color: var(--after-navy); font-weight: 800; }
.auth-subtitle { margin: 11px 0 27px; color: var(--after-muted); font-size: 15px; line-height: 1.65; }

.auth-form { display: grid; gap: 15px; }
.field { position: relative; }
.field-label { display:block; margin: 0 0 7px 4px; font-size: 13px; font-weight: 800; color: var(--after-navy); }
.field-wrap { position: relative; }
.field-icon {
    position:absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6e84a5;
    font-size: 22px;
    pointer-events:none;
    z-index: 2;
}
.field input,
.field textarea,
.select2-container--default .select2-selection--single {
    width: 100%;
    min-height: 54px;
    border: 1.5px solid var(--after-border);
    border-radius: 16px;
    background: #fbfdff;
    color: var(--after-navy);
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease, transform .2s ease;
}
.field input { padding: 0 48px 0 48px; }
.field textarea { min-height: 88px; padding: 15px 16px 15px 48px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #9aa8bc; }
.field input:focus, .field textarea:focus,
.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--after-blue);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(63,131,248,.10);
}

.password-toggle {
    position:absolute;
    right: 9px;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #70819b;
    cursor: pointer;
}
.password-toggle:hover { background: #edf3fb; color: var(--after-navy); }

.primary-btn {
    width: 100%;
    min-height: 57px;
    margin-top: 5px;
    border: 0;
    border-radius: 17px;
    color: #fff;
    background: linear-gradient(135deg, var(--after-red), #ff4658);
    box-shadow: 0 14px 26px rgba(243,41,61,.23);
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.primary-btn:hover { transform: translateY(-2px); box-shadow: 0 17px 30px rgba(243,41,61,.28); filter: saturate(1.05); }
.primary-btn:active { transform: translateY(0); }
.primary-btn:disabled { cursor: wait; opacity: .75; transform: none; }

.action-link {
    display:block;
    text-align:center;
    margin-top: 13px;
    color: var(--after-red);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
}
.action-link:hover { text-decoration: underline; }

.divider { display:flex; align-items:center; gap:12px; margin: 21px 0 15px; color:#9aa8bc; font-size:13px; }
.divider::before, .divider::after { content:''; height:1px; flex:1; background:#e4eaf2; }

.secondary-action {
    display:flex;
    align-items:center;
    justify-content:center;
    gap:11px;
    min-height:61px;
    padding: 10px 16px;
    border: 1.5px solid #9fc1fa;
    border-radius: 17px;
    color: var(--after-navy);
    background: #fff;
    text-decoration:none;
    font-weight:900;
    transition: background .2s ease, transform .2s ease, border-color .2s ease;
}
.secondary-action:hover { background:#f3f8ff; border-color:#6f9ff1; transform:translateY(-1px); }
.secondary-action small { display:block; color:var(--after-muted); font-size:11px; font-weight:600; margin-top:2px; }
.secondary-action .material-symbols-rounded { color: var(--after-blue); font-size: 25px; }

.security-note {
    display:flex;
    gap:10px;
    align-items:flex-start;
    margin-top:18px;
    padding:13px 14px;
    border-radius:15px;
    background:linear-gradient(135deg,#fff0f2,#fff7f8);
    color:#a83a4a;
    font-size:11px;
    line-height:1.45;
}
.security-note .material-symbols-rounded { font-size:20px; color:var(--after-red); }

.auth-footer { text-align:center; color:#8290a5; font-size:11px; margin-top:23px; }

/* Registration */
.register-shell { grid-template-columns: minmax(0, .82fr) minmax(570px, 1.18fr); }
.register-panel { padding-top: 30px; padding-bottom:30px; overflow:auto; }
.register-card { width:min(650px,100%); }
.stepper { display:flex; align-items:center; margin:0 0 24px; }
.step { display:flex; align-items:center; gap:7px; color:#9aa8bc; font-size:11px; font-weight:800; white-space:nowrap; }
.step-bubble { width:29px; height:29px; display:grid; place-items:center; border-radius:50%; background:#e9eef5; color:#75839a; font-weight:900; }
.step.active { color:var(--after-red); }
.step.active .step-bubble { color:#fff; background:var(--after-red); box-shadow:0 5px 14px rgba(243,41,61,.2); }
.step-line { height:1px; flex:1; margin:0 10px; background:#e1e7ef; }
.register-grid { display:grid; grid-template-columns:1fr 1fr; gap:15px; }
.register-grid .full { grid-column:1 / -1; }
.register-actions { display:grid; grid-template-columns:.75fr 1.25fr; gap:12px; margin-top:4px; }
.back-btn { min-height:57px; border:1.5px solid var(--after-border); border-radius:17px; color:var(--after-navy); background:#fff; font-weight:900; cursor:pointer; text-decoration:none; display:flex; align-items:center; justify-content:center; gap:7px; }
.back-btn:hover { background:#f6f9fd; }

.select2-container { width:100% !important; }
.select2-container--default .select2-selection--single { display:flex; align-items:center; padding-left:46px; }
.select2-container--default .select2-selection--single .select2-selection__rendered { padding:0 42px 0 0; color:var(--after-navy); font-size:14px; }
.select2-container--default .select2-selection--single .select2-selection__placeholder { color:#9aa8bc; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height:100%; right:11px; }
.select2-dropdown { border:1px solid var(--after-border); border-radius:14px; overflow:hidden; box-shadow:0 15px 35px rgba(18,45,84,.15); }
.select2-search--dropdown { padding:9px; }
.select2-container--default .select2-search--dropdown .select2-search__field { border:1px solid var(--after-border); border-radius:9px; padding:8px; outline:none; }
.select2-results__option { padding:9px 12px; font-size:13px; }
.select2-results__option--highlighted[aria-selected] { background:var(--after-blue); }

@media (max-width: 1050px) {
    .auth-shell { grid-template-columns: .82fr 1.18fr; }
    .auth-brand img { width:160px; }
    .auth-panel { padding-left:38px; padding-right:38px; }
    .auth-hero-caption { max-width:350px; }
}

@media (max-width: 820px) {
    .auth-page { padding:0; display:block; overflow:auto; }
    .auth-shell, .register-shell { width:100%; min-height:100svh; border-radius:0; display:flex; flex-direction:column; box-shadow:none; background:#fff; }
    .auth-hero { min-height:235px; height:235px; flex:0 0 235px; }
    .auth-hero-image { object-position:left top; }
    .auth-brand { top:15px; left:15px; padding:7px 10px; border-radius:14px; }
    .auth-brand img { width:145px; }
    .auth-hero-caption { display:none; }
    .auth-panel { padding:30px 20px 25px; align-items:flex-start; background:#fff; }
    .auth-card, .register-card { width:100%; }
    .auth-logo-mobile { display:flex; }
    .auth-logo-mobile img { width:220px; }
    .auth-title { font-size:29px; }
    .auth-subtitle { margin-bottom:22px; }
    .register-panel { overflow:visible; }
    .register-grid { grid-template-columns:1fr; }
    .register-grid .full { grid-column:auto; }
    .register-actions { grid-template-columns:1fr; }
    .register-actions .primary-btn { order:-1; }
    .step { font-size:9px; }
    .step-bubble { width:27px; height:27px; }
}

@media (max-width: 430px) {
    .auth-hero { min-height:190px; height:190px; }
    .auth-brand img { width:125px; }
    .auth-panel { padding:24px 16px 22px; }
    .auth-title { font-size:26px; }
    .auth-subtitle { font-size:13px; }
    .field input, .field textarea, .select2-container--default .select2-selection--single { min-height:51px; }
    .primary-btn, .back-btn { min-height:54px; }
}

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