/* ========================================================================== 
   Fleet Dynamics 2026 — Phase 119 Global UI Polish
   Final, non-destructive presentation layer. Window geometry remains owned by
   window-system.css; this file normalizes content layout and interaction UI.
   ========================================================================== */
:root{
  --fd-ui-fast:120ms;
  --fd-ui-normal:190ms;
  --fd-ui-slow:320ms;
  --fd-ui-ease:cubic-bezier(.2,.72,.22,1);
  --fd-ui-focus:rgba(126,224,255,.92);
  --fd-ui-gold:#ffd45c;
  --fd-ui-panel-line:rgba(205,241,255,.30);
  --fd-ui-panel-fill:rgba(255,255,255,.075);
  --fd-ui-panel-fill-hover:rgba(255,255,255,.12);
  --fd-ui-shadow:0 12px 30px rgba(0,14,38,.20);
}

/* Universal sizing and stable scrollbars. */
*,*::before,*::after{box-sizing:border-box;}
html{scrollbar-gutter:stable;}
body.fd-ui-polished{
  text-rendering:optimizeLegibility;
  -webkit-font-smoothing:antialiased;
}
body.fd-ui-polished :is(.dashboard,.sidebar,.vista-workarea,.vista-module-nav,.vista-details-pane,.vista-window-content,.vista-table-wrap,[class*="-table-wrap"],[class*="-scroll"]){
  scrollbar-gutter:stable;
}
body.fd-ui-polished :is(.dashboard,.sidebar,.vista-workarea,.vista-module-nav,.vista-details-pane,.vista-table-wrap,[class*="-table-wrap"]){
  scrollbar-width:thin;
  scrollbar-color:rgba(183,231,252,.46) rgba(0,35,65,.22);
}
body.fd-ui-polished :is(.dashboard,.sidebar,.vista-workarea,.vista-module-nav,.vista-details-pane,.vista-table-wrap,[class*="-table-wrap"])::-webkit-scrollbar{width:10px;height:10px;}
body.fd-ui-polished :is(.dashboard,.sidebar,.vista-workarea,.vista-module-nav,.vista-details-pane,.vista-table-wrap,[class*="-table-wrap"])::-webkit-scrollbar-track{background:rgba(0,35,65,.20);}
body.fd-ui-polished :is(.dashboard,.sidebar,.vista-workarea,.vista-module-nav,.vista-details-pane,.vista-table-wrap,[class*="-table-wrap"])::-webkit-scrollbar-thumb{
  border:2px solid transparent;
  border-radius:999px;
  background:linear-gradient(180deg,rgba(221,247,255,.66),rgba(77,158,199,.72)) padding-box;
}

/* Keyboard accessibility without changing mouse visuals. */
body.fd-ui-polished :is(button,a,input,select,textarea,[tabindex]):focus-visible{
  outline:2px solid var(--fd-ui-focus)!important;
  outline-offset:2px!important;
  box-shadow:0 0 0 4px rgba(87,190,238,.20)!important;
}

/* Main shell: keep sizing deterministic and improve glass separation. */
body.fd-ui-polished .app-shell{isolation:isolate;}
body.fd-ui-polished .dashboard{
  overflow:clip;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.28),0 10px 34px rgba(0,14,40,.12);
}
body.fd-ui-polished .hero-strip{min-width:0;}
body.fd-ui-polished .hero-strip>div:first-child{min-width:0;}
body.fd-ui-polished .hero-strip :is(h1,.subtitle,.breadcrumbs){overflow-wrap:anywhere;}
body.fd-ui-polished .hero-actions{align-content:center;}
body.fd-ui-polished .hero-actions button,
body.fd-ui-polished .round{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  line-height:1.1;
  white-space:nowrap;
}

