/**
 * Go CSS · team
 * 
 * Purpose:
 *   Styles for this dashboard piece.
 * 
 * Dashboard:
 *   Go · App Store / data-view · team
 * 
 * This file:
 *   business/dashboard/team-app/team-app.css
 * 
 * Depends on:
 *   - business/dashboard/shell/shell.html
 *   - scripts/assemble-dashboards.js
 * 
 * Used by:
 *   - scripts/assemble-dashboards.js → business/dashboard/styles.css
 */

.view-info.team-info {
  flex-shrink: 0;
}

.settings-heading-row .team-info {
  margin-top: 0.1rem;
}

@media (max-width: 900px) {
  .app {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
    width: 100%;
    /* 100vw includes scrollbar gutters and can force a horizontal scroller. */
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: hidden;
    min-height: 100vh;
    min-height: 100dvh;
    height: 100dvh;
    max-height: 100dvh;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-sizing: border-box;
  }

  /* Personal (and non-business): reserve space for the bottom tab bar. */
  body:not(.business-account):not(.business-drawer-nav) {
    --portal-nav-h: calc(64px + env(safe-area-inset-bottom, 0px));
    --nav-h: var(--portal-nav-h);
  }

  body:not(.business-account):not(.business-drawer-nav) .app {
    padding-bottom: var(--portal-nav-h);
  }

  /* Shell is viewport-locked; page content scrolls inside .main only. */
  .main {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  html.nav-drawer-lock,
  html.nav-drawer-lock body {
    overflow: hidden;
  }

  /* ── Apps drawer (business + personal) ── */
  body.business-drawer-nav .nav-drawer-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 2.5rem;
    height: 2.5rem;
    margin: 0;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    color: var(--ink);
    box-shadow: 0 1px 2px rgba(18, 18, 18, 0.04);
    cursor: pointer;
  }

  body.business-drawer-nav .nav-drawer-fab {
    display: none;
    position: fixed;
    top: calc(10px + env(safe-area-inset-top, 0px));
    left: 10px;
    z-index: 45;
    width: 2.65rem;
    height: 2.65rem;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--ink);
    box-shadow: 0 8px 24px rgba(18, 18, 18, 0.12);
    cursor: pointer;
  }

  body.business-drawer-nav .app.shop-surface .nav-drawer-fab {
    display: inline-flex;
  }

  body.business-drawer-nav .nav-drawer-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 55;
    border: 0;
    background: rgba(42, 41, 39, 0.34);
    cursor: pointer;
  }

  body.business-drawer-nav .nav-drawer-backdrop.is-open,
  body.business-drawer-nav .app.nav-drawer-open .nav-drawer-backdrop,
  body.business-drawer-nav.nav-drawer-open .nav-drawer-backdrop {
    display: block;
  }

  body.business-drawer-nav .sidebar {
    --sidebar-pad-x: 14px;
    order: 0;
    position: relative;
    top: auto;
    left: auto;
    bottom: auto;
    right: auto;
    z-index: 5;
    width: var(--portal-drawer-width, min(20rem, 86vw));
    max-width: none;
    height: auto;
    max-height: none;
    align-self: stretch;
    overflow-x: hidden;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex-direction: column;
    gap: 6px;
    padding: 16px var(--sidebar-pad-x) calc(16px + env(safe-area-inset-bottom, 0px));
    border-right: 1px solid rgba(18, 18, 18, 0.08) !important;
    border-top: none !important;
    border-bottom: none !important;
    border-top-right-radius: 0;
    background:
      linear-gradient(180deg, #ffffff 0%, #fafafa 48%, #f7f7f8 100%) !important;
    box-shadow: none;
    transform: none;
    transition: none;
    overscroll-behavior: contain;
  }

  body.business-drawer-nav .app.nav-drawer-open .sidebar,
  body.business-drawer-nav.nav-drawer-open .sidebar {
    transform: none;
  }

  body.business-drawer-nav .nav-drawer-backdrop,
  body.business-drawer-nav .nav-drawer-backdrop.is-open,
  body.business-drawer-nav .app.nav-drawer-open .nav-drawer-backdrop,
  body.business-drawer-nav.nav-drawer-open .nav-drawer-backdrop {
    display: none !important;
  }

  body.business-drawer-nav .sidebar-brand,
  body.business-drawer-nav .sidebar-brand.brand-banner {
    display: block !important;
    margin: -16px calc(-1 * var(--sidebar-pad-x)) 8px;
  }

  body.business-drawer-nav .nav-primary {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin: 0;
    padding: 4px 0 8px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  body.business-drawer-nav .nav-primary::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  body.business-drawer-nav .nav-group {
    flex: 0 0 auto;
    min-width: 0;
    width: 100%;
  }

  body.business-drawer-nav .nav-group-children {
    display: none;
  }

  body.business-drawer-nav .nav-group.is-open > .nav-group-children {
    display: flex;
  }

  body.business-drawer-nav .nav-group-parent {
    width: 100%;
    height: auto;
  }

  body.business-drawer-nav .nav-primary .nav-btn {
    flex: 0 0 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 11px;
    text-align: left;
    padding: 9px 10px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    min-width: 0;
    width: 100%;
    position: relative;
    letter-spacing: -0.01em;
    box-shadow: none;
  }

  body.business-drawer-nav .nav-primary .nav-icon {
    width: 2rem;
    height: 2rem;
    background: rgba(18, 18, 18, 0.04);
    border-radius: 10px;
  }

  body.business-drawer-nav .nav-primary .nav-icon svg {
    width: 1.05rem;
    height: 1.05rem;
  }

  body.business-drawer-nav .nav-primary .nav-label {
    display: block;
    flex: 1 1 auto;
    max-width: none;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.business-drawer-nav .nav-primary .nav-badge {
    position: static;
    margin-left: 0;
  }

  body.business-drawer-nav .nav-primary .nav-btn:not(.nav-group-parent) > .nav-badge,
  body.business-drawer-nav .nav-primary .nav-group-parent:not(:has(.nav-app-lock)) > .nav-badge {
    margin-left: auto;
  }

  body.business-drawer-nav .nav-primary .nav-group-parent > .nav-app-lock {
    margin-left: auto;
  }

  body.business-drawer-nav .nav-primary .nav-btn.active {
    background: rgba(18, 18, 18, 0.06) !important;
    color: var(--text) !important;
    box-shadow: none;
  }

  body.business-drawer-nav .nav-primary .nav-btn.active .nav-icon {
    background: rgba(18, 18, 18, 0.08);
    color: currentColor;
  }

  body.business-drawer-nav .nav-primary .nav-group-parent.is-section-active {
    background: rgba(18, 18, 18, 0.045) !important;
    color: var(--text) !important;
    box-shadow: none;
  }

  body.business-drawer-nav .nav-primary .nav-group-parent.is-section-active .nav-icon {
    background: rgba(18, 18, 18, 0.07);
    color: currentColor;
  }

  body.business-drawer-nav .nav-primary .nav-btn.active .nav-badge {
    background: var(--primary);
    color: #fff;
  }

  body.business-drawer-nav .nav-primary .nav-btn:hover:not(.active) {
    background: rgba(42, 41, 39, 0.03) !important;
  }

  body.business-drawer-nav .nav-primary .nav-btn:hover:not(.active) .nav-icon {
    background: rgba(18, 18, 18, 0.06);
  }

  body.business-drawer-nav .nav-more-trigger {
    display: none !important;
  }

  body.business-drawer-nav .portal-more,
  body.business-drawer-nav .portal-more-panel {
    display: contents !important;
  }

  body.business-drawer-nav .portal-more-backdrop,
  body.business-drawer-nav .portal-more-handle,
  body.business-drawer-nav .portal-more-apps {
    display: none !important;
  }

  body.business-drawer-nav #nav-applications .nav-label-full,
  body.business-drawer-nav #nav-deliveries .nav-label-full,
  body.business-drawer-nav #nav-integrations .nav-label-full,
  body.business-drawer-nav #nav-sell-products .nav-label-full,
  body.business-drawer-nav #nav-sell-services .nav-label-full {
    display: inline;
  }

  body.business-drawer-nav #nav-applications .nav-label-short,
  body.business-drawer-nav #nav-deliveries .nav-label-short,
  body.business-drawer-nav #nav-integrations .nav-label-short,
  body.business-drawer-nav #nav-sell-products .nav-label-short,
  body.business-drawer-nav #nav-sell-services .nav-label-short {
    display: none;
  }

  body.business-drawer-nav .nav-primary > .nav-mobile-overflow {
    display: flex !important;
  }

  body.business-drawer-nav .nav-secondary {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 8px 0 0;
    padding: 10px 0 0;
    border-top: 1px solid rgba(18, 18, 18, 0.06);
  }

  body.business-drawer-nav .logout-btn {
    margin-top: 4px;
    width: 100%;
  }

  /* ── Personal / driver-style: fixed bottom tab bar ── */
  body:not(.business-account):not(.business-drawer-nav) .nav-drawer-toggle,
  body:not(.business-account):not(.business-drawer-nav) .nav-drawer-fab,
  body:not(.business-account):not(.business-drawer-nav) .nav-drawer-backdrop {
    display: none !important;
  }

  body:not(.business-account):not(.business-drawer-nav) .sidebar {
    --sidebar-pad-x: 0;
    order: 2;
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    width: 100%;
    max-width: 100%;
    height: var(--portal-nav-h, calc(64px + env(safe-area-inset-bottom, 0px)));
    max-height: var(--portal-nav-h, calc(64px + env(safe-area-inset-bottom, 0px)));
    align-self: auto;
    overflow: hidden;
    flex-direction: column;
    gap: 0;
    padding: 0 0 env(safe-area-inset-bottom, 0px);
    border-right: none !important;
    border-bottom: none !important;
    border-top: 1px solid var(--border) !important;
    border-top-right-radius: 0;
    background: #fff !important;
    box-shadow: 0 -8px 24px rgba(42, 41, 39, 0.06);
    backdrop-filter: none;
    transform: none !important;
    transition: none !important;
    inset-inline: 0;
  }

  body:not(.business-account):not(.business-drawer-nav) .sidebar-brand,
  body:not(.business-account):not(.business-drawer-nav) .sidebar-brand.brand-banner {
    display: none !important;
  }

  body:not(.business-account):not(.business-drawer-nav) .nav-primary {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    margin: 0;
    padding: 0;
    flex: 0 0 auto;
    min-height: 64px;
    overflow: visible;
  }

  /* Personal bottom bar shop tools (Home/All/Search/Cart) — always available. */
  body:not(.business-account):not(.business-drawer-nav) .nav-primary > .nav-shop-tool {
    display: none;
  }

  body.personal-account:not(.business-drawer-nav) .nav-primary > .nav-shop-tool:not(.hidden) {
    display: flex;
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    max-width: none;
    padding-inline: 4px;
  }

  /*
   * Personal mobile bottom bar order:
   * Home → All → Search → Cart → Trip → Account (far right).
   */
  body.personal-account:not(.business-drawer-nav) #nav-shop-home-btn {
    order: 0;
  }

  body.personal-account:not(.business-drawer-nav) #nav-shop-all-btn {
    order: 1;
  }

  body.personal-account:not(.business-drawer-nav) #nav-shop-search-btn {
    order: 2;
  }

  body.personal-account:not(.business-drawer-nav) #nav-shop-cart-btn {
    order: 3;
  }

  body.personal-account:not(.business-drawer-nav) #nav-create:not(.nav-mobile-overflow) {
    order: 4;
  }

  body.personal-account:not(.business-drawer-nav) #nav-shop-home-btn.is-active,
  body.personal-account:not(.business-drawer-nav) #nav-shop-all-btn.is-active,
  body.personal-account:not(.business-drawer-nav) #nav-shop-search-btn.is-active {
    color: var(--text) !important;
    box-shadow: inset 0 -2px 0 var(--primary);
  }

  body:not(.business-account):not(.business-drawer-nav) .nav-group {
    flex: 1 1 0;
    min-width: 0;
  }

  body:not(.business-account):not(.business-drawer-nav) .nav-group-children {
    display: none !important;
  }

  body:not(.business-account):not(.business-drawer-nav) .nav-group-parent {
    width: 100%;
    height: 100%;
  }

  body:not(.business-account):not(.business-drawer-nav) .nav-primary .nav-btn {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-align: center;
    padding: 8px 4px;
    border-radius: 0;
    font-size: 11px;
    font-weight: 650;
    line-height: 1.2;
    white-space: nowrap;
    min-width: 0;
    width: auto;
    position: relative;
    letter-spacing: 0;
    box-shadow: none;
  }

  body:not(.business-account):not(.business-drawer-nav) .nav-primary .nav-icon {
    width: 1.35rem;
    height: 1.35rem;
    background: transparent;
    border-radius: 0;
  }

  body:not(.business-account):not(.business-drawer-nav) .nav-primary .nav-icon svg {
    width: 100%;
    height: 100%;
  }

  body:not(.business-account):not(.business-drawer-nav) .nav-primary .nav-label {
    display: block;
    flex: none;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body:not(.business-account):not(.business-drawer-nav) .nav-primary .nav-badge {
    position: absolute;
    top: 6px;
    right: max(6px, calc(50% - 22px));
    margin-left: 0;
    min-width: 1.1rem;
    height: 1.1rem;
    font-size: 0.62rem;
  }

  body:not(.business-account):not(.business-drawer-nav) .nav-primary .nav-btn.active {
    background: transparent !important;
    color: var(--text) !important;
    box-shadow: inset 0 -2px 0 var(--primary);
  }

  body:not(.business-account):not(.business-drawer-nav) .nav-primary .nav-btn.active .nav-icon {
    background: transparent;
    color: currentColor;
  }

  body:not(.business-account):not(.business-drawer-nav) .nav-primary .nav-group-parent.is-section-active {
    background: transparent !important;
    color: var(--text) !important;
    box-shadow: inset 0 -2px 0 var(--primary);
  }

  body:not(.business-account):not(.business-drawer-nav) .nav-primary .nav-group-parent.is-section-active .nav-icon {
    background: transparent;
    color: currentColor;
  }

  body:not(.business-account):not(.business-drawer-nav) .nav-primary .nav-btn.active .nav-badge {
    background: var(--primary);
    color: #fff;
  }

  body:not(.business-account):not(.business-drawer-nav) .nav-primary .nav-btn:hover:not(.active) {
    background: rgba(42, 41, 39, 0.03) !important;
  }

  body:not(.business-account):not(.business-drawer-nav) .nav-primary .nav-btn:hover:not(.active) .nav-icon {
    background: transparent;
  }

  body:not(.business-account):not(.business-drawer-nav) .nav-more-trigger {
    display: flex;
  }

  /* Personal mobile: Account stays on the far right of the bottom bar. */
  body:not(.business-account):not(.business-drawer-nav) .nav-primary > .nav-more-trigger {
    order: 99;
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    max-width: none;
    margin-left: 0;
    padding-inline: 4px;
  }

  body.personal-account:not(.business-drawer-nav) .nav-primary > .nav-more-trigger .nav-badge {
    right: 10px;
  }

  body:not(.business-account):not(.business-drawer-nav) #nav-applications .nav-label-full,
  body:not(.business-account):not(.business-drawer-nav) #nav-deliveries .nav-label-full,
  body:not(.business-account):not(.business-drawer-nav) #nav-integrations .nav-label-full,
  body:not(.business-account):not(.business-drawer-nav) #nav-sell-products .nav-label-full,
  body:not(.business-account):not(.business-drawer-nav) #nav-sell-services .nav-label-full {
    display: none;
  }

  body:not(.business-account):not(.business-drawer-nav) #nav-applications .nav-label-short,
  body:not(.business-account):not(.business-drawer-nav) #nav-deliveries .nav-label-short,
  body:not(.business-account):not(.business-drawer-nav) #nav-integrations .nav-label-short,
  body:not(.business-account):not(.business-drawer-nav) #nav-sell-products .nav-label-short,
  body:not(.business-account):not(.business-drawer-nav) #nav-sell-services .nav-label-short {
    display: inline;
  }

  body:not(.business-account):not(.business-drawer-nav) .nav-more-trigger.is-active {
    color: var(--text) !important;
    box-shadow: inset 0 -2px 0 var(--primary);
  }

  body:not(.business-account):not(.business-drawer-nav) .nav-primary > .nav-mobile-overflow {
    display: none !important;
  }

  body:not(.business-account):not(.business-drawer-nav) .portal-more {
    display: none;
  }

  body:not(.business-account):not(.business-drawer-nav) .portal-more.is-open {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 50;
  }

  body:not(.business-account):not(.business-drawer-nav) .portal-more-backdrop {
    display: block;
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(42, 41, 39, 0.28);
    cursor: pointer;
  }

  /*
   * Personal Account sheet: one list rhythm end-to-end.
   * Avoid mixed 12px panel / 6px row / 4px logout gaps and footer margin-top:auto
   * which made some rows look farther apart than others.
   */
  body:not(.business-account):not(.business-drawer-nav) .portal-more-panel {
    --portal-more-list-gap: 8px;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    flex: none;
    gap: var(--portal-more-list-gap);
    max-height: min(78vh, 640px);
    overflow: auto;
    padding: 10px 16px calc(18px + env(safe-area-inset-bottom, 0px));
    border-radius: 22px 22px 0 0;
    background: #fff;
    border: 1px solid var(--border);
    border-bottom: none;
    box-shadow: 0 -12px 40px rgba(42, 41, 39, 0.12);
    animation: portalMoreIn 220ms ease;
  }

  body:not(.business-account):not(.business-drawer-nav) .portal-more-handle {
    display: block;
    width: 40px;
    height: 4px;
    margin: 2px auto 0;
    border-radius: 999px;
    background: var(--cream-soft);
  }

  body:not(.business-account):not(.business-drawer-nav) .portal-more-panel .portal-sidebar-footer {
    margin-top: 0;
    gap: var(--portal-more-list-gap);
  }

  body:not(.business-account):not(.business-drawer-nav) .portal-more-panel .account-strip {
    margin: 0 !important;
    padding: 14px !important;
    border-radius: 14px !important;
    box-shadow: none;
    backdrop-filter: none;
  }

  body:not(.business-account):not(.business-drawer-nav) .portal-more-apps {
    display: flex;
    flex-direction: column;
    gap: var(--portal-more-list-gap);
    margin: 0;
    padding: 0;
  }

  body:not(.business-account):not(.business-drawer-nav) .portal-more-apps.hidden,
  body:not(.business-account):not(.business-drawer-nav) .portal-more-apps:empty {
    display: none;
  }

  body:not(.business-account):not(.business-drawer-nav) .portal-more-apps-label {
    margin: 0;
    padding: 0 2px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
  }

  body:not(.business-account):not(.business-drawer-nav) .portal-more-apps .nav-btn,
  body:not(.business-account):not(.business-drawer-nav) .nav-secondary .nav-btn,
  body:not(.business-account):not(.business-drawer-nav) .portal-more-panel .logout-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 11px;
    width: 100%;
    text-align: left;
    padding: 14px 14px;
    border-radius: 14px;
    background: var(--panel);
    border: 1px solid var(--border);
    box-shadow: none;
    color: var(--text) !important;
  }

  body:not(.business-account):not(.business-drawer-nav) .portal-more-apps .nav-label,
  body:not(.business-account):not(.business-drawer-nav) .nav-secondary .nav-label {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body:not(.business-account):not(.business-drawer-nav) .portal-more-apps .nav-btn.active,
  body:not(.business-account):not(.business-drawer-nav) .nav-secondary .nav-btn.active {
    background: var(--ink) !important;
    color: #fff !important;
  }

  body:not(.business-account):not(.business-drawer-nav) .nav-secondary {
    display: flex;
    flex-direction: column;
    gap: var(--portal-more-list-gap);
    margin: 0;
    padding: 0;
    border-top: none;
  }

  body:not(.business-account):not(.business-drawer-nav) .portal-more-apps .nav-icon,
  body:not(.business-account):not(.business-drawer-nav) .nav-secondary .nav-icon,
  body:not(.business-account):not(.business-drawer-nav) .portal-more-panel .logout-btn .nav-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 9px;
    background: rgba(18, 18, 18, 0.04);
  }

  body:not(.business-account):not(.business-drawer-nav) .portal-more-apps .nav-icon svg,
  body:not(.business-account):not(.business-drawer-nav) .nav-secondary .nav-icon svg,
  body:not(.business-account):not(.business-drawer-nav) .portal-more-panel .logout-btn .nav-icon svg {
    width: 1.05rem;
    height: 1.05rem;
  }

  body:not(.business-account):not(.business-drawer-nav) .portal-more-apps .nav-btn.active .nav-icon,
  body:not(.business-account):not(.business-drawer-nav) .nav-secondary .nav-btn.active .nav-icon {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
  }

  body:not(.business-account):not(.business-drawer-nav) .portal-more-apps .nav-badge {
    margin-left: auto;
  }

  body:not(.business-account):not(.business-drawer-nav) .portal-more-panel .logout-btn {
    margin-top: 0;
    width: 100%;
  }

  /* Shop already has its own browse/menu chrome — drop the portal Shop header on phones. */
  .app.shop-surface .topbar {
    display: none !important;
  }

  .main {
    order: 1;
    grid-column: auto;
    width: 100%;
    max-width: 100%;
    padding: 14px 12px 28px;
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 0;
    flex: 1 1 auto;
  }

  /*
   * Shop phone layout: no horizontal .main padding so storefront banners can
   * sit true edge-to-edge. Content chrome is padded individually below.
   */
  .app.shop-surface .main {
    --shop-content-pad-x: 10px;
    padding: 10px 0 24px;
  }

  body.business-account .app.shop-surface .main {
    padding-top: calc(10px + 2.8rem);
  }

  /* Margin (not padding) so later chrome rules that set padding: 8px keep the gutter. */
  .app.shop-surface .shop-browse > .shop-toolbar,
  .app.shop-surface .shop-browse > .shop-location-bar,
  .app.shop-surface .shop-browse > .shop-popular,
  .app.shop-surface .shop-browse > .shop-all-stores-bar,
  .app.shop-surface .shop-browse > #shop-assistant,
  .app.shop-surface .shop-browse > #catalogue-list,
  .app.shop-surface .shop-menu {
    margin-left: var(--shop-content-pad-x);
    margin-right: var(--shop-content-pad-x);
  }

  .app.shop-surface .shop-type-collections > .shop-collection-row {
    margin-left: var(--shop-content-pad-x);
    margin-right: var(--shop-content-pad-x);
  }

  /* Storefront hero + mid-feed ads: full screen width, square corners. */
  .app.shop-surface .shop-browse-banner,
  .app.shop-surface .shop-browse-inline-banner.shop-browse-banner {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    border-radius: 0;
  }

  .auth-card,
  .login-card {
    margin-bottom: 12px;
  }

  body.business-account .topbar {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
  }

  /* Drawer chrome: keep headings left so the menu button sits cleanly. */
  body.portal-app.business-drawer-nav .topbar,
  body.business-account .topbar,
  body.personal-account .topbar {
    align-items: center;
  }

  body.portal-app.business-drawer-nav .topbar-heading,
  body.business-account .topbar-heading,
  body.personal-account .topbar-heading {
    justify-content: flex-start;
    width: auto;
    text-align: left;
    gap: 10px;
  }

  body:not(.business-account):not(.business-drawer-nav) .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .portal-app.shop-surface .topbar-heading,
  .portal-app .app.shop-surface .topbar-heading,
  body.personal-account.shop-surface .topbar-heading,
  body.personal-account .app.shop-surface .topbar-heading {
    justify-content: flex-start;
    text-align: left;
    width: auto;
  }

  .account-type-tabs .account-type-btn,
  .auth-tabs .tab-btn,
  .catalogue-section-tab,
  .catalogue-app-tab,
  .catalogue-app-tab-copy {
    text-align: center;
  }

  .catalogue-app-tab {
    justify-content: center;
  }

  .catalogue-app-tab-copy {
    align-items: center;
  }

  .team-role-btn.account-type-btn {
    text-align: center;
    justify-content: center;
    align-items: center;
  }

  .topbar h2 {
    font-size: 1.35rem;
  }

  .topbar .secondary-btn,
  .primary-btn,
  .secondary-btn {
    width: 100%;
  }

  /* Keep shop chrome compact — don't stretch toolbar controls full-width. */
  .shop-storefront .shop-toolbar .secondary-btn,
  .shop-storefront .shop-toolbar .primary-btn,
  .shop-storefront .shop-toolbar .shop-back-btn,
  .shop-storefront .shop-toolbar .shop-cart-btn,
  .shop-storefront .shop-toolbar .shop-layout-btn {
    width: auto;
  }

  .panel-form,
  .info-box,
  .table-wrap {
    max-width: 100%;
    width: 100%;
    padding: 16px;
    box-sizing: border-box;
  }

  .integrations-keys-header {
    flex-direction: column;
    align-items: stretch;
  }

  .integrations-keys-card .table-wrap {
    padding: 0;
    width: 100%;
  }

  .inline-fields {
    grid-template-columns: 1fr;
  }

  .table-wrap {
    -webkit-overflow-scrolling: touch;
    overflow-x: hidden;
    max-width: 100%;
  }

  .responsive-table,
  .portal-app .responsive-table {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100%;
  }

  .portal-app .responsive-table thead {
    display: none;
  }

  .portal-app .responsive-table tbody,
  .portal-app .responsive-table tr,
  .portal-app .responsive-table td {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .portal-app .responsive-table tr {
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--panel);
  }

  .portal-app .responsive-table td {
    display: grid;
    grid-template-columns: minmax(72px, 32%) minmax(0, 1fr);
    gap: 8px 10px;
    align-items: start;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .portal-app .responsive-table td::before {
    content: attr(data-label);
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--muted);
  }

  .portal-app .responsive-table td:last-child {
    border-bottom: 0;
  }

  .portal-app .responsive-table tr.empty-row td,
  .portal-app .responsive-table tr.empty-row td[colspan] {
    display: block;
    width: 100%;
    max-width: 100%;
    grid-template-columns: none;
    text-align: left;
    color: var(--muted);
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    line-height: 1.45;
    padding: 0.35rem 0;
    border-bottom: 0;
  }

  .portal-app .responsive-table tr.empty-row td::before {
    content: none;
    display: none;
  }

  .portal-app .delivery-map,
  .portal-app .delivery-map iframe,
  .portal-app .tracking-content,
  .portal-app .route-cell,
  .portal-app .tracking-cell {
    max-width: 100%;
    min-width: 0 !important;
    overflow: hidden;
  }

  .portal-app .delivery-map iframe {
    width: 100% !important;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .modal-actions .primary-btn,
  .modal-actions .secondary-btn {
    width: 100%;
  }

  body:not(.business-account) .shop-floating-cart {
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }

  body.business-account .shop-floating-cart {
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  }

  /* .app already reserves bottom-nav height — only leave a small cart clearance. */
  body:not(.business-account) .shop-storefront {
    padding-bottom: 28px;
  }

  body.business-account .shop-storefront {
    padding-bottom: 28px;
  }

  body:not(.business-account) .toast {
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }

  body.business-account .toast {
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  }

  /*
   * Personal tablet landscape inside the legacy ≤900 shell:
   * drop the phone bottom nav so the top ribbon can own navigation.
   * Tablet portrait keeps the mobile bottom nav (same as phone).
   */
  @media (min-width: 701px) and (orientation: landscape) {
    body.personal-account:not(.business-drawer-nav) {
      --portal-nav-h: 0px;
      --nav-h: 0px;
    }

    body.personal-account:not(.business-drawer-nav) .app {
      padding-bottom: 0;
    }

    body.personal-account:not(.business-drawer-nav) #portal-sidebar,
    body.personal-account:not(.business-drawer-nav) .sidebar {
      display: none !important;
    }

    body.personal-account:not(.business-drawer-nav) .personal-mobile-heading {
      display: none !important;
    }

    body.personal-account:not(.business-drawer-nav) .shop-floating-cart,
    body.personal-account:not(.business-drawer-nav) .toast {
      bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    }

    body.personal-account:not(.business-drawer-nav) .shop-storefront {
      padding-bottom: 28px;
    }
  }
}

