/* Smartia SaaS shared system. UX4Gsmartia source30 token adoption. */
@import url("ui/source-tokens.css");
@import url("ui/foundation-tokens.css");
@import url("ui/source-theme.css");
@import url("ui/themes.css");

html:root {
  --ui-font: "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --saas-font:var(--ui-font);
  --saas-mono:var(--ui-font-mono);
  --saas-bg:var(--ui-canvas);
  --saas-surface:var(--ui-surface);
  --saas-surface-alt:var(--ui-surface-subtle);
  --saas-surface-hover:var(--ui-secondary-soft);
  --saas-text:var(--ui-ink);
  --saas-muted:var(--ui-ink-soft);
  --saas-subtle:var(--ui-on-surface-muted);
  --saas-line:var(--ui-border);
  --saas-line-strong:var(--ui-border-strong);
  --saas-primary:var(--ui-brand);
  --saas-primary-hover:var(--ui-brand-hover);
  --saas-primary-soft:var(--ui-brand-soft);
  --saas-on-primary:var(--ui-on-brand);
  --saas-link:var(--ui-brand);
  --saas-focus:var(--ui-focus);
  --saas-success:var(--ui-on-success);
  --saas-success-soft:var(--ui-success-soft);
  --saas-warning:var(--ui-on-warning);
  --saas-warning-soft:var(--ui-warning-soft);
  --saas-danger:var(--ui-on-danger);
  --saas-danger-fill:#b42318;
  --saas-danger-soft:var(--ui-danger-soft);
  --saas-info:var(--ui-info);
  --saas-info-soft:var(--ui-info-soft);
  --saas-nav:var(--ui-surface);
  --saas-nav-text:var(--ui-ink);
  --saas-nav-muted:var(--ui-ink-soft);
  --saas-radius-control:var(--source-radius-medium);
  --saas-radius-card:var(--source-radius-large);
  --saas-radius-grid:var(--source-radius-medium);
  --saas-sidebar:248px;
  --saas-shadow-float:var(--ui-shadow-lg);
  --saas-shadow-menu:var(--ui-shadow-md);
  --saas-ease:var(--ui-ease);
}
html { background:var(--saas-bg); accent-color:var(--saas-primary); }
/* The SaaS contract hides rails while preserving wheel, touch and keyboard scrolling. */
html body.saas-console,html body.saas-console * { scrollbar-width:none !important; -ms-overflow-style:none; }
html body.saas-console::-webkit-scrollbar,html body.saas-console *::-webkit-scrollbar { display:none !important; width:0 !important; height:0 !important; }
html ::selection { background:var(--saas-primary-soft); color:var(--saas-text); }
html body:is(.saas-console,.saas-cartography) {
  --cp-font:var(--saas-font); --cp-mono:var(--saas-mono);
  --cp-paper:var(--saas-bg); --cp-panel:var(--saas-surface);
  --cp-panel-strong:var(--saas-surface-alt); --cp-line:var(--saas-line);
  --cp-line-strong:var(--saas-line-strong); --cp-ink:var(--saas-text);
  --cp-muted:var(--saas-muted); --cp-cyan:var(--saas-link);
  --cp-amber:var(--saas-warning); --cp-red:var(--saas-danger); --cp-blue:var(--saas-info);
  background:var(--saas-bg); color:var(--saas-text);
  font:400 var(--source-body-s)/1.57 var(--saas-font); -webkit-font-smoothing:antialiased;
}
html body:is(.saas-console,.saas-cartography) :is(button,input,select,textarea) { font-family:var(--saas-font); }
html body:is(.saas-console,.saas-cartography) :is(h1,h2,h3,h4,strong,b) { font-family:var(--saas-font); letter-spacing:-.02em; }
html body:is(.saas-console,.saas-cartography) :focus-visible { outline:3px solid var(--saas-focus) !important; outline-offset:3px !important; }
html body:is(.saas-console,.saas-cartography) :is(input,textarea) { caret-color:var(--saas-info); }
html body:is(.saas-console,.saas-cartography) :is(input,textarea)::placeholder { color:var(--saas-muted); opacity:1; }
html body:is(.saas-console,.saas-cartography) :is(button,.cp-button,.cp-inline-button,.btn) { white-space:nowrap; }
html body:is(.saas-console,.saas-cartography) button:disabled { cursor:not-allowed; opacity:.6; }
html body:is(.saas-console,.saas-cartography) :is(button,.cp-button,.btn):active:not(:disabled) { transform:translateY(1px); }
html body:is(.saas-console,.saas-cartography) :is(.saas-desktop-sidebar,.cp-rail) { background:var(--saas-nav) !important; }
html body:is(.saas-console,.saas-cartography) :is(.saas-desktop-sidebar nav,.cp-rail .cp-nav) { gap:4px; padding:16px 12px; }
html body:is(.saas-console,.saas-cartography) :is(.saas-desktop-sidebar nav,.cp-rail .cp-nav) a {
  min-height:42px; border:1px solid transparent; border-radius:8px;
  color:var(--saas-nav-muted); font:500 13px/1.3 var(--saas-font);
}
html body:is(.saas-console,.saas-cartography) :is(.saas-desktop-sidebar nav,.cp-rail .cp-nav) a:hover { background:var(--saas-surface-alt); color:var(--saas-nav-text); }
html body:is(.saas-console,.saas-cartography) :is(.saas-desktop-sidebar nav,.cp-rail .cp-nav) a[aria-current="page"] {
  background:var(--saas-primary-soft); color:var(--saas-link); font-weight:650;
}
html body:is(.saas-console,.saas-cartography) :is(.saas-desktop-sidebar nav,.cp-rail .cp-nav) a[aria-current="page"]::after { content:none; }
html body:is(.saas-console,.saas-cartography) .saas-sidebar-brand { min-height:80px; padding:20px; }
html body:is(.saas-console,.saas-cartography) .saas-sidebar-mark { background:var(--saas-primary-soft); color:var(--saas-link); }
html body:is(.saas-console,.saas-cartography) :is(.saas-module-subnav) { border:0; padding-left:0; }
html body:is(.saas-console,.saas-cartography) .saas-module-subnav button { min-height:36px; font-size:12px; }
html body:is(.saas-console,.saas-cartography) .saas-module-subnav button[aria-current="page"] { background:var(--saas-primary-soft); color:var(--saas-link); }
html body.saas-cartography .cp-shell { min-height:100dvh; background:var(--saas-bg) !important; }
html body.saas-cartography .cp-main { padding:22px 32px 64px; }
html body.saas-cartography .cp-topbar { min-height:48px; margin-bottom:24px; padding-bottom:12px; border-bottom:1px solid var(--saas-line); }
html body.saas-cartography .cp-crumb { text-transform:none; letter-spacing:0; font-size:12px; }
html body.saas-cartography .cp-user { gap:8px; }
html body.saas-cartography :is(.cp-language,.cp-theme) { min-height:36px; border:1px solid var(--saas-line); border-radius:8px; padding:7px 10px; background:var(--saas-surface); color:var(--saas-text); }
html body.saas-cartography .cp-hero { align-items:center; margin-bottom:20px; padding-bottom:0; border:0; }
html body.saas-cartography :is(.cp-hero h1,.cp-vps-header h1) { font-size:var(--source-heading-l); font-weight:700; letter-spacing:-.035em; line-height:1.2; }
html body.saas-cartography .cp-hero p:last-child { margin-top:6px; font-size:14px; }
html body.saas-cartography .cp-eyebrow { display:none !important; }
html body.saas-cartography :is(.cp-button,.cp-inline-button,.cp-vps-button) {
  min-height:40px; padding:9px 13px; border:1px solid var(--saas-line-strong); border-radius:8px;
  background:var(--saas-surface); color:var(--saas-text); font:600 13px/1.35 var(--saas-font);
}
html body.saas-cartography :is(.cp-button,.cp-inline-button,.cp-vps-button):hover { background:var(--saas-surface-alt); border-color:var(--saas-primary); color:var(--saas-text); }
html body.saas-cartography .cp-button-primary { background:var(--saas-primary); border-color:var(--saas-primary); color:var(--saas-on-primary); }
html body.saas-cartography .cp-button-primary:hover { background:var(--saas-primary-hover); color:var(--saas-on-primary); }
html body.saas-cartography .cp-command-wrap { margin-bottom:22px; }
html body.saas-cartography .cp-command { min-height:48px; padding:10px 15px; border:1px solid var(--saas-line-strong); border-radius:10px; background:var(--saas-surface) !important; }
html body.saas-cartography .cp-command-results { background:var(--saas-surface); border-color:var(--saas-line-strong); box-shadow:var(--saas-shadow-menu); }
html body.saas-cartography .cp-command-result { color:var(--saas-text); }
html body.saas-cartography .cp-command-result:hover { background:var(--saas-primary-soft); }
html body.saas-cartography .cp-map { min-height:0; padding:20px; margin-bottom:16px; background:var(--saas-surface) !important; }
html body.saas-cartography .cp-map::before { content:none; }
html body.saas-cartography :is(.cp-map h2,.cp-panel h2) { font-size:var(--source-heading-xs); color:var(--saas-text); font-weight:650; }
html body.saas-cartography :is(.cp-map,.cp-panel,.cp-metrics,.cp-vps-summary,.cp-vps-facts,.cp-vps-list,.cp-vps-table-wrap) { border:1px solid var(--saas-line); border-radius:12px; box-shadow:none; }
html body.saas-cartography .cp-map-plot { min-height:160px; }
html body.saas-cartography .cp-map-plot svg { height:160px; }
html body.saas-cartography .cp-graph-links path { stroke:var(--saas-line-strong); }
html body.saas-cartography .cp-graph-hubs circle { fill:var(--saas-surface-alt); stroke:var(--saas-primary); }
html body.saas-cartography .cp-graph-hubs .cp-graph-root { fill:var(--saas-primary-soft); }
html body.saas-cartography .cp-graph-labels text { fill:var(--saas-text); }
html body.saas-cartography .cp-metrics { margin-bottom:24px; background:var(--saas-surface) !important; }
html body.saas-cartography .cp-metric { min-height:82px; padding:16px 20px; background:transparent !important; }
html body.saas-cartography .cp-metric strong { font:650 25px/1.2 var(--saas-font); font-variant-numeric:tabular-nums; color:var(--saas-text); }
html body.saas-cartography .cp-metric span { color:var(--saas-muted); font-size:12px; }
html body.saas-cartography .cp-grid { display:block; }
html body.saas-cartography .cp-grid > .cp-stack { display:contents; }
html body.saas-cartography .cp-grid > .cp-stack > .cp-panel { margin-bottom:20px; }
html body.saas-cartography .cp-panel-head { display:flex; flex-wrap:wrap; align-items:center; gap:12px; padding:18px 20px; }
html body.saas-cartography .cp-panel-head p { margin-top:4px; font-size:12px; }
html body.saas-cartography .cp-panel-actions { display:flex; flex-wrap:wrap; gap:8px; }
html body.saas-cartography #atlas { display:block; max-height:none; }
html body.saas-cartography .cp-atlas-toolbar { display:flex; flex-wrap:wrap; align-items:end; gap:12px; padding:14px 20px; border-top:1px solid var(--saas-line); background:var(--saas-surface-hover); }
html body.saas-cartography .cp-atlas-filter { flex:1 1 150px; max-width:240px; font-size:12px; }
html body.saas-cartography .cp-atlas-filter select { width:100%; min-height:40px; border:1px solid var(--saas-line-strong); border-radius:8px; background:var(--saas-surface); color:var(--saas-text); }
html body.saas-cartography #cp-filter-summary { margin:0 0 10px auto; color:var(--saas-muted); font-size:12px; }
html body.saas-cartography #atlas .cp-table-wrap { max-height:560px; overflow:auto; }
html body.saas-cartography #atlas .cp-table { width:100%; min-width:0; table-layout:fixed; }
html body.saas-cartography #atlas .cp-table :is(th,td) { padding:14px 16px; overflow-wrap:normal; word-break:normal; }
html body.saas-cartography #atlas .cp-table th { font:600 12px/1.4 var(--saas-font); letter-spacing:0; text-transform:none; }
html body.saas-cartography #atlas .cp-table :is(th:nth-child(1),td:nth-child(1)) { width:27%; overflow-wrap:anywhere; }
html body.saas-cartography #atlas .cp-table :is(th:nth-child(3),td:nth-child(3)) { width:14%; overflow-wrap:anywhere; }
html body.saas-cartography #atlas .cp-table :is(th:nth-child(5),td:nth-child(5)) { width:23%; }
html body.saas-cartography #atlas .cp-table :is(th:nth-child(8),td:nth-child(8)) { width:22%; }
html body.saas-cartography #atlas .cp-table :is(th:last-child,td:last-child) { width:14%; min-width:0; position:static; box-shadow:none; }
html body.saas-cartography #atlas .cp-table tbody tr:hover { background:var(--saas-surface-hover); }
html body.saas-cartography #atlas .cp-status { max-width:100%; white-space:normal; font:500 12px/1.4 var(--saas-font); }
html body.saas-cartography .cp-status { border-color:var(--saas-line); background:var(--saas-surface-alt); color:var(--saas-muted); font-family:var(--saas-font); }
html body.saas-cartography .cp-status::before { content:none; }
html body.saas-cartography .cp-status--ready { color:var(--saas-success); background:var(--saas-success-soft); }
html body.saas-cartography .cp-status--warning { color:var(--saas-warning); background:var(--saas-warning-soft); }
html body.saas-cartography .cp-status--critical { color:var(--saas-danger); background:var(--saas-danger-soft); }
html body.saas-cartography #infrastructure { position:static; max-height:none; overflow:visible; }
html body.saas-cartography :is(.cp-adapter-list,.cp-runbook-list) { padding:0 20px 18px; gap:0; }
html body.saas-cartography :is(.cp-adapter,.cp-runbook) { padding:14px 0; border:0; border-bottom:1px solid var(--saas-line); border-radius:0; background:transparent; }
html body.saas-cartography :is(.cp-adapter,.cp-runbook):last-child { border-bottom:0; }
html body.saas-cartography :is(.cp-adapter small,.cp-recovery-item small,.cp-list small,.cp-subhead,.cp-dialog label,.cp-dialog legend) { color:var(--saas-muted); }
html body.saas-cartography :is(.cp-adapter strong,.cp-runbook strong,.cp-list strong,.cp-subhead) { color:var(--saas-text); }
html body.saas-cartography .cp-subhead { font:650 13px/1.4 var(--saas-font); text-transform:none; letter-spacing:0; margin:18px 20px 6px; }
html body.saas-cartography .cp-empty { padding:32px 20px; color:var(--saas-muted); text-align:center; }
html body.saas-cartography .cp-dialog { padding:26px; border:1px solid var(--saas-line-strong); border-radius:12px; background:var(--saas-surface) !important; color:var(--saas-text); box-shadow:var(--saas-shadow-float); }
html body.saas-cartography .cp-dialog::backdrop { background:var(--ui-overlay); backdrop-filter:none; }
html body.saas-cartography .cp-dialog :is(input,select,textarea) { min-height:44px; padding:10px 12px; border-radius:8px; background:var(--saas-surface); color:var(--saas-text); }
/* Central forms share a compact field rhythm and reachable footer actions. */
html body.saas-console dialog.cp-dialog > form { display:grid; gap:16px; min-width:0; max-height:none; overflow:visible; padding:0; }
html body.saas-console dialog.cp-dialog :is(h2,p,fieldset,label) { margin-block:0; }
html body.saas-console dialog.cp-dialog label { display:grid; gap:6px; }
html body.saas-console :is(.field,.esim-field,.portfolio-form-grid > label) { align-content:start; }
html body.saas-console .modal-backdrop { z-index:1500; background:var(--ui-overlay); }
html body.saas-console .modal-backdrop > [role=dialog] { border:1px solid var(--saas-line-strong); border-radius:12px; background:var(--saas-surface); color:var(--saas-text); }
html body.saas-console #tenantProvisionForm > .toolbar { position:sticky; bottom:0; z-index:2; padding:12px 0; border-top:1px solid var(--saas-line); background:var(--saas-surface); }
html body.saas-console dialog.cp-dialog fieldset { min-width:0; padding:12px; }
html body.saas-console dialog.cp-dialog menu { position:sticky; z-index:2; bottom:-26px; margin:0; padding:12px 0 16px; border-top:1px solid var(--saas-line); background:var(--saas-surface); display:flex; justify-content:flex-end; gap:8px; }
@media(max-width:640px){html body.saas-console dialog.cp-dialog > form { gap:12px; } html body.saas-console dialog.cp-dialog menu { bottom:-20px; } html body.saas-console dialog.cp-dialog menu > button { flex:1; }}
html body.saas-cartography .cp-toast { background:var(--saas-surface); color:var(--saas-text); border-color:var(--saas-line-strong); }
html body.saas-cartography :is(.cp-login-page,.cp-local-login) { background:var(--saas-bg); min-height:100dvh; }
html body.saas-cartography :is(.cp-login-card,.cp-local-login-card) { border:1px solid var(--saas-line); border-radius:12px; background:var(--saas-surface); color:var(--saas-text); box-shadow:none; }
@media (min-width:1280px) {
  html body.saas-cartography .cp-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:20px; align-items:start; }
  html body.saas-cartography .cp-grid > .cp-stack > .cp-panel { margin:0; }
  html body.saas-cartography #atlas { grid-column:1 / -1; order:-2; }
  html body.saas-cartography #operations { grid-column:1; }
  html body.saas-cartography #infrastructure { grid-column:2; grid-row:2 / span 3; }
  html body.saas-cartography #recovery { grid-column:1; }
}
@media (max-width:900px) and (min-width:641px) {
  html:root { --saas-sidebar:200px; }
  html body.saas-cartography .cp-main { padding:18px 20px 48px; }
  html body.saas-cartography .cp-hero { grid-template-columns:1fr; gap:14px; }
  html body.saas-cartography .cp-actions { justify-content:flex-start; }
  html body.saas-cartography .cp-account-name { display:none; }
}
@media (max-width:640px) {
  html body.saas-cartography .cp-shell { display:block; }
  html body.saas-cartography .cp-main { padding:14px 16px 96px; }
  html body.saas-cartography .cp-topbar { align-items:center; flex-direction:row; gap:8px; margin-bottom:20px; }
  html body.saas-cartography .cp-crumb { font-size:12px; }
  html body.saas-cartography .cp-user { flex-shrink:0; }
  html body.saas-cartography .cp-theme [data-saas-theme-label],html body.saas-cartography .cp-account-name { display:none; }
  html body.saas-cartography .cp-hero h1 { font-size:24px; }
  html body.saas-cartography .cp-actions { display:flex; justify-content:flex-start; }
  html body.saas-cartography :is(button,.cp-button,.cp-inline-button,.cp-language,.cp-theme) { min-height:44px; }
  html body.saas-cartography .cp-map { padding:16px; }
  html body.saas-cartography .cp-map-plot { overflow:auto; }
  html body.saas-cartography .cp-map-plot svg { min-width:520px; }
  html body.saas-cartography .cp-metric { min-height:80px; padding:14px; }
  html body.saas-cartography .cp-metric:last-child { grid-column:auto; }
  html body.saas-cartography .cp-atlas-filter { max-width:none; flex-basis:100%; }
  html body.saas-cartography #cp-filter-summary { flex-basis:100%; margin:0; }
  html body.saas-cartography #atlas .cp-table { min-width:600px; }
  html body.saas-cartography #atlas .cp-table :is(th:nth-child(2),td:nth-child(2),th:nth-child(4),td:nth-child(4),th:nth-child(6),td:nth-child(6),th:nth-child(7),td:nth-child(7)) { display:none; }
  html body.saas-cartography .cp-panel-head { padding:16px; }
  html body.saas-cartography .cp-dialog { width:calc(100% - 28px); max-height:calc(100dvh - 28px); padding:20px; }
}
@media (prefers-reduced-motion:no-preference) {
  html body:is(.saas-console,.saas-cartography) :is(button,.cp-button,.cp-inline-button,input,select) { transition:background-color 160ms var(--saas-ease),border-color 160ms var(--saas-ease); }
}
/* Hidden state and search fields must survive legacy shared selectors. */
html body:is(.saas-console,.saas-cartography) [hidden] { display:none !important; }
html body.saas-cartography .cp-command input { min-height:28px !important; padding:0 !important; border:0 !important; border-radius:0 !important; outline-offset:4px !important; background:transparent !important; }
html body.saas-cartography .cp-metric span { text-transform:none; letter-spacing:0; }
html body.saas-cartography .cp-atlas-filter > span { text-transform:none; letter-spacing:0; }
html body.saas-cartography .cp-graph-empty .cp-map-plot { display:none; }
html body.saas-cartography .cp-graph-empty .cp-map-nodes { margin-top:16px; }
html body.saas-cartography .cp-status--warn { color:var(--saas-warning); background:var(--saas-warning-soft); }
html body.saas-cartography .cp-status--danger { color:var(--saas-danger); background:var(--saas-danger-soft); }
html body.saas-cartography #cp-command { border:0 !important; padding:0 !important; min-height:28px !important; background:transparent !important; }
html body.saas-cartography #atlas { height:auto; }
html body.saas-cartography #atlas .cp-table th { font:600 12px/1.4 var(--saas-font) !important; letter-spacing:0 !important; }
@media (min-width:641px) and (max-width:1100px) {
  html body.saas-cartography .cp-atlas-filter { max-width:none; }
  html body.saas-cartography #cp-filter-summary { flex-basis:100%; margin:0; }
}
html body.saas-cartography #atlas .cp-table :is(th:nth-child(2),td:nth-child(2),th:nth-child(4),td:nth-child(4),th:nth-child(6),td:nth-child(6),th:nth-child(7),td:nth-child(7)) { display:none; }
@media (min-width:641px) and (max-width:900px) {
  html body.saas-cartography #atlas .cp-table { min-width:640px; }
}
/* Older isolated module mirrors may still reserve room for a retired inner rail. */
html body.saas-console .esim-shell > :is(.esim-nav,.esim-status,.esim-panel) { margin-left:0; }
html body.saas-console .esim-shell > .esim-nav { position:static; margin-top:16px; backdrop-filter:none; border:0; padding:0; background:transparent; }

