/* Slide Top Message Style*/
.slide-top {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: #198754;
    color: #fff;
    padding: 15px 30px;
    border-radius: 8px;
    transition: .4s;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.slide-top.show {
    top: 20px;
}

.slide-top.bg-danger {
    background: #dc3545 !important;
}

/* Loader css */
@keyframes matrixSpin {
    to {
        transform: rotate(360deg);
    }
}

#globalAppLoader.is-loading {
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* ──────────────────────────────────────────────────────────
   Sliding Sign In / Sign Up Panel
   Uses the existing --admin-* theme tokens from style.css so
   it matches the rest of the dashboard instead of a new palette.
   ────────────────────────────────────────────────────────── */

.auth-page--split {
    padding: 1.5rem;
}

.auth-flip-card {
    position: relative;
    width: 100%;
    max-width: 920px;
    min-height: 520px;
    background: var(--admin-surface);
    border-radius: 16px;
    box-shadow: var(--admin-shadow-lg);
    overflow: hidden;
}

/* Both forms sit side by side underneath the overlay */
.auth-form-panel {
    position: absolute;
    top: 0;
    height: 100%;
    width: 50%;
    padding: 2rem 2.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.6s ease-in-out;
}

.auth-form-panel--signin {
    left: 0;
    z-index: 2;
    opacity: 1;
}

.auth-form-panel--signup {
    left: 0;
    z-index: 1;
    opacity: 0;
}

/* Active state = Sign Up requested: swap visibility + slide sign-in out */
.auth-flip-card.active .auth-form-panel--signin {
    transform: translateX(100%);
    opacity: 0;
    z-index: 1;
}

.auth-flip-card.active .auth-form-panel--signup {
    transform: translateX(100%);
    opacity: 1;
    z-index: 5;
    animation: authShowPanel 0.6s;
}

@keyframes authShowPanel {
    0%, 49.99% { opacity: 0; z-index: 1; }
    50%, 100% { opacity: 1; z-index: 5; }
}

/* Overlay container clips the sliding gradient panel */
.auth-overlay-container {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: transform 0.6s ease-in-out;
    z-index: 10;
}

.auth-flip-card.active .auth-overlay-container {
    transform: translateX(-100%);
}

.auth-overlay {
    position: relative;
    left: -100%;
    height: 100%;
    width: 200%;
    background: linear-gradient(135deg, var(--admin-primary) 0%, var(--admin-primary-dark) 100%);
    color: #fff;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
}

.auth-flip-card.active .auth-overlay {
    transform: translateX(50%);
}

.auth-overlay-panel {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 2.5rem;
    transition: transform 0.6s ease-in-out;
}

.auth-overlay-panel p {
    font-size: 0.92rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.88);
}

.auth-overlay-panel--left {
    transform: translateX(-20%);
}

.auth-flip-card.active .auth-overlay-panel--left {
    transform: translateX(0);
}

.auth-overlay-panel--right {
    right: 0;
    transform: translateX(0);
}

.auth-flip-card.active .auth-overlay-panel--right {
    transform: translateX(20%);
}

.auth-ghost-btn {
    border-color: #fff;
    color: #fff;
    padding: 0.5rem 2.25rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.auth-ghost-btn:hover,
.auth-ghost-btn:focus {
    background: #fff;
    color: var(--admin-primary);
}

/* Mobile fallback toggle link, hidden on desktop where the overlay handles switching */
.auth-mobile-toggle {
    font-weight: 600;
}

/* Collapse to a single stacked, swappable card below the lg breakpoint
   since the side-by-side sliding panel needs room to breathe */
@media (max-width: 991.98px) {
    .auth-flip-card {
        max-width: 460px;
        min-height: 0;
    }

    .auth-overlay-container {
        display: none;
    }

    .auth-form-panel {
        position: relative;
        width: 100%;
        padding: 2rem 1.75rem;
        transform: none !important;
        animation: none !important;
    }

    .auth-form-panel--signin {
        display: flex;
        opacity: 1 !important;
        z-index: 2;
    }

    .auth-form-panel--signup {
        display: none;
        opacity: 1 !important;
        z-index: 2;
    }

    .auth-flip-card.active .auth-form-panel--signin {
        display: none;
    }

    .auth-flip-card.active .auth-form-panel--signup {
        display: flex;
    }
}
