:root {
    --auth-ink: #0f172a;
    --auth-muted: #64748b;
    --auth-line: #dbe4ee;
    --auth-surface: #ffffff;
    --auth-primary: var(--primary, #007ea8);
    --auth-primary-dark: var(--primary1, #0f5d75);
}

html,
body.modern-auth-page {
    min-height: 100%;
}

body.modern-auth-page {
    margin: 0;
    color: var(--auth-ink);
    background: #f4f7fb;
    font-family: "Segoe UI", Inter, Roboto, Arial, sans-serif;
    overflow-x: hidden;
}

.modern-auth-page *,
.modern-auth-page *::before,
.modern-auth-page *::after {
    box-sizing: border-box;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(390px, 0.95fr) minmax(520px, 1.05fr);
}

.auth-visual {
    position: relative;
    isolation: isolate;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    justify-content: space-between;
    padding: 54px clamp(38px, 5vw, 82px);
    color: #fff;
    overflow: hidden;
    background:
        radial-gradient(circle at 15% 16%, rgba(34, 211, 238, .28), transparent 30%),
        radial-gradient(circle at 86% 80%, rgba(59, 130, 246, .30), transparent 34%),
        linear-gradient(145deg, #071b2a 0%, #06384d 46%, #075e78 100%);
}

.auth-visual::before,
.auth-visual::after {
    position: absolute;
    z-index: -1;
    content: "";
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 999px;
}

.auth-visual::before {
    width: 420px;
    height: 420px;
    top: -180px;
    right: -180px;
}

.auth-visual::after {
    width: 280px;
    height: 280px;
    right: 8%;
    bottom: -130px;
    box-shadow: 0 0 0 60px rgba(255, 255, 255, .025), 0 0 0 120px rgba(255, 255, 255, .018);
}

.auth-brand,
.auth-brand:hover {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 13px;
    color: #fff;
    text-decoration: none;
}

.auth-brand-mark {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 14px;
    color: #fff;
    background: rgba(255, 255, 255, .12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2);
    backdrop-filter: blur(12px);
}

.auth-brand-copy strong,
.auth-brand-copy span {
    display: block;
}

.auth-brand-copy strong {
    max-width: 270px;
    overflow: hidden;
    font-size: 17px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auth-brand-copy span {
    margin-top: 3px;
    color: rgba(255, 255, 255, .64);
    font-size: 12px;
}

.auth-hero {
    max-width: 610px;
    padding: 70px 0;
}

.auth-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    color: #b9f4ff;
    background: rgba(255, 255, 255, .08);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.auth-hero h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(38px, 4vw, 62px);
    font-weight: 800;
    letter-spacing: -.045em;
    line-height: 1.06;
}

.auth-hero > p {
    max-width: 570px;
    margin: 24px 0 30px;
    color: rgba(255, 255, 255, .72);
    font-size: 17px;
    line-height: 1.75;
}

.auth-benefits {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.auth-benefits li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, .9);
    font-size: 14px;
}

.auth-benefits i {
    display: grid;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    place-items: center;
    border-radius: 9px;
    color: #96f1ff;
    background: rgba(255, 255, 255, .1);
    font-size: 12px;
}

.auth-visual-footer {
    color: rgba(255, 255, 255, .48);
    font-size: 12px;
}

.auth-content {
    position: relative;
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    padding: 54px clamp(28px, 6vw, 100px);
    background:
        radial-gradient(circle at 90% 0%, rgba(14, 165, 233, .10), transparent 24%),
        #f8fafc;
}

.auth-home-link {
    position: absolute;
    top: 30px;
    right: 34px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #475569;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: color .2s ease, transform .2s ease;
}

.auth-home-link:hover {
    color: var(--auth-primary);
    transform: translateX(-2px);
}

.auth-card {
    width: min(100%, 500px);
    padding: 6px 0;
}

.auth-card.auth-card-register {
    width: min(100%, 540px);
}

.auth-card-header {
    margin-bottom: 30px;
}

.auth-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 12px;
    color: var(--auth-primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.auth-card h1 {
    margin: 0 0 10px;
    color: var(--auth-ink);
    font-size: clamp(32px, 4vw, 44px);
    font-weight: 800;
    letter-spacing: -.04em;
    line-height: 1.1;
}

.auth-card-header > p {
    margin: 0;
    color: var(--auth-muted);
    font-size: 15px;
    line-height: 1.7;
}

.auth-form {
    display: grid;
    gap: 19px;
}

.auth-field label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: #334155;
    font-size: 13px;
    font-weight: 750;
}

.auth-field label a {
    color: var(--auth-primary);
    font-weight: 700;
    text-decoration: none;
}

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

.auth-input-icon {
    position: absolute;
    top: 50%;
    left: 16px;
    color: #94a3b8;
    font-size: 14px;
    transform: translateY(-50%);
    pointer-events: none;
}

.auth-input-wrap .form-control {
    width: 100%;
    height: 52px;
    padding: 0 46px 0 44px;
    border: 1px solid var(--auth-line);
    border-radius: 14px;
    color: #0f172a;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .025);
    font-size: 14px;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.auth-input-wrap .form-control::placeholder {
    color: #a3afbf;
}

.auth-input-wrap .form-control:focus {
    border-color: color-mix(in srgb, var(--auth-primary) 65%, white);
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--auth-primary) 13%, transparent);
}

.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 11px;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 0;
    border-radius: 10px;
    color: #94a3b8;
    background: transparent;
    transform: translateY(-50%);
    cursor: pointer;
}

