/* ═══════════════════════════════════════════════════════════════
   نظام حصر بيانات الإداريين - وزارة التربية - دولة الكويت
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --primary: #061633; /* MOE Dark Navy */
    --primary-light: #0e2b5c; /* MOE Medium Blue */
    --primary-dark: #040d1f;
    --primary-50: #f0f4f8;
    --primary-100: #dbeafe;
    --secondary: #ccac55; /* MOE Gold */
    --secondary-light: #dec787;
    --secondary-dark: #b3913d;
    --bg-white: #FFFFFF;
    --bg-light: #f8f9fa;
    --bg-gray: #e9ecef;
    --text-dark: #061633;
    --text-muted: #6c757d;
    --text-light: #adb5bd;
    --border: #dee2e6;
    --success: #198754;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #0dcaf0;
    --shadow-sm: 0 0.125rem 0.25rem rgba(0,0,0,0.075);
    --shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
    --shadow-md: 0 0.75rem 1.5rem rgba(0,0,0,0.1);
    --shadow-lg: 0 1rem 3rem rgba(0,0,0,0.175);
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Cairo', sans-serif;
    color: var(--text-dark);
    background: var(--bg-light);
    direction: rtl;
    line-height: 1.7;
    font-size: 15px;
}

a { text-decoration: none; color: var(--primary); transition: var(--transition); }
a:hover { color: var(--primary-dark); }

/* ─── Navbar ─── */
.navbar-main {
    background: var(--primary);
    border-bottom: 4px solid var(--secondary);
    box-shadow: var(--shadow-md);
    padding: 0.75rem 0;
}
.navbar-main .navbar-brand {
    font-weight: 800;
    font-size: 1.3rem;
    color: white !important;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.navbar-brand img, .sidebar-header img, .admin-navbar img, img[src*="white-logo"] { 
    display: none !important; 
} /* إخفاء شعار الوزارة من كافة المواقع مؤقتاً */



.navbar-main .nav-link {
    color: rgba(255,255,255,0.85) !important;
    font-weight: 500;
    padding: 0.5rem 1.25rem !important;
    border-radius: var(--radius);
    transition: var(--transition);
}
.navbar-main .nav-link:hover {
    color: var(--secondary) !important;
}
.navbar-main .nav-link.active {
    color: white !important;
    background: rgba(255,255,255,0.1);
}

/* ─── Hero Section ─── */
.hero-section {
    background: linear-gradient(rgba(6, 22, 51, 0.85), rgba(6, 22, 51, 0.7)), url('../images/hero-bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    padding: 7rem 0 6rem;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: radial-gradient(circle at 20% 50%, rgba(204, 172, 85, 0.15) 0%, transparent 50%);
    pointer-events: none;
}
.hero-section h1 {
    font-size: 2.75rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    color: var(--secondary); /* MOE Gold for better contrast */
    text-shadow: 0 4px 10px rgba(0,0,0,0.5);
    position: relative;
    z-index: 2;
}
.hero-section p {
    font-size: 1.25rem;
    color: #ffffff;
    opacity: 1; /* Ensure full visibility */
    max-width: 800px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* ─── Cards ─── */
.stat-card {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: 1.75rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: var(--transition);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}
.stat-card .stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}
.stat-card .stat-icon.blue { background: var(--primary-100); color: var(--primary); }
.stat-card .stat-icon.orange { background: #FFF7ED; color: var(--secondary); }
.stat-card .stat-icon.green { background: #ECFDF5; color: var(--success); }
.stat-card .stat-icon.red { background: #FEF2F2; color: var(--danger); }
.stat-card .stat-number {
    font-size: 2.25rem;
    font-weight: 900;
    color: var(--text-dark);
    line-height: 1;
    margin-bottom: 0.25rem;
}
.stat-card .stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
}

/* ─── Steps Section ─── */
.steps-section { background: var(--bg-white); padding: 4rem 0; }
.step-card {
    text-align: center;
    padding: 2rem 1.5rem;
    border-radius: var(--radius-xl);
    transition: var(--transition);
}
.step-card:hover { background: var(--primary-50); }
.step-number {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--secondary);
    color: var(--primary);
    font-size: 1.6rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    box-shadow: 0 4px 15px rgba(204, 172, 85, 0.3);
}
.step-card h5 { font-weight: 700; color: var(--primary); margin-bottom: 0.75rem; }
.step-card p { color: var(--text-muted); font-size: 0.95rem; }

/* ─── Section Headers ─── */
.section-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 0.5rem;
}
.section-subtitle {
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 2.5rem;
}

/* ─── Auth Cards (Login/Register) ─── */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--primary-50) 100%);
    padding: 2rem 1rem;
}
.auth-card {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 2.5rem;
    width: 100%;
    max-width: 580px;
    border-top: 4px solid var(--primary);
}
.auth-card .auth-header {
    text-align: center;
    margin-bottom: 2rem;
}
.auth-card .auth-header i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
}
.auth-card .auth-header h3 {
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}
.auth-card .auth-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ─── Form Styles ─── */
.form-label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
}
.form-control, .form-select {
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 0.6rem 1rem;
    font-family: 'Cairo', sans-serif;
    font-size: 0.95rem;
    transition: var(--transition);
    background: var(--bg-white);
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.15);
}
.form-control.is-invalid { border-color: var(--danger); }
.invalid-feedback { font-size: 0.8rem; font-weight: 600; }

