* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

/* Navigation */
nav {
    background: linear-gradient(135deg, var(--navy), var(--blue));
    border-bottom: 2px solid var(--sky);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 135, 198, 0.3);
}

.logo-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 56px;
    width: 56px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

.logo {
    font-family: 'Tajawal', sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    color: white;
    line-height: 1.1;
}

.logo-subtitle {
    font-family: 'Cairo', sans-serif;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.75);
    font-weight: 400;
    letter-spacing: 0.3px;
}

.nav-tabs {
    display: flex;
    gap: 0.5rem;
}

.nav-tab {
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid transparent;
    transition: all 0.25s;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
}

.nav-tab:hover {
    color: white;
    border-color: var(--border);
}

.nav-tab.active {
    background: linear-gradient(135deg, var(--sky), var(--blue));
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(0, 182, 231, 0.4);
}

/* Views */
.view {
    display: none;
    padding: 2.5rem 2rem;
    max-width: 1300px;
    margin: 0 auto;
}

.view.active {
    display: block;
}

/* Page Header */
.page-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.page-header h1 {
    font-family: 'Tajawal', sans-serif;
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    color: var(--navy);
}

.page-header p {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
}

/* Stats Bar */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 87, 198, 0.05);
    padding: 1.5rem; text-align: right;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 87, 198, 0.1);
    border-color: var(--sky);
}

.stat-card::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 4px;
    background: var(--border);
}

.stat-card.gold::after { background: var(--gold); }
.stat-card.red::after { background: var(--fire); }
.stat-card.green::after { background: var(--success); }
.stat-card.blue::after { background: var(--blue); }

.stat-card .num {
    font-size: 2.2rem;
    font-weight: 900;
    font-family: 'Tajawal', sans-serif;
    line-height: 1;
    margin-bottom: 0.3rem;
}

.stat-card .label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 700;
}

.stat-card.gold .num { color: var(--gold); }
.stat-card.red .num { color: var(--fire); }
.stat-card.green .num { color: var(--success); }
.stat-card.blue .num { color: var(--blue); }

/* Empty State */
.empty-state {
    text-align: center;
    padding: 5rem 2rem;
    background: var(--white);
    border-radius: 20px;
    border: 2px dashed var(--border);
    color: var(--text-muted);
}

.empty-state .icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
}

.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--navy);
}

.empty-state p {
    font-size: 1rem;
}

/* Toast */
.toast-container {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.toast {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.9rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    animation: toastIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    white-space: nowrap;
}

.toast.success {
    border-color: var(--success);
    color: var(--success);
}

.toast.error {
    border-color: var(--danger);
    color: var(--danger);
}

.toast.info {
    border-color: var(--blue);
    color: var(--blue);
}

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

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4a4d7a;
}

/* Mobile List */
.mobile-list {
    display: none;
}

.mobile-course-item {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 87, 198, 0.06);
    padding: 1rem;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: space-between;
}

.mobile-course-item .info {
    flex: 1;
}

.mobile-course-item .name {
    font-weight: 700;
    font-size: 0.95rem;
}

.mobile-course-item .sub {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Applicants Section */
.applicants-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.applicants-filters {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.2rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.applicants-filters input,
.applicants-filters select {
    padding: 0.55rem 1rem;
    border: 1px solid var(--border);
    border-radius: 50px;
    background: var(--bg);
    color: var(--text);
    font-family: 'Cairo', sans-serif;
    font-size: 0.88rem;
}

.applicants-filters input {
    flex: 1;
    min-width: 200px;
}

.applicants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 0.5rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-btn:hover:not(:disabled) {
    border-color: var(--sky);
    color: var(--sky);
}

.page-btn.active {
    background: var(--sky);
    color: white;
    border-color: var(--sky);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Loading Spinner */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--border);
    border-top: 5px solid var(--sky);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}