/* Canonical source30 geometry and semantic foregrounds for existing callers. */
html body.saas-console :is(.saas-btn-primary,.btn-primary,.btn-success) { color:var(--saas-on-primary) !important; }
html body.saas-console :is(.saas-btn-primary,.btn-primary,.btn-success):hover { color:var(--saas-on-primary) !important; }
html body.saas-console .saas-desktop-sidebar { border-right-color:var(--saas-line); }
html body.saas-console .saas-sidebar-brand { border-bottom-color:var(--saas-line); }
html body.saas-console :is(.btn,.button,.saas-btn) { min-height:40px !important; font-size:var(--source-label-l) !important; font-weight:600 !important; }
html body.saas-console :is(.input,.select,.textarea,input:not([type=checkbox]):not([type=radio]),select,textarea) { font-size:var(--source-body-s) !important; }
html body.saas-console .saas-palette-field { display:grid; gap:8px; margin:6px; color:var(--saas-text); font-size:12px; }
html body.saas-console .saas-palette-field select { min-height:40px; }
html body.saas-cartography .cp-account-popover { width:224px; }
@media(max-width:640px) {
 html body.saas-console :is(input:not([type=checkbox]):not([type=radio]),select,textarea) { font-size:16px !important; }
 html body.saas-console :is(.btn,.button,.saas-btn,.saas-mobile-more-sheet a) { min-height:44px !important; }
}

