/* Office unified light theme — aligned with Inventory Manager (faos-common / inventory.html). */
:root {
  --office-bg: #f8fafc;
  --office-surface: #ffffff;
  --office-border: #e2e8f0;
  --office-text: #0f172a;
  --office-muted: #64748b;
  --office-accent: #0d9488;
  --office-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

body.office-unified,
body.atlas-office {
  background: var(--office-bg) !important;
  color: var(--office-text) !important;
}

body.office-unified header,
body.atlas-office header,
body.office-unified .app-header,
body.atlas-office .app-header {
  background: var(--office-surface) !important;
  color: var(--office-text) !important;
  border: 1px solid var(--office-border) !important;
  box-shadow: var(--office-shadow) !important;
}

body.office-unified .card,
body.office-unified .panel,
body.office-unified .glass,
body.office-unified .status-bar,
body.office-unified .status-header,
body.atlas-office .card,
body.atlas-office .panel,
body.atlas-office .glass,
body.atlas-office .status-bar,
body.atlas-office .status-header {
  background: var(--office-surface) !important;
  color: var(--office-text) !important;
  border: 1px solid var(--office-border) !important;
  box-shadow: var(--office-shadow) !important;
}

body.office-unified .muted,
body.office-unified .subtitle,
body.office-unified .status-meta,
body.atlas-office .muted,
body.atlas-office .subtitle,
body.atlas-office .status-meta {
  color: var(--office-muted) !important;
}

body.office-unified input,
body.office-unified select,
body.office-unified textarea,
body.office-unified .search,
body.atlas-office input,
body.atlas-office select,
body.atlas-office textarea,
body.atlas-office .search {
  background: #f8fffc !important;
  color: var(--office-text) !important;
  border: 1px solid rgba(13, 148, 136, 0.35) !important;
  box-shadow: none !important;
}

body.office-unified button,
body.office-unified a.btn,
body.office-unified .btn,
body.atlas-office button,
body.atlas-office a.btn,
body.atlas-office .btn {
  box-shadow: none !important;
}

/* Navigation — light mint + teal edge (same family as Inventory) */
body.office-unified .nav-links a,
body.atlas-office .nav-links a {
  background: #f0fdfa !important;
  color: var(--office-text) !important;
  border: 1px solid rgba(13, 148, 136, 0.35) !important;
}

/* Performance-first: render only visible heavy regions first. */
main > section,
main > div,
.app-main > section,
.app-main > div {
  content-visibility: auto;
  contain-intrinsic-size: 600px;
}

/* Delivery workspace: compact page chrome — never reserve 600px on main>div rows */
body.office-unified main.delivery-page > div,
body.office-unified main.delivery-history-page > div,
body.office-unified .delivery-page-head,
body.office-unified .delivery-page-head .delivery-tabs-row,
body.office-unified .delivery-page-head #status,
body.office-unified #delivery-list-scroll:not(.is-open) {
  content-visibility: visible !important;
  contain-intrinsic-size: 0px !important;
}
body.office-unified #delivery-list-scroll:not(.is-open) {
  height: 0 !important;
  max-height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border-width: 0 !important;
  overflow: hidden !important;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
