/* =============================================================
   DASHBOARD MAIN STYLESHEET — RTL Arabic
   Bootstrap 4 + DataTables + File Uploader Compatible
   Author: Generated for da7ee7a Dashboard
   ============================================================= */
/********** Template CSS **********/

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;500&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Alexandria:wght@300&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400;1,700&family=Bungee+Spice&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poetsen+One&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Alexandria:wght@300&family=El+Messiri&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Oi&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Lalezar&display=swap');
@import url('https://fonts.googleapis.com/css2?family=El+Messiri:wght@400..700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=Tajawal:wght@400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Changa:wght@400;600;700&family=Tajawal:wght@400;500;700&display=swap');
/* ---------------------------------------------------------------
   1. CSS VARIABLES (Color Palette)
--------------------------------------------------------------- */
:root {
  --primary:       #0d9488;
  --primary-light: #ccfbf1;
  --primary-dark:  #0f766e;
  --secondary:     #64748b;
  --success:       #22c55e;
  --success-light: #dcfce7;
  --danger:        #ef4444;
  --danger-light:  #fee2e2;
  --warning:       #f59e0b;
  --warning-light: #fef3c7;
  --info:          #0891b2;
  --info-light:    #cffafe;
  --purple:        #8b5cf6;
  --purple-light:  #ede9fe;

  --body-bg:       #f1f5f9;
  --card-bg:       #ffffff;
  --border-color:  #e2e8f0;
  --text-main:     #1e293b;
  --text-muted:    #94a3b8;
  --text-secondary: #64748b;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow:    0 4px 16px rgba(0,0,0,.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.12);

  --radius:    10px;
  --radius-sm: 6px;
  --radius-lg: 16px;

  --header-height: 64px;
  --sidebar-width: 255px;
  --transition: all 0.25s ease;
}

/* ---------------------------------------------------------------
   2. GLOBAL RESET & BASE
--------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  direction: rtl;
  scroll-behavior: smooth;
}

body {
  font-family: 'Cairo', 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-main);
  background: var(--body-bg);
  direction: rtl;
  text-align: right;
  min-height: 100vh;
  overflow-x: hidden;
}

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

h1,h2,h3,h4,h5,h6 {
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: .5rem;
}

p { margin-bottom: .75rem; }

img { max-width: 100%; }

h1, h2, h3 {
    font-family: 'Changa', 'Cairo',sans-serif !important;
}


body, p, a, li, button, input, textarea {
    font-family: 'Tajawal', 'Cairo',sans-serif !important;
}
::-webkit-scrollbar       { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ---------------------------------------------------------------
   3. PAGE LOADER
--------------------------------------------------------------- */
#global-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-img {
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ---------------------------------------------------------------
   4. MAIN LAYOUT — app wrapper
--------------------------------------------------------------- */
.main-body.app {
  min-height: 100vh;
  background: var(--body-bg);
}

.main-content.app-content {
  padding-top: var(--header-height);
  transition: margin-right 0.3s ease;
}

@media (min-width: 768px) {
  .main-content.app-content { margin-right: var(--sidebar-width); }
}

.container-fluid {
  padding: 20px 24px;
}

/* ---------------------------------------------------------------
   5. MAIN HEADER
--------------------------------------------------------------- */
.main-header.sticky.side-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  z-index: 900;
  display: flex;
  align-items: center;
  padding: 0;
  transition: var(--transition);
}

@media (min-width: 768px) {
  .main-header.sticky.side-header {
    right: 0;
  }
  .sidenav-toggled .main-header.sticky.side-header {
    right: 0;
  }
}

.main-header .container-fluid {
  display: flex;
  align-items: center;
  padding: 0 20px;
  height: 100%;
}

.main-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.main-header-right {
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Responsive logo (shown on mobile) */
.responsive-logo { display: none; }

.responsive-logo img {
  height: 36px;
  width: auto;
  object-fit: contain;
}

@media (max-width: 767px) {
  .responsive-logo { display: flex; align-items: center; }
  .logo-2, .dark-logo-2 { display: none; }

  .main-header.sticky.side-header {
    right: 0 !important;
    left: 0 !important;
  }
}

/* ---------------------------------------------------------------
   6. BREADCRUMB HEADER
--------------------------------------------------------------- */
.breadcrumb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.breadcrumb-header .left-content h2,
.breadcrumb-header .my-auto h4 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.breadcrumb-header .my-auto .d-flex {
  align-items: center;
  gap: 6px;
}

.breadcrumb-header h4.content-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  color: var(--text-main);
}

