/* v0.7.1: tokens and executive overview; other workspace pages retain their layouts. */
:root {
  --milebs-navy-950:#071321;
  --milebs-navy-900:#0b192b;
  --milebs-navy-850:#0f2034;
  --milebs-navy-800:#13263d;
  --milebs-navy-700:#1c3551;
  --milebs-border:#243a53;
  --milebs-text:#edf4fc;
  --milebs-muted:#91a7c0;
  --milebs-blue:#1769ed;
  --milebs-green:#18ad78;
  --milebs-orange:#f18b32;
  --milebs-red:#ec5664;
  --milebs-purple:#9860ef;
  --milebs-radius:11px;
  --milebs-space:12px;
  --milebs-shadow:0 8px 22px #02091424;
}

/* Global navigation identity from the approved Model 1. */
.sidebar{width:230px;padding:25px 14px 15px;background:var(--milebs-navy-900);color:#b5c4d7;border-right:1px solid #1d3048}
.brand{padding:0 10px}.brand-mark{background:#1769ed;color:#fff;border-radius:9px;box-shadow:none}
.brand-company{color:#fff}.brand-product{color:#edf4fc}.brand-copy small{color:#91a7c0}
.nav-caption{margin:34px 14px 12px;color:#748ba6}
.sidebar nav{gap:4px}.sidebar nav a{min-height:39px;padding:9px 12px;border-radius:8px;color:#a9bbd0}
.sidebar nav a:hover{background:#142941;color:#e4effc}.sidebar nav a.active{color:#fff;background:#1157c9;box-shadow:none;font-weight:650}
.sidebar-note{border-color:#21364e;color:#9cafc5}.sidebar-note i{background:#21c18a}
.sidebar-footer{color:#b4c3d5}.sidebar-footer small{color:#8196ae}.sidebar-footer .developer-credit{border-color:#263b53}

body.executive-dashboard-active{min-height:100vh;background:var(--milebs-navy-950);color:var(--milebs-text)}
body.executive-dashboard-active main{min-height:100vh;background:var(--milebs-navy-950)}
body.executive-dashboard-active .topbar{height:54px;padding:0 24px;background:var(--milebs-navy-900);border-color:#1c3047;color:var(--milebs-muted)}
body.executive-dashboard-active .topbar-identity>strong{color:#e8f0fa}
body.executive-dashboard-active .topbar-identity>b{color:#5f9dff}
body.executive-dashboard-active .topbar .environment{gap:10px}
body.executive-dashboard-active .topbar .environment button{padding:7px 10px;border:1px solid var(--milebs-border);border-radius:7px;background:var(--milebs-navy-850);color:#d9e5f3;font-size:11px}
body.executive-dashboard-active .topbar .environment button:hover{background:var(--milebs-navy-700)}
body.executive-dashboard-active .page{width:100%;max-width:none;min-width:0;margin:0;padding:13px 22px 16px}
body.executive-dashboard-active .page-heading,
body.executive-dashboard-active .demo-notice,
body.executive-dashboard-active .data-toolbar{display:none!important}
body.executive-dashboard-active #overview-panel{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;min-width:0;width:100%;color:var(--milebs-text)}
body.executive-dashboard-active #overview-panel[hidden]{display:none!important}
body.executive-dashboard-active .page-footer{display:none}
body.executive-dashboard-active #app-message:not([hidden]){margin:0 0 9px;padding:9px 12px;border-radius:8px}

.exec-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:54px;min-width:0;width:100%}
.exec-title{display:flex;align-items:center;gap:11px;min-width:220px}
.exec-title-mark{display:grid;place-items:center;width:38px;height:38px;flex:0 0 auto;border:1px solid #214478;border-radius:10px;background:#102b4c;color:#73a9ff;font-size:19px}
.exec-title h1{margin:0;color:var(--milebs-text);font-size:19px;letter-spacing:-.35px;line-height:1.2}
.exec-title p{margin:4px 0 0;color:#a5b7cc;font-size:10px}
.exec-title small{display:block;margin-top:3px;color:#6f86a1;font-size:9px}
.exec-controls{display:flex;align-items:end;justify-content:flex-end;gap:8px;min-width:0;max-width:100%}
.exec-controls label{display:grid;gap:4px;margin:0;color:#8fa5be;font-size:9px;font-weight:600}
.exec-controls input,.exec-controls select{height:33px;padding:5px 8px;border:1px solid #29415e;border-radius:7px;background:#0d1d30;color:#eaf1fa;font-size:10px}
.exec-controls select{min-width:145px}
.exec-date-range{display:flex;align-items:center;gap:5px;min-width:0;max-width:100%}.exec-date-range input{width:124px}.exec-date-range span{color:#7186a0}
.exec-controls>button,.exec-map-empty button{height:34px;padding:0 12px;border:1px solid var(--milebs-blue);border-radius:7px;background:var(--milebs-blue);color:#fff;font-size:10px;font-weight:650;white-space:nowrap}
.exec-controls>button:hover,.exec-map-empty button:hover{background:#0f58ce}
.exec-print-title,.exec-print-context{display:none}

.exec-metrics{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:9px;min-width:0}
.exec-metric{position:relative;display:flex;align-items:center;gap:10px;min-width:0;min-height:78px;padding:10px;border:1px solid var(--milebs-border);border-radius:var(--milebs-radius);background:var(--milebs-navy-850);box-shadow:var(--milebs-shadow)}
.exec-metric-icon{display:grid;place-items:center;width:37px;height:37px;flex:0 0 auto;border-radius:10px;background:#122e50;color:#61a0ff}
.exec-metric-icon svg{width:19px;height:19px;stroke-width:1.8}
.exec-metric-icon.icon-operators{background:#2a1d49;color:#b58bff}.exec-metric-icon.icon-devices{background:#142d55;color:#76a8ff}.exec-metric-icon.icon-active{background:#10382f;color:#3fdaaa}.exec-metric-icon.icon-problem{background:#48222e;color:#ff7781}.exec-metric-icon.icon-rate{background:#10382f;color:#41d8aa}
.exec-metric-copy{display:grid;min-width:0;gap:3px}.exec-metric-copy small{overflow:hidden;color:#9cb0c7;font-size:9px;text-overflow:ellipsis;white-space:nowrap}.exec-metric-copy strong{color:#f4f7fc;font-size:21px;line-height:1.05;letter-spacing:-.5px}.exec-metric-copy em{overflow:hidden;color:#7188a3;font-size:8px;font-style:normal;text-overflow:ellipsis;white-space:nowrap}
.exec-rate-ring{display:grid;place-items:center;width:42px;height:42px;flex:0 0 auto;margin-left:auto;border-radius:50%;background:conic-gradient(var(--milebs-green) var(--rate),#25405a 0);position:relative}
.exec-rate-ring:before{position:absolute;inset:4px;border-radius:50%;background:var(--milebs-navy-850);content:""}.exec-rate-ring b{position:relative;color:#d9f9ef;font-size:10px}

.exec-card{min-width:0;max-width:100%;overflow:hidden;border:1px solid var(--milebs-border);border-radius:var(--milebs-radius);background:var(--milebs-navy-850);box-shadow:var(--milebs-shadow)}
.exec-card>header{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:51px;padding:9px 13px;border-bottom:1px solid #21364e}
.exec-card>header h2{margin:0;color:#ebf2fb;font-size:12px;font-weight:650}
.exec-card>header p{margin:4px 0 0;color:#849bb4;font-size:9px}
.exec-text-action{padding:5px 7px;border:0;background:transparent;color:#65a2ff;font-size:9px;white-space:nowrap}
.exec-text-action:hover{color:#a8cbff}
.exec-main-grid{display:grid;grid-template-columns:minmax(0,2.2fr) minmax(250px,.95fr);gap:10px;min-height:clamp(250px,34vh,360px);min-width:0}
.exec-map-card{display:flex;flex-direction:column}.exec-map-card>header{flex:0 0 auto}
.exec-map-source{color:#879bb3;font-size:8px;white-space:nowrap}
.exec-map-wrap{position:relative;flex:1;min-height:180px;background:#13243a}
#exec-map{position:absolute;inset:0;background:#13243a}
.exec-map-empty{position:absolute;inset:0;z-index:500;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;padding:18px;background:#0b192bd9;text-align:center}
.exec-map-empty>span{color:#71aaff;font-size:26px}.exec-map-empty strong{color:#e8f0fa;font-size:12px}.exec-map-empty small{max-width:330px;color:#9cafc5;font-size:10px;line-height:1.5}.exec-map-empty button{margin-top:4px}
.exec-map-message{position:absolute;z-index:600;left:12px;right:12px;bottom:10px;margin:0;padding:9px;border:1px solid #634f2d;border-radius:7px;background:#302819;color:#f2d496;font-size:10px}
.exec-map-legend{display:flex;flex-wrap:wrap;gap:12px;min-height:29px;align-items:center;padding:5px 12px;color:#aabbd0;font-size:9px}.exec-map-legend span{display:inline-flex;align-items:center;gap:5px}.exec-map-legend i{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--marker-color,#7b8da5)}.exec-map-legend i.unassigned{background:#7b8da5}
.exec-map-icon{background:none;border:0}.exec-map-origin,.exec-map-company{position:relative;display:grid;place-items:center;width:31px;height:31px;border:2px solid #fff;border-radius:50%;background:var(--marker-color);box-shadow:0 2px 9px #02091499;color:#fff;font-size:12px;font-weight:750}.exec-map-company{width:27px;height:27px;font-size:10px}.exec-map-company i{font-style:normal}.exec-map-company b{position:absolute;right:-5px;top:-5px;display:grid;place-items:center;min-width:14px;height:14px;padding:0 2px;border:1px solid #fff;border-radius:8px;background:#58718d;color:white;font-size:8px;font-weight:750}.exec-map-company b.visit-completed{background:var(--milebs-green)}.exec-map-company b.visit-in_progress{background:#448dff}.exec-map-company b.visit-not_completed,.exec-map-company b.visit-cancelled{background:var(--milebs-red)}.exec-map-company b.visit-pending{background:var(--milebs-orange)}
.exec-activity{display:flex;flex-direction:column}.exec-activity-list{display:grid;align-content:start;overflow:auto;min-height:0;flex:1}.exec-activity-item{display:grid;grid-template-columns:28px minmax(0,1fr) auto;align-items:center;gap:8px;min-width:0;padding:9px 11px;border:0;border-bottom:1px solid #20344b;background:transparent;color:inherit;text-align:left}.exec-activity-item:hover{background:#152a42}.exec-activity-icon{display:grid;place-items:center;width:27px;height:27px;border-radius:50%;background:#123c43;color:#54d4b4;font-size:12px}.exec-activity-icon.type-report{background:#28314d;color:#a894ff}.exec-activity-icon.type-not_completed{background:#47232c;color:#ff8290}.exec-activity-copy{display:grid;min-width:0;gap:3px}.exec-activity-copy strong{overflow:hidden;color:#ecf3fc;font-size:9px;text-overflow:ellipsis;white-space:nowrap}.exec-activity-copy>span{overflow:hidden;color:#b7c5d6;font-size:9px;text-overflow:ellipsis;white-space:nowrap}.exec-activity-copy small{overflow:hidden;color:#788da5;font-size:8px;text-overflow:ellipsis;white-space:nowrap}.exec-activity-item time{align-self:start;margin-top:3px;color:#8498ae;font-size:8px;white-space:nowrap}
.exec-empty{margin:auto;padding:24px 14px;color:#95a9c0;font-size:10px;text-align:center}.exec-empty-visual{display:flex;min-height:150px;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:14px;color:#91a6bf;text-align:center}.exec-empty-visual>span{color:#62a4ff;font-size:24px}.exec-empty-visual p{margin:0;color:#d9e4f0;font-size:11px}.exec-empty-visual small{max-width:280px;color:#8095ad;font-size:9px;line-height:1.5}.exec-empty-visual.compact{min-height:126px}
.exec-grid{display:grid;gap:10px;min-width:0}.exec-bottom-grid{grid-template-columns:minmax(0,1.35fr) minmax(200px,.8fr) minmax(230px,1fr)}.exec-bottom-grid>.exec-card{min-height:170px}.exec-chart-period{color:#8298b1;font-size:8px;white-space:nowrap}.exec-chart{display:block;width:100%;height:115px;padding:7px 12px 5px;overflow:visible}.exec-chart text{fill:#8398b1;font-family:inherit;font-size:9px}.exec-chart .grid{stroke:#233850;stroke-width:1}.exec-chart-line{fill:none;stroke:#21cbb4;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}.exec-chart-area{fill:#18bca51b}.exec-chart circle{fill:#56e0cc;stroke:#10263a;stroke-width:2}
.exec-visits-layout{display:flex;align-items:center;justify-content:center;gap:12px;min-height:116px;padding:6px 10px}.exec-ring{width:90px;height:90px;flex:0 0 auto;transform:rotate(-90deg)}.exec-ring-segment{fill:none;stroke-width:11}.exec-ring text{fill:#f2f7fc;font-size:17px;font-weight:700;transform:rotate(90deg);transform-origin:46px 46px}.exec-ring .exec-ring-caption{fill:#92a7bf;font-size:7px;font-weight:500}.exec-ring-legend{display:grid;gap:7px;min-width:112px}.exec-ring-legend>div{display:grid;grid-template-columns:8px 1fr auto;align-items:center;gap:5px;color:#9db0c6;font-size:8px}.exec-ring-legend i{width:7px;height:7px;border-radius:50%;background:var(--segment)}.exec-ring-legend strong{color:#e4edf7;font-size:9px}
.exec-attention-list{display:grid;align-content:start}.exec-attention-row{display:flex;align-items:center;gap:9px;padding:9px 12px;border-bottom:1px solid #21364e}.exec-attention-row>i{width:8px;height:8px;flex:0 0 auto;border-radius:50%;background:var(--milebs-orange)}.exec-attention-row>i.level-red,.exec-attention-row>i.level-review{background:var(--milebs-red)}.exec-attention-row>i.level-stale{background:#a477f0}.exec-attention-row>span{display:grid;min-width:0;gap:3px}.exec-attention-row strong{overflow:hidden;color:#e8f0fa;font-size:9px;text-overflow:ellipsis;white-space:nowrap}.exec-attention-row small{overflow:hidden;color:#8da2ba;font-size:8px;text-overflow:ellipsis;white-space:nowrap}
.exec-updated{margin:0;color:#7086a0;font-size:8px;line-height:1.4}
.leaflet-container{font:11px/1.5 "Segoe UI",Arial,sans-serif}.leaflet-control-zoom a{background:#0d2036!important;color:#eaf2fc!important;border-color:#314967!important}.leaflet-control-attribution{background:#0b192bd9!important;color:#aabbd0!important}.leaflet-control-attribution a{color:#87b8ff!important}
.mobile-nav-toggle{display:none}
.sidebar-backdrop{display:none}

@media(max-width:1250px){body.executive-dashboard-active .page{padding-inline:16px}.exec-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}.exec-metric{min-height:68px}.exec-main-grid{min-height:300px}}
@media(max-width:900px){.sidebar{width:210px}main{margin-left:210px}.exec-heading{align-items:flex-start;flex-direction:column}.exec-controls{width:100%;justify-content:flex-start;flex-wrap:wrap}.exec-main-grid{grid-template-columns:minmax(0,1.6fr) minmax(220px,1fr)}.exec-bottom-grid{grid-template-columns:1fr 1fr}.exec-attention{grid-column:1/-1}}
@media(max-width:760px){main{margin-left:0}.sidebar{position:fixed;inset:0 auto 0 0;width:min(280px,84vw);padding:22px 14px;transform:translateX(-101%);transition:transform .18s ease;z-index:1300}.mobile-nav-open .sidebar{transform:translateX(0)}.sidebar nav{grid-template-columns:1fr;gap:4px;margin-top:0}.sidebar nav a{flex-direction:row;justify-content:flex-start;text-align:left}.sidebar .nav-caption{margin:23px 14px 12px}.sidebar-note,.sidebar-footer{display:block}.sidebar-backdrop:not([hidden]){position:fixed;inset:0;z-index:1299;display:block;border:0;background:#0209149c}.mobile-nav-toggle{display:grid;place-items:center;width:34px;height:34px;flex:0 0 auto;border:1px solid #29415e;border-radius:7px;background:#10243a;color:#e5effb}.topbar{gap:8px}.topbar-identity{min-width:0;overflow:hidden}.topbar-identity strong,.topbar-identity .slash:nth-of-type(1),.topbar-identity>b{display:none}.environment{gap:5px!important;font-size:0}.environment button{font-size:10px!important}.environment .avatar{display:none}body.executive-dashboard-active .topbar{height:54px;min-height:54px;padding:0 12px;display:grid;grid-template-columns:34px minmax(0,1fr) auto;grid-template-rows:1fr;flex-wrap:nowrap;overflow:hidden}.executive-dashboard-active .topbar #mobile-nav-toggle{grid-column:1;grid-row:1}.executive-dashboard-active .topbar .topbar-identity{grid-column:2;grid-row:1;flex:initial;width:auto}.executive-dashboard-active .topbar .environment{grid-column:3;grid-row:1;max-width:none;width:auto;flex-wrap:nowrap;white-space:nowrap}.exec-main-grid{grid-template-columns:1fr;min-height:0}.exec-map-card{height:320px}.exec-activity{min-height:220px}.exec-bottom-grid{grid-template-columns:1fr 1fr}.exec-attention{grid-column:1/-1}}
@media(max-width:520px){body.executive-dashboard-active .page{padding:12px 10px}body.executive-dashboard-active .exec-heading,body.executive-dashboard-active #overview-panel,body.executive-dashboard-active .exec-main-grid,body.executive-dashboard-active .exec-bottom-grid{width:100%;min-width:0;max-width:100%}.exec-heading{gap:10px}.exec-title{min-width:0}.exec-title h1{font-size:17px}.exec-title-mark{width:34px;height:34px}.exec-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%}.exec-controls>label:first-child{grid-column:1/-1}.exec-date-range input{width:min(34vw,150px)}.exec-controls select{width:100%;min-width:0}.exec-controls>button{grid-column:1/-1;width:100%}.exec-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.exec-metric{min-height:69px;padding:8px;gap:7px}.exec-metric-icon{width:31px;height:31px}.exec-metric-icon svg{width:16px;height:16px}.exec-metric-copy strong{font-size:18px}.exec-metric-copy small{font-size:8px}.exec-metric-copy em{font-size:7px}.exec-rate-ring{width:34px;height:34px}.exec-rate-ring b{font-size:8px}.exec-map-card{height:285px}.exec-bottom-grid{grid-template-columns:minmax(0,1fr)}.exec-attention{grid-column:auto}.exec-bottom-grid>.exec-card{min-height:155px}.exec-chart{height:125px}.exec-visits-layout{justify-content:flex-start;padding-left:20px}.exec-card>header{padding-inline:10px}.exec-map-source{font-size:7px}}
@media(max-width:360px){.exec-metric{gap:5px;padding:7px}.exec-metric-copy strong{font-size:16px}.exec-title p{font-size:9px}.exec-date-range{gap:3px}.exec-date-range input{width:31vw;padding-inline:4px}.exec-controls label{font-size:8px}}
@media(prefers-reduced-motion:reduce){.sidebar,body.executive-dashboard-active *{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

@media print{
  @page{size:A4 landscape;margin:10mm}
  body.printing-executive-report{background:#fff!important;color:#172234!important}
  body.printing-executive-report .sidebar,body.printing-executive-report .topbar,body.printing-executive-report .sync-alert,body.printing-executive-report .environment{display:none!important}
  body.printing-executive-report main{margin:0!important;background:#fff!important}
  body.printing-executive-report .page{padding:0!important}
  body.printing-executive-report #overview-panel{position:static!important;inset:auto!important;display:grid!important;grid-template-columns:minmax(0,1fr);gap:7px;width:100%;padding:0!important;background:#fff!important;color:#172234!important}
  body.printing-executive-report .exec-heading{display:block;margin-bottom:12px}
  body.printing-executive-report .exec-title h1,body.printing-executive-report .exec-card h2,body.printing-executive-report .exec-metric-copy strong{color:#172234!important}
  body.printing-executive-report .exec-controls{display:none}
  body.printing-executive-report .exec-print-title,body.printing-executive-report .exec-print-context{display:block;margin:4px 0;color:#344459;font-size:10px}
  body.printing-executive-report .exec-card,body.printing-executive-report .exec-metric{break-inside:avoid;border-color:#d8e0e8;background:#fff!important;box-shadow:none}
  body.printing-executive-report .exec-metrics{grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:5px}
  body.printing-executive-report .exec-metric{min-height:60px;padding:6px;gap:6px}
  body.printing-executive-report .exec-metric-icon{width:30px;height:30px}
  body.printing-executive-report .exec-metric-copy small{color:#53667b;font-size:8px}
  body.printing-executive-report .exec-metric-copy em{color:#718096;font-size:7px}
  body.printing-executive-report .exec-rate-ring{width:30px;height:30px}
  body.printing-executive-report .exec-main-grid{grid-template-columns:minmax(0,2.2fr) minmax(250px,.95fr);gap:7px;height:250px;min-height:0;break-inside:avoid}
  body.printing-executive-report .exec-activity{min-height:0}
  body.printing-executive-report .exec-map-wrap{min-height:0}
  body.printing-executive-report .exec-activity-list{overflow:hidden}
  body.printing-executive-report .exec-activity-item{padding:5px 8px;grid-template-columns:23px minmax(0,1fr) auto;gap:6px}
  body.printing-executive-report .exec-activity-item:nth-of-type(n+5){display:none}
  body.printing-executive-report .exec-activity-copy strong,body.printing-executive-report .exec-activity-copy>span{color:#26384d}
  body.printing-executive-report .exec-activity-copy small,body.printing-executive-report .exec-activity-item time{color:#62758b}
  body.printing-executive-report .exec-bottom-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px;margin-top:0}
  body.printing-executive-report .exec-bottom-grid>.exec-card{min-height:130px}
  body.printing-executive-report .exec-attention{grid-column:auto!important}
  body.printing-executive-report .exec-chart{height:80px}
  body.printing-executive-report .exec-visits-layout{min-height:80px}
  body.printing-executive-report .exec-attention-row strong{color:#26384d}
  body.printing-executive-report .exec-attention-row small{color:#62758b}
  body.printing-executive-report .exec-empty-visual p{color:#26384d}
  body.printing-executive-report .exec-empty-visual small{color:#62758b}
  body.printing-executive-report .exec-updated{margin-top:0;color:#62758b}
  body.printing-executive-report .exec-updated{display:none}
  body.printing-executive-report .exec-map-empty{background:#f5f8fb}
  body.printing-executive-report #exec-map{background:#f2f5f8}
}
