/* =========================================================
   DOT DCMS v2.1.2 — Unified Front-end UI
   Visual reference: Technician Portal
   ---------------------------------------------------------
   This layer standardizes every office/management front-end
   page without changing the workflows owned by each module.
   ========================================================= */
:root{
  --dui-bg:#f4f5f9;
  --dui-card:#ffffff;
  --dui-text:#17182a;
  --dui-muted:#6d7183;
  --dui-line:#dfe2ea;
  --dui-line-soft:#edf0f5;
  --dui-orange:#ff7a00;
  --dui-orange-dark:#e96900;
  --dui-orange-soft:#fff1e6;
  --dui-blue:#5a55f4;
  --dui-blue-soft:#efefff;
  --dui-green:#168a50;
  --dui-green-soft:#eaf8ef;
  --dui-red:#c9333d;
  --dui-red-soft:#fdecee;
  --dui-amber:#b87900;
  --dui-amber-soft:#fff5db;
  --dui-shadow:0 1px 4px rgba(17,24,39,.05);
  --dui-radius:14px;
}

/* Global DCMS front-end canvas. */
body.dot-dcms-dealer-hub-page,
body.dot-dcms-dealer-page,
body.dot-dcms-office-suite-page,
body.dot-dcms-live-tracker-page,
body.dot-dcms-operations-page{
  background:var(--dui-bg)!important;
  color:var(--dui-text)!important;
  font-family:Arial,Helvetica,sans-serif!important;
}
.dcms-hub,.dcms-dealer-shell,.dns-app,.dos-app,.dcms-production-shell,.dcms-tracker-page,.ops-shell,.dcms-dealer-metrics{
  font-family:Arial,Helvetica,sans-serif!important;
  color:var(--dui-text);
}

/* Keep WordPress/theme chrome out of application surfaces. */
body.dot-dcms-dealer-hub-page #wpadminbar,
body.dot-dcms-dealer-page #wpadminbar,
body.dot-dcms-office-suite-page #wpadminbar,
body.dot-dcms-live-tracker-page #wpadminbar,
body.dot-dcms-operations-page #wpadminbar{display:none!important}
html:has(body.dot-dcms-dealer-hub-page),
html:has(body.dot-dcms-dealer-page),
html:has(body.dot-dcms-office-suite-page),
html:has(body.dot-dcms-live-tracker-page),
html:has(body.dot-dcms-operations-page){margin-top:0!important}

/* ---------------------------------------------------------
   Office Portal home — same visual grammar as Technician Home
   --------------------------------------------------------- */