/* Ribbon and navigation consistency. */
body.fd-ui-polished :is(.classic-menu-button,.admin-top-button,.ribbon-btn,.accordion-head,.nav-link,.quick-create button){
  transition:background var(--fd-ui-fast) ease,border-color var(--fd-ui-fast) ease,box-shadow var(--fd-ui-fast) ease,filter var(--fd-ui-fast) ease,color var(--fd-ui-fast) ease;
}
body.fd-ui-polished .ribbon-group{min-width:0;}
body.fd-ui-polished .ribbon-btn{
  min-width:58px;
  justify-content:center;
  border-radius:7px;
}
body.fd-ui-polished .ribbon-btn:hover{
  filter:brightness(1.08);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.42),0 3px 9px rgba(0,20,45,.16);
}
body.fd-ui-polished .ribbon-btn:active{filter:brightness(.98);}
body.fd-ui-polished .accordion-content>:is(button,.nav-link){
  min-width:0;
  align-items:center;
}
body.fd-ui-polished .accordion-content>:is(button,.nav-link)>span+*{min-width:0;}
body.fd-ui-polished .nav-link,
body.fd-ui-polished .quick-create button{
  border:1px solid transparent;
}
body.fd-ui-polished .nav-link:hover,
body.fd-ui-polished .quick-create button:hover{
  border-color:rgba(210,242,255,.20);
  background:linear-gradient(180deg,rgba(255,255,255,.20),rgba(255,255,255,.055));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.18);
}
body.fd-ui-polished .nav-link.selected{
  border-color:rgba(225,248,255,.34);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.30),0 4px 12px rgba(0,24,52,.14);
}

