/* 
-----------------------------------------------------------
SUPERADMIN DASHBOARD PREMIUM OVERHAUL
Design Language: Glassmorphism, Deep Depth, Smooth Transitions
Colors: Deep Slate, Indigo-600, Emerald-500, Sky-400
----------------------------------------------------------- 
*/

:root {
    --p-bg: #FCFDFB;
    /* Soft neutral background */
    --p-sidebar: #008a99;
    /* Original Teal */
    --p-sidebar-hover: rgba(255, 255, 255, 0.1);
    --p-sidebar-active: #fdb913;
    /* Original Yellow */
    --p-active-grad: linear-gradient(135deg, #f7941d 0%, #fdb913 100%);
    --p-primary: #008a99;
    /* Teal for accents */
    --p-secondary: #008a99;
    --p-accent: #fdb913;
    --p-card-bg: rgba(255, 255, 255, 0.9);
    --p-text-main: #1E293B;
    --p-text-muted: #64748B;
    --p-radius: 20px;
    --p-glass-border: rgba(255, 255, 255, 0.5);
    --p-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.04), 0 4px 12px -3px rgba(0, 0, 0, 0.01);
}

/* Global Reset for Dashboard */
.dashboard-container {
    background-color: var(--p-bg) !important;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

/* Sidebar styles removed to use global styles.css */

/* Main Content Surface */
.main-content {
    background-color: var(--p-bg) !important;
    padding: 0 !important;
}

/* Topbar styles removed to use global styles.css */

/* Stat Cards Overhaul */
.summary-cards {
    gap: 30px !important;
}

.stat-card {
    background: var(--p-card-bg) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid var(--p-glass-border) !important;
    border-radius: 16px !important;
    padding: 15px 20px !important;
    box-shadow: var(--p-shadow) !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 15px !important;
    min-height: auto !important;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02) !important;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.08) !important;
    background: rgba(255, 255, 255, 0.95) !important;
}

.icon-box {
    width: 48px !important;
    height: 48px !important;
    border-radius: 14px !important;
    margin-bottom: 0 !important;
    font-size: 1.3rem !important;
    flex-shrink: 0 !important;
    box-shadow: inset 0 -4px 10px rgba(0, 0, 0, 0.05) !important;
}

.stat-card.success .icon-box {
    background: linear-gradient(135deg, #ECFDF5 0%, var(--p-secondary) 100%) !important;
    color: white !important;
}

.stat-card.info .icon-box {
    background: linear-gradient(135deg, #EFF6FF 0%, #38bdf8 100%) !important;
    color: white !important;
}

.stat-card.warning .icon-box {
    background: var(--p-active-grad) !important;
    color: white !important;
}

.stat-info-wrap {
    display: flex;
    flex-direction: column;
}

.stat-card h3 {
    font-size: 0.75rem !important;
    color: var(--p-text-muted) !important;
    letter-spacing: 1px !important;
    margin-bottom: 4px !important;
}

.stat-card .value {
    font-size: 1.5rem !important;
    color: var(--p-text-main) !important;
    letter-spacing: -0.5px !important;
    line-height: 1.2 !important;
}

.stat-card .trend {
    font-size: 0.7rem !important;
    margin-top: 4px !important;
}

/* Widgets & Charts */
.widget {
    background: var(--p-card-bg) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid var(--p-glass-border) !important;
    border-radius: var(--p-radius) !important;
    box-shadow: var(--p-shadow) !important;
}

.widget-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    padding: 12px 20px !important;
}

.widget-header h3 {
    font-size: 1.15rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    letter-spacing: -0.02em !important;
}

.widget-header h3::before {
    background: var(--p-primary) !important;
}

.notification-item {
    background: rgba(255, 255, 255, 0.4) !important;
    border: 1px solid rgba(0, 0, 0, 0.02) !important;
    border-radius: 12px !important;
    margin-bottom: 12px !important;
    transition: all 0.2s ease !important;
}

.notification-item:hover {
    background: #fff !important;
    transform: translateX(6px) !important;
    border-color: rgba(79, 70, 229, 0.2) !important;
}

.widget-body {
    padding: 15px !important;
}

/* Custom Scrollbar for Premium Feel */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

/* --- High-Fidelity Analytics Card Styling --- */
.analytics-list.premium-list {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
    gap: 20px !important;
    padding: 10px !important;
}

.analytics-item.grid-item {
    background: #ffffff !important;
    border-radius: 20px !important;
    padding: 15px !important;
    border: 1px solid #f1f5f9 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    cursor: pointer !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    overflow: hidden !important;
}

.analytics-item.grid-item:hover {
    transform: translateY(-8px) scale(1.02) !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05) !important;
    border-color: rgba(0, 138, 153, 0.35) !important;
}