html body.saas-console .saas-field-error { display:block; margin-top:4px; color:var(--saas-danger); font-size:var(--source-body-xs); line-height:1.5; }
html body.saas-console [aria-invalid="true"] { border-color:var(--saas-danger) !important; }
/* Source30 medium table rhythm; long records grow naturally. */
html body.saas-cartography #atlas .cp-table th { height:40px; padding:10px 16px; line-height:20px !important; }
html body.saas-cartography #atlas .cp-table td { height:46px; padding:12px 16px; font-size:var(--source-body-s); line-height:var(--source-body-s-leading); }
html body.saas-console .saas-module-subnav button { border-radius:0; border:0; border-bottom:2px solid transparent; background:transparent; color:var(--saas-nav-muted); }
html body.saas-console .saas-module-subnav button[aria-current="page"] { border-bottom-color:var(--saas-primary); background:transparent; color:var(--saas-link); }
html body.saas-console :is(.btn-danger,.saas-btn-danger):hover { background:var(--saas-danger-fill) !important; border-color:var(--saas-danger-fill) !important; color:#fff !important; text-decoration:underline; text-underline-offset:3px; }

/* Blue/grey operational direction. Palette roles remain from the shared kit. */
html:root { --saas-sidebar:224px; --saas-nav:#e8eef7; --saas-nav-text:#1c2e49; --saas-nav-muted:#485b76; }
html:root[data-ui-mode="dark"] { --saas-nav:#19263a; --saas-nav-text:#e4ecf8; --saas-nav-muted:#b2c1d8; }
html body.saas-console [data-saas-theme-label] { display:none !important; }
html body.saas-console [data-saas-theme-toggle] { display:inline-flex; align-items:center; justify-content:center; flex:0 0 36px; width:36px; min-width:36px; height:36px; min-height:36px; padding:0; gap:0; }
html body.saas-console .saas-icon-control .saas-theme-icon { width:18px; height:18px; }
html body.saas-console .saas-desktop-sidebar .saas-sidebar-brand { min-height:64px; padding:16px; border-radius:0; }
html body.saas-console :is(.saas-desktop-sidebar nav,.cp-rail .cp-nav) { gap:2px; padding:10px; }
html body.saas-console .saas-desktop-sidebar nav a { min-height:38px; }
html body.saas-cartography .cp-main { padding:16px 24px 48px; }
html body.saas-cartography .cp-topbar { min-height:40px; margin-bottom:16px; padding-bottom:10px; }
html body.saas-cartography .cp-hero { margin-bottom:14px; gap:14px; }
html body.saas-cartography .cp-hero h1 { font-size:24px; }
html body.saas-cartography .cp-command-wrap { margin-bottom:16px; }
html body.saas-cartography .cp-map { padding:14px 16px; margin-bottom:12px; }
html body.saas-cartography .cp-metrics { margin-bottom:16px; }
html body.saas-cartography .cp-metric { min-height:64px; padding:12px 16px; }
html body.saas-cartography .cp-metric strong { font-size:22px; }
html body.saas-cartography .cp-panel-head { padding:14px 16px; }
html body.saas-cartography .cp-atlas-toolbar { padding:12px 16px; gap:10px; }
html body.saas-cartography .cp-grid { gap:16px; }
html body.saas-cartography .cp-topology { margin-top:10px; }
html body.saas-cartography .cp-topology > summary { padding:6px 0; color:var(--saas-link); font-size:12px; cursor:pointer; }
html body.saas-console :is(.portfolio-hero,.saas-page-hero,.saas-page-header) { padding:16px; margin-bottom:16px; }
html body.saas-console :is(.portfolio-hero,.saas-page-hero,.saas-page-header) h1 { font-size:24px !important; }
@media(max-width:640px) {
 html body.saas-console [data-saas-theme-toggle] { width:44px; height:44px; min-width:44px; min-height:44px; flex-basis:44px; }
 html body.saas-cartography .cp-main { padding:14px 16px 96px; }
 html body.saas-cartography .cp-metric { padding:12px 14px; }
}
/* Intrinsic grid sizing must not force the page wider than the viewport. */
html body.saas-console :is(#restoConsole,.panel-grid,.vps-section-grid) > * { min-width:0; }
html body.saas-console :is(.panel-grid,.vps-section-grid) { min-width:0; }
html body.saas-console .saas-section-kicker { display:none; }
@media(max-width:640px) {
 html body.saas-console :is(.vps-card-header,.vps-table-tools,#restoConsole .toolbar) { flex-wrap:wrap; min-width:0; }
 html body.saas-console :is(.vps-card-header,.vps-table-tools) > * { min-width:0; max-width:100%; }
 html body.saas-console :is(#restoConsole,.panel-grid) { grid-template-columns:minmax(0,1fr) !important; }
 html body.saas-console .vps-section-grid > * { grid-column:1/-1; }
 html body.saas-console :is(#restoConsole,.panel-grid) :is(button,.btn,.saas-btn) { white-space:normal; overflow-wrap:anywhere; }
}
html body.saas-console .panel-grid > .stack { grid-template-columns:minmax(0,1fr); }
html body.saas-console .panel-grid .stack > .card { min-width:0; }
html body.saas-console :is(.preview-body,.preview-subject) { overflow-wrap:anywhere; }
@media(max-width:1100px) {
 html body.saas-console .portfolio-hero { flex-wrap:wrap; }
 html body.saas-console .portfolio-actions { flex-wrap:wrap; max-width:100%; }
}
/* Form boundaries remain identifiable against both operational surfaces. */
html:root { --saas-field-border:#7e8ca1; }
html:root[data-ui-mode="dark"] { --saas-field-border:#6c7d96; }
html body.saas-console :is(input:not([type=checkbox]):not([type=radio]),select,textarea) { border-color:var(--saas-field-border) !important; }
html body.saas-cartography .cp-command { border-color:var(--saas-field-border); }
html body.saas-console :is(input,select,textarea)[aria-invalid="true"] { border-color:var(--saas-danger) !important; }

html body.saas-cartography .cp-status--neutral { color:var(--saas-muted); background:var(--saas-surface-alt); }
/* Review closure: readable statuses and records earlier in the phone viewport. */
html body.saas-console :is(.portfolio-chip.sell_now,.portfolio-confidence.high) { color:var(--saas-success); background:var(--saas-success-soft); }
html body.saas-console :is(.portfolio-chip.pilot_90,.portfolio-confidence.medium) { color:var(--saas-warning); background:var(--saas-warning-soft); }
html body.saas-console :is(.portfolio-chip.research,.portfolio-chip.internal_only,.portfolio-chip.retired,.portfolio-confidence.low) { color:var(--saas-muted); background:var(--saas-surface-alt); }
html body.saas-console .portfolio-intro > summary { padding-top:4px; color:var(--saas-link); cursor:pointer; font-size:12px; }
html body.saas-console .portfolio-intro p { margin-top:8px; }
@media(max-width:640px) {
 html body.saas-cartography .cp-metrics { display:flex; overflow-x:auto; margin-bottom:12px; }
 html body.saas-cartography .cp-metric { flex:1 0 108px; min-height:64px; padding:10px 12px; border-bottom:0; }
 html body.saas-cartography .cp-map { padding:12px; margin-bottom:12px; }
 html body.saas-cartography .cp-map h2 { font-size:14px; }
 html body.saas-cartography .cp-map-header p { margin:4px 0 0; font-size:12px; line-height:1.5; }
 html body.saas-cartography .cp-topology { margin-top:4px; }
 html body.saas-cartography .cp-atlas-toolbar { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; padding:12px; }
 html body.saas-cartography .cp-atlas-filter { min-width:0; max-width:none; }
 html body.saas-cartography #cp-filter-summary { display:none; }
 html body.saas-cartography #cp-clear-filters { align-self:end; }
 html body.saas-console .portfolio-hero { gap:12px; padding:12px 0; margin-bottom:12px; }
 html body.saas-console .portfolio-actions { width:100%; gap:6px; }
 html body.saas-console .portfolio-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); margin:12px 0; }
 html body.saas-console .portfolio-metrics article { min-height:64px; padding:10px 12px; }
 html body.saas-console .portfolio-metrics strong { font-size:18px; margin:4px 0; }
 html body.saas-console .portfolio-toolbar { grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin-bottom:12px; }
 html body.saas-console .portfolio-toolbar label:first-child { grid-column:1/-1; }
 html body.saas-console .portfolio-toolbar select { padding-inline:8px 20px !important; }
 html body.saas-console .portfolio-section-head { margin-bottom:8px; gap:0; }
 html body.saas-console .portfolio-section-head p { margin:4px 0 0; }
 html body.saas-console.taxi-control-surface .tcp-workbench-header { align-items:stretch; flex-direction:column; }
 html body.saas-console.taxi-control-surface .tcp-workbench-header .toolbar { display:flex; flex-wrap:wrap; width:100%; gap:8px; }
 html body.saas-console.taxi-control-surface .tcp-workbench-header .toolbar > button { flex:0 1 auto !important; width:auto !important; min-width:0; }
 html body.saas-console.taxi-control-surface .tcp-workbench-header button:disabled { display:none !important; }
}

/* Control center density: records and controls share a compact operational rhythm. */
html:root { --saas-sidebar:208px; --saas-control-height:32px; --saas-workspace-gap:12px; }
html body.saas-console .saas-stack:not(details):not([hidden]):not(.saas-hidden):not([data-mobile-active="false"]) { display:grid; gap:12px; min-width:0; }
html body.saas-console .saas-form-grid { display:grid !important; grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr)); gap:12px; align-items:start; min-width:0; }
html body.saas-console .saas-form-grid > * { min-width:0; }
html body.saas-console .saas-editor-grid { grid-template-columns:minmax(0,1fr) minmax(260px,.7fr); }
html body.saas-console .saas-section-heading { display:flex; flex-wrap:wrap; gap:10px; align-items:center; justify-content:space-between; }
html body.saas-console .saas-section-heading > div { min-width:0; }
html body.saas-console :is(.saas-section-kicker,.esim-section-kicker) { display:none !important; }
html body.saas-console .saas-section-heading:has(> .saas-section-kicker:only-child) { display:none; }
html body.saas-console .saas-sr-only { position:absolute !important; width:1px !important; height:1px !important; padding:0 !important; margin:-1px !important; overflow:hidden !important; clip-path:inset(50%); white-space:nowrap !important; border:0 !important; }
html body.saas-console :is(.saas-disclosure,.saas-inline-help) > summary { cursor:pointer; font-weight:600; padding:10px 0; color:var(--saas-text); }
html body.saas-console .saas-disclosure { min-width:0; }
html body.saas-console .saas-disclosure > .saas-disclosure-body { display:grid; gap:12px; padding:4px 0 12px; min-width:0; }
html body.saas-console .saas-inline-help { font-size:12px; color:var(--saas-muted); }
html body.saas-console .saas-inline-help > summary { color:var(--saas-link); font-weight:500; padding:4px 0; }
html body.saas-console .saas-inline-help p { margin:8px 0 0; max-width:75ch; }
html body.saas-console :is(.saas-field,.field,.esim-field) { min-width:0; }
html body.saas-console :is(.saas-table-wrap,.table-wrap,.registry-table-wrap,.audit-table-wrap,.esim-table-wrap) { min-width:0; max-width:100%; }
html body.saas-console :is(.saas-toolbar,.toolbar,.portfolio-actions) { gap:6px; }
html body.saas-console :is(.saas-page-header,.saas-page-hero,.portfolio-hero) { align-items:center; }
html body.saas-console :is(.saas-page-header,.saas-page-hero,.portfolio-hero) p { max-width:75ch; }
html body.saas-console :is(.saas-page-header,.saas-page-hero,.portfolio-hero) h1 { margin:0 !important; }
html body.saas-console .saas-shell > .metrics + .saas-card .metrics { border:0 !important; border-radius:0 !important; }
html body.saas-console .saas-shell > .metrics + .saas-card .metric { border:0 !important; }
html body.saas-console .saas-compact-note { margin:0; color:var(--saas-muted); font-size:12px; }
html body.saas-console .saas-mobile-nav a { min-width:0; }
html body.saas-console .esim-settings-form { max-width:760px; }
html body.saas-console .esim-empty { border-style:solid; }
@media (min-width:641px) {
  html body.saas-console { font-size:13px; }
  html body.saas-console.saas-has-sidebar :is(.saas-shell,#restoConsole,.wrap) { width:calc(100% - var(--saas-sidebar) - 32px) !important; max-width:none !important; margin-left:calc(var(--saas-sidebar) + 16px) !important; margin-right:16px !important; }
  html body.saas-console :is(.saas-shell,.overview-shell,.businesses-shell,.settings-shell) { gap:12px !important; }
  html body.saas-console .saas-desktop-sidebar nav a { min-height:34px; padding-top:7px; padding-bottom:7px; }
  html body.saas-console .saas-sidebar-brand { min-height:54px !important; padding:12px 16px !important; }
  html body.saas-console .saas-module-subnav button { min-height:30px; padding:6px 10px; }
  html body.saas-console :is(.btn,.button,.saas-btn,.cp-button,.cp-inline-button,.cp-vps-button) { min-height:32px !important; padding:6px 10px !important; font-size:12px !important; line-height:18px !important; }
  html body.saas-console :is(.saas-input,.saas-select,.input,.select,.search-input,input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select) { min-height:32px !important; height:32px; padding:0 9px !important; font-size:13px !important; }
  html body.saas-console textarea { height:auto !important; min-height:80px !important; padding:8px 10px !important; }
  html body.saas-console :is(.saas-field,.field) { gap:4px !important; }
  html body.saas-console :is(.saas-card,.saas-panel,.card,.preview-card,.subtle-panel) { padding:12px !important; }
  html body.saas-console :is(.saas-page-header,.saas-page-hero,.portfolio-hero) { padding:8px 0 12px !important; margin-bottom:4px !important; gap:12px; }
  html body.saas-console :is(.saas-page-header,.saas-page-hero,.portfolio-hero) h1 { font-size:20px !important; line-height:1.3 !important; }
  html body.saas-console :is(.saas-page-header,.saas-page-hero,.portfolio-hero) p { margin:4px 0 0; font-size:12px; }
  html body.saas-console :is(.saas-card,.card,.saas-panel) :is(h2,h3) { margin:0; font-size:16px; line-height:1.4; }
  html body.saas-console :is(.saas-card,.card,.saas-panel) p { margin-top:0; margin-bottom:0; }
  html body.saas-console :is(.metric,.stat,.kpi,.overview-kpi,.mini,.vps-kpi) { min-height:54px !important; padding:10px 12px !important; }
  html body.saas-console :is(.metrics,.kpi-strip,.overview-kpi-grid,.vps-insight-grid,.mini-grid) > :is(.metric,.stat,.kpi,.overview-kpi,.mini,.vps-kpi) { min-height:54px !important; }
  html body.saas-console :is(.metric b,.stat b,.value,.vps-kpi-value) { font-size:20px !important; margin-top:4px !important; }
  html body.saas-console :is(table,.saas-table,.list-table,.audit-table,.esim-table) :is(th,td) { padding:8px 10px !important; font-size:13px; line-height:1.4; }
  html body.saas-console :is(table,.saas-table,.list-table,.audit-table,.esim-table) th { font-size:11px !important; }
  html body.saas-console :is(.workspace-switch,.tabs,.periods,.saas-wide-tabs,.esim-nav) { padding:0 !important; border:0 !important; border-bottom:1px solid var(--saas-line) !important; border-radius:0 !important; background:transparent !important; box-shadow:none !important; gap:4px !important; }
  html body.saas-console :is(.workspace-switch,.saas-wide-tabs,.esim-nav) > button { border:0 !important; border-radius:0 !important; background:transparent !important; color:var(--saas-muted) !important; }
  html body.saas-console :is(.workspace-switch,.saas-wide-tabs,.esim-nav) > button:is(.active,.saas-btn-primary,[aria-selected=true]) { color:var(--saas-primary) !important; box-shadow:inset 0 -2px var(--saas-primary) !important; }
  html body.saas-console .vps-shell .vps-backup-catalog { gap:12px !important; }
  html body.saas-console .vps-workspace-tabs { margin-bottom:12px !important; }
  html body.saas-console .vps-catalog-table .vps-row-details { margin-top:2px; }
  html body.saas-console .vps-settings > summary { padding:12px 0; }
  html body.saas-console .esim-section-head { padding-bottom:10px; margin-bottom:10px; }
  html body.saas-console :is(.esim-portfolio-row,.esim-service-rail,.esim-client-group-head) { padding:10px 12px; }
  html body.saas-console .esim-filterbar { grid-template-columns:minmax(200px,320px) minmax(160px,220px); justify-content:start; gap:8px; }
  html body.saas-cartography .cp-main { padding:12px 16px 40px; }
  html body.saas-cartography .cp-topbar { min-height:32px; margin-bottom:10px; padding-bottom:8px; }
  html body.saas-cartography .cp-hero { margin-bottom:10px; }
  html body.saas-cartography .cp-hero h1 { font-size:20px; }
  html body.saas-cartography .cp-command { min-height:36px; padding:4px 10px; }
  html body.saas-cartography .cp-command-wrap { margin-bottom:12px; }
  html body.saas-cartography .cp-map { padding:10px 12px; }
  html body.saas-cartography .cp-map-header p { font-size:12px; }
  html body.saas-cartography .cp-metric { min-height:52px; padding:8px 12px; }
  html body.saas-cartography .cp-metric strong { font-size:20px; }
  html body.saas-cartography .cp-panel-head { padding:10px 12px; }
  html body.saas-cartography .cp-atlas-toolbar { padding:10px 12px; gap:8px; }
  html body.saas-cartography .cp-atlas-filter { flex:0 1 180px; }
  html body.saas-cartography .cp-atlas-filter select { min-height:32px; }
  html body.saas-cartography #atlas .cp-table :is(th,td) { padding:8px 10px; height:auto; font-size:13px; line-height:1.4; }
  html body.saas-cartography .cp-grid { gap:12px; }
}
@media (max-width:900px) {
  html body.saas-console .saas-editor-grid { grid-template-columns:minmax(0,1fr); }
}
@media (max-width:640px) {
  html:root { --saas-control-height:44px; }
  html body.saas-console .saas-form-grid { grid-template-columns:minmax(0,1fr); gap:12px; }
  html body.saas-console :is(.saas-stack,.saas-form-grid,.saas-disclosure) > * { min-width:0; }
  html body.saas-console :is(.saas-input,.saas-select,.input,.select,input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select) { min-height:44px !important; font-size:16px !important; }
  html body.saas-console :is(.saas-page-header,.portfolio-hero,.saas-section-heading) { flex-wrap:wrap; }
  html body.saas-console :is(.saas-toolbar,.toolbar) { flex-wrap:wrap; max-width:100%; }
  html body.saas-console .saas-disclosure > summary { min-height:44px; padding:12px 0; }
  html body.saas-console :is(.saas-modal-card,.cp-dialog) { max-width:calc(100vw - 24px); max-height:calc(100dvh - 24px); overflow:auto; }
  html body.saas-console .saas-app-shell { padding-bottom:96px !important; }
}
/* Utility visibility must outrank the base button/table display rules. */
html body.saas-console .saas-hidden { display:none !important; }
@media(min-width:641px) {
 html body.saas-console .saas-desktop-sidebar nav a { min-height:34px !important; padding:7px 10px !important; }
}
html body.saas-cartography .cp-secondary { margin:0 12px 12px; }
html body.saas-cartography .cp-secondary > summary { font-size:12px; }
html body.saas-cartography .cp-secondary :is(.cp-list,.cp-adapter-list,.cp-runbook-list) { margin:0; padding:0; }
@media(min-width:641px) {
 html body.saas-console .qr-preview { min-height:140px; padding:12px; border-style:solid; }
 html body.saas-console .qr-preview img { width:132px; height:132px; border-radius:8px; padding:6px; }
 html body.saas-console #qrForm { grid-template-columns:minmax(0,1fr) minmax(0,1.5fr); }
 html body.saas-console #qrForm .saas-toolbar { grid-column:1/-1; }
 html body.saas-console .esim-filterbar { display:grid; }
}
@media(min-width:1200px) {
 html body.saas-console #auditFilters { grid-template-columns:repeat(6,minmax(0,1fr)); }
}
@media(max-width:640px) {
 html body.saas-console :is(.saas-wide-tabs,.workspace-switch,.esim-nav) button { min-height:44px !important; }
 html body.saas-console label:has(> input:is([type=checkbox],[type=radio])) { display:inline-flex; align-items:center; gap:8px; min-height:44px; }
 html body.saas-console .cp-secondary > summary { min-height:44px; }
}
html body.saas-console .esim-command-bar { min-width:0; }
html body.saas-console .esim-command-bar > div { min-width:0; }
@media(min-width:641px) {
 html body.saas-console .esim-command-bar { grid-template-columns:minmax(0,1fr) auto; padding:8px 0 12px !important; margin-bottom:12px !important; }
 html body.saas-console .esim-command-bar h1 { font-size:20px !important; line-height:1.3 !important; }
 html body.saas-console .esim-command-bar p { font-size:12px; margin:4px 0 0; }
 html body.saas-console .esim-empty { border-style:solid !important; padding:16px !important; }
}
@media(min-width:641px) and (max-width:1000px) {
 html body.saas-console .esim-command-bar,html body.saas-console .esim-section-head { grid-template-columns:minmax(0,1fr); }
 html body.saas-console .esim-dashboard-filters { width:100%; max-width:100%; grid-template-columns:repeat(2,minmax(0,1fr)); }
 html body.saas-console .esim-dashboard-filters .saas-input { min-width:0; width:100%; }
}
html body.saas-console .saas-filter-disclosure > summary { cursor:pointer; font-weight:600; padding:8px 0; margin-bottom:8px; }
html body.saas-console .saas-filter-disclosure > .saas-toolbar { margin-top:10px; }
@media(max-width:640px) {
 html body.saas-console :is(.saas-card,.card,.saas-panel) :is(h2,h3) { font-size:18px; line-height:1.4; }
 html body.saas-console .saas-filter-disclosure > summary { min-height:44px; padding:12px 0; margin:0; }
}
/* Portfolio is an operational register; keep its facts in rows on desktop. */
@media(min-width:641px) {
 html body.saas-console .portfolio-metrics { margin:12px 0; }
 html body.saas-console .portfolio-metrics article { min-height:64px; padding:10px 12px; }
 html body.saas-console .portfolio-metrics strong { margin:4px 0 2px; font-size:20px; }
 html body.saas-console .portfolio-toolbar { margin:12px 0; }
 html body.saas-console .portfolio-grid { grid-template-columns:minmax(0,1fr); gap:0; border:1px solid var(--saas-line); border-radius:12px; overflow:hidden; }
 html body.saas-console .portfolio-card { display:grid; grid-template-columns:minmax(0,1.2fr) 110px minmax(0,1.8fr) auto; grid-template-rows:auto auto auto; gap:6px 16px; padding:12px; border:0; border-bottom:1px solid var(--saas-line); background:var(--saas-surface); }
 html body.saas-console .portfolio-card:last-child { border-bottom:0; }
 html body.saas-console .portfolio-card h3 { grid-column:1; grid-row:1; margin:0; font-size:14px; }
 html body.saas-console .portfolio-card > p { grid-column:1; grid-row:2; font-size:12px; line-height:1.4; margin:0; }
 html body.saas-console .portfolio-card-top { grid-column:1; grid-row:3; justify-content:flex-start; flex-wrap:wrap; gap:6px; }
 html body.saas-console .portfolio-family { margin-left:6px; font-size:11px; }
 html body.saas-console .portfolio-card .portfolio-score { grid-column:2; grid-row:1/4; align-self:center; margin:0; display:flex; flex-wrap:wrap; gap:6px; }
 html body.saas-console .portfolio-score-bar { flex-basis:100%; }
 html body.saas-console .portfolio-card-meta { grid-column:3; grid-row:1/4; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; border:0; align-self:center; }
 html body.saas-console .portfolio-card-meta div { border:0; padding:0; min-width:0; overflow-wrap:anywhere; }
 html body.saas-console .portfolio-card-meta dt { font-size:11px; letter-spacing:0; text-transform:none; }
 html body.saas-console .portfolio-card-meta dd { margin:4px 0 0; font-size:12px; }
 html body.saas-console .portfolio-card-actions { grid-column:4; grid-row:1/4; display:grid; align-content:center; gap:6px; padding:0; margin:0; }
 html body.saas-console.taxi-control-surface .compact-page-title { min-height:32px; gap:12px; }
 html body.saas-console.taxi-control-surface .compact-page-title h2 { font:700 20px/1.3 var(--saas-font) !important; letter-spacing:-.02em !important; }
 html body.saas-console.taxi-control-surface .kpi-strip > .card { min-height:54px !important; padding:10px 12px !important; border:0 !important; border-radius:0 !important; }
 html body.saas-console.taxi-control-surface .kpi-strip > .card:not(:last-child) { border-right:1px solid var(--saas-line) !important; }
 html body.saas-console.taxi-control-surface .kpi-strip .kpi-value { font-size:20px !important; margin-top:4px !important; }
 html body.saas-console.taxi-control-surface .content { padding:12px 16px 40px !important; }
}
@media(min-width:641px) and (max-width:1199px) {
 html body.saas-console .portfolio-card { grid-template-columns:minmax(0,1fr) 100px auto; }
 html body.saas-console .portfolio-card-meta { grid-column:1/-1; grid-row:4; padding-top:8px; }
 html body.saas-console .portfolio-card-actions { grid-column:3; }
}
@media(max-width:640px) {
 html body.saas-console .portfolio-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); margin:12px 0; }
 html body.saas-console .portfolio-metrics article { min-height:70px; padding:10px 12px; }
 html body.saas-console .portfolio-card { padding:12px; }
 html body.saas-console .portfolio-card h3 { margin:10px 0 6px; }
 html body.saas-console .portfolio-card-meta { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 12px; }
 html body.saas-console .portfolio-card-meta div:last-child { grid-column:1/-1; }
}
/* Semantic layout primitives used by live/dynamic markup, not just empty pages. */
html body.saas-console .saas-row { display:flex; flex-wrap:wrap; align-items:center; gap:6px; min-width:0; }
html body.saas-console .saas-split { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; min-width:0; }
html body.saas-console .saas-switch { display:inline-flex; align-items:center; gap:8px; }
html body.saas-console .saas-empty { min-width:0; line-height:1.5; overflow-wrap:anywhere; }

/* BEGIN UIHCsmartia1.3.31 foundations1.1.0 actual host adoption */
/* Opt-in foundation roles, not global tokens or a replacement for existing families. */
[data-ui-system="UIHCsmartia"][data-uihc-foundations] {
 --uihc-shadow-task-dialog:initial;--uihc-shadow-task-menu:initial;--uihc-ring-task:initial;--uihc-surface-task:initial;--uihc-surface-task-menu:initial;--uihc-scrim-task:initial;--uihc-surface-legacy-drawer:initial;--uihc-overlay-legacy-drawer:initial;--uihc-shadow-legacy-drawer:initial;--uihc-border-legacy-status:initial;--uihc-shadow-legacy-status:initial;
 --uihc-space-field-label:6px;--uihc-space-field-stack:16px;--uihc-space-action-inline:8px;--uihc-space-primary-block:40px;
 --uihc-space-menu-inset:4px;--uihc-space-menu-row-gap:4px;--uihc-space-menu-row-block:10px;--uihc-space-menu-row-inline:12px;
 --uihc-space-dialog-lane:36px;--uihc-space-dialog-lane-phone:16px;--uihc-space-dialog-bottom:32px;--uihc-space-scrim-desktop:32px;

 /* Host semantic order. Source1300/100000 raw values are evidence, not copied API. */
 --uihc-layer-content:0;--uihc-layer-sticky:10;--uihc-layer-floating-action:20;--uihc-layer-modal-backdrop:100;--uihc-layer-dialog:110;--uihc-layer-nested-backdrop:120;--uihc-layer-nested-dialog:130;--uihc-layer-menu:140;
}
[data-ui-system="UIHCsmartia"][data-uihc-foundations] [data-uihc-icon]{display:block;flex:none;}
[data-ui-system="UIHCsmartia"][data-uihc-foundations] [data-uihc-icon-role="control"]{width:16px;height:16px;}
[data-ui-system="UIHCsmartia"][data-uihc-foundations] [data-uihc-icon-role="header"]{width:20px;height:20px;}
[data-ui-system="UIHCsmartia"][data-uihc-foundations] [data-uihc-icon-button]{display:inline-flex;align-items:center;justify-content:center;flex:none;padding:0;border:0;background:transparent;color:inherit;cursor:pointer;}
[data-ui-system="UIHCsmartia"][data-uihc-foundations] [data-uihc-icon-button="close"]{width:32px;height:32px;}
[data-ui-system="UIHCsmartia"][data-uihc-foundations] [data-uihc-icon-button="header"]{width:40px;height:40px;}
/* Explicit owner touch adaptation; not a source32/40px measurement. */
[data-ui-system="UIHCsmartia"][data-uihc-foundations] [data-uihc-icon-button="touch"]{width:44px;height:44px;}
[data-ui-system="UIHCsmartia"][data-uihc-foundations] .uihc-foundation-field{display:flex;flex-direction:column;gap:var(--uihc-space-field-label);}
[data-ui-system="UIHCsmartia"][data-uihc-foundations] .uihc-foundation-stack{display:flex;flex-direction:column;gap:var(--uihc-space-field-stack);}
[data-ui-system="UIHCsmartia"][data-uihc-foundations] .uihc-foundation-actions{display:flex;align-items:center;gap:var(--uihc-space-action-inline);}
[data-ui-system="UIHCsmartia"][data-uihc-foundations] .uihc-foundation-menu{display:flex;flex-direction:column;gap:var(--uihc-space-menu-row-gap);padding:var(--uihc-space-menu-inset);border:1px solid var(--uihc-border,currentColor);border-radius:10px;background:var(--uihc-surface-task-menu,var(--uihc-surface,Canvas));box-shadow:var(--uihc-shadow-task-menu,none);z-index:var(--uihc-layer-menu);}
[data-ui-system="UIHCsmartia"][data-uihc-foundations] .uihc-foundation-menu[hidden]{display:none;}
[data-ui-system="UIHCsmartia"][data-uihc-foundations] .uihc-foundation-option{height:40px;box-sizing:border-box;padding:var(--uihc-space-menu-row-block) var(--uihc-space-menu-row-inline);border:0;background:transparent;color:inherit;text-align:start;cursor:pointer;font:inherit;border-radius:8px;}
[data-ui-system="UIHCsmartia"][data-uihc-foundations] .uihc-foundation-option:is(:hover,:focus-visible){background:var(--uihc-hover,transparent);}
[data-ui-system="UIHCsmartia"][data-uihc-foundations] :is(button,input,textarea):focus-visible{outline:2px solid var(--uihc-focus,#639aff);outline-offset:2px;}
@media(prefers-reduced-motion:reduce){[data-ui-system="UIHCsmartia"][data-uihc-foundations] .uihc-foundation-frame{animation:none;transition:none;}}

/* Separate legacy MUI filter family: opt-in tokens only, not modern Task defaults. */
[data-ui-system="UIHCsmartia"][data-uihc-foundations] {
 
 
 --uihc-radius-legacy-status:10px;
 --uihc-space-legacy-list-block:8px;--uihc-space-legacy-list-inline:0px;--uihc-space-legacy-phone-gutter:16px;--uihc-size-legacy-option:36px;
}

/* Explicit dark-source family opt-in; light tokens are not inferred or overridden. */
[data-ui-system="UIHCsmartia"][data-uihc-foundations][data-uihc-source-mode="dark"]:not([data-ui-mode="light"]){
 --uihc-shadow-task-dialog:0 10px 15px -3px rgb(0 0 0 / .1),0 4px 6px -4px rgb(0 0 0 / .1);--uihc-shadow-task-menu:0 1px 2px rgb(0 0 0 / .05);--uihc-ring-task:0 0 0 1px lab(15.7305 .613764 -2.16959);--uihc-surface-task:rgb(26 26 26);--uihc-surface-task-menu:lab(6.26444 0 0);--uihc-scrim-task:rgb(0 0 0 / .5);--uihc-surface-legacy-drawer:rgb(31 31 31);--uihc-overlay-legacy-drawer:linear-gradient(rgb(255 255 255 / .15),rgb(255 255 255 / .15));--uihc-shadow-legacy-drawer:0 8px 10px -5px rgb(0 0 0 / .2),0 16px 24px 2px rgb(0 0 0 / .14),0 6px 30px 5px rgb(0 0 0 / .12);--uihc-border-legacy-status:2px solid #5d85ea;--uihc-shadow-legacy-status:none;
}
[data-ui-system="UIHCsmartia"][data-uihc-foundations] [data-ui-mode="light"]{--uihc-shadow-task-dialog:initial;--uihc-shadow-task-menu:initial;--uihc-ring-task:initial;--uihc-surface-task:initial;--uihc-surface-task-menu:initial;--uihc-scrim-task:initial;--uihc-surface-legacy-drawer:initial;--uihc-overlay-legacy-drawer:initial;--uihc-shadow-legacy-drawer:initial;--uihc-border-legacy-status:initial;--uihc-shadow-legacy-status:initial;}


/* Hide owned scrollbar chrome, preserve native scrolling and focus reachability. */
[data-ui-system="UIHCsmartia"][data-uihc-foundations] :where(textarea,[data-uihc-scroll]){scrollbar-width:none;}
[data-ui-system="UIHCsmartia"][data-uihc-foundations] :where(textarea,[data-uihc-scroll])::-webkit-scrollbar{display:none;}

[data-ui-system="UIHCsmartia"][data-uihc-foundations] [data-uihc-icon-role="navigation"]{width:18px;height:18px;}
[data-ui-system="UIHCsmartia"][data-uihc-foundations] [data-uihc-icon-role="prominent"]{width:24px;height:24px;}

/* Files toolbar: source glyph16/target36; coarse-pointer44 is a host adaptation. */
[data-ui-system="UIHCsmartia"][data-uihc-foundations] [data-uihc-icon-button="toolbar"]{width:36px;height:36px;border-radius:8px;}
@media(pointer:coarse){[data-ui-system="UIHCsmartia"][data-uihc-foundations] [data-uihc-icon-button]:is([data-uihc-icon-button="header"],[data-uihc-icon-button="toolbar"]){min-width:44px;min-height:44px;}}

/* END UIHCsmartia1.3.31 foundations */

/* Map into existing SaaS component owners, preserving host auth and native dialog lifecycle. */
html[data-uihc-skill="1.3.31"] body :is(.cp-account-popover,.saas-account-popover){padding:var(--uihc-space-menu-inset);gap:var(--uihc-space-menu-row-gap);border-radius:10px;background:var(--saas-surface);box-shadow:var(--uihc-shadow-task-menu,none);}
html[data-uihc-skill="1.3.31"] body :is(.cp-dialog,.saas-dialog) label{gap:var(--uihc-space-field-label);}
html[data-uihc-skill="1.3.31"] body :is(.cp-dialog,.saas-dialog)>form{gap:var(--uihc-space-field-stack);}
html[data-uihc-skill="1.3.31"] body :is(.cp-dialog,.saas-dialog) menu{gap:var(--uihc-space-action-inline);}
html[data-uihc-skill="1.3.31"] body :is(.saas-nav-icon,.cp-nav svg){width:18px;height:18px;flex:none;}
html[data-uihc-skill="1.3.31"] .saas-mobile-more-sheet{box-shadow:var(--uihc-shadow-legacy-drawer,none);}

/* UIHC compact account-control owner. Explicit important declarations retire
   earlier shared blanket font shorthands only inside this account surface. */
html[data-uihc-skill="1.3.31"] body.saas-console .cp-account-popover,
html[data-uihc-skill="1.3.31"] body.saas-console .cp-account-popover .saas-palette-field,
html[data-uihc-skill="1.3.31"] body.saas-console .cp-account-popover .cp-account-action,
html[data-uihc-skill="1.3.31"] body.saas-console .cp-account-popover .cp-account-action span {
  font-size:14px !important;
  line-height:20px !important;
}
html[data-uihc-skill="1.3.31"] body.saas-console .cp-account-popover .saas-palette-field select,
html[data-uihc-skill="1.3.31"] body.saas-console .cp-account-popover .cp-account-action {
  box-sizing:border-box;
  font-size:14px !important;
  line-height:20px !important;
  min-height:40px !important;
  height:40px !important;
}
@media (max-width:639px) {
  html[data-uihc-skill="1.3.31"] body.saas-console .cp-account-popover .saas-palette-field select {
    font-size:16px !important;
    line-height:24px !important;
    min-height:44px !important;
    height:44px !important;
  }
  html[data-uihc-skill="1.3.31"] body.saas-console .cp-account-popover .cp-account-action {
    min-height:44px !important;
    height:44px !important;
  }
}

/* UIHCsmartia1.3.30 feedback1.0.0; semantic host tones, not source API-error parity. */
/* Opt-in feedback owner. Host semantic mappings remain authoritative outside the measured dark-source variant. */
[data-ui-system="UIHCsmartia"][data-uihc-feedback] {
  --uihc-feedback-bg:var(--uihc-host-feedback-bg,transparent);
  --uihc-feedback-fg:var(--uihc-host-feedback-fg,inherit);
  --uihc-feedback-ring:var(--uihc-host-feedback-ring,inset 0 0 0 1px currentColor);
  --uihc-feedback-command-bg:var(--uihc-host-command-bg,transparent);
  --uihc-feedback-command-ring:var(--uihc-host-command-ring,inset 0 0 0 1px currentColor);
  --uihc-notification-popover-bg:var(--uihc-host-popover-bg,Canvas);
  --uihc-notification-popover-fg:var(--uihc-host-popover-fg,CanvasText);
  --uihc-notification-popover-shadow:var(--uihc-host-popover-shadow,none);
}
[data-ui-system="UIHCsmartia"][data-uihc-feedback][data-uihc-source-mode="dark"]:not([data-ui-mode="light"]) {
  --uihc-feedback-bg:oklab(.637009 .214185 .101411 / .1);
  --uihc-feedback-fg:lab(63.7053 60.745 31.3109);
  --uihc-feedback-ring:inset 0 0 0 1px oklab(.704006 .176798 .0722319 / .1);
  --uihc-feedback-command-bg:oklab(.637009 .214185 .101411 / .05);
  --uihc-feedback-command-ring:inset 0 0 0 1px oklab(.704006 .176798 .0722319 / .2);
  --uihc-notification-popover-bg:lab(6.26444 0 0);
  --uihc-notification-popover-fg:var(--uihc-host-popover-fg,white);
  /* Source Notification only: distinct from modern Task popup, not a global elevation default. */
  --uihc-notification-popover-shadow:-2px -2px 25px -5px oklab(.704998 .00414386 -.0143967 / .2),0 8px 10px -6px oklab(.704998 .00414386 -.0143967 / .2);
}
[data-ui-system="UIHCsmartia"][data-uihc-feedback] [data-ui-mode="light"] {
  --uihc-feedback-bg:var(--uihc-host-feedback-bg,transparent);
  --uihc-feedback-fg:var(--uihc-host-feedback-fg,inherit);
  --uihc-feedback-ring:var(--uihc-host-feedback-ring,inset 0 0 0 1px currentColor);
  --uihc-feedback-command-bg:var(--uihc-host-command-bg,transparent);
  --uihc-feedback-command-ring:var(--uihc-host-command-ring,inset 0 0 0 1px currentColor);
  --uihc-notification-popover-bg:var(--uihc-host-popover-bg,Canvas);
  --uihc-notification-popover-fg:var(--uihc-host-popover-fg,CanvasText);
  --uihc-notification-popover-shadow:var(--uihc-host-popover-shadow,none);
}
[data-ui-system="UIHCsmartia"][data-uihc-feedback] .uihc-feedback-notice {
  box-sizing:border-box; display:flex; align-items:flex-start; padding:16px;
  border:0; border-radius:8px; background:var(--uihc-feedback-bg);
  color:var(--uihc-feedback-fg); box-shadow:var(--uihc-feedback-ring);
  font:400 14px/20px var(--uihc-font,system-ui,sans-serif);
}
[data-ui-system="UIHCsmartia"][data-uihc-feedback] .uihc-feedback-notice > [data-uihc-feedback-icon] {
  display:block; flex:none; width:20px; height:20px; margin-inline-end:12px;
}
[data-ui-system="UIHCsmartia"][data-uihc-feedback] .uihc-feedback-content {
  display:flex; flex:1; min-width:0; flex-wrap:wrap; align-items:flex-start; gap:8px;
}
[data-ui-system="UIHCsmartia"][data-uihc-feedback] .uihc-feedback-content > p {
  min-width:0; margin:0; overflow-wrap:anywhere; font:inherit;
}
[data-ui-system="UIHCsmartia"][data-uihc-feedback] .uihc-feedback-action {
  flex:none; padding:0; border:0; background:transparent; color:inherit;
  text-decoration:none; font:inherit; cursor:pointer;
}
[data-ui-system="UIHCsmartia"][data-uihc-feedback] .uihc-feedback-action:focus-visible {
  outline:2px solid currentColor; outline-offset:3px;
}
[data-ui-system="UIHCsmartia"][data-uihc-feedback] .uihc-feedback-action:disabled {
  cursor:wait; text-decoration:none;
}
[data-ui-system="UIHCsmartia"][data-uihc-feedback] .uihc-notification-popover {
  box-sizing:border-box; min-width:0; border:0; border-radius:10px;
  background:var(--uihc-notification-popover-bg); color:var(--uihc-notification-popover-fg);
  box-shadow:var(--uihc-notification-popover-shadow);
}

/* Source compact command variant; no new success palette or action semantics. */
[data-ui-system="UIHCsmartia"][data-uihc-feedback] .uihc-feedback-action[data-uihc-feedback-command="compact"] {
  box-sizing:border-box; min-height:28px; padding:4px 8px; border:0; border-radius:8px;
  background:var(--uihc-feedback-command-bg); box-shadow:var(--uihc-feedback-command-ring);
  font:500 14px/20px var(--uihc-font,system-ui,sans-serif);
}

[data-ui-system="UIHCsmartia"][data-uihc-feedback] .uihc-feedback-notice[hidden]{display:none;}

html[data-uihc-skill="1.3.31"] body.saas-console .saas-notice-region{--uihc-host-feedback-bg:var(--saas-surface);--uihc-host-feedback-fg:var(--saas-text);--uihc-host-feedback-ring:inset 0 0 0 1px var(--saas-line);}
html[data-uihc-skill="1.3.31"] body.saas-console .saas-notice.uihc-feedback-notice{gap:0;justify-content:initial;}
html[data-uihc-skill="1.3.31"] body.saas-console .saas-notice-danger{--uihc-feedback-fg:var(--saas-danger);--uihc-feedback-ring:inset 0 0 0 1px color-mix(in srgb,var(--saas-danger) 30%,var(--saas-line));}
html[data-uihc-skill="1.3.31"] body.saas-console .saas-notice-warning{--uihc-feedback-fg:var(--saas-warning);--uihc-feedback-ring:inset 0 0 0 1px color-mix(in srgb,var(--saas-warning) 30%,var(--saas-line));}
html[data-uihc-skill="1.3.31"] body.saas-console .saas-notice .uihc-feedback-content>p{font:400 14px/20px var(--saas-font);}
html[data-uihc-skill="1.3.31"] body.saas-console .saas-notice-close{display:inline-flex;align-items:center;justify-content:center;flex:none;width:36px;min-width:36px;height:36px;min-height:36px!important;padding:0!important;margin:-8px -8px -8px 8px;border:0;background:transparent;color:inherit;border-radius:8px;}
@media(max-width:639px){html[data-uihc-skill="1.3.31"] body.saas-console .saas-notice-close{width:44px;min-width:44px;height:44px;min-height:44px!important;}}

html[data-uihc-skill="1.3.31"] body.saas-console label[data-uihc-file-label]{display:inline-flex;align-items:center;gap:8px;font-size:14px!important;line-height:20px!important;}
