.bottom-nav {
  display: none;
}

@media (max-width: 1280px) {
  .app-shell {
    grid-template-columns: 218px minmax(0, 1fr);
  }

  .content-grid.two,
  .pos-layout,
  .accounts-layout,
  .catalog-layout {
    grid-template-columns: 1fr;
  }

  .cart-panel {
    position: static;
  }
}

@media (max-width: 980px) {
  body.sidebar-open {
    overflow: hidden;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(310px, calc(100vw - 48px));
    height: 100vh;
    transform: translateX(-104%);
    transition: transform .18s ease;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 25;
    display: none;
    background: rgba(15, 23, 42, .45);
  }

  body.sidebar-open .sidebar-backdrop {
    display: block;
  }

  .nav-toggle {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: #344054;
  }

  .nav-toggle svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
  }

  .main {
    padding: 14px 14px 92px;
  }

  .legacy-page-hero {
    min-height: 82px;
    padding: 14px;
    border-radius: 12px;
  }

  .legacy-page-hero-icon {
    width: 50px;
    height: 50px;
    flex-basis: 50px;
    border-radius: 12px;
  }

  .legacy-page-hero-icon .legacy-icon,
  .legacy-page-hero-icon img,
  .legacy-page-hero-icon svg {
    width: 28px;
    height: 28px;
  }

  .legacy-page-hero-text strong {
    font-size: 22px;
  }

  .legacy-page-hero-text em {
    font-size: 12px;
  }

  .user-chip {
    display: none;
  }

  .app-menu-button span {
    display: none;
  }

  .metrics-grid,
  .metrics-grid.small,
  .metrics-grid.accounts-metrics,
  .metrics-grid.crud-metrics,
  .quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bottom-nav {
    position: fixed;
    right: 20px;
    bottom: 14px;
    z-index: 35;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: clamp(44px, 12vw, 110px);
    pointer-events: none;
  }

  .bottom-nav .nav-item {
    display: grid;
    place-items: center;
    min-width: 78px;
    border: 0;
    border-radius: 16px;
    background: rgba(255,255,255,.84);
    box-shadow: 0 8px 26px rgba(15, 23, 42, .12);
    color: #111827;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 6px 10px;
    pointer-events: auto;
    font: inherit;
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
  }

  .bottom-nav .nav-item.active {
    color: #0d7bea;
  }

  .bottom-nav .bottom-nav-icon {
    display: block;
    margin-bottom: 2px;
    line-height: 1;
  }

  .bottom-nav img,
  .bottom-nav svg {
    width: 30px;
    height: 30px;
    object-fit: contain;
  }

  .app-menu-dialog {
    padding: 10px;
  }

  .app-menu-card {
    max-height: calc(100vh - 20px);
    padding: 14px;
  }

  .app-menu-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  body {
    font-size: 13px;
  }

  .panel {
    padding: 11px;
  }

  .panel-head {
    flex-direction: column;
  }

  .metrics-grid,
  .metrics-grid.small,
  .metrics-grid.accounts-metrics,
  .metrics-grid.crud-metrics,
  .quick-actions,
  .money-grid,
  .order-action-grid,
  .two-actions {
    grid-template-columns: 1fr;
  }

  .inline-search,
  .order-filter {
    align-items: stretch;
    flex-direction: column;
  }

  .order-filter input,
  .order-filter select,
  .order-filter button,
  .order-filter .primary,
  .order-filter .ghost,
  .inline-search input,
  .inline-search select,
  .inline-search button,
  .inline-search .primary,
  .inline-search .ghost {
    width: 100%;
  }

  .table-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .table-tools input {
    width: 100%;
  }

  .table-count {
    white-space: normal;
  }

  .product-grid,
  .table-card-grid {
    grid-template-columns: 1fr;
  }

  .bar-row {
    grid-template-columns: 1fr;
  }

  .material-row {
    grid-template-columns: 1fr;
  }

  .legacy-home-head {
    align-items: stretch;
    flex-direction: column;
  }

  .legacy-primary-action {
    width: 100%;
  }

  .legacy-feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .app-menu-head {
    align-items: flex-start;
  }

  .app-menu-profile .legacy-home-mark {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }

  .app-menu-primary {
    align-items: center;
    gap: 14px;
    padding: 14px;
  }

  .app-menu-primary .qr-icon {
    width: 66px;
    height: 66px;
    flex-basis: 66px;
  }

  .app-menu-primary .legacy-icon {
    width: 48px;
    height: 48px;
  }

  .app-menu-primary strong {
    font-size: 16px;
  }

  .app-menu-quick-actions {
    min-height: 74px;
    gap: 16px;
  }

  .app-menu-mini-action {
    width: 58px;
    height: 58px;
  }

  .app-menu-mini-action .legacy-icon {
    width: 40px;
    height: 40px;
  }

  .app-menu-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .app-menu-feature {
    min-height: 98px;
  }

  .legacy-feature {
    min-height: 98px;
  }

  .legacy-feature-icon {
    width: 56px;
    height: 56px;
  }

  .legacy-feature-icon .legacy-icon {
    width: 34px;
    height: 34px;
  }

  .bottom-nav {
    right: 10px;
    bottom: 10px;
    gap: clamp(20px, 7vw, 72px);
  }

  .bottom-nav .nav-item {
    min-width: 64px;
    padding: 5px 8px;
    border-radius: 14px;
    font-size: 12px;
  }
}

@media print {
  .sidebar,
  .sidebar-backdrop,
  .bottom-nav,
  .pager,
  .row-actions,
  .quick-actions,
  .table-tools,
  form {
    display: none !important;
  }

  .app-shell {
    display: block;
  }

  .main {
    padding: 0;
  }

  .panel {
    border: 0;
    box-shadow: none;
    page-break-inside: avoid;
  }

  .table-wrap {
    overflow: visible;
  }
}