.auth-password-toggle:hover {
    color: var(--auth-primary);
    background: #eef6f9;
}

.auth-submit {
    display: inline-flex;
    width: 100%;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 3px;
    border: 0;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--auth-primary-dark), var(--auth-primary));
    box-shadow: 0 13px 28px color-mix(in srgb, var(--auth-primary) 24%, transparent);
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.auth-submit:hover:not(:disabled) {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 16px 34px color-mix(in srgb, var(--auth-primary) 32%, transparent);
}

.auth-submit:disabled {
    cursor: wait;
    opacity: .72;
}

.auth-switch {
    margin: 26px 0 0;
    color: var(--auth-muted);
    font-size: 14px;
    text-align: center;
}

.auth-switch a {
    color: var(--auth-primary);
    font-weight: 800;
    text-decoration: none;
}

.auth-switch a:hover,
.auth-field label a:hover {
    text-decoration: underline;
}

.auth-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 34px;
    padding-top: 20px;
    border-top: 1px solid #e8eef5;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.auth-trust span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.auth-trust i {
    color: #22a06b;
}

.auth-strength {
    margin-top: 9px;
}

.auth-strength-track {
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: #e7edf4;
}

.auth-strength-bar {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #cbd5e1;
    transition: width .25s ease, background .25s ease;
}

.auth-strength-label {
    display: block;
    min-height: 17px;
    margin-top: 6px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
}

.auth-strength[data-level="weak"] .auth-strength-bar {
    width: 30%;
    background: #ef4444;
}

.auth-strength[data-level="medium"] .auth-strength-bar {
    width: 65%;
    background: #f59e0b;
}

.auth-strength[data-level="strong"] .auth-strength-bar {
    width: 100%;
    background: #22a06b;
}

.auth-captcha {
    display: flex;
    justify-content: center;
    overflow: hidden;
}

@media (max-width: 980px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-visual {
        min-height: 300px;
        padding: 34px clamp(24px, 7vw, 60px);
    }

    .auth-hero {
        padding: 42px 0 22px;
    }

    .auth-hero h2 {
        max-width: 700px;
        font-size: clamp(34px, 7vw, 52px);
    }

    .auth-hero > p,
    .auth-benefits,
    .auth-visual-footer {
        display: none;
    }

    .auth-content {
        min-height: calc(100vh - 300px);
        padding: 60px clamp(24px, 8vw, 80px);
    }
}

@media (max-width: 560px) {
    .auth-visual {
        min-height: 210px;
        padding: 24px;
    }

    .auth-brand-mark {
        width: 40px;
        height: 40px;
    }

    .auth-hero {
        padding: 32px 0 4px;
    }

    .auth-hero h2 {
        font-size: 31px;
    }

    .auth-kicker {
        display: none;
    }

    .auth-content {
        min-height: calc(100vh - 210px);
        align-items: flex-start;
        padding: 64px 22px 40px;
    }

    .auth-home-link {
        top: 22px;
        right: 22px;
    }

    .auth-card h1 {
        font-size: 32px;
    }

    .auth-card-header {
        margin-bottom: 25px;
    }

    .auth-form {
        gap: 16px;
    }

    .auth-trust {
        flex-wrap: wrap;
        gap: 10px 16px;
    }
}