/* Shop team settings — cleaner mirror of admin Team access (isolated team-* namespace) */
.team-board.settings-card {
  padding: 16px;
}

.team-section-heading .team-heading-row,
.team-field-label-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.team-section-heading .team-heading-row h3 {
  margin: 0;
}

.team-field-label-row .team-role-label,
.team-field-label-row .team-permission-group-title {
  margin: 0;
}

.team-info {
  position: relative;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(18, 18, 18, 0.16);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 750;
  line-height: 1;
  cursor: help;
  z-index: 2;
}

.team-info:hover,
.team-info:focus-visible,
.team-info.is-open {
  color: var(--ink);
  border-color: rgba(18, 18, 18, 0.28);
  outline: none;
}

.team-info-tooltip {
  position: fixed;
  z-index: 10060;
  max-width: min(18rem, calc(100vw - 1.25rem));
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #121212;
  color: #fff;
  font-family: var(--font-brand, inherit);
  font-size: 0.75rem;
  font-weight: 550;
  line-height: 1.4;
  text-align: left;
  box-shadow: 0 12px 28px rgba(18, 18, 18, 0.28);
  pointer-events: none;
}

.team-info-tooltip[hidden] {
  display: none !important;
}

.team-name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.team-role-field,
.team-permissions-panel {
  width: 100%;
}

