﻿:root {
    --auth-navy: #10253f;
    --auth-navy-mid: #173554;
    --auth-blue: #2f6fed;
    --auth-blue-dark: #2459c7;
    --auth-surface: #ffffff;
    --auth-background: #f4f7fb;
    --auth-border: #d8e1ed;
    --auth-border-soft: #e8edf5;
    --auth-text: #44556b;
    --auth-muted: #718096;
    --auth-danger: #c53030;
    --auth-success: #218653;
}

* {
    box-sizing: border-box;
}

.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(370px, 0.88fr) minmax(520px, 1.12fr);
    background: var(--auth-background);
    font-family: "DM Sans", Arial, sans-serif;
}

.auth-visual {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    background: radial-gradient( circle at 85% 8%, rgba(47, 111, 237, 0.48), transparent 31% ), radial-gradient( circle at 0 94%, rgba(47, 111, 237, 0.23), transparent 38% ), linear-gradient( 145deg, var(--auth-navy), var(--auth-navy-mid) );
    color: #ffffff;
}

    .auth-visual::before,
    .auth-visual::after {
        position: absolute;
        content: "";
        border: 1px solid rgba(255, 255, 255, 0.09);
        border-radius: 28px;
        transform: rotate(-8deg);
    }

    .auth-visual::before {
        width: 245px;
        height: 315px;
        top: 27%;
        right: -105px;
    }

    .auth-visual::after {
        width: 165px;
        height: 215px;
        bottom: 10%;
        left: -72px;
    }

.auth-visual-grid {
    position: absolute;
    inset: 0;
    opacity: 0.35;
    background-image: linear-gradient( rgba(255, 255, 255, 0.025) 1px, transparent 1px ), linear-gradient( 90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px );
    background-size: 36px 36px;
}

.auth-visual-inner {
    position: relative;
    z-index: 1;
    height: 100%;
    max-width: 680px;
    margin: 0 auto;
    padding: 44px clamp(36px, 5vw, 72px);
    display: flex;
    flex-direction: column;
}

.auth-brand {
    display: inline-flex;
    align-items: baseline;
    color: #ffffff;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 31px;
    font-weight: 900;
    letter-spacing: -0.04em;
    text-decoration: none;
}

    .auth-brand span {
        color: inherit;
    }

.auth-brand-dark {
    color: var(--auth-navy);
}

.auth-visual-content {
    margin: auto 0;
}

.auth-eyebrow,
.auth-form-eyebrow {
    display: block;
    margin-bottom: 14px;
    color: #8fb5ff;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.auth-visual h1 {
    max-width: 590px;
    margin: 0 0 23px;
    color: #ffffff;
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(43px, 5vw, 67px);
    font-weight: 900;
    line-height: 1.04;
    letter-spacing: -0.048em;
}

.auth-visual-content > p {
    max-width: 570px;
    margin: 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 17px;
    line-height: 1.8;
}

.auth-feature-list {
    margin-top: 38px;
    display: grid;
    gap: 20px;
}

.auth-feature {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.auth-feature-check {
    width: 27px;
    height: 27px;
    flex: 0 0 27px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(47, 111, 237, 0.36);
    color: #ffffff;
    font-size: 13px;
    font-weight: 900;
}

.auth-feature strong {
    display: block;
    margin-bottom: 3px;
    color: #ffffff;
    font-size: 15px;
}

.auth-feature div > span {
    display: block;
    color: rgba(255, 255, 255, 0.61);
    font-size: 13px;
    line-height: 1.55;
}

.auth-visual-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    color: rgba(255, 255, 255, 0.49);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.auth-main {
    padding: 65px clamp(24px, 7vw, 105px);
    display: flex;
    align-items: center;
}

.auth-mobile-brand {
    display: none;
}

.auth-form-shell {
    width: 100%;
    max-width: 610px;
    margin: 0 auto;
}

.auth-heading {
    margin-bottom: 31px;
}

.auth-form-eyebrow {
    color: var(--auth-blue);
}

.auth-heading h2 {
    margin: 0 0 12px;
    color: var(--auth-navy);
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(36px, 4vw, 50px);
    line-height: 1.08;
    letter-spacing: -0.038em;
}

.auth-heading p {
    margin: 0;
    color: var(--auth-text);
    line-height: 1.7;
}

.auth-validation-summary {
    margin-bottom: 24px;
    padding: 18px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    border: 1px solid #f3b7b7;
    border-left: 5px solid var(--auth-danger);
    border-radius: 12px;
    background: #fff5f5;
    color: #822727;
}

.auth-validation-icon {
    width: 33px;
    height: 33px;
    flex: 0 0 33px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--auth-danger);
    color: #ffffff;
    font-weight: 900;
}

