html.lifecycle-embedded body { min-width: 0; background: var(--p-canvas, #eef3f9); }
html.lifecycle-embedded .app-shell { display: block; min-height: 100vh; }
/* The lifecycle shell embeds this page inside an iframe. Keep only the
   inventory workspace visible so the nested banner/sidebar cannot shrink the
   actual report into a tiny viewport. */
html.lifecycle-embedded .p-banner,
html.lifecycle-embedded .p-crumbbar,
html.lifecycle-embedded .p-side,
html.lifecycle-embedded .p-rail { display: none !important; }
html.lifecycle-embedded .p-shell { display: block; min-height: 0; }
html.lifecycle-embedded .main { width: 100%; max-width: none; min-width: 0; padding: 0 !important; }
html.lifecycle-embedded .main > .topbar { display: none; }
html.lifecycle-embedded .main > .content { width: 100%; max-width: none; padding: 14px 16px 30px; }
html.lifecycle-embedded.inventory-pending .app-shell,
html.lifecycle-embedded .app-shell[hidden],
html.lifecycle-embedded.inventory-pending .modal,
html.lifecycle-embedded #loginScreen,
html.lifecycle-embedded .side-nav .brand,
html.lifecycle-embedded .side-note,
html.lifecycle-embedded .topbar .eyebrow,
html.lifecycle-embedded #currentUserChip,
html.lifecycle-embedded #logoutBtn,
html.lifecycle-embedded #cloudConnectBtn,
html.lifecycle-embedded #seedCloudBtn,
html.lifecycle-embedded .file-button,
html.lifecycle-embedded #addCustomerBtn,
html.lifecycle-embedded #editCustomerFromDetailBtn,
html.lifecycle-embedded #createInventoryFromDetailBtn,
html.lifecycle-embedded #dispatchSelectedBtn,
html.lifecycle-embedded #dispatchSelectionCount,
html.lifecycle-embedded .selection-cell,
html.lifecycle-embedded .dispatch-row-btn,
html.lifecycle-embedded .task-admin-actions,
html.lifecycle-embedded [data-action="show-mini-path"],
html.lifecycle-embedded [data-action="bind-unmatched"],
html.lifecycle-embedded .nav-item[data-view="accounts"],
html.lifecycle-embedded .nav-item[data-view="reminders"],
html.lifecycle-embedded label:has(#customerImportManager),
html.lifecycle-embedded #miniHandoffPanel { display: none !important; }
html.lifecycle-embedded .side-nav { position: sticky; z-index: 20; top: 0; height: auto; padding: 10px 14px; background: #fff; border-bottom: 1px solid var(--p-line, #e0e8f1); }
html.lifecycle-embedded .side-nav nav { display: flex; flex-wrap: wrap; gap: 6px; }
/* The standalone inventory surface can return to the canonical lifecycle
   workbench.  The embedded iframe never exposes this cross-surface link. */
.main-workbench-link {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 13px;
  color: var(--p-muted, #6a7d8f);
  font-size: 12.5px;
  text-decoration: none;
  white-space: nowrap;
}
.main-workbench-link:hover {
  color: var(--p-blue-700, #114c9e);
  background: var(--p-blue-100, #e6f1fc);
}
.p-side .main-workbench-link {
  width: 100%;
  border-bottom: 1px solid #eef1f3;
}
.p-side .main-workbench-link svg { width: 15px; height: 15px; color: #1688e8; }
.p-app-panel .main-workbench-link { min-height: 30px; padding: 0 8px; color: #334452; font-size: 12px; }
.p-app-panel .main-workbench-link:hover { color: #147fd0; }
html.lifecycle-embedded .main-workbench-link { display: none !important; }
html.lifecycle-embedded .nav-item { min-height: 38px; color: var(--p-muted, #6a7d8f); padding: 0 13px; white-space: nowrap; }
html.lifecycle-embedded .nav-item:hover,
html.lifecycle-embedded .nav-item.active { color: var(--p-blue-700, #114c9e); background: var(--p-blue-100, #e6f1fc); }
html.lifecycle-embedded .main { padding: 18px; }
html.lifecycle-embedded .topbar { flex-wrap: wrap; gap: 12px; margin-bottom: 8px; }
html.lifecycle-embedded .topbar h2 { font-size: 22px; }
html.lifecycle-embedded .top-actions { flex-wrap: wrap; }
html.lifecycle-embedded #inventorySourceNote { margin: 0 0 16px; color: var(--p-muted, #6a7d8f); font-size: 12px; }
html.lifecycle-embedded .filters { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
html.lifecycle-embedded .modal-card { max-width: calc(100vw - 28px); }
.inventory-session-status { margin: 32px; padding: 30px; border: 1px solid var(--p-line, #e0e8f1); border-radius: var(--p-radius-lg, 10px); color: var(--p-muted, #6a7d8f); background: #fff; text-align: center; }
.inventory-session-status button { border: 1px solid var(--p-blue-700, #114c9e); border-radius: var(--p-radius, 6px); padding: 8px 16px; background: var(--p-blue-700, #114c9e); color: white; cursor: pointer; }
@media (max-width: 760px) {
  html.lifecycle-embedded .main { padding: 12px; }
  html.lifecycle-embedded .side-nav nav { flex-wrap: nowrap; overflow-x: auto; }
  html.lifecycle-embedded .nav-item { flex: 0 0 auto; }
  html.lifecycle-embedded .metrics,
  html.lifecycle-embedded .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