.team-counter-branches-panel {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(18, 18, 18, 0.08);
}

.team-counter-branches-hint {
  margin: 0;
  font-size: 0.88rem;
}

.team-counter-branches-empty {
  margin: 0;
}

.team-role-field {
  display: grid;
  gap: 0.4rem;
  margin-top: 0;
}

.team-role-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
}

.team-role-picker.account-type-tabs {
  margin: 0;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.team-role-btn.account-type-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  min-height: 36px !important;
  padding: 0.4rem 0.6rem !important;
  font-size: 0.84rem !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  line-height: 1.2 !important;
  transform: none !important;
}

.team-role-btn.account-type-btn.is-disabled,
.team-role-btn.account-type-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none !important;
}

.team-role-hint {
  margin: 0;
  font-size: 0.74rem;
  line-height: 1.35;
  color: var(--muted);
}

.team-permissions-panel {
  display: grid;
  gap: 0.45rem;
}

.team-permissions-groups {
  display: grid;
  gap: 0.7rem;
}

.team-permission-group {
  display: grid;
  gap: 0.55rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--mist, #f5f4f2) 55%, #fff);
}

.team-permission-group-head {
  display: grid;
  gap: 0;
}

.team-permission-group-title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.team-permission-group-hint {
  display: none;
}

.team-permission-group-note {
  margin: 0;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  background: rgba(18, 18, 18, 0.04);
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--muted);
}

