/* Operational density applies to the authorized application shell and its product workspaces. */
.app-shell:not(.client-shell), .benefit-admin {
  --work-touch: 2.75rem;
  --work-cell-y: .5rem;
  --work-cell-x: .75rem;
}
.app-shell:not(.client-shell) :is(.page-content, .page, .workspace, .table-wrap, .grid, .card, .panel, .metrics, .module-body) {
  min-inline-size: 0;
}
.app-shell:not(.client-shell) :is(.staff-workspace, .selfcloud, .site-analytics, .commercial-workspace, .payments-page, .blog-admin) {
  font-family: var(--visu-font);
  color: var(--visu-text);
}
.app-shell:not(.client-shell) :is(.button, .icon-button, .nav-button, .sw-tab, .sw-button, .sw-icon-button, .sa-button, .sa-icon-button, .sc-button, .sc-icon-button, .pager button) {
  min-block-size: var(--work-touch);
}
.app-shell:not(.client-shell) :is(.icon-button, .sw-icon-button, .sa-icon-button, .sc-icon-button) {
  min-inline-size: var(--work-touch);
}
.app-shell:not(.client-shell) :is(input:not([type=checkbox],[type=radio],[type=hidden],[type=file]), select) {
  min-block-size: var(--work-touch);
}
.app-shell:not(.client-shell) :is(.sw-panel, .sa-card, .sa-metric, .sc-panel, .sc-card, .ops-card, .commercial-panel) {
  background: var(--visu-surface);
  border-color: var(--visu-divider);
  border-radius: var(--visu-radius-card);
  box-shadow: var(--visu-shadow-card);
}
.app-shell:not(.client-shell) :is(.sc-dialog, .modal-panel, .dialog-panel) {
  background: var(--visu-surface);
  color: var(--visu-text);
  border-radius: var(--visu-radius-panel);
}
.app-shell:not(.client-shell) :is(.table-wrap, .table-scroll, .sa-table-scroll, .sc-probe-table-wrap, .file-library-table) {
  max-inline-size: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}
.app-shell:not(.client-shell) :is(.table-wrap, .table-scroll, .sa-table-scroll, .sc-probe-table-wrap, .file-library-table) :is(th, td) {
  padding: var(--work-cell-y) var(--work-cell-x);
  border-color: var(--visu-divider);
  font-size: .875rem;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
.app-shell:not(.client-shell) :is(.metric-value, .sa-metric strong, .sc-metrics strong, .sw-amount) {
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.app-shell:not(.client-shell) :is(.filter-bar, .ops-actions, .sc-toolbar-actions) { flex-wrap: wrap }
.app-shell:not(.client-shell) :is(.button, .sw-button, .sa-button, .sc-button):disabled {
  color: var(--visu-muted);
  background: var(--visu-surface-2);
  border-color: var(--visu-divider);
  cursor: not-allowed;
}
.app-shell:not(.client-shell) :is(input, textarea)[readonly] {
  color: var(--visu-text);
  background: var(--visu-surface-2);
}
.app-shell:not(.client-shell) :is(.sc-button--danger, .button-danger) {
  color: var(--visu-error);
  border-color: currentColor;
}
.app-shell:not(.client-shell) :is(.toast, .status, .badge, .pill) { overflow-wrap: anywhere }

/* Bundled product clients share their shell with dynamically installed, signed modules. */
.product-shell[data-product] :is(.visucio-plugin--visustart, .visucio-plugin--visuflow) {
  --vs-ink: var(--visu-text);
  --vs-muted: var(--visu-muted);
  --vs-primary: var(--visu-primary);
  --vs-primary-dark: var(--visu-primary);
  --vs-surface: var(--visu-surface);
  --vs-raised: var(--visu-surface);
  --vs-soft: var(--visu-surface-2);
  --vs-line: var(--visu-divider);
  --vs-accent: var(--visu-primary);
  --vf-chat-ink: var(--visu-text);
  --vf-chat-muted: var(--visu-muted);
  --vf-chat-line: var(--visu-divider);
  --vf-chat-soft: var(--visu-surface-2);
  --vf-chat-glass: var(--visu-surface);
  --vf-chat-composer: var(--visu-surface);
}
.product-shell[data-product] :is(.vs-content, .vf-workspace, .vf-layout, .vs-two-columns, .vf-collection, .vf-chat-panel) {
  min-width: 0;
  color: var(--visu-text);
  font-family: var(--visu-font);
}
.product-shell[data-product] :is(.card, .vf-card, .vf-agent-pane, .vf-intent-card, .vf-stage-stat, .vs-stat, .vp-stat, .vp-hub-stat, .metric-card, .vs-card, .vs-track-card, .vp-card, .vp-price-table, .vf-chat-composer) {
  color: var(--visu-text);
  background: var(--visu-surface);
  border-color: var(--visu-divider);
  border-radius: var(--visu-radius-card);
  box-shadow: var(--visu-shadow-card);
  backdrop-filter: none;
}
.product-shell[data-product] :is(.vs-table-scroll, .vf-table-scroll, .table-wrap) { max-width: 100%; overflow-x: auto }
.product-shell[data-product] :is(.button, .icon-button, .vs-tab, .product-profile-button) { min-height: 44px }
/* VisuPay renders a separate same-origin document. Its CorePresentation bridge
   consumes the stylesheets of the installed application in both checkout and the merchant area. */
body.vp-core-document, body.entry-checkout {
  font-family: var(--visu-font);
  color: var(--visu-text);
}
body.entry-checkout { background: var(--visu-bg) }
body.vp-core-document .vp-core-content :is(.card, .metric-card, .dashboard-chart-card, .dashboard-table-card),
body.entry-checkout :is(.entry-card, .checkout-card) {
  background-color: var(--visu-surface);
  color: var(--visu-text);
  border-color: var(--visu-divider);
  border-radius: var(--visu-radius-card);
  box-shadow: var(--visu-shadow-card);
}
body.vp-core-document .vp-core-content :is(.field-hint, .table-meta, .metric-label, .metric-note, .card-subtitle) {
  color: var(--visu-muted);
}
body.vp-core-document .vp-core-content :is(.input, .select, .textarea),
body.entry-checkout :is(input:not([type=hidden],[type=radio],[type=checkbox]), select, textarea) {
  min-height: 44px;
  background: var(--visu-surface);
  color: var(--visu-text);
  border-color: var(--visu-control);
  border-radius: var(--visu-radius-control);
}
body.vp-core-document .vp-core-content :is(.metric-value, .dashboard-table td) { font-variant-numeric: tabular-nums }
@media (max-width: 48rem) {
  .app-shell:not(.client-shell) :is(.ops-card, .sw-panel, .sa-card, .sc-panel) { padding-inline: 1rem }
  .app-shell:not(.client-shell) :is(.sw-filters, .sa-filters, .sc-toolbar) { gap: .5rem; align-items: stretch }
}
@media print {
  .app-shell:not(.client-shell) :is(.sidebar, .topbar, .visuai-fab, .product-topbar) { display: none }
  .app-shell:not(.client-shell) :is(.page, .page-content, .workspace) { margin: 0; padding: 0 }
  .app-shell:not(.client-shell) :is(.card, .sw-panel, .sa-card, .sc-panel, .ops-card) {
    background: white; color: black; box-shadow: none; border: 1px solid #77849a;
  }
  .app-shell:not(.client-shell) table { border-collapse: collapse }
  .app-shell:not(.client-shell) thead { display: table-header-group }
  .app-shell:not(.client-shell) tr { break-inside: avoid }
}
