/* Responsive Adjustments - Manzoor Diagnostics */

@media (max-width: 1024px) {
  :root {
    --sidebar-width: 240px;
  }
}

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

  .sidebar {
    transform: translateX(-100%);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.6);
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .main-wrapper {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
  }

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

  .mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 24px;
    margin-right: 12px;
  }

  .page-title-section h1 {
    font-size: 18px;
  }

  .header-right {
    gap: 12px;
  }

  .current-date, .system-status {
    display: none; /* Hide date/status text on small phones to save space */
  }

  .content-body {
    padding: 16px;
  }

  /* Table to Card Conversions on Mobile */
  .table-responsive-container {
    border: none;
    background: transparent;
    box-shadow: none;
  }

  .table-container {
    border: none;
    background: transparent;
    box-shadow: none;
  }

  .table, .table thead, .table tbody, .table th, .table td, .table tr {
    display: block;
  }

  .table thead {
    display: none; /* Hide standard column headers */
  }

  .table tbody tr {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
    padding: 16px;
    box-shadow: var(--shadow);
  }

  .table td {
    padding: 8px 0;
    border-bottom: 1px solid rgba(22, 38, 63, 0.5);
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: right;
    font-size: 13px;
  }

  .table td::before {
    content: attr(data-label);
    float: left;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    text-align: left;
  }

  .table td:last-child {
    border-bottom: none;
    padding-top: 12px;
    justify-content: flex-end;
    gap: 8px;
  }

  .table td:last-child::before {
    display: none;
  }

  /* Filter bar styling adjustments */
  .table-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box {
    max-width: 100%;
  }

  .filter-pills {
    overflow-x: auto;
    padding-bottom: 4px;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  /* Form & Page flow layouts */
  .workstation-layout {
    grid-template-columns: 1fr !important;
  }

  .sticky-footer {
    position: relative;
    box-shadow: none;
    margin-top: 16px;
    padding: 16px 0;
    flex-direction: column;
    gap: 12px;
    background: transparent;
    border-top: none;
  }

  .sticky-footer button, .sticky-footer a {
    width: 100%;
  }

  /* Modal responsive sizing */
  .modal-container {
    width: calc(100% - 32px);
    max-height: 90vh;
  }
  
  .drawer-container {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .brand-name {
    font-size: 16px;
  }
  
  .brand-tagline {
    font-size: 8px;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }
}