.team-permissions-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
}

.team-permission-chip {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  margin: 0 !important;
  padding: 0.45rem 0.55rem;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--panel);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink);
}

.team-permission-chip:has(input:checked) {
  border-color: rgba(18, 18, 18, 0.24);
  background: rgba(18, 18, 18, 0.045);
  box-shadow: none;
}

.team-permission-chip input {
  margin: 0.12rem 0 0 !important;
  margin-bottom: 0 !important;
  padding: 0 !important;
  width: auto;
  min-height: auto;
  accent-color: var(--ink);
}

.team-permission-chip span {
  line-height: 1.25;
  display: grid;
  gap: 0.08rem;
  min-width: 0;
}

.team-permission-chip strong {
  font-size: inherit;
  font-weight: 600;
  color: var(--ink);
}

.team-permission-chip small {
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--muted);
}

@media (max-width: 720px) {
  .team-permissions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.team-shell {
  display: grid;
  gap: 18px;
  width: 100%;
  max-width: 760px;
  min-width: 0;
  margin-inline: auto;
}

.team-shell .settings-card {
  max-width: none;
}

.team-app-access-requests {
  display: grid;
  gap: 0.55rem;
  margin: 0 0 1rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--border, #d6d3d1);
  border-radius: 14px;
  background: #fff;
}

.team-app-access-title {
  margin: 0;
  font-size: 0.95rem;
}

.team-app-access-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.team-app-access-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(166, 116, 47, 0.12);
}

