/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */

@media (max-width: 1024px) {
  .dashboard-split-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --sidebar-width: 280px;
    --header-height: 64px;
  }

  /* Sidebar off-canvas */
  .app-sidebar {
    transform: translateX(-100%);
    box-shadow: var(--shadow-xl);
  }

  .app-sidebar.show {
    transform: translateX(0);
  }

  .sidebar-overlay.show {
    display: block;
  }

  .app-main {
    margin-left: 0;
  }

  .mobile-toggle {
    display: flex;
  }

  .app-header {
    padding: 0 16px;
  }

  .app-content {
    padding: 16px;
  }

  .dashboard-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .btn {
    flex: 1;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* Mobile Responsive Table to Card layout */
  .table-responsive-cards .table thead {
    display: none;
  }

  .table-responsive-cards .table,
  .table-responsive-cards .table tbody,
  .table-responsive-cards .table tr,
  .table-responsive-cards .table td {
    display: block;
    width: 100%;
  }

  .table-responsive-cards .table tr {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 14px;
    padding: 12px;
    box-shadow: var(--shadow-xs);
  }

  .table-responsive-cards .table td {
    padding: 8px 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #F1F5F9;
    font-size: 0.85rem;
  }

  .table-responsive-cards .table td:last-child {
    border-bottom: none;
    padding-top: 12px;
  }

  .table-responsive-cards .table td::before {
    content: attr(data-label);
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .modal-dialog {
    margin: 10px;
    max-height: 94vh;
  }
}