/* Stable dashboard grids. */
body.fd-ui-polished :is(.kpi-grid,.dashboard-grid,.quick-actions-grid,.payment-snapshot,.payment-calendar,.booking-grid,.booking-calendar-shell,.booking-calendar-card *)>*{min-width:0;}
body.fd-ui-polished .kpi-grid{
  grid-template-columns:repeat(4,minmax(0,1fr));
  align-items:stretch;
}
body.fd-ui-polished .dashboard-grid{
  grid-template-columns:repeat(4,minmax(0,1fr));
  align-items:stretch;
}
body.fd-ui-polished .kpi-card,
body.fd-ui-polished .glass-card{
  position:relative;
  transform:translateZ(0);
  transition:border-color var(--fd-ui-normal) ease,box-shadow var(--fd-ui-normal) ease,filter var(--fd-ui-normal) ease,background var(--fd-ui-normal) ease;
}
body.fd-ui-polished .kpi-card::after,
body.fd-ui-polished .glass-card::after{
  content:"";
  position:absolute;
  inset:-1px;
  z-index:0;
  pointer-events:none;
  opacity:0;
  background:linear-gradient(112deg,transparent 12%,rgba(255,255,255,.15) 39%,rgba(255,255,255,.03) 58%,transparent 82%);
  transform:translateX(-26%);
  transition:opacity var(--fd-ui-normal) ease,transform 520ms var(--fd-ui-ease);
}
body.fd-ui-polished .kpi-card:hover,
body.fd-ui-polished .glass-card:hover{
  border-color:rgba(224,248,255,.52);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.48),inset 0 0 0 1px rgba(255,255,255,.07),0 14px 32px rgba(0,15,42,.24);
}
body.fd-ui-polished .kpi-card:hover::after,
body.fd-ui-polished .glass-card:hover::after{opacity:1;transform:translateX(18%);}
body.fd-ui-polished :is(.kpi-card,.glass-card)>*{position:relative;z-index:1;}
body.fd-ui-polished .glass-card header{
  flex:0 0 auto;
  min-width:0;
}
body.fd-ui-polished .glass-card header h2{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body.fd-ui-polished .glass-card header button{
  flex:0 0 24px;
  width:24px;
  height:24px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0;
  line-height:1;
}
body.fd-ui-polished .panel-link{
  min-height:38px;
  display:flex;
  align-items:center;
}
body.fd-ui-polished .quick-actions-grid{
  grid-template-columns:repeat(2,minmax(0,1fr));
  align-content:start;
}
body.fd-ui-polished .quick-actions-grid button{
  width:100%;
  min-width:0;
  min-height:36px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:8px;
  line-height:1.15;
  text-align:left;
}

/* Calendar cells must not change dimensions on active/selected states. */
body.fd-ui-polished :is(.payment-calendar,.booking-grid,.mini-month,.picker-titlebar-date-weekdays,.picker-titlebar-date-grid,.picker-titlebar-hour-grid,.picker-titlebar-minute-grid){
  grid-auto-flow:row;
}
body.fd-ui-polished :is(.payment-calendar,.booking-grid,.mini-month,.picker-titlebar-date-weekdays,.picker-titlebar-date-grid)>*{
  min-width:0;
  box-sizing:border-box;
}
body.fd-ui-polished :is(.payment-calendar,.booking-grid,.mini-month) button,
body.fd-ui-polished :is(.payment-calendar,.booking-grid,.mini-month)>div{
  transition:background var(--fd-ui-fast) ease,border-color var(--fd-ui-fast) ease,box-shadow var(--fd-ui-fast) ease,filter var(--fd-ui-fast) ease;
}

/* Authoritative window content layout. Chrome geometry remains untouched. */
body.fd-ui-polished .vista-window.fd-window-managed{
  --fd-ui-sidebar:205px;
  --fd-ui-details:255px;
}
body.fd-ui-polished .vista-window.fd-window-managed .vista-window-content{
  grid-template-columns:var(--fd-ui-sidebar) minmax(0,1fr) var(--fd-ui-details);
  grid-template-rows:minmax(0,1fr);
  overflow:hidden;
}
body.fd-ui-polished .vista-window.fd-window-managed .vista-window-content>*{
  min-width:0;
  min-height:0;
}
body.fd-ui-polished .vista-window.fd-window-managed.fd-layout-compact{
  --fd-ui-sidebar:180px;
  --fd-ui-details:220px;
}
body.fd-ui-polished .vista-window.fd-window-managed.fd-layout-narrow .vista-window-content{
  grid-template-columns:170px minmax(0,1fr);
  grid-template-rows:minmax(0,1fr) auto;
}
body.fd-ui-polished .vista-window.fd-window-managed.fd-layout-narrow .vista-details-pane{
  grid-column:1/-1;
  max-height:210px;
  border-left:0;
  border-top:1px solid rgba(203,240,255,.23);
}
body.fd-ui-polished .vista-window.fd-window-managed.fd-layout-mobile .vista-window-content{
  display:flex;
  flex-direction:column;
  overflow:auto;
}
body.fd-ui-polished .vista-window.fd-window-managed.fd-layout-mobile .vista-module-nav{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:6px;
  overflow-x:auto;
  overflow-y:hidden;
  padding:8px;
  border-right:0;
  border-bottom:1px solid rgba(203,240,255,.23);
}
body.fd-ui-polished .vista-window.fd-window-managed.fd-layout-mobile .vista-nav-heading{display:none;}
body.fd-ui-polished .vista-window.fd-window-managed.fd-layout-mobile .vista-module-nav button{
  width:auto;
  min-width:max-content;
  min-height:32px;
  padding:6px 10px;
}
body.fd-ui-polished .vista-window.fd-window-managed.fd-layout-mobile .vista-workarea{flex:1 0 auto;overflow:visible;}
body.fd-ui-polished .vista-window.fd-window-managed.fd-layout-mobile .vista-details-pane{
  flex:0 0 auto;
  max-height:none;
  border-left:0;
  border-top:1px solid rgba(203,240,255,.23);
}

/* Toolbars: consistent sizing, centered labels, stable wrapping. */
body.fd-ui-polished .vista-module-toolbar{
  min-width:0;
  gap:7px;
  scrollbar-width:thin;
}
body.fd-ui-polished :is(.vista-tool,.vista-dialog-actions button,.module-ux-runtime-preview-actions button,.customer-contracts-runtime-front-tabs button,.customer-contracts-runtime-pill-button,[class*="-actions"]>button,[class*="-toolbar"]>button){
  align-items:center;
  justify-content:center;
  line-height:1.15;
  text-align:center;
}
body.fd-ui-polished .vista-tool{
  position:relative;
  min-height:32px;
  flex:0 0 auto;
  overflow:hidden;
  transition:background var(--fd-ui-fast) ease,border-color var(--fd-ui-fast) ease,box-shadow var(--fd-ui-fast) ease,filter var(--fd-ui-fast) ease,transform var(--fd-ui-fast) ease;
}
body.fd-ui-polished .vista-tool::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  opacity:0;
  background:linear-gradient(120deg,transparent 20%,rgba(255,255,255,.24),transparent 76%);
  transform:translateX(-120%);
}
body.fd-ui-polished .vista-tool:hover{
  transform:translateY(-1px);
  border-color:rgba(225,249,255,.56);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.50),0 4px 11px rgba(0,17,40,.18);
}
body.fd-ui-polished .vista-tool:hover::after{opacity:1;transform:translateX(120%);transition:transform 460ms var(--fd-ui-ease),opacity 100ms ease;}
body.fd-ui-polished .vista-tool:active{transform:translateY(0);filter:brightness(.96);}
body.fd-ui-polished .vista-tool:disabled{transform:none!important;filter:saturate(.45);opacity:.55;cursor:not-allowed;}
body.fd-ui-polished .vista-search{
  flex:0 1 280px;
  min-width:180px;
  transition:border-color var(--fd-ui-fast) ease,box-shadow var(--fd-ui-fast) ease,background var(--fd-ui-fast) ease;
}
body.fd-ui-polished .vista-search:focus{
  border-color:rgba(97,190,233,.85);
  background:#f5fcff;
  box-shadow:inset 0 1px 2px rgba(0,20,60,.12),0 0 0 3px rgba(92,194,240,.20);
}

