/* ============================================================
   style.css — المتغيرات والأنماط العامة
   بوابة تقارير مدارس العقيق
   ============================================================ */

/* ---- متغيرات CSS ---- */
:root {
  /* الألوان الرئيسية */
  --primary:       #1e40af;
  --primary-light: #3b82f6;
  --primary-dark:  #1e3a8a;
  --secondary:     #0f172a;

  /* ألوان الحالات */
  --success:  #10b981;
  --warning:  #f59e0b;
  --danger:   #ef4444;
  --info:     #06b6d4;
  --purple:   #8b5cf6;
  --orange:   #f97316;

  /* الخلفيات */
  --bg-base:    #f1f5f9;
  --bg-surface: #ffffff;
  --bg-muted:   #f8fafc;
  --bg-border:  #e2e8f0;

  /* النصوص */
  --text-primary:   #0f172a;
  --text-secondary: #475569;
  --text-muted:     #94a3b8;
  --text-inverse:   #ffffff;

  /* الأبعاد */
  --sidebar-width:       260px;
  --sidebar-collapsed:   72px;
  --navbar-height:       64px;
  --border-radius:       10px;
  --border-radius-sm:    6px;
  --border-radius-lg:    16px;

  /* الظلال */
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:  0 4px 12px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.06);
  --shadow-lg:  0 10px 30px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.07);

  /* الخطوط */
  --font-family: 'Tajawal', 'Segoe UI', system-ui, sans-serif;
  --font-size-xs:  11px;
  --font-size-sm:  13px;
  --font-size-md:  15px;
  --font-size-lg:  18px;
  --font-size-xl:  22px;
  --font-size-2xl: 28px;

  /* انتقالات */
  --transition: 0.2s ease;
  --transition-slow: 0.35s ease;
}

/* ---- إعادة التعيين ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-family);
  font-size: var(--font-size-md);
  color: var(--text-primary);
  background: var(--bg-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; display: block; }

/* ---- طبقة التطبيق ---- */
.app-body { min-height: 100vh; display: flex; flex-direction: column; }

.app-layout {
  display: flex;
  flex: 1;
  padding-top: var(--navbar-height);
  min-height: calc(100vh - var(--navbar-height));
}

/* ---- المحتوى الرئيسي ---- */
.main-content {
  flex: 1;
  margin-right: var(--sidebar-width);
  padding: 28px 32px;
  min-height: calc(100vh - var(--navbar-height) - 48px);
  transition: margin-right var(--transition-slow);
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0; right: 0; left: 0;
  height: var(--navbar-height);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--bg-border);
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.navbar__inner {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 20px;
  gap: 14px;
}

.navbar__menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--border-radius-sm);
  transition: background var(--transition);
}
.navbar__menu-toggle:hover { background: var(--bg-base); }

.navbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.navbar__logo {
  height: 38px;
  width: auto;
  border-radius: 6px;
}

.navbar__name {
  font-size: var(--font-size-md);
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.navbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
}

/* ---- مؤشر حالة Odoo ---- */
.status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--bg-muted);
  border: 1px solid var(--bg-border);
  font-size: var(--font-size-xs);
  font-weight: 600;
  cursor: default;
}

.status-dot { font-size: 8px; }
.status-dot--unknown { color: var(--text-muted); }
.status-dot--online  { color: var(--success);    animation: pulse 2s infinite; }
.status-dot--offline { color: var(--danger);     }

@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.5} }

/* ---- أزرار الأيقونات ---- */
.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--bg-border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 15px;
  transition: all var(--transition);
  position: relative;
}
.btn-icon:hover { background: var(--bg-base); color: var(--primary); border-color: var(--primary-light); }

.btn-icon--notif .notif-badge {
  position: absolute;
  top: -4px;
  left: -4px;
  min-width: 18px;
  height: 18px;
  border-radius: 10px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--bg-surface);
}

