/**
 * Halaman autentikasi (login / daftar) — satu gaya dengan portal publik.
 */

.auth-page-shell {
    position: relative;
    min-height: calc(100vh - var(--app-navbar-height, 4rem));
    display: flex;
    align-items: center;
    padding: clamp(1.25rem, 4vw, 2.5rem) 0 clamp(1.75rem, 5vw, 3rem);
    overflow-x: hidden;
}

.auth-page-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image:
        radial-gradient(ellipse 90% 70% at 15% 10%, rgba(124, 58, 237, 0.22), transparent 52%),
        radial-gradient(ellipse 70% 55% at 95% 85%, rgba(167, 139, 250, 0.2), transparent 48%),
        linear-gradient(125deg, rgba(76, 29, 149, 0.6) 0%, rgba(109, 40, 217, 0.45) 50%, rgba(139, 92, 246, 0.32) 100%),
        url("../images/gereja.png");
    background-size: cover;
    background-position: center;
    transform: scale(1.02);
    filter: blur(0);
}

@media (prefers-reduced-motion: no-preference) {
    @supports (backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px)) {
        .auth-page-shell::before {
            transform: scale(1.08);
            filter: blur(8px);
        }
    }
}

.auth-page-shell::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, transparent 40%, rgba(15, 23, 42, 0.22) 100%);
    pointer-events: none;
}

.auth-page-inner {
    position: relative;
    z-index: 1;
    width: 100%;
}

.auth-page-card {
    border-radius: clamp(1rem, 3vw, 1.35rem) !important;
    overflow: hidden;
    box-shadow:
        0 4px 6px rgba(15, 23, 42, 0.05),
        0 20px 40px rgba(15, 23, 42, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.42) !important;
    background: rgba(255, 255, 255, 0.9) !important;
}

@supports (backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px)) {
    .auth-page-card {
        background: rgba(255, 255, 255, 0.55) !important;
        backdrop-filter: blur(20px) saturate(145%);
        -webkit-backdrop-filter: blur(20px) saturate(145%);
    }
}

.auth-page-card-accent {
    height: 5px;
    background: linear-gradient(90deg, #6d28d9 0%, #7c3aed 45%, #8b5cf6 100%);
}

.auth-page-brand {
    display: flex;
    justify-content: center;
    align-items: center;
}

.auth-page-brand-logo {
    width: clamp(4.5rem, 18vw, 7.5rem);
    height: clamp(4.5rem, 18vw, 7.5rem);
    max-height: clamp(4.5rem, 18vw, 7.5rem);
    object-fit: cover;
    display: block;
    margin: 0 auto;
    border-radius: 50%;
    border: 2px solid rgba(216, 180, 254, 0.9);
    background: rgba(255, 255, 255, 0.9);
    padding: 4px;
    filter: drop-shadow(0 8px 20px rgba(15, 23, 42, 0.15));
    animation: authLogoSpin 14s linear infinite;
}

.auth-page-card .form-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: #0f172a;
}

.auth-page-card .form-control {
    border-radius: 0.75rem;
    padding: 0.65rem 1rem;
    border: 1px solid rgba(30, 58, 95, 0.15);
}

.auth-page-card .form-control:focus {
    border-color: rgba(124, 58, 237, 0.55);
    box-shadow: 0 0 0 0.2rem rgba(124, 58, 237, 0.12);
}

.auth-page-submit {
    border-radius: 999px;
    padding: 0.7rem 1.25rem;
    font-weight: 600;
    background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 100%);
    border: none;
    box-shadow: 0 8px 22px rgba(109, 40, 217, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.auth-page-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(109, 40, 217, 0.35);
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
}

.auth-page-card a:not(.btn) {
    font-weight: 600;
    color: #6d28d9;
    text-decoration: none;
}

.auth-page-card a:not(.btn):hover {
    text-decoration: underline;
}

.auth-page-back {
    font-size: 0.875rem;
}

.auth-page-back a {
    color: rgba(255, 255, 255, 0.92) !important;
    font-weight: 500;
    text-decoration: none;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25);
}

.auth-page-back a:hover {
    color: #fff !important;
    text-decoration: underline;
}

@keyframes authLogoSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 575.98px) {
    .auth-page-shell {
        align-items: flex-start;
        padding-top: 1rem;
    }

    .auth-page-card .card-body {
        padding-left: 1.15rem !important;
        padding-right: 1.15rem !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-page-shell::before {
        transform: scale(1.02);
        filter: none;
    }

    .auth-page-submit {
        transition: none;
    }

    .auth-page-submit:hover {
        transform: none;
    }

    .auth-page-brand-logo {
        animation: none;
    }
}
