body {
    font-family: 'Prompt', sans-serif;
    background-color: #f8fafc;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.sidebar-active {
    background-color: #ecfdf5 !important;
    color: #059669 !important;
    border-left: 4px solid #10b981 !important;
    border-radius: 0 0.5rem 0.5rem 0 !important;
}

.sidebar-active i {
    color: #10b981 !important;
}

.nav-item {
    border-left: 4px solid transparent;
    border-radius: 0 0.5rem 0.5rem 0;
}

/* Force SweetAlert to stays on top of ANY dialog or modal */
.swal2-container {
    z-index: 999999 !important;
}

.swal2-actions {
    margin-top: 1.5rem !important;
    z-index: 1000001 !important;
}

.swal2-confirm,
.swal2-cancel {
    align-items: center;
    justify-content: center;
    font-weight: 700 !important;
    font-family: 'Prompt', sans-serif !important;
    min-height: 48px !important;
    padding: 0 32px !important;
    border-radius: 12px !important;
}

.swal2-confirm {
    background-color: #f97316 !important;
    color: #fff !important;
}

.swal2-cancel {
    background-color: #94a3b8 !important;
    color: #fff !important;
}

/* Extra fix for dialog stack context */
dialog .swal2-container {
    position: fixed;
}

/* Tom Select over Modals Fix */
.ts-wrapper .ts-dropdown {
    z-index: 2000 !important;
}

.modal-box {
    overflow: visible !important;
}

.platform-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    font-size: 10px;
    color: white;
}

.bg-facebook { background-color: #1877F2; }
.bg-line { background-color: #06C755; }
.bg-unknown { background-color: #9CA3AF; }

.sidebar-group .group-content {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
}

.sidebar-group.active .group-content {
    max-height: 1000px;
    opacity: 1;
    pointer-events: auto;
}

.sidebar-group.active .ph-caret-down {
    transform: rotate(180deg);
}

@keyframes bounce-short {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.animate-bounce-short {
    animation: bounce-short 1s ease-in-out infinite;
}

@media (min-width: 1024px) {
    #sidebar {
        transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }

    #sidebar.sidebar-mini {
        width: 88px;
    }

    #sidebar.sidebar-mini .nav-text,
    #sidebar.sidebar-mini .badge,
    #sidebar.sidebar-mini .sidebar-group>div:first-child span,
    #sidebar.sidebar-mini .sidebar-group>div:first-child i.ph-caret-down,
    #sidebar.sidebar-mini h1,
    #sidebar.sidebar-mini p.text-xs {
        display: none;
    }

    #sidebar.sidebar-mini .p-6,
    #sidebar.sidebar-mini .px-6 {
        padding-left: 0;
        padding-right: 0;
        justify-content: center;
    }

    #sidebar.sidebar-mini .nav-item {
        padding-left: 0;
        padding-right: 0;
        justify-content: center;
        border-left-width: 0;
    }

    #sidebar.sidebar-mini .nav-icon {
        font-size: 1.5rem;
    }

    #sidebar.sidebar-mini .mx-3 {
        margin-left: 0.75rem;
        margin-right: 0.75rem;
        border-radius: 1rem;
    }

    .sync-indicator {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 4px 12px;
        background: #f8fafc;
        border: 1px solid #f1f5f9;
        border-radius: 9999px;
        font-size: 10px;
        font-weight: 700;
        color: #64748b;
        transition: all 0.3s ease;
    }

    .sync-dot {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: #10b981;
        position: relative;
    }

    .sync-dot.syncing {
        background: #f59e0b;
    }

    .sync-dot.syncing::after {
        content: '';
        position: absolute;
        inset: -4px;
        border-radius: 50%;
        border: 2px solid #f59e0b;
        animation: sync-pulse 1.5s cubic-bezier(0.24, 0, 0.38, 1) infinite;
    }

    @keyframes sync-pulse {
        0% { transform: scale(1); opacity: 1; }
        100% { transform: scale(2.5); opacity: 0; }
    }

    .refresh-btn {
        cursor: pointer;
        transition: transform 0.2s ease, color 0.2s ease;
    }

    .refresh-btn:hover {
        color: #10b981;
        transform: scale(1.1);
    }

    .refresh-btn:active {
        transform: scale(0.9);
    }
}
