:root {
    --auth-login-bg-start: #f7f9fd;
    --auth-login-bg-end: #edf2f9;
    --auth-login-card: #ffffff;
    --auth-login-border: rgba(198, 209, 227, 0.55);
    --auth-login-shadow: 0 28px 70px rgba(31, 49, 96, 0.12);
    --auth-login-text: #1d2a43;
    --auth-login-muted: #798497;
    --auth-login-soft: #f2f5fa;
    --auth-login-soft-border: #dbe2f0;
    --auth-login-primary: #13294f;
    --auth-login-primary-end: #10203f;
    --auth-login-accent: #f28a1a;
    --auth-login-outline: rgba(242, 138, 26, 0.12);
}

.auth-login-page {
    min-height: 100vh;
    padding: 32px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 40%),
        linear-gradient(180deg, var(--auth-login-bg-start) 0%, var(--auth-login-bg-end) 100%);
}

.auth-login-shell {
    width: 100%;
    max-width: 560px;
}

.auth-login-card {
    width: 100%;
    background: var(--auth-login-card);
    border: 1px solid var(--auth-login-border);
    border-radius: 28px;
    box-shadow: var(--auth-login-shadow);
    padding: 54px 56px 46px;
}

.auth-login-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 22px;
}

.auth-login-brand a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-login-brand img {
    display: block;
    width: 164px;
    max-width: 100%;
    height: auto;
}

.auth-login-heading {
    margin: 0;
    color: var(--auth-login-accent);
    font-size: 32px;
    line-height: 1.08;
    letter-spacing: -0.03em;
    text-align: center;
    font-weight: 700;
}

.auth-role-switch {
    margin-top: 22px;
    padding: 6px;
    border-radius: 999px;
    background: #f0f3f8;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    position: relative;
    z-index: 1;
}

.switch-highlighter {
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 6px;
    width: calc((100% - 24px) / 3);
    background: #ffffff;
    border-radius: 999px;
    box-shadow: 0 8px 22px rgba(26, 38, 61, 0.08);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.auth-role-pill {
    appearance: none;
    border: 0;
    border-radius: 999px;
    min-height: 44px;
    padding: 12px 18px;
    background: transparent;
    color: #7b8698;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    box-shadow: none;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.auth-role-pill:hover {
    transform: translateY(-1px);
}

.auth-role-pill.is-active {
    background: transparent;
    color: #12213d;
    box-shadow: none;
}

.auth-login-form {
    margin-top: 30px;
}

.auth-field + .auth-field {
    margin-top: 18px;
}

.auth-field {
    position: relative;
}

.auth-input-icon,
.auth-password-toggle {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: #a0aaba;
    z-index: 2;
    padding: 0;
}

.auth-input-icon {
    inset-inline-start: 14px;
    pointer-events: none;
    font-size: 15px;
}

.auth-password-toggle {
    inset-inline-end: 14px;
    cursor: pointer;
    font-size: 16px;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus-visible {
    color: var(--auth-login-primary);
}

.auth-input {
    width: 100%;
    min-height: 60px;
    border-radius: 18px;
    border: 1px solid var(--auth-login-soft-border);
    background: #f8fafc;
    color: var(--auth-login-text);
    box-shadow: none;
    padding-block: 16px;
    padding-inline-start: 50px;
    padding-inline-end: 54px;
    font-size: 15px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

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

.auth-input:focus {
    background: #ffffff;
    border-color: #ffbd67;
    box-shadow: 0 0 0 4px rgba(255, 160, 40, 0.12);
}

.auth-input.is-invalid,
.was-validated .auth-input:invalid {
    border-color: #dc3545;
    box-shadow: none;
}

.auth-error {
    display: block;
    margin-top: 8px;
    color: #d94141;
    font-size: 13px;
    line-height: 1.35;
}

.auth-forgot-row {
    margin-top: 14px;
    display: flex;
    justify-content: flex-end;
}

.auth-forgot-link {
    color: #6b7588;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-forgot-link:hover,
.auth-forgot-link:focus-visible {
    color: var(--auth-login-accent);
}

.auth-captcha {
    margin-top: 18px;
    display: flex;
    justify-content: center;
    overflow-x: auto;
}

.auth-captcha > div {
    max-width: 100%;
}

.auth-action-grid {
    margin-top: 20px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}

.auth-action-single {
    margin-top: 20px;
}

.auth-action-button,
.auth-social-button {
    min-height: 58px;
    border-radius: 18px;
    border: 1px solid transparent;
    padding: 0 22px;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.auth-action-button:hover,
.auth-social-button:hover,
.auth-action-button:focus-visible,
.auth-social-button:focus-visible {
    transform: translateY(-1px);
}

.auth-action-button {
    color: #ffffff;
    background: linear-gradient(180deg, var(--auth-login-primary) 0%, var(--auth-login-primary-end) 100%);
    box-shadow: 0 14px 30px rgba(16, 32, 63, 0.2);
}

.auth-social-button {
    color: #25324a;
    background: #ffffff;
    border-color: var(--auth-login-soft-border);
    box-shadow: 0 14px 26px rgba(23, 34, 56, 0.08);
}

.auth-social-button .fab {
    font-size: 17px;
}

.auth-social-button .fa-google {
    color: #ea4335;
}

.auth-social-button .fa-facebook-f {
    color: #1877f2;
}

.auth-action-divider {
    color: #a0aaba;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    white-space: nowrap;
    text-align: center;
}

.auth-footer {
    margin: 22px 0 0;
    text-align: center;
    color: #6f7888;
    font-size: 15px;
    line-height: 1.5;
}

.auth-footer a {
    color: var(--auth-login-accent);
    font-weight: 700;
    text-decoration: none;
}

.auth-footer a:hover,
.auth-footer a:focus-visible {
    text-decoration: underline;
}

@media (max-width: 767.98px) {
    .auth-login-page {
        align-items: flex-start;
        padding: 24px 16px 32px;
    }

    .auth-login-card {
        padding: 40px 24px 30px;
        border-radius: 24px;
    }

    .auth-login-brand {
        margin-bottom: 18px;
    }

    .auth-login-brand img {
        width: 148px;
    }

    .auth-login-heading {
        font-size: 28px;
    }

    .auth-role-switch {
        margin-top: 18px;
    }

    .auth-login-form {
        margin-top: 26px;
    }

    .auth-action-grid {
        grid-template-columns: 1fr;
    }

    .auth-action-divider {
        margin: 2px 0;
    }
}

@media (max-width: 575.98px) {
    .auth-login-card {
        padding-inline: 18px;
    }

    .auth-input {
        min-height: 56px;
        border-radius: 16px;
    }

    .auth-action-button,
    .auth-social-button {
        min-height: 54px;
        border-radius: 16px;
    }

    .auth-role-pill {
        font-size: 14px;
        padding-inline: 14px;
    }
}