.team-app-access-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.team-shell {
  display: grid;
  gap: 1rem;
}

.team-shell .section-heading {
  margin: 0 0 12px;
}

.team-shell .section-heading h3 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--ink, var(--text));
}

.team-shell .section-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.team-granted-apps-panel {
  margin-top: 0.85rem;
}

.team-granted-apps-hint {
  margin: 0.15rem 0 0.45rem;
}

.team-granted-apps-grid {
  margin-top: 0.25rem;
}

@media (max-width: 1024px) {
  /* Hide the top ribbon banner for business accounts. */
  body.business-account #portal-top-ribbons {
    display: none !important;
  }

  /* Top heading in the banner font. */
  /* In-flow page heading (not a fixed ribbon) — sits on the same level as content. */
  body.business-account .business-mobile-heading {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.5rem;
    margin: 0 0 0.6rem;
    padding: 0;
    background: transparent;
    border: 0;
  }

  body.business-account .business-mobile-heading-text {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.18rem;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: #121212;
  }

  body.business-account .business-mobile-heading .logo-go {
    font-style: normal;
    font-weight: 600;
    opacity: 0.72;
    letter-spacing: -0.02em;
  }

  /* One column by default; immersive apps keep the secondary rail. */
  body.business-account.business-app-open:not(.standalone-app):not(.business-app-fullscreen) .business-workspace {
    display: block;
    grid-template-columns: none;
    gap: 0;
  }

  body.business-account:not(.standalone-app):not(.business-app-fullscreen) #business-app-rail,
  body.business-account.business-app-open:not(.standalone-app):not(.business-app-fullscreen) .business-app-rail,
  body.business-account.business-app-open:not(.standalone-app):not(.business-app-fullscreen) .business-app-rail:not(.hidden) {
    display: none !important;
  }

  body.business-account:not(.standalone-app) .business-tab-ask {
    --tab-ask-bottom-gap: calc(72px + env(safe-area-inset-bottom, 0px));
  }

  /* Section title row: plain heading, not a card under the tabs. */
  body.business-account:not(.standalone-app) .topbar {
    background: transparent;
    background-image: none;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  /* Mode / section tab strips: keep the buttons, drop the underlying card. */
  body.business-account:not(.standalone-app) .account-type-tabs,
  body.business-account:not(.standalone-app) .marketplace-order-tabs,
  body.business-account:not(.standalone-app) .just-adverts-tabs,
  body.business-account:not(.standalone-app) .team-role-picker.account-type-tabs {
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
  }

  /* Section-drawer toggle on the same row as the tab heading (closed + open). */
  body.business-account .business-mobile-drawer-toggle {
    position: static;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    margin: 0;
    padding: 0;
    appearance: none;
    border: 1px solid rgba(18, 18, 18, 0.12);
    border-radius: 12px;
    background: #fff;
    color: #121212;
    cursor: pointer;
  }

  body.business-account .business-mobile-drawer-toggle[hidden] {
    display: none;
  }

  body.business-account .business-mobile-drawer-toggle svg {
    width: 22px;
    height: 22px;
  }

  /* Reserve room for the bottom nav (heading is now in-flow, no top offset). */
  body.business-account {
    --business-mobile-nav-h: calc(64px + env(safe-area-inset-bottom, 0px));
    --business-chat-nav-gap: 8px;
  }

  body.business-account .main {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }

  body.business-account .app {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }


  /* Bottom nav: Home, App Store, Account. Subtabs open in an Account-style sheet. */
  body.business-account .business-mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 55;
    align-items: stretch;
    justify-content: space-between;
    gap: 0.25rem;
    padding: 0.4rem 0.5rem calc(0.4rem + env(safe-area-inset-bottom, 0px));
    background: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-top: 1px solid #e4e4e7;
  }

  body.business-account .business-mobile-nav-btn {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    appearance: none;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 0.3rem 0.35rem;
    border-radius: 12px;
    color: #4b4b4b;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.68rem;
    transition: background 140ms ease, color 140ms ease;
  }

  body.business-account .business-mobile-nav-label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.business-account .business-mobile-nav-icon svg {
    width: 24px;
    height: 24px;
  }

  body.business-account .business-mobile-nav-btn.is-open,
  body.business-account .business-mobile-nav-btn:active {
    background: rgba(18, 18, 18, 0.08);
  }

  body.business-account .business-mobile-nav-btn.is-active {
    color: #121212;
    background: rgba(18, 18, 18, 0.08);
  }

  /* Section subtabs now live in the Account-style sheet on phone chrome. */
  body.business-account:not(.standalone-app) #business-app-rail {
    display: none !important;
  }
}

/* Business dashboard: solid surfaces, no frosted glass. Tab strips have no
 * underlying card — buttons sit on the page background (mobile + desktop). */
body.business-account:not(.standalone-app) .account-type-tabs,
body.business-account:not(.standalone-app) .marketplace-order-tabs,
body.business-account:not(.standalone-app) .just-adverts-tabs,
body.business-account:not(.standalone-app) .team-role-picker.account-type-tabs,
body.portal-app.business-account .account-type-tabs,
body.portal-app.business-account .marketplace-order-tabs {
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
}
