:root {
    --auth-bg: #eef3f9;
    --auth-panel: #ffffff;
    --auth-ink: #0f172a;
    --auth-text: #334155;
    --auth-muted: #64748b;
    --auth-line: #dbe4ef;
    --auth-blue: #2563eb;
    --auth-blue-dark: #1d4ed8;
    --auth-navy: #08111f;
    --auth-radius: 22px;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body.auth-page {
    display: grid;
    min-height: 100vh;
    margin: 0;
    padding: clamp(18px, 4vw, 48px);
    place-items: center;
    background:
        radial-gradient(circle at 10% 10%, rgba(59, 130, 246, 0.1), transparent 30%),
        radial-gradient(circle at 90% 90%, rgba(20, 184, 166, 0.08), transparent 28%),
        var(--auth-bg);
    color: var(--auth-text);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.55;
}

.auth-shell {
    display: grid;
    width: min(1120px, 100%);
    min-height: min(700px, calc(100vh - 48px));
    overflow: hidden;
    grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.92fr);
    background: var(--auth-panel);
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: var(--auth-radius);
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.14);
}

.auth-story {
    display: flex;
    position: relative;
    overflow: hidden;
    padding: clamp(36px, 5vw, 66px);
    flex-direction: column;
    justify-content: space-between;
    background:
        radial-gradient(circle at 82% 18%, rgba(37, 99, 235, 0.42), transparent 31%),
        radial-gradient(circle at 18% 86%, rgba(20, 184, 166, 0.17), transparent 33%),
        var(--auth-navy);
    color: #fff;
}

.auth-story::after {
    position: absolute;
    right: -90px;
    bottom: 52px;
    width: 250px;
    height: 250px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 52px;
    content: "";
    transform: rotate(18deg);
}

.auth-brand,
.auth-brand:visited {
    display: inline-flex;
    position: relative;
    z-index: 1;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
}

.auth-brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    background: #2563eb;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.28);
    font-size: 21px;
    font-weight: 750;
    letter-spacing: -0.07em;
}

.auth-brand-mark span {
    color: #7dd3fc;
}

.auth-brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.auth-brand-copy strong {
    font-size: 16px;
    letter-spacing: -0.03em;
}

.auth-brand-copy small {
    margin-top: 4px;
    color: #7f91ab;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.auth-story-content {
    position: relative;
    z-index: 1;
    max-width: 500px;
    margin: 58px 0;
}

.auth-story-kicker {
    display: inline-flex;
    margin-bottom: 20px;
    padding: 7px 10px;
    align-items: center;
    gap: 7px;
    background: rgba(96, 165, 250, 0.12);
    border: 1px solid rgba(147, 197, 253, 0.18);
    border-radius: 99px;
    color: #bfdbfe;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.auth-story-kicker::before {
    width: 6px;
    height: 6px;
    background: #2dd4bf;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.11);
    content: "";
}

.auth-story h1 {
    max-width: 490px;
    margin: 0 0 18px;
    color: #fff;
    font-size: clamp(36px, 5vw, 55px);
    font-weight: 720;
    line-height: 1.05;
    letter-spacing: -0.055em;
}

.auth-story-content > p {
    max-width: 450px;
    margin: 0;
    color: #9fb0c7;
    font-size: 15px;
    line-height: 1.75;
}

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

.auth-benefits li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #c8d5e6;
    font-size: 12px;
}

.auth-benefits i {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 7px;
    color: #7dd3fc;
    font-size: 11px;
}

.auth-story-footer {
    display: flex;
    position: relative;
    z-index: 1;
    align-items: center;
    gap: 9px;
    color: #708199;
    font-size: 10px;
}

.auth-story-footer i {
    color: #5eead4;
}

.auth-panel {
    display: grid;
    padding: clamp(34px, 5vw, 66px);
    place-items: center;
    background: #fff;
}

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

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

.auth-form-kicker {
    display: block;
    margin-bottom: 9px;
    color: var(--auth-blue);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.auth-form-header h2 {
    margin: 0 0 9px;
    color: var(--auth-ink);
    font-size: 28px;
    font-weight: 720;
    line-height: 1.2;
    letter-spacing: -0.04em;
}

.auth-form-header p {
    margin: 0;
    color: var(--auth-muted);
    font-size: 13px;
}

.auth-alert {
    display: flex;
    margin-bottom: 20px;
    padding: 12px 13px;
    align-items: flex-start;
    gap: 9px;
    border: 1px solid;
    border-radius: 10px;
    font-size: 11px;
    line-height: 1.5;
}

.auth-alert i {
    margin-top: 2px;
}

.auth-alert-danger {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #9f1239;
}

.auth-alert-success {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

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

.auth-field > label {
    display: block;
    margin: 0 0 7px;
    color: #334155;
    font-size: 11px;
    font-weight: 680;
}

.auth-input-wrap {
    display: flex;
    position: relative;
    align-items: center;
}

.auth-input-icon {
    position: absolute;
    left: 13px;
    z-index: 1;
    color: #94a3b8;
    font-size: 13px;
    pointer-events: none;
}

.auth-input {
    width: 100%;
    min-height: 46px;
    padding: 10px 44px 10px 39px;
    background: #fff;
    border: 1px solid var(--auth-line);
    border-radius: 10px;
    color: var(--auth-ink);
    font: inherit;
    font-size: 13px;
    outline: 0;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.auth-input::placeholder {
    color: #9aa8b9;
}

.auth-input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.auth-password-toggle {
    display: grid;
    position: absolute;
    right: 8px;
    width: 32px;
    height: 32px;
    place-items: center;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: #94a3b8;
    cursor: pointer;
}

.auth-password-toggle:hover {
    background: #f1f5f9;
    color: #475569;
}

.auth-submit {
    display: inline-flex;
    width: 100%;
    min-height: 47px;
    margin-top: 5px;
    padding: 10px 16px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--auth-blue);
    border: 1px solid var(--auth-blue);
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.16);
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 680;
    cursor: pointer;
    transition: background-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.auth-submit:hover {
    background: var(--auth-blue-dark);
    box-shadow: 0 13px 24px rgba(37, 99, 235, 0.21);
    transform: translateY(-1px);
}

.auth-submit:disabled {
    cursor: wait;
    opacity: 0.72;
    transform: none;
}

.auth-security-note {
    display: flex;
    margin-top: 23px;
    align-items: flex-start;
    gap: 10px;
    color: var(--auth-muted);
    font-size: 10px;
    line-height: 1.55;
}

.auth-security-note i {
    margin-top: 2px;
    color: #0f766e;
}

@media (max-width: 900px) {
    body.auth-page {
        padding: 16px;
    }

    .auth-shell {
        min-height: auto;
        grid-template-columns: 1fr;
    }

    .auth-story {
        min-height: 310px;
        padding: 32px;
    }

    .auth-story-content {
        margin: 45px 0 10px;
    }

    .auth-story h1 {
        max-width: 620px;
        font-size: clamp(32px, 8vw, 45px);
    }

    .auth-story-content > p {
        max-width: 620px;
    }

    .auth-benefits {
        display: none;
    }

    .auth-story-footer {
        display: none;
    }

    .auth-panel {
        padding: 42px 28px 48px;
    }
}

@media (max-width: 520px) {
    .auth-story {
        min-height: 250px;
        padding: 25px;
    }

    .auth-story-content {
        margin: 34px 0 0;
    }

    .auth-story-kicker {
        display: none;
    }

    .auth-story h1 {
        font-size: 31px;
    }

    .auth-story-content > p {
        display: none;
    }

    .auth-panel {
        padding: 34px 22px 38px;
    }
}

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