:root {
    --primary-color: #4f46e5;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --text-dark: #1f2937;
    --text-muted: #6b7280;
    --bg-light: #f3f4f6;
    --card-bg: #ffffff;
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    background-color: var(--bg-light);
    font-family: 'Tajawal', sans-serif;
    color: var(--text-dark);
    margin: 0;
}

/* Sidebar Layout */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: white;
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: width 0.3s;
}

.sidebar-header {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #f3f4f6;
}

.sidebar-menu {
    padding: 20px 0;
}

.menu-item {
    padding: 12px 25px;
    display: flex;
    align-items: center;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
    cursor: pointer;
}

.menu-item:hover, .menu-item.active {
    background: #eef2ff;
    color: var(--primary-color);
    border-right: 4px solid var(--primary-color);
}

.menu-item i {
    margin-left: 15px;
    width: 20px;
    text-align: center;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-right: 260px; /* Sidebar width */
    padding: 30px;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: var(--shadow-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.3s;
}

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

.stat-info h3 {
    margin: 0;
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
}

.stat-info p {
    margin: 5px 0 0;
    color: var(--text-muted);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.bg-blue { background: #e0e7ff; color: var(--primary-color); }
.bg-green { background: #d1fae5; color: var(--success-color); }
.bg-yellow { background: #fef3c7; color: var(--warning-color); }
.bg-purple { background: #ede9fe; color: var(--secondary-color); }

/* Section Styles */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #4338ca;
}

/* Cards for Requests */
.request-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: var(--shadow-soft);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-right: 5px solid transparent;
}

.request-card.pending { border-right-color: var(--warning-color); }
.request-card.approved { border-right-color: var(--success-color); }
.request-card.rejected { border-right-color: var(--danger-color); }

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatar-circle {
    width: 50px;
    height: 50px;
    background: #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--primary-color);
}

.user-details h4 {
    margin: 0 0 5px 0;
}

.user-details span {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.actions {
    display: flex;
    gap: 10px;
}

.btn-icon {
    width: 35px;
    height: 35px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.btn-icon:hover { transform: scale(1.1); }

.btn-approve { background: #d1fae5; color: var(--success-color); }
.btn-reject { background: #fee2e2; color: var(--danger-color); }
.btn-msg { background: #e0e7ff; color: var(--primary-color); }

/* Courses Grid */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.course-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.course-img {
    height: 160px;
    background: #e5e7eb;
    position: relative;
}

.course-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.course-body {
    padding: 20px;
}

.course-body h4 {
    margin: 0 0 10px 0;
    color: var(--text-dark);
}

.course-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

/* Modal */
.modal-overlay {
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    border-radius: 20px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Form Styles */
.form-group { margin-bottom: 20px; }
.form-label { font-weight: 600; margin-bottom: 8px; display: block; }
.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-family: inherit;
}
.form-row { display: flex; gap: 20px; }

/* Responsive */
@media (max-width: 768px) {
    .sidebar { width: 70px; }
    .sidebar-menu span { display: none; }
    .main-content { margin-right: 70px; padding: 15px; }
    .request-card { flex-direction: column; align-items: flex-start; gap: 15px; }
    .actions { width: 100%; justify-content: flex-end; }
}
