/* Auth and public error page redesign. Loaded only by auth/error pages. */
.auth-modern-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 18%, rgba(99, 102, 241, 0.18), transparent 30%),
        radial-gradient(circle at 85% 12%, rgba(16, 185, 129, 0.14), transparent 28%),
        linear-gradient(135deg, #0f172a 0%, #111827 45%, #1e293b 100%);
    color: var(--text-primary);
}

.auth-modern-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.auth-modern-header,
.auth-modern-footer {
    width: 100%;
    padding: 1rem clamp(1rem, 4vw, 3rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.auth-modern-header {
    position: relative;
    z-index: 2;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: #f8fafc;
    font-weight: 800;
    letter-spacing: 0;
}

.auth-brand:hover {
    color: #ffffff;
}

.auth-brand-mark {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--success) 100%);
    box-shadow: 0 16px 30px rgba(79, 70, 229, 0.28);
    color: #fff;
    font-size: 1rem;
}

.auth-modern-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-modern-nav a,
.auth-inline-link {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.875rem;
}

.auth-modern-nav a:hover,
.auth-inline-link:hover {
    color: #ffffff;
}

.auth-modern-main {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.25rem, 4vw, 3rem);
}

.auth-modern-grid {
    width: min(1120px, 100%);
    display: grid;
    grid-template-columns: minmax(320px, 440px) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
}

.auth-modern-grid.auth-modern-grid-reverse {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
}

.auth-modern-panel {
    width: 100%;
    border-radius: 1rem;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 28px 80px rgba(2, 6, 23, 0.42);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    animation: slideUp 300ms ease-out both;
}

.auth-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--success-light);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-modern-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    line-height: 1.08;
    margin-bottom: 0.65rem;
    color: #f8fafc;
}

.auth-modern-copy {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 1.75rem;
}

.auth-modern-form .form-group {
    margin-bottom: 1rem;
}

.auth-modern-form label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-weight: 700;
    margin-bottom: 0.45rem;
}

.auth-modern-form .form-control,
.auth-modern-form input[type="email"],
.auth-modern-form input[type="password"],
.auth-modern-form input[type="text"],
.auth-modern-form input[type="tel"] {
    min-height: 3rem;
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.24);
    color: #f8fafc;
    border-radius: 0.65rem;
}

.auth-modern-form .form-control:focus,
.auth-modern-form input:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.18);
}

.auth-modern-form .form-row {
    gap: 0.875rem;
}

.auth-modern-form .checkbox-group {
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.auth-modern-form .btn,
.auth-modern-actions .btn {
    min-height: 3rem;
    border-radius: 0.65rem;
}

.auth-modern-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 420px;
    padding: clamp(1rem, 3vw, 2rem);
    animation: fadeIn 360ms ease-out both;
}

.auth-modern-visual img,
.auth-error-illustration img {
    display: block;
    width: min(100%, 500px);
    height: auto;
    filter: drop-shadow(0 30px 45px rgba(2, 6, 23, 0.3));
}

.auth-visual-caption {
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    max-width: 32rem;
}

.auth-modern-footer {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.auth-modern-footer .nav {
    display: flex;
    gap: 1rem;
}

.auth-status-card,
.auth-error-card {
    width: min(720px, 100%);
    text-align: center;
    padding: clamp(1.5rem, 5vw, 3rem);
}

.auth-error-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 6rem;
    height: 3rem;
    padding: 0 1rem;
    border-radius: 999px;
    margin-bottom: 1rem;
    background: rgba(99, 102, 241, 0.16);
    color: var(--primary-light);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.auth-error-illustration {
    width: min(72vw, 300px);
    margin: 0 auto 1rem;
}

.auth-modern-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.auth-modern-search {
    display: flex;
    gap: 0.5rem;
    width: min(100%, 460px);
    margin: 1.5rem auto 0;
}

.auth-modern-search .form-control {
    min-height: 3rem;
}

@media (max-width: 960px) {
    .auth-modern-grid,
    .auth-modern-grid.auth-modern-grid-reverse {
        grid-template-columns: 1fr;
        width: min(560px, 100%);
    }

    .auth-modern-visual {
        order: -1;
        min-height: auto;
        padding: 0;
    }

    .auth-modern-visual img {
        width: min(70vw, 280px);
    }

    .auth-visual-caption {
        display: none;
    }
}

@media (max-width: 640px) {
    .auth-modern-header,
    .auth-modern-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .auth-modern-main {
        padding: 1rem;
    }

    .auth-modern-panel {
        padding: 1.25rem;
    }

    .auth-modern-search,
    .auth-modern-actions {
        flex-direction: column;
    }

    .auth-modern-search .btn,
    .auth-modern-actions .btn {
        width: 100%;
    }
}
