:root {
    --auth-primary: #2563eb;
    --auth-primary-dark: #1e40af;
    --auth-accent: #14b8a6;
    --auth-surface: #ffffff;
    --auth-muted: #64748b;
    --auth-border: #dbe3ee;
    --auth-background: #eef4fb;
}

.auth-page {
    min-height: 100vh;
    margin: 0;
    color: #1e293b;
    background:
        radial-gradient(circle at 10% 10%, rgba(37, 99, 235, 0.12), transparent 35%),
        radial-gradient(circle at 90% 90%, rgba(20, 184, 166, 0.12), transparent 35%),
        var(--auth-background);
}

.auth-page--admin {
    --auth-primary: #172554;
    --auth-primary-dark: #0f172a;
    --auth-accent: #f59e0b;
    --auth-background: #e9edf3;
    background:
        radial-gradient(circle at 12% 12%, rgba(15, 23, 42, 0.15), transparent 38%),
        radial-gradient(circle at 88% 88%, rgba(245, 158, 11, 0.1), transparent 32%),
        var(--auth-background);
}

.auth-page-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(260px, 0.9fr) minmax(340px, 1.1fr);
    width: 100%;
    max-width: 920px;
    min-height: 530px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 18px;
    background: var(--auth-surface);
    box-shadow: 0 24px 65px rgba(15, 23, 42, 0.16);
}

.auth-intro {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: 42px 38px;
    color: #ffffff;
    background: linear-gradient(145deg, var(--auth-primary-dark), var(--auth-primary));
}

.auth-page--admin .auth-intro {
    grid-column: 2;
    grid-row: 1;
}

.auth-page--admin .auth-form-panel {
    grid-column: 1;
    grid-row: 1;
}

.auth-intro::after {
    position: absolute;
    right: -90px;
    bottom: -100px;
    width: 280px;
    height: 280px;
    border: 42px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    content: '';
}

.auth-brand,
.auth-intro-copy,
.auth-intro-footer {
    position: relative;
    z-index: 1;
}

.auth-brand {
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.auth-brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin-right: 12px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.12);
}

.auth-kicker {
    display: inline-block;
    margin-bottom: 14px;
    padding: 5px 10px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.auth-intro h1 {
    max-width: 360px;
    margin: 0 0 14px;
    font-size: clamp(1.7rem, 3vw, 2.35rem);
    font-weight: 700;
    line-height: 1.15;
}

.auth-intro p {
    max-width: 360px;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.6;
}

.auth-intro-footer {
    color: rgba(255, 255, 255, 0.67);
    font-size: 0.78rem;
}

.auth-form-panel {
    display: flex;
    align-items: center;
    padding: 44px 54px;
}

.auth-form-content {
    width: 100%;
    max-width: 390px;
    margin: 0 auto;
}

.auth-form-heading {
    margin-bottom: 28px;
}

.auth-form-heading h2 {
    margin: 0 0 7px;
    font-size: 1.55rem;
    font-weight: 700;
}

.auth-form-heading p {
    margin: 0;
    color: var(--auth-muted);
    font-size: 0.9rem;
}

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

.auth-field label {
    margin-bottom: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.auth-field .input-group-text,
.auth-field .form-control {
    min-height: 42px;
    border-color: var(--auth-border);
    font-size: 0.9rem;
}

.auth-field .input-group-text {
    min-width: 42px;
    justify-content: center;
    color: var(--auth-muted);
    background: #f8fafc;
}

.auth-field .form-control:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 0.15rem rgba(37, 99, 235, 0.12);
}

.auth-password-toggle {
    border: 0;
    cursor: pointer;
}

.auth-submit {
    min-height: 42px;
    border-color: var(--auth-primary);
    border-radius: 7px;
    background: var(--auth-primary);
    font-size: 0.9rem;
    font-weight: 600;
}

.auth-submit:hover,
.auth-submit:focus {
    border-color: var(--auth-primary-dark);
    background: var(--auth-primary-dark);
}

.auth-alert {
    padding: 9px 12px;
    font-size: 0.82rem;
}

.auth-switch {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--auth-border);
    color: var(--auth-muted);
    font-size: 0.82rem;
    text-align: center;
}

.auth-switch a {
    color: var(--auth-primary);
    font-weight: 600;
}

.auth-security-note {
    display: flex;
    align-items: flex-start;
    margin-top: 18px;
    color: var(--auth-muted);
    font-size: 0.76rem;
    line-height: 1.45;
}

.auth-security-note i {
    margin: 3px 7px 0 0;
    color: var(--auth-accent);
}

@media (max-width: 767.98px) {
    .auth-page-wrapper {
        align-items: flex-start;
        padding: 14px;
    }

    .auth-shell {
        grid-template-columns: 1fr;
        min-height: 0;
        border-radius: 14px;
    }

    .auth-intro {
        grid-column: 1;
        grid-row: 1;
        min-height: 180px;
        padding: 25px 24px;
    }

    .auth-page--admin .auth-form-panel {
        grid-column: 1;
        grid-row: 2;
    }

    .auth-brand {
        margin-bottom: 28px;
    }

    .auth-intro h1 {
        margin-bottom: 8px;
        font-size: 1.5rem;
    }

    .auth-intro p {
        font-size: 0.84rem;
        line-height: 1.45;
    }

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

    .auth-form-panel {
        padding: 28px 24px 30px;
    }

    .auth-form-heading {
        margin-bottom: 22px;
    }
}

@media (max-width: 374.98px) {
    .auth-page-wrapper {
        padding: 0;
    }

    .auth-shell {
        min-height: 100vh;
        border: 0;
        border-radius: 0;
    }
}