/* ─── Buttons ─── */
.btn-primary-custom {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    font-weight: 700;
    border-radius: var(--radius);
    transition: var(--transition);
    font-family: 'Cairo', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.btn-primary-custom:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    color: white;
}
.btn-secondary-custom {
    background: var(--secondary);
    color: var(--primary);
    border: none;
    padding: 0.75rem 2rem;
    font-weight: 700;
    border-radius: var(--radius);
    transition: var(--transition);
    font-family: 'Cairo', sans-serif;
}
.btn-secondary-custom:hover {
    background: var(--secondary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    color: var(--primary);
}
.btn-outline-custom {
    background: transparent;
    color: white;
    border: 2px solid white;
    padding: 0.65rem 1.75rem;
    font-weight: 700;
    border-radius: 50px;
    transition: var(--transition);
    font-family: 'Cairo', sans-serif;
}
.btn-outline-custom:hover {
    background: white;
    color: var(--primary);
}

/* ─── Dashboard Layout ─── */
.dashboard-wrapper { display: flex; min-height: 100vh; }
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, var(--primary-dark) 0%, #0F172A 100%);
    color: white;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    transition: var(--transition);
    overflow-y: auto;
}
.sidebar .sidebar-header {
    padding: 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}
.sidebar .sidebar-header h6 { font-weight: 700; font-size: 0.95rem; margin: 0; }
.sidebar .sidebar-header small { opacity: 0.7; font-size: 0.75rem; }
.sidebar-nav { padding: 1rem 0; }
.sidebar-nav .nav-item { margin: 2px 0.5rem; }
.sidebar-nav .nav-link {
    color: rgba(255,255,255,0.75) !important;
    font-weight: 600;
    padding: 0.65rem 1rem;
    border-radius: var(--radius);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}
.sidebar-nav .nav-link:hover, .sidebar-nav .nav-link.active {
    background: rgba(255,255,255,0.1);
    color: white !important;
}
.sidebar-nav .nav-link i { width: 20px; text-align: center; }

.main-content {
    margin-right: 260px;
    flex: 1;
    min-height: 100vh;
}
.top-bar {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1020;
}
.top-bar .user-info { display: flex; align-items: center; gap: 0.5rem; }
.top-bar .user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}
.content-area { padding: 1.5rem; }

/* ─── Dashboard Cards ─── */
.dash-stat {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    border-right: 4px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}
.dash-stat:hover { box-shadow: var(--shadow-md); }
.dash-stat .dash-stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}
.dash-stat .dash-stat-info h4 { font-weight: 800; font-size: 1.5rem; margin: 0; line-height: 1; }
.dash-stat .dash-stat-info span { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; }

