/* ============================================================
   BASSMA RESPONSIVE — يغطي كل صفحات البوابة
   ============================================================ */

/* ===== GLOBAL ===== */
* { box-sizing: border-box; }
img { max-width: 100%; }

/* إخفاء زر البرجر افتراضياً (للحاسوب) */
.burger-btn {
    display: none;
}

/* ===== SIDEBAR MOBILE ===== */
@media (max-width: 768px) {
  body { display: block !important; }

  .sidebar {
    position: fixed;
    right: -250px;
    top: 0;
    height: 100vh;
    width: 250px;
    z-index: 999;
    transition: right .3s ease;
  }
  .sidebar.open { right: 0; }
  .main { margin-right: 0 !important; }

  .burger-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border: none;
    background: #1a6b2a;
    border-radius: 8px;
    cursor: pointer;
    color: #fff;
    font-size: 20px;
    flex-shrink: 0;
  }
       

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 998;
  }
  .sidebar-overlay.show { display: block; }

  .content { padding: 14px !important; }

  .topbar { padding: 0 14px !important; height: 56px !important; }
  .topbar-title { font-size: 15px !important; }
  .topbar-title span { display: none; }
  .topbar-actions { gap: 6px !important; }

  .stats-grid { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
  .demandes-row { grid-template-columns: 1fr !important; }
  .panels-grid { grid-template-columns: 1fr !important; }
  .grid-2 { grid-template-columns: 1fr !important; }
  .info-grid { grid-template-columns: 1fr !important; }
  .aide-type-grid { grid-template-columns: 1fr !important; }
  .detail-grid { grid-template-columns: 1fr 1fr !important; }

  .profile-header { flex-direction: column !important; gap: 12px !important; }
  .profile-right { text-align: right !important; }

  .alert-pending { flex-direction: column !important; gap: 10px !important; }
  .btn-pending { width: 100%; text-align: center; }
  .btn-submit { width: 100%; justify-content: center; }
  .form-actions { flex-wrap: wrap; }

  .tbl th, .tbl td { padding: 8px 10px !important; font-size: 12px !important; }
  .filter-tabs { flex-wrap: wrap; }
  .tab { font-size: 12px !important; padding: 6px 14px !important; }
  .stat-row { flex-wrap: wrap; }
  .pagination { flex-wrap: wrap; gap: 4px; }
  .panel-head { flex-wrap: wrap; gap: 6px; }

  .page { padding: 16px 1rem !important; }
  .modal-box { padding: 20px 16px !important; }
  .success-card { padding: 28px 18px !important; }
}

/* ===== INDEX NAVBAR ===== */
@media (max-width: 768px) and (orientation: portrait) {
  .navbar {
    padding: 10px 1rem !important;
    height: auto !important;
    flex-wrap: wrap;
    gap: 8px;
  }
  .navbar-links { display: none; width: 100%; flex-direction: column; gap: 4px; padding-bottom: 10px; }
  .navbar-links.open { display: flex; }
  .navbar-links a { padding: 8px 12px !important; border-radius: 8px; background: rgba(255,255,255,.08); }

  .navbar-toggle {
    display: flex !important;
    align-items: center; justify-content: center;
    width: 38px; height: 38px;
    border: none; background: rgba(255,255,255,.15);
    border-radius: 8px; cursor: pointer; color: #fff; font-size: 20px;
  }

  .hero { padding: 50px 1rem 40px !important; }
  .hero h1 { font-size: 28px !important; }
  .hero h2 { font-size: 16px !important; }
  .hero-header { flex-direction: column !important; align-items: center; text-align: center; gap: 12px; }
  .hero-title-group { align-items: center !important; text-align: center !important; }
  .hero-logo { width: 60px !important; height: 60px !important; }
  .hero-btns { flex-direction: column; align-items: center; }
  .btn-red, .btn-ghost { width: 100%; max-width: 280px; text-align: center; }
  .hero-partners { flex-direction: column; gap: 14px; }
  .partner-box { min-width: unset; width: 100%; }
}

/* ===== TABLET ===== */
@media (min-width: 769px) and (max-width: 1024px) {
  .sidebar { width: 200px; min-width: 200px; }
  .main { margin-right: 200px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .panels-grid { grid-template-columns: 1fr !important; }
  .hero h1 { font-size: 38px !important; }
}

/* ===== SMALL MOBILE ===== */
@media (max-width: 400px) {
  .stats-grid { grid-template-columns: 1fr !important; }
  .detail-grid { grid-template-columns: 1fr !important; }
  .topbar-user span { display: none; }
}

/* ===== PRINT ===== */
@media print {
  .sidebar, .topbar, .burger-btn, .sidebar-overlay { display: none !important; }
  .main { margin-right: 0 !important; }
}
