/* Modern Design System for Voting Platform - Optimized for RTL & Arabic */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700&family=Tajawal:wght@400;700&display=swap');

:root {
    --primary: #2563eb;
    --primary-light: #60a5fa;
    --secondary: #64748b;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --bg-main: #f8fafc;
    --bg-card: rgba(255, 255, 255, 1);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --sidebar-width: 300px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Cairo', 'Tajawal', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    margin: 0;
    overflow-x: hidden;
}

[dir="rtl"] body {
    text-align: right;
}

/* Sidebar Styling - FIXED Position */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    background: #1e293b;
    color: white;
    z-index: 1050; /* Ensure it stays above everything */
    padding: 0;
    transition: var(--transition);
}

[dir="rtl"] .sidebar {
    right: 0;
    left: auto;
}

[dir="ltr"] .sidebar {
    left: 0;
    right: auto;
}

/* Main Content Area - Padding to offset the fixed sidebar */
.main-wrapper {
    padding: 2rem;
    min-height: 100vh;
    box-sizing: border-box;
}

[dir="rtl"] .main-wrapper {
    margin-right: var(--sidebar-width);
    margin-left: 0 !important;
}

[dir="ltr"] .main-wrapper {
    margin-left: var(--sidebar-width);
    margin-right: 0 !important;
}

/* Sidebar Links */
.nav-link-custom {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: #94a3b8;
    text-decoration: none;
    transition: var(--transition);
    border-right: 4px solid transparent;
}

[dir="rtl"] .nav-link-custom.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-right: 4px solid #6366f1;
}

/* Utils */
.btn-premium {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    transition: var(--transition);
}

.btn-premium:hover {
    transform: scale(1.02);
    color: white;
}

/* Animations */
.pulse-green {
    color: #10b981;
    animation: pulse-green-animation 2s infinite;
}

@keyframes pulse-green-animation {
    0% { transform: scale(0.95); text-shadow: 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1.1); text-shadow: 0 0 10px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); text-shadow: 0 0 0 rgba(16, 185, 129, 0); }
}

/* Responsive (Mobile) */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(100%); /* Hide to the right for RTL */
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    }
    [dir="ltr"] .sidebar {
        transform: translateX(-100%); /* Hide to the left for LTR */
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .main-wrapper {
        margin-right: 0 !important;
        margin-left: 0 !important;
        padding: 1rem 0.5rem;
    }
}