/* 3D Login Page — light theme (matches admin panel) */
.auth-page.login-3d {
    --bg: #eef2f7;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #dbe3ef;
    overflow: hidden;
    position: relative;
    background:
        radial-gradient(ellipse at 15% 20%, rgba(59, 130, 246, 0.14), transparent 45%),
        radial-gradient(ellipse at 85% 75%, rgba(16, 185, 129, 0.1), transparent 45%),
        radial-gradient(ellipse at 50% 100%, rgba(99, 102, 241, 0.08), transparent 50%),
        linear-gradient(160deg, #e8eef5 0%, #eef2f7 45%, #f4f7fb 100%);
    perspective: 1400px;
    color: var(--text);
}

.login-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.login-scene {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 480px;
    animation: loginSceneFloat 6s ease-in-out infinite;
}

@keyframes loginSceneFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.login-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.08) 1px, transparent 1px);
    background-size: 48px 48px;
    transform: perspective(500px) rotateX(60deg) scale(2.2);
    transform-origin: center top;
    opacity: 0.45;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.35), transparent 80%);
}

.login-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
}

.login-orb-1 {
    width: 280px;
    height: 280px;
    top: 10%;
    left: 8%;
    background: rgba(59, 130, 246, 0.22);
    animation: orbDrift1 10s ease-in-out infinite;
}

.login-orb-2 {
    width: 220px;
    height: 220px;
    bottom: 15%;
    right: 10%;
    background: rgba(16, 185, 129, 0.16);
    animation: orbDrift2 12s ease-in-out infinite;
}

.login-orb-3 {
    width: 160px;
    height: 160px;
    top: 45%;
    right: 25%;
    background: rgba(139, 92, 246, 0.12);
    animation: orbDrift3 8s ease-in-out infinite;
}

@keyframes orbDrift1 {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(30px, 20px, 0); }
}

@keyframes orbDrift2 {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(-25px, -30px, 0); }
}

@keyframes orbDrift3 {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(15px, -15px, 0); }
}