.dcms-hub{background:var(--dui-bg)!important}
.dh-header{height:68px;background:#fff!important;border-bottom:1px solid var(--dui-line)!important;backdrop-filter:none!important}
.dh-header-inner{height:68px;max-width:1360px;padding:0 18px;gap:20px}
.dh-brand{min-width:220px;gap:11px}
.dh-brand-mark{width:46px;height:46px;border-radius:13px;box-shadow:var(--dui-shadow);background:#111827}
.dh-brand strong{font-size:19px;font-weight:800}
.dh-brand small{font-size:10px;color:var(--dui-muted);font-weight:800;letter-spacing:.08em;margin-top:3px}
.dh-header-nav{gap:4px}
.dh-header-nav a{height:40px;border-radius:10px;color:#4e5669;font-size:13px;font-weight:700;padding:0 11px}
.dh-header-nav a:hover{background:#f1f3f7;color:var(--dui-text)}
.dh-icon-button,.dh-user-button{width:42px;height:42px;border-radius:12px;box-shadow:none}
.dh-user-button{background:var(--dui-orange)!important}
.dh-account-menu{border-radius:14px;border-color:var(--dui-line);box-shadow:0 16px 38px rgba(17,24,39,.13)}
.dh-main{max-width:1280px;padding:24px 18px 68px}
.dh-hero{
  display:flex!important;
  align-items:flex-end!important;
  justify-content:space-between!important;
  gap:24px!important;
  padding:8px 4px 18px!important;
  margin:0 0 2px!important;
  background:transparent!important;
  color:var(--dui-text)!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  overflow:visible!important;
}
.dh-hero:before{display:none!important}
.dh-hero-copy{max-width:840px}
.dh-kicker{margin:0 0 5px!important;color:var(--dui-muted)!important;font-size:12px!important;letter-spacing:.04em!important;text-transform:none!important}
.dh-hero h1{font-size:28px!important;line-height:1.15!important;letter-spacing:-.02em!important;color:var(--dui-text)!important;font-weight:800!important}
.dh-hero-copy>p:not(.dh-kicker){margin:7px 0 0!important;color:var(--dui-muted)!important;font-size:14px!important;line-height:1.5!important}
.dh-hero-actions{margin-top:14px!important;gap:8px!important}
.dh-btn{min-height:44px;border-radius:9px;padding:9px 14px;font-size:14px;font-weight:800}
.dh-btn.primary{background:var(--dui-orange)!important;box-shadow:none!important}
.dh-btn.primary:hover{background:var(--dui-orange-dark)!important}
.dh-btn.ghost{background:#fff!important;border:1px solid var(--dui-line)!important;color:var(--dui-text)!important}
.dh-hero-role{min-width:190px;padding:13px 15px;border:1px solid var(--dui-line)!important;border-radius:12px;background:#fff!important;color:var(--dui-text)!important;box-shadow:var(--dui-shadow)}
.dh-hero-role span,.dh-hero-role small{color:var(--dui-muted)!important}
.dh-hero-role strong{font-size:15px}
.dh-stats{grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin:10px 0 22px}
.dh-stat{min-height:94px;border-radius:14px;padding:13px;gap:10px;box-shadow:var(--dui-shadow)}
.dh-stat:hover{transform:none;box-shadow:var(--dui-shadow)}
.dh-stat-icon{width:38px;height:38px;border-radius:11px}
.dh-stat strong{font-size:24px;margin-top:4px}
.dh-stat small{font-size:10px}.dh-stat em{font-size:10px}
.dh-section{margin-top:24px}
.dh-section-head{align-items:center;margin-bottom:10px}
.dh-section-head p{margin:0 0 3px!important;color:var(--dui-muted)!important;font-size:11px!important;letter-spacing:.04em!important}
.dh-section-head h2{font-size:20px;letter-spacing:0;font-weight:800}
.dh-action-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.dh-action-card{min-height:98px;border-radius:14px;padding:14px;grid-template-columns:46px minmax(0,1fr) 22px;gap:12px;box-shadow:var(--dui-shadow)}
.dh-action-card:hover{transform:none;box-shadow:var(--dui-shadow);border-color:#cfd4de}
.dh-action-icon{width:46px;height:46px;border-radius:12px}
.dh-action-copy strong{font-size:15px}.dh-action-copy small{font-size:12px}
.dh-collapsible,.dh-empty,.dh-profile-card{border-radius:14px;box-shadow:var(--dui-shadow)}
.dh-collapsible summary{padding:16px 18px}.dh-collapsible summary strong{font-size:18px}
.dh-collapsible summary p{color:var(--dui-muted);letter-spacing:.04em}
.dh-two-column{gap:14px}
.dh-empty{min-height:160px}
.dh-profile-card{padding:16px;grid-template-columns:54px minmax(180px,1fr) minmax(340px,1.7fr);gap:14px}
.dh-profile-avatar{width:54px;height:54px;border-radius:13px;background:var(--dui-orange)}
.dh-profile-card dl div{border:1px solid var(--dui-line-soft);background:#f8f9fb}
.dh-support{border-radius:14px;padding:24px;background:var(--dui-orange)}
.dh-support:after{display:none}.dh-support h2{font-size:23px}.dh-support>p:not(:first-child){font-size:14px}

/* ---------------------------------------------------------
   Office Work Orders module
   --------------------------------------------------------- */
.dcms-dealer-shell{background:var(--dui-bg)!important;font-family:Arial,Helvetica,sans-serif!important}
.dcms-dealer-header{height:68px;background:#fff!important;backdrop-filter:none!important;box-shadow:none!important;border-bottom:1px solid var(--dui-line)!important}
.dd-header-inner{width:min(1440px,calc(100% - 28px));gap:18px}
.dd-brand-mark{width:46px;height:46px;flex-basis:46px;border-radius:12px;box-shadow:var(--dui-shadow)}
.dd-brand-copy{height:46px}.dd-brand-copy strong{font-size:18px}.dd-brand-copy small{font-size:10px}
.dd-nav a{min-height:40px;border-radius:9px;font-size:13px}
.dd-nav a.active{background:var(--dui-orange-soft);color:#a84e00}
.dd-account-button{min-height:44px;border-radius:11px;box-shadow:none}
.dcms-dealer-main{width:min(1440px,calc(100% - 28px));padding:22px 0 74px!important}
.dd-hero{
  min-height:0!important;
  padding:8px 2px 16px!important;
  margin-bottom:12px!important;
  color:var(--dui-text)!important;
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  overflow:visible!important;
  align-items:flex-end!important;
}
.dd-hero:after{display:none!important}
.dd-eyebrow{color:var(--dui-muted)!important;letter-spacing:.04em!important;text-transform:none!important;margin-bottom:4px!important}
.dd-hero h1{color:var(--dui-text)!important;font-size:28px!important;letter-spacing:-.02em!important}
.dd-hero p:not(.dd-eyebrow){color:var(--dui-muted)!important;font-size:14px!important;margin-top:6px!important}
.dd-hero p strong{color:var(--dui-text)!important}
.dd-hero-number{background:#fff!important;border:1px solid var(--dui-line)!important;color:var(--dui-text)!important;border-radius:12px!important;padding:11px 14px!important}
.dd-hero-number strong{font-size:28px}.dd-hero-number span{color:var(--dui-muted)!important}
.dd-hero-secondary{background:#fff!important;color:var(--dui-text)!important;border:1px solid var(--dui-line)!important}
.dd-primary{background:var(--dui-orange)!important}.dd-primary:hover{background:var(--dui-orange-dark)!important}
.dd-panel,.dd-card,.dd-stat-card,.dd-work-order-card,.dd-form-card,.dd-table-card{border-radius:14px!important;box-shadow:var(--dui-shadow)!important}

/* ---------------------------------------------------------
   Native Sales
   --------------------------------------------------------- */
.dns-app{background:var(--dui-bg)!important}
.dns-header{min-height:68px;padding:8px max(18px,calc((100vw - 1360px)/2));border-color:var(--dui-line)}
.dns-brand img{width:46px;height:46px;border-radius:12px}.dns-brand strong{font-size:18px}.dns-brand small{font-size:10px}
.dns-main{max-width:1360px;padding:22px 18px 70px}
.dns-hero{background:transparent!important;color:var(--dui-text)!important;border-radius:0!important;padding:8px 2px 14px!important;margin-bottom:8px!important}
.dns-hero p{color:var(--dui-muted)!important;letter-spacing:.04em!important;text-transform:none!important;margin-bottom:4px!important}
.dns-hero h1{font-size:28px!important;margin-bottom:5px!important}.dns-hero span{color:var(--dui-muted)!important;font-size:14px}
.dns-btn{border-radius:9px}.dns-btn.primary{background:var(--dui-orange)!important;border-color:var(--dui-orange)!important}
.dns-tabs{gap:6px;padding-bottom:14px}.dns-tabs a{padding:9px 12px;border-radius:9px;font-size:13px}.dns-tabs a.active{background:var(--dui-orange)!important;border-color:var(--dui-orange)!important;color:#fff!important}
.dns-kpis{grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px}
.dns-kpis>div{border-radius:14px;padding:14px;box-shadow:var(--dui-shadow)}.dns-kpis strong{font-size:24px;margin-top:5px}
.dns-panel{border-radius:14px;padding:18px;box-shadow:var(--dui-shadow)}.dns-panel-head h2{font-size:20px}
.dns-form input,.dns-form select,.dns-form textarea,.dns-filters input,.dns-filters select{border-radius:9px;padding:11px 12px}
.dns-form.compact{border:1px solid var(--dui-line);border-radius:12px;background:#f8f9fb}

/* ---------------------------------------------------------
   Office Suite: Inventory / Payroll / Events / Compliance
   --------------------------------------------------------- */
.dos-app{max-width:1360px;padding:22px 18px 72px;font-family:Arial,Helvetica,sans-serif!important}
.dos-top{background:transparent!important;color:var(--dui-text)!important;border-radius:0!important;padding:6px 2px 15px!important;margin-bottom:10px!important}
.dos-top p{color:var(--dui-muted)!important;opacity:1!important;letter-spacing:.04em!important;text-transform:none!important;margin-bottom:4px!important}
.dos-top h1{font-size:26px!important}.dos-top span{color:var(--dui-muted)!important;font-size:14px;margin-top:5px}
.dos-top-actions a{background:#fff!important;color:var(--dui-text)!important;border:1px solid var(--dui-line)!important;border-radius:9px!important}
.dos-btn{border-radius:9px!important}.dos-btn.primary{background:var(--dui-orange)!important;border-color:var(--dui-orange)!important}
.dos-kpis{grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px}.dos-kpis>div{border-radius:14px;padding:14px;box-shadow:var(--dui-shadow)}
.dos-panel{border-radius:14px!important;box-shadow:var(--dui-shadow)!important}

/* ---------------------------------------------------------
   Production QA / Control Center
   --------------------------------------------------------- */
.dcms-production-shell{background:var(--dui-bg)!important;font-family:Arial,Helvetica,sans-serif!important}
.prod-header{min-height:68px;padding:10px 18px;border-color:var(--dui-line)}
.prod-brand img{width:46px;height:46px;border-radius:12px}.prod-brand strong{font-size:17px}.prod-brand small{font-size:10px}
.prod-title h1{font-size:17px}.prod-main{max-width:1360px;padding:22px 18px 70px}
.prod-hero{background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;padding:7px 2px 14px!important;margin-bottom:8px!important}
.prod-hero span{color:var(--dui-muted)!important;text-transform:none!important;letter-spacing:.04em!important}.prod-hero h2{font-size:26px!important}.prod-hero p{font-size:14px}
.prod-section,.prod-review-card,.prod-mapping{border-radius:14px!important;padding:17px!important;box-shadow:var(--dui-shadow)}
.prod-health-hero{background:#fff!important;color:var(--dui-text)!important}.prod-health-hero p{color:var(--dui-muted)!important}
.prod-score{border:1px solid var(--dui-line);border-radius:12px;background:#f8f9fb}
.prod-detail-grid>div,.prod-op,.prod-health-item{border-radius:12px}

/* ---------------------------------------------------------
   Live Dispatch / Technician Tracker
   --------------------------------------------------------- */
.dcms-tracker-page{background:var(--dui-bg)!important;font-family:Arial,Helvetica,sans-serif!important}
.dt-header{height:68px!important;background:#fff!important;border-bottom:1px solid var(--dui-line)!important;box-shadow:none!important}
.dt-brand img{width:46px!important;height:46px!important;border-radius:12px!important}.dt-brand strong{font-size:18px!important}.dt-brand small{font-size:10px!important}
.dt-back{border-radius:9px!important;background:#fff!important;border:1px solid var(--dui-line)!important;color:var(--dui-text)!important}
.dt-main{max-width:1360px!important;width:calc(100% - 36px)!important;padding-top:22px!important}
.dt-hero{background:transparent!important;color:var(--dui-text)!important;border-radius:0!important;padding:7px 2px 14px!important;box-shadow:none!important;margin-bottom:8px!important}
.dt-hero:after{display:none!important}.dt-kicker{color:var(--dui-muted)!important;letter-spacing:.04em!important;text-transform:none!important}.dt-hero h1{font-size:28px!important}.dt-hero p{color:var(--dui-muted)!important;font-size:14px!important}
.dt-live-pill{border-radius:999px}
.dt-metrics{gap:10px!important}.dt-metric{border-radius:14px!important;box-shadow:var(--dui-shadow)!important}.dt-metric strong{font-size:24px!important}
.dt-map-panel,.dt-list-panel,.dt-warning-panel,.dt-jobs-panel,.dt-settings{border-radius:14px!important;box-shadow:var(--dui-shadow)!important}
.dt-toolbar input,.dt-toolbar select,.dt-toolbar button,.dt-settings input,.dt-settings select{border-radius:9px!important}

/* ---------------------------------------------------------
   Performance Metrics
   --------------------------------------------------------- */
.dcms-dealer-metrics{max-width:1360px!important;padding:22px 18px 70px!important;font-family:Arial,Helvetica,sans-serif!important}
.dcms-dealer-metrics-header{background:#fff!important;color:var(--dui-text)!important;border:1px solid var(--dui-line)!important;border-radius:14px!important;box-shadow:var(--dui-shadow)!important;padding:16px 18px!important}
.dcms-dealer-brand span{color:var(--dui-muted)!important;letter-spacing:.04em!important}.dcms-dealer-brand h1{color:var(--dui-text)!important;font-size:24px!important}
.dcms-dealer-brand img{max-height:46px!important;filter:none!important}
.dcms-dealer-header-actions a{background:#fff!important;color:var(--dui-text)!important;border:1px solid var(--dui-line)!important;border-radius:9px!important}
.dcms-metrics-button,.dcms-metrics-filter-actions button{border-radius:9px!important}
.dcms-metrics-filter-form,.dcms-metrics-table-card,.dcms-dealer-summary-card,.dcms-metrics-definition-card,.dcms-metrics-history-card{border-radius:14px!important;box-shadow:var(--dui-shadow)!important}

/* Shared form and table density. */
.dns-table th,.ops-table th,.dos-table-wrap th,.dcms-metrics-table th{font-size:11px!important}
.dns-table td,.ops-table td,.dos-table-wrap td,.dcms-metrics-table td{font-size:13px!important}

/* Desktop-first density. These pages should read like an application, not a
   stretched mobile screen. */
@media(min-width:1100px){
  .dh-action-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .dh-two-column{grid-template-columns:1fr 1fr}
  .dns-panel,.dos-panel,.prod-section,.prod-review-card,.prod-mapping{margin-bottom:14px}
}

@media(max-width:900px){
  .dh-main{padding:18px 14px 62px}.dh-header-inner{padding:0 14px}.dh-header-nav{display:none}.dh-brand{min-width:0}
  .dh-hero{display:block!important;padding:7px 2px 14px!important}.dh-hero-role{margin-top:12px;width:max-content;min-width:0}.dh-action-grid{grid-template-columns:1fr}.dh-profile-card{grid-template-columns:54px 1fr}.dh-profile-card dl{grid-column:1/3}
  .dcms-dealer-main{width:calc(100% - 24px)}
  .dns-main,.dos-app,.prod-main{padding-left:14px;padding-right:14px}
}

@media(max-width:560px){
  .dh-hero h1,.dd-hero h1,.dns-hero h1,.dt-hero h1{font-size:24px!important}
  .dh-hero-role{display:none!important}
  .dh-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.dh-stat{min-height:88px}.dh-stat em{display:none}
  .dh-section-head h2{font-size:18px}.dh-action-card{min-height:92px}
  .dh-profile-card dl{grid-template-columns:1fr}
  .dos-top{display:block!important}.dos-top-actions{margin-top:12px}
  .dcms-dealer-metrics-header{display:block!important}.dcms-dealer-header-actions{justify-content:flex-start;margin-top:12px}
}

/* Sales header utility cluster. */
.dns-header-actions{display:flex;align-items:center;gap:9px}.dns-header-actions .dns-btn{min-height:40px;padding:8px 11px}.dns-user{min-height:40px;display:flex;align-items:center;padding:0 12px;border-radius:10px;background:var(--dui-orange);color:#fff;font-size:13px;font-weight:800;max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:700px){.dns-header-actions .dns-btn{display:none}.dns-user{max-width:110px;padding:0 10px;font-size:12px}}

/* Office Portal mobile bottom navigation mirrors the Technician Portal. */
.dh-mobile-nav{display:none}
@media(max-width:900px){
  .dcms-hub{padding-bottom:70px}
  .dh-mobile-nav{position:fixed;left:0;right:0;bottom:0;z-index:90;height:66px;background:#fff;border-top:1px solid var(--dui-line);box-shadow:0 -2px 12px rgba(0,0,0,.05);display:grid;grid-auto-flow:column;grid-auto-columns:1fr}
  .dh-mobile-nav a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;color:#4f5668;text-decoration:none;font-size:10px;font-weight:800;padding:5px 2px}
  .dh-mobile-nav a .dh-icon{width:19px;height:19px}
  .dh-mobile-nav a.active{color:var(--dui-orange);box-shadow:inset 0 3px 0 var(--dui-orange)}
  .dh-main{padding-bottom:74px!important}
}

/* =========================================================
   Unified WordPress application canvas
   Ensures every office-facing DCMS module is rendered as an
   application, not inside the active WordPress theme layout.
   ========================================================= */
body.dot-dcms-unified-page{
  margin:0!important;
  padding:0!important;
  background:var(--dui-bg)!important;
  color:var(--dui-text)!important;
  font-family:Arial,Helvetica,sans-serif!important;
  overflow-x:hidden;
}
body.dot-dcms-unified-page #wpadminbar,
body.dot-dcms-unified-page .site-header,
body.dot-dcms-unified-page .site-footer,
body.dot-dcms-unified-page header.wp-block-template-part,
body.dot-dcms-unified-page footer.wp-block-template-part,
body.dot-dcms-unified-page .wp-site-blocks>header,
body.dot-dcms-unified-page .wp-site-blocks>footer,
body.dot-dcms-unified-page .entry-header,
body.dot-dcms-unified-page .page-header,
body.dot-dcms-unified-page .wp-block-post-title,
body.dot-dcms-unified-page .entry-title{
  display:none!important;
}
body.dot-dcms-unified-page #page,
body.dot-dcms-unified-page #content,
body.dot-dcms-unified-page .site,
body.dot-dcms-unified-page .site-content,
body.dot-dcms-unified-page .content-area,
body.dot-dcms-unified-page #primary,
body.dot-dcms-unified-page .site-main,
body.dot-dcms-unified-page .entry-content,
body.dot-dcms-unified-page .wp-block-post-content,
body.dot-dcms-unified-page .wp-site-blocks,
body.dot-dcms-unified-page main.wp-block-group{
  max-width:none!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
}
html:has(body.dot-dcms-unified-page){margin-top:0!important;background:var(--dui-bg)!important}

/* Shared desktop application header polish. */
.dns-header,.prod-header,.dt-header,.dcms-dealer-header,.dh-header,.ops-topbar{
  box-shadow:0 1px 8px rgba(16,24,40,.04)!important;
}
.dns-brand img,.prod-brand img,.dt-brand img,.dd-brand-mark,.dh-brand-mark,.ops-brand img{
  object-fit:cover!important;
}

/* Office-suite modules use the same restrained page-heading hierarchy as the
   Technician Portal instead of a large marketing banner. */
.dos-top{
  align-items:flex-end!important;
  border-bottom:1px solid var(--dui-line-soft)!important;
}
.dos-top>div:first-child{max-width:860px}
.dos-section-title h2{font-size:19px!important;letter-spacing:-.01em}
.dos-section-title p{color:var(--dui-muted)!important;letter-spacing:.04em!important;text-transform:none!important}
.dos-app input,.dos-app select,.dos-app textarea,
.prod-main input,.prod-main select,.prod-main textarea,
.dns-main input,.dns-main select,.dns-main textarea{
  font-family:Arial,Helvetica,sans-serif!important;
}

/* Keep high-density office tables professional on desktop while preserving
   horizontal scrolling only where the data truly requires it. */
@media(min-width:1100px){
  .dos-table-wrap,.dns-table-wrap{border:1px solid var(--dui-line-soft);border-radius:12px;background:#fff}
  .dos-table-wrap table,.dns-table{margin:0}
  .dos-table-wrap th,.dns-table th{background:#f8f9fb}
  .dos-table-wrap td,.dns-table td{padding-top:11px!important;padding-bottom:11px!important}
}


/* =========================================================
   DCMS v3.1.3 — Office Portal responsive desktop/mobile cleanup
   Scope: office/dealer/admin portal pages only. Technician mobile app untouched.
   ========================================================= */
:root{
  --dcms-office-max: 1540px;
  --dcms-office-pad: 28px;
  --dcms-office-gap: 16px;
  --dcms-office-bg: #f4f6fa;
  --dcms-office-card: #ffffff;
  --dcms-office-line: #dfe4ee;
  --dcms-office-text: #111827;
  --dcms-office-muted: #667085;
  --dcms-office-orange: #f97316;
  --dcms-office-dark: #101828;
}

body.dot-dcms-dealer-hub-page,
body.dcms-office-shell-page,
body.dot-dcms-operations-page,
body.dot-dcms-native-sales-page,
body.dot-dcms-office-suite-page,
body.dot-dcms-live-tracker-page,
body.dcms-v3-office-page,
body.dot-dcms-team-page,
body.dot-dcms-production-page,
body.dot-dcms-metrics-page{
  background: var(--dcms-office-bg) !important;
  overflow-x: hidden !important;
}

body.dot-dcms-dealer-hub-page .site-header,
body.dot-dcms-dealer-hub-page .site-footer,
body.dot-dcms-dealer-hub-page .entry-header,
body.dot-dcms-dealer-hub-page .page-header,
body.dot-dcms-dealer-hub-page .wp-block-post-title,
body.dot-dcms-dealer-hub-page header.wp-block-template-part,
body.dot-dcms-dealer-hub-page footer.wp-block-template-part,
body.dcms-office-shell-page .site-header,
body.dcms-office-shell-page .site-footer,
body.dcms-office-shell-page .entry-header,
body.dcms-office-shell-page .page-header,
body.dot-dcms-operations-page .site-header,
body.dot-dcms-operations-page .site-footer,
body.dot-dcms-operations-page .entry-header,
body.dot-dcms-native-sales-page .site-header,
body.dot-dcms-native-sales-page .site-footer,
body.dot-dcms-native-sales-page .entry-header,
body.dot-dcms-office-suite-page .site-header,
body.dot-dcms-office-suite-page .site-footer,
body.dot-dcms-office-suite-page .entry-header,
body.dot-dcms-live-tracker-page .site-header,
body.dot-dcms-live-tracker-page .site-footer,
body.dot-dcms-live-tracker-page .entry-header,
body.dcms-v3-office-page .site-header,
body.dcms-v3-office-page .site-footer,
body.dcms-v3-office-page .entry-header,
body.dot-dcms-team-page .site-header,
body.dot-dcms-team-page .site-footer,
body.dot-dcms-team-page .entry-header{
  display:none!important;
}

body.dot-dcms-dealer-hub-page #page,
body.dot-dcms-dealer-hub-page #content,
body.dot-dcms-dealer-hub-page .site,
body.dot-dcms-dealer-hub-page .site-content,
body.dot-dcms-dealer-hub-page .content-area,
body.dot-dcms-dealer-hub-page .site-main,
body.dot-dcms-dealer-hub-page .entry-content,
body.dot-dcms-dealer-hub-page .wp-block-post-content,
body.dcms-office-shell-page #page,
body.dcms-office-shell-page #content,
body.dcms-office-shell-page .site,
body.dcms-office-shell-page .site-content,
body.dcms-office-shell-page .content-area,
body.dcms-office-shell-page .site-main,
body.dcms-office-shell-page .entry-content,
body.dot-dcms-operations-page #page,
body.dot-dcms-operations-page #content,
body.dot-dcms-operations-page .site,
body.dot-dcms-operations-page .site-content,
body.dot-dcms-operations-page .content-area,
body.dot-dcms-operations-page .site-main,
body.dot-dcms-operations-page .entry-content,
body.dot-dcms-native-sales-page #page,
body.dot-dcms-native-sales-page #content,
body.dot-dcms-native-sales-page .site,
body.dot-dcms-native-sales-page .site-content,
body.dot-dcms-native-sales-page .content-area,
body.dot-dcms-native-sales-page .site-main,
body.dot-dcms-native-sales-page .entry-content,
body.dot-dcms-office-suite-page #page,
body.dot-dcms-office-suite-page #content,
body.dot-dcms-office-suite-page .site,
body.dot-dcms-office-suite-page .site-content,
body.dot-dcms-office-suite-page .content-area,
body.dot-dcms-office-suite-page .site-main,
body.dot-dcms-office-suite-page .entry-content,
body.dot-dcms-live-tracker-page #page,
body.dot-dcms-live-tracker-page #content,
body.dot-dcms-live-tracker-page .site,
body.dot-dcms-live-tracker-page .site-content,
body.dot-dcms-live-tracker-page .content-area,
body.dot-dcms-live-tracker-page .site-main,
body.dot-dcms-live-tracker-page .entry-content,
body.dcms-v3-office-page #page,
body.dcms-v3-office-page #content,
body.dcms-v3-office-page .site,
body.dcms-v3-office-page .site-content,
body.dcms-v3-office-page .content-area,
body.dcms-v3-office-page .site-main,
body.dcms-v3-office-page .entry-content,
body.dot-dcms-team-page #page,
body.dot-dcms-team-page #content,
body.dot-dcms-team-page .site,
body.dot-dcms-team-page .site-content,
body.dot-dcms-team-page .content-area,
body.dot-dcms-team-page .site-main,
body.dot-dcms-team-page .entry-content{
  max-width:none!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
}

/* Main office canvases */
.dh-ai-main,
.dcms-dealer-main,
.dcms-dealer-metrics,
.ops-main,
.dns-main,
.dos-app,
.dt-main,
.dcms-team-main,
.prod-main,
.dv3-main{
  width:min(var(--dcms-office-max), calc(100vw - 32px))!important;
  max-width:var(--dcms-office-max)!important;
  margin-left:auto!important;
  margin-right:auto!important;
  padding-left:0!important;
  padding-right:0!important;
}

/* Dealer portal: modern desktop-first layout */
.dh-ai-dashboard{min-height:100vh!important;}
.dh-ai-main{padding:var(--dcms-office-pad) 0 54px!important;}
.dh-ai-hero{grid-template-columns:minmax(0,1.55fr) minmax(380px,.75fr)!important;align-items:stretch!important;}
.dh-ai-kpi-strip{grid-template-columns:repeat(4,minmax(0,1fr))!important;align-items:stretch!important;}
.dh-ai-workbench{grid-template-columns:minmax(390px,.95fr) minmax(0,1.45fr)!important;align-items:start!important;}
.dh-ai-lower-grid{grid-template-columns:minmax(0,1.08fr) minmax(360px,.9fr)!important;align-items:start!important;}
.dh-ai-action-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;}
.dh-ai-more-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;}
.dh-ai-card{backdrop-filter:none!important;}
.dh-ai-action-card,.dh-ai-more-grid a,.dh-ai-alert,.dh-ai-activity-list a,.dh-ai-notice-list article{transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease,background .16s ease;}
.dh-ai-action-card:hover,.dh-ai-more-grid a:hover,.dh-ai-alert:hover,.dh-ai-activity-list a:hover{transform:translateY(-2px);border-color:#fed7aa!important;box-shadow:0 12px 28px rgba(16,24,40,.08)!important;background:#fff!important;}

/* Shared panel/grids across office tabs */
.dcms-dealer-card,
.dd-card,
.ops-card,
.ops-panel,
.dns-panel,
.dos-panel,
.dt-panel,
.dcms-team-panel,
.prod-panel,
.dv3-panel,
.dcms-metrics-filter-card,
.dcms-metrics-history-card,
.dcms-metrics-table-card,
.dcms-metrics-definition-card{
  border-radius:18px!important;
  border:1px solid var(--dcms-office-line)!important;
  box-shadow:0 8px 24px rgba(16,24,40,.055)!important;
  background:var(--dcms-office-card)!important;
}

.dd-grid,
.dcms-dealer-grid,
.dcms-dealer-action-grid,
.ops-grid,
.ops-kpis,
.dns-grid,
.dns-kpis,
.dos-kpis,
.dt-grid,
.dcms-team-grid,
.prod-grid,
.prod-kpis,
.dv3-grid,
.dcms-metrics-kpi-grid,
.dcms-metrics-definition-grid{
  display:grid!important;
  gap:16px!important;
}

@media(min-width:1100px){
  .dd-grid,.dcms-dealer-grid,.ops-grid,.dns-grid,.dos-grid,.dt-grid,.dcms-team-grid,.prod-grid,.dv3-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .dcms-dealer-action-grid,.ops-kpis,.dns-kpis,.dos-kpis,.prod-kpis,.dcms-metrics-kpi-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;}
  .dcms-metrics-definition-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;}
  .dns-split,.ops-split,.dv3-split,.prod-split{display:grid!important;grid-template-columns:minmax(0,1.2fr) minmax(360px,.8fr)!important;gap:18px!important;align-items:start!important;}
}

/* Tabs / link rows: desktop horizontal, mobile scroll */
.dns-tabs,
.ops-tabs,
.dv3-tabs,
.dcms-dealer-tabs,
.dcms-metrics-tabs,
.dos-link-row,
.prod-tabs,
.dd-tabs{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:8px!important;
  align-items:center!important;
  padding:4px 0 10px!important;
  overflow:visible!important;
}
.dns-tabs a,.dns-tabs button,
.ops-tabs a,.ops-tabs button,
.dv3-tabs a,.dv3-tabs button,
.dcms-dealer-tabs a,.dcms-dealer-tabs button,
.dcms-metrics-tabs a,.dcms-metrics-tabs button,
.dos-link-row a,
.prod-tabs a,.prod-tabs button,
.dd-tabs a,.dd-tabs button{
  flex:0 0 auto!important;
  border-radius:999px!important;
  min-height:38px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:9px 13px!important;
  font-weight:800!important;
  text-decoration:none!important;
  white-space:nowrap!important;
}

/* Forms: stop desktop from looking like narrow stacked mobile cards */
.dns-form,
.dos-grid-form,
.dos-inline-form,
.ops-form,
.dv3-form,
.dcms-team-form,
.prod-form,
.dd-form{
  gap:14px!important;
}
@media(min-width:900px){
  .dns-form .dns-grid,
  .dos-grid-form,
  .ops-form-grid,
  .dv3-form-grid,
  .dcms-team-form-grid,
  .prod-form-grid,
  .dd-form-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  .dns-form .wide,
  .ops-form .wide,
  .dv3-form .wide,
  .dcms-team-wide,
  .prod-form .wide,
  .dd-form .wide{
    grid-column:1/-1!important;
  }
}

/* Tables: full desktop table width and safe mobile overflow */
.dns-table-wrap,
.dos-table-wrap,
.ops-table-wrap,
.dv3-table-wrap,
.dcms-team-table-wrap,
.prod-table-wrap,
.dcms-metrics-table-wrap,
.dd-table-wrap,
.dcms-dealer-table-wrap{
  width:100%!important;
  overflow-x:auto!important;
  -webkit-overflow-scrolling:touch!important;
  border-radius:14px!important;
}
.dns-table,
.dos-table-wrap table,
.ops-table,
.dv3-table,
.dcms-team-table,
.prod-table,
.dcms-metrics-table,
.dd-table,
.dcms-dealer-table{
  width:100%!important;
  min-width:880px!important;
  border-collapse:collapse!important;
}

/* Desktop: give top/hero areas more room */
@media(min-width:1180px){
  .dh-ai-hero-copy{min-height:270px!important;}
  .dh-ai-hero h1{max-width:840px!important;}
  .dh-ai-action-card{min-height:132px!important;}
  .dh-ai-more-grid a{min-height:68px!important;}
}

/* Tablet */
@media(max-width:1120px){
  .dh-ai-main,
  .dcms-dealer-main,
  .dcms-dealer-metrics,
  .ops-main,
  .dns-main,
  .dos-app,
  .dt-main,
  .dcms-team-main,
  .prod-main,
  .dv3-main{width:calc(100vw - 24px)!important;}
  .dh-ai-hero,.dh-ai-workbench,.dh-ai-lower-grid{grid-template-columns:1fr!important;}
  .dh-ai-kpi-strip,.dh-ai-action-grid,.dh-ai-more-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}

/* Mobile: app-like cards, no desktop squish */
@media(max-width:700px){
  :root{--dcms-office-pad:12px;}
  .dh-ai-main,
  .dcms-dealer-main,
  .dcms-dealer-metrics,
  .ops-main,
  .dns-main,
  .dos-app,
  .dt-main,
  .dcms-team-main,
  .prod-main,
  .dv3-main{width:calc(100vw - 20px)!important;padding-top:12px!important;}
  .dh-ai-hero-copy{border-radius:22px!important;padding:22px 18px!important;min-height:auto!important;}
  .dh-ai-hero h1{font-size:34px!important;line-height:1!important;letter-spacing:-.055em!important;}
  .dh-ai-hero-actions{display:grid!important;grid-template-columns:1fr!important;}
  .dh-ai-btn{width:100%!important;}
  .dh-ai-kpi-strip,.dh-ai-action-grid,.dh-ai-more-grid,.dd-grid,.dcms-dealer-grid,.dcms-dealer-action-grid,.ops-grid,.ops-kpis,.dns-grid,.dns-kpis,.dos-kpis,.dt-grid,.dcms-team-grid,.prod-grid,.prod-kpis,.dv3-grid,.dcms-metrics-kpi-grid,.dcms-metrics-definition-grid{grid-template-columns:1fr!important;}
  .dns-tabs,.ops-tabs,.dv3-tabs,.dcms-dealer-tabs,.dcms-metrics-tabs,.dos-link-row,.prod-tabs,.dd-tabs{flex-wrap:nowrap!important;overflow-x:auto!important;padding-bottom:8px!important;scrollbar-width:none!important;}
  .dns-tabs::-webkit-scrollbar,.ops-tabs::-webkit-scrollbar,.dv3-tabs::-webkit-scrollbar,.dcms-dealer-tabs::-webkit-scrollbar,.dcms-metrics-tabs::-webkit-scrollbar,.dos-link-row::-webkit-scrollbar,.prod-tabs::-webkit-scrollbar,.dd-tabs::-webkit-scrollbar{display:none!important;}
  .dh-ai-panel-head{display:block!important;}
  .dh-ai-panel-head h2{font-size:21px!important;}
  .dh-ai-mini-status{grid-template-columns:repeat(3,minmax(0,1fr))!important;}
  .dh-ai-profile-line{align-items:flex-start!important;}
  .dh-ai-footer{display:block!important;line-height:1.7!important;}
}

/* Small phone */
@media(max-width:420px){
  .dh-ai-hero h1{font-size:30px!important;}
  .dh-ai-mini-status{grid-template-columns:1fr!important;}
  .dh-ai-card,.dh-ai-priority-panel,.dh-ai-actions-panel,.dh-ai-lower-grid>.dh-ai-card{border-radius:20px!important;padding:14px!important;}
  .dh-ai-action-card{min-height:112px!important;}
}


/* =========================================================
   DCMS v3.1.8 — Office Portal Typography + Alignment Review
   Scope: Dealer / Office Portal only. Technician /dcms-app/ untouched.
   Goals:
   - Remove theme/serif/swirly heading feel.
   - Use a consistent professional operations font.
   - Align desktop card grids and prevent 5+1 layouts where possible.
   - Add more breathing room and cleaner section rhythm.
   ========================================================= */

:root{
  --dcms-office-pro-font:"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --dcms-office-pro-ink:#111827;
  --dcms-office-pro-muted:#667085;
  --dcms-office-pro-line:#dde4ee;
  --dcms-office-pro-soft:#f6f8fb;
  --dcms-office-pro-orange:#f97316;
  --dcms-office-pro-navy:#101827;
  --dcms-office-pro-shadow:0 8px 24px rgba(15,23,42,.055);
  --dcms-office-pro-shadow-strong:0 16px 42px rgba(15,23,42,.10);
}

/* Professional typography across office/dealer pages only. */
body.dcms-office-shell-page,
body.dot-dcms-dealer-hub-page,
body.dot-dcms-dealer-page,
body.dot-dcms-operations-page,
body.dcms-v3-office-page,
body.dot-dcms-native-sales-page,
body.dot-dcms-office-suite-page,
body.dot-dcms-live-tracker-page,
body.dot-dcms-production-page,
body.dcms-team-page,
body.dcms-v3-customer-page{
  font-family:var(--dcms-office-pro-font)!important;
  -webkit-font-smoothing:antialiased!important;
  text-rendering:optimizeLegibility!important;
}

body.dcms-office-shell-page *,
body.dot-dcms-dealer-hub-page *,
body.dot-dcms-dealer-page *,
body.dot-dcms-operations-page *,
body.dcms-v3-office-page *,
body.dot-dcms-native-sales-page *,
body.dot-dcms-office-suite-page *,
body.dot-dcms-live-tracker-page *,
body.dot-dcms-production-page *,
body.dcms-team-page *{
  font-family:var(--dcms-office-pro-font)!important;
}

/* Remove any inherited theme serif/rounded display feel from main headings. */
body.dcms-office-shell-page h1,
body.dcms-office-shell-page h2,
body.dcms-office-shell-page h3,
body.dot-dcms-dealer-hub-page h1,
body.dot-dcms-dealer-hub-page h2,
body.dot-dcms-dealer-hub-page h3,
body.dot-dcms-dealer-page h1,
body.dot-dcms-dealer-page h2,
body.dot-dcms-dealer-page h3,
body.dot-dcms-operations-page h1,
body.dot-dcms-operations-page h2,
body.dot-dcms-operations-page h3,
body.dcms-v3-office-page h1,
body.dcms-v3-office-page h2,
body.dcms-v3-office-page h3,
body.dot-dcms-native-sales-page h1,
body.dot-dcms-native-sales-page h2,
body.dot-dcms-native-sales-page h3,
body.dot-dcms-office-suite-page h1,
body.dot-dcms-office-suite-page h2,
body.dot-dcms-office-suite-page h3,
body.dot-dcms-live-tracker-page h1,
body.dot-dcms-live-tracker-page h2,
body.dot-dcms-live-tracker-page h3,
body.dot-dcms-production-page h1,
body.dot-dcms-production-page h2,
body.dot-dcms-production-page h3,
body.dcms-team-page h1,
body.dcms-team-page h2,
body.dcms-team-page h3{
  font-family:var(--dcms-office-pro-font)!important;
  font-style:normal!important;
  color:var(--dcms-office-pro-ink);
}

/* Main title style: modern, bold, not swirly. */
.dh-ai-hero h1,
.dh-pro-hero h1,
.dh-hero h1,
.dd-hero h1,
.dns-hero h1,
.ops-hero h1,
.ops-page-head h1,
.dv3-page-head h1,
.dos-top h1,
.dt-hero h1,
.prod-hero h1,
.prod-launch-hero h1,
.dcms-team-head h1,
.dcms-dealer-metrics-header h1,
.dcms-dealer-header h1{
  font-family:var(--dcms-office-pro-font)!important;
  font-weight:850!important;
  letter-spacing:-.035em!important;
  line-height:1.05!important;
}

/* Secondary headings: cleaner, calmer, consistent. */
.dh-ai-panel-head h2,
.dh-pro-card h2,
.dd-panel h2,
.dd-card h2,
.dns-panel h2,
.ops-panel-head h2,
.dv3-panel-head h2,
.dos-panel h2,
.dt-list-panel h2,
.prod-section h2,
.dcms-team-panel-head h2,
.dcms-metrics-card h2{
  font-family:var(--dcms-office-pro-font)!important;
  font-weight:800!important;
  letter-spacing:-.02em!important;
  line-height:1.15!important;
  color:var(--dcms-office-pro-ink)!important;
}

/* Center and widen office canvases consistently on desktop. */
@media(min-width:1000px){
  .dh-ai-main,
  .dh-pro-main,
  .dh-main,
  .dcms-dealer-main,
  .dcms-dealer-metrics,
  .dns-main,
  .dos-app,
  .dt-main,
  .dcms-team-main,
  .prod-main,
  .prod-go-live-main,
  .dv3-page{
    width:min(1640px, calc(100% - 56px))!important;
    max-width:1640px!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }

  body.dcms-office-shell-page .dh-ai-main,
  body.dcms-office-shell-page .dh-pro-main,
  body.dcms-office-shell-page .dh-main,
  body.dcms-office-shell-page .dcms-dealer-main,
  body.dcms-office-shell-page .dcms-dealer-metrics,
  body.dcms-office-shell-page .dns-main,
  body.dcms-office-shell-page .dos-app,
  body.dcms-office-shell-page .dt-main,
  body.dcms-office-shell-page .dcms-team-main,
  body.dcms-office-shell-page .prod-main,
  body.dcms-office-shell-page .prod-go-live-main,
  body.dcms-office-shell-page .dv3-page{
    width:min(1640px, calc(100% - 44px))!important;
    max-width:1640px!important;
  }
}

/* Reduce crowded feeling by standardizing vertical rhythm. */
@media(min-width:1000px){
  .dh-ai-card,
  .dh-ai-priority-panel,
  .dh-ai-actions-panel,
  .dh-ai-more-tools,
  .dh-pro-card,
  .dh-pro-panel,
  .dd-panel,
  .dd-card,
  .dd-table-card,
  .dd-filter-panel,
  .dd-form-panel,
  .dns-panel,
  .ops-panel,
  .dv3-panel,
  .dos-panel,
  .dt-map-panel,
  .dt-list-panel,
  .dcms-team-panel,
  .dcms-team-form-panel,
  .prod-section,
  .prod-review-card,
  .prod-mapping,
  .dcms-metrics-filter-card,
  .dcms-metrics-history-card,
  .dcms-metrics-definition-card{
    border-radius:20px!important;
    border:1px solid var(--dcms-office-pro-line)!important;
    box-shadow:var(--dcms-office-pro-shadow)!important;
    padding:22px!important;
  }

  .dh-ai-workbench,
  .dh-ai-lower-grid,
  .dh-pro-main-grid,
  .dd-grid,
  .dcms-dealer-grid,
  .dns-grid,
  .ops-dashboard-grid,
  .ops-command-grid,
  .ops-route,
  .dv3-grid,
  .dos-grid,
  .dt-layout,
  .dcms-team-grid,
  .prod-grid,
  .prod-detail-grid{
    gap:20px!important;
    margin-bottom:20px!important;
  }
}

/* Metric boxes: larger, aligned, less cramped. */
.dv3-metrics > div,
.dos-kpis > div,
.prod-kpis > div,
.prod-launch-kpis > div,
.dcms-metrics-kpi-grid > *,
.dns-kpis > div,
.ops-kpi,
.dd-stat-grid > *,
.dd-summary-grid > *,
.dcms-team-summary > div,
.dt-metric{
  min-height:112px!important;
  padding:17px 18px!important;
  border-radius:18px!important;
  border:1px solid var(--dcms-office-pro-line)!important;
  background:#fff!important;
  box-shadow:var(--dcms-office-pro-shadow)!important;
}

/* Metric labels and values. */
.dv3-metrics small,
.dos-kpis small,
.prod-kpis small,
.prod-launch-kpis small,
.dcms-metrics-kpi-grid small,
.dns-kpis small,
.ops-kpi span,
.dd-stat-grid small,
.dd-summary-grid small,
.dcms-team-summary small,
.dt-metric small{
  font-size:10px!important;
  font-weight:900!important;
  letter-spacing:.06em!important;
  text-transform:uppercase!important;
  color:var(--dcms-office-pro-muted)!important;
}

.dv3-metrics strong,
.dos-kpis strong,
.prod-kpis strong,
.prod-launch-kpis strong,
.dcms-metrics-kpi-grid strong,
.dns-kpis strong,
.ops-kpi strong,
.dd-stat-grid strong,
.dd-summary-grid strong,
.dcms-team-summary strong,
.dt-metric strong{
  font-size:31px!important;
  line-height:1!important;
  letter-spacing:-.045em!important;
  font-weight:850!important;
  color:var(--dcms-office-pro-ink)!important;
}

/* Prevent ugly 5+1 or 6 auto-fit metric layouts where these sections are designed as balanced office dashboards. */
@media(min-width:1100px){
  .dv3-metrics-six,
  .dv3-inventory-stock-metrics,
  .dv3-metrics:has(> :nth-child(6)):not(:has(> :nth-child(7))),
  .dos-kpis:has(> :nth-child(6)):not(:has(> :nth-child(7))),
  .prod-kpis:has(> :nth-child(6)):not(:has(> :nth-child(7))),
  .prod-launch-kpis:has(> :nth-child(6)):not(:has(> :nth-child(7))),
  .dcms-metrics-kpi-grid:has(> :nth-child(6)):not(:has(> :nth-child(7))),
  .dns-kpis:has(> :nth-child(6)):not(:has(> :nth-child(7))){
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:18px!important;
  }

  /* Four-box stat rows stay as four. */
  .dd-stat-grid:has(> :nth-child(4)):not(:has(> :nth-child(5))),
  .dd-summary-grid:has(> :nth-child(4)):not(:has(> :nth-child(5))),
  .ops-kpis:has(> :nth-child(4)):not(:has(> :nth-child(5))),
  .dv3-metrics:has(> :nth-child(4)):not(:has(> :nth-child(5))),
  .dns-kpis:has(> :nth-child(4)):not(:has(> :nth-child(5))),
  .dos-kpis:has(> :nth-child(4)):not(:has(> :nth-child(5))){
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:18px!important;
  }

  /* Five-box rows should not become 4+1 or 5 cramped; make them balanced 3+2. */
  .dv3-metrics:has(> :nth-child(5)):not(:has(> :nth-child(6))),
  .dos-kpis:has(> :nth-child(5)):not(:has(> :nth-child(6))),
  .prod-kpis:has(> :nth-child(5)):not(:has(> :nth-child(6))),
  .dcms-metrics-kpi-grid:has(> :nth-child(5)):not(:has(> :nth-child(6))){
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:18px!important;
  }
}

/* Inventory & Stock specifically: always 3 over 3 on desktop. */
@media(min-width:1100px){
  .dcms-v3-office-page .dv3-inventory-stock-metrics,
  body.dcms-office-shell-page .dv3-inventory-stock-metrics{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:18px!important;
  }
}

/* Cleaner tabs: professional, less crowded, better aligned. */
@media(min-width:900px){
  .dd-tabs,
  .dns-tabs,
  .ops-tabs,
  .dos-link-row,
  .prod-tabs,
  .dv3-tabs,
  .dcms-metrics-tabs{
    display:flex!important;
    flex-wrap:wrap!important;
    gap:10px!important;
    align-items:center!important;
    margin:0 0 20px!important;
    padding:0!important;
  }

  .dd-tabs a,
  .dd-tabs button,
  .dns-tabs a,
  .dns-tabs button,
  .ops-tabs a,
  .ops-tabs button,
  .dos-link-row a,
  .prod-tabs a,
  .prod-tabs button,
  .dv3-tabs a,
  .dv3-tabs button,
  .dcms-metrics-tabs a,
  .dcms-metrics-tabs button{
    min-height:42px!important;
    padding:10px 15px!important;
    border-radius:999px!important;
    font-size:13px!important;
    font-weight:800!important;
    letter-spacing:-.01em!important;
  }
}

/* Forms and filters: more breathing room, less jammed. */
@media(min-width:1000px){
  .dd-filter-grid,
  .dd-record-edit-grid,
  .dd-form-grid,
  .dns-grid,
  .dos-grid-form,
  .prod-detail-grid,
  .dv3-rule-grid,
  .dv3-filter,
  .ops-filterbar,
  .dcms-team-form,
  .dcms-team-options{
    gap:16px!important;
  }

  .dv3-filter,
  .ops-filterbar,
  .dd-filter-panel form,
  .dns-filters,
  .dos-inline-form{
    padding:16px!important;
    border-radius:18px!important;
  }

  body.dcms-office-shell-page input:not([type="checkbox"]):not([type="radio"]),
  body.dcms-office-shell-page select,
  body.dcms-office-shell-page textarea,
  body.dot-dcms-dealer-page input:not([type="checkbox"]):not([type="radio"]),
  body.dot-dcms-dealer-page select,
  body.dot-dcms-dealer-page textarea,
  body.dcms-v3-office-page input:not([type="checkbox"]):not([type="radio"]),
  body.dcms-v3-office-page select,
  body.dcms-v3-office-page textarea{
    min-height:42px!important;
    padding:10px 12px!important;
    border-radius:11px!important;
  }
}

/* Tables: desktop alignment and breathing room. */
@media(min-width:1000px){
  .dd-table th,
  .dd-table td,
  .ops-table th,
  .ops-table td,
  .dv3-table th,
  .dv3-table td,
  .dns-table th,
  .dns-table td,
  .dos-table-wrap table th,
  .dos-table-wrap table td,
  .dcms-team-table th,
  .dcms-team-table td,
  .prod-table th,
  .prod-table td,
  .dcms-metrics-table th,
  .dcms-metrics-table td{
    padding:13px 14px!important;
  }

  .dd-table th,
  .ops-table th,
  .dv3-table th,
  .dns-table th,
  .dos-table-wrap table th,
  .dcms-team-table th,
  .prod-table th,
  .dcms-metrics-table th{
    font-size:10.5px!important;
    font-weight:900!important;
    letter-spacing:.06em!important;
    color:#667085!important;
    background:#f8fafc!important;
  }
}

/* Keep mobile clean and not overly spaced. */
@media(max-width:760px){
  .dv3-metrics,
  .dos-kpis,
  .prod-kpis,
  .prod-launch-kpis,
  .dcms-metrics-kpi-grid,
  .dns-kpis,
  .ops-kpis,
  .dd-stat-grid,
  .dd-summary-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:10px!important;
  }

  .dv3-metrics > div,
  .dos-kpis > div,
  .prod-kpis > div,
  .prod-launch-kpis > div,
  .dcms-metrics-kpi-grid > *,
  .dns-kpis > div,
  .ops-kpi,
  .dd-stat-grid > *,
  .dd-summary-grid > *{
    min-height:92px!important;
    padding:13px!important;
    border-radius:14px!important;
  }
}

@media(max-width:420px){
  .dv3-metrics,
  .dos-kpis,
  .prod-kpis,
  .prod-launch-kpis,
  .dcms-metrics-kpi-grid,
  .dns-kpis,
  .ops-kpis,
  .dd-stat-grid,
  .dd-summary-grid{
    grid-template-columns:1fr!important;
  }
}


/* =========================================================
   DCMS v3.1.9 — Live Map / Live Dispatch Desktop Cleanup
   Scope: Operations > Live Map / /dcms-dispatch/ / /dcms-tracker/ only.
   Technician /dcms-app/ untouched.
   ========================================================= */

:root{
  --dt-pro-font:"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --dt-pro-ink:#111827;
  --dt-pro-muted:#667085;
  --dt-pro-line:#dfe4ee;
  --dt-pro-soft:#f6f8fb;
  --dt-pro-orange:#f97316;
  --dt-pro-navy:#101827;
  --dt-pro-shadow:0 8px 24px rgba(15,23,42,.06);
  --dt-pro-shadow-strong:0 18px 44px rgba(15,23,42,.12);
}

body.dot-dcms-live-tracker-page,
body.dot-dcms-live-dispatch-page{
  background:#f3f5f9!important;
  overflow-x:hidden!important;
  font-family:var(--dt-pro-font)!important;
}

body.dot-dcms-live-tracker-page *,
body.dot-dcms-live-dispatch-page *{
  font-family:var(--dt-pro-font)!important;
  box-sizing:border-box!important;
}

/* Hide duplicate module header when Office Shell is active. */
body.dcms-office-shell-page.dot-dcms-live-tracker-page .dt-header,
body.dcms-office-shell-page.dot-dcms-live-dispatch-page .dt-header{
  display:none!important;
}

body.dot-dcms-live-tracker-page .dcms-tracker-page,
body.dot-dcms-live-dispatch-page .dcms-tracker-page,
body.dcms-office-shell-page.dot-dcms-live-tracker-page .dcms-tracker-page,
body.dcms-office-shell-page.dot-dcms-live-dispatch-page .dcms-tracker-page{
  min-height:calc(100vh - var(--doc-top,68px))!important;
  background:transparent!important;
  color:var(--dt-pro-ink)!important;
}

/* Desktop canvas: full office width, not a mobile/narrow container. */
@media(min-width:1000px){
  body.dot-dcms-live-tracker-page .dt-main,
  body.dot-dcms-live-dispatch-page .dt-main,
  body.dcms-office-shell-page.dot-dcms-live-tracker-page .dt-main,
  body.dcms-office-shell-page.dot-dcms-live-dispatch-page .dt-main{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:24px 28px 96px!important;
  }

  body.dot-dcms-live-tracker-page .dt-main > *,
  body.dot-dcms-live-dispatch-page .dt-main > *,
  body.dcms-office-shell-page.dot-dcms-live-tracker-page .dt-main > *,
  body.dcms-office-shell-page.dot-dcms-live-dispatch-page .dt-main > *{
    width:100%!important;
    max-width:none!important;
    margin-left:0!important;
    margin-right:0!important;
  }
}

/* Premium hero. */
body.dot-dcms-live-tracker-page .dt-hero,
body.dot-dcms-live-dispatch-page .dt-hero{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:end!important;
  gap:24px!important;
  padding:28px!important;
  margin:0 0 18px!important;
  border-radius:24px!important;
  border:0!important;
  background:
    radial-gradient(circle at 92% 10%, rgba(249,115,22,.34) 0, transparent 34%),
    linear-gradient(135deg,#0f172a 0%,#111827 58%,#241d1a 120%)!important;
  color:#fff!important;
  box-shadow:var(--dt-pro-shadow-strong)!important;
  overflow:hidden!important;
  position:relative!important;
}

body.dot-dcms-live-tracker-page .dt-hero::after,
body.dot-dcms-live-dispatch-page .dt-hero::after{
  content:"";
  position:absolute;
  inset:0;
  background:repeating-linear-gradient(135deg,rgba(255,255,255,.045) 0,rgba(255,255,255,.045) 1px,transparent 1px,transparent 20px);
  opacity:.55;
  pointer-events:none;
}

body.dot-dcms-live-tracker-page .dt-hero > *,
body.dot-dcms-live-dispatch-page .dt-hero > *{
  position:relative!important;
  z-index:1!important;
}

body.dot-dcms-live-tracker-page .dt-kicker,
body.dot-dcms-live-dispatch-page .dt-kicker{
  color:#fb923c!important;
  font-size:11px!important;
  font-weight:950!important;
  letter-spacing:.13em!important;
  text-transform:uppercase!important;
}

body.dot-dcms-live-tracker-page .dt-hero h1,
body.dot-dcms-live-dispatch-page .dt-hero h1{
  font-size:40px!important;
  line-height:1.04!important;
  letter-spacing:-.04em!important;
  font-weight:850!important;
  margin:4px 0 7px!important;
  color:#fff!important;
}

body.dot-dcms-live-tracker-page .dt-hero p:not(.dt-kicker),
body.dot-dcms-live-dispatch-page .dt-hero p:not(.dt-kicker){
  max-width:920px!important;
  font-size:15px!important;
  line-height:1.5!important;
  color:#d8e0ee!important;
}

body.dot-dcms-live-tracker-page .dt-live-pill,
body.dot-dcms-live-dispatch-page .dt-live-pill{
  min-width:190px!important;
  min-height:58px!important;
  border-radius:16px!important;
  background:rgba(255,255,255,.10)!important;
  border:1px solid rgba(255,255,255,.18)!important;
}

/* Metrics: four clean desktop boxes. */
body.dot-dcms-live-tracker-page .dt-metrics,
body.dot-dcms-live-dispatch-page .dt-metrics{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:16px!important;
  margin:0 0 18px!important;
}

body.dot-dcms-live-tracker-page .dt-metric,
body.dot-dcms-live-dispatch-page .dt-metric{
  min-height:112px!important;
  padding:17px 18px!important;
  border-radius:18px!important;
  border:1px solid var(--dt-pro-line)!important;
  background:#fff!important;
  box-shadow:var(--dt-pro-shadow)!important;
  position:relative!important;
  overflow:hidden!important;
}

body.dot-dcms-live-tracker-page .dt-metric::before,
body.dot-dcms-live-dispatch-page .dt-metric::before{
  content:"";
  position:absolute;
  left:0;right:0;top:0;height:4px;
  background:var(--dt-pro-orange);
}

body.dot-dcms-live-tracker-page .dt-metric span,
body.dot-dcms-live-dispatch-page .dt-metric span{
  font-size:10px!important;
  font-weight:900!important;
  letter-spacing:.06em!important;
  text-transform:uppercase!important;
  color:var(--dt-pro-muted)!important;
}

body.dot-dcms-live-tracker-page .dt-metric strong,
body.dot-dcms-live-dispatch-page .dt-metric strong{
  font-size:32px!important;
  line-height:1!important;
  letter-spacing:-.045em!important;
  font-weight:850!important;
  color:var(--dt-pro-ink)!important;
}

/* Toolbar: stop it from stacking like mobile. */
@media(min-width:1100px){
  body.dot-dcms-live-tracker-page .dt-toolbar,
  body.dot-dcms-live-dispatch-page .dt-toolbar,
  body.dot-dcms-live-tracker-page .dt-live-map-toolbar,
  body.dot-dcms-live-dispatch-page .dt-live-map-toolbar{
    display:grid!important;
    grid-template-columns:minmax(160px,.75fr) minmax(230px,1.1fr) minmax(210px,1fr) minmax(210px,1fr) minmax(270px,1.15fr) auto!important;
    gap:12px!important;
    align-items:end!important;
    width:100%!important;
    padding:16px!important;
    margin:0 0 18px!important;
    border-radius:18px!important;
    border:1px solid var(--dt-pro-line)!important;
    background:#fff!important;
    box-shadow:var(--dt-pro-shadow)!important;
  }

  body.dot-dcms-live-tracker-page .dt-toolbar label,
  body.dot-dcms-live-dispatch-page .dt-toolbar label{
    min-width:0!important;
    width:100%!important;
    display:grid!important;
    gap:6px!important;
  }

  body.dot-dcms-live-tracker-page .dt-toolbar input,
  body.dot-dcms-live-tracker-page .dt-toolbar select,
  body.dot-dcms-live-dispatch-page .dt-toolbar input,
  body.dot-dcms-live-dispatch-page .dt-toolbar select{
    min-height:44px!important;
    border-radius:12px!important;
  }

  body.dot-dcms-live-tracker-page .dt-layer-switches,
  body.dot-dcms-live-dispatch-page .dt-layer-switches{
    min-height:44px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:8px!important;
    flex-wrap:nowrap!important;
    padding:8px!important;
    border:1px solid #e6ebf2!important;
    border-radius:12px!important;
    background:#f8fafc!important;
  }

  body.dot-dcms-live-tracker-page .dt-layer-switches label,
  body.dot-dcms-live-dispatch-page .dt-layer-switches label{
    min-height:30px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:6px!important;
    padding:6px 8px!important;
    border-radius:999px!important;
    background:#fff!important;
    border:1px solid #e6ebf2!important;
    white-space:nowrap!important;
    font-size:12px!important;
    font-weight:800!important;
  }

  body.dot-dcms-live-tracker-page .dt-toolbar-actions,
  body.dot-dcms-live-dispatch-page .dt-toolbar-actions{
    display:flex!important;
    gap:8px!important;
    align-items:center!important;
    justify-content:flex-end!important;
    min-width:190px!important;
  }

  body.dot-dcms-live-tracker-page .dt-toolbar-actions button,
  body.dot-dcms-live-dispatch-page .dt-toolbar-actions button{
    min-height:44px!important;
    white-space:nowrap!important;
    padding:0 14px!important;
  }
}

/* Main Live Map desktop layout. */
@media(min-width:1100px){
  body.dot-dcms-live-tracker-page .dt-layout,
  body.dot-dcms-live-dispatch-page .dt-layout,
  body.dot-dcms-live-tracker-page .dt-live-map-layout,
  body.dot-dcms-live-dispatch-page .dt-live-map-layout{
    display:grid!important;
    grid-template-columns:minmax(0,2.25fr) minmax(360px,.75fr)!important;
    gap:18px!important;
    align-items:stretch!important;
    width:100%!important;
    margin:0 0 18px!important;
  }

  body.dot-dcms-live-tracker-page .dt-map-panel,
  body.dot-dcms-live-dispatch-page .dt-map-panel,
  body.dot-dcms-live-tracker-page .dt-list-panel,
  body.dot-dcms-live-dispatch-page .dt-list-panel{
    border-radius:20px!important;
    border:1px solid var(--dt-pro-line)!important;
    background:#fff!important;
    box-shadow:var(--dt-pro-shadow)!important;
    overflow:hidden!important;
  }

  body.dot-dcms-live-tracker-page .dt-map,
  body.dot-dcms-live-dispatch-page .dt-map{
    height:690px!important;
    min-height:690px!important;
    width:100%!important;
  }

  body.dot-dcms-live-tracker-page .dt-list-panel,
  body.dot-dcms-live-dispatch-page .dt-list-panel{
    min-height:690px!important;
    max-height:690px!important;
    display:flex!important;
    flex-direction:column!important;
  }

  body.dot-dcms-live-tracker-page .dt-technician-list,
  body.dot-dcms-live-dispatch-page .dt-technician-list{
    flex:1 1 auto!important;
    max-height:none!important;
    overflow:auto!important;
    padding:12px!important;
    gap:9px!important;
  }
}

/* Technician cards: desktop-ready, less cramped. */
body.dot-dcms-live-tracker-page .dt-tech-card,
body.dot-dcms-live-dispatch-page .dt-tech-card{
  border-radius:15px!important;
  border:1px solid #e6ebf2!important;
  background:#fff!important;
  padding:12px!important;
  box-shadow:0 3px 10px rgba(15,23,42,.035)!important;
}

body.dot-dcms-live-tracker-page .dt-tech-card:hover,
body.dot-dcms-live-dispatch-page .dt-tech-card:hover{
  border-color:#fb923c!important;
  background:#fff7ed!important;
}

/* Jobs list under the map. */
body.dot-dcms-live-tracker-page .dt-jobs-panel,
body.dot-dcms-live-dispatch-page .dt-jobs-panel{
  width:100%!important;
  max-width:none!important;
  border-radius:20px!important;
  border:1px solid var(--dt-pro-line)!important;
  background:#fff!important;
  box-shadow:var(--dt-pro-shadow)!important;
  padding:18px!important;
  margin:0 0 18px!important;
}

body.dot-dcms-live-tracker-page .dt-jobs-head,
body.dot-dcms-live-dispatch-page .dt-jobs-head{
  display:flex!important;
  justify-content:space-between!important;
  align-items:flex-start!important;
  gap:16px!important;
  padding-bottom:14px!important;
  margin-bottom:14px!important;
  border-bottom:1px solid #edf0f5!important;
}

@media(min-width:1100px){
  body.dot-dcms-live-tracker-page .dt-job-list,
  body.dot-dcms-live-dispatch-page .dt-job-list{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:12px!important;
  }
}

/* Warning panel alignment. */
body.dot-dcms-live-tracker-page .dt-warning-panel,
body.dot-dcms-live-dispatch-page .dt-warning-panel{
  border-radius:20px!important;
  border:1px solid #fed7aa!important;
  background:#fff7ed!important;
  box-shadow:var(--dt-pro-shadow)!important;
  padding:18px!important;
  margin:0 0 18px!important;
}

/* Settings area. */
body.dot-dcms-live-tracker-page .dt-settings,
body.dot-dcms-live-dispatch-page .dt-settings{
  width:100%!important;
  max-width:none!important;
  border-radius:20px!important;
  border:1px solid var(--dt-pro-line)!important;
  background:#fff!important;
  box-shadow:var(--dt-pro-shadow)!important;
  padding:16px!important;
}

body.dot-dcms-live-tracker-page .dt-settings form,
body.dot-dcms-live-dispatch-page .dt-settings form{
  margin-top:14px!important;
}

@media(min-width:1100px){
  body.dot-dcms-live-tracker-page .dt-settings form,
  body.dot-dcms-live-dispatch-page .dt-settings form{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:14px!important;
    align-items:end!important;
  }

  body.dot-dcms-live-tracker-page .dt-settings .full,
  body.dot-dcms-live-dispatch-page .dt-settings .full{
    grid-column:1/-1!important;
  }
}

/* Tablet and mobile: remain app-like, but not broken. */
@media(max-width:1099px){
  body.dot-dcms-live-tracker-page .dt-main,
  body.dot-dcms-live-dispatch-page .dt-main{
    width:calc(100vw - 22px)!important;
    max-width:none!important;
    padding:16px 0 90px!important;
    margin:0 auto!important;
  }

  body.dot-dcms-live-tracker-page .dt-hero,
  body.dot-dcms-live-dispatch-page .dt-hero{
    display:block!important;
    padding:22px!important;
    border-radius:22px!important;
  }

  body.dot-dcms-live-tracker-page .dt-live-pill,
  body.dot-dcms-live-dispatch-page .dt-live-pill{
    margin-top:14px!important;
    width:max-content!important;
  }

  body.dot-dcms-live-tracker-page .dt-metrics,
  body.dot-dcms-live-dispatch-page .dt-metrics{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:10px!important;
  }

  body.dot-dcms-live-tracker-page .dt-toolbar,
  body.dot-dcms-live-dispatch-page .dt-toolbar{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:11px!important;
    padding:14px!important;
    border-radius:18px!important;
  }

  body.dot-dcms-live-tracker-page .dt-layer-switches,
  body.dot-dcms-live-dispatch-page .dt-layer-switches,
  body.dot-dcms-live-tracker-page .dt-toolbar-actions,
  body.dot-dcms-live-dispatch-page .dt-toolbar-actions{
    display:flex!important;
    gap:8px!important;
    flex-wrap:wrap!important;
  }

  body.dot-dcms-live-tracker-page .dt-toolbar-actions button,
  body.dot-dcms-live-dispatch-page .dt-toolbar-actions button{
    flex:1 1 140px!important;
  }

  body.dot-dcms-live-tracker-page .dt-layout,
  body.dot-dcms-live-dispatch-page .dt-layout{
    grid-template-columns:1fr!important;
    gap:14px!important;
  }

  body.dot-dcms-live-tracker-page .dt-map,
  body.dot-dcms-live-dispatch-page .dt-map{
    height:470px!important;
    min-height:470px!important;
  }

  body.dot-dcms-live-tracker-page .dt-list-panel,
  body.dot-dcms-live-dispatch-page .dt-list-panel{
    min-height:0!important;
    max-height:none!important;
  }
}

@media(max-width:520px){
  body.dot-dcms-live-tracker-page .dt-metrics,
  body.dot-dcms-live-dispatch-page .dt-metrics{
    grid-template-columns:1fr!important;
  }

  body.dot-dcms-live-tracker-page .dt-map,
  body.dot-dcms-live-dispatch-page .dt-map{
    height:390px!important;
    min-height:390px!important;
  }
}