/* Module navigation and work area. */
body.fd-ui-polished .vista-module-nav button{
  position:relative;
  min-width:0;
  border:1px solid transparent;
  transition:background var(--fd-ui-fast) ease,border-color var(--fd-ui-fast) ease,box-shadow var(--fd-ui-fast) ease,color var(--fd-ui-fast) ease;
}
body.fd-ui-polished .vista-module-nav button:hover{
  border-color:rgba(212,242,255,.20);
}
body.fd-ui-polished .vista-module-nav button.active{
  border-color:rgba(225,248,255,.28);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.30),0 3px 10px rgba(0,20,45,.12);
}
body.fd-ui-polished .vista-module-nav button.active::after{
  content:"";
  position:absolute;
  left:3px;
  top:7px;
  bottom:7px;
  width:2px;
  border-radius:2px;
  background:linear-gradient(180deg,#fff6a6,#ffb11d);
  box-shadow:0 0 7px rgba(255,211,77,.60);
}
body.fd-ui-polished .vista-workarea{overflow:auto;overscroll-behavior:contain;}

/* All metric grids are deterministic; JS supplies --fd-ui-grid-columns. */
body.fd-ui-polished :is(.module-hero,.customer-contracts-runtime-metrics,.expense-finance-expense-summary,.rental-record-metrics,.rental-ledger-metrics,.escrow-workflow-policy-cards,.routing-reports-tenant-grid,.application-shell-report-cards,.customer-contracts-runtime-card-grid){
  display:grid;
  grid-template-columns:repeat(var(--fd-ui-grid-columns,4),minmax(0,1fr));
  align-items:stretch;
}
body.fd-ui-polished :is(.module-hero,.customer-contracts-runtime-metrics,.expense-finance-expense-summary,.rental-record-metrics,.rental-ledger-metrics,.escrow-workflow-policy-cards,.routing-reports-tenant-grid,.application-shell-report-cards,.customer-contracts-runtime-card-grid)>*{
  min-width:0;
  height:100%;
}
body.fd-ui-polished :is(.module-stat,.customer-contracts-runtime-metrics>div,.expense-finance-expense-summary>*,.rental-record-metrics>*,.rental-ledger-metrics>*,.application-shell-report-cards>*){
  transition:background var(--fd-ui-fast) ease,border-color var(--fd-ui-fast) ease,box-shadow var(--fd-ui-fast) ease;
}
body.fd-ui-polished :is(.module-stat,.customer-contracts-runtime-metrics>div,.expense-finance-expense-summary>*,.rental-record-metrics>*,.rental-ledger-metrics>*,.application-shell-report-cards>*):hover{
  border-color:rgba(220,247,255,.42);
  background:linear-gradient(180deg,rgba(255,255,255,.23),rgba(255,255,255,.075));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.34),0 5px 14px rgba(0,20,48,.13);
}