.analytics-item.grid-item.peak-glow {
    border: 2px solid #fdb913 !important;
    background: linear-gradient(to bottom, #fffef0, #ffffff) !important;
    animation: goldGlow 3s infinite alternate !important;
}

@keyframes goldGlow {
    0% {
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    }

    100% {
        box-shadow: 0 0 20px rgba(253, 185, 19, 0.25);
    }
}

.analytics-item.grid-item.peak-glow::before {
    content: "MARKET LEADER";
    position: absolute;
    top: 15px;
    right: -32px;
    background: #fdb913;
    color: #000;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 6px 35px;
    transform: rotate(45deg);
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    letter-spacing: 0.5px;
}

.selection-icon {
    position: absolute !important;
    top: 12px !important;
    left: 12px !important;
    z-index: 10 !important;
    background: white !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 50% !important;
    width: 26px !important;
    height: 26px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1) !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.selection-icon i {
    color: #94a3b8 !important;
    font-size: 1.15rem !important;
    transition: all 0.3s ease !important;
}

.selection-icon:hover {
    transform: scale(1.15) rotate(5deg) !important;
    border-color: #008a99 !important;
}

.analytics-item.selected .selection-icon {
    background: #008a99 !important;
    border-color: #008a99 !important;
    transform: scale(1.1) !important;
}

.analytics-item.selected .selection-icon i {
    color: white !important;
}

.analytics-item.grid-item .thumb {
    position: relative !important;
    width: 100% !important;
    aspect-ratio: 1 !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    margin-bottom: 12px !important;
    background: linear-gradient(135deg, #fff3d6, #ffe1ad) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.analytics-item.grid-item .thumb img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    z-index: 1 !important;
    transition: transform 0.4s ease !important;
}

.analytics-item.grid-item .thumb .thumb-fallback {
    font-size: 2.8rem !important;
    color: #e09b1a !important;
    opacity: 0.5 !important;
}

.analytics-item.grid-item:hover .thumb img {
    transform: scale(1.12) !important;
}

.analytics-item.grid-item .name {
    width: 100% !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    text-align: center !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    height: 2.4rem !important;
    line-height: 1.2 !important;
    padding-top: 12px !important;
    border-top: 1px solid #f1f5f9 !important;
}

.count-badge.top-badge {
    position: absolute !important;
    top: auto !important;
    right: auto !important;
    bottom: 8px !important;
    left: 8px !important;
    background: rgba(15, 23, 42, 0.9) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    color: white !important;
    padding: 5px 12px !important;
    border-radius: 50px !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    z-index: 5 !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.analytics-item.selected {
    border-color: #008a99 !important;
    background: rgba(0, 138, 153, 0.04) !important;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.analytics-item {
    animation: fadeInUp 0.5s ease backwards;
}

/* Notification Bell Shake Animation */
@keyframes bell-shake {
    0% {
        transform: rotate(0) scale(1);
    }

    15% {
        transform: rotate(20deg) scale(1.1);
    }

    30% {
        transform: rotate(-15deg) scale(1.1);
    }

    45% {
        transform: rotate(10deg) scale(1.1);
    }

    60% {
        transform: rotate(-5deg) scale(1.1);
    }

    75% {
        transform: rotate(2deg) scale(1.1);
    }

    85% {
        transform: rotate(-1deg) scale(1.1);
    }

    100% {
        transform: rotate(0) scale(1);
    }
}

.shake {
    animation: bell-shake 0.8s cubic-bezier(0.36, 0.07, 0.19, 0.97) both infinite;
    transform-origin: top center;
    color: #EF4444 !important;
    /* Change color to red when shaking */
}

.new-notif-label {
    background: #EF4444;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 800;
    margin-left: 10px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(0.95);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* --- Premium Toast Notification System --- */
#toast-container {
    position: fixed !important;
    top: 30px !important;
    right: 30px !important;
    z-index: 99999 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    pointer-events: none !important;
}

.toast {
    pointer-events: auto !important;
    min-width: 320px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    border-radius: 16px !important;
    padding: 16px 20px !important;
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1) !important;
    transform: translateX(120%) !important;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
}

.toast.show {
    transform: translateX(0) !important;
}

.toast.success {
    border-left: 6px solid #10B981 !important;
}

.toast.error {
    border-left: 6px solid #EF4444 !important;
}

.toast-icon {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1rem !important;
    flex-shrink: 0 !important;
}

.toast.success .toast-icon {
    background: #ECFDF5 !important;
    color: #10B981 !important;
}

.toast.error .toast-icon {
    background: #FEF2F2 !important;
    color: #EF4444 !important;
}

.toast-content {
    flex: 1 !important;
}

.toast-title {
    font-size: 0.9rem !important;
    font-weight: 800 !important;
    color: #1E293B !important;
    margin-bottom: 2px !important;
    display: block !important;
}

.toast-msg {
    font-size: 0.75rem !important;
    color: #64748B !important;
    font-weight: 500 !important;
    display: block !important;
}