.auth-page.login-3d .auth-card-3d {
    position: relative;
    z-index: 1;
    max-width: 460px;
    padding: 40px 38px 32px;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 35%, #f1f5f9 100%);
    border: 1px solid var(--border);
    border-radius: 24px;
    transform: rotateX(2deg);
    box-shadow:
        0 2px 0 rgba(255, 255, 255, 0.9) inset,
        0 -1px 0 rgba(148, 163, 184, 0.15) inset,
        0 20px 40px rgba(15, 23, 42, 0.08),
        0 35px 60px rgba(15, 23, 42, 0.06),
        0 0 0 1px rgba(59, 130, 246, 0.08),
        16px 24px 48px rgba(59, 130, 246, 0.06);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.auth-page.login-3d .auth-card-3d:hover {
    transform: rotateX(1deg) translateY(-2px);
    box-shadow:
        0 2px 0 rgba(255, 255, 255, 1) inset,
        0 -1px 0 rgba(148, 163, 184, 0.18) inset,
        0 28px 50px rgba(15, 23, 42, 0.1),
        0 45px 80px rgba(15, 23, 42, 0.07),
        0 0 0 1px rgba(59, 130, 246, 0.14),
        20px 30px 60px rgba(59, 130, 246, 0.1);
}

.auth-card-shine {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    border-radius: 24px 24px 0 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.85) 0%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

.auth-page.login-3d .auth-brand,
.auth-page.login-3d .login-form-3d,
.auth-page.login-3d .alert,
.auth-page.login-3d .auth-credits-3d {
    position: relative;
    z-index: 2;
}

.auth-page.login-3d .auth-brand p {
    color: var(--text-muted);
    text-shadow: none;
}

.auth-page.login-3d .brand-icon-3d {
    width: 78px;
    height: 78px;
    font-size: 34px;
    border-radius: 20px;
    background: linear-gradient(145deg, #4f8ff7 0%, #2563eb 50%, #1d4ed8 100%);
    box-shadow:
        0 6px 0 #1e40af,
        0 12px 24px rgba(37, 99, 235, 0.35),
        0 0 30px rgba(59, 130, 246, 0.18),
        inset 0 2px 0 rgba(255, 255, 255, 0.35);
    animation: iconPulse3d 4s ease-in-out infinite;
}

@keyframes iconPulse3d {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}

.auth-page.login-3d .title-3d {
    font-family: 'Orbitron', 'DM Sans', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #0f172a;
    text-shadow:
        0 1px 0 #e2e8f0,
        0 2px 0 #cbd5e1,
        0 3px 0 #94a3b8,
        0 4px 8px rgba(15, 23, 42, 0.12),
        0 0 24px rgba(59, 130, 246, 0.15);
    margin-bottom: 8px;
}

.login-form-3d {
    isolation: isolate;
}

.login-form-3d .form-row {
    position: relative;
    z-index: 1;
}

.login-form-3d .form-row label {
    color: var(--text-muted);
    text-shadow: none;
    cursor: pointer;
}

.auth-page.login-3d .input-3d {
    position: relative;
    z-index: 2;
    width: 100%;
    color: var(--text);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 13px 16px;
    box-shadow:
        inset 0 2px 6px rgba(15, 23, 42, 0.04),
        inset 0 -1px 0 rgba(255, 255, 255, 0.9),
        0 3px 0 rgba(203, 213, 225, 0.6),
        0 5px 14px rgba(15, 23, 42, 0.05);
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
    pointer-events: auto;
}

.auth-page.login-3d .input-3d:focus {
    border-color: rgba(59, 130, 246, 0.55);
    box-shadow:
        inset 0 2px 6px rgba(15, 23, 42, 0.03),
        inset 0 -1px 0 rgba(255, 255, 255, 1),
        0 3px 0 rgba(37, 99, 235, 0.25),
        0 8px 20px rgba(59, 130, 246, 0.15),
        0 0 0 3px rgba(59, 130, 246, 0.12);
    outline: none;
}

.auth-page.login-3d .btn-3d {
    position: relative;
    z-index: 1;
    margin-top: 8px;
    padding: 14px 18px;
    font-size: 1rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: linear-gradient(180deg, #4f8ff7 0%, #2563eb 45%, #1d4ed8 100%);
    border: none;
    border-radius: 12px;
    box-shadow:
        0 6px 0 #1e3a8a,
        0 10px 28px rgba(37, 99, 235, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    pointer-events: auto;
    cursor: pointer;
}

.auth-page.login-3d .btn-3d:hover {
    background: linear-gradient(180deg, #60a5fa 0%, #3b82f6 45%, #2563eb 100%);
    transform: translateY(-2px);
    box-shadow:
        0 8px 0 #1e3a8a,
        0 14px 32px rgba(37, 99, 235, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    color: #fff;
}

.auth-page.login-3d .btn-3d:active {
    transform: translateY(4px);
    box-shadow:
        0 2px 0 #1e3a8a,
        0 4px 12px rgba(37, 99, 235, 0.3),
        inset 0 2px 6px rgba(0, 0, 0, 0.15);
}

.auth-page.login-3d .alert {
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

.auth-page.login-3d .alert-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
}

.auth-page.login-3d .alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.auth-page.login-3d .alert-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #b45309;
}

.auth-credits-3d {
    border-top-color: var(--border);
    background: linear-gradient(180deg, transparent, rgba(241, 245, 249, 0.8));
    margin: 28px -10px -10px;
    padding: 18px 10px 4px;
    border-radius: 0 0 16px 16px;
}

.auth-credits-3d p {
    color: var(--text-muted);
    text-shadow: none;
}

.auth-page.login-3d .auth-credits strong {
    color: #334155;
}

@media (max-width: 520px) {
    .auth-page.login-3d .auth-card-3d {
        transform: none;
        padding: 32px 24px 24px;
    }

    .auth-page.login-3d .auth-card-3d:hover {
        transform: none;
    }

    .login-scene {
        animation: none;
    }

    .auth-page.login-3d .title-3d {
        font-size: 1.1rem;
    }
}