/* ---- قائمة المستخدم ---- */
.user-menu-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: 1px solid var(--bg-border);
  border-radius: var(--border-radius);
  padding: 5px 12px 5px 8px;
  cursor: pointer;
  transition: all var(--transition);
}
.user-menu-toggle:hover { background: var(--bg-base); border-color: var(--primary-light); }

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  overflow: hidden;
  flex-shrink: 0;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }

.user-info { display: flex; flex-direction: column; text-align: right; }
.user-name { font-size: var(--font-size-sm); font-weight: 600; color: var(--text-primary); }
.user-role { font-size: var(--font-size-xs); color: var(--text-muted); }
.user-chevron { font-size: 11px; color: var(--text-muted); transition: transform var(--transition); }
.dropdown--open .user-chevron { transform: rotate(180deg); }

/* ============================================================
   DROPDOWN
   ============================================================ */
.dropdown { position: relative; }

.dropdown__menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 200px;
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  z-index: 999;
  display: none;
  animation: dropIn 0.18s ease forwards;
}
.dropdown--open .dropdown__menu { display: block; }

@keyframes dropIn { from{opacity:0;transform:translateY(-8px)} to{opacity:1;transform:translateY(0)} }

.dropdown__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--bg-border);
  font-weight: 600;
  font-size: var(--font-size-sm);
}

.dropdown__body { max-height: 320px; overflow-y: auto; }

.dropdown__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  transition: all var(--transition);
  cursor: pointer;
}
.dropdown__item:hover { background: var(--bg-muted); color: var(--primary); }
.dropdown__item--danger:hover { color: var(--danger); background: #fff1f1; }

.dropdown__divider { height: 1px; background: var(--bg-border); margin: 4px 0; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  position: fixed;
  top: var(--navbar-height);
  right: 0;
  width: var(--sidebar-width);
  height: calc(100vh - var(--navbar-height));
  background: var(--secondary);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 900;
  transition: transform var(--transition-slow), width var(--transition-slow);
}

.sidebar__nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar__section-title {
  font-size: var(--font-size-xs);
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 16px 12px 6px;
}

.sidebar__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--border-radius-sm);
  color: #94a3b8;
  font-size: var(--font-size-sm);
  font-weight: 500;
  transition: all var(--transition);
  cursor: pointer;
  text-decoration: none;
}
.sidebar__item:hover { background: rgba(255,255,255,.06); color: #e2e8f0; }
.sidebar__item--active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(30,64,175,.4);
}
.sidebar__item--active:hover { background: var(--primary-light); color: #fff; }
.sidebar__item--logout:hover { background: rgba(239,68,68,.15); color: var(--danger); }

.sidebar__icon { font-size: 15px; width: 18px; text-align: center; flex-shrink: 0; }

/* بطاقة المستخدم في أسفل الـ Sidebar */
.sidebar__user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,.06);
  background: rgba(0,0,0,.2);
}

