:root {
    --primary-color: #10b981;
    --primary-light: #34d399;
    --primary-dark: #065f46;
    --secondary-color: #f59e0b;
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --white: #ffffff;
    --gray-100: #1e293b;
    --gray-200: #334155;
    --gray-300: #475569;
    --success: #059669;
    --info: #0ea5e9;
    --warning: #d97706;
    --danger: #ef4444;
    --sidebar-width: 280px;
    --header-height: 80px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', 'Cairo', sans-serif;
    background-color: var(--bg-color);
    background-image: radial-gradient(at 0% 0%, rgba(16, 185, 129, 0.1) 0, transparent 50%),
        radial-gradient(at 50% 0%, rgba(99, 102, 241, 0.1) 0, transparent 50%);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    direction: rtl;
}

/* Sidebar Styling */
.sidebar {
    position: fixed;
    top: 20px;
    right: 20px;
    bottom: 20px;
    width: var(--sidebar-width);
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem 1.5rem;
    z-index: 1000;
    transition: var(--transition);
}

.sidebar-header {
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.sidebar-logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-menu {
    list-style: none;
}

.menu-item {
    margin-bottom: 0.8rem;
}

.menu-link {
    display: flex;
    align-items: center;
    padding: 1rem 1.2rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 16px;
    transition: var(--transition);
    font-weight: 600;
}

.menu-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
    transform: translateX(-5px);
}

.menu-link.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.2);
}

.menu-icon {
    margin-left: 14px;
    font-size: 1.4rem;
}

/* Main Content Area */
.main-wrapper {
    margin-right: calc(var(--sidebar-width) + 40px);
    padding: 20px 40px 40px 20px;
    min-height: 100vh;
}

.header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.header-profile {
    background: var(--card-bg);
    backdrop-filter: blur(8px);
    padding: 0.8rem 1.5rem;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Glassmorphism Cards */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* Buttons */
.btn {
    padding: 0.8rem 1.8rem;
    border-radius: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--white);
}

/* Tables */
.custom-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 12px;
    margin-top: 1rem;
}

.custom-table th {
    padding: 1rem;
    text-align: right;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.custom-table tr td {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.2rem 1rem;
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

.custom-table tr td:first-child {
    border-right: 1px solid var(--glass-border);
    border-radius: 0 16px 16px 0;
}

.custom-table tr td:last-child {
    border-left: 1px solid var(--glass-border);
    border-radius: 16px 0 0 16px;
}

.badge {
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 800;
}

.badge-approved {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.badge-pending {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.badge-rejected {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: var(--card-bg);
    padding: 1.8rem;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

/* Forms */
.form-control {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--white);
    padding: 1rem 1.2rem;
    border-radius: 14px;
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
    outline: none;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.form-label {
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Select Dropdowns - Fix for option visibility */
select.form-control {
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
}

select.form-control option {
    background-color: var(--gray-100);
    color: var(--white);
    padding: 0.8rem;
}

select.form-control option:hover,
select.form-control option:checked {
    background-color: var(--primary-color);
    color: var(--white);
}

select.form-control:focus {
    background: rgba(255, 255, 255, 0.08);
}

/* Modals */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal-content {
    margin: 0 !important;
    max-width: 600px;
    width: 100%;
    animation: modalSlide 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlide {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Print Styles for PDF */
@media print {

    .sidebar,
    .header,
    .btn,
    .no-print {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .main-wrapper {
        margin: 0 !important;
        padding: 0 !important;
    }

    .card {
        border: none !important;
        box-shadow: none !important;
        background: transparent !important;
    }
}