/* ERP navigation and surfaces shared by the live business pages. */
#appPage {
  --erp-ink: #0f172a;
  --erp-muted: #526278;
  --erp-line: #dce4ee;
  --erp-blue: #2563eb;
  background: #f5f7fb;
  color: var(--erp-ink);
}
#appPage > aside { background: #0b1628; color: #f5f8ff; }
#appPage > aside .logo { border-bottom: 1px solid #26354a; padding-bottom: 16px; }
#appPage > aside .logo small { color: #adbed4; }
#appPage > aside .ui-nav-group { margin: 2px 0 8px; }
#appPage > aside .ui-nav-group > summary { color: #9aaec9; letter-spacing: .04em; }
#appPage > aside nav button { border-radius: 7px; color: #d6e0ee; }
#appPage > aside nav button:hover { background: #1a2b44; color: white; }
#appPage > aside nav button.active { background: var(--erp-blue); color: white; font-weight: 650; }
#appPage > .content { min-width: 0; }
#appPage > .content > header {
  box-sizing: border-box; background: #fff; border-bottom: 1px solid var(--erp-line);
  gap: 12px; margin-bottom: 16px; height: auto; min-height: 58px;
}
#appPage #pageTitle { color: var(--erp-ink); font-size: 19px; line-height: 1.3; }
#appPage #identity { color: var(--erp-muted); font-size: 12px; }
#appPage .view > .card, #dashboard .card { border: 1px solid var(--erp-line); border-radius: 12px; box-shadow: 0 2px 8px #0b162807; }
#appPage .view > .toolbar .ui-help > summary {
  display: inline-grid; place-items: center; width: 24px; height: 24px;
  border: 1px solid #cbd6e4; border-radius: 50%; background: white; color: #465d79;
  list-style: none; font-weight: 700;
}
#appPage .ui-help summary::-webkit-details-marker { display: none; }
#appPage .view > .toolbar .ui-help[open] { padding: 8px 12px; border-radius: 8px; }
#dashboard #workspaceAmounts {
  padding: clamp(16px, 2.3vw, 28px); color: #fff; background: linear-gradient(110deg,#142e68,#2458b9 66%,#2869d9);
  border: 1px solid #1e4996; border-radius: 12px; margin: 0 0 14px;
}
#workspaceAmounts .report-amounts { gap: 14px 24px; }
#workspaceAmounts .report-amounts > div { min-width: 0; font-size: 13px; }
#workspaceAmounts .report-amounts strong { font-size: clamp(23px,2.4vw,36px); line-height: 1.25; overflow-wrap: anywhere; letter-spacing: -.025em; }
#workspaceAmounts .report-amounts small, #workspaceAmounts .report-amounts label { color: #deebff; font-size: 12px; }
#workspaceAmounts .report-amounts label { display: grid; gap: 4px; margin: 0; }
#workspaceAmounts .report-amounts input { background: white; color: #173254; max-width: 100%; }
#workspaceAmounts button { background: #f6f9ff; color: #163b78; border-color: #b9d1f9; }
#dashboard .dashboard-kpis { grid-template-columns: repeat(auto-fit,minmax(min(100%,150px),1fr)); }
#dashboard .dashboard-kpis strong, #dashboard .metric-link { font-variant-numeric: tabular-nums; }
#dashboard .dashboard-kpis button[data-count="zero"] strong { color: #637387; }
#dashboard .dashboard-kpis button[data-count="pending"] strong { color: #985311; }
#workspaceWorkflowQueues { padding: 16px; margin: 14px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
#workspaceWorkflowQueues > .panel-head, #workspaceWorkflowQueues > .task-filters {
  margin: 0; padding: 0; border: 0; background: transparent;
}
#workspaceWorkflowQueues > .task-filters { margin-left: auto; }
#workspaceWorkflowQueues > .dashboard-kpis { flex: 1 1 100%; margin: 0; }
#dashboard .dashboard-personal .panel-head { flex-wrap: wrap; gap: 10px; }
#dashboard .dashboard-personal select { min-width: 125px; }
#dashboardPersonalRows.dashboard-categories {
  display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,135px),1fr));
  padding: 12px 16px 16px; gap: 8px;
}
.dashboard-categories button { display: grid; gap: 6px; text-align: left; padding: 12px; color: #19375e; border: 1px solid #d4dfec; background: #f6f9fe; }
.dashboard-categories button:hover, .dashboard-categories button:focus-visible { background: #edf4ff; border-color: #759fe6; }
.dashboard-categories b { font-size: 22px; font-variant-numeric: tabular-nums; }
.dashboard-categories span { font-size: 12px; }
@media (min-width:901px) {
  #appPage > aside { width: 196px; }
  #appPage > .content { margin-left: 196px; padding: 0 clamp(16px,1.65vw,28px) 28px; }
  #appPage > .content > header { margin-inline: calc(-1 * clamp(16px,1.65vw,28px)); padding: 8px clamp(16px,1.65vw,28px); }
}
@media (max-width:900px) {
  #appPage #lmNavButton:not([hidden]) { display: inline-flex !important; align-items: center; justify-content: center; }
  #lmNavDialog { min-width: 0; width: min(440px,calc(100vw - 24px)); max-height: 85dvh; overflow: auto; }
  #lmNavDialog .lm-nav-links { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 12px; }
  #appPage > .content > header { padding: 8px; flex-wrap: wrap; }
  #appPage > .content > header .header-actions { margin-left: auto; flex-wrap: wrap; }
}
@media (max-width:640px) {
  #appPage > .content > header { display: grid; grid-template-columns: 40px minmax(0,1fr); gap: 6px 10px; }
  #appPage > .content > header .header-actions { grid-column: 1/-1; gap: 6px; justify-content: flex-start; margin: 0; }
  #appPage:has(#dashboard:not([hidden])) > .content > header #refreshCurrentView { display: none; } /* Also available in the navigation menu. */
  #appPage > .content > header #workspaceStorePicker { max-width: 46vw; }
  #workspaceAmounts .report-amounts > div { flex-basis: 100%; }
  #workspaceWorkflowQueues > .task-filters { flex: 1 1 100%; }
  #dashboard .dashboard-kpis, #dashboardPersonalRows.dashboard-categories { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
