/* Shared frame for internal workspaces. Business layouts keep their own grids. */
body.module-shell{
  --ui-ink:#173a4b;--ui-muted:#58717e;--ui-line:#d9e4e9;--ui-accent:#147c83;
  margin:0;padding:0;font-family:system-ui,-apple-system,"Segoe UI",sans-serif;
  color:var(--ui-ink);background:#f2f6f8;line-height:1.5;
}
.module-shell *, .module-shell *::before, .module-shell *::after{box-sizing:border-box}
.module-shell :where(h1,h2,h3){line-height:1.25;overflow-wrap:anywhere}
.module-shell :where(button,input,select,textarea){font-family:inherit;border-radius:8px}
.module-shell :where(button,input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select){min-height:44px}
.module-shell :where(button){cursor:pointer}
.module-shell :where(button:disabled){cursor:default}
.module-shell :where(input,select,textarea){max-width:100%}
.module-shell :where(.card,.panel,.client-card,.module-card){border-color:var(--ui-line);border-radius:12px}
.module-shell :where(.page-heading,.welcome){gap:16px}
.module-shell :where(.actions,.dialog-actions){align-items:center;gap:8px}
.module-shell :where(a,button,input,select,textarea,summary):focus-visible{outline:3px solid #c77d16;outline-offset:3px}
.module-shell > .module-header{
  display:block;position:static;width:100%;height:auto;min-height:0;max-width:none;
  margin:0;padding:0;background:#fff;border:0;border-bottom:1px solid var(--ui-line);
  color:var(--ui-ink);box-shadow:none;
}
.module-header .module-header-main{
  display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;
  gap:16px 24px;min-height:88px;padding:18px 28px;
}
.module-header .module-brand{
  --logo-height:48px;position:relative;display:block;flex:none;
  width:calc(var(--logo-height) * var(--logo-ratio));height:var(--logo-height);
  max-width:100%;overflow:hidden;padding:0;margin:0;border:0;border-radius:0;background:#fff;
  text-decoration:none;
}
.module-header .module-brand img{
  position:absolute;display:block;width:var(--logo-image-width);height:auto;
  max-width:none;max-height:none;left:var(--logo-left);top:var(--logo-top);
  margin:0;padding:0;border:0;border-radius:0;object-fit:contain;
}
.module-header .module-header-tools{
  display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px 16px;
  min-width:0;flex:1;color:var(--ui-muted);font-size:14px;
}
.module-header .module-overview,
.module-header .module-header-tools > a{
  display:inline-flex;align-items:center;min-height:44px;padding:8px 12px;
  border:1px solid var(--ui-line);border-radius:8px;color:var(--ui-ink);
  font:600 14px/1.4 system-ui,sans-serif;text-decoration:none;background:#fff;
}
.module-header .module-overview:hover{background:#edf4f5}
.module-header .module-header-tools button,
.module-header .module-nav-toggle{
  min-height:44px;padding:10px 14px;margin:0;border:1px solid var(--ui-line);
  border-radius:8px;background:#fff;color:var(--ui-ink);font:600 14px/1.4 system-ui,sans-serif;
}
.module-header .module-header-tools .app-version{font-size:12px;color:var(--ui-muted)}
.module-header .module-header-secondary{
  display:flex;align-items:center;flex-wrap:wrap;gap:12px 24px;
  padding:12px 28px;background:#f8fafb;border-top:1px solid var(--ui-line);
}
.module-header .module-caption{
  flex:0 1 auto;margin:0;padding:0;border:0;color:var(--ui-ink);
  font-size:16px;font-weight:700;overflow-wrap:anywhere;
}
.module-header .module-caption--standalone{padding:10px 28px;background:#f8fafb;border-top:1px solid var(--ui-line)}
.module-header .module-navigation{
  display:flex;align-items:center;flex-wrap:wrap;gap:8px 16px;flex:1;
  min-width:0;margin:0;color:var(--ui-muted);font-size:14px;
}
.module-header .module-navigation :where(div,nav){
  display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;
  margin:0;padding:0;max-width:100%;min-width:0;border:0;background:transparent;
  position:static;max-height:none;
}
.module-header .module-navigation a{
  display:inline-flex;align-items:center;min-height:44px;
  margin:0;padding:8px 10px;border:0;border-radius:8px;
  font:600 14px/1.4 system-ui,sans-serif;color:var(--ui-accent);text-decoration:none;
}
.module-header .module-navigation a:hover{background:#e8f1f2}
.module-header .module-navigation button{
  min-height:44px;padding:8px 12px;margin:0;background:#fff;color:var(--ui-ink);
  border:1px solid var(--ui-line);font:inherit;
}
.module-header .module-navigation label{margin:0;font-size:13px;min-width:0}
.module-header .module-navigation select{width:auto;max-width:100%;min-width:0;margin:4px 0 0}
.module-header .module-nav-toggle{display:none}
.module-header--dashboard .module-header-tools{flex:1 1 450px}
.module-header--dashboard #searchForm{display:flex;align-items:center;flex:1;gap:8px;margin:0;max-width:680px}
.module-header--dashboard #globalSearch{width:100%;min-width:80px}
.module-header--dashboard #searchForm button{flex:none;background:var(--ui-accent);color:white;border-color:var(--ui-accent)}
.module-header--dashboard #quick{position:relative}
.module-header--dashboard #quickActions{top:100%}
.module-shell .advanced-filters{
  grid-column:1/-1;min-width:0;border:1px solid var(--ui-line);
  border-radius:8px;background:#f8fafb;padding:0;
}
.module-shell .advanced-filters > summary{
  min-height:44px;padding:10px 14px;cursor:pointer;font-weight:650;color:var(--ui-ink);
}
.module-shell .advanced-filters > .advanced-filter-grid{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr));gap:12px;padding:8px 14px 16px;
}
.module-shell .advanced-filter-grid > label{min-width:0;grid-column:auto}
.module-shell .advanced-filter-grid input,.module-shell .advanced-filter-grid select{width:100%}
.module-shell .advanced-filter-state{font-size:12px;font-weight:500;color:var(--ui-muted)}
.module-shell > footer{font-size:13px;color:var(--ui-muted)}
.module-shell [hidden]{display:none!important}
@media(max-width:760px){
 .module-header .module-header-main{padding:14px 16px;gap:12px;min-height:80px}
 .module-header .module-brand{--logo-height:42px}
 .module-header .module-header-tools{gap:8px;font-size:13px}
 .module-header .module-header-secondary{padding:10px 16px;gap:8px}
 .module-header .module-caption{flex:1;min-width:0;font-size:15px}
 .module-header .module-caption--standalone{padding:10px 16px}
 .module-header .module-navigation{flex-basis:100%;padding-top:4px}
 .module-header.is-navigation-ready .module-nav-toggle{display:inline-flex;align-items:center;justify-content:center}
 .module-header.is-navigation-ready .module-navigation:not(.is-open){display:none}
 .module-header--dashboard .module-header-tools{flex-basis:100%;justify-content:flex-end}
 .module-header--dashboard #searchForm{flex-basis:100%;max-width:none;order:2}
}
@media(max-width:420px){
 .module-header .module-header-tools{flex-basis:100%;justify-content:flex-start}
 .module-header .module-overview{flex:1;justify-content:center}
 .module-header--dashboard #quickActions{left:0;right:auto;min-width:0;width:min(280px,calc(100vw - 32px))}
}
@media print{
 .module-shell > .module-header,.module-shell > .dev-banner{display:none!important}
 body.module-shell{background:white;color:#111}
}
.module-brand--one{--logo-ratio:2.951439;--logo-image-width:132.358318%;--logo-left:-16.453382%;--logo-top:-15.467626%}
.module-brand--flow{--logo-ratio:2.844884;--logo-image-width:100.116009%;--logo-left:0.000000%;--logo-top:0.000000%}
.module-brand--lead{--logo-ratio:3.101167;--logo-image-width:132.810540%;--logo-left:-16.373902%;--logo-top:-20.622568%}
.module-brand--cash{--logo-ratio:3.069474;--logo-image-width:145.130316%;--logo-left:-19.753086%;--logo-top:-26.105263%}
.module-brand--care{--logo-ratio:2.980044;--logo-image-width:157.366071%;--logo-left:-29.017857%;--logo-top:-30.155211%}
.module-brand--docs{--logo-ratio:3.257089;--logo-image-width:122.809054%;--logo-left:-10.272780%;--logo-top:-16.635161%}
/* DEV identity takes a normal row and never covers module artwork. */
body.module-shell > .dev-banner{
 position:static;display:block;width:100%;margin:0;padding:6px 12px;
 background:#ffe169;color:#111;text-align:center;font:700 14px/1.5 system-ui,sans-serif;
 border:0;pointer-events:none;
}
.module-shell .module-sidebar-menu{margin:0;border:0;padding:0;background:transparent}
.module-shell .module-sidebar-menu > summary{display:none}
.module-shell .care-setup{margin-top:24px;padding:18px;background:white}
.module-shell .care-setup > summary{cursor:pointer;font-weight:700;min-height:44px;display:flex;align-items:center}
.module-shell .care-setup > p{color:var(--ui-muted)}
@media(max-width:760px){
 .module-shell .module-sidebar-menu > summary{display:list-item;min-height:44px;padding:10px 12px;font-weight:650;cursor:pointer}
 .module-shell .sidebar-current{font-weight:400;color:var(--ui-muted)}
 .module-shell .module-sidebar-menu[open] > summary{margin-bottom:8px}
}

.module-shell .module-page-heading{padding:24px 28px;max-width:1700px;margin:auto}
.module-shell .module-page-heading h1{margin:12px 0}
@media(max-width:760px){.module-shell .module-page-heading{padding:18px 14px}}
