/* Shared workspace presentation. Business forms and their permission classes stay intact. */
body.ws-ready {
  --ui-scale: 1; --bg: #f3f5f9; --surface: #fff; --surface-alt: #f1f5fa;
  --text: #172b48; --muted: #52657e; --shadow: 0 2px 8px rgba(20, 40, 70, .04);
  zoom: 1; width: 100%; left: 0; background: #f3f5f9; color: #172b48;
  font-size: 16px; line-height: 1.65;
}
body.ws-ready .bg-shape { display: none; }
body.ws-ready .container { width: auto; max-width: none; }
body.ws-ready .site-header { padding: 16px 24px; background: #fff; border-bottom: 1px solid #dfe5ee; }
body.ws-ready .site-header .nav { margin: 0; gap: 16px; }
body.ws-ready .brand h1 { color: #172b48; font-size: 16px; }
body.ws-ready .brand p { color: #52657e; font-size: 13px; }
body.ws-ready .brand-logo { width: 42px; height: 42px; }
body.ws-ready .ws-legacy-nav { display: none !important; }
body.ws-ready main.container { margin: 0 224px 0 0; padding: 28px; min-width: 0; }
body.ws-ready .hero { margin: 0 0 24px; padding: 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
body.ws-ready .hero h2 { color: #172b48; font-size: 25px; }
body.ws-ready .hero p { color: #52657e; font-size: 14px; }
.ws-sidebar { position: absolute; right: 0; top: 91px; width: 224px; padding: 20px 12px; background: #fff; border-left: 1px solid #dfe5ee; min-height: calc(100vh - 91px); }
.ws-sidebar nav { display: grid; gap: 6px; }
.ws-sidebar a { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-radius: 8px; color: #52657e; text-decoration: none; font-size: 15px; }
.ws-sidebar a:hover { background: #f4f7fc; }
.ws-sidebar a[aria-current="page"] { color: #205cbb; background: #edf3fe; font-weight: 700; }
.ws-nav-icon { display: inline-grid; place-items: center; width: 22px; flex-shrink: 0; color: #587198; font-size: 18px; }
.ws-sidebar hr { border: 0; border-top: 1px solid #e4eaf2; margin: 12px; }
.ws-sidebar details > summary { padding: 10px 13px; color: #52657e; cursor: pointer; font-size: 14px; }
.ws-sidebar details a { padding-inline-start: 22px; font-size: 14px; }
.ws-menu-toggle { display: none; }
.ws-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid #dfe5ee; margin: 0 0 22px; }
.ws-tabs .ws-tab { display: inline-flex; align-items: center; justify-content: center; background: transparent; color: #52657e; border: 0; border-bottom: 3px solid transparent; border-radius: 0; padding: 12px 15px; font: inherit; font-size: 15px; cursor: pointer; box-shadow: none; text-decoration: none; width: auto; }
.ws-tabs .ws-tab[aria-selected="true"], .ws-tabs .ws-tab[aria-pressed="true"] { color: #205cbb; border-bottom-color: #205cbb; font-weight: 700; }
body.ws-ready [hidden], body.ws-ready [data-ws-hidden="true"] { display: none !important; }
.ws-panel { min-width: 0; }
body.ws-ready .card { background: #fff; border: 1px solid #dfe5ee; border-radius: 12px; padding: 22px; margin-bottom: 18px; box-shadow: var(--shadow); }
body.ws-ready .card .card { box-shadow: none; }
body.ws-ready .section-title { font-size: 18px; margin-bottom: 16px; color: #172b48; }
body.ws-ready .btn { font-size: 14px; line-height: 1.5; padding: 10px 16px; border-radius: 8px; min-height: 40px; box-shadow: none; }
body.ws-ready .btn.secondary { background: #f1f5fa; color: #294466; border: 1px solid #dfe5ee; }
body.ws-ready .form-grid, body.ws-ready .detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
body.ws-ready .form-grid > *, body.ws-ready .detail-grid > *, body.ws-ready .form-group { min-width: 0; }
body.ws-ready .form-group--wide { grid-column: 1 / -1; }
body.ws-ready label, body.ws-ready .form-group > label { color: #415674; font-size: 14px; }
body.ws-ready input, body.ws-ready select, body.ws-ready textarea { max-width: 100%; font-size: 16px; border-radius: 7px; background: #fff; }
body.ws-ready input:not([type="checkbox"]):not([type="radio"]), body.ws-ready select, body.ws-ready textarea { padding: 10px 12px; min-height: 42px; }
body.ws-ready input[type="checkbox"], body.ws-ready input[type="radio"] { min-width: 16px; min-height: 16px; }
body.ws-ready .hint, body.ws-ready .status-note, body.ws-ready .maintenance-scope-hint { font-size: 13px; color: #52657e; }
body.ws-ready .stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 12px; }
body.ws-ready .stat-card, body.ws-ready .stat-tile, body.ws-ready .detail-item { background: #f6f8fc; padding: 14px; border-radius: 8px; min-width: 0; }
body.ws-ready .stat-card span, body.ws-ready .stat-tile span, body.ws-ready .detail-item > span { font-size: 13px; }
body.ws-ready .stat-card strong, body.ws-ready .stat-tile strong { font-size: 19px; }
body.ws-ready .detail-item strong { font-size: 15px; overflow-wrap: anywhere; }
body.ws-ready .table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid #e5eaf2; border-radius: 8px; }
body.ws-ready table { font-size: 14px; }
body.ws-ready th, body.ws-ready td { padding: 12px; }
body.ws-ready th { background: #f1f5fa; color: #415674; }
body.ws-ready .filter-grid, body.ws-ready .maintenance-filter-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
body.ws-ready .filter-row { flex-wrap: wrap; gap: 12px; }
body.ws-ready .filter-row > * { min-width: 0; }
.ws-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.ws-shortcuts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.ws-shortcut { padding: 18px; border: 1px solid #dfe5ee; border-radius: 10px; background: #fff; color: #172b48; text-decoration: none; display: block; }
.ws-shortcut span { display: block; color: #52657e; margin-top: 6px; font-size: 14px; }
.ws-empty { padding: 30px; background: #fff; border: 1px solid #dfe5ee; border-radius: 12px; }
.ws-empty p { color: #52657e; }
.ws-stage-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 22px; }
.ws-stage-button { text-align: right; border: 1px solid #dfe5ee; padding: 12px; border-radius: 8px; background: #fff; color: #52657e; font: inherit; font-size: 14px; cursor: pointer; }
.ws-stage-button[aria-pressed="true"] { color: #205cbb; border-color: #205cbb; background: #edf3fe; }
.ws-stage-button small { display: block; color: inherit; margin-top: 3px; font-size: 12px; }
body.ws-ready .maintenance-meta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
body.ws-ready .maintenance-meta-card { background: #fff; border: 1px solid #dfe5ee; padding: 18px; }
body.ws-ready .maintenance-command-grid, body.ws-ready .maintenance-command-grid--secondary, body.ws-ready .maintenance-insights, body.ws-ready .claims-insights { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.ws-ready .maintenance-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.ws-ready .assessed-stage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.ws-ready .maintenance-flow, body.ws-ready #maintenanceFlow { padding: 0; border: 0; background: transparent; box-shadow: none; }
body.ws-ready #maintenanceFlow > .section-title, body.ws-ready #maintenanceProgress { display: none; }
body.ws-ready .ws-stage-pane > .card { margin: 0; }
body.ws-ready #debtMenu, body.ws-ready #sectionToolbar { display: none !important; }
body.ws-ready .debts-insights { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0; }
body.ws-ready .debts-insights__card--command { grid-column: 1 / -1; }
body.ws-ready .command-deck__body { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.ws-ready .debts-insights h3 { font-size: 16px; }
body.ws-ready .debts-insights p, body.ws-ready .debts-insights small { font-size: 13px; }
body.ws-ready .debts-insights .card { margin: 0; }
body.ws-ready .ws-panel > .section-panel { margin-top: 0; }
body.ws-ready .ws-analytics .debts-insights { padding: 0; }
body.ws-ready .ws-analytics > summary { display: none; }
body.ws-ready .ws-analytics { padding: 0; border: 0; background: transparent; }
body.ws-ready .modal__dialog, body.ws-ready .modal-content { max-width: min(1100px, 94vw); }
body.ws-ready .ws-context-links { margin-top: 10px; }
body.ws-ready .ws-context-links a { color: #205cbb; margin-inline-end: 16px; }
body.ws-ready .settings-dropdown { background: #fff; }
@media (max-width: 1200px) {
  body.ws-ready main.container { padding: 22px; margin-right: 205px; }
  .ws-sidebar { width: 205px; }
  body.ws-ready .form-grid, body.ws-ready .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.ws-ready .maintenance-command-grid, body.ws-ready .maintenance-command-grid--secondary { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  body.ws-ready main.container { margin: 0; padding: 20px; }
  body.ws-ready .site-header { padding: 14px 20px; }
  .ws-sidebar { position: relative; top: auto; width: auto; min-height: 0; border: 0; border-bottom: 1px solid #dfe5ee; display: none; }
  .ws-menu-open .ws-sidebar { display: block; }
  .ws-sidebar nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ws-sidebar hr { display: none; }
  .ws-sidebar details { grid-column: 1 / -1; }
  .ws-menu-toggle { display: inline-flex; }
  body.ws-ready .brand h1 { font-size: 14px; }
}
@media (max-width: 620px) {
  body.ws-ready main.container { padding: 16px; }
  body.ws-ready .hero h2 { font-size: 23px; }
  body.ws-ready .card { padding: 16px; }
  body.ws-ready .form-grid, body.ws-ready .detail-grid, body.ws-ready .filter-grid, body.ws-ready .maintenance-filter-grid,
  body.ws-ready .maintenance-meta-grid, body.ws-ready .maintenance-insights, body.ws-ready .claims-insights,
  body.ws-ready .debts-insights, body.ws-ready .command-deck__body, body.ws-ready .assessed-stage-grid { grid-template-columns: minmax(0, 1fr); }
  body.ws-ready .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ws-stage-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ws-tabs .ws-tab { padding: 10px; font-size: 14px; }
  body.ws-ready .brand p { display: none; }
  body.ws-ready .site-header .nav { flex-wrap: wrap; }
  body.ws-ready .btn { min-height: 44px; }
}
@media print {
  body.ws-ready { background: white; }
  body.ws-ready main.container { margin: 0; padding: 0; }
  .ws-sidebar, .ws-tabs, .ws-menu-toggle, .ws-stage-nav, .ws-actions { display: none !important; }
  body.ws-ready .ws-panel[hidden], body.ws-ready .ws-stage-pane[hidden] { display: block !important; }
  body.ws-ready .ws-panel .hidden, body.ws-ready .ws-stage-pane .hidden { display: none !important; }
}

body.auth-pending .ws-sidebar { visibility: hidden; }
body.ws-ready .hidden { display: none !important; }

body.ws-ready .ws-more-filters { margin: 10px 0; }
body.ws-ready .ws-more-filters > summary { cursor: pointer; color: #205cbb; padding: 8px 0; font-size: 14px; }
body.ws-ready .ws-more-filters[open] > div { padding: 12px 0; }
body.ws-ready .hero { background: transparent; border: 0; box-shadow: none; }
body.ws-ready .command-deck__body { margin-top: 12px; }
body.ws-ready a.btn { text-decoration: none; }
body.ws-ready { overflow-x: clip; }
@media (max-width: 900px) {
  body.ws-ready .parts-catalog-controls { grid-template-columns: minmax(0, 1fr) !important; }
  body.ws-ready .parts-catalog-controls > * { min-width: 0; }
  body.ws-ready .parts-selected-list { overflow-x: auto; }
  body.ws-ready .settings-dropdown { left: 0; right: auto; }
}