/* ─── Data Table ─── */
.data-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.data-card .card-header-custom {
    background: var(--bg-light);
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.data-card .card-header-custom h5 { font-weight: 700; margin: 0; font-size: 1rem; }
.data-card .card-body-custom { padding: 1.25rem; }

.table-custom { font-size: 0.9rem; }
.table-custom thead th {
    background: var(--primary-50);
    color: var(--primary-dark);
    font-weight: 700;
    border: none;
    padding: 0.75rem;
    white-space: nowrap;
    font-size: 0.85rem;
}
.table-custom tbody td {
    padding: 0.75rem;
    vertical-align: middle;
    border-color: var(--border);
}
.table-custom tbody tr:hover { background: var(--bg-light); }

.btn-action {
    width: 34px;
    height: 34px;
    border-radius: var(--radius);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    cursor: pointer;
    font-size: 0.85rem;
}
.btn-action.edit { background: #FFF7ED; color: var(--secondary); }
.btn-action.edit:hover { background: var(--secondary); color: white; }
.btn-action.delete { background: #FEF2F2; color: var(--danger); }
.btn-action.delete:hover { background: var(--danger); color: white; }

/* ─── Filter Bar ─── */
.filter-bar {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.25rem;
}

/* ─── Modal ─── */
.modal-custom .modal-content {
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
}
.modal-custom .modal-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 1rem 1.5rem;
}
.modal-custom .modal-header .modal-title { font-weight: 700; }
.modal-custom .modal-header .btn-close { filter: invert(1); }
.modal-custom .modal-body { padding: 1.5rem; }
.modal-custom .modal-footer { border-top: 1px solid var(--border); padding: 1rem 1.5rem; }

/* ─── Progress Bar ─── */
.progress-custom {
    height: 10px;
    border-radius: 50px;
    background: var(--bg-gray);
}
.progress-custom .progress-bar {
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 50px;
}

/* ─── Toast ─── */
.toast-container { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 9999; }
.toast-custom {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    animation: slideDown 0.4s ease;
    border-right: 4px solid var(--success);
}
.toast-custom.error { border-right-color: var(--danger); }
.toast-custom.warning { border-right-color: var(--warning); }
@keyframes slideDown {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ─── Empty State ─── */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}
.empty-state i { font-size: 4rem; margin-bottom: 1rem; opacity: 0.3; }
.empty-state h5 { font-weight: 700; color: var(--text-dark); }
.empty-state p { font-size: 0.9rem; }

/* ─── Footer ─── */
.footer {
    background: var(--primary);
    color: rgba(255,255,255,0.8);
    padding: 3rem 0 2rem;
    text-align: center;
    font-size: 0.95rem;
    border-top: 5px solid var(--secondary);
    background-image: url('https://www.transparenttextures.com/patterns/diagonal-stripes.png');
}
.footer p { margin-bottom: 0.5rem; }
.footer a { color: var(--secondary); font-weight: 700; }
.footer a:hover { color: white; }

/* ─── Scroll to Top ─── */
.scroll-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    transition: var(--transition);
    font-size: 1.1rem;
}
.scroll-top:hover { background: var(--primary-dark); transform: translateY(-3px); }
.scroll-top.show { display: flex; }

/* ─── Loading Spinner ─── */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.loading-overlay.show { display: flex; }
.spinner-custom {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ─── Badge ─── */
.badge-status {
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
}
.badge-status.registered { background: #ECFDF5; color: var(--success); }
.badge-status.not-registered { background: #FEF2F2; color: var(--danger); }

/* ─── Admin Dark Navbar ─── */
.navbar-admin {
    background: linear-gradient(90deg, #0F172A, var(--primary-dark));
    padding: 0.5rem 0;
}
.navbar-admin .navbar-brand { color: white !important; font-weight: 800; }
.navbar-admin .nav-link { color: rgba(255,255,255,0.8) !important; font-weight: 600; }
.navbar-admin .nav-link:hover { color: white !important; }

/* ─── Breadcrumb ─── */
.breadcrumb-custom {
    background: transparent;
    padding: 0;
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
}
.breadcrumb-custom .breadcrumb-item a { color: var(--primary); font-weight: 600; }
.breadcrumb-custom .breadcrumb-item.active { color: var(--text-muted); }

/* ─── Responsive ─── */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(100%);
        width: 280px;
    }
    .sidebar.show { transform: translateX(0); }
    .main-content { margin-right: 0; }
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1035;
        display: none;
    }
    .sidebar-overlay.show { display: block; }
}
@media (max-width: 767.98px) {
    .hero-section { padding: 3rem 0 2.5rem; }
    .hero-section h1 { font-size: 1.75rem; }
    .hero-section p { font-size: 0.95rem; }
    .auth-card { padding: 1.5rem; margin: 0 0.5rem; }
    .content-area { padding: 1rem; }
    .modal-custom .modal-dialog { margin: 0.5rem; }
    .data-card .card-header-custom { flex-direction: column; align-items: stretch; }
}
@media (max-width: 575.98px) {
    .hero-section h1 { font-size: 1.5rem; }
    .stat-card { padding: 1.25rem; }
    .stat-card .stat-number { font-size: 1.75rem; }
}

/* ─── Animations ─── */
.fade-in { animation: fadeIn 0.5s ease; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─── ASP.NET GridView Pager ─── */
.GridPager { text-align: center; padding: 1rem 0; }
.GridPager table { margin: 0 auto; }
.GridPager td {
    padding: 0 3px;
}
.GridPager a, .GridPager span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 0.85rem;
    transition: var(--transition);
}
.GridPager a {
    background: var(--bg-light);
    color: var(--text-dark);
    text-decoration: none;
}
.GridPager a:hover { background: var(--primary-100); color: var(--primary); }
.GridPager span {
    background: var(--primary);
    color: white;
}

/* ─── Validation ─── */
.validation-error {
    color: var(--danger);
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

/* ─── UpdatePanel Animation ─── */
.update-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.7);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
}