/* Tables: no geometry changes on hover/selection. */
body.fd-ui-polished :is(.vista-table-wrap,[class*="-table-wrap"]){
  min-width:0;
  overscroll-behavior:contain;
}
body.fd-ui-polished :is(.vista-table,[class*="-table"]){
  max-width:100%;
}
body.fd-ui-polished .vista-table{
  border-collapse:separate;
  border-spacing:0;
}
body.fd-ui-polished .vista-table th,
body.fd-ui-polished .vista-table td{
  box-sizing:border-box;
  transition:background var(--fd-ui-fast) ease,color var(--fd-ui-fast) ease,box-shadow var(--fd-ui-fast) ease;
}
body.fd-ui-polished .vista-table th:first-child{border-top-left-radius:7px;}
body.fd-ui-polished .vista-table th:last-child{border-top-right-radius:7px;}
body.fd-ui-polished .vista-table tbody tr:nth-child(even):not(.selected) td{background:rgba(255,255,255,.018);}
body.fd-ui-polished .vista-table tbody tr:hover td{background:rgba(255,255,255,.075);}
body.fd-ui-polished .vista-table tbody tr.selected td,
body.fd-ui-polished .vista-table tbody tr[aria-selected="true"] td{
  background:linear-gradient(180deg,rgba(255,221,91,.24),rgba(255,255,255,.075))!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.25),inset 0 -1px 0 rgba(255,194,35,.12);
}
body.fd-ui-polished .vista-table tbody tr.selected td:first-child,
body.fd-ui-polished .vista-table tbody tr[aria-selected="true"] td:first-child{
  box-shadow:inset 3px 0 0 var(--fd-ui-gold),inset 0 1px 0 rgba(255,255,255,.25),inset 0 -1px 0 rgba(255,194,35,.12);
}

/* Details, forms, empty states. */
body.fd-ui-polished .vista-details-card{min-width:0;}
body.fd-ui-polished .detail-row{grid-template-columns:minmax(76px,94px) minmax(0,1fr);}
body.fd-ui-polished .detail-row span:last-child{min-width:0;}
body.fd-ui-polished .vista-form-grid{
  grid-template-columns:repeat(2,minmax(0,1fr));
  align-items:start;
}
body.fd-ui-polished .vista-field{min-width:0;}
body.fd-ui-polished .vista-field.full{grid-column:1/-1;}
body.fd-ui-polished :is(input,select,textarea){transition:border-color var(--fd-ui-fast) ease,box-shadow var(--fd-ui-fast) ease,background var(--fd-ui-fast) ease;}
body.fd-ui-polished :is(.vista-field input,.vista-field select,.vista-field textarea,[class*="-field"] input,[class*="-field"] select,[class*="-field"] textarea):focus{
  border-color:rgba(103,204,248,.88)!important;
  box-shadow:0 0 0 3px rgba(94,196,240,.18),inset 0 1px 2px rgba(0,30,60,.10)!important;
  outline:0!important;
}
body.fd-ui-polished .module-empty{
  min-height:190px;
  place-items:center;
  border:1px dashed rgba(204,239,255,.28);
  border-radius:9px;
  color:rgba(235,249,255,.78);
  background:radial-gradient(circle at 50% 30%,rgba(255,255,255,.075),transparent 55%);
  text-align:center;
}
body.fd-ui-polished .vista-dialog-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:8px;
}
body.fd-ui-polished .vista-dialog-actions button{min-width:90px;}

