:root {
            --primary-blue: #0f172a;
            --secondary-blue: #1e293b;
            --accent-gold: #d4af37;
            --light-gold: #fef08a;
            --bg-light: #f8fafc;
            --text-dark: #1e293b;
            --text-gray: #475569;
            --card-white: #ffffff;
            --success-green: #10b981;
            --danger-red: #ef4444;
        }
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Cairo', 'CairoLocal', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            transition: all 0.25s ease;
        }
        body {
            background-color: var(--bg-light);
            color: var(--text-dark);
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }
        header {
            background-color: var(--primary-blue);
            padding: 15px 5%;
            display: flex;
            justify-content: space-between;
            align-items: center;
            box-shadow: 0 4px 20px rgba(0,0,0,0.2);
            position: sticky;
            top: 0;
            z-index: 100;
        }
        .logo-container {
            display: flex;
            align-items: center;
            gap: 10px;
            text-decoration: none;
            cursor: pointer;
        }
        .logo-svg {
            width: 38px;
            height: 38px;
            fill: var(--accent-gold);
        }
        .logo-text {
            color: #ffffff;
            font-size: 22px;
            font-weight: 800;
        }
        .logo-text span {
            color: var(--accent-gold);
        }
        nav {
            display: flex;
            align-items: center;
            gap: 18px;
        }
        nav a {
            color: #cbd5e1;
            text-decoration: none;
            font-weight: 500;
            font-size: 14px;
            cursor: pointer;
            padding: 6px 12px;
            border-radius: 8px;
        }
        nav a:hover, nav a.active-nav {
            color: var(--accent-gold);
            background: rgba(212, 175, 55, 0.1);
        }
        .btn-portal-header {
            background: linear-gradient(135deg, #d4af37, #b8860b);
            color: #0f172a;
            padding: 9px 22px;
            border-radius: 20px;
            font-weight: 700;
            font-size: 14px;
            border: none;
            cursor: pointer;
            box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .lang-select {
            background: rgba(255, 255, 255, 0.08);
            color: #fff;
            border: 1px solid var(--accent-gold);
            padding: 6px 12px;
            border-radius: 20px;
            cursor: pointer;
            outline: none;
            font-size: 13px;
        }
        .lang-select option {
            background-color: var(--primary-blue);
            color: #fff;
        }
        .page-view {
            display: none;
            flex: 1;
            flex-direction: column;
            animation: fadeIn 0.3s ease-in-out;
        }
        .page-view.active-page {
            display: flex;
        }
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(8px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .hero {
            text-align: center;
            padding: 110px 20px 100px;
            background: linear-gradient(180deg, var(--primary-blue) 0%, #1e293b 100%);
            color: white;
        }
        .hero h1 {
            font-size: 46px;
            margin-bottom: 20px;
            font-weight: 800;
        }
        .hero h1 span {
            color: var(--accent-gold);
        }
        .hero p {
            font-size: 18px;
            color: #94a3b8;
            max-width: 720px;
            margin: 0 auto 25px;
            line-height: 1.7;
        }
        .section-padding {
            padding: 60px 8%;
        }
        .section-title {
            text-align: center;
            font-size: 32px;
            color: var(--primary-blue);
            font-weight: 800;
            margin-bottom: 12px;
        }
        .about-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(min(300px,100%), 1fr));
            gap: 30px;
            margin-top: 25px;
        }
        .info-card {
            background: var(--card-white);
            padding: 35px 25px;
            border-radius: 20px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.05);
            border-top: 4px solid var(--accent-gold);
        }
        .info-card h3 {
            color: var(--primary-blue);
            font-size: 20px;
            margin-bottom: 12px;
        }
        .info-card p {
            color: var(--text-gray);
            font-size: 14px;
            line-height: 1.6;
        }
        
        /* التصميم القديم المحسّن والمصغر لخريطة المستويات */
        .map-container { max-width: 900px; margin: 0 auto; width: 100%; }
        .map-sub { text-align: center; color: #6b7280; margin-bottom: 24px; font-size: 14px; }
        .stage {
            background: #fff;
            border-radius: 14px;
            padding: 14px 18px;
            margin-bottom: 14px;
            box-shadow: 0 3px 10px rgba(0,0,0,0.04);
            border-right: 6px solid #ccc;
        }
        .stage h2 { margin: 0 0 10px; font-size: 17px; color: #111827; }
        .levels { display: flex; flex-wrap: wrap; gap: 10px; }
        .level {
            background: #f9fafb;
            border-radius: 10px;
            padding: 10px 14px;
            min-width: 150px;
            flex: 1 1 calc(25% - 10px);
            box-sizing: border-box;
            border: 1px solid #e5e7eb;
        }
        .level .num { font-size:13px; color: #6b7280; }
        .level .name { font-weight: 700; color: #111827; margin: 3px 0; font-size: 14px; }
        .level .cefr { font-size:13px; color: #2563eb; font-weight: 600; }
        
        /* ميزة إبراز المستوى الحالي للطالب في الخريطة */
        .level.current-student-level {
            background: #eef2ff;
            border: 2px solid #6366f1;
            box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
        }
        .level.current-student-level .name {
            color: #4f46e5;
        }

        .stage .level.skills { 
            background: #fffbeb; 
            border: 1px dashed #f59e0b; 
        }
        .stage .level.skills .cefr { color: #d97706; }
        .foundation { border-right-color: #22c55e; }
        .beginner { border-right-color: #3b82f6; }
        .elementary { border-right-color: #a855f7; }
        .pre { border-right-color: #f97316; }
        .intermediate { border-right-color: #ef4444; }
        .upper { border-right-color: #eab308; }
        .advanced-stage { border-right-color: #0284c7; }
        .ielts { border-right-color: #111827; }
        
        .map-btn {
            display: block; margin: 0 auto 20px; padding: 9px 20px;
            background: #2563eb; color: white; border: none; border-radius: 8px;
            font-size: 14px; font-weight: 600; cursor: pointer;
            transition: background 0.2s;
        }
        .map-btn:hover { background: #1d4ed8; }

        .contact-container {
            max-width: 600px;
            margin: 25px auto 0;
            background: white;
            padding: 35px;
            border-radius: 20px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.05);
        }
        .dashboard-view {
            display: none;
            flex: 1;
            background-color: #f1f5f9;
        }
        .dashboard-container {
            display: flex;
            min-height: calc(100vh - 70px);
        }
        .dash-sidebar {
            width: 260px;
            background: var(--primary-blue);
            color: white;
            padding: 25px 20px;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        .dash-user-info {
            text-align: center;
            padding-bottom: 20px;
            border-bottom: 1px solid rgba(255,255,255,0.1);
            margin-bottom: 15px;
        }
        .user-avatar-img {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            border: 3px solid var(--accent-gold);
            object-fit: cover;
            margin: 0 auto 10px;
            display: block;
        }
        .dash-user-info h3 {
            font-size: 18px;
            color: var(--accent-gold);
        }
        .dash-user-info span {
            font-size:13px;
            color: #94a3b8;
        }
        .dash-nav-btn {
            background: none;
            border: none;
            color: #cbd5e1;
            padding: 12px 16px;
            font-size: 14px;
            font-weight: 600;
            border-radius: 10px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 12px;
        }
        [dir="rtl"] .dash-nav-btn { text-align: right; }
        [dir="ltr"] .dash-nav-btn { text-align: left; }
        .dash-nav-btn:hover, .dash-nav-btn.active {
            background: rgba(212, 175, 55, 0.15);
            color: var(--accent-gold);
        }
        .dash-logout {
            margin-top: auto;
            background: rgba(239, 68, 68, 0.15);
            color: var(--danger-red);
        }
        .dash-content {
            flex: 1;
            padding: 30px;
            overflow-y: auto;
        }
        .tab-content {
            display: none;
        }
        .tab-content.active-tab {
            display: block;
        }
        .dash-card {
            background: white;
            border-radius: 16px;
            padding: 25px;
            box-shadow: 0 5px 20px rgba(0,0,0,0.03);
            margin-bottom: 25px;
        }
        .dash-card h2 {
            font-size: 22px;
            color: var(--primary-blue);
            margin-bottom: 15px;
        }
        .daily-word-box {
            background: linear-gradient(135deg, #0f172a, #1e293b);
            color: white;
            border-radius: 16px;
            padding: 20px;
            border-right: 5px solid var(--accent-gold);
            margin-bottom: 25px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .skills-progress-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(min(200px,100%), 1fr));
            gap: 15px;
            margin-top: 15px;
        }
        .skill-item {
            background: #f8fafc;
            padding: 15px;
            border-radius: 12px;
            border: 1px solid #e2e8f0;
        }
        .progress-bar-bg {
            background: #e2e8f0;
            border-radius: 10px;
            height: 10px;
            width: 100%;
            margin-top: 8px;
            overflow: hidden;
        }
        .progress-bar-fill {
            background: var(--accent-gold);
            height: 100%;
            border-radius: 10px;
        }
        .badges-container {
            display: flex;
            gap: 12px;
            flex-wrap: wrap;
            margin-top: 15px;
        }
        .badge-card {
            background: #fdf8e2;
            border: 1px solid var(--accent-gold);
            padding: 10px 16px;
            border-radius: 20px;
            font-size: 13px;
            font-weight: 700;
            color: var(--primary-blue);
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .profile-grid-form {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(min(280px,100%), 1fr));
            gap: 20px;
            margin-top: 15px;
        }
        .profile-avatar-section {
            display: flex;
            align-items: center;
            gap: 20px;
            padding: 20px;
            background: #f8fafc;
            border-radius: 16px;
            border: 1px dashed var(--accent-gold);
            margin-bottom: 25px;
        }
        .profile-avatar-preview {
            width: 100px;
            height: 100px;
            border-radius: 50%;
            border: 3px solid var(--accent-gold);
            object-fit: cover;
        }
        table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 15px;
        }
        th, td {
            padding: 12px 15px;
            border-bottom: 1px solid #e2e8f0;
            font-size: 14px;
        }
        [dir="rtl"] th, [dir="rtl"] td { text-align: right; }
        [dir="ltr"] th, [dir="ltr"] td { text-align: left; }
        th {
            background-color: #f8fafc;
            color: var(--primary-blue);
            font-weight: 700;
        }
        .badge-status {
            padding: 4px 10px;
            border-radius: 20px;
            font-size:13px;
            font-weight: 700;
        }
        .status-present { background: rgba(16, 185, 129, 0.15); color: var(--success-green); }
        .status-absent { background: rgba(239, 68, 68, 0.15); color: var(--danger-red); }
        .btn-action {
            background: var(--primary-blue);
            color: white;
            padding: 8px 16px;
            border-radius: 8px;
            border: none;
            cursor: pointer;
            font-size: 13px;
            font-weight: 600;
        }
        .btn-action:hover { background: var(--secondary-blue); }
        .btn-danger {
            background: var(--danger-red);
            color: white;
            padding: 8px 16px;
            border-radius: 8px;
            border: none;
            cursor: pointer;
            font-size: 13px;
            font-weight: 600;
        }
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(15, 23, 42, 0.82);
            backdrop-filter: blur(8px);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            padding: 20px;
            overflow-y: auto;
        }
        .modal-overlay.active {
            display: flex;
        }
        .portal-card {
            background: #ffffff;
            width: 100%;
            max-width: 850px;
            border-radius: 24px;
            box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
            display: flex;
            overflow: hidden;
            max-height: 90vh;
            position: relative;
            margin: auto;
        }
        .close-btn {
            position: absolute;
            top: 15px;
            font-size: 22px;
            background: none;
            border: none;
            color: var(--text-gray);
            cursor: pointer;
            z-index: 10;
        }
        [dir="rtl"] .close-btn { left: 20px; right: auto; }
        [dir="ltr"] .close-btn { right: 20px; left: auto; }
        .portal-form-side {
            width: 100%;
            padding: 35px;
            display: flex;
            flex-direction: column;
            overflow-y: auto;
            max-height: 90vh;
        }
        .form-group {
            margin-bottom: 16px;
        }
        .form-group label {
            display: block;
            font-size: 13px;
            font-weight: 600;
            color: var(--text-dark);
            margin-bottom: 6px;
        }
        .form-group input, .form-group textarea, .form-group select {
            width: 100%;
            padding: 11px 14px;
            border: 1.5px solid #e2e8f0;
            border-radius: 12px;
            font-size: 13px;
            outline: none;
            background-color: #f8fafc;
        }
        .password-wrapper {
            position: relative;
            display: flex;
            align-items: center;
        }
        .password-wrapper input {
            padding-left: 45px;
        }
        [dir="rtl"] .password-wrapper input {
            padding-left: 14px;
            padding-right: 45px;
        }
        .toggle-password-btn {
            position: absolute;
            background: none;
            border: none;
            cursor: pointer;
            font-size: 16px;
            color: var(--text-gray);
            padding: 5px;
        }
        [dir="rtl"] .toggle-password-btn { right: 12px; left: auto; }
        [dir="ltr"] .toggle-password-btn { left: 12px; right: auto; }
        .card-row {
            display: flex;
            gap: 15px;
        }
        .btn-portal-submit {
            width: 100%;
            background: var(--primary-blue);
            color: #ffffff;
            padding: 13px;
            border: none;
            border-radius: 12px;
            font-size: 15px;
            font-weight: 700;
            cursor: pointer;
            margin-top: 10px;
        }
        .role-switchers {
            margin-top: 15px;
            display: flex;
            gap: 8px;
            justify-content: center;
        }
        .btn-role-outline {
            border: 1px solid #cbd5e1;
            background: #f8fafc;
            padding: 7px 14px;
            border-radius: 8px;
            font-size:13px;
            font-weight: 600;
            cursor: pointer;
        }
        .btn-role-outline.active-role {
            background: rgba(212, 175, 55, 0.15);
            border-color: var(--accent-gold);
            color: var(--primary-blue);
        }
        .portal-toggle-tab {
            display: flex;
            border-bottom: 2px solid #e2e8f0;
            margin-bottom: 20px;
        }
        .portal-tab-btn {
            flex: 1;
            padding: 10px;
            background: none;
            border: none;
            font-weight: 700;
            font-size: 14px;
            color: var(--text-gray);
            cursor: pointer;
            border-bottom: 3px solid transparent;
        }
        .portal-tab-btn.active-ptab {
            color: var(--primary-blue);
            border-bottom-color: var(--accent-gold);
        }
        .whatsapp-float {
            position: fixed;
            bottom: 25px;
            left: 25px;
            background-color: #25d366;
            color: white;
            border-radius: 50px;
            padding: 12px 20px;
            font-size: 14px;
            font-weight: 700;
            box-shadow: 0 4px 15px rgba(0,0,0,0.2);
            display: flex;
            align-items: center;
            gap: 8px;
            text-decoration: none;
            z-index: 999;
        }
        @media print {
            body { background: #fff; padding: 0; }
            .map-btn, header, footer, .whatsapp-float { display: none !important; }
            .stage { box-shadow: none; border: 1px solid #e5e7eb; border-right-width: 6px; break-inside: avoid; }
        }
        @media (max-width: 640px) {
            .level { min-width: 100%; }
        }
        footer {
            background-color: var(--primary-blue);
            color: var(--text-gray);
            text-align: center;
            padding: 20px;
            font-size: 13px;
            border-top: 1px solid rgba(212, 175, 55, 0.2);
        }
/* التنسيقات الجديدة للميزات المضافة */

.teacher-shift-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-right: 5px solid #2563eb;
    margin-bottom: 20px;
}

.shift-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size:13px;
    font-weight: 700;
}
.shift-morning {
    background: #fef3c7;
    color: #d97706;
}
.shift-evening {
    background: #e0e7ff;
    color: #3730a3;
}

/* تنسيقات جدول الدروس Schedule Grid */
.schedule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(220px,100%), 1fr));
    gap: 15px;
    margin-top: 20px;
}
.day-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px;
    position: relative;
}
.day-card.active-day {
    border: 2px solid #2563eb;
    background: #fff;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.08);
}
.day-card h3 {
    font-size: 15px;
    color: var(--primary-blue);
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.day-badge {
    background: #2563eb;
    color: white;
    font-size:13px;
    padding: 2px 8px;
    border-radius: 10px;
}
.schedule-item {
    font-size: 13px;
}
.schedule-item .time {
    display: block;
    color: #0284c7;
    font-size:13px;
    font-weight: 700;
    margin-bottom: 4px;
}
.schedule-item.exam-item {
    background: #fef2f2;
    padding: 10px;
    border-radius: 8px;
    border: 1px dashed #ef4444;
}

/* بطاقات الامتحانات Exams Grid */
.exams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(240px,100%), 1fr));
    gap: 20px;
    margin-top: 15px;
}
.exam-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    text-align: center;
}
.exam-card.highlight-exam {
    border: 2px solid var(--accent-gold);
    background: #fffdf5;
}
.exam-icon {
    font-size: 32px;
    margin-bottom: 10px;
}
.exam-card h3 {
    font-size: 18px;
    color: var(--primary-blue);
    margin-bottom: 8px;
}
.exam-card p {
    font-size:13px;
    color: var(--text-gray);
    margin-bottom: 12px;
}
.exam-status {
    font-size:13px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 12px;
    display: inline-block;
    margin-bottom: 10px;
}
.status-ready { background: #dcfce7; color: #15803d; }
.status-locked { background: #f1f5f9; color: #64748b; }

/* بطاقات الواجبات 6 Units */
.homework-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px,100%), 1fr));
    gap: 20px;
    margin-top: 15px;
}
.hw-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 18px;
}
.hw-card.active-hw {
    border: 2px solid #2563eb;
}
.hw-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.hw-header h3 {
    font-size: 16px;
    color: var(--primary-blue);
}
.hw-badge {
    font-size:13px;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 700;
}
.hw-done { background: #dcfce7; color: #15803d; }
.hw-pending { background: #dbeafe; color: #1e40af; }
.hw-upcoming { background: #f1f5f9; color: #64748b; }
.hw-card p {
    font-size: 13px;
    color: var(--text-gray);
    margin-bottom: 12px;
}
.hw-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* قسم الشهادات */
.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px,100%), 1fr));
    gap: 20px;
    margin-top: 15px;
}
.cert-card {
    background: #fff;
    border: 2px solid var(--accent-gold);
    border-radius: 18px;
    padding: 22px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(212,175,55,0.1);
}
.cert-card.cert-placeholder {
    border: 2px dashed #cbd5e1;
    background: #f8fafc;
    box-shadow: none;
}
.cert-seal {
    font-size: 40px;
    margin-bottom: 8px;
}
.cert-card h3 {
    font-size: 17px;
    color: var(--primary-blue);
    margin-bottom: 8px;
}
.cert-card p {
    font-size:13px;
    color: var(--text-gray);
    margin-bottom: 10px;
}
.cert-date {
    display: block;
    font-size:13px;
    color: #2563eb;
    font-weight: bold;
}/* تنسيقات رصد الحضور بالألوان الثلاثة */
.attendance-select {
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 13px;
    outline: none;
    border: 1px solid #cbd5e1;
    cursor: pointer;
}
.status-present-bg {
    background-color: #dcfce7;
    color: #15803d;
    border-color: #86efac;
}
.status-late-bg {
    background-color: #fef9c3;
    color: #a16207;
    border-color: #fde047;
}
.status-absent-bg {
    background-color: #fee2e2;
    color: #b91c1c;
    border-color: #fca5a5;
}
/* إضافات لوحة الإدارة – ملخص الطلاب / المعلمون / الدخول كمستخدم */
.ek-hint{color:var(--text-gray);font-size:13px;margin-bottom:16px}
.ek-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(130px,100%),1fr));gap:12px;margin-bottom:16px}
.ek-stat{background:#f8fafc;border:1px solid #e2e8f0;border-radius:14px;padding:12px 14px;display:flex;flex-direction:column;gap:2px}
.ek-stat span{font-size:20px}.ek-stat b{font-size:22px;color:var(--primary-blue)}.ek-stat small{color:var(--text-gray);font-size:13px}
.ek-filters{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:14px}
.ek-filters input,.ek-filters select,.ek-sel{padding:8px 10px;border:1px solid #cbd5e1;border-radius:8px;font:inherit;font-size:13px;background:#fff;color:var(--text-dark)}
.ek-filters input{flex:1;min-width:200px}
.ek-sel{max-width:190px}
.ek-table-wrap{overflow-x:auto}
.ek-table-wrap table{min-width:760px}
.ek-person{display:flex;align-items:center;gap:10px}
.ek-person img{width:38px;height:38px;border-radius:50%;border:2px solid var(--accent-gold)}
.ek-person small{display:block;color:var(--text-gray);font-size:13px}
.ek-range{display:flex;align-items:center;gap:6px}
.ek-badge{display:inline-block;padding:4px 10px;border-radius:20px;font-size:13px;font-weight:700;white-space:nowrap}
.ek-ok{background:#dcfce7;color:#166534}.ek-mid{background:#fef3c7;color:#92400e}.ek-bad{background:#fee2e2;color:#991b1b}
.ek-toggle{border:none;border-radius:20px;padding:5px 14px;font-weight:700;font-size:13px;cursor:pointer}
.ek-toggle.on{background:#dcfce7;color:#166534}.ek-toggle.off{background:#fee2e2;color:#b91c1c}
.ek-eye{white-space:nowrap;background:var(--accent-gold);color:var(--primary-blue)}
.ek-eye:hover{background:#b8860b;color:#fff}
.ek-empty{text-align:center;color:var(--text-gray);padding:24px}
.ek-impbar{position:sticky;top:0;z-index:50;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;
  background:linear-gradient(135deg,#0f172a,#1e293b);color:#fff;border:2px solid var(--accent-gold);border-radius:14px;padding:12px 16px;margin-bottom:18px;font-size:14px}
.ek-impbar b{color:var(--accent-gold)}
.ek-hwbox{display:flex;align-items:center;flex-wrap:wrap;gap:10px;background:#fffbeb;border:1.5px dashed var(--accent-gold);border-radius:12px;padding:12px 14px;margin-bottom:16px;font-size:14px}
.btn-action[disabled]{opacity:.5;cursor:not-allowed}

.ek-selok{border-color:#86efac;background:#f0fdf4}.ek-selbad{border-color:#fca5a5;background:#fef2f2}
.btn-danger[disabled]{opacity:.5;cursor:not-allowed}
.ek-savebar{position:sticky;bottom:0;z-index:60;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;
  margin:20px -30px -30px;padding:14px 30px;background:#fff;border-top:3px solid var(--accent-gold);box-shadow:0 -6px 20px rgba(15,23,42,.08);font-size:14px;font-weight:600;color:var(--success-green)}
.ek-savebar.dirty{color:#b45309;background:#fffbeb}
.ek-savebtns{display:flex;gap:10px}
.ek-save{background:var(--accent-gold);color:var(--primary-blue);padding:10px 22px;font-size:14px}
.ek-save:hover:not([disabled]){background:#b8860b;color:#fff}

.ek-notif{margin-inline-start:auto;background:#ef4444;color:#fff;border-radius:999px;min-width:20px;height:20px;padding:0 6px;font-size:13px;font-weight:700;
  display:inline-flex;align-items:center;justify-content:center;animation:ekPulse 1.6s infinite}
@keyframes ekPulse{0%{box-shadow:0 0 0 0 rgba(239,68,68,.6)}70%{box-shadow:0 0 0 8px rgba(239,68,68,0)}100%{box-shadow:0 0 0 0 rgba(239,68,68,0)}}

/* الامتحانات والنتائج */
.ek-exhead{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:16px}
.ek-exhead h2{margin:0!important}
.ek-excount{color:var(--text-gray);font-size:18px;font-weight:600}
.ek-exform{display:grid;grid-template-columns:1fr 1fr;gap:14px 16px;margin-bottom:18px}
@media(max-width:700px){.ek-exform{grid-template-columns:1fr}}
.ek-field label{display:block;font-size:13px;font-weight:600;color:var(--text-gray);margin-bottom:6px}
.ek-field input,.ek-field select,.ek-field textarea{width:100%;box-sizing:border-box;padding:12px 14px;border:1px solid #cbd5e1;border-radius:12px;font:inherit;font-size:14px;background:#fff;color:var(--text-dark)}
.ek-field input:focus,.ek-field select:focus,.ek-field textarea:focus{outline:none;border-color:var(--accent-gold);box-shadow:0 0 0 3px rgba(212,175,55,.2)}
.ek-field textarea{resize:vertical;min-height:90px}
.ek-full{grid-column:1/-1}
.ek-create{background:linear-gradient(135deg,#d4af37,#b8860b);color:var(--primary-blue);border:none;border-radius:12px;padding:13px 28px;font:inherit;font-weight:800;font-size:15px;cursor:pointer;box-shadow:0 6px 16px rgba(212,175,55,.35)}
.ek-create:hover{filter:brightness(1.06)}
.ek-exmsg{margin-inline-start:12px;font-size:13px;font-weight:600;color:var(--danger-red)}.ek-exmsg.ok{color:var(--success-green)}
.ek-exempty{text-align:center;padding:38px 10px;color:var(--text-gray)}.ek-exempty b{color:var(--primary-blue);font-size:15px}
.ek-exdet{display:block;color:var(--text-gray);font-size:13px;margin-top:3px;max-width:320px}
.ek-exact{white-space:nowrap}.ek-exact .btn-action,.ek-exact .btn-danger{margin-inline-end:6px}
.ek-resrow>td{background:#f8fafc}
.ek-res{padding:6px 4px}.ek-res>b{display:block;margin-bottom:6px;color:var(--primary-blue)}
.ek-score{width:90px;padding:7px 10px;border:1px solid #cbd5e1;border-radius:8px;font:inherit}

/* الكتب */
.ek-note{color:var(--text-gray);font-size:13px;line-height:1.7;margin:10px 0}
.ek-bktitle{min-width:200px;width:100%}
.ek-books{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(280px,100%),1fr));gap:14px;margin-bottom:10px}
.ek-book{display:flex;align-items:center;gap:12px;flex-wrap:wrap;background:#f8fafc;border:1px solid #e2e8f0;border-right:5px solid var(--accent-gold);border-radius:14px;padding:14px}
.ek-bkicon{font-size:28px}
.ek-bkinfo{flex:1;min-width:120px}.ek-bkinfo strong{display:block;color:var(--primary-blue);font-size:14px}.ek-bkinfo small{color:var(--text-gray);font-size:13px}
.ek-bkbtns{display:flex;gap:6px}
.ek-bkgroup{color:var(--primary-blue);margin:18px 0 10px;font-size:15px}
.ek-lock{text-align:center;background:#fffbeb;border:2px dashed var(--accent-gold);border-radius:16px;padding:34px 20px}
.ek-lock b{display:block;color:var(--primary-blue);font-size:17px;margin:6px 0}.ek-lock p{color:var(--text-gray);font-size:13px;margin-bottom:16px}
.ek-lockicon{font-size:44px}

/* امتحانات الكتابة */
.ek-subtabs{display:flex;gap:8px;margin-bottom:16px;flex-wrap:wrap}
.ek-subtabs button{border:1px solid #cbd5e1;background:#fff;color:var(--text-dark);padding:10px 18px;border-radius:12px;font:inherit;font-weight:700;font-size:14px;cursor:pointer}
.ek-subtabs button.active{background:var(--primary-blue);color:var(--accent-gold);border-color:var(--primary-blue)}
.ek-legend-edit{margin-top:14px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;padding:10px 14px}
.ek-legend-edit summary{cursor:pointer;font-weight:700;color:var(--primary-blue);font-size:14px}
.ek-legrow{display:flex;align-items:center;gap:8px;margin:7px 0;font-size:13px}
.ek-legrow b{margin-inline-start:auto;background:#fff;border:1px solid #e2e8f0;border-radius:20px;padding:1px 10px}
.ek-legrow .ek-sel{flex:1;max-width:none}
.ek-dot{width:16px;height:16px;border-radius:5px;flex:none;border:1px solid rgba(0,0,0,.15)}
.ek-wrcard h3{margin:0 0 4px;color:var(--primary-blue);font-size:17px}
.ek-wrhead{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap;margin-bottom:10px}
.ek-wrhead small{color:var(--text-gray)}
.ek-wrq{background:#f8fafc;border:1px solid #e2e8f0;border-right:5px solid var(--accent-gold);border-radius:12px;padding:12px 16px;margin:10px 0;font-size:14px;line-height:1.8}
.ek-wrq p{margin:0 0 8px}
.ek-wimg{max-width:100%;max-height:340px;border-radius:10px;display:block;margin-top:6px}
.ek-wrstats{color:var(--text-gray);font-size:13px;margin-top:6px}
.ek-gmeta{color:var(--text-gray);font-size:13px;margin-bottom:6px}
/* شريط الأدوات بأسلوب Word */
.ek-ribbon{display:flex;gap:0;flex-wrap:wrap;background:#f3f4f6;border:1px solid #d1d5db;border-radius:10px 10px 0 0;border-bottom:3px solid var(--accent-gold);margin-top:14px}
.ek-rgroup{padding:8px 14px;border-inline-end:1px solid #d1d5db;display:flex;flex-direction:column;gap:6px}
.ek-rgrow{flex:1;border-inline-end:none}
.ek-rlabel{font-size:13px;color:#6b7280}
.ek-rbtn{border:1px solid #d1d5db;background:#fff;border-radius:6px;width:34px;height:30px;font-size:16px;cursor:pointer}
.ek-rbtn:hover,.ek-sw:hover{background:#e5e7eb}
.ek-swrow{display:flex;gap:6px;flex-wrap:wrap}
.ek-sw{display:inline-flex;align-items:center;gap:7px;border:1px solid #d1d5db;background:#fff;border-radius:6px;padding:5px 10px;font:inherit;font-size:13px;cursor:pointer;color:var(--text-dark)}
.ek-sw i{width:16px;height:16px;border-radius:3px;border:1px solid rgba(0,0,0,.2);flex:none}
.ek-swx{background:#fff7ed}
/* صفحة الورقة */
.ek-gwrap{display:grid;grid-template-columns:1fr 280px;gap:0;background:#e5e7eb;border:1px solid #d1d5db;border-top:none;border-radius:0 0 10px 10px;margin-bottom:6px}
@media(max-width:860px){.ek-gwrap{grid-template-columns:1fr}}
.ek-gpaper{padding:22px 16px;overflow:auto}
.ek-paper{background:#fff;min-height:300px;padding:30px 34px;border-radius:4px;box-shadow:0 2px 10px rgba(0,0,0,.15);font-family:Georgia,'Times New Roman',serif;font-size:17px;line-height:2;color:#111827;outline:none;white-space:normal;word-break:break-word}
.ek-paper-ro{min-height:120px}
.ek-hl{border-radius:3px;padding:1px 0}
.ek-gside{background:#fff;padding:16px;border-inline-start:1px solid #d1d5db;display:flex;flex-direction:column;gap:8px}
.ek-gside h4{margin:0;color:var(--primary-blue);font-size:14px}
.ek-gside label{font-size:13px;font-weight:600;color:var(--text-gray)}
.ek-gside textarea,.ek-gside input{width:100%;box-sizing:border-box;padding:9px 12px;border:1px solid #cbd5e1;border-radius:10px;font:inherit;font-size:14px}
.ek-gside .ek-create{margin-top:6px;width:100%}
/* الطالب */
.ek-wbar{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;padding:10px 14px;margin:10px 0;font-size:14px}
.ek-wbar b{color:var(--primary-blue);font-size:18px}
.ek-wwarn{color:#b45309;font-size:13px;font-weight:600;transition:.2s}
.ek-wwarn.hit{background:#fee2e2;color:#b91c1c;padding:3px 10px;border-radius:8px}
.ek-paper-edit{width:100%;box-sizing:border-box;resize:vertical;border:1px solid #d1d5db}
.ek-paper-edit:focus{border-color:var(--accent-gold);box-shadow:0 0 0 3px rgba(212,175,55,.25)}
.ek-wact{display:flex;justify-content:flex-end;align-items:center;gap:10px;flex-wrap:wrap;margin-top:12px}
.ek-result{display:flex;align-items:center;gap:20px;flex-wrap:wrap;background:#f0fdf4;border:1px solid #86efac;border-radius:14px;padding:14px 20px;margin-bottom:10px}
.ek-scorebig{font-size:20px;color:var(--text-gray)}.ek-scorebig b{font-size:42px;color:var(--primary-blue)}

/* امتحانات القراءة */
.ek-passbar{background:#fffbeb;border:1px dashed var(--accent-gold);border-radius:12px;padding:10px 14px;margin-bottom:16px;font-size:13px;color:var(--text-dark)}
.ek-passbar input{width:70px;padding:5px 8px;border:1px solid #cbd5e1;border-radius:8px;font:inherit;text-align:center;margin:0 4px}
.ek-check{display:flex;align-items:center;gap:8px;font-size:14px;cursor:pointer;margin:6px 0}
.ek-dim{color:var(--text-gray);font-size:13px}
.ek-promo{background:#ecfdf5;border:1px solid #86efac;color:#15803d;border-radius:10px;padding:8px 12px;font-weight:700;font-size:14px}
.ek-qadd{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:10px 0 14px}
.ek-qcard{background:#fff;border:1px solid #e2e8f0;border-right:5px solid var(--primary-blue);border-radius:14px;padding:14px;margin-bottom:12px}
.ek-qhead{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:10px}
.ek-qtools{margin-inline-start:auto;display:flex;align-items:center;gap:6px}
.ek-qopts{display:flex;flex-direction:column;gap:8px;margin-top:6px}
.ek-qopt{display:flex;align-items:center;gap:8px}.ek-qopt .ek-sel{flex:1;max-width:none}
.ek-qcard textarea{width:100%;box-sizing:border-box;padding:10px 12px;border:1px solid #cbd5e1;border-radius:10px;font:inherit;font-size:14px}
.ek-rdwrap{display:grid;grid-template-columns:1fr 1.1fr;gap:16px;margin-top:10px}
@media(max-width:900px){.ek-rdwrap{grid-template-columns:1fr}}
.ek-passbox{background:#fffef7;border:1px solid #e7dcae;border-radius:14px;padding:14px 18px;position:sticky;top:8px;align-self:start;max-height:78vh;overflow:auto}
.ek-passbox h4{margin:0 0 8px;color:var(--primary-blue)}
.ek-passage{font-family:Georgia,'Times New Roman',serif;font-size:16.5px;line-height:2;color:#1f2937}
.ek-qbox{display:flex;flex-direction:column;gap:12px}
.ek-sq{background:#f8fafc;border:1px solid #e2e8f0;border-radius:14px;padding:14px}
.ek-sqh{font-size:15px;margin-bottom:8px;color:var(--text-dark)}
.ek-sqb{display:flex;flex-direction:column;gap:6px}
.ek-fillline{line-height:2.4;font-size:15px}
.ek-blank{width:130px;border:none;border-bottom:2px solid var(--accent-gold);background:#fffdf0;padding:2px 8px;margin:0 4px;font:inherit;text-align:center;outline:none}
.ek-blank:focus{background:#fff7d6}
.ek-shortin{width:100%;box-sizing:border-box;padding:10px 12px;border:1px solid #cbd5e1;border-radius:10px;font:inherit}
.ek-matchrow{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;background:#fff;border:1px solid #e2e8f0;border-radius:10px;padding:8px 12px}
.ek-matchrow .ek-sel{max-width:260px}
.ek-timer{font-weight:800;color:var(--primary-blue);background:#fff;border:1px solid #cbd5e1;border-radius:20px;padding:3px 14px;font-variant-numeric:tabular-nums}
.ek-timer.low{color:#b91c1c;border-color:#fca5a5;background:#fef2f2}
.ek-rvlist{display:flex;flex-direction:column;gap:10px;margin:12px 0}
.ek-rvrow{border:1px solid #e2e8f0;border-right:5px solid #94a3b8;border-radius:12px;padding:12px 14px;background:#fff}
.ek-rvrow.okrow{border-right-color:#22c55e;background:#f0fdf4}.ek-rvrow.badrow{border-right-color:#ef4444;background:#fef2f2}.ek-rvrow.midrow{border-right-color:#f59e0b;background:#fffbeb}
.ek-rvans{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:8px 0;font-size:14px}
@media(max-width:700px){.ek-rvans{grid-template-columns:1fr}}
.ek-rvans small{color:var(--text-gray)}
.ek-rvpts{display:flex;align-items:center;gap:8px;flex-wrap:wrap}

.ek-collapsed .ek-exform,.ek-collapsed .ek-create,.ek-collapsed .ek-note{display:none}
.ek-qimg{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:6px 0}
.ek-thumb{max-height:90px;margin:0}.ek-opthumb{max-height:56px;max-width:90px;margin:0 6px;border-radius:8px}
.ek-up{cursor:pointer;display:inline-block}.ek-qadd-btns{display:flex;gap:6px;flex-wrap:wrap;margin:8px 0}

.ek-ab{border:2px solid transparent;border-radius:8px;width:34px;height:30px;cursor:pointer;font-weight:800;opacity:.4;background:#fff;font-family:inherit}
.ek-ab.p{color:#16a34a;border-color:#16a34a}.ek-ab.l{color:#a16207;border-color:#eab308}.ek-ab.a{color:#dc2626;border-color:#dc2626}
.ek-ab.on{opacity:1;color:#fff}.ek-ab.p.on{background:#16a34a}.ek-ab.l.on{background:#eab308;color:#422006}.ek-ab.a.on{background:#dc2626}
.ek-ap{display:inline-block;padding:4px 10px;border-radius:999px;font-size:13px;font-weight:700;margin:2px;color:#fff}
.ek-ap.p{background:#16a34a}.ek-ap.l{background:#eab308;color:#422006}.ek-ap.a{background:#dc2626}.ek-ap.n{background:#cbd5e1;color:#475569}
.ek-grp{display:flex;gap:4px;justify-content:center;align-items:center;flex-wrap:wrap}
.ek-gbar{height:12px;background:#e2e8f0;border-radius:999px;overflow:hidden;margin:8px 0}
.ek-gbar>i{display:block;height:100%;background:linear-gradient(90deg,#d4af37,#16a34a)}
.ek-gtotal{font-size:42px;font-weight:900;color:var(--primary-blue,#1e3a8a)}
.ek-grow{display:flex;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid #e2e8f0;flex-wrap:wrap}
.ek-gscore{margin-inline-start:auto;font-weight:800}.ek-low{color:#dc2626;font-weight:800}
.ek-bad{background:#fee2e2;color:#991b1b}

.ek-datebar{display:flex;gap:10px;align-items:center;justify-content:center;flex-wrap:wrap;margin:10px 0}
.ek-dbmid{display:flex;flex-direction:column;align-items:center;min-width:130px;font-size:18px}.ek-dbmid span{font-size:13px;color:#64748b}
.ek-legend{display:flex;gap:6px;flex-wrap:wrap;justify-content:center;margin:8px 0}
.ek-cy{width:56px;height:46px;border-radius:12px;border:2px solid #cbd5e1;background:#f1f5f9;color:#64748b;font-size:20px;font-weight:900;cursor:pointer;font-family:inherit}
.ek-cy.p{background:#16a34a;border-color:#16a34a;color:#fff}.ek-cy.l{background:#eab308;border-color:#eab308;color:#422006}.ek-cy.a{background:#dc2626;border-color:#dc2626;color:#fff}
.ek-att td,.ek-att th{text-align:center}.ek-att td:first-child,.ek-att th:first-child{text-align:right}
.ek-set{margin-top:12px}.ek-set summary{cursor:pointer;font-weight:700}
.ek-cal{min-width:860px}.ek-week{display:grid;grid-template-columns:repeat(5,1fr) .55fr .55fr;gap:8px;margin-bottom:8px}
.ek-wkhd div{background:linear-gradient(135deg,#0f172a,#1e3a8a);color:#fff;border-radius:10px;padding:8px;text-align:center;font-weight:800;font-size:13px}
.ek-day{border-radius:14px;padding:10px;min-height:112px;background:#fff;border:1px solid #e2e8f0;box-shadow:0 4px 12px rgba(15,23,42,.05);cursor:pointer;display:flex;flex-direction:column;gap:5px;transition:transform .12s}
.ek-day:hover{transform:translateY(-2px)}.ek-day.wknd{background:repeating-linear-gradient(45deg,#f1f5f9,#f1f5f9 8px,#e2e8f0 8px,#e2e8f0 16px);color:#64748b;align-items:center;justify-content:center;font-weight:800;cursor:default;box-shadow:none}
.ek-day.blank{background:transparent;border:2px dashed #e2e8f0;box-shadow:none;cursor:default}.ek-day.add{cursor:pointer;align-items:center;justify-content:center;color:#64748b;font-size:22px}.ek-day.add:hover{border-color:#d4af37;color:#d4af37}
.ek-day.exam{background:linear-gradient(160deg,#fffbeb,#fef3c7);border-color:#d4af37}.ek-day.today{outline:3px solid #2563eb;box-shadow:0 0 0 6px rgba(37,99,235,.15)}
.ek-day.past{opacity:.6}.ek-day.sel{outline:3px solid #d4af37}
.ek-dayhd{display:flex;justify-content:space-between;align-items:center}.ek-dayhd b{color:#1e3a8a}.ek-dayhd small{color:#64748b}
.ek-daytp{font-weight:700;font-size:13px}.ek-daynt{font-size:13px;color:#64748b}
.ek-exchip{display:inline-block;background:#d4af37;color:#422006;border-radius:999px;padding:2px 8px;font-size:13px;font-weight:800;margin:1px}
.ek-zoomsm{display:inline-block;background:#2563eb;color:#fff!important;border-radius:999px;padding:3px 10px;font-size:13px;font-weight:700;text-decoration:none}
.ek-zoombig{display:block;text-align:center;background:linear-gradient(135deg,#2563eb,#1e3a8a);color:#fff!important;border-radius:16px;padding:18px;font-size:20px;font-weight:900;text-decoration:none;margin:12px 0}
.ek-chip{border:2px solid #d4af37;background:#fff;border-radius:999px;padding:6px 14px;font-weight:700;cursor:pointer;font-family:inherit}.ek-chip.on{background:#d4af37;color:#422006}
.ek-dayed{margin-top:14px}
@media(max-width:700px){.ek-cy{width:48px}}

/* تذكر كلمة المرور / نسيت كلمة المرور */
.login-extras{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;margin:2px 0 14px;font-size:13px}
.login-extras label{display:flex;align-items:center;gap:6px;margin:0;cursor:pointer;font-weight:600;color:var(--text-gray)}
.login-extras input[type=checkbox]{width:auto;margin:0;accent-color:var(--primary-blue)}
.forgot-link{background:none;border:0;padding:0;font:inherit;font-weight:700;color:var(--primary-blue);text-decoration:underline;cursor:pointer}
.forgot-link:hover{color:var(--accent-gold)}

/* الواجبات */
.ek-hwc{background:#fff;border:1px solid #e2e8f0;border-inline-start:5px solid var(--accent-gold);border-radius:14px;padding:16px;margin:14px 0}
.ek-hwhead{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.ek-hwhead>div{flex:1;min-width:200px}
.ek-hwhead strong{display:block;color:var(--primary-blue);font-size:16px}
.ek-hwhead small{color:var(--text-gray)}
.ek-hwbtns{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
.ek-hwedit{background:#f8fafc;border:1px dashed #cbd5e1;border-radius:12px;padding:14px;margin-top:10px}
.ek-hwup{background:#f8fafc;border:1.5px dashed var(--accent-gold);border-radius:12px;padding:14px;margin-top:10px}
.ek-hwgrade{background:#ecfdf5;border:1px solid #a7f3d0;border-radius:12px;padding:10px 14px;margin-top:10px;line-height:1.9}

/* ملخص المعلم: تبويب الفترتين */
.ek-shifttabs{display:flex;gap:10px;margin:0 0 16px}
.ek-stab{flex:1;padding:11px 14px;border:1.5px solid #cbd5e1;border-radius:12px;background:#fff;font:inherit;font-weight:700;color:var(--text-gray);cursor:pointer}
.ek-stab.active{background:var(--primary-blue);border-color:var(--primary-blue);color:#fff}
/* شريط حفظ الامتحانات */
.ek-archbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;background:#fffbeb;border:1px solid #fde68a;border-radius:12px;padding:10px 14px;margin:0 0 14px;font-size:13px;color:#78350f}

/* ===== تحسين واجهة الامتحانات ===== */
.ek-hub{background:linear-gradient(135deg,#0f172a,#1e3a8a);color:#fff;border-radius:18px;padding:22px 24px;margin-bottom:20px;box-shadow:0 10px 28px rgba(15,23,42,.25)}
.ek-hubtop{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;flex-wrap:wrap;margin-bottom:16px}
.ek-hub h2{color:var(--accent-gold)!important;margin:0 0 4px!important;font-size:24px}
.ek-hub p{margin:0;opacity:.85;font-size:14px}
.ek-hubnext{background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.18);border-radius:12px;padding:8px 14px;font-size:13px;display:flex;flex-direction:column;gap:2px}
.ek-hubnext b{color:var(--accent-gold);font-size:14px}
.ek-hubstats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
.ek-hs{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.14);border-radius:14px;padding:14px 10px;text-align:center}
.ek-hs b{display:block;font-size:30px;line-height:1.1}
.ek-hs span{font-size:13px;opacity:.85}
.ek-hs.go b{color:#4ade80}.ek-hs.wait b{color:#fbbf24}.ek-hs.ok b{color:#93c5fd}.ek-hs.lock b{color:#cbd5e1}
@media(max-width:640px){.ek-hubstats{grid-template-columns:repeat(2,1fr)}}

.ek-exgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(300px,100%),1fr));gap:16px;margin-bottom:8px}
.ek-excard{position:relative;display:flex;align-items:center;gap:14px;flex-wrap:wrap;background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:16px 16px 16px 18px;overflow:hidden;transition:transform .15s,box-shadow .15s}
.ek-excard::before{content:"";position:absolute;inset-block:0;inset-inline-start:0;width:6px;background:#cbd5e1}
.ek-excard:hover{transform:translateY(-2px);box-shadow:0 10px 24px rgba(15,23,42,.12)}
.ek-excard.st-go::before{background:#22c55e}.ek-excard.st-wait::before{background:#f59e0b}.ek-excard.st-ok::before{background:#3b82f6}.ek-excard.st-lock::before{background:#94a3b8}
.ek-excard.st-lock{background:#f8fafc}
.ek-exic{width:52px;height:52px;border-radius:14px;background:#fef9c3;display:flex;align-items:center;justify-content:center;font-size:26px;flex:none}
.ek-exmain{flex:1;min-width:150px}
.ek-exmain strong{display:block;color:var(--primary-blue);font-size:16px;margin-bottom:6px}
.ek-exmeta{display:flex;flex-wrap:wrap;gap:6px 12px;font-size:13px;color:var(--text-gray);margin-bottom:8px}
.ek-exgo{background:linear-gradient(135deg,#d4af37,#b8860b);color:var(--primary-blue);border:none;border-radius:12px;padding:11px 18px;font:inherit;font-weight:800;font-size:14px;cursor:pointer;box-shadow:0 6px 14px rgba(212,175,55,.3)}
.ek-exgo:hover{filter:brightness(1.07)}

/* تبويبات أنواع الامتحانات (المعلم/الإدارة) */
.ek-subtabs{display:flex;gap:10px;margin-bottom:18px;overflow-x:auto;padding-bottom:6px;scrollbar-width:thin}
.ek-subtabs button{flex:0 0 auto;border:1.5px solid #e2e8f0;background:#fff;border-radius:14px;padding:12px 18px;box-shadow:0 2px 6px rgba(15,23,42,.05);transition:.15s;white-space:nowrap}
.ek-subtabs button:hover{border-color:var(--accent-gold);transform:translateY(-1px)}
.ek-subtabs button.active{background:linear-gradient(135deg,#0f172a,#1e3a8a);color:var(--accent-gold);border-color:#0f172a;box-shadow:0 8px 18px rgba(15,23,42,.25)}
.ek-wrcard{border:1px solid #e2e8f0!important;border-radius:16px!important;box-shadow:0 4px 14px rgba(15,23,42,.06)!important}
.ek-wrhead{padding-bottom:12px;border-bottom:1px dashed #e2e8f0}
.ek-wrstats{background:#f8fafc;border-radius:10px;padding:8px 12px;font-size:13px;margin-top:10px}
.ek-exact .btn-action,.ek-exact .btn-danger{padding:8px 14px;font-size:13px}
.ek-exform{background:#f8fafc;border:1px solid #e2e8f0;border-radius:16px;padding:18px}

/* أسئلة القراءة والاختيارات */
.ek-sq{background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:18px;box-shadow:0 2px 8px rgba(15,23,42,.04)}
.ek-sqh{font-size:16px;font-weight:700}
.ek-sq .ek-check{display:flex;align-items:center;gap:10px;padding:10px 14px;border:1.5px solid #e2e8f0;border-radius:12px;background:#f8fafc;cursor:pointer;transition:.12s}
.ek-sq .ek-check:hover{border-color:var(--accent-gold);background:#fffbeb}
.ek-sq .ek-check:has(input:checked){border-color:#d4af37;background:#fef9c3;font-weight:700}
.ek-passage{background:#fffdf5;border:1px solid #f1e6b8;border-radius:14px;padding:18px 22px;line-height:2;font-size:16px}

/* محرر الكتابة (Writing) */
.ek-wbar{position:sticky;top:0;z-index:5;background:#fff;border:1px solid #e2e8f0;border-radius:12px;box-shadow:0 4px 12px rgba(15,23,42,.08)}
.ek-wtool{display:flex;flex-wrap:wrap;align-items:center;gap:4px;background:#f1f5f9;border:1px solid #d1d5db;border-bottom:none;border-radius:12px 12px 0 0;padding:8px 10px;position:sticky;top:58px;z-index:4}
.ek-wtool button{min-width:34px;height:34px;padding:0 8px;border:1px solid transparent;border-radius:8px;background:transparent;color:#1f2937;font:inherit;font-size:14px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center}
.ek-wtool button:hover{background:#e2e8f0}
.ek-wtool button.on{background:#dbeafe;border-color:#93c5fd;color:#1d4ed8}
.ek-wtool .ek-ttitle{font-family:Georgia,serif;font-weight:700;letter-spacing:.3px}
.ek-tsep{width:1px;height:22px;background:#cbd5e1;margin:0 4px}
.ek-tsize{min-width:30px;text-align:center;font-weight:700;font-size:13px;color:#374151}
.ek-paper-edit{border-radius:0 0 12px 12px!important;min-height:420px;border:1px solid #d1d5db;cursor:text}
.ek-paper-edit:empty::before{content:attr(data-ph);color:#9ca3af;pointer-events:none}
.ek-paper ul,.ek-paper ol{margin:6px 0;padding-inline-start:30px}
.ek-paper div{min-height:1em}

/* ===== ضغط وتنسيق واجهة الامتحانات (أصغر وأكثر عملية) ===== */
#tab-exams .dash-card{padding:16px 18px;margin-bottom:14px;border-radius:16px}
#tab-exams .ek-exhead{margin-bottom:10px}
#tab-exams .ek-exhead h2{font-size:19px!important}
#tab-exams .ek-excount{font-size:13px}
.ek-exform{padding:12px 14px;gap:8px 12px;margin-bottom:12px;border-radius:14px}
.ek-field label{font-size:13px;margin-bottom:3px}
.ek-field input,.ek-field select,.ek-field textarea{padding:7px 10px;font-size:13px;border-radius:9px}
.ek-field textarea{min-height:56px}
.ek-create{padding:9px 20px;font-size:14px;border-radius:10px}
.ek-passbar{padding:7px 12px;margin-bottom:10px;font-size:13px}
.ek-wrcard{padding:12px 14px!important;margin-bottom:10px!important}
.ek-wrcard h3{font-size:15px}
.ek-wrhead{padding-bottom:8px;margin-bottom:8px}
.ek-exact .btn-action,.ek-exact .btn-danger{padding:6px 11px;font-size:13px}
.ek-hub{padding:14px 18px;border-radius:16px;margin-bottom:12px}
.ek-hubtop{margin-bottom:0;align-items:center}
.ek-hub h2{font-size:19px;margin:0 0 2px!important}
.ek-hub p{font-size:13px}
.ek-hubstats{display:flex;gap:8px;margin-bottom:0}
.ek-hs{padding:7px 14px;min-width:84px;border-radius:12px}
.ek-hs b{font-size:20px}.ek-hs span{font-size:13px}
.ek-hubnext{display:block;background:none;border:0;padding:8px 0 0;font-size:13px;opacity:.9}
.ek-hubnext b{display:inline;font-size:13px}
.ek-subtabs{gap:6px;margin-bottom:12px}
.ek-subtabs button{padding:8px 14px;font-size:13px;border-radius:11px;position:relative}
.ek-dot2{font-style:normal;background:#22c55e;color:#fff;border-radius:10px;font-size:13px;padding:1px 6px;margin-inline-start:6px}
.ek-exgrid{grid-template-columns:repeat(auto-fill,minmax(min(250px,100%),1fr));gap:10px}
.ek-excard{padding:11px 12px 11px 14px;gap:10px;border-radius:13px}
.ek-exic{width:40px;height:40px;font-size:20px;border-radius:11px}
.ek-exmain strong{font-size:14px;margin-bottom:3px}
.ek-exmeta{font-size:13px;margin-bottom:5px;gap:3px 10px}
.ek-exgo{padding:8px 14px;font-size:13px;border-radius:10px}
.ek-sq{padding:11px 14px;border-radius:13px}
.ek-sqh{font-size:14px;margin-bottom:6px}
.ek-sq .ek-check{padding:6px 11px;border-radius:10px;font-size:13px}
.ek-passage{max-height:34vh;overflow:auto;padding:12px 16px;font-size:15px;line-height:1.9}
.ek-wrq{max-height:18vh;overflow:auto}

/* ===== وضع الصفحة الكاملة أثناء الامتحان ===== */
body.ek-focus{overflow:hidden}
body.ek-focus .whatsapp-float{display:none!important}
.ek-focusbox{position:fixed;inset:0;z-index:1200;background:#e9eef5;overflow:auto;padding:14px 16px;box-sizing:border-box}
.ek-focusbox>.dash-card{max-width:1180px;margin:0 auto!important}
.ek-wfull.ek-wedit{display:flex;flex-direction:column;height:calc(100vh - 28px);padding:12px 16px!important;overflow:hidden}
.ek-wfull.ek-wedit .ek-exhead{flex:none;margin-bottom:8px}
.ek-wfull.ek-wedit .ek-wrq{flex:none;max-height:16vh;margin-bottom:6px}
.ek-wfull.ek-wedit .ek-wbar{flex:none;position:static;margin:4px 0 8px;padding:7px 12px;box-shadow:none;font-size:13px}
.ek-wfull.ek-wedit .ek-wtool{flex:none;position:static}
.ek-wfull.ek-wedit .ek-paper-edit{flex:1 1 auto;min-height:0!important;overflow:auto;padding:22px 30px;font-size:18px;line-height:1.9}
.ek-wfull.ek-wedit .ek-wact{flex:none;margin-top:8px}
.ek-wfull.ek-wview{max-width:1000px!important}
.ek-wbar{position:static}
.ek-wtool{position:static}

/* ===== الشهادات ===== */
.ek-journey{margin-bottom:14px}
.ek-jbar{height:9px;background:rgba(255,255,255,.18);border-radius:8px;overflow:hidden;margin-top:12px}
.ek-jbar i{display:block;height:100%;background:linear-gradient(90deg,#fbbf24,#22c55e);border-radius:8px}
.ek-jtxt{font-size:13px;opacity:.85;margin-top:6px}
.ek-certlist{display:grid;gap:10px}
.ek-certrow{display:flex;align-items:center;gap:12px;flex-wrap:wrap;background:#fff;border:1px solid #e2e8f0;border-inline-start:5px solid #d4af37;border-radius:14px;padding:11px 14px}
.ek-certrow.grad{background:linear-gradient(135deg,#fffbeb,#fef3c7);border-color:#f59e0b}
.ek-certseal{width:44px;height:44px;border-radius:50%;background:#fef9c3;display:flex;align-items:center;justify-content:center;font-size:22px;flex:none}
.ek-certbtns{display:flex;gap:8px;flex-wrap:wrap}
.ek-certnow{display:flex;align-items:center;gap:12px;margin-top:12px;background:#eff6ff;border:1px dashed #93c5fd;border-radius:14px;padding:11px 14px;font-size:13px}
.ek-certnow span{font-size:24px}.ek-certnow b{display:block;color:var(--primary-blue)}.ek-certnow small{color:var(--text-gray)}
.ek-certmodal{position:fixed;inset:0;z-index:2000;background:rgba(15,23,42,.72);display:flex;align-items:center;justify-content:center;padding:16px}
.ek-certbox{background:#fff;border-radius:16px;padding:14px;width:min(980px,100%);max-height:96vh;overflow:auto}
.ek-certbar{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:10px}
.ek-cert{container-type:inline-size;aspect-ratio:1.414/1;background:#fffdf6;border:1.6cqw solid #b8860b;border-radius:4px;position:relative;box-sizing:border-box;color:#0f172a;font-family:Tahoma,Arial,sans-serif}
.ek-cert::after{content:"";position:absolute;inset:1.2cqw;border:.3cqw solid #d4af37;pointer-events:none}
.ek-cert-in{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:space-between;padding:3.2cqw 4cqw 2.6cqw;text-align:center;box-sizing:border-box}
.ek-c-brand{font:800 3.2cqw Georgia,serif;letter-spacing:.3cqw}.ek-c-sub{font-size:1.5cqw;color:#64748b;font-weight:600}
.ek-c-title{font-size:5cqw;font-weight:800;color:#b8860b;line-height:1.1}.ek-c-en{font:italic 2.2cqw Georgia,serif}
.ek-c-line{font-size:1.9cqw;color:#475569;font-weight:600}.ek-c-name{font-size:5.2cqw;font-weight:800;border-bottom:.2cqw solid #d4af37;padding:0 4cqw .4cqw}
.ek-c-level{font:800 3.8cqw Georgia,serif;color:#1e3a8a}.ek-c-score b{color:#15803d;font-size:2.3cqw}
.ek-c-foot{width:100%;display:flex;justify-content:space-between;align-items:flex-end}
.ek-c-foot div{display:flex;flex-direction:column;font-size:1.5cqw}.ek-c-foot span{color:#64748b}.ek-c-foot b{font-size:1.8cqw}
.ek-c-seal{width:7cqw;height:7cqw;border-radius:50%;background:#d4af37;border:.4cqw solid #b8860b;color:#fffdf6;display:flex!important;align-items:center;justify-content:center;font-size:3.6cqw!important}
.ek-c-sign{width:100%;display:flex;justify-content:space-around}.ek-c-sign div{display:flex;flex-direction:column;align-items:center;font-size:1.5cqw;color:#64748b;width:22cqw}.ek-c-sign i{display:block;width:100%;border-top:.15cqw solid #94a3b8;margin-bottom:.5cqw}
#ekCertPrint{display:none}
@media print{
  @page{size:A4 landscape;margin:0}
  body.ek-printing>*:not(#ekCertPrint){display:none!important}
  body.ek-printing #ekCertPrint{display:block!important;position:fixed;inset:0;background:#fff}
  body.ek-printing #ekCertPrint .ek-cert{width:297mm;height:210mm;aspect-ratio:auto;-webkit-print-color-adjust:exact;print-color-adjust:exact}
}

.ek-paper-edit{resize:none!important}

/* أستاذ الطالب وفترته في ملخص الطالب */
.ek-selfinfo{display:flex;flex-wrap:wrap;gap:8px;margin:2px 0 12px}
.ek-chip{display:inline-flex;align-items:center;gap:6px;background:#f1f5f9;border:1px solid #e2e8f0;border-radius:20px;padding:6px 14px;font-size:13px;color:var(--text-gray)}
.ek-chip b{color:var(--primary-blue)}
.ek-chip.mor{background:#fffbeb;border-color:#fde68a;color:#92400e}.ek-chip.eve{background:#eef2ff;border-color:#c7d2fe;color:#3730a3}

#ekToasts{position:fixed;bottom:84px;left:50%;transform:translateX(-50%);z-index:100000;display:flex;flex-direction:column;gap:8px;align-items:center;width:min(92vw,440px);pointer-events:none}
.ek-toast{pointer-events:auto;cursor:pointer;background:#0f172a;color:#fff;padding:12px 18px;border-radius:14px;box-shadow:0 10px 30px rgba(0,0,0,.3);font-size:14px;line-height:1.6;border-inline-start:5px solid #3b82f6;width:100%;animation:ekIn .25s ease}
.ek-toast.ok{border-color:#16a34a}.ek-toast.err{border-color:#dc2626;background:#450a0a}.ek-toast.out{opacity:0;transform:translateY(8px);transition:.25s}
@keyframes ekIn{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
.ek-dlg-ov{position:fixed;inset:0;background:rgba(15,23,42,.55);z-index:100001;display:flex;align-items:center;justify-content:center;padding:16px}
.ek-dlg{background:#fff;color:#0f172a;border-radius:18px;padding:24px;max-width:440px;width:100%;box-shadow:0 20px 60px rgba(0,0,0,.35)}
.ek-dlg p{margin:0 0 18px;font-size:16px;line-height:1.7;font-weight:600}.ek-dlg-btns{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.ek-dlg-btn{border:0;border-radius:12px;padding:10px 18px;font-weight:800;cursor:pointer;font-family:inherit;background:#e2e8f0;color:#0f172a}
.ek-dlg-btn.danger{background:#dc2626;color:#fff}.ek-dlg-btn.ok{background:#16a34a;color:#fff}

/* ===== توحيد الشكل: بطاقة واحدة لكل الصفحات، أيقونات SVG، وألوان أوضح ===== */
:root{--card-radius:16px;--card-border:#e2e8f0;--card-shadow:0 4px 14px rgba(15,23,42,.06)}
button,input,select,textarea{font-family:inherit}
small,.ek-dim,.ek-note{font-size:13px}
.dash-card,.ek-wrcard,.ek-book,.hw-card,.ek-hwc{background:#fff;border:1px solid var(--card-border)!important;border-radius:var(--card-radius)!important;box-shadow:var(--card-shadow)!important}
.ek-book{padding:14px 16px;transition:transform .12s,box-shadow .12s}.ek-book:hover{transform:translateY(-2px);box-shadow:0 8px 22px rgba(15,23,42,.1)!important}
.ek-bkicon{width:48px;height:48px;border-radius:14px;background:#eff6ff;color:#1e3a8a;display:grid;place-items:center;font-size:22px;flex:none}
.ek-bkinfo small{color:var(--text-gray)}.ek-books{gap:14px}
.ek-badge,.hw-badge{font-size:13px;padding:4px 12px}
.ek-ic{display:inline-block;width:1.15em;height:1.15em;vertical-align:-.2em;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}
.ek-dot{display:inline-block;width:.75em;height:.75em;border-radius:50%;vertical-align:-.02em}
.ek-dot.g{background:#16a34a}.ek-dot.y{background:#eab308}.ek-dot.r{background:#dc2626}.ek-dot.o{background:#ea580c}.ek-dot.p{background:#7c3aed}
.dash-nav-btn .ek-ic{width:1.25em;height:1.25em;margin-inline-end:6px}
.dash-card h2 .ek-ic,.ek-exhead h2 .ek-ic{width:1.1em;height:1.1em;color:var(--accent-gold)}
@media(max-width:700px){body{font-size:16px}.ek-badge,.hw-badge,small,.ek-dim,.ek-note{font-size:14px}}
.ek-dot.b{background:#2563eb}.ek-dot.c{background:#38bdf8}.ek-dot.k{background:#0f172a}.ek-dot.w{background:#fff;border:2px solid #94a3b8;width:.7em;height:.7em}
/* خط عربي احتياطي يعمل بدون إنترنت: ضع ملف Cairo داخل مجلد fonts (انظر fonts/README.txt) */
@font-face{font-family:'CairoLocal';font-weight:200 900;font-display:swap;src:url('../fonts/Cairo.woff2') format('woff2'),url('../fonts/Cairo.ttf') format('truetype')}

/* معرض الصور في الرئيسية: ثلاث بطاقات تتداخل مع أسفل الواجهة العليا */
.home-gallery{position:relative;margin-top:-60px;padding:0 6% 70px}
.hg-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;max-width:1200px;margin:0 auto}
.hg-card{position:relative;margin:0;border-radius:20px;overflow:hidden;background:#0f172a;box-shadow:0 18px 40px rgba(2,6,23,.28);aspect-ratio:1.18/1}
.hg-card img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .5s}
.hg-card:hover img{transform:scale(1.04)}
.hg-card figcaption{position:absolute;inset:auto 0 0 0;padding:64px 16px 18px;text-align:center;color:#fff;font-size:24px;font-weight:800;background:linear-gradient(to top,rgba(10,16,38,.96) 0%,rgba(10,16,38,.7) 45%,rgba(10,16,38,0) 100%)}
@media(max-width:860px){.hg-grid{grid-template-columns:1fr;gap:18px}.home-gallery{margin-top:-40px}.hg-card figcaption{font-size:21px}}

/* أدوات المعلم + سجل الأخطاء */
.ek-rub{background:#f8fafc;border:1px solid var(--card-border,#e2e8f0);border-radius:14px;padding:12px;margin:8px 0}.ek-rub h4{margin:0 0 8px}
.ek-rubcell{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:6px 0;font-size:14px}.ek-rubcell input{width:90px}
.ek-rubsum{margin-top:8px;font-weight:800}.ek-rubview{width:100%;border-collapse:collapse;margin:8px 0}.ek-rubview caption{text-align:start;font-weight:800;padding:4px 0}.ek-rubview td{padding:6px 8px;border-bottom:1px solid #e2e8f0}
.ek-rubrow2 td{background:#f8fafc}.ek-rubedit{display:flex;gap:8px;align-items:center;margin:6px 0}.ek-rubedit .ek-sel{flex:1}.ek-rubedit .ek-score{width:80px}
.ek-cmts{display:flex;gap:6px;flex-wrap:wrap;margin:6px 0}.ek-cmtchip{border:1px solid #d4af37;background:#fff;color:#422006;border-radius:999px;padding:4px 12px;font-size:13px;cursor:pointer;font-family:inherit}.ek-cmtchip:hover{background:#fef3c7}.ek-cmtchip.add{border-style:dashed;color:#1e3a8a;border-color:#94a3b8}
.ek-cmtrow{display:flex;gap:10px;align-items:center;justify-content:space-between;padding:8px 0;border-bottom:1px solid #e2e8f0}
.ek-qbpick{border:2px dashed #d4af37;border-radius:14px;padding:12px;margin:10px 0;background:#fffdf5}.ek-qbitem{display:flex;gap:10px;align-items:flex-start;padding:8px 0;border-bottom:1px solid #f1f5f9;cursor:pointer}.ek-qbitem input{margin-top:6px}
.ek-pre{white-space:pre-wrap;direction:ltr;text-align:left;font-size:12px;background:#0f172a;color:#e2e8f0;border-radius:10px;padding:10px;max-height:220px;overflow:auto}
.ek-timer.low{color:#dc2626}

/* غياب بعذر + بطاقات التواصل */
.ek-ap.e{background:#2563eb;color:#fff}.ek-cy.e{background:#2563eb;border-color:#2563eb;color:#fff}
.contact-info{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:22px}
.contact-card{display:flex;align-items:center;gap:12px;background:#fff;border:1px solid var(--card-border,#e2e8f0);border-radius:var(--card-radius,16px);box-shadow:var(--card-shadow,0 4px 14px rgba(15,23,42,.06));padding:14px 16px;text-decoration:none;color:inherit;transition:transform .12s}
.contact-card:hover{transform:translateY(-2px)}.contact-card .cc-ic{width:44px;height:44px;border-radius:12px;background:#eff6ff;color:#1e3a8a;display:grid;place-items:center;font-size:22px;flex:none}
.contact-card b{display:block}.contact-card small{color:var(--text-gray,#475569);font-size:13px}
@media(max-width:700px){.contact-info{grid-template-columns:1fr}}

/* وضع الحسابات الحقيقية (Supabase) */
.cloud-only{display:none}html.ek-cloud .cloud-only{display:flex}
html.ek-cloud [onclick*="sendVerificationCode"],html.ek-cloud #codeVerificationGroup,html.ek-cloud .role-switchers,html.ek-cloud #fpStep2{display:none!important}

/* ===== صفحة تواصل معنا (تصميم محسّن) ===== */
.contact-lead{text-align:center;color:var(--text-gray,#475569);max-width:560px;margin:0 auto 28px;line-height:1.9}
.contact-layout{max-width:980px;margin:0 auto;display:grid;grid-template-columns:1fr 1.25fr;gap:24px;align-items:start}
.contact-layout .contact-info{grid-template-columns:1fr;margin:0;gap:14px}
.contact-layout .contact-card{padding:18px 20px;border-radius:18px;position:relative;overflow:hidden;transition:transform .2s,box-shadow .2s}
.contact-layout .contact-card::before{content:'';position:absolute;inset-inline-start:0;top:0;bottom:0;width:4px;background:var(--accent-gold,#d4af37)}
.contact-layout .contact-card:hover{transform:translateY(-3px);box-shadow:0 12px 28px rgba(15,23,42,.12)}
.contact-layout .contact-card .cc-ic{width:52px;height:52px;border-radius:50%;background:linear-gradient(135deg,#fff7d6,#f3d77a);color:#7a5b00;font-size:24px}
.contact-form{background:#fff;border:1px solid var(--card-border,#e2e8f0);border-radius:22px;padding:30px;box-shadow:0 14px 40px rgba(15,23,42,.08)}
.contact-form h3{margin:0 0 18px;font-size:20px;color:var(--text-dark,#1e293b)}
.contact-form .form-group{margin-bottom:16px}
.contact-form label{display:block;margin-bottom:6px;font-weight:600;font-size:14px}
.contact-form input,.contact-form textarea{width:100%;padding:13px 15px;border:1.5px solid #e2e8f0;border-radius:12px;background:var(--bg-light,#f8fafc);font-family:inherit;font-size:15px;transition:border-color .2s,box-shadow .2s,background .2s}
.contact-form input:focus,.contact-form textarea:focus{outline:none;border-color:var(--accent-gold,#d4af37);background:#fff;box-shadow:0 0 0 4px rgba(212,175,55,.18)}
.contact-form textarea{min-height:130px;resize:vertical}
.contact-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:6px}
.contact-actions button{flex:1 1 180px;padding:14px 18px;border:0;border-radius:12px;font-weight:700;font-family:inherit;font-size:15px;cursor:pointer;transition:transform .15s,box-shadow .15s}
.contact-actions .contact-wa{background:#25d366;color:#fff}
.contact-actions .contact-mail{background:#0f172a;color:#fff}
.contact-actions button:hover{transform:translateY(-2px);box-shadow:0 10px 22px rgba(15,23,42,.18)}
.contact-note{margin:14px 0 0;font-size:13px;color:var(--text-gray,#64748b);text-align:center}
@media (max-width:820px){.contact-layout{grid-template-columns:1fr}.contact-form{padding:22px}}

/* ===== توافق الهاتف والتابلت ===== */
html,body{max-width:100%}
body{overflow-x:hidden}
img,video,canvas{max-width:100%}
.ek-res{overflow-x:auto}
.portal-card{max-width:100%}
.lang-select{max-width:160px}
.dash-topbar,.dash-backdrop{display:none}

/* تابلت أفقي ولابتوب صغير */
@media (max-width:1100px){
  .dash-sidebar{width:230px;padding:20px 14px}
  .dash-content{padding:22px}
  .ek-savebar{margin:20px -22px -22px;padding:12px 22px}
}

/* تابلت عمودي وهاتف */
@media (max-width:860px){
  header{flex-wrap:wrap;padding:10px 4%;gap:8px}
  header .logo-container{margin:0 auto}
  header nav{flex:1 1 100%;flex-wrap:wrap;justify-content:center;gap:6px}
  header nav a{padding:6px 10px;font-size:13px}
  .btn-portal-header{padding:8px 14px;font-size:13px}
  .logo-text{font-size:19px}
  .logo-svg{width:32px;height:32px}
  .hero{padding:64px 16px 56px}
  .hero h1{font-size:32px;margin-bottom:14px}
  .hero p{font-size:16px}
  .section-padding{padding:40px 5%}

  /* لوحة التحكم: شريط علوي وقائمة جانبية منزلقة */
  .dash-topbar{display:flex;align-items:center;gap:12px;position:sticky;top:0;z-index:80;background:var(--primary-blue);color:#fff;padding:10px 14px;box-shadow:0 2px 10px rgba(0,0,0,.25)}
  .dash-menu-btn{background:rgba(255,255,255,.1);border:1px solid rgba(212,175,55,.55);color:#fff;border-radius:10px;font-size:20px;line-height:1;padding:8px 13px;cursor:pointer}
  .dash-top-title{font-weight:800;color:#fff;font-size:18px}
  .dash-top-title span{color:var(--accent-gold)}
  .dashboard-container{flex-direction:column;min-height:0}
  .dash-sidebar{position:fixed;top:0;bottom:0;inset-inline-start:0;width:min(84vw,300px);z-index:1001;overflow-y:auto;transition:transform .25s ease;box-shadow:0 0 40px rgba(0,0,0,.45)}
  [dir="rtl"] .dash-sidebar{transform:translateX(110%)}
  [dir="ltr"] .dash-sidebar{transform:translateX(-110%)}
  .dash-sidebar.open{transform:none!important}
  .dash-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.55);z-index:1000}
  .dash-backdrop.show{display:block}
  .dash-content{padding:14px;overflow-y:visible}
  .dash-card{padding:16px;overflow-x:auto}
  .dash-card h2{font-size:19px}
  .ek-savebar{margin:16px -14px -14px;padding:10px 14px;font-size:13px}
  .ek-savebar button{padding:8px 12px;font-size:13px}
  body:has(#dashboardView[style*="block"]) .whatsapp-float{display:none!important}
}

/* هاتف */
@media (max-width:640px){
  .hero h1{font-size:28px}
  .card-row{flex-wrap:wrap;gap:0}
  .card-row>*{flex:1 1 100%}
  .modal-overlay{padding:10px;align-items:flex-start}
  .modal-overlay>*{margin:auto}
  .whatsapp-float{bottom:12px;left:12px;padding:10px 14px;font-size:13px}
  .ek-dlg{padding:18px}
}