.auth-validation-summary strong {
    display: block;
    margin-bottom: 4px;
}

.auth-validation-summary p {
    margin: 0 0 8px;
    color: #822727;
    font-size: 14px;
}

.auth-validation-summary ul {
    margin: 0;
    padding-left: 20px;
}

.auth-field {
    margin-bottom: 21px;
}

.auth-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.auth-label {
    display: block;
    margin-bottom: 8px;
    color: var(--auth-navy);
    font-size: 14px;
    font-weight: 800;
}

.auth-forgot-link {
    margin-bottom: 8px;
    color: var(--auth-blue);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

    .auth-forgot-link:hover {
        color: var(--auth-blue-dark);
        text-decoration: underline;
    }

.auth-input-group {
    position: relative;
}

.auth-input-icon {
    position: absolute;
    top: 50%;
    left: 15px;
    z-index: 2;
    display: flex;
    color: #8292a7;
    transform: translateY(-50%);
    pointer-events: none;
}

.auth-control {
    width: 100%;
    min-height: 54px;
    padding: 13px 48px 13px 47px;
    border: 1px solid var(--auth-border);
    border-radius: 11px;
    background: #ffffff;
    color: var(--auth-navy);
    font: inherit;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

    .auth-control:focus {
        border-color: var(--auth-blue);
        box-shadow: 0 0 0 4px rgba(47, 111, 237, 0.12);
    }

    .auth-control::placeholder {
        color: #9caabd;
    }

.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    z-index: 3;
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #718096;
    transform: translateY(-50%);
    cursor: pointer;
}

    .auth-password-toggle:hover {
        background: #eef4ff;
        color: var(--auth-blue);
    }

.auth-field-error,
.field-validation-error {
    display: block;
    margin-top: 7px;
    color: var(--auth-danger);
    font-size: 12px;
    font-weight: 700;
}

.auth-control.input-validation-error,
.form-control.input-validation-error {
    border-color: var(--auth-danger);
    background: #fffafa;
    box-shadow: 0 0 0 4px rgba(197, 48, 48, 0.09);
}

.auth-options {
    margin: 2px 0 23px;
}

.auth-remember-option {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--auth-text);
    font-size: 13px;
    cursor: pointer;
}

.auth-checkbox {
    width: 18px;
    height: 18px;
    margin: 0;
    border: 1px solid var(--auth-border);
    border-radius: 4px;
    accent-color: var(--auth-blue);
}