/* Dropdowns and popups receive consistent Aero depth. */
body.fd-ui-polished :is([class*="-dropdown"],[class*="-popup"],[class*="-popover"]){
  box-shadow:inset 0 1px 0 rgba(255,255,255,.40),0 18px 46px rgba(0,13,38,.42);
}
body.fd-ui-polished .toast{
  backdrop-filter:blur(15px) saturate(1.3);
  -webkit-backdrop-filter:blur(15px) saturate(1.3);
  transition:opacity var(--fd-ui-normal) ease,transform var(--fd-ui-normal) var(--fd-ui-ease);
}

/* Subtle one-time Aero entrance animations. */
@keyframes fdUiWindowEnter{
  from{opacity:0;transform:translate3d(0,7px,0) scale(.992);filter:saturate(.90) brightness(.94);}
  to{opacity:1;transform:translate3d(0,0,0) scale(1);filter:none;}
}
@keyframes fdUiCardEnter{
  from{opacity:0;transform:translate3d(0,5px,0);}
  to{opacity:1;transform:translate3d(0,0,0);}
}
body.fd-ui-polished .vista-window.fd-ui-enter:not(.is-maximized):not(.is-minimized){
  animation:fdUiWindowEnter 220ms var(--fd-ui-ease) both;
}
body.fd-ui-polished.fd-ui-first-paint :is(.kpi-card,.glass-card){
  animation:fdUiCardEnter 260ms var(--fd-ui-ease) both;
  animation-delay:calc(var(--fd-ui-order,0) * 22ms);
}
body.fd-ui-polished.fd-ui-gesture-active *,
body.fd-ui-polished.fd-ui-resizing *{animation:none!important;transition-duration:0ms!important;}

/* Responsive dashboard and forms. */
@media(max-width:1180px){
  body.fd-ui-polished .kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr));}
  body.fd-ui-polished .dashboard-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  body.fd-ui-polished .dashboard-grid>.span-4{grid-column:1/-1;}
}
@media(max-width:820px){
  body.fd-ui-polished .kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  body.fd-ui-polished .dashboard-grid{grid-template-columns:minmax(0,1fr);}
  body.fd-ui-polished .dashboard-grid>:is(.span-2,.span-4){grid-column:1/-1;}
  body.fd-ui-polished .hero-strip{align-items:flex-start;flex-direction:column;}
  body.fd-ui-polished .hero-actions{width:100%;justify-content:flex-start;}
  body.fd-ui-polished .vista-form-grid{grid-template-columns:minmax(0,1fr);}
  body.fd-ui-polished .vista-field.full{grid-column:auto;}
}
@media(max-width:520px){
  body.fd-ui-polished .kpi-grid{grid-template-columns:minmax(0,1fr);}
  body.fd-ui-polished .quick-actions-grid{grid-template-columns:minmax(0,1fr);}
  body.fd-ui-polished .hero-actions button:not(.round){flex:1 1 150px;}
  body.fd-ui-polished .vista-module-toolbar{gap:5px;padding:7px;}
  body.fd-ui-polished .vista-tool{min-height:34px;padding-inline:9px;}
  body.fd-ui-polished .vista-search{flex:1 0 100%;min-width:100%;}
}

