@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@600;700;800&display=swap');

:root {
    --auth-navy: #071b33;
    --auth-blue: #0875c1;
    --auth-blue-dark: #075c98;
    --auth-green: #58bd38;
    --auth-text: #17263a;
    --auth-muted: #68778b;
    --auth-line: #dbe4ee;
}

* { box-sizing: border-box; }

body.auth-page {
    min-height: 100vh;
    margin: 0;
    padding: 24px;
    display: grid;
    place-items: center;
    overflow-x: hidden;
    color: var(--auth-text);
    background: #edf4f8;
    font-family: 'DM Sans', sans-serif;
}

body.auth-page::before,
body.auth-page::after {
    content: '';
    position: fixed;
    z-index: 0;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    filter: blur(2px);
    pointer-events: none;
}

body.auth-page::before {
    top: -230px;
    right: -120px;
    background: rgba(8, 117, 193, .13);
}

body.auth-page::after {
    bottom: -270px;
    left: -140px;
    background: rgba(88, 189, 56, .12);
}

.auth-shell {
    position: relative;
    z-index: 1;
    width: min(1040px, 100%);
    min-height: 650px;
    display: grid;
    grid-template-columns: minmax(330px, .88fr) minmax(430px, 1.12fr);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.8);
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 30px 80px rgba(22, 49, 75, .16);
}

.auth-brand {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(145deg, #06192e 0%, #0a3154 64%, #075b71 100%);
}

.auth-brand::before {
    content: '';
    position: absolute;
    z-index: -1;
    width: 360px;
    height: 360px;
    right: -190px;
    top: 80px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 50%;
    box-shadow: 0 0 0 45px rgba(255,255,255,.035), 0 0 0 90px rgba(255,255,255,.025);
}

.auth-brand::after {
    content: '';
    position: absolute;
    z-index: -1;
    width: 170px;
    height: 170px;
    left: -70px;
    bottom: -60px;
    border-radius: 42px;
    transform: rotate(24deg);
    background: linear-gradient(135deg, rgba(88,189,56,.22), transparent);
}

.auth-logo {
    width: 186px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 8px 20px rgba(0,0,0,.18));
}

.auth-brand-copy { max-width: 330px; }

.auth-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: #8cdda6;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.auth-eyebrow::before {
    content: '';
    width: 22px;
    height: 2px;
    border-radius: 99px;
    background: var(--auth-green);
}

.auth-brand h2 {
    margin: 0 0 18px;
    color: #fff;
    font-family: 'Manrope', sans-serif;
    font-size: clamp(2rem, 3vw, 2.65rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -.045em;
}

.auth-brand p {
    margin: 0;
    color: rgba(255,255,255,.7);
    font-size: .97rem;
    line-height: 1.75;
}

.auth-trust {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,.62);
    font-size: .8rem;
}

