* {
    font-family: 'Tajawal', sans-serif;
}

:root {
    --sidebar-width: 260px;
}

body {
    background-color: #f1f5f9;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: #0f172a;
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 40;
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.sidebar-mobile-hidden {
    transform: translateX(-100%);
}

@media (min-width: 1024px) {
    .sidebar-mobile-hidden {
        transform: translateX(0);
    }
    .main-content {
        margin-left: var(--sidebar-width);
    }
}

.main-content {
    transition: margin-left 0.3s ease;
    min-height: 100vh;
}

.card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.08), 0 4px 10px rgba(0,0,0,0.04);
}

.stat-card {
    border-left: 4px solid;
    border-radius: 0.75rem;
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.toggle-switch {
    position: relative;
    width: 52px;
    height: 28px;
    display: inline-block;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    border-radius: 28px;
    transition: all 0.3s ease;
}

.toggle-slider:before {
    content: "";
    position: absolute;
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

input:checked + .toggle-slider {
    background-color: #10b981;
}

input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.modal-overlay {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
}

.pulse-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
}

.pulse-dot.active {
    background-color: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
}

.pulse-dot.inactive {
    background-color: #ef4444;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.toast {
    animation: slideInUp 0.4s ease, fadeOut 0.4s ease 2.6s forwards;
}

@keyframes slideInUp {
    from { transform: translateY(100px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeOut {
    to { opacity: 0; transform: translateY(-20px); }
}

.nav-item {
    transition: all 0.2s ease;
    border-radius: 0.5rem;
    margin: 0.2rem 0.5rem;
    cursor: pointer;
}

.nav-item:hover {
    background: rgba(255,255,255,0.08);
}

.nav-item.active {
    background: rgba(14, 165, 233, 0.25);
    border-left: 3px solid #0ea5e9;
    font-weight: 600;
}

.badge-role {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .responsive-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    .stat-card {
        border-left: none;
        border-top: 4px solid;
    }
}
