/* Product composition: the theme and authority engines remain independent. */
body { --sidebar-width: 218px; --line-height: 62px; --workspace-gap: 20px; }
body.ui-density-compact { --line-height: 44px; --workspace-gap: 12px; }
body.ui-density-touch { --line-height: 86px; --workspace-gap: 22px; }
.workspace-heading { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin:8px 0 24px; }
.workspace-heading h1 { font-size:clamp(1.65rem,2.4vw,2.5rem); line-height:1.2; letter-spacing:-.045em; margin:4px 0 8px; }
.workspace-heading p { margin:0; color:var(--muted); }
.workspace-heading .eyebrow { font-size:.68rem; letter-spacing:.15em; font-weight:700; }
.customize-link { display:flex; align-items:center; gap:8px; flex-shrink:0; text-decoration:none; font-size:.78rem; padding:10px 12px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--surface); }
.workspace-panel { border:1px solid var(--border); background:var(--surface); border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow); min-width:0; }
.panel-heading { padding:16px 18px; display:flex; align-items:center; justify-content:space-between; gap:12px; border-bottom:1px solid var(--border); }
.panel-heading h2 { font-size:1rem; margin:0; letter-spacing:-.025em; }
.panel-heading span,.panel-heading a { font-size:.72rem; color:var(--muted); }
.panel-heading a { color:var(--brand); text-decoration:none; }
.metrics-strip { display:grid; grid-template-columns:repeat(auto-fit,minmax(135px,1fr)); gap:12px; margin-bottom:var(--workspace-gap); }
.metric { text-decoration:none; color:var(--ink); padding:16px 18px; border:1px solid var(--border); border-radius:var(--radius); background:var(--surface); display:flex; flex-direction:column; gap:6px; min-width:0; }
.metric:hover { border-color:var(--brand); }
.metric-label { font-size:.75rem; font-weight:600; }
.metric-value { font-size:2rem; letter-spacing:-.05em; font-weight:650; line-height:1.2; display:flex; justify-content:space-between; align-items:center; }
.metric-symbol { display:grid; place-items:center; font-size:1.3rem; width:32px; height:32px; border-radius:50%; color:var(--brand); background:var(--brand-soft); }
.metric small { color:var(--muted); font-size:.65rem; }
.metric.widget-large { grid-column:span 2; }
.metric.widget-compact .metric-value { font-size:1.6rem; }
.metric.widget-compact .metric-symbol { width:27px; height:27px; }
.metric-pair { display:grid; grid-template-columns:1fr 1fr; gap:12px; grid-column:span 2; min-width:0; }
.legacy-logistics { border-top:1px solid var(--border); margin-top:28px; padding-top:20px; }
.logistics-heading { font-size:1.15rem; }
.legacy-logistics .dashboard-tasks { grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); }
.legacy-logistics .action-card { padding:16px; min-height:110px; }
.legacy-logistics .action-card .icon-tile { width:30px; height:30px; }
.legacy-logistics .action-card h3 { font-size:.85rem; margin:8px 0; }
.legacy-logistics .action-card p { font-size:.75rem; margin:4px 0; }
.dashboard-workspace { display:grid; grid-template-columns:minmax(0,1fr) 285px; gap:var(--workspace-gap); align-items:start; }
.dashboard-focus,.dashboard-priorities { display:grid; gap:var(--workspace-gap); min-width:0; }
.dashboard-lower { display:grid; grid-template-columns:1.1fr 1fr; gap:var(--workspace-gap); }
.dashboard-lower .quick-links { display:grid; grid-template-columns:1fr 1fr; column-gap:16px; }
.dashboard-lower .quick-links a { font-size:.75rem; align-items:center; gap:12px; }
.backbar { margin:0 0 12px; padding:0; min-height:0; }
main nav.breadcrumbs { margin:0; }
main nav.breadcrumbs a { display:inline-flex; align-items:center; }
.priority-line { display:flex; align-items:center; gap:10px; padding:12px 14px; text-decoration:none; color:var(--ink); border-bottom:1px solid var(--border); }
.priority-line:last-child { border-bottom:0; }
.priority-line b { font-size:.75rem; font-weight:600; }
.priority-line small { display:block; font-size:.66rem; color:var(--muted); margin-top:3px; }
.priority-icon { flex-shrink:0; color:var(--brand); background:var(--brand-soft); padding:8px; border-radius:10px; display:flex; }
.priority-icon svg { width:16px; height:16px; }
.priority-count { margin-left:auto; font-variant-numeric:tabular-nums; }
.priority-count.has-items { background:var(--info-soft); color:var(--info); border-radius:50%; min-width:24px; min-height:24px; display:grid; place-items:center; }
.priority-line:hover,.mission-agenda-row:hover { background:var(--surface-subtle); }
.quick-links { padding:4px 16px; }
.quick-links a { display:flex; justify-content:space-between; padding:12px 0; font-size:.75rem; text-decoration:none; border-bottom:1px solid var(--border); }
.quick-links a:last-child { border:0; }
.activity-chart { padding:24px 16px 8px; display:grid; grid-template-columns:repeat(7,1fr); gap:7px; }
.activity-chart a { text-align:center; text-decoration:none; min-width:0; color:var(--muted); font-size:.65rem; }
.activity-chart b,.activity-chart small { display:block; }
.chart-bars { height:70px; display:flex; align-items:flex-end; justify-content:center; gap:3px; border-bottom:1px solid var(--border); margin-bottom:7px; }
.chart-bars i { width:9px; border-radius:3px 3px 0 0; background:var(--brand); }
.chart-bars .bar-departure { background:var(--border-strong); }
.chart-legend { display:flex; justify-content:center; gap:12px; font-size:.62rem; margin:8px 0 16px; }
.chart-legend span:first-child { color:var(--brand); }
.chart-legend span:last-child { color:var(--muted); }
.mission-agenda-row { display:flex; align-items:center; gap:16px; padding:12px 18px; min-height:var(--line-height); text-decoration:none; color:var(--ink); border-bottom:1px solid var(--border); font-size:.8rem; }
.mission-agenda-row:last-child { border:0; }
.mission-agenda-row small { display:block; color:var(--muted); font-size:.68rem; }
.mission-agenda-row .state-pill { margin-left:auto; }
.agenda-time { border-right:1px solid var(--border); min-width:70px; padding-right:16px; }
.panel-more { display:block; text-decoration:none; text-align:center; border-top:1px solid var(--border); padding:12px; font-size:.75rem; }
.rotation-head,.rotation-record > summary { display:grid; grid-template-columns:minmax(150px,1.7fr) minmax(65px,.65fr) minmax(104px,1.15fr) minmax(85px,.85fr) minmax(135px,1.3fr) minmax(82px,.75fr); gap:10px; align-items:center; padding:0 16px; }
.rotation-head { min-height:34px; background:var(--surface-subtle); color:var(--muted); font-size:.65rem; }
.rotation-record { border:0; border-bottom:1px solid var(--border); border-radius:0; margin:0; padding:0; background:var(--surface); }
.rotation-record:last-child { border-bottom:0; }
.rotation-record > summary { min-height:var(--line-height); list-style:none; font-size:.81rem; cursor:pointer; padding-block:5px; margin:0; font-weight:400; }
.rotation-record > summary::-webkit-details-marker { display:none; }
.rotation-record > summary:hover,.rotation-record[open] > summary { background:var(--surface-subtle); }
.rotation-record > summary > span { min-width:0; }
.rotation-record b { font-weight:600; }
.rotation-record small { display:block; color:var(--muted); font-size:.7rem; line-height:1.35; }
.rotation-housing { display:flex; align-items:center; gap:9px; }
.housing-monogram { flex-shrink:0; display:grid; place-items:center; background:var(--brand-soft); color:var(--brand); width:32px; height:34px; border-radius:7px; }
.housing-monogram svg { width:17px; height:17px; }
.state-pill { display:inline-flex; align-items:center; gap:4px; font-size:.64rem; font-weight:600; padding:4px 7px; border-radius:20px; background:var(--surface-subtle); color:var(--muted); white-space:normal; }
.state-pill.warning { color:var(--warning); background:var(--warning-soft); }
.state-pill.info { color:var(--info); background:var(--info-soft); }
.state-pill.success { color:var(--success); background:var(--success-soft); }
.document-state { display:inline-flex; align-items:center; justify-content:center; width:30px; height:26px; font-size:.62rem; border-radius:5px; background:var(--surface-subtle); color:var(--muted); margin-right:3px; }
.rotation-documents { position:relative; padding-right:10px; }
.row-chevron { position:absolute; right:-5px; top:4px; }
.rotation-record[open] > summary { margin-bottom:0; }
.rotation-detail { border-top:1px solid var(--border); padding:20px; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; background:var(--surface-subtle); font-size:.8rem; }
.rotation-detail h3 { font-size:1rem; }
.rotation-detail .eyebrow { font-size:.65rem; letter-spacing:.09em; }
.rotation-detail p { margin:8px 0; }
.today-panel .rotation-head,.today-panel .rotation-record > summary { grid-template-columns:minmax(120px,1.4fr) 55px minmax(90px,1fr) 65px minmax(112px,1.1fr); gap:8px; padding-inline:12px; }
.today-panel .rotation-documents,.today-panel .rotation-head > span:last-child { display:none; }
.today-panel .housing-monogram { display:none; }
.today-panel .rotation-arrival > small { display:none; }
.today-panel .rotation-arrival b small { display:block; }
.today-panel .rotation-detail { grid-template-columns:1fr 1fr; }
.calm-empty { padding:30px 20px; text-align:center; }
.calm-empty > span { display:inline-grid; place-items:center; height:46px; width:46px; color:var(--brand); background:var(--brand-soft); border-radius:50%; }
.calm-empty h3 { font-size:1rem; margin:12px 0 6px; }
.calm-empty p { margin:0 auto; max-width:30rem; font-size:.8rem; color:var(--muted); }
.planning-toolbar { display:flex; align-items:start; justify-content:space-between; gap:12px; margin:0 0 18px; }
.planning-toolbar .planning-shortcuts { margin:0; gap:5px; }
.planning-shortcuts a { font-size:.78rem; padding:9px 13px; }
.date-picker { font-size:.78rem; min-width:150px; padding:0; }
.date-picker > summary { padding:9px 12px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--surface); }
.date-picker[open] { flex-shrink:0; width:240px; }
.day-totals { display:flex; gap:24px; padding:0 0 20px; color:var(--muted); font-size:.82rem; }
.day-totals b { font-size:1.5rem; margin-right:6px; color:var(--ink); }
.planning-note { font-size:.72rem; color:var(--muted); padding:10px 0; }
.period-label { font-size:.8rem; color:var(--muted); }
.week-overview { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:8px; margin:0 0 20px; }
.week-overview a { padding:12px; border:1px solid var(--border); border-radius:var(--radius-sm); text-decoration:none; background:var(--surface); }
.week-overview span { display:block; color:var(--muted); font-size:.72rem; margin-bottom:6px; }
.week-overview b { font-size:.85rem; }
.week-overview small { font-weight:400; font-size:.65rem; }
.matrix-scroll { overflow:auto; width:100%; }
.housing-matrix { margin:0; width:100%; min-width:860px; border-collapse:collapse; font-size:.74rem; table-layout:fixed; }
.housing-matrix th,.housing-matrix td { border-right:1px solid var(--border); padding:7px 9px; vertical-align:middle; height:var(--line-height); }
.housing-matrix thead th { height:40px; }
.housing-matrix th:first-child { width:180px; position:sticky; left:0; z-index:1; background:var(--surface); }
.housing-matrix tbody th { font-weight:600; }
.housing-matrix tr:nth-child(even) { background:var(--surface); }
.matrix-cell { display:grid; gap:3px; text-decoration:none; min-height:35px; }
.movement { display:block; padding:2px 5px; border-radius:4px; font-size:.65rem; }
.movement.arrival { background:var(--brand-soft); color:var(--brand); }
.movement.departure { background:var(--surface-subtle); color:var(--muted); }
.movement.cleaning { color:var(--info); }
.quiet-cell { color:var(--border-strong); }
.week-mobile-days { display:none; }
@media(max-width:640px) {
 .week-desktop-matrix { display:none; }
 .week-mobile-days { display:grid; gap:14px; }
 .mobile-day-count { font-size:.8rem; color:var(--muted); padding:0 14px; }
 .mobile-week-row { padding:12px 14px; display:grid; grid-template-columns:1fr auto; text-decoration:none; color:var(--ink); border-top:1px solid var(--border); min-height:54px; }
 .mobile-week-row b { font-size:.85rem; }
 .mobile-week-row small { grid-column:1; color:var(--muted); font-size:.72rem; }
 .mobile-week-row > span { grid-column:2; grid-row:1/3; align-self:center; }
}
.ui-density-compact .metric { padding:10px 14px; }
.ui-density-compact .metric-value { font-size:1.65rem; }
.ui-density-compact .rotation-housing small { display:none; }
.ui-density-compact .rotation-arrival > small { display:none; }
.ui-density-compact .rotation-record > summary { padding-block:3px; }
.ui-density-compact .priority-line { padding-block:8px; }
.ui-density-touch .metric { padding:22px; }
.ui-density-touch .rotation-record > summary { font-size:.9rem; }
.ui-density-touch .rotation-record small { font-size:.75rem; }
/* The desktop shell is deliberately a different structure from the field surface. */
@media(min-width:1100px) {
 .workspace-shell { padding-left:var(--sidebar-width); }
 .workspace-shell .app-header { min-height:70px; }
 .workspace-shell .header-inner { max-width:none; min-height:70px; padding:10px 28px; justify-content:flex-end; }
 .workspace-shell .brand { position:fixed; top:0; left:0; width:var(--sidebar-width); min-height:108px; padding:22px 18px; z-index:12; background:var(--surface); color:var(--ink); box-sizing:border-box; border-right:1px solid var(--border); border-radius:0; }
 .workspace-shell .brand-name { font-size:.94rem; line-height:1.3; }
 .workspace-shell .brand-subtitle { font-size:.61rem; margin-top:5px; }
 .workspace-shell .brand-icon { width:32px; height:32px; }
 .workspace-shell .nav-shell { position:fixed; top:108px; left:0; bottom:0; width:var(--sidebar-width); background:var(--surface); border-right:1px solid var(--border); padding:16px 12px; overflow:auto; z-index:10; box-sizing:border-box; }
 .workspace-shell .primary-navigation > summary { display:none; }
 .workspace-shell .app-nav { display:flex; flex-direction:column; align-items:stretch; padding:0; gap:5px; border:0; margin:0; max-width:none; background:transparent; }
 .workspace-shell .app-nav > a,.workspace-shell .navigation-more > summary { display:flex; align-items:center; gap:12px; padding:11px 13px; font-size:.8rem; border-radius:7px; min-height:42px; color:var(--ink); }
 .workspace-shell .navigation-more { width:100%; }
 .workspace-shell .navigation-links { position:static; box-shadow:none; border:0; min-width:0; background:transparent; padding:2px 0 10px 32px; }
 .workspace-shell .navigation-links a { font-size:.74rem; padding:8px 10px; min-height:36px; }
 .workspace-shell .app-nav > a[aria-current=page] { background:var(--brand-soft); color:var(--brand); font-weight:700; }
 .workspace-shell .app-context { border:0; background:transparent; padding:0 28px; }
 .workspace-shell .local-context { max-width:none; min-height:0; padding:7px 0; gap:12px; font-size:.7rem; flex-wrap:wrap; }
 .workspace-shell .workspace-organization { border-bottom:1px solid var(--border); background:var(--surface); }
 .workspace-shell .workspace-organization .context-name { margin-right:auto; }
 .workspace-shell .organization-context form { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
 .workspace-shell .local-context select,.workspace-shell .local-context button { font-size:.7rem; min-height:30px; padding:4px 8px; margin:0; }
 .workspace-shell .local-context p { margin:0; }
 .workspace-shell .workspace-local:has(select) { padding-block:4px; }
 .workspace-shell main { width:auto; max-width:1600px; padding:24px 28px; margin:0 auto; }
 .workspace-shell > footer { margin-left:0; padding:12px 28px; font-size:.65rem; }
 .workspace-shell .identity { font-size:.75rem; gap:18px; }
 .workspace-shell .identity button { min-height:34px; font-size:.7rem; padding:6px 10px; }
 .workspace-shell .identity-name small { font-size:.64rem; }
 .workspace-shell .mode-switch { font-size:.7rem; }
 .workspace-shell .mode-switch button { min-height:32px; padding:4px 10px; }
 .workspace-shell .mode-label { display:none; }
}
.workspace-demo { font-size:.63rem; border-radius:4px; padding:3px 7px; background:var(--warning-soft); color:var(--warning); font-weight:600; }
.housing-identity { display:flex; align-items:center; gap:18px; }
.housing-emblem { display:grid; place-items:center; width:72px; height:80px; border-radius:16px; background:var(--brand-soft); color:var(--brand); flex-shrink:0; }
.housing-emblem svg { width:35px; height:35px; }
.housing-overview { display:grid; grid-template-columns:1fr 230px; gap:30px; border-block:1px solid var(--border); padding:22px 0; }
.housing-overview .policy-summary { font-size:1rem; max-width:52rem; margin:10px 0; }
.housing-overview a { font-size:.8rem; text-decoration:none; }
.housing-price { border-left:1px solid var(--border); padding-left:24px; display:flex; flex-direction:column; gap:5px; }
.housing-price strong { font-size:1.8rem; letter-spacing:-.04em; }
.housing-price strong span { font-size:.9rem; font-weight:400; }
.housing-price small { font-size:.72rem; color:var(--muted); }
main nav.housing-tabs { display:flex; flex-wrap:wrap; gap:0; background:transparent; padding:12px 0 20px; border:0; }
.housing-tabs a { padding:10px 16px; font-size:.8rem; border-bottom:2px solid transparent; text-decoration:none; border-radius:0; }
.housing-tabs a[aria-current=page] { border-color:var(--brand); color:var(--brand); font-weight:700; background:var(--brand-soft); }
.housing-columns { display:grid; grid-template-columns:minmax(0,1fr) 270px; gap:24px; align-items:start; }
.housing-main,.housing-sidebar { display:grid; gap:20px; min-width:0; }
.housing-form { padding:20px; margin:0; }
.housing-form > p:first-of-type { margin-top:0; }
.housing-form label { font-size:.85rem; }
.housing-form .helptext { font-size:.75rem; }
.editorial-panel { padding:22px; }
.editorial-panel h2 { font-size:1.15rem; margin:4px 0 12px; }
.editorial-panel .eyebrow { font-size:.65rem; letter-spacing:.1em; }
.editorial-panel p { font-size:.82rem; }
.housing-facts { padding:0 20px; margin:0; }
.editorial-panel .housing-facts { padding:0; }
.housing-facts > div { padding:14px 0; border-bottom:1px solid var(--border); }
.housing-facts > div:last-child { border:0; }
.housing-facts dt { font-size:.72rem; color:var(--muted); margin-bottom:4px; }
.housing-facts dd { margin:0; font-size:.87rem; font-weight:600; }
.team-row { display:flex; align-items:center; gap:14px; padding:20px; border-bottom:1px solid var(--border); }
.team-row:last-child { border:0; }
.team-avatar { width:42px; height:42px; display:grid; place-items:center; flex-shrink:0; background:var(--brand-soft); color:var(--brand); border-radius:50%; font-size:1.2rem; }
.team-person h3 { font-size:1rem; margin:0 0 5px; }
.team-person p { font-size:.78rem; margin:0; }
.team-person small { color:var(--muted); font-size:.68rem; }
.priority-rank { margin-left:auto; font-size:.8rem; color:var(--brand); background:var(--brand-soft); padding:8px 12px; border-radius:8px; min-width:95px; }
.priority-rank small { display:block; font-size:.65rem; }
.rate-panel { display:flex; justify-content:space-between; align-items:center; gap:20px; }
.rate-panel h2 { font-size:2rem; }
.provider-workspace { max-width:900px; margin:0 auto; }
.provider-greeting { padding:12px 0 20px; }
.provider-greeting h1 { margin:4px 0 10px; letter-spacing:-.035em; }
.provider-greeting p { margin:0; color:var(--muted); }
.provider-greeting .eyebrow { font-size:.7rem; letter-spacing:.1em; }
.provider-day-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-bottom:24px; }
.provider-day-summary a { min-height:90px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; padding:12px; background:var(--brand-soft); color:var(--brand); border-radius:var(--radius); text-decoration:none; }
.provider-day-summary a:nth-child(2) { background:var(--surface-subtle); color:var(--ink); }
.provider-day-summary a:nth-child(3) { background:var(--info-soft); color:var(--info); }
.provider-day-summary b { font-size:1.8rem; line-height:1; }
.provider-day-summary span { font-size:.8rem; }
.provider-workspace .provider-grid > .empty-state { padding:14px 16px; border:0; }
.provider-workspace .empty-state h2 { font-size:.9rem; }
.provider-workspace .empty-state p { font-size:.8rem; }
.provider-workspace .provider-section { margin-bottom:20px; }
.provider-workspace .provider-section > h2 { font-size:1.05rem; }
.provider-workspace .provider-grid { grid-template-columns:repeat(auto-fit,minmax(min(100%,330px),1fr)); }
.provider-workspace .provider-grid > .card { border-top:3px solid var(--brand); }
.provider-workspace .provider-rate { color:var(--brand); font-size:1.4rem; }
.provider-empty { padding:0; margin:0 0 12px; border-bottom:1px solid var(--border); }
.provider-empty > summary { display:flex; justify-content:space-between; align-items:center; min-height:48px; font-size:.9rem; color:var(--muted); }
.provider-empty > summary span { font-size:.75rem; font-weight:400; }
.provider-empty p,.provider-calm { font-size:.85rem; color:var(--muted); }
.provider-workspace nav.tabs { padding:8px; margin:12px 0 20px; gap:3px; }
.provider-workspace nav.tabs a { font-size:.75rem; padding:8px; }
.terrain-shell .header-controls button { min-height:44px; }
body.ui-density-touch .header-controls button,body.ui-touch-comfort .header-controls button { min-height:52px; }
body.ui-density-touch .app-nav > a,body.ui-touch-comfort .app-nav > a { min-height:52px; }
@media(max-width:480px) { .terrain-shell .header-controls .mode-switch button { min-height:44px; } }
@media(max-width:800px) {
 .housing-heading { flex-wrap:wrap; }
 .housing-heading .customize-link { font-size:.75rem; }
 .housing-emblem { width:48px; height:60px; }
 .housing-columns { grid-template-columns:1fr; }
 .housing-overview { grid-template-columns:1fr; gap:16px; }
 .housing-price { border-left:0; border-top:1px solid var(--border); padding:16px 0 0; }
 .housing-tabs a { padding:10px; }
 .team-row { flex-wrap:wrap; padding:16px; }
 .team-person { flex:1; min-width:140px; }
 .priority-rank { margin-left:56px; }
 .rate-panel { flex-wrap:wrap; }
 .rate-panel .customize-link { font-size:.75rem; }
}
@media(max-width:1250px) and (min-width:801px) {
 .dashboard-workspace { grid-template-columns:minmax(0,1fr); }
 .dashboard-priorities { grid-template-columns:repeat(3,minmax(0,1fr)); }
 .rotation-head,.rotation-record > summary { grid-template-columns:minmax(135px,1.5fr) 65px 100px 85px 135px 75px; gap:8px; padding-inline:10px; }
}
@media(max-width:1099px) {
 .header-inner { padding:12px 18px; }
 .header-controls .identity-name { display:none; }
 .header-controls { gap:8px; }
 .header-controls .identity { gap:10px; }
 .header-controls .identity button { min-height:36px; font-size:.7rem; }
 .app-context { padding-inline:18px; }
 .local-context { padding:6px 0; font-size:.72rem; gap:8px; }
 .workspace-organization .context-name { display:none; }
 .workspace-organization .local-context { justify-content:space-between; }
 .local-context select,.local-context button { min-height:34px; font-size:.72rem; padding:4px 8px; }
 .local-context p { margin:0; }
 .brand-name { font-size:.92rem; }
 .brand-subtitle { font-size:.65rem; }
 .nav-shell { margin:0; padding-inline:18px; }
 main { padding:20px 18px; }
}
@media(max-width:800px) {
 .dashboard-workspace { grid-template-columns:minmax(0,1fr); }
 .dashboard-priorities { grid-template-columns:1fr 1fr; }
 .dashboard-lower { grid-template-columns:1fr; }
 .dashboard-lower .quick-links { grid-template-columns:1fr; }
 .dashboard-priorities > :first-child { grid-column:1/-1; }
 .workspace-heading { align-items:flex-start; margin-top:0; }
 .workspace-heading p { font-size:.78rem; }
 .workspace-heading .eyebrow { font-size:.6rem; }
 .customize-link { font-size:0; padding:10px; min-height:44px; }
 .customize-link svg { width:20px; height:20px; }
 .metrics-strip { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
 .metric-pair { gap:8px; }
 .metric-pair .metric:last-child:nth-child(odd) { grid-column:auto; }
 .metric { padding:12px; }
 .metric small { font-size:.65rem; }
 .metric:last-child:nth-child(odd) { grid-column:1/-1; flex-direction:row; align-items:center; justify-content:space-between; }
 .metric:last-child:nth-child(odd) small { max-width:45%; }
 .rotation-head { display:none; }
 .rotation-record > summary,.today-panel .rotation-record > summary { display:grid; grid-template-columns:1fr 1fr 1fr; gap:10px; padding:14px; min-height:0; }
 .rotation-housing { grid-column:1/-1; }
 .rotation-housing > span:last-child { display:flex; align-items:center; flex-wrap:wrap; gap:6px 12px; }
 .rotation-housing b { font-size:.85rem; }
 .rotation-record small { font-size:.68rem; }
 .rotation-record > summary > [data-label]::before { content:attr(data-label); display:block; font-size:.6rem; color:var(--muted); margin-bottom:3px; }
 .rotation-readiness { grid-column:1/3; }
 .rotation-documents,.today-panel .rotation-documents { display:block; }
 .rotation-readiness > small { display:inline; margin-left:5px; }
 .rotation-detail,.today-panel .rotation-detail { grid-template-columns:1fr; gap:12px; padding:16px; }
 .rotation-detail > div + div { border-top:1px solid var(--border); padding-top:12px; }
 .today-panel .housing-monogram { display:grid; }
 .planning-toolbar { flex-direction:column; }
 .date-picker { width:100%; }
 .day-totals { gap:14px; font-size:.7rem; }
 .day-totals b { font-size:1.25rem; }
 .week-overview { display:flex; overflow:auto; padding-bottom:5px; }
 .week-overview a { min-width:100px; }
 .housing-matrix th:first-child { width:140px; }
 .mission-agenda-row { gap:10px; padding:12px; font-size:.78rem; flex-wrap:wrap; }
 .agenda-time { min-width:55px; padding-right:10px; }
 .mission-agenda-row .state-pill { font-size:.62rem; }
 .panel-heading { padding:14px; }
 .panel-heading h2 { font-size:.93rem; }
 body[data-ui-theme=minimal] .metrics-strip { flex-wrap:wrap; }
 body[data-ui-theme=minimal] .metric { flex:1 0 40%; }
 body[data-ui-theme=minimal] .metric-pair { flex:1 0 100%; }
 body[data-ui-theme=elegant] .metric-value { font-size:2rem; }
}
@media(max-width:480px) {
 .header-inner { padding:10px 12px; gap:8px; flex-direction:row; flex-wrap:wrap; align-items:center; }
 .header-controls { display:contents; }
 .header-controls .identity { width:auto; margin-left:auto; }
 .header-controls .identity { gap:8px; }
 .header-controls .identity > a { font-size:.65rem; }
 .header-controls .identity button { padding:6px; font-size:.65rem; min-height:44px; }
 .header-controls .identity button svg { display:none; }
 .header-controls .mode-switch { flex-wrap:wrap; gap:4px; }
 .header-controls .mode-switch { padding:4px; margin:0; }
 .header-controls .mode-label { display:none; }
 .header-controls .mode-switch button { font-size:.65rem; min-height:34px; padding:4px 8px; }
 .brand { gap:7px; }
 .brand-icon { width:29px; height:29px; }
 .brand-name { font-size:.78rem; }
 .brand-subtitle { display:none; }
 main { padding:20px 12px; }
 .app-context,.nav-shell { padding-inline:12px; }
 .workspace-heading h1 { font-size:1.65rem; }
 .workspace-shell .backbar:has(.breadcrumbs):not(:has([data-discard])) { display:none; }
 .workspace-planning .workspace-heading { margin-bottom:12px; }
 .workspace-planning .workspace-heading p:not(.eyebrow) { display:none; }
 .workspace-planning .planning-toolbar { gap:8px; margin-bottom:8px; }
 .workspace-planning .day-totals { padding-bottom:12px; }
 .dashboard-priorities { grid-template-columns:1fr; }
 .dashboard-priorities > :first-child { grid-column:auto; }
 .panel-heading { gap:8px; }
 .panel-heading a { max-width:90px; text-align:right; }
 .planning-shortcuts a { padding:8px; font-size:.72rem; }
 .period-label { display:none; }
 .metric-label { font-size:.7rem; }
 .metric-value { font-size:1.7rem; }
 .metric-symbol { width:26px; height:26px; }
 .ui-density-touch .metric { padding:16px; }
 .ui-density-touch .rotation-record > summary { gap:14px; padding:18px 14px; }
 .rotation-record > summary,.today-panel .rotation-record > summary { font-size:.85rem; }
 .rotation-record small { font-size:.75rem; }
 .rotation-record > summary > [data-label]::before { font-size:.7rem; }
 .rotation-housing b { font-size:.94rem; }
 .priority-line b,.quick-links a { font-size:.85rem; }
 .priority-line small { font-size:.75rem; }
}

/* Compact presentation must preserve the existing minimum control target. */
.workspace-shell .header-controls button,.terrain-shell .header-controls button,
.workspace-shell .local-context button,.terrain-shell .local-context button,
.workspace-shell .local-context select,.terrain-shell .local-context select {
 min-height:44px; min-width:44px;
}
body.ui-density-touch .local-context button,body.ui-density-touch .local-context select,
body.ui-touch-comfort .local-context button,body.ui-touch-comfort .local-context select {
 min-height:52px;
}

/* Premium operational composition. Semantic event colors never use organization colors. */
body { --sidebar-surface:var(--surface); --sidebar-ink:var(--ink); --sidebar-line:var(--border); --sidebar-active:var(--surface-subtle); --sidebar-on-active:var(--ink); }
body[data-ui-theme=warm] { --sidebar-surface:var(--organization-primary,#174A3B); --sidebar-ink:var(--organization-text,#fff); --sidebar-line:color-mix(in srgb,var(--sidebar-ink) 20%,var(--sidebar-surface)); --sidebar-active:var(--sidebar-surface); --sidebar-on-active:var(--sidebar-ink); }
body { --event-arrival:var(--success); --event-departure:var(--danger); --event-cleaning:var(--warning); --event-signal:#6750a4; --signal-soft:#f0ebfa; --sidebar-width:224px; }
body[data-ui-theme=clear] { --canvas:#f3f5f4; --radius:14px; --shadow:0 3px 14px rgb(27 54 46 / 4%); }
body[data-ui-theme=warm] { --canvas:#f6f2e9; --surface:#fffefb; --surface-subtle:#f4f0e6; --border:#e3dece; --brand:#2a6151; --brand-soft:#e2eee5; --radius:16px; --shadow:0 4px 18px rgb(64 53 27 / 5%); }
body[data-ui-theme=elegant] { --canvas:#f4f1ed; --surface:#fcfbf8; --surface-subtle:#ece8e1; --ink:#302f35; --border:#d9d3c9; --radius:0; }
body[data-ui-theme=minimal] { --canvas:#fff; --radius:3px; --shadow:none; }
.nav-section-label { display:none; }
.context-name { display:flex; align-items:center; gap:9px; }
.context-name small { display:block; font-size:.58rem; letter-spacing:.09em; text-transform:uppercase; color:var(--muted); }
.context-name strong { font-size:.78rem; font-weight:650; }
.context-dot { width:8px; height:8px; border:4px solid var(--brand-soft); background:var(--organization-primary,var(--brand)); border-radius:50%; box-sizing:content-box; }
.dashboard-hero { padding:8px 0 20px; margin-bottom:12px; align-items:center; }
.dashboard-hero h1 { font-size:clamp(1.8rem,2.5vw,2.65rem); }
.dashboard-hero > div:first-child { min-width:0; }
.dashboard-hero p:not(.eyebrow) { font-size:.84rem; }
.hero-tools { display:flex; flex-direction:column; align-items:flex-end; gap:12px; flex-shrink:0; }
.hero-date { display:flex; align-items:center; gap:10px; color:var(--ink); font-size:.76rem; }
.hero-date > b { font-size:2.3rem; line-height:1; font-weight:500; letter-spacing:-.05em; }
.hero-date small { display:block; color:var(--muted); font-size:.68rem; }
.hero-tools .customize-link { font-size:.72rem; min-height:44px; padding:8px 12px; }
:where(.metric,.priority-line,.quick-links a,.dashboard-config fieldset) { --module-color:var(--brand); --module-soft:var(--brand-soft); }
.metric-arrival { --module-color:var(--event-arrival); --module-soft:var(--success-soft); }
.metric-departure { --module-color:var(--event-departure); --module-soft:var(--danger-soft); }
[data-widget=missions],[data-module=missions] { --module-color:var(--event-cleaning); --module-soft:var(--warning-soft); }
[data-widget=preparations],[data-module=preparations] { --module-color:var(--brand); --module-soft:var(--brand-soft); }
[data-widget=signals],[data-module=signals] { --module-color:var(--event-signal); --module-soft:var(--signal-soft); }
[data-widget=quality],[data-module=quality] { --module-color:var(--info); --module-soft:var(--info-soft); }
[data-widget=configuration],[data-module=configuration] { --module-color:var(--warning); --module-soft:var(--warning-soft); }
.metrics-strip { gap:14px; grid-template-columns:repeat(auto-fit,minmax(145px,1fr)); }
.metric { position:relative; overflow:hidden; border:1px solid var(--border); padding:16px; gap:9px; box-shadow:var(--shadow); border-bottom:3px solid var(--module-color); }
.metric:hover { border-color:var(--module-color); background:color-mix(in srgb,var(--module-soft) 30%,var(--surface)); }
.metric-pair { gap:14px; }
.metric-value { font-size:2.5rem; font-weight:650; color:var(--module-color); line-height:1.1; }
.metric-label { font-size:.78rem; font-weight:650; }
.metric-symbol,.metric.widget-compact .metric-symbol { width:44px; height:44px; border-radius:13px; color:var(--module-color); background:var(--module-soft); font-size:1.9rem; flex-shrink:0; }
.metric-symbol svg { width:25px; height:25px; }
.metric small { font-size:.67rem; display:flex; justify-content:space-between; gap:5px; }
.metric.widget-compact .metric-value { font-size:2.1rem; }
.metric.widget-large { grid-column:span 2; }
.metric-pair.widget-large { grid-column:span 4; }
.metric-pair.widget-compact .metric { padding-block:10px; }
.metric-pair.widget-large .metric { padding-block:26px; }
.panel-kicker { margin:0 0 3px; font-size:.56rem; color:var(--muted); font-weight:650; letter-spacing:.12em; }
.panel-heading h2 { font-size:1.05rem; font-weight:650; }
.panel-heading > svg { color:var(--brand); }
.flow-legend { display:flex; align-items:center; gap:14px; padding:9px 16px; font-size:.68rem; border-bottom:1px solid var(--border); flex-wrap:wrap; }
.flow-legend > span { display:inline-flex; gap:5px; align-items:center; font-weight:650; }
.flow-legend svg { width:15px; height:15px; }
.flow-legend small { margin-left:auto; color:var(--muted); font-size:.6rem; }
.departure,.rotation-departure > b { color:var(--event-departure); }
.arrival,.rotation-arrival > b,.ready-confirmed { color:var(--event-arrival); }
.cleaning { color:var(--event-cleaning); }
.event-markers { display:flex; align-items:center; gap:3px; margin-top:3px; }
.event-marker { display:inline-flex; width:19px; height:19px; justify-content:center; align-items:center; border-radius:5px; font-size:.85rem; font-weight:750; flex-shrink:0; }
.event-marker svg { width:13px; height:13px; }
.event-marker.departure { background:var(--danger-soft); }
.event-marker.arrival { background:var(--success-soft); }
.event-marker.cleaning { background:var(--warning-soft); }
.event-markers small { font-size:.6rem; margin-left:3px; }
.rotation-housing b { display:block; }
.rotation-record .rotation-readiness .ready-confirmed { color:var(--success); }
.rotation-head > .departure { color:var(--danger); }
.rotation-head > .cleaning { color:var(--warning); }
.rotation-head > .arrival { color:var(--success); }
.today-panel .rotation-head,.today-panel .rotation-record > summary { grid-template-columns:minmax(125px,1.45fr) 50px minmax(80px,.95fr) 58px minmax(110px,1fr); gap:7px; }
.today-panel .rotation-readiness .state-pill { font-size:.6rem; }
.priorities-panel { border-top:3px solid var(--brand); }
.priorities-panel .panel-heading { align-items:center; }
.priority-total { background:var(--brand-soft); color:var(--brand); min-width:30px; height:30px; display:grid; place-items:center; border-radius:50%; font-weight:700; }
.priority-line { padding:15px 14px; gap:10px; }
.priority-icon { color:var(--module-color); background:var(--module-soft); border-radius:11px; padding:10px; }
.priority-icon svg { width:20px; height:20px; }
.priority-count.has-items { background:var(--module-soft); color:var(--module-color); border-radius:6px; min-width:27px; height:28px; }
.priority-line b { font-size:.76rem; }
.priority-calm { padding:18px; font-size:.82rem; }
.priority-calm > span { float:left; color:var(--success); margin-right:9px; }
.priority-calm p { font-size:.75rem; color:var(--muted); }
.quiet-modules { padding:0 14px; background:var(--surface-subtle); font-size:.7rem; border-top:1px solid var(--border); }
.quiet-modules summary { display:flex; align-items:center; gap:8px; min-height:44px; color:var(--muted); }
.quiet-modules summary::before { content:'+'; font-size:1rem; }
.quiet-modules[open] summary::before { content:'−'; }
.quiet-modules a { display:flex; justify-content:space-between; padding:10px 0; color:var(--muted); text-decoration:none; }
.workspace-personalize { position:relative; padding:20px; background:var(--brand-soft); color:var(--brand); border-radius:var(--radius); display:grid; grid-template-columns:30px 1fr; gap:6px 9px; text-decoration:none; }
.workspace-personalize b { font-size:.82rem; }
.workspace-personalize small { grid-column:2; font-size:.73rem; padding-right:10px; }
.workspace-personalize .personalize-arrow { position:absolute; right:12px; bottom:12px; }
.quick-links { padding:10px 14px; }
.quick-links a { align-items:center; gap:10px; min-height:52px; padding:8px 0; }
.quick-links a > span:nth-last-child(2) { flex:1; }
.quick-icon { width:30px; height:30px; border-radius:8px; display:grid; place-items:center; background:var(--module-soft); color:var(--module-color); flex-shrink:0; }
.quick-icon svg { width:17px; height:17px; }
.dashboard-lower .quick-links { column-gap:14px; }
.chart-bars { height:82px; background:repeating-linear-gradient(to top,transparent 0,transparent 26px,var(--border) 27px,transparent 28px); }
.chart-bars i { width:13px; background:var(--success); }
.chart-bars .bar-departure { background:var(--danger); }
.chart-legend span:first-child { color:var(--success); }
.chart-legend span:last-child { color:var(--danger); }
.manager-dashboard .mission-agenda { border-top:3px solid var(--warning); }
.manager-dashboard .agenda-time { color:var(--warning); }
.manager-dashboard .mission-agenda-row { background:color-mix(in srgb,var(--warning-soft) 20%,var(--surface)); }
.day-totals { gap:10px; }
.day-totals > span { display:flex; align-items:center; gap:8px; background:var(--surface); border:1px solid var(--border); padding:10px 18px; border-radius:10px; }
.day-totals > span:first-child,.day-totals > span:first-child b { color:var(--success); }
.day-totals > span:nth-child(2),.day-totals > span:nth-child(2) b { color:var(--danger); }
.day-totals > span:nth-child(3),.day-totals > span:nth-child(3) b { color:var(--warning); }
.week-overview { gap:8px; }
.week-overview a { padding:12px; border-radius:10px; color:var(--ink); }
.week-overview a.is-today { box-shadow:inset 0 3px 0 var(--brand); border-color:var(--brand); background:var(--brand-soft); }
.week-overview .day-events { display:flex; gap:7px; flex-wrap:wrap; font-size:.8rem; }
.week-overview .day-events span { margin:0; font-weight:650; color:inherit; }
.week-overview .day-events .departure { color:var(--danger); }
.week-overview .day-events .arrival { color:var(--success); }
.week-overview .day-events .cleaning { color:var(--warning); }
.week-overview .day-events svg { width:13px; height:13px; vertical-align:middle; }
.load-track { display:flex; height:4px; gap:2px; background:var(--border); margin-top:9px; border-radius:4px; overflow:hidden; }
.load-track i { height:4px; background:var(--success); }
.load-track i:first-child { background:var(--danger); }
.load-track i:last-child { background:var(--warning); }
.housing-matrix .is-today { background:color-mix(in srgb,var(--brand-soft) 55%,var(--surface)); }
.housing-matrix th.is-today { border-top:3px solid var(--brand); }
.movement.departure { background:var(--danger-soft); color:var(--danger); border-left:2px solid var(--danger); }
.movement.arrival { background:var(--success-soft); color:var(--success); border-left:2px solid var(--success); }
.movement.cleaning { background:var(--warning-soft); color:var(--warning); border-left:2px solid var(--warning); }
.mobile-week-row .departure { color:var(--danger); }
.mobile-week-row .arrival { color:var(--success); }
.mobile-week-row .cleaning { color:var(--warning); }
.planning-key { display:flex; gap:16px; align-items:center; flex-wrap:wrap; font-size:.75rem; margin:8px 0 14px; }
.planning-key span { display:flex; align-items:center; gap:5px; }
.planning-key svg { width:15px; height:15px; }
.housing-emblem { background:var(--brand); color:var(--on-action); }
.housing-overview { background:var(--surface); padding:22px; border:1px solid var(--border); border-radius:var(--radius); }
.provider-greeting { padding:22px; background:var(--brand-soft); border-radius:20px 20px 5px 5px; border-left:4px solid var(--brand); margin-bottom:12px; }
.provider-day-summary a { border:1px solid var(--border); min-height:88px; position:relative; }
.provider-day-summary a:nth-child(2) { background:var(--warning-soft); color:var(--warning); }
.provider-summary-icon { display:none; }
.provider-workspace .pilot-card-head .eyebrow { color:var(--brand); font-weight:650; }
.provider-workspace .provider-section .card { border-left:3px solid var(--brand); }
.personalize-page { max-width:1180px; margin:auto; }
.personalize-profile { display:grid; grid-template-columns:1fr 1fr; gap:24px; align-items:center; background:var(--brand-soft); padding:22px; border-radius:var(--radius); margin:12px 0 30px; }
.personalize-profile h2,.personalize-intro h2 { color:var(--brand); font-size:1.1rem; }
.personalize-profile h2 span,.personalize-intro h2 span { color:var(--ink); margin-left:12px; }
.personalize-profile p,.personalize-intro p,.personalize-save p { color:var(--muted); font-size:.82rem; }
.personalize-profile > div:last-child { display:flex; gap:10px; align-items:end; flex-wrap:wrap; }
.personalize-profile > div:last-child p { margin:0; flex:1; }
.personalize-profile select { width:100%; }
.personalize-form .dashboard-config { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; margin:24px 0; }
.dashboard-config fieldset { border:1px solid var(--border); border-top:3px solid var(--module-color); border-radius:var(--radius); padding:16px; min-width:0; background:var(--surface); }
.dashboard-config legend { padding:0 6px; font-size:.84rem; font-weight:650; }
.config-icon { display:inline-grid; place-items:center; width:30px; height:30px; border-radius:8px; vertical-align:middle; background:var(--module-soft); color:var(--module-color); margin-right:7px; }
.config-icon svg { width:18px; height:18px; }
.widget-visibility { display:flex; align-items:center; gap:10px; min-height:44px; font-size:.78rem; }
.config-card-preview { display:grid; grid-template-columns:32px 1fr; gap:7px; padding:14px; background:var(--module-soft); margin:10px 0 16px; border-radius:8px; }
.config-card-preview i { grid-row:span 2; background:var(--module-color); opacity:.4; border-radius:6px; }
.config-card-preview span { height:7px; background:var(--module-color); opacity:.3; border-radius:2px; width:80%; }
.config-card-preview span:last-child { width:50%; }
.dashboard-config fieldset:has(input[type=checkbox]:not(:checked)) .config-card-preview { filter:grayscale(1); opacity:.35; }
.config-controls { display:grid; grid-template-columns:70px 1fr; gap:14px; font-size:.75rem; }
.config-controls input,.config-controls select { width:100%; margin-top:5px; min-width:0; }
.widget-order-controls { margin-top:16px; }
.widget-order-controls button { flex:1; font-size:.75rem; min-height:44px; }
.personalize-save { border-top:1px solid var(--border); padding:14px 0; }
/* Themes alter composition, not the authority or semantic status vocabulary. */
body[data-ui-theme=warm] .dashboard-hero { background:var(--organization-primary,#174A3B); color:var(--organization-text,#fff); padding:26px; border-radius:20px; position:relative; overflow:hidden; margin:0 0 24px; }
body[data-ui-theme=warm] .dashboard-hero h1 { font-family:Georgia,serif; font-weight:400; letter-spacing:-.035em; }
body[data-ui-theme=warm] .dashboard-hero p,body[data-ui-theme=warm] .hero-date,body[data-ui-theme=warm] .hero-date small { color:inherit; }
body[data-ui-theme=warm] .dashboard-hero .eyebrow { color:inherit; }
body[data-ui-theme=warm] .hero-tools .customize-link { color:#f5f4e8; background:#2a5548; border-color:#557567; }
body[data-ui-theme=warm] .metric { border-top:0; border-bottom:0; box-shadow:inset 0 4px 0 var(--module-color),var(--shadow); background:color-mix(in srgb,var(--module-soft) 28%,var(--surface)); padding-top:19px; }
body[data-ui-theme=warm] .quick-panel { background:color-mix(in srgb,var(--warning-soft) 32%,var(--surface)); }
body[data-ui-theme=warm] .workspace-personalize { background:#eae1c9; color:#4e5438; }
body[data-ui-theme=elegant] .dashboard-hero { border-top:3px solid var(--ink); border-bottom:1px solid var(--ink); padding-block:20px; }
body[data-ui-theme=elegant] .dashboard-hero h1 { font-size:2.7rem; font-weight:400; }
body[data-ui-theme=elegant] .metrics-strip { gap:0; border-block:1px solid var(--border); }
body[data-ui-theme=elegant] .metric { border:0; border-right:1px solid var(--border); box-shadow:none; background:transparent; }
body[data-ui-theme=elegant] .metric-pair { gap:0; }
body[data-ui-theme=elegant] .metric-value { font-family:Georgia,serif; font-size:2.8rem; font-weight:400; }
body[data-ui-theme=elegant] .metric-symbol { width:30px; height:30px; background:transparent; border:1px solid currentColor; border-radius:50%; font-size:1.2rem; }
body[data-ui-theme=elegant] .metric-symbol svg { width:17px; height:17px; }
body[data-ui-theme=elegant] .workspace-panel { border:0; border-top:1px solid var(--ink); box-shadow:none; background:transparent; }
body[data-ui-theme=elegant] .panel-heading { padding-inline:0; }
body[data-ui-theme=elegant] .priority-line { padding-inline:0; }
body[data-ui-theme=elegant] .workspace-personalize { background:transparent; border:1px solid var(--border); border-radius:0; }
body[data-ui-theme=minimal] .dashboard-hero { padding:4px 0 14px; margin-bottom:0; }
body[data-ui-theme=minimal] .dashboard-hero h1 { font-size:1.75rem; }
body[data-ui-theme=minimal] .hero-date { display:none; }
body[data-ui-theme=minimal] .metrics-strip { gap:0; border-block:1px solid var(--border); }
body[data-ui-theme=minimal] .metric { padding:12px; border:0; border-right:1px solid var(--border); box-shadow:none; gap:4px; }
body[data-ui-theme=minimal] .metric-value { font-size:1.6rem; }
body[data-ui-theme=minimal] .metric.widget-compact .metric-value { font-size:1.6rem; }
body[data-ui-theme=minimal] .metric-symbol,body[data-ui-theme=minimal] .panel-kicker,body[data-ui-theme=minimal] .workspace-personalize { display:none; }
body[data-ui-theme=minimal] .metric-pair { gap:0; }
body[data-ui-theme=minimal] .workspace-panel { border:0; border-top:1px solid var(--border); box-shadow:none; }
body[data-ui-theme=minimal] .priority-icon { padding:5px; border-radius:3px; }
body[data-ui-theme=minimal] .priority-icon svg { width:16px; height:16px; }
body[data-ui-theme=minimal] .priority-line { padding:10px; }
body[data-ui-theme=minimal] .rotation-record > summary { min-height:calc(var(--line-height) - 8px); }
body.ui-density-compact .dashboard-hero { padding-block:14px; margin-bottom:14px; }
body.ui-density-compact .hero-date { display:none; }
body.ui-density-compact .metric { padding:10px 12px; gap:4px; }
body.ui-density-compact .metric-value { font-size:1.65rem; }
body.ui-density-compact .metric-symbol { width:30px; height:30px; font-size:1.3rem; border-radius:8px; }
body.ui-density-compact .metric-symbol svg { width:18px; height:18px; }
body.ui-density-compact .event-marker { height:16px; width:16px; }
body.ui-density-compact .event-markers { margin-top:0; }
body.ui-density-touch .metric { padding:24px; }
body.ui-density-touch .quick-links a,body.ui-density-touch .quiet-modules summary { min-height:60px; }
body.ui-density-touch .customize-link,body.ui-density-touch .planning-shortcuts a { min-height:52px; }
@media(min-width:1100px) {
 .workspace-shell .brand,.workspace-shell .nav-shell { background:var(--sidebar-surface); color:var(--sidebar-ink); border-color:var(--sidebar-line); }
 .workspace-shell .brand { min-height:112px; border-bottom:1px solid var(--sidebar-line); }
 .workspace-shell .brand-name,.workspace-shell .brand-subtitle,.workspace-shell .app-nav a,.workspace-shell .navigation-more summary { color:var(--sidebar-ink); }
 .workspace-shell .brand-subtitle { opacity:1; }
 .workspace-shell .nav-shell { top:112px; padding-top:12px; }
 .workspace-shell .nav-section-label { display:block; padding:14px 13px 5px; font-size:.57rem; text-transform:uppercase; letter-spacing:.15em; color:var(--sidebar-ink); }
 .workspace-shell .app-nav > a,.workspace-shell .navigation-more > summary { min-height:44px; }
 .workspace-shell .app-nav > a > svg,.workspace-shell .navigation-more > summary > svg { color:var(--sidebar-ink); }
 .workspace-shell .app-nav > a[aria-current=page],.workspace-shell .navigation-more[open] > summary,.workspace-shell .app-nav a:hover { background:var(--sidebar-active); color:var(--sidebar-on-active); }
 .workspace-shell .app-nav > a[aria-current=page] { box-shadow:inset 3px 0 var(--organization-accent,var(--brand)); }
 .workspace-shell .app-nav > a[aria-current=page] > svg { color:var(--sidebar-on-active); }
 .workspace-shell .navigation-more:has([aria-current=page]) > summary,
 .workspace-shell .navigation-more > summary:hover,
 .workspace-shell .navigation-links a[aria-current=page] { background:var(--sidebar-active); color:var(--sidebar-on-active); border-bottom-color:transparent; }
 .workspace-shell .app-header,.workspace-shell .header-inner { min-height:60px; }
 .workspace-shell .header-inner { padding-block:6px; }
 .workspace-shell .workspace-organization .local-context { padding-block:8px; }
 body.workspace-shell[data-ui-theme=elegant] { --sidebar-width:202px; }
 body.workspace-shell[data-ui-theme=elegant] .brand,body.workspace-shell[data-ui-theme=elegant] .nav-shell { background:var(--surface); border-color:var(--border); color:var(--ink); }
 body.workspace-shell[data-ui-theme=elegant] .brand-name,body.workspace-shell[data-ui-theme=elegant] .brand-subtitle,body.workspace-shell[data-ui-theme=elegant] .app-nav a,body.workspace-shell[data-ui-theme=elegant] .navigation-more summary,body.workspace-shell[data-ui-theme=elegant] .nav-section-label { color:var(--ink); }
 body.workspace-shell[data-ui-theme=elegant] .app-nav svg { color:var(--brand); }
 body.workspace-shell[data-ui-theme=elegant] .app-nav > a[aria-current=page],body.workspace-shell[data-ui-theme=elegant] .navigation-more[open] > summary,body.workspace-shell[data-ui-theme=elegant] .app-nav a:hover { background:var(--brand-soft); color:var(--brand); box-shadow:inset 3px 0 var(--brand); }
 body.workspace-shell[data-ui-theme=minimal] { --sidebar-width:188px; }
 body.workspace-shell[data-ui-theme=minimal] .brand,body.workspace-shell[data-ui-theme=minimal] .nav-shell { background:var(--surface); border-color:var(--border); color:var(--ink); }
 body.workspace-shell[data-ui-theme=minimal] .brand-name,body.workspace-shell[data-ui-theme=minimal] .brand-subtitle,body.workspace-shell[data-ui-theme=minimal] .app-nav a,body.workspace-shell[data-ui-theme=minimal] .navigation-more summary,body.workspace-shell[data-ui-theme=minimal] .nav-section-label { color:var(--ink); }
 body.workspace-shell[data-ui-theme=minimal] .app-nav svg { color:var(--brand); }
 body.workspace-shell[data-ui-theme=minimal] .app-nav > a[aria-current=page],body.workspace-shell[data-ui-theme=minimal] .navigation-more[open] > summary,body.workspace-shell[data-ui-theme=minimal] .app-nav a:hover { background:var(--brand-soft); color:var(--brand); box-shadow:none; }
 body.workspace-shell:is([data-ui-theme=elegant],[data-ui-theme=minimal]) .navigation-more:has([aria-current=page]) > summary,
 body.workspace-shell:is([data-ui-theme=elegant],[data-ui-theme=minimal]) .navigation-more > summary:hover,
 body.workspace-shell:is([data-ui-theme=elegant],[data-ui-theme=minimal]) .navigation-links a[aria-current=page] { background:var(--brand-soft); color:var(--brand); }
}
@media(min-width:1260px) {
 body[data-ui-theme=elegant] .dashboard-workspace { grid-template-columns:255px minmax(0,1fr); }
 body[data-ui-theme=elegant] .dashboard-focus { grid-column:2; grid-row:1; }
 body[data-ui-theme=elegant] .dashboard-priorities { grid-column:1; grid-row:1; }
 body[data-ui-theme=minimal] .dashboard-workspace { grid-template-columns:1fr; }
 body[data-ui-theme=minimal] .dashboard-priorities { grid-row:1; }
 body[data-ui-theme=minimal] .priorities-panel { display:flex; align-items:start; border-block:1px solid var(--border); }
 body[data-ui-theme=minimal] .priorities-panel .panel-heading { border:0; min-width:170px; }
 body[data-ui-theme=minimal] .priority-list { display:flex; flex:1; }
 body[data-ui-theme=minimal] .priority-line { flex:1; border:0; }
 body[data-ui-theme=minimal] .priority-line small { display:none; }
 body[data-ui-theme=minimal] .quiet-modules { max-width:190px; border:0; background:transparent; }
 body[data-ui-theme=minimal] .dashboard-lower { grid-template-columns:1fr 1.5fr; }
}
@media(max-width:1259px) {
 .dashboard-workspace { grid-template-columns:1fr; }
 .dashboard-priorities { grid-template-columns:minmax(0,1.4fr) minmax(220px,1fr); }
}
@media(max-width:800px) {
 .dashboard-hero { align-items:flex-start; }
 .hero-date { display:none; }
 .hero-tools .customize-link { width:44px; padding:10px; }
 .hero-tools .customize-link > span { display:none; }
 .metrics-strip { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
 .metric-pair { gap:9px; }
 .metric:last-child:nth-child(odd) { flex-direction:column; align-items:stretch; }
 .metric:last-child:nth-child(odd) small { max-width:none; }
 .metric-pair.widget-large { grid-column:span 2; }
 .metric-pair.widget-large .metric { padding-block:22px; }
 .metric-symbol,.metric.widget-compact .metric-symbol { width:36px; height:36px; border-radius:10px; font-size:1.5rem; }
 .metric-symbol svg { width:21px; height:21px; }
 .metric-value { font-size:2rem; }
 .today-panel .rotation-record > summary { grid-template-columns:1fr 1fr 1fr; gap:10px; }
 .rotation-housing > span:last-child { display:block; }
 .rotation-housing .event-markers { display:flex; margin-top:4px; }
 .flow-legend { gap:9px; padding:10px 14px; }
 .flow-legend small { display:none; }
 .dashboard-priorities { grid-template-columns:1fr; }
 .day-totals { flex-wrap:wrap; gap:7px; }
 .day-totals > span { padding:8px 10px; font-size:.7rem; }
 .day-totals b { font-size:1.1rem; margin:0; }
 .personalize-form .dashboard-config { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .personalize-profile { grid-template-columns:1fr; gap:10px; }
 body[data-ui-theme=warm] .dashboard-hero { padding:20px; border-radius:14px; }
 body[data-ui-theme=elegant] .dashboard-hero h1 { font-size:2rem; }
 body[data-ui-theme=minimal] .metrics-strip { display:grid; }
 body[data-ui-theme=minimal] .metric-pair { display:grid; }
}
@media(max-width:480px) {
 .dashboard-hero h1 { font-size:1.7rem; }
 .dashboard-hero p:not(.eyebrow) { font-size:.75rem; }
 .dashboard-hero .eyebrow { font-size:.55rem; letter-spacing:.09em; }
 .metric { padding:12px; }
 .metric-label { font-size:.74rem; }
 .metric-value { font-size:1.9rem; }
 .metric small { font-size:.67rem; }
 .metric small > span { display:none; }
 .panel-kicker { font-size:.55rem; }
 .panel-heading h2 { font-size:1rem; }
 .personalize-form .dashboard-config { grid-template-columns:1fr; }
 .personalize-page .customize-link { font-size:.72rem; }
 .personalize-profile { padding:16px; }
 .provider-greeting { padding:18px 16px; }
 .provider-day-summary { gap:7px; }
 .provider-day-summary a { padding:8px; font-size:.72rem; }
 .workspace-organization .context-name { display:none; }
 .event-markers small { font-size:.65rem; }
 body[data-ui-theme=warm] .dashboard-hero { padding:18px 14px; gap:8px; }
 body[data-ui-theme=elegant] .dashboard-hero h1 { font-size:1.85rem; }
}
/* Theme paint cannot override dark/system contrast tokens. */
.mobile-flow-more { display:none; }
.theme-choices { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; max-width:70rem; margin:0 0 24px; }
.theme-choice { padding:12px; text-align:left; background:var(--surface); color:var(--ink); border:1px solid var(--border); border-radius:var(--radius); display:grid; gap:6px; min-width:0; }
.theme-choice[aria-pressed=true] { outline:2px solid var(--brand); outline-offset:2px; }
.theme-choice:hover { background:var(--surface-subtle); color:var(--ink); }
.theme-choice strong { font-size:.82rem; }
.theme-choice small { font-size:.7rem; color:var(--muted); }
.theme-mini { height:70px; display:grid; grid-template-columns:18px repeat(3,1fr); grid-template-rows:16px 16px 1fr; gap:5px; padding:7px; border:1px solid #ddd; background:#f4f5f3; border-radius:5px; }
.theme-mini i { grid-row:1/4; background:#264c40; border-radius:2px; }
.theme-mini b { grid-row:2; background:#e3eae2; border-top:2px solid #46785c; }
.theme-mini b:nth-of-type(2) { border-color:#b45445; background:#f3e5de; }
.theme-mini b:nth-of-type(3) { border-color:#a78032; background:#f3ecda; }
.theme-mini em { grid-row:3; grid-column:2/5; background:#fff; border:1px solid #ddd; }
.mini-warm { background:#eee6d4; }
.mini-warm::before { content:''; grid-column:2/5; grid-row:1; background:#294e40; border-radius:3px; }
.mini-elegant { background:#eae6e0; }
.mini-elegant i { background:#cbc5bf; }
.mini-elegant em { grid-column:3/5; border:0; border-top:2px solid #484046; background:transparent; }
.mini-minimal { background:#fff; }
.mini-minimal i { background:#e9ebeb; }
.mini-minimal b { background:#fff; border:0; border-bottom:1px solid #aaa; }
.mini-minimal em { background:#f1f3f3; border:0; }
@media(max-width:800px) {
 .dashboard-priorities { grid-row:1; }
 .workspace-personalize { display:none; }
 .theme-choices { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .metrics-strip:has(.metric-pair) > .metric:last-child:nth-child(even) { grid-column:1/-1; display:grid; grid-template-columns:1fr auto; gap:4px 14px; }
 .metrics-strip:has(.metric-pair) > .metric:last-child:nth-child(even) .metric-value { grid-column:2; grid-row:1/3; gap:12px; }
 .metrics-strip:has(.metric-pair) > .metric:last-child:nth-child(even) small { grid-column:1; }
}
@media(max-width:640px) {
 .today-panel .rotation-record:nth-of-type(n+4) { display:none; }
 .today-panel .panel-more { display:none; }
 .today-panel .mobile-flow-more { display:block; }
}
body[data-ui-appearance=dark] { --canvas:#151e24; --surface:#202d33; --surface-subtle:#293840; --ink:#edf4f3; --muted:#bfd0d1; --border:#43595d; --brand:#a0d8c3; --brand-soft:#263f38; --event-signal:#d1baff; --signal-soft:#3b304f; }
body[data-ui-appearance=dark][data-ui-theme=warm] .workspace-personalize { background:#403c2c; color:#efe0b9; }
@media(prefers-color-scheme:dark) {
 body[data-ui-appearance=system] { --canvas:#151e24; --surface:#202d33; --surface-subtle:#293840; --ink:#edf4f3; --muted:#bfd0d1; --border:#43595d; --brand:#a0d8c3; --brand-soft:#263f38; --event-signal:#d1baff; --signal-soft:#3b304f; }
 body[data-ui-appearance=system][data-ui-theme=warm] .workspace-personalize { background:#403c2c; color:#efe0b9; }
}
/* Final polish: evidence-driven compact marks and brand previews. */
.compact-indicator { display:inline-flex; justify-content:center; align-items:center; width:24px; height:24px; border-radius:6px; flex:none; font-size:1rem; }
.compact-indicator svg { width:16px; height:16px; }
.compact-indicator.danger,.event-marker.danger { background:var(--danger-soft); color:var(--danger); }
.compact-indicator.warning,.event-marker.warning { background:var(--warning-soft); color:var(--warning); }
.compact-indicator.success,.event-marker.success { background:var(--success-soft); color:var(--success); }
.compact-indicator.info { background:var(--info-soft); color:var(--info); }
.compact-indicator.neutral { background:var(--surface-subtle); color:var(--muted); }
.clock-status { display:inline-flex; align-items:center; gap:5px; font-size:.7rem; font-weight:650; }
.clock-status.success { color:var(--success); }
.clock-status.warning { color:var(--warning); }
.clock-status.danger { color:var(--danger); }
.clock-status.info { color:var(--info); }
.rotation-cleaning .compact-indicator { float:left; margin-right:5px; }
.rotation-list.has-stay-facts .rotation-head,.rotation-list.has-stay-facts .rotation-record > summary { grid-template-columns:minmax(140px,1.45fr) minmax(105px,1fr) minmax(85px,.8fr) minmax(60px,.55fr) minmax(100px,1fr) minmax(75px,.7fr) minmax(100px,1fr) 65px; gap:8px; }
.rotation-guests b { display:block; font-size:.75rem; overflow-wrap:anywhere; }
.rotation-amount b { display:block; font-size:.74rem; }
.rotation-guests small,.rotation-amount small { display:block; font-size:.62rem; color:var(--muted); }
.has-stay-facts .rotation-arrival > small { display:none; }
.appearance-scope { max-width:850px; font-size:.85rem; color:var(--muted); }
.appearance-scope a { display:inline-block; margin-top:6px; }
.brand-settings-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:26px; align-items:start; }
.brand-settings-layout > form { background:var(--surface); padding:24px; border:1px solid var(--border); border-radius:var(--radius); }
.brand-preview-navigation { display:flex; gap:16px; border-top:1px solid currentColor; padding-top:14px; margin-top:20px; font-size:.8rem; }
.brand-contrast { font-size:.8rem; color:var(--muted); }
.preview-workspace { display:grid; grid-template-columns:minmax(80px,.55fr) minmax(0,1.5fr); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow); }
.preview-sidebar { display:flex; flex-direction:column; gap:15px; padding:14px 10px; background:var(--sidebar-surface); color:var(--sidebar-ink); font-size:.66rem; }
.preview-brand-mark { background:var(--organization-primary,#174A3B); color:var(--organization-text,#fff); padding:8px; border-radius:5px; }
.preview-main { padding:16px; background:var(--surface); min-width:0; }
.preview-main h3 { margin-top:0; }
.preview-row { display:flex; gap:8px; align-items:center; flex-wrap:wrap; min-height:var(--line-height); border-block-end:1px solid var(--border); font-size:.75rem; }
.preview-row b { flex:1; min-width:110px; }
.workspace-shell .page-heading,.workspace-shell .dashboard-hero { position:relative; isolation:isolate; }
.workspace-shell .page-heading::after { content:''; position:absolute; pointer-events:none; right:0; top:0; width:150px; height:100px; background:url('hospitality-signature.svg') right center/contain no-repeat; opacity:.07; z-index:-1; }
.workspace-shell[data-ui-theme=minimal] .page-heading::after { display:none; }
.workspace-shell[data-ui-theme=warm] .dashboard-hero::after { content:''; position:absolute; pointer-events:none; right:210px; top:0; width:185px; height:145px; background:var(--organization-text,#fff); mask:url('hospitality-signature.svg') center/contain no-repeat; opacity:.1; z-index:-1; }
.theme-choices .mini-clear i { background:var(--surface-subtle); border-right:1px solid var(--border); }
.theme-choices .mini-warm i { background:var(--organization-primary,#174A3B); }
@media(min-width:1100px) {
 body.workspace-shell[data-ui-theme=clear] .brand,body.workspace-shell[data-ui-theme=clear] .nav-shell { background:var(--surface); color:var(--ink); border-color:var(--border); }
 .workspace-shell .app-nav > a[aria-current=page],.workspace-shell .navigation-more:has([aria-current=page]) > summary { box-shadow:inset 3px 0 var(--organization-accent,var(--brand)); }
}
@media(max-width:1250px) and (min-width:801px) {
 .rotation-list.has-stay-facts .rotation-head,.rotation-list.has-stay-facts .rotation-record > summary { grid-template-columns:minmax(145px,1.4fr) minmax(100px,1fr) minmax(80px,.8fr) minmax(60px,.6fr) minmax(100px,1fr) minmax(75px,.7fr) minmax(100px,1fr); }
 .has-stay-facts .rotation-documents,.has-stay-facts .rotation-head > span:last-child { display:none; }
}
@media(max-width:800px) {
 .rotation-list.has-stay-facts .rotation-record > summary { grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
 .has-stay-facts .rotation-head { display:none; }
 .has-stay-facts .rotation-guests { grid-column:1/3; }
 .has-stay-facts .rotation-guests::before,.has-stay-facts .rotation-amount::before { content:attr(data-label); display:block; font-size:.6rem; color:var(--muted); margin-bottom:3px; }
 .brand-settings-layout { grid-template-columns:1fr; gap:14px; }
 .preview-workspace { grid-template-columns:90px minmax(0,1fr); }
 .preview-main { padding:12px; }
}