.auth-trust i { color: #8cdda6; font-size: 1rem; }

.auth-benefits {
    display: grid;
    gap: 10px;
    color: rgba(255,255,255,.68);
    font-size: .8rem;
}

.auth-benefits span { display: flex; align-items: center; gap: 9px; }
.auth-benefits i { width: 20px; color: #8cdda6; font-size: 1rem; text-align: center; }

.auth-content {
    display: flex;
    align-items: center;
    padding: 56px clamp(42px, 7vw, 84px);
    background:
            radial-gradient(circle at 100% 0, rgba(8,117,193,.045), transparent 32%),
            #fff;
}

.auth-form-wrap { width: 100%; max-width: 440px; margin: auto; }

.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 36px;
    color: var(--auth-muted);
    font-size: .88rem;
    font-weight: 600;
    text-decoration: none;
    transition: color .2s, transform .2s;
}

.auth-back:hover { color: var(--auth-blue); transform: translateX(-2px); }

.auth-icon {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    margin-bottom: 22px;
    border-radius: 15px;
    color: var(--auth-blue);
    background: #e9f5fc;
    font-size: 1.35rem;
}

.auth-title {
    margin: 0 0 10px;
    color: var(--auth-text);
    font-family: 'Manrope', sans-serif;
    font-size: clamp(1.75rem, 3vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -.04em;
}

.auth-subtitle {
    margin: 0 0 30px;
    color: var(--auth-muted);
    line-height: 1.65;
}

.auth-page .alert {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 22px;
    padding: 13px 15px;
    border: 0;
    border-radius: 12px;
    font-size: .88rem;
}

.auth-page .alert-danger { color: #9a2e2e; background: #fff0f0; }
.auth-page .alert-success { color: #17683f; background: #eaf9f0; }

.auth-field { margin-bottom: 18px; }

.auth-field label {
    display: block;
    margin-bottom: 8px;
    color: #34465b;
    font-size: .86rem;
    font-weight: 700;
}

.auth-input-wrap { position: relative; }

.auth-input-wrap > i {
    position: absolute;
    top: 50%;
    left: 16px;
    z-index: 2;
    transform: translateY(-50%);
    color: #8a99aa;
    font-size: 1.05rem;
    pointer-events: none;
}

.auth-page .form-control {
    min-height: 54px;
    padding: 13px 48px 13px 46px;
    border: 1px solid var(--auth-line);
    border-radius: 12px;
    color: var(--auth-text);
    background: #fbfcfe;
    box-shadow: none;
    font-size: .95rem;
    transition: border-color .2s, box-shadow .2s, background .2s;
}

.auth-page .form-control::placeholder { color: #9aa7b5; }
.auth-page .form-control:focus {
    border-color: rgba(8,117,193,.65);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(8,117,193,.1);
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    z-index: 3;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    padding: 0;
    transform: translateY(-50%);
    border: 0;
    border-radius: 8px;
    color: #7c8a9b;
    background: transparent;
}

.password-toggle:hover { color: var(--auth-blue); background: #edf6fc; }
.password-toggle:focus-visible { outline: 3px solid rgba(8,117,193,.2); }

.auth-options {
    display: flex;
    justify-content: flex-end;
    margin: -2px 0 22px;
}

.auth-link { color: var(--auth-blue-dark); font-size: .87rem; font-weight: 700; text-decoration: none; }
.auth-link:hover { color: var(--auth-blue); text-decoration: underline; }

.auth-page .btn-auth-primary,
.auth-page .btn-auth-secondary {
    width: 100%;
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border-radius: 12px;
    font-size: .93rem;
    font-weight: 700;
    transition: transform .2s, box-shadow .2s, background .2s;
}

.auth-page .btn-auth-primary {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, #0875c1, #075b98);
    box-shadow: 0 12px 24px rgba(8, 93, 154, .2);
}

.auth-page .btn-auth-primary:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(8, 93, 154, .27);
}

.auth-page .btn-auth-secondary {
    border: 1px solid var(--auth-line);
    color: #516175;
    background: #fff;
}

.auth-page .btn-auth-secondary:hover { color: var(--auth-blue-dark); background: #f5f9fc; border-color: #bdcedd; }
.auth-actions { display: grid; gap: 11px; }

.password-hint { margin: -7px 0 18px; color: var(--auth-muted); font-size: .78rem; }

.auth-error-list { margin: 5px 0 0; padding-left: 18px; }
.auth-error-list li + li { margin-top: 3px; }
.auth-login-prompt { margin: 24px 0 0; color: var(--auth-muted); font-size: .86rem; text-align: center; }

.auth-register-page .auth-shell { min-height: 760px; }
.auth-register-page .auth-content { padding-top: 42px; padding-bottom: 42px; }
.auth-register-page .auth-back { margin-bottom: 24px; }
.auth-register-page .auth-icon { margin-bottom: 17px; }
.auth-register-page .auth-subtitle { margin-bottom: 24px; }
.auth-register-page .auth-field { margin-bottom: 15px; }

.auth-footer {
    margin: 28px 0 0;
    color: #8995a4;
    font-size: .76rem;
    text-align: center;
}

@media (max-width: 820px) {
    body.auth-page { padding: 0; place-items: stretch; background: #fff; }
    .auth-shell { min-height: 100vh; grid-template-columns: 1fr; border: 0; border-radius: 0; box-shadow: none; }
    .auth-brand { min-height: 210px; padding: 30px; justify-content: flex-start; }
    .auth-logo { width: 150px; }
    .auth-brand-copy { margin-top: 30px; }
    .auth-brand-copy .auth-eyebrow, .auth-brand-copy p, .auth-trust { display: none; }
    .auth-benefits { display: none; }
    .auth-brand h2 { max-width: 360px; margin: 0; font-size: 1.75rem; }
    .auth-content { margin-top: -28px; padding: 40px 28px 34px; border-radius: 26px 26px 0 0; }
    .auth-back { margin-bottom: 28px; }
    .auth-register-page .auth-shell { min-height: 100vh; }
}

@media (max-width: 420px) {
    .auth-brand { min-height: 188px; padding: 24px; }
    .auth-brand-copy { margin-top: 24px; }
    .auth-brand h2 { font-size: 1.48rem; }
    .auth-content { padding: 34px 20px 28px; }
    .auth-title { font-size: 1.7rem; }
}

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