@media(prefers-reduced-motion:reduce){
  body.fd-ui-polished *,body.fd-ui-polished *::before,body.fd-ui-polished *::after{
    scroll-behavior:auto!important;
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
    transition-duration:.01ms!important;
  }
}

/* Window-local metric responsiveness: prevent four squeezed columns in narrow windows. */
body.fd-ui-polished .vista-window.fd-layout-narrow :is(.module-hero,.customer-contracts-runtime-metrics,.expense-finance-expense-summary,.rental-record-metrics,.rental-ledger-metrics,.escrow-workflow-policy-cards,.routing-reports-tenant-grid,.application-shell-report-cards,.customer-contracts-runtime-card-grid),
body.fd-ui-polished .vista-window.fd-layout-mobile :is(.module-hero,.customer-contracts-runtime-metrics,.expense-finance-expense-summary,.rental-record-metrics,.rental-ledger-metrics,.escrow-workflow-policy-cards,.routing-reports-tenant-grid,.application-shell-report-cards,.customer-contracts-runtime-card-grid){
  grid-template-columns:repeat(2,minmax(0,1fr));
}
body.fd-ui-polished .vista-window.fd-layout-mobile :is(.module-stat,.customer-contracts-runtime-metrics>div,.expense-finance-expense-summary>*,.rental-record-metrics>*,.rental-ledger-metrics>*,.application-shell-report-cards>*){
  min-height:92px;
}
@media(max-width:340px){
  body.fd-ui-polished .vista-window.fd-layout-mobile :is(.module-hero,.customer-contracts-runtime-metrics,.expense-finance-expense-summary,.rental-record-metrics,.rental-ledger-metrics,.escrow-workflow-policy-cards,.routing-reports-tenant-grid,.application-shell-report-cards,.customer-contracts-runtime-card-grid){
    grid-template-columns:minmax(0,1fr);
  }
}

/* Mobile report containment: wide analytical tables scroll inside their own glass card. */
body.fd-ui-polished .vista-window.fd-layout-mobile :is(.application-shell-report-dashboard,.report-grid,.roi-grid){
  min-width:0;
  max-width:100%;
  grid-template-columns:minmax(0,1fr);
}
body.fd-ui-polished .vista-window.fd-layout-mobile :is(.application-shell-report-dashboard,.report-grid,.roi-grid)>*{
  min-width:0;
  max-width:100%;
}
body.fd-ui-polished .vista-window.fd-layout-mobile .report-card{
  min-width:0;
  max-width:100%;
  overflow-x:auto;
  overflow-y:hidden;
  overscroll-behavior-x:contain;
  scrollbar-width:thin;
}
body.fd-ui-polished .vista-window.fd-layout-mobile .report-card .application-shell-report-table{
  width:max-content;
  min-width:100%;
}

/* ===== Phase 120 dossier column contract ===== */
body.fd-ui-polished .vista-window[data-window-id^="vehicle-dossier-"] .dossier-columns-right-stack > .dossier-insurance-insurance-tax-panel,
body.fd-ui-polished .vista-window.vehicle-dossier-window .dossier-columns-right-stack > .dossier-insurance-insurance-tax-panel{order:10!important;}
body.fd-ui-polished .vista-window[data-window-id^="vehicle-dossier-"] .dossier-columns-right-stack > .dossier-insurance-admin-panel,
body.fd-ui-polished .vista-window.vehicle-dossier-window .dossier-columns-right-stack > .dossier-insurance-admin-panel{order:20!important;}
body.fd-ui-polished .vista-window[data-window-id^="vehicle-dossier-"] .dossier-columns-right-stack > .dossier-insurance-roi-panel,
body.fd-ui-polished .vista-window.vehicle-dossier-window .dossier-columns-right-stack > .dossier-insurance-roi-panel,
body.fd-ui-polished .vista-window .dossier-columns-right-stack > .fd-ui-roi-pinned-right{order:30!important;width:100%!important;min-width:0!important;}
