
      @import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700&display=swap');
        * {
            box-sizing: border-box;
        }
         
      :root {
        --primary-color: #4a90e2;
        --secondary-color: #50b848;
        --error-color: #e53e3e;
        --success-color: #50b848;
        --text-color: #2d3748;
        --light-bg: #f5f7fa;
        --card-shadow: 0 4px 12px rgba(0,0,0,0.08);
        --transition: all 0.3s ease;
      }
        body {
            font-family: 'CoconNextArabic-Regular', sans-serif !important;
            background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ed 100%);
            color: #2d3748;
            margin: 0;
            padding: 0;
            overflow-x: hidden;
        }
        
        .horizontal-layout {
            display: flex;
            flex-direction: column;
            min-height: 100vh;
        }
  
        .main-header {
            background: #ffffff;
            box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
            position: fixed;
            width: 100%;
            z-index: 1000;
           
        }
        
        .header-content {
            display: flex;
            flex-direction: row-reverse;
            justify-content: space-between;
            align-items: center;
            padding: 5px 30px;
            max-width: 1400px;
            margin: 0 auto;
        }
        
        .logo-section {
            display: flex;
            align-items: center;
            gap: 12px;
        }
        
        .logo-section img {
            height: 40px;
            object-fit: contain;
        }
        
        
        .logo-text {
            font-weight: 700;
            font-size: 1rem;
            color: #090a09 ;
        }
        
        .auth-buttons {
            display: flex;
            gap: 12px;
        }
        
        .auth-btn {
            padding: 5px 20px;
            border-radius: 6px;
            font-weight: 600;
            transition: all 0.3s;
            text-decoration: none;
            
        }
        
        .login-btn {
            background: #ffffff;
            color: #4a90e2;
            border: 1px solid #4a90e2;
        }
        
        .register-btn {
            background: #4a90e2;
            color: white;
            border: 1px solid #4a90e2;
        }
        
        .auth-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        }
    .user-profile {
        display: flex;
        align-items: center;
        gap: 10px;
        cursor: pointer;
        position: relative;
      }
      
      .user-profile img {
         width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
        border: 2px solid var(--primary-color);
      }

.user-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  padding: 10px;
  width: 180px;
  z-index: 1000;
}