.sidebar__user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  overflow: hidden;
  flex-shrink: 0;
}
.sidebar__user-info { display: flex; flex-direction: column; overflow: hidden; }
.sidebar__user-name { font-size: var(--font-size-sm); font-weight: 600; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar__user-role { font-size: var(--font-size-xs); color: #64748b; }

/* Overlay للموبايل */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 850;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: var(--border-radius-sm);
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn--primary  { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn--primary:hover  { background: var(--primary-dark); border-color: var(--primary-dark); }

.btn--success  { background: var(--success); color: #fff; border-color: var(--success); }
.btn--success:hover  { background: #059669; }

.btn--danger   { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn--danger:hover   { background: #dc2626; }

.btn--warning  { background: var(--warning); color: #fff; border-color: var(--warning); }
.btn--warning:hover  { background: #d97706; }

.btn--secondary { background: var(--bg-base); color: var(--text-secondary); border-color: var(--bg-border); }
.btn--secondary:hover { background: var(--bg-border); color: var(--text-primary); }

.btn--outline  { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn--outline:hover  { background: var(--primary); color: #fff; }

.btn--full { width: 100%; }

.btn--sm { padding: 6px 14px; font-size: var(--font-size-xs); }
.btn--lg { padding: 12px 28px; font-size: var(--font-size-md); }

.btn-spinner { margin-right: 4px; }

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 20px; }

.form-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 7px;
}

.form-control {
  display: block;
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1.5px solid var(--bg-border);
  border-radius: var(--border-radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  line-height: 1.5;
}
.form-control:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
.form-control::placeholder { color: var(--text-muted); }
.form-control--error { border-color: var(--danger); }

.form-error { font-size: var(--font-size-xs); color: var(--danger); margin-top: 5px; display: block; }

.form-group--row { display: flex; align-items: center; gap: 12px; }

/* Checkbox مخصص */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  user-select: none;
}
.checkbox-label input { display: none; }
.checkbox-custom {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid var(--bg-border);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}
.checkbox-label input:checked + .checkbox-custom {
  background: var(--primary);
  border-color: var(--primary);
}
.checkbox-label input:checked + .checkbox-custom::after {
  content: '';
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-right: none;
  transform: rotate(-45deg) translate(1px, -1px);
}

/* Input مع أيقونة داخلية */
.input-with-icon { position: relative; }
.input-with-icon .form-control { padding-left: 44px; }
.input-toggle-pass {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 15px;
  padding: 2px;
  transition: color var(--transition);
}
.input-toggle-pass:hover { color: var(--primary); }

/* Select مصغّر */
.select-sm {
  padding: 5px 10px;
  font-size: var(--font-size-xs);
  font-family: var(--font-family);
  border: 1px solid var(--bg-border);
  border-radius: var(--border-radius-sm);
  background: var(--bg-surface);
  color: var(--text-secondary);
  outline: none;
  cursor: pointer;
}

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 16px;
  border-radius: var(--border-radius-sm);
  font-size: var(--font-size-sm);
  font-weight: 500;
  margin-bottom: 20px;
}
.alert--danger  { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert--success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert--warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.alert--info    { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg-surface);
  border-radius: var(--border-radius);
  border: 1px solid var(--bg-border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--bg-border);
}

.card__title {
  font-size: var(--font-size-md);
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card__body { padding: 20px; }

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}

.page-header h1 {
  font-size: var(--font-size-xl);
  font-weight: 900;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-header h1 i { color: var(--primary); }
.page-header__subtitle { font-size: var(--font-size-sm); color: var(--text-muted); margin-top: 4px; }
.page-header__actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ============================================================
   TABLES
   ============================================================ */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--border-radius);
  border: 1px solid var(--bg-border);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

.table thead th {
  background: var(--bg-muted);
  padding: 12px 16px;
  text-align: right;
  font-weight: 700;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--bg-border);
  white-space: nowrap;
}

.table tbody td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--bg-border);
  color: var(--text-primary);
  vertical-align: middle;
}

.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--bg-muted); }

/* ============================================================
   BADGES / STATUS PILLS
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: var(--font-size-xs);
  font-weight: 700;
}
.badge--success { background: #dcfce7; color: #166534; }
.badge--warning { background: #fef9c3; color: #854d0e; }
.badge--danger  { background: #fee2e2; color: #991b1b; }
.badge--info    { background: #dbeafe; color: #1e40af; }
.badge--muted   { background: var(--bg-muted); color: var(--text-muted); }
.badge--purple  { background: #f3e8ff; color: #6b21a8; }

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.15s ease;
}

@keyframes fadeIn { from{opacity:0} to{opacity:1} }

.modal {
  background: var(--bg-surface);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 500px;
  animation: slideUp 0.2s ease;
}

@keyframes slideUp { from{transform:translateY(20px);opacity:0} to{transform:translateY(0);opacity:1} }

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--bg-border);
}
.modal__title { font-size: var(--font-size-lg); font-weight: 700; }
.modal__close { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--text-muted); transition: color var(--transition); }
.modal__close:hover { color: var(--danger); }
.modal__body { padding: 20px; }
.modal__footer { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 20px; border-top: 1px solid var(--bg-border); }

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border-radius: var(--border-radius);
  background: var(--secondary);
  color: #f1f5f9;
  font-size: var(--font-size-sm);
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  min-width: 260px;
  pointer-events: all;
  animation: toastIn 0.3s ease forwards;
}
.toast--success { border-right: 4px solid var(--success); }
.toast--danger  { border-right: 4px solid var(--danger);  }
.toast--warning { border-right: 4px solid var(--warning); }
.toast--info    { border-right: 4px solid var(--info);    }
.toast.toast--out { animation: toastOut 0.3s ease forwards; }

@keyframes toastIn  { from{opacity:0;transform:translateX(-20px)} to{opacity:1;transform:translateX(0)} }
@keyframes toastOut { from{opacity:1;transform:translateX(0)} to{opacity:0;transform:translateX(-20px)} }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px;
  flex-wrap: wrap;
}

.pagination__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--bg-border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.pagination__btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination__btn--active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination__btn:disabled { opacity: .4; cursor: not-allowed; }

/* ============================================================
   APP FOOTER
   ============================================================ */
.app-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--bg-border);
  padding: 12px 32px;
  margin-right: var(--sidebar-width);
  transition: margin-right var(--transition-slow);
}

.app-footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

/* ============================================================
   MISC HELPERS
   ============================================================ */
.link-btn {
  background: none;
  border: none;
  color: var(--primary-light);
  font-size: var(--font-size-xs);
  cursor: pointer;
  transition: color var(--transition);
}
.link-btn:hover { color: var(--primary-dark); }

.empty-state {
  text-align: center;
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  padding: 28px 16px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 28px 0 16px;
}
.section-header h2 {
  font-size: var(--font-size-lg);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}
.section-header h2 i { color: var(--primary); }

.text-left   { text-align: left !important; }
.text-center { text-align: center !important; }
.text-right  { text-align: right !important; }
.text-muted  { color: var(--text-muted) !important; }
.fw-bold     { font-weight: 700 !important; }
.d-none      { display: none !important; }
.d-flex      { display: flex !important; }
.gap-2       { gap: 8px !important; }
.mt-1        { margin-top: 8px !important; }
.mt-2        { margin-top: 16px !important; }
.mb-2        { margin-bottom: 16px !important; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ── تابليت + موبايل (≤ 1280px): sidebar يعمل كـ overlay ── */
@media (max-width: 1280px) {
  /* إخفاء الـ sidebar خارج الشاشة (يمين في RTL) */
  .sidebar {
    transform: translateX(100%);
    z-index: 950;
    box-shadow: none;
  }

  /* فتح الـ sidebar */
  .sidebar--open {
    transform: translateX(0);
    box-shadow: -8px 0 32px rgba(0,0,0,0.35);
  }

  /* إلغاء margin من المحتوى (الـ sidebar يطفو فوقه) */
  .main-content,
  .app-footer { margin-right: 0; }

  /* إظهار زر القائمة */
  .navbar__menu-toggle { display: flex; }

  /* الـ overlay يظهر فقط عند فتح الـ sidebar */
  .sidebar-overlay--visible { display: block; }
}

/* ── تابليت فقط (768px → 1280px): تعديلات إضافية ── */
@media (min-width: 641px) and (max-width: 1280px) {
  .main-content { padding: 24px 24px; }

  /* تحسين حجم الـ sidebar على التابليت */
  .sidebar { width: 280px; }
}

/* ── موبايل (≤ 640px) ── */
@media (max-width: 640px) {
  .main-content { padding: 16px 14px; }
  .page-header  { flex-direction: column; }
  .navbar__name { display: none; }
  .user-info    { display: none; }
  .sidebar      { width: 260px; }
}