/* * { */
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans Arabic', system-ui, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e9f2 100%);
    direction: rtl;
    color: #333;
}

/* ====================== Layout ====================== */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar - أكثر أناقة */
.sidebar {
    width: 270px;
    background: linear-gradient(180deg, #2c3e50 0%, #1e2a3a 100%);
    color: white;
    position: fixed;
    right: 0; /* تم التعديل: تثبيت القائمة يميناً */
    top: 0;   /* تم التعديل */
    height: 100%;
    overflow-y: auto;
    box-shadow: -4px 0 15px rgba(0,0,0,0.15); /* تم التعديل: عكس اتجاه الظل */
    z-index: 100;
    transition: transform 0.4s ease;
}

.logo {
    text-align: center;
    padding: 30px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo h2 {
    font-size: 32px;
    font-weight: 700;
    color: #4fc3f7;
    margin-bottom: 4px;
}

.sidebar nav a {
    display: flex;
    align-items: center;
    padding: 16px 25px;
    color: #ddd;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 15.5px;
}

.sidebar nav a i {
    width: 24px;
    margin-left: 12px;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background: rgba(255,255,255,0.1);
    color: white;
    padding-right: 35px;
    border-right: 4px solid #4fc3f7;
}

/* Main Content */
.main-content {
    margin-right: 270px; /* بما أن القائمة يميناً، الإزاحة من اليمين صحيحة */
    flex: 1;
    padding: 25px;
}

/* Hamburger */
.hamburger {
    display: none;
    font-size: 30px;
    background: none;
    border: none;
    color: #2c3e50;
    cursor: pointer;
    padding: 10px 15px;
    z-index: 101;
}

/* Cards & Containers */
.container {
    background: white;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    margin-bottom: 25px;
    transition: transform 0.3s;
}

.container:hover {
    transform: translateY(-3px);
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 35px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 28px 20px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
}

.stat-card i {
    font-size: 42px;
    margin-bottom: 12px;
    color: #4fc3f7;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

.btn-primary { background: linear-gradient(135deg, #007bff, #0056b3); color: white; }
.btn-success { background: linear-gradient(135deg, #28a745, #1e7e34); color: white; }
.btn-danger  { background: linear-gradient(135deg, #dc3545, #c82333); color: white; }
.btn-pdf     { background: linear-gradient(135deg, #dc3545, #c82333); color: white; }

/* Inputs */
input, select, textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid #ddd;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #4fc3f7;
    box-shadow: 0 0 0 4px rgba(79, 195, 247, 0.15);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    border-radius: 12px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.data-table th {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 16px 12px;
    text-align: right;
}

.data-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #f0f0f0;
}

/* Search */
.table-search {
    padding: 14px 18px;
    border: 1.5px solid #ddd;
    border-radius: 12px;
    font-size: 16px;
	width:auto;
	margin-bottom:20px;
}


/* Responsive */
@media (max-width: 992px) {
    .hamburger {
        display: block;
        position: fixed;
        top: 15px;
        right: 15px;
        z-index: 200;
    }
    
    .sidebar {
        box-shadow: -10px 0 20px rgba(0,0,0,0.3); /* تم التعديل: الظل لليسار */
        width: 280px;
        transform: translateX(100%); /* تم التعديل: 100% موجب لتختفي نحو اليمين */
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-right: 0 !important;
        padding-top: 70px;
    }
}

@media (max-width: 576px) {
    .stats-grid { grid-template-columns: 1fr; }
    .container { padding: 18px; }
}

/* ====================== تحسينات القائمة الجانبية ====================== */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 10px;
}

.close-sidebar {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    color: white;
    cursor: pointer;
    padding: 5px 10px;
}

@media (max-width: 992px) {
    .close-sidebar {
        display: block;
    }
    
    /* Backdrop */
    .sidebar::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s;
        z-index: -1;
    }
    
    .sidebar.active::before {
        opacity: 1;
        visibility: visible;
    }
}

/* Logout link styling */
.logout-link {
    color: #ff6b6b !important;
    margin-top: 20px;
}



/* معلومات المستخدم في الـ Sidebar */
.user-info {
    padding: 15px 20px;
    background: rgba(255,255,255,0.08);
    margin: 10px 15px;
    border-radius: 10px;
    text-align: center;
    font-size: 18px;
}

.user-info small {
    opacity: 1;
    display: block;
    margin-top: 4px;
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25D376, #128C7E);
    color: white;
}

.btn-whatsapp:hover {
    background: linear-gradient(135deg, #20ba5c, #0f7a6b);
    transform: translateY(-2px);
}

.perm-card {
    background: #f8f9fa;
    padding: 18px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

.perm-card strong {
    display: block;
    margin-bottom: 10px;
    color: #2c3e50;
}