.user-dropdown.show {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

.user-dropdown a, 
.user-dropdown button {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  color: #2d3748;
  text-decoration: none;
  border-radius: 4px;
  gap: 8px;
  width: 100%;
  text-align: right;
  background: none;
  border: none;
  cursor: pointer;
}

.user-dropdown a:hover, 
.user-dropdown button:hover {
  background-color: #f0f7ff;
  color: #4a90e2;
}

.user-dropdown button {
  color: #e53e3e;
}

.user-dropdown button:hover {
  color: #c53030;
}
.education-filiers {
    background: #f8f9fa; /* أو يمكنك استخدام background: inherit; */
    padding: 8px 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 999;
}

.filiers-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

.filier-btn-container {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.filier-btn {
    
    border-radius: 8px;
    font-weight: 700;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    background-color: transparent; /* خلفية شفافة أو نفس لون البودي */
    min-width: 200px;
    text-align: center;
    position: relative;
     border: 2px solid currentColor; /* الإطار بلون النص */
}

/* ألوان النصوص المضيئة */
.primary-btn {
    color: #007bff; /* أزرق مضيء */
}

.middle-btn {
    color: #28a745; /* أخضر مضيء */
}

.secondary-btn {
    color: #ff9800; /* برتقالي مضيء */
}

/* التأثير عند التحويم */
.filier-btn:hover {
    transform: translateY(-2px);
    box-shadow: none; /* بدون ظل أو أضف واحدًا خفيفًا لو أردت */
    
}
/* السهم ▼ بجانب كل زر */
.filier-btn::after {
    content: " ▼";
    font-size: 18px;
    margin-right: 6px;
    pointer-events: none;
}
.filier-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    min-width: 250px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    padding: 0;
    z-index: 100;
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    text-align: right;
    font-size: 16px;
    font-weight: 700;
}


        .subject-item {
            position: relative;
            margin-bottom: 0;
            border: 1px solid #e2e8f0;
            border-radius: 0;
            padding: 5px 15px;
            transition: all 0.3s;
            border-left: none;
            border-right: none;
            justify-content: space-between;
            align-items: center;
            color: #2d3748;
            text-decoration: none;
            font-weight: 600;
           
        }
        

        .subject-item:first-child {
            border-top: none;
        }

        .subject-item:last-child {
            border-bottom: none;
        }
        
        .subject-item a {
            text-decoration: none;
            color: #2d3748;
            display: block;
            width: 100%;
            height: 100%;
        }
        
        .subject-item:hover {
            background-color: #f8f9fa;
            border-color: #cbd5e0;
        }
        
        .subject-item::after {
            content: ">";
            position: absolute;
            left: 15px;
            top: 50%;
            transform: translateY(-50%);
            color: #718096;
        }
        
        .levels-dropdown {
            display: none;
            position: absolute;
            right: 100%;
            top: 0;
            background-color: white;
            min-width: 230px;
            border-radius: 4px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.2);
            z-index: 101;
            padding: 10px;
            border: 1px solid #e2e8f0;
           
        }
        
        .subject-item:hover .levels-dropdown {
            display: block;
        }
        
        .levels-dropdown a {
            display: block;
            padding: 8px 15px;
            color: #2d3748;
            text-decoration: none;
            border-radius: 4px;
            margin: 3px 0;
            transition: all 0.2s;
        }
        
        .levels-dropdown a:hover {
            background-color: #edf2f7;
            padding-right: 20px;
        }
        
        .primary-dropdown .subject-item:hover {
            background-color: #ebf8ff;
            border-color: #90cdf4;
        }
        
        .middle-dropdown .subject-item:hover {
            background-color: #f0fff4;
            border-color: #9ae6b4;
        }
        
        .secondary-dropdown .subject-item:hover {
            background-color: #fffaf0;
            border-color: #fbd38d;
        }
        
        .dropdown-hidden-items {
            display: none;
        }
        
        .dropdown-more-btn {
            display: block;
            text-align: center;
            padding: 8px;
            margin-top: 5px;
            background: #f5f5f5;
            color: #555;
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.3s;
            border: 1px solid #e2e8f0;
        }
        
        .dropdown-more-btn:hover {
            background: #e0e0e0;
        }
        
        .show-more-dropdown .dropdown-hidden-items {
            display: block;
            animation: fadeIn 0.3s ease-out;
        }
        
        .show-more-dropdown .dropdown-more-btn::after {
            
            font-size: 0.8em;
        }
        
        .header-spacer {
            height: 100px;
        }
        .main-content {
            display: flex;
            flex-direction: column;
            flex: 1;
            padding: 30px;
            max-width: 1400px;
            margin: 0 auto;
            width: 100%;
        }
        
        
  .footer {
  background: #2d3748;
  color: white;
  padding: 10px 3px;
  text-align: center;
  margin-top: 100px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.footer-track {
  display: inline-block;
  white-space: nowrap;
  animation: scroll-left 15s linear infinite;
  will-change: transform;
}

@keyframes scroll-left {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* دعم الأجهزة الصغيرة */
@media (max-width: 768px) {
  .footer {
    font-size: 14px;
    padding: 8px 0;
  }

  .footer-track {
    animation-duration: 20s;
    font-size: 14px;
  }
}

 
 @media (max-width: 768px) {
        
    .header-content {
        flex-direction: row-reverse;
        padding: 5px 15px;
        align-items: center;
    }
    
    .auth-buttons {
        margin-top: 0;
        width: auto;
        gap: 8px;
    }
    
    .auth-btn {
        padding: 6px 12px;
        font-size: 14px;
    }
    .logo-section {
        margin-left: 0;
    }
    
    .logo-section img {
        width: 18px;
        height: 18px;
    }
    
    .logo-text {
        font-size: 0.9rem;
    }
    .level-btn {
        min-width: 150px;
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .header-spacer {
        height: 120px;
    }
    
    .subject-card {
        width: 100%;
        margin-bottom: 15px;
    }
    
    .horizontal-sections {
        flex-direction: column;
    }
    
    .main-content {
        padding: 20px 15px;
    }
    
    /* تحسين شريط التعليمات */
    .education-filiers {
        padding: 5px 0;
    }
    
    .filiers-container {
        flex-direction: column;
        gap: 5px;
        padding: 0 10px;
    }
    
    .filier-btn {
        min-width: 100%;
        font-size: 14px;
    }
    
    /* تحسين القوائم المنسدلة */
    .filier-dropdown {
        position: fixed;
        top: 160px;
        width: 100%;
        left: 5%;
        max-height: 60vh;
        overflow-y: auto;
        z-index: 1000;
        box-shadow: 0 5px 15px rgba(0,0,0,0.2);
        border: 1px solid #e2e8f0;
        margin-top: 5px;
        display: none;
        opacity: 0;
        transform: translateY(10px);
        transition: all 0.2s ease;
    }
    
    .filier-btn-container:focus-within .filier-dropdown,
    .filier-dropdown.show {
        display: block;
        opacity: 1;
        transform: translateY(0);
    }
    
    .levels-dropdown {
        position: static;
        width: 100%;
        box-shadow: none;
        border: none;
        padding: 5px;
    }
    
    /* تحسين شريط البحث */
    .search-input {
        padding: 12px 50px 12px 15px;
    }
    
    .search-icon {
        right: 5px;
    }
}


@media (max-width: 480px) {
    
    .subject-item {
        padding: 8px 10px;
        font-size: 14px;
    }
    
    
    
    .more-btn {
        padding: 8px;
        font-size: 14px;
    }
    
    /* تحسينات عامة للهواتف */
    body {
        -webkit-text-size-adjust: 100%;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* منع التكبير عند النقر على حقول الإدخال */
    input, select, textarea {
        font-size: 16px;
    }
    
    .filier-dropdown {
        max-height: 50vh;
    }
    .search-input {
    padding: 8px 35px 8px 10px;
    font-size: 0.9rem;
    height: 36px;
  }

  .search-icon {
    width: 32px;
    height: 32px;
    right: 4px;
  }

  .search-container {
    padding: 0 10px;
  }
}


    
     
        .container {
            display: grid;
            grid-template-columns: 1fr 3fr;
            gap: 20px;
            padding: 20px;
            min-height: 100vh;
        }

        .sidebar {
            background: #fff;
            border-radius: 8px;
            padding: 15px;
            box-shadow: 0 0 5px rgba(0,0,0,0.1);
        }

        .sidebar h3 {
            margin-top: 0;
            font-size: 1.1em;
            color: #333;
            padding-bottom: 10px;
            border-bottom: 1px solid #eee;
        }

        .sidebar button {
            display: block;
            width: 100%;
            margin-bottom: 10px;
            padding: 10px;
            background: #007bff;
            border: none;
            color: white;
            cursor: pointer;
            border-radius: 5px;
            transition: all 0.3s ease;
            text-align: right;
        }

        .sidebar button:hover {
            background: #0069d9;
            transform: translateX(-5px);
        }

        .sidebar button.active {
            background: #0056b3;
            font-weight: bold;
            box-shadow: inset 0 0 0 2px #fff;
        }

        .content {
            background: #fff;
            border-radius: 8px;
            padding: 20px;
            box-shadow: 0 0 5px rgba(0,0,0,0.1);
        }

        .section {
            display: none;
        }

        .section.active {
            display: block;
            animation: fadeIn 0.5s ease;
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 15px;
        }

        table, th, td {
            border: 1px solid #ddd;
        }

        th, td {
            padding: 10px;
            text-align: center;
        }

        th {
            background: #007bff;
            color: white;
        }

        tr:nth-child(even) {
            background-color: #f2f2f2;
        }

        tr:hover {
            background-color: #e9e9e9;
        }

        .stats-boxes {
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
            margin-bottom: 20px;
        }

        .stat {
            flex: 1;
            background: #f0f8ff;
            padding: 15px;
            border-radius: 6px;
            text-align: center;
            font-size: 1.1em;
            min-width: 100px;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        }

        .stat span {
            font-weight: bold;
            color: #0056b3;
        }

        button {
            padding: 6px 12px;
            margin: 2px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.3s;
        }

        button:hover {
            opacity: 0.9;
        }

        select, input {
            padding: 8px;
            border-radius: 4px;
            border: 1px solid #ddd;
            margin-left: 10px;
        }

        label {
            margin-left: 15px;
        }

        /* ✅ دعم الشاشات الصغيرة */
        @media (max-width: 768px) {
            .container {
                display: block;
                padding: 10px;
            }

            .sidebar {
                margin-bottom: 20px;
            }

            .sidebar button {
                font-size: 0.9em;
                padding: 8px;
            }

            .content {
                padding: 15px;
            }

            .stat {
                font-size: 0.95em;
                padding: 10px;
            }

            th, td {
                font-size: 0.85em;
                padding: 6px;
            }

            .stats-boxes {
                flex-direction: column;
            }

            table {
                font-size: 0.8em;
            }
        }

        /* تنسيقات الفوتر */
        .footer {
            background-color: #222;
            color: #fff;
            padding: 20px;
            font-size: 15px;
            text-align: center;
        }

        .footer-track {
            margin-bottom: 10px;
        }

        .footer-bar {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            align-items: center;
            gap: 15px;
        }

        .footer-links {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            justify-content: center;
        }

        .footer-links a {
            text-decoration: none;
            color: #f7f7f7;
        }

        .footer-icons {
            display: flex;
            gap: 10px;
        }

        /* تنسيقات النماذج */
        #add-content-form {
            margin-top: 20px;
            padding: 15px;
            border-radius: 8px;
            background: #f8f9fa;
            border: 1px solid #ddd;
        }

        #add-content-form label {
            display: block;
            margin-bottom: 5px;
            font-weight: bold;
        }

        #add-content-form input {
            width: 100%;
            margin-bottom: 15px;
            padding: 8px;
        }

        #add-content-form button {
            background: #28a745;
            color: white;
            padding: 10px 15px;
        }

        /* أزرار الإجراءات */
        .btn-promote {
            background: #ffc107;
            color: #212529;
        }

        .btn-highlight {
            background: #17a2b8;
            color: white;
        }

        .btn-ban {
            background: #dc3545;
            color: white;
        }

        .btn-delete {
            background: #6c757d;
            color: white;
        }

        .loading {
            text-align: center;
            padding: 20px;
            color: #666;
        }
        /* تنسيقات عامة للنموذج */
    .upload-form {
        background: #ffffff;
        padding: 25px;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        border: 1px solid #e0e0e0;
        max-width: 800px;
        margin: 0 auto;
    }
    
    .upload-form h4 {
        color: #2c3e50;
        margin-bottom: 25px;
        font-size: 1.5rem;
        text-align: center;
        padding-bottom: 15px;
        border-bottom: 2px solid #f1f1f1;
    }
    
    .upload-form .form-group {
        margin-bottom: 20px;
    }
    
    .upload-form label {
        display: block;
        margin-bottom: 8px;
        font-weight: 600;
        color: #34495e;
        font-size: 0.95rem;
    }
    
    .upload-form input[type="text"],
    .upload-form input[type="file"],
    .upload-form select,
    .upload-form textarea {
        width: 100%;
        padding: 12px 15px;
        border: 1px solid #ddd;
        border-radius: 8px;
        font-size: 1rem;
        transition: all 0.3s ease;
        background-color: #f9f9f9;
    }
    
    .upload-form input[type="text"]:focus,
    .upload-form select:focus,
    .upload-form textarea:focus {
        border-color: #3498db;
        box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
        outline: none;
        background-color: #fff;
    }
    
    .upload-form textarea {
        min-height: 100px;
        resize: vertical;
    }
    
    /* تنسيقات الأزرار */
    .form-actions {
        display: flex;
        gap: 15px;
        margin-top: 25px;
    }
    
    .btn-submit {
        background-color: #2ecc71;
        color: white;
        border: none;
        padding: 12px 25px;
        border-radius: 8px;
        cursor: pointer;
        font-size: 1rem;
        font-weight: 600;
        flex: 1;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }
    
    .btn-submit:hover {
        background-color: #27ae60;
        transform: translateY(-2px);
    }
    
    .btn-cancel {
        background-color: #e74c3c;
        color: white;
        border: none;
        padding: 12px 25px;
        border-radius: 8px;
        cursor: pointer;
        font-size: 1rem;
        font-weight: 600;
        flex: 1;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }
    
    .btn-cancel:hover {
        background-color: #c0392b;
        transform: translateY(-2px);
    }
    
    /* تنسيق شريط التقدم */
    #uploadProgress {
        margin-top: 20px;
        background: #f1f1f1;
        border-radius: 8px;
        padding: 15px;
        display: none;
    }
    
    #uploadProgress progress {
        width: 100%;
        height: 10px;
        border-radius: 5px;
    }
    
    #uploadProgress progress::-webkit-progress-bar {
        background-color: #ecf0f1;
        border-radius: 5px;
    }
    
    #uploadProgress progress::-webkit-progress-value {
        background-color: #3498db;
        border-radius: 5px;
        transition: width 0.3s ease;
    }
    
    #progressText {
        text-align: center;
        margin-top: 8px;
        font-size: 0.9rem;
        color: #7f8c8d;
    }
    
    /* تنسيقات للاختيارات المتداخلة */
    .form-row {
        display: flex;
        gap: 15px;
    }
    
    .form-row .form-group {
        flex: 1;
    }
    
    /* تأثيرات للأيقونات */
    .upload-form i {
        font-size: 1.1rem;
    }
    
    /* تنسيقات للهواتف المحمولة */
    @media (max-width: 768px) {
        .upload-form {
            padding: 15px;
        }
        
        .form-actions {
            flex-direction: column;
        }
        
        .form-row {
            flex-direction: column;
            gap: 15px;
        }
    }
    .admin-message table td {
  padding: 6px 8px;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}

.admin-message table tr:first-child td {
  border-bottom: none;
}

.admin-message button {
  transition: background-color 0.2s ease;
}
.admin-message button:hover {
  background-color: #0056b3;
}
.admin-message i {
  color: #007bff;
  margin-left: 6px;
}

@keyframes bell-flash {
  0%, 100% { color: #007bff; transform: scale(1); }
  50%      { color: #ff1307; transform: scale(1.3); }
}

.bell-highlight {
  animation: bell-flash 1.2s ease-in-out infinite;
}
.btn-highlight.highlighted {
    background-color: #ffc107;
    color: #000;
}
.btn-promote {
    background-color: #6f42c1; /* لون الترقية */
    color: white;
}

.btn-promote.demote {
    background-color: #dc3545; /* لون إلغاء الترقية */
}

.btn-promote:hover {
    opacity: 0.8;
}

.btn-highlight {
    background-color: #17a2b8;
    color: white;
}