.breadcrumb-header .text-muted {
  color: var(--text-muted) !important;
  font-size: 13px;
}

.breadcrumb-header p { margin: 0; color: var(--text-secondary); font-size: 13px; }

/* ---------------------------------------------------------------
   7. CARDS
--------------------------------------------------------------- */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow);
}

.card-header {
  background: transparent;
  border-bottom: 1px solid var(--border-color);
  padding: 16px 20px;
}

.card-header.pb-0 { padding-bottom: 0; }

.card-body {
  padding: 20px;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.card-footer {
  background: transparent;
  border-top: 1px solid var(--border-color);
  padding: 12px 20px;
}

/* --- Gradient stat cards --- */
.bg-primary-gradient {
  background: linear-gradient(135deg, #0d9488 0%, #0891b2 100%) !important;
  border: none;
}

.bg-danger-gradient {
  background: linear-gradient(135deg, #ef4444 0%, #ec4899 100%) !important;
  border: none;
}

.bg-success-gradient {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
  border: none;
}

.bg-warning-gradient {
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%) !important;
  border: none;
}

.bg-info-gradient {
  background: linear-gradient(135deg, #0891b2 0%, #6366f1 100%) !important;
  border: none;
}

.bg-purple-gradient {
  background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%) !important;
  border: none;
}

/* Gradient card text */
.bg-primary-gradient .card-body,
.bg-danger-gradient  .card-body,
.bg-success-gradient .card-body,
.bg-warning-gradient .card-body,
.bg-info-gradient    .card-body,
.bg-purple-gradient  .card-body {
  position: relative;
  z-index: 1;
}

.bg-primary-gradient::before,
.bg-danger-gradient::before,
.bg-success-gradient::before,
.bg-warning-gradient::before,
.bg-info-gradient::before,
.bg-purple-gradient::before {
  content: '';
  position: absolute;
  top: -20px;
  left: -20px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  pointer-events: none;
}

/* Stat card icon container */
.icon1 {
  width: 60px;
  height: 60px;
  background: rgba(255,255,255,.2);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  backdrop-filter: blur(4px);
}

.icon1 i { font-size: 28px; color: #fff; line-height: 1; }

/* mg-b-20 on cards */
.card.mg-b-20 { margin-bottom: 20px; }

/* ---------------------------------------------------------------
   8. BUTTONS
--------------------------------------------------------------- */
.btn {
  font-family: 'Cairo', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  cursor: pointer;
}

.btn:focus, .btn:active { outline: none; box-shadow: none; }

.btn.ripple { position: relative; overflow: hidden; }

.btn-primary   { background: var(--primary);   color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(13,148,136,.35); }

.btn-success   { background: var(--success);   color: #fff; }
.btn-success:hover { background: #16a34a; color: #fff; transform: translateY(-1px); }

.btn-danger    { background: var(--danger);    color: #fff; }
.btn-danger:hover { background: #dc2626; color: #fff; transform: translateY(-1px); }

.btn-warning   { background: var(--warning);   color: #fff; }
.btn-warning:hover { background: #d97706; color: #fff; transform: translateY(-1px); }

.btn-info      { background: var(--info);      color: #fff; }
.btn-info:hover { background: #0e7490; color: #fff; transform: translateY(-1px); }

.btn-secondary { background: var(--secondary); color: #fff; }
.btn-secondary:hover { background: #475569; color: #fff; transform: translateY(-1px); }

.btn-sm  { padding: 5px 12px; font-size: 12px; }
.btn-lg  { padding: 12px 28px; font-size: 15px; }

/* ---------------------------------------------------------------
   9. FORMS
--------------------------------------------------------------- */
.form-control {
  font-family: 'Cairo', sans-serif;
  font-size: 13.5px;
  color: var(--text-main);
  background: #f8fafc;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  text-align: right;
  direction: rtl;
  width: 100%;
}

.form-control:focus {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13,148,136,.12);
  outline: none;
}

.form-control.is-invalid {
  border-color: var(--danger);
}

.form-control::placeholder { color: var(--text-muted); }

label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  display: block;
}

.form-group { margin-bottom: 18px; }

textarea.form-control { resize: vertical; min-height: 100px; }

select.form-control {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  padding-left: 32px;
}

/* ---------------------------------------------------------------
   10. TABLES & DATATABLES
--------------------------------------------------------------- */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.table {
  width: 100%;
  font-size: 13.5px;
  color: var(--text-main);
  border-collapse: collapse;
  text-align: right;
  direction: rtl;
}

.table th {
  background: #f8fafc;
  font-weight: 700;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-secondary);
  padding: 12px 14px;
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
}

.table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.table tbody tr {
  transition: background 0.15s ease;
}

.table tbody tr:hover {
  background: #f8fafc;
}

.table-bordered { border: 1px solid var(--border-color); }
.table-bordered th,
.table-bordered td { border: 1px solid var(--border-color); }

/* DataTables overrides */
.dataTables_wrapper {
  font-family: 'Cairo', sans-serif;
  font-size: 13px;
  direction: rtl;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
  font-family: 'Cairo', sans-serif;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 13px;
  background: #f8fafc;
  color: var(--text-main);
}

.dataTables_wrapper .dataTables_length select:focus,
.dataTables_wrapper .dataTables_filter input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(13,148,136,.1);
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  font-family: 'Cairo', sans-serif;
  font-size: 13px;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  margin: 0 2px;
  border: 1px solid var(--border-color) !important;
  background: #ffffff !important;
  color: var(--text-main) !important;
  transition: var(--transition);
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
  box-shadow: 0 3px 8px rgba(13,148,136,.3) !important;
}

.dataTables_wrapper .dataTables_info {
  font-size: 12.5px;
  color: var(--text-muted);
  padding-top: 10px;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter { margin-bottom: 14px; }

div.dataTables_wrapper div.dataTables_filter input { margin-right: 6px; }

table.dataTable thead th,
table.dataTable thead td {
  border-bottom: 2px solid var(--border-color);
}

table.dataTable.no-footer { border-bottom: 1px solid var(--border-color); }

/* DataTables buttons */
.dt-buttons .btn,
.dt-button {
  font-family: 'Cairo', sans-serif;
  font-size: 12px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  background: #f8fafc;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  margin: 0 2px;
  transition: var(--transition);
  cursor: pointer;
}

.dt-buttons .btn:hover,
.dt-button:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* key-buttons table (existing class) */
table.key-buttons thead th { white-space: nowrap; }

/* ---------------------------------------------------------------
   11. MODALS
--------------------------------------------------------------- */
.modal { direction: rtl; }

.modal-dialog { margin: 60px auto; }
.modal-dialog.modal-lg { max-width: 860px; }
.modal-dialog.modal-sm { max-width: 440px; }

.modal-content,
.modal-content-demo {
  background: var(--card-bg);
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--info) 100%);
  padding: 16px 20px;
  border-bottom: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title { font-size: 15px; font-weight: 700; color: #fff; margin: 0; }

.modal-header .close {
  color: rgba(255,255,255,.8);
  opacity: 1;
  font-size: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.15s ease;
}

.modal-header .close:hover { color: #fff; }

.modal-body {
  padding: 24px;
  text-align: right;
  direction: rtl;
}

.modal-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-start;
  gap: 10px;
}

/* ---------------------------------------------------------------
   12. ALERTS
--------------------------------------------------------------- */
.alert {
  font-family: 'Cairo', sans-serif;
  font-size: 13.5px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: none;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.alert-success {
  background: var(--success-light);
  color: #166534;
  border-right: 4px solid var(--success);
}

.alert-danger {
  background: var(--danger-light);
  color: #991b1b;
  border-right: 4px solid var(--danger);
}

.alert-warning {
  background: var(--warning-light);
  color: #92400e;
  border-right: 4px solid var(--warning);
}

.alert-info {
  background: var(--info-light);
  color: #0e4f6c;
  border-right: 4px solid var(--info);
}

/* ---------------------------------------------------------------
   13. PROGRESS BARS
--------------------------------------------------------------- */
.progress {
  height: 10px;
  background: #f1f5f9;
  border-radius: 20px;
  overflow: hidden;
}

.progress.ht-20 { height: 20px; }

.progress-bar {
  border-radius: 20px;
  transition: width 0.6s ease;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-bar.bg-primary  { background: linear-gradient(90deg, var(--primary), var(--info)); }
.progress-bar.bg-success  { background: linear-gradient(90deg, var(--success), #16a34a); }
.progress-bar.bg-danger   { background: linear-gradient(90deg, var(--danger), #ec4899); }
.progress-bar.bg-warning  { background: linear-gradient(90deg, var(--warning), var(--danger)); }
.progress-bar.bg-info     { background: linear-gradient(90deg, var(--info), var(--purple)); }

.progress-bar-striped {
  background-image: linear-gradient(
    45deg, rgba(255,255,255,.15) 25%,
    transparent 25%, transparent 50%,
    rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%,
    transparent 75%, transparent
  );
  background-size: 1rem 1rem;
}

@keyframes progress-bar-stripes {
  from  { background-position: 1rem 0; }
  to    { background-position: 0 0; }
}

.progress-bar-animated { animation: progress-bar-stripes 1s linear infinite; }

/* width utilities for progress */
.wd-60p { width: 60%; }
.wd-50p { width: 50%; }
.wd-75p { width: 75%; }
.wd-25p { width: 25%; }

/* ---------------------------------------------------------------
   14. WIDGET USER CARDS (المدرسين/الطلبة المتفاعلين)
--------------------------------------------------------------- */
.user-wideget {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}

.user-wideget-widget { text-align: center; }

.widget-user { margin-bottom: 24px; }

.widget-user-header {
  padding: 30px 20px 60px;
  position: relative;
  color: #fff;
  text-align: center;
}

.widget-user-header.bg-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--info) 100%);
}

.widget-user-header.bg-danger {
  background: linear-gradient(135deg, var(--danger) 0%, #ec4899 100%);
}

.widget-user-header.bg-success {
  background: linear-gradient(135deg, var(--success) 0%, #16a34a 100%);
}

.widget-user-header.bg-warning {
  background: linear-gradient(135deg, var(--warning) 0%, var(--danger) 100%);
}

.widget-user-header.bg-secondary {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
}

.widget-user-username {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 4px;
  color: #fff;
}

.widget-user-desc {
  font-size: 12.5px;
  opacity: .85;
  margin: 0;
  color: #fff;
}

.widget-user-image {
  position: absolute;
  width: 80px;
  height: 80px;
  left: 50%;
  transform: translateX(-50%);
  margin-top: -42px;
  z-index: 10;
}

.widget-user-image img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: var(--shadow);
  object-fit: cover;
}

.user-wideget-footer {
  padding: 60px 0 16px;
  background: var(--card-bg);
}

.description-block {
  padding: 10px 8px;
  text-align: center;
}

.description-header {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 4px;
  line-height: 1.2;
}

.description-text {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text-muted);
  font-weight: 600;
}

/* ---------------------------------------------------------------
   15. RATING SCROLL (latest students/teachers/lectures)
--------------------------------------------------------------- */
.rating-scroll {
  max-height: 280px;
  overflow-y: auto;
  overflow-x: hidden;
}

.rating-scroll::-webkit-scrollbar { width: 3px; }
.rating-scroll::-webkit-scrollbar-track { background: #f8fafc; }
.rating-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }

/* ---------------------------------------------------------------
   16. MEDIA OBJECT
--------------------------------------------------------------- */
.media {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.media-body { flex: 1; min-width: 0; }

.media-object {
  width: 46px;
  height: 46px;
  object-fit: cover;
  flex-shrink: 0;
}

/* ---------------------------------------------------------------
   17. AVATAR
--------------------------------------------------------------- */
.avatar {
  display: inline-block;
  overflow: hidden;
  flex-shrink: 0;
}

.brround { border-radius: 50% !important; }

.w-7, .h-7 { width: 46px; height: 46px; }

.avatar-xl {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
}

/* ---------------------------------------------------------------
   18. BADGES
--------------------------------------------------------------- */
.badge {
  font-family: 'Cairo', sans-serif;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
}

.badge-primary   { background: var(--primary-light); color: var(--primary-dark); }
.badge-success   { background: var(--success-light); color: #166534; }
.badge-danger    { background: var(--danger-light);  color: #991b1b; }
.badge-warning   { background: var(--warning-light); color: #92400e; }
.badge-info      { background: var(--info-light);    color: #0e4f6c; }
.badge-secondary { background: #f1f5f9; color: var(--secondary); }

/* nav-badge (sidebar) */
.nav-badge {
  border-radius: 30px;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
}

/* ---------------------------------------------------------------
   19. FILE UPLOADER (dropify)
--------------------------------------------------------------- */
.dropify-wrapper {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius);
  background: #f8fafc;
  transition: var(--transition);
  overflow: hidden;
}

.dropify-wrapper:hover {
  border-color: var(--primary);
  background: #f0fdf9;
}

.dropify-wrapper .dropify-message p { color: var(--text-muted); font-size: 13px; }
.dropify-wrapper .dropify-message .file-icon { color: var(--primary); }

.dropify-wrapper.has-error { border-color: var(--danger); }
.dropify-wrapper.has-error .dropify-message p { color: var(--danger); }

/* Fancy uploader */
.upload-btn-wrapper {
  position: relative;
  overflow: hidden;
  display: inline-block;
}

/* ---------------------------------------------------------------
   20. SELECT2
--------------------------------------------------------------- */
.select2-container--default .select2-selection--multiple,
.select2-container--default .select2-selection--single {
  font-family: 'Cairo', sans-serif;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: #f8fafc;
  min-height: 40px;
  direction: rtl;
  text-align: right;
}

.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open  .select2-selection--single {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13,148,136,.1);
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background: var(--primary);
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-dark);
  border-radius: var(--radius-sm);
  font-size: 12px;
}

/* ---------------------------------------------------------------
   21. TYPOGRAPHY UTILITIES
--------------------------------------------------------------- */
/* tx-* font-size */
.tx-10 { font-size: 10px; }
.tx-11 { font-size: 11px; }
.tx-12 { font-size: 12px; }
.tx-13 { font-size: 13px; }
.tx-14 { font-size: 14px; }
.tx-15 { font-size: 15px; }
.tx-16 { font-size: 16px; }
.tx-18 { font-size: 18px; }
.tx-20 { font-size: 20px; }
.tx-22 { font-size: 22px; }
.tx-24 { font-size: 24px; }
.tx-26 { font-size: 26px; }
.tx-30 { font-size: 30px; }
.tx-40 { font-size: 40px; }

.tx-gray-500 { color: var(--text-muted) !important; }
.tx-gray-400 { color: #94a3b8 !important; }

.font-weight-semibold { font-weight: 600; }
.font-weight-bold     { font-weight: 700; }

/* ---------------------------------------------------------------
   22. SPACING UTILITIES
--------------------------------------------------------------- */
/* mg-b-* */
.mg-b-0  { margin-bottom: 0 !important; }
.mg-b-1  { margin-bottom: 4px !important; }
.mg-b-2  { margin-bottom: 8px !important; }
.mg-b-3  { margin-bottom: 12px !important; }
.mg-b-10 { margin-bottom: 10px !important; }
.mg-b-20 { margin-bottom: 20px !important; }
.mg-b-30 { margin-bottom: 30px !important; }

.mg-b-lg-1 { margin-bottom: 4px !important; }

/* ht-* height */
.ht-20  { height: 20px !important; }
.ht-30  { height: 30px !important; }
.ht-40  { height: 40px !important; }
.ht-50  { height: 50px !important; }
.ht-100 { height: 100px !important; }

/* ---------------------------------------------------------------
   23. ROW VARIANTS
--------------------------------------------------------------- */
.row-sm { margin-right: -8px; margin-left: -8px; }
.row-sm > [class*="col"] { padding-right: 8px; padding-left: 8px; }

.row-cards { align-items: stretch; }
.row-deck > [class*="col"] { display: flex; }
.row-deck > [class*="col"] .card { flex: 1; }

/* ---------------------------------------------------------------
   24. FOOTER
--------------------------------------------------------------- */
.footer {
  background: var(--card-bg);
  border-top: 2px solid var(--border-color);
  padding: 0;
  margin-top: 32px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 13px;
  color: var(--text-muted);
}

.footer-copy strong {
  color: var(--text-main);
  font-weight: 600;
}

.footer-dev {
  font-size: 13px;
  color: var(--text-muted);
}

.footer a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* ---------------------------------------------------------------
   25. COURSES PAGE — ACCORDION & LECTURE CARDS
--------------------------------------------------------------- */

/* ── Course accordion (outer) ───────────────────────────────── */
#accordion {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  margin: 0 0 20px !important;
  border: 1px solid #e2e8f0;
}

.accor {
  background: linear-gradient(135deg, #f0fdfa 0%, #f8fafc 100%) !important;
  border-right: 4px solid var(--primary);
  padding: 14px 20px !important;
}

.accor h4 {
  gap: 16px;
  flex-wrap: wrap;
}

.accor h4 > a {
  color: #1e293b;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none !important;
  line-height: 1.6;
  transition: color 0.2s ease;
}

.accor h4 > a:hover { color: var(--primary); }

.accor h4 > a img {
  border-radius: 6px;
  object-fit: cover;
  vertical-align: middle;
}

/* Course body */
#accordion .collapse .border,
#accordion .show .border {
  background: #f8fafc;
  border-color: #e2e8f0 !important;
  border-radius: 0 0 12px 12px;
  padding: 20px !important;
}

/* ── Chapter accordion (inner) ──────────────────────────────── */
.panel-group1 { margin-bottom: 14px !important; }

.panel.panel-default {
  border: none !important;
  border-radius: 10px !important;
  overflow: hidden;
  box-shadow: 0 1px 8px rgba(0,0,0,0.08);
}

.panel-heading1 {
  background: linear-gradient(135deg, #334155 0%, #1e293b 100%) !important;
  padding: 12px 18px !important;
}

.panel-title1 {
  margin: 0;
  gap: 10px;
}

.panel-title1 a {
  color: #fff !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  line-height: 1.5;
  transition: opacity 0.2s ease;
}

.panel-title1 a:hover { opacity: 0.85; text-decoration: none !important; }

.panel-title1 a .fe {
  color: #94a3b8;
  transition: transform 0.25s ease;
}

.panel-title1 a[aria-expanded="true"] .fe {
  transform: rotate(-90deg);
  color: #0d9488;
}

.panel-title1 a span {
  display: inline-block;
  font-size: 12px;
  color: #94a3b8;
  font-weight: 400;
}

.panel-body.border {
  padding: 20px 16px !important;
  background: #ffffff;
  border: none !important;
  border-top: 1px solid #e2e8f0 !important;
}

.panel-body h3 {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 16px !important;
}

/* ── Lecture card ────────────────────────────────────────────── */
.panel-body .card {
  border: none !important;
  border-radius: 12px !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07) !important;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
  overflow: hidden;
  margin-bottom: 20px;
}

.panel-body .card:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,0.12) !important;
  transform: translateY(-4px);
}

.panel-body .card-img-top {
  height: 160px !important;
  object-fit: cover;
}

.panel-body .card-body { padding: 14px 16px; }

.panel-body .card-title {
  font-size: 14px !important;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px !important;
}

.panel-body .card-title span {
  color: var(--primary) !important;
  font-weight: 600;
}

.panel-body .card-text {
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 12px !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.panel-body .card-body .btn { margin: 3px 2px; }

.panel-body .assignments {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  border-radius: 8px;
}

/* ── Choices buttons row (shared by course & chapter) ───────── */
.choices {
  display: flex !important;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  margin-right: auto;
}

/* ---------------------------------------------------------------
   25. MISC UTILITIES
--------------------------------------------------------------- */
.pb-0 { padding-bottom: 0 !important; }
.pt-0 { padding-top: 0 !important; }
.pl-3 { padding-left: 12px !important; }
.pr-3 { padding-right: 12px !important; }
.py-3 { padding-top: 12px !important; padding-bottom: 12px !important; }

.ml-3 { margin-left: 12px !important; }
.mr-2 { margin-right: 8px !important; }
.mr-auto { margin-right: auto !important; }
.ml-auto { margin-left: auto !important; }
.mt-0   { margin-top: 0 !important; }
.mt-2   { margin-top: 8px !important; }
.mt-4   { margin-top: 16px !important; }
.mb-0   { margin-bottom: 0 !important; }
.mb-2   { margin-bottom: 8px !important; }
.mb-3   { margin-bottom: 12px !important; }
.mb-4   { margin-bottom: 16px !important; }
.mb-5   { margin-bottom: 24px !important; }

.d-flex            { display: flex !important; }
.justify-content-between { justify-content: space-between !important; }
.align-items-center { align-items: center !important; }
.text-center { text-align: center !important; }
.text-right  { text-align: right !important; }
.text-left   { text-align: left !important; }
.text-white  { color: #ffffff !important; }
.text-muted  { color: var(--text-muted) !important; }
.text-primary  { color: var(--primary) !important; }
.text-success  { color: var(--success) !important; }
.text-danger   { color: var(--danger) !important; }
.text-warning  { color: var(--warning) !important; }
.text-info     { color: var(--info) !important; }
.text-gray     { color: var(--text-muted) !important; }

.border-bottom { border-bottom: 1px solid var(--border-color) !important; }
.border-right  { border-right: 1px solid var(--border-color) !important; }
.border-left   { border-left: 1px solid var(--border-color) !important; }

.w-50  { width: 50% !important; }
.w-100 { width: 100% !important; }

.rounded   { border-radius: var(--radius-sm) !important; }
.brround   { border-radius: 50% !important; }

.cursor-pointer { cursor: pointer; }

hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 20px 0;
}

/* ---------------------------------------------------------------
   26. BOOTSTRAP TOGGLE (teacher status)
--------------------------------------------------------------- */
.toggle.btn {
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 12px;
  min-width: 80px;
}

.toggle-on.btn-success  { background: var(--success); border-color: var(--success); }
.toggle-off.btn-warning { background: var(--warning); border-color: var(--warning); }

/* ---------------------------------------------------------------
   27. LOGIN PAGE
--------------------------------------------------------------- */
.login-page .background {
  min-height: 100vh;
  background: linear-gradient(135deg, #0d9488 0%, #0891b2 50%, #8b5cf6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.login-page .background .container {
  max-width: 420px;
  width: 100%;
}

.login-page .background .container .card {
  box-shadow: var(--shadow-lg);
  padding: 32px;
  border-radius: var(--radius-lg);
}

.login-page .logospecial {
  border-radius: 50%;
  border: 2px solid var(--border-color);
  width: 100px;
  margin: 0 auto 24px;
  padding: 18px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------------------------------------------------------------
   28. MAIN SIDEBAR HEADER (mobile visible header inside sidebar)
--------------------------------------------------------------- */
.main-sidebar-header {
  width: var(--sidebar-width);
}

/* ---------------------------------------------------------------
   29. RESPONSIVE
--------------------------------------------------------------- */
@media (max-width: 991px) {
  .container-fluid { padding: 16px; }

  .breadcrumb-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .modal-dialog.modal-lg { max-width: 95%; margin: 30px auto; }
}

@media (max-width: 767px) {
  .main-content.app-content { margin-right: 0 !important; }

  .container-fluid { padding: 12px; }

  .card-body { padding: 14px; }

  .table th, .table td { padding: 10px 10px; font-size: 12.5px; }

  .breadcrumb-header .right-content { width: 100%; }
  .breadcrumb-header .right-content .btn { width: 100%; justify-content: center; }

  .widget-user-header { padding: 24px 16px 50px; }

  .description-header { font-size: 15px; }
  .description-text { font-size: 10px; }

  .user-wideget-footer { padding-top: 52px; }

  .icon1 { width: 50px; height: 50px; }
  .icon1 i { font-size: 22px; }
}

@media (max-width: 575px) {
  .col-sm-4.border-left + .col-sm-4.border-left,
  .col-sm-4 + .col-sm-4 {
    border-top: 1px solid var(--border-color);
  }
  .description-block { padding: 8px 4px; }
}

/* ---------------------------------------------------------------
   29. PAGE LOADER
--------------------------------------------------------------- */
#page-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease;
}

.loader-ring {
  width: 48px;
  height: 48px;
  border: 3px solid #e2e8f0;
  border-top-color: #0d9488;
  border-radius: 50%;
  animation: loader-spin 0.75s linear infinite;
}

@keyframes loader-spin {
  to { transform: rotate(360deg); }
}

/* ---------------------------------------------------------------
   30. BACK TO TOP
--------------------------------------------------------------- */
#back-to-top {
  position: fixed;
  bottom: 28px;
  left: 28px;
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #0d9488, #0891b2);
  color: #fff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease,
              background 0.2s ease, box-shadow 0.2s ease;
  z-index: 9999;
  text-decoration: none;
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#back-to-top:hover {
  background: linear-gradient(135deg, #0f766e, #0369a1);
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.45);
  transform: translateY(-3px);
  color: #fff;
  text-decoration: none;
}

/* ---------------------------------------------------------------
   31. PRINT
--------------------------------------------------------------- */
@media print {
  #global-loader,
  .app-sidebar,
  .main-header,
  .footer { display: none !important; }

  .main-content.app-content {
    margin: 0 !important;
    padding: 0 !important;
  }

  .card { box-shadow: none; border: 1px solid #ddd; }
}