.auth-submit-button {
    width: 100%;
    min-height: 56px;
    padding: 14px 20px;
    border: 0;
    border-radius: 11px;
    background: var(--auth-blue);
    color: #ffffff;
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 14px 28px rgba(47, 111, 237, 0.24);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

    .auth-submit-button:hover:not(:disabled) {
        background: var(--auth-blue-dark);
        transform: translateY(-1px);
        box-shadow: 0 18px 34px rgba(47, 111, 237, 0.3);
    }

    .auth-submit-button:disabled {
        cursor: not-allowed;
        opacity: 0.65;
    }

.auth-submit-normal,
.auth-submit-loading {
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.auth-submit-normal {
    display: flex;
}

.auth-submit-loading:not([hidden]) {
    display: flex;
}

.auth-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: authSpin 0.7s linear infinite;
}

@keyframes authSpin {
    to {
        transform: rotate(360deg);
    }
}

.auth-register-prompt {
    margin-top: 22px;
    color: var(--auth-text);
    text-align: center;
    font-size: 14px;
}

    .auth-register-prompt a {
        color: var(--auth-blue);
        font-weight: 900;
        text-decoration: none;
    }

        .auth-register-prompt a:hover {
            text-decoration: underline;
        }

.auth-divider {
    margin: 29px 0 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--auth-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

    .auth-divider::before,
    .auth-divider::after {
        height: 1px;
        flex: 1;
        content: "";
        background: var(--auth-border);
    }

.auth-external-logins {
    display: grid;
    gap: 11px;
}

.auth-external-button {
    min-height: 52px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    border: 1px solid var(--auth-border);
    border-radius: 11px;
    background: #ffffff;
    color: var(--auth-navy);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

    .auth-external-button:hover {
        border-color: #b8c9df;
        background: #f8fafc;
        transform: translateY(-1px);
    }

.auth-facebook-button {
    border-color: #1877f2;
    background: #1877f2;
    color: #ffffff;
}

    .auth-facebook-button:hover {
        border-color: #1267d6;
        background: #1267d6;
        color: #ffffff;
    }

.auth-external-unavailable {
    padding: 15px;
    border: 1px solid var(--auth-border);
    border-radius: 10px;
    background: #f8fafc;
    color: var(--auth-muted);
    font-size: 13px;
    text-align: center;
}

.auth-help-panel {
    margin-top: 27px;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border: 1px solid var(--auth-border);
    border-radius: 11px;
    background: #f8fafc;
}

.auth-help-icon {
    width: 29px;
    height: 29px;
    flex: 0 0 29px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #eaf1ff;
    color: var(--auth-blue);
    font-weight: 900;
}

.auth-help-panel strong {
    display: block;
    color: var(--auth-navy);
    font-size: 13px;
}

.auth-help-panel p {
    margin: 3px 0 0;
    color: var(--auth-muted);
    font-size: 12px;
    line-height: 1.55;
}

@media (max-width: 1000px) {
    .auth-page {
        grid-template-columns: minmax(330px, 0.75fr) minmax(500px, 1.25fr);
    }

    .auth-main {
        padding-left: 35px;
        padding-right: 35px;
    }

    .auth-visual-inner {
        padding-left: 36px;
        padding-right: 36px;
    }
}

@media (max-width: 850px) {
    .auth-page {
        display: block;
    }

    .auth-visual {
        position: relative;
        height: auto;
        min-height: 510px;
    }

    .auth-visual-inner {
        max-width: 760px;
        min-height: 510px;
        padding: 34px 28px 42px;
    }

    .auth-visual-content {
        margin: 56px 0;
    }

    .auth-visual h1 {
        max-width: 700px;
        font-size: 48px;
    }

    .auth-feature-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .auth-main {
        padding: 55px 24px 70px;
    }
}

@media (max-width: 620px) {
    .auth-visual {
        display: none;
    }

    .auth-main {
        min-height: 100vh;
        padding: 29px 16px 55px;
        align-items: flex-start;
    }

    .auth-mobile-brand {
        margin-bottom: 38px;
        display: block;
        text-align: center;
    }

    .auth-heading {
        text-align: center;
    }

        .auth-heading h2 {
            font-size: 38px;
        }

    .auth-label-row {
        align-items: flex-start;
    }
}

@media (max-width: 390px) {
    .auth-main {
        padding-left: 11px;
        padding-right: 11px;
    }

    .auth-heading h2 {
        font-size: 34px;
    }

    .auth-label-row {
        display: block;
    }

    .auth-forgot-link {
        display: inline-block;
        margin-top: -2px;
    }
}
