/* ==========================================================================
   RESPONSIVE LAYOUT & BREAKPOINTS
   Assurance Systems Grid Spec: Desktop (1280px+), Tablet (768-1279px), Mobile (<767px)
   ========================================================================== */

/* Tablet & Smaller Screens (768px - 1279px) */
@media (max-width: 1279px) {
  .main-content-wrapper {
    padding: var(--margin-mobile) var(--space-lg);
  }

  .app-sidebar {
    width: 68px;
    min-width: 68px;
  }

  .sidebar-brand .brand-text,
  .sidebar-brand .brand-badge,
  .nav-item span,
  .user-info {
    display: none;
  }

  .sidebar-brand {
    justify-content: center;
    padding: 20px 0;
  }

  .nav-item {
    justify-content: center;
    padding: 12px;
  }

  .nav-item.active::before {
    left: 0;
  }

  .sidebar-footer {
    justify-content: center;
    padding: 16px 0;
  }
}

/* Mobile Screens (< 767px) */
@media (max-width: 767px) {
  #app-container {
    flex-direction: column;
  }

  .app-sidebar {
    width: 100%;
    min-width: 100%;
    height: auto;
    position: relative;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .sidebar-brand {
    padding: 0;
    border-bottom: none;
  }

  .sidebar-brand .brand-text {
    display: block;
    font-size: 16px;
  }

  .sidebar-nav {
    flex-direction: row;
    padding: 0;
    gap: 2px;
  }

  .sidebar-footer {
    display: none;
  }

  .main-content-wrapper {
    padding: var(--margin-mobile);
  }

  .view-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .table-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-left,
  .toolbar-right {
    width: 100%;
    flex-wrap: wrap;
  }

  .search-box {
    max-width: 100%;
  }

  .tree-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tree-table {
    min-width: 600px;
  }

  .drawer-panel {
    width: 100%;
  }
}
