:root{
  color-scheme:dark;
  --bg:#06111f;
  --bg-2:#081726;
  --panel:#0b1b2f;
  --panel-2:#0f2847;
  --panel-3:#102f54;
  --line:#20456f;
  --line-soft:rgba(120,174,238,.22);
  --text:#edf7ff;
  --muted:#8aa7c8;
  --blue:#2f9cff;
  --blue-2:#1268e4;
  --green:#18d889;
  --red:#ff416d;
  --yellow:#ffd23f;
  --purple:#a66cff;
  --orange:#ff8a35;
  --cyan:#43d4ff;
  --shadow:0 22px 70px rgba(0,0,0,.28);
}

*{box-sizing:border-box}
html,body,#app{min-height:100%}
body{
  margin:0;
  font-family:Inter,Segoe UI,Arial,sans-serif;
  background:
    radial-gradient(circle at 8% 0%, rgba(255,138,53,.12), transparent 28%),
    radial-gradient(circle at 82% 6%, rgba(47,156,255,.15), transparent 34%),
    linear-gradient(135deg,#040c16 0%,#07182a 52%,#04101d 100%);
  color:var(--text);
  letter-spacing:0;
}
button,input,select{font:inherit}
button{cursor:pointer}
button:disabled{opacity:.52;cursor:not-allowed}
select{
  color-scheme:dark;
}
select option{
  background:#07182b;
  color:#edf7ff;
}
select option:checked,
select option:hover{
  background:#123a66;
  color:#fff;
}

.aging-strip{
  display:flex;
  width:100%;
  min-height:58px;
  margin:10px 0 14px;
  overflow:hidden;
  border:1px solid var(--line-soft);
  border-radius:8px;
  background:rgba(255,255,255,.035);
}
.aging-segment{
  min-width:110px;
  padding:10px 12px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:4px;
  color:#04101d;
  font-weight:900;
  white-space:nowrap;
}
.aging-segment span{
  font-size:12px;
  opacity:.9;
}
.aging-segment.green{background:linear-gradient(135deg,var(--green),#95ffd2)}
.aging-segment.blue{background:linear-gradient(135deg,var(--blue),#9fd3ff)}
.aging-segment.yellow{background:linear-gradient(135deg,var(--yellow),#ffe98d)}
.aging-segment.orange{background:linear-gradient(135deg,var(--orange),#ffc094)}
.aging-segment.red{background:linear-gradient(135deg,var(--red),#ff9ab2)}

.boot,.login{
  min-height:100vh;
  display:grid;
  place-items:center;
  color:var(--muted);
}
.brand-mark{
  width:46px;
  height:46px;
  border-radius:14px;
  background:conic-gradient(from 220deg,var(--orange),var(--yellow),var(--red),var(--orange));
  box-shadow:0 0 34px rgba(255,138,53,.35);
}

.shell{
  display:grid;
  grid-template-columns:252px minmax(0,1fr);
  min-height:100vh;
  transition:grid-template-columns .18s ease;
}
.shell.sidebar-collapsed{
  grid-template-columns:76px minmax(0,1fr);
}
.sidebar{
  position:sticky;
  top:0;
  height:100vh;
  padding:14px 12px;
  background:rgba(3,12,23,.88);
  border-right:1px solid var(--line-soft);
  backdrop-filter:blur(18px);
  overflow:auto;
}
.brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-height:58px;
  padding:8px;
  margin-bottom:8px;
}
.brand .mark{
  width:42px;
  height:42px;
  border-radius:13px;
  background:
    linear-gradient(135deg,rgba(255,255,255,.22),transparent),
    conic-gradient(from 220deg,var(--orange),var(--yellow),var(--red),var(--orange));
  box-shadow:0 0 28px rgba(255,138,53,.28);
}
.brand strong{display:block;font-size:17px;line-height:1.1}
.brand span{display:block;color:var(--yellow);font-size:11px;font-weight:800;margin-top:3px}
.sidebar-toggle{
  width:34px;
  height:34px;
  margin-left:auto;
  flex:0 0 34px;
  border:1px solid rgba(119,213,255,.45);
  border-radius:7px;
  background:linear-gradient(180deg,rgba(13,42,73,.86),rgba(8,25,45,.78));
  color:var(--text);
  display:grid;
  place-items:center;
}
.sidebar-toggle:hover{border-color:#f1c037}
.sidebar-toggle span,
.sidebar-toggle span:before,
.sidebar-toggle span:after{
  content:"";
  display:block;
  width:14px;
  height:2px;
  border-radius:2px;
  background:#dff4ff;
}
.sidebar-toggle span{position:relative}
.sidebar-toggle span:before,
.sidebar-toggle span:after{
  position:absolute;
  left:0;
}
.sidebar-toggle span:before{top:-5px}
.sidebar-toggle span:after{top:5px}
.shell.sidebar-collapsed .sidebar{
  padding:14px 9px;
  overflow-x:hidden;
}
.shell.sidebar-collapsed .brand{
  display:grid;
  justify-items:center;
  gap:8px;
  padding:7px 0;
}
.shell.sidebar-collapsed .brand .mark{
  width:38px;
  height:38px;
}
.shell.sidebar-collapsed .brand-copy{display:none}
.shell.sidebar-collapsed .sidebar-toggle{
  margin:0;
  width:38px;
  height:32px;
}

.nav-group{
  margin:14px 4px 7px;
  padding:0 4px 7px;
  color:#77d5ff;
  border-bottom:1px solid var(--line-soft);
  font-size:10px;
  font-weight:800;
  text-transform:uppercase;
}
.shell.sidebar-collapsed .nav-group{
  height:1px;
  margin:12px 8px 8px;
  padding:0;
  border-bottom:1px solid rgba(119,213,255,.34);
  color:transparent;
  font-size:0;
}
.nav button{
  width:100%;
  min-height:37px;
  border:1px solid rgba(49,101,154,.54);
  border-radius:7px;
  margin:4px 0;
  padding:0 10px;
  display:flex;
  align-items:center;
  gap:9px;
  background:linear-gradient(180deg,rgba(13,42,73,.8),rgba(8,25,45,.72));
  color:#dfeeff;
  text-align:left;
}
.shell.sidebar-collapsed .nav button{
  min-height:42px;
  justify-content:center;
  padding:0;
}
.shell.sidebar-collapsed .nav-label{display:none}
.nav button:hover,.nav button.active{
  border-color:#f1c037;
  background:linear-gradient(180deg,rgba(19,59,101,.95),rgba(8,34,62,.95));
  color:#fff;
}
.nav-ico{
  width:18px;
  height:18px;
  flex:0 0 18px;
  border-radius:5px;
  background:linear-gradient(135deg,var(--blue),var(--purple));
  box-shadow:0 0 14px rgba(47,156,255,.3);
  position:relative;
}
.nav-ico:after{
  content:"";
  position:absolute;
  inset:5px;
  border:1px solid rgba(255,255,255,.75);
  border-radius:3px;
}
.nav-ico.warn{background:linear-gradient(135deg,var(--yellow),var(--orange))}
.nav-ico.chart,.nav-ico.money,.nav-ico.rec,.nav-ico.fin{background:linear-gradient(135deg,var(--green),var(--cyan))}
.nav-ico.pay,.nav-ico.out{background:linear-gradient(135deg,var(--red),var(--orange))}
.nav-ico.db,.nav-ico.gear,.nav-ico.calc{background:linear-gradient(135deg,var(--blue),var(--cyan))}

.nav-group-row{
  display:flex;
  align-items:center;
  gap:6px;
  margin:14px 4px 7px;
  padding:0 4px 7px;
  border-bottom:1px solid var(--line-soft);
}
.nav-group-row .nav-group{
  flex:1 1 auto;
  min-width:0;
  margin:0;
  padding:0;
  border-bottom:0;
}
.nav-ai-btn{
  flex:0 0 32px;
  width:32px;
  height:24px;
  border:1px solid rgba(119,213,255,.45);
  border-radius:6px;
  background:linear-gradient(180deg,rgba(16,70,120,.9),rgba(9,31,57,.88));
  color:#dff4ff;
  font-size:10px;
  font-weight:900;
  letter-spacing:0;
  text-align:center;
}
.nav-ai-btn:hover{
  border-color:var(--yellow);
  color:#fff;
  background:linear-gradient(180deg,rgba(24,91,151,.98),rgba(10,44,78,.96));
}
.shell.sidebar-collapsed .nav-group-row{
  justify-content:center;
  margin:12px 0 8px;
  padding:0 0 7px;
}
.shell.sidebar-collapsed .nav-group-row .nav-group{display:none}
.shell.sidebar-collapsed .nav-ai-btn{
  width:38px;
  height:28px;
  flex-basis:38px;
}

.main{
  min-width:0;
  padding:16px;
}
.shell:fullscreen{
  grid-template-columns:minmax(0,1fr);
  overflow:auto;
  background:linear-gradient(135deg,#050b13 0%,#071a2d 52%,#04101d 100%);
}
.shell:fullscreen .sidebar,
.shell:fullscreen .topbar,
.shell:fullscreen .tv-filterbar{
  display:none;
}
.shell:fullscreen .main{
  padding:18px;
}
.shell:fullscreen .tv-sector-tabs{
  margin-top:0;
}
.shell:fullscreen .tv-sector-screen{
  min-height:calc(100vh - 78px);
}
.topbar{
  min-height:58px;
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  margin-bottom:12px;
}
.title h1{
  margin:0 0 4px;
  font-size:27px;
  line-height:1.1;
}
.title p{margin:0;color:var(--muted)}
.topbar-tools{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:8px;
  min-width:280px;
}
.actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:8px;
}
.region-filter{
  min-height:36px;
  display:flex;
  align-items:center;
  gap:7px;
  border:1px solid var(--line);
  border-radius:7px;
  background:#081f39;
  color:#dcefff;
  padding:0 8px;
  font-size:11px;
  font-weight:900;
  white-space:nowrap;
}
.region-filter span{
  color:#77d5ff;
  font-size:9px;
  font-weight:900;
  text-transform:uppercase;
}
.region-filter select{
  min-width:196px;
  border:0;
  outline:0;
  background:transparent;
  color:#eaf6ff;
  font-weight:900;
}
.region-filter option{
  background:#08192d;
  color:#eaf6ff;
}

.btn,.select{
  min-height:36px;
  border:1px solid var(--line);
  border-radius:7px;
  background:linear-gradient(180deg,#0c2441,#071a30);
  color:var(--text);
  padding:0 12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}
.btn:hover,.select:focus{border-color:#59b7ff}
.btn.primary{
  border-color:#44adff;
  background:linear-gradient(135deg,var(--blue-2),var(--blue));
  color:white;
}
.btn.gold{
  border-color:#ffe37a;
  background:linear-gradient(135deg,#f6b400,var(--yellow));
  color:#101827;
  font-weight:900;
}
.btn.danger{
  border-color:#7d2e48;
  background:linear-gradient(135deg,#431222,#2a0c16);
  color:#ffe0e9;
}
.multi-check.select{
  position:relative;
  display:block;
  padding:0;
  min-width:0;
}
.multi-check summary{
  min-height:34px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:0 10px;
  cursor:pointer;
  list-style:none;
}
.multi-check summary::-webkit-details-marker{display:none}
.multi-check summary small{
  color:#8fc8ff;
  font-size:9px;
  font-weight:900;
  text-transform:uppercase;
}
.multi-check summary span{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#eef8ff;
  font-size:12px;
  font-weight:800;
}
.multi-check[open]{border-color:#59b7ff}
.multi-check-menu{
  position:absolute;
  z-index:30;
  left:0;
  right:0;
  top:calc(100% + 4px);
  display:grid;
  gap:3px;
  padding:8px;
  border:1px solid var(--line);
  border-radius:7px;
  background:#06182b;
  box-shadow:0 18px 34px rgba(0,0,0,.35);
}
.multi-check-menu label{
  display:flex;
  align-items:center;
  gap:8px;
  min-height:28px;
  padding:4px 6px;
  border-radius:5px;
  color:#edf7ff;
  font-size:12px;
  font-weight:750;
}
.multi-check-menu label:hover{background:#0d2d50}
.multi-check-menu input{
  width:15px;
  height:15px;
  accent-color:var(--blue);
}
.btn.icon:before{
  content:"";
  width:14px;
  height:14px;
  border:2px solid var(--cyan);
  border-right-color:transparent;
  border-radius:50%;
}
.mini-btn{
  min-height:31px;
  border:1px solid var(--line);
  border-radius:7px;
  background:#0a213d;
  color:#dcefff;
  padding:0 10px;
}
.danger-mini{
  border-color:#7d2e48;
  color:#ffe0e9;
  background:#35101e;
}
.success-mini{
  border-color:#12c99b;
  color:#d9fff4;
  background:#073a31;
}
.payment-total-card{
  min-height:58px;
  padding:9px 11px;
  border:1px solid rgba(18,201,155,.42);
  border-radius:7px;
  background:rgba(7,58,49,.52);
  display:flex;
  flex-direction:column;
  justify-content:center;
}
.payment-total-card span{
  color:#9beed7;
  font-size:10px;
  font-weight:900;
  text-transform:uppercase;
}
.payment-total-card strong{
  margin-top:3px;
  color:#ecfff9;
  font-size:17px;
  line-height:1.15;
}
.tree-controls{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  margin-bottom:8px;
}
.tree-toggle{
  width:24px;
  height:24px;
  margin-right:8px;
  border:1px solid var(--line);
  border-radius:6px;
  background:#0a213d;
  color:#dcefff;
  font-weight:900;
}
.hidden-row{display:none}
.tree-child-name{padding-left:28px}
.editor-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(150px,1fr));
  gap:10px;
  align-items:end;
}
.editor-grid label{
  display:grid;
  gap:5px;
  color:#a8c9ee;
  font-size:12px;
  font-weight:800;
}
.editor-grid .select{
  width:100%;
  min-width:0;
}
.wide-field{grid-column:span 2}
.check-label{
  min-height:36px;
  display:flex!important;
  grid-template-columns:auto!important;
  align-items:center;
  gap:8px!important;
  border:1px solid var(--line-soft);
  border-radius:7px;
  padding:0 10px;
  background:#081f39;
}
.search{min-width:230px}

.grid{display:grid;gap:12px}
.panel,.exec-card,.mini-card,.login-card{
  border:1px solid var(--line);
  border-radius:8px;
  background:linear-gradient(180deg,rgba(14,39,68,.96),rgba(7,23,41,.96));
  box-shadow:var(--shadow);
}
.executive-panel{padding:14px;min-width:0}
.panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.panel-head h2{
  margin:0;
  font-size:15px;
  line-height:1.2;
}
.panel-head small{color:var(--muted)}
.executive-text{
  display:grid;
  gap:10px;
  margin:8px 0 14px;
  color:#eaf5ff;
  line-height:1.55;
}
.executive-text p{
  margin:0;
  white-space:normal;
}
.executive-text strong{color:#ffffff}
.toolbar-inline{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:8px;
}
.toolbar-inline .select{min-width:160px}

.period-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:12px;
}
.period-strip{
  display:flex;
  gap:0;
  border:1px solid var(--line);
  border-radius:7px;
  overflow:hidden;
  background:#07182b;
}
.period-strip button{
  min-width:78px;
  min-height:34px;
  border:0;
  border-right:1px solid var(--line);
  background:transparent;
  color:#d9ebff;
  font-weight:800;
  font-size:12px;
}
.period-strip button:last-child{border-right:0}
.period-strip button.active{
  background:linear-gradient(135deg,var(--blue-2),var(--blue));
  color:white;
}
.compact-strip button{
  min-width:58px;
}
.period-meta{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  color:var(--muted);
  font-size:12px;
}
.period-meta b{color:#e8f5ff}
.period-filterbar{
  display:grid;
  grid-template-columns:150px 150px auto;
  gap:8px;
  align-items:center;
  margin:-2px 0 12px;
}
.period-filterbar .select{width:100%;min-width:0}
.reneg-filterbar{
  grid-template-columns:170px 140px 140px 180px 150px 150px minmax(160px,1fr) 82px 82px auto auto auto;
}
.reneg-filterbar.dre-filterbar{
  grid-template-columns:120px 150px 125px 125px 130px minmax(120px,160px);
  max-width:850px;
}
.checkline{
  min-height:34px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  border:1px solid var(--line);
  border-radius:7px;
  padding:0 10px;
  background:rgba(7,28,48,.72);
  color:#d9edff;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}
.checkline input{accent-color:var(--blue)}

.bureau-search{margin-bottom:12px}
.bureau-search-grid{
  display:grid;
  grid-template-columns:160px 160px minmax(240px,1fr) minmax(240px,1fr) 120px 180px 180px 180px;
  gap:8px;
  align-items:center;
}
.bureau-search-grid .select{width:100%;min-width:0}
.bureau-search-grid .wide{min-width:0}
.bureau-ixc-panel{
  margin-top:12px;
  padding:0;
  overflow:hidden;
}
.bureau-summary{
  min-height:58px;
  padding:13px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  cursor:pointer;
  list-style:none;
}
.bureau-summary::-webkit-details-marker{display:none}
.bureau-summary b{display:block;font-size:15px}
.bureau-summary small{display:block;color:var(--muted);margin-top:3px}
.bureau-pill{
  min-height:28px;
  border-radius:999px;
  padding:5px 10px;
  border:1px solid var(--line);
  font-size:12px;
  font-weight:900;
  white-space:nowrap;
}
.bureau-pill.safe{
  color:#bfffe3;
  background:rgba(24,216,137,.12);
  border-color:rgba(24,216,137,.45);
}
.bureau-pill.danger{
  color:#ffe4ec;
  background:rgba(255,65,109,.14);
  border-color:rgba(255,65,109,.5);
}
.bureau-ixc-panel[open]{padding-bottom:14px}
.bureau-op-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  padding:0 14px 12px;
}
.bureau-subpanel{
  border:1px solid var(--line-soft);
  border-radius:8px;
  background:rgba(5,18,33,.45);
  padding:12px;
  min-width:0;
}
.bureau-control-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
.bureau-control-grid .select{width:100%;min-width:0}
.bureau-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
}
.bureau-advanced,
.bureau-preview{
  border:1px solid var(--line-soft);
  border-radius:8px;
  background:rgba(4,16,29,.42);
  margin-top:10px;
  overflow:hidden;
}
.bureau-advanced summary,
.bureau-preview summary{
  min-height:36px;
  padding:9px 12px;
  cursor:pointer;
  color:#cfe8ff;
  font-weight:800;
}
.bureau-advanced .bureau-control-grid{padding:0 12px 12px}
.bureau-preview .json-preview{
  border-top:1px solid var(--line-soft);
  min-width:0;
  max-height:260px;
  overflow:auto;
  background:rgba(3,12,22,.42);
}

.exec-cards{
  display:grid;
  grid-template-columns:repeat(6,minmax(148px,1fr));
  gap:12px;
  margin-bottom:12px;
}
.exec-card{
  min-height:108px;
  padding:12px;
  position:relative;
  overflow:hidden;
}
.exec-card:before{
  content:"";
  position:absolute;
  inset:0 0 auto;
  height:2px;
  background:var(--accent,var(--blue));
}
.exec-card-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  color:#cfe2f8;
  font-size:12px;
  font-weight:800;
}
.exec-card-head i{
  width:28px;
  height:28px;
  border-radius:8px;
  background:color-mix(in srgb,var(--accent,var(--blue)) 24%,transparent);
  border:1px solid color-mix(in srgb,var(--accent,var(--blue)) 58%,transparent);
}
.card-actions{
  display:flex;
  align-items:center;
  gap:5px;
  flex:0 0 auto;
}
.card-export{
  min-height:26px;
  border:1px solid color-mix(in srgb,var(--accent,var(--blue)) 70%,transparent);
  border-radius:6px;
  background:rgba(6,17,31,.72);
  color:#e7f5ff;
  padding:0 8px;
  font-size:11px;
  font-weight:900;
}
.card-export:hover{
  background:color-mix(in srgb,var(--accent,var(--blue)) 22%,rgba(6,17,31,.82));
}
.activation-audit{
  margin:12px 0;
  padding:0;
}
.activation-audit-head{
  min-height:50px;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:8px;
  background:linear-gradient(180deg,rgba(14,39,68,.96),rgba(7,23,41,.96));
}
.audit-kpis{
  margin:12px 0;
}
.exec-card strong{
  display:block;
  margin-top:13px;
  font-size:25px;
  line-height:1.08;
}
.exec-card small{
  display:block;
  margin-top:5px;
  color:var(--muted);
  font-size:12px;
}
.exec-card.purple{--accent:var(--purple)}
.exec-card.blue{--accent:var(--blue)}
.exec-card.green{--accent:var(--green)}
.exec-card.orange{--accent:var(--orange)}
.exec-card.yellow{--accent:var(--yellow)}
.exec-card.red{--accent:var(--red)}

.churn-study-panel,.churn-study-actions{
  margin-top:12px;
}
.churn-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:104px;
  min-height:32px;
  border:1px solid color-mix(in srgb,var(--accent) 65%,transparent);
  border-radius:8px;
  background:color-mix(in srgb,var(--accent) 18%,rgba(6,17,31,.82));
  color:#f4fbff;
  font-size:12px;
  font-weight:900;
  text-transform:uppercase;
}
.churn-badge.green{--accent:var(--green)}
.churn-badge.blue{--accent:var(--blue)}
.churn-badge.yellow{--accent:var(--yellow)}
.churn-badge.red{--accent:var(--red)}
.churn-study-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(150px,1fr));
  gap:10px;
}
.churn-study-metric{
  min-height:92px;
  border:1px solid color-mix(in srgb,var(--accent,var(--blue)) 58%,transparent);
  border-radius:8px;
  background:rgba(8,27,48,.82);
  padding:12px;
  position:relative;
  overflow:hidden;
}
.churn-study-metric:before{
  content:"";
  position:absolute;
  inset:0 0 auto;
  height:3px;
  background:var(--accent,var(--blue));
}
.churn-study-metric span{
  display:block;
  color:#cfe2f8;
  font-size:12px;
  font-weight:900;
}
.churn-study-metric strong{
  display:block;
  margin-top:11px;
  font-size:24px;
  line-height:1.08;
}
.churn-study-metric small{
  display:block;
  margin-top:5px;
  color:var(--muted);
  font-size:12px;
}
.churn-study-metric.green,.churn-action-card.green{--accent:var(--green)}
.churn-study-metric.blue,.churn-action-card.blue{--accent:var(--blue)}
.churn-study-metric.yellow,.churn-action-card.yellow{--accent:var(--yellow)}
.churn-study-metric.orange,.churn-action-card.orange{--accent:var(--orange)}
.churn-study-metric.red,.churn-action-card.red{--accent:var(--red)}
.churn-study-metric.purple,.churn-action-card.purple{--accent:var(--purple)}
.churn-band-scale{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  margin-top:12px;
}
.churn-band{
  border:1px solid color-mix(in srgb,var(--accent,var(--blue)) 40%,transparent);
  border-radius:8px;
  background:rgba(6,17,31,.58);
  padding:9px 10px;
  opacity:.72;
}
.churn-band.active{
  background:color-mix(in srgb,var(--accent,var(--blue)) 18%,rgba(6,17,31,.88));
  opacity:1;
  box-shadow:0 0 0 1px color-mix(in srgb,var(--accent,var(--blue)) 42%,transparent) inset;
}
.churn-band.green{--accent:var(--green)}
.churn-band.blue{--accent:var(--blue)}
.churn-band.yellow{--accent:var(--yellow)}
.churn-band.red{--accent:var(--red)}
.churn-band strong,.churn-band span{
  display:block;
}
.churn-band strong{
  color:#f4fbff;
  font-size:12px;
}
.churn-band span{
  margin-top:3px;
  color:var(--muted);
  font-size:11px;
}
.churn-study-reading{
  margin-top:10px;
  color:#cfe2f8;
  font-size:12px;
}
.churn-action-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(190px,1fr));
  gap:10px;
}
.churn-action-card{
  display:flex;
  flex-direction:column;
  gap:8px;
  min-height:158px;
  border:1px solid color-mix(in srgb,var(--accent,var(--blue)) 54%,transparent);
  border-radius:8px;
  background:rgba(8,27,48,.82);
  padding:12px;
  position:relative;
  overflow:hidden;
}
.churn-action-card:before{
  content:"";
  position:absolute;
  inset:0 0 auto;
  height:3px;
  background:var(--accent,var(--blue));
}
.churn-action-card strong{
  color:#f4fbff;
  font-size:13px;
}
.churn-action-card span{
  color:#dfefff;
  font-size:12px;
  font-weight:800;
  line-height:1.35;
}
.churn-action-card small{
  flex:1;
  color:var(--muted);
  font-size:12px;
  line-height:1.35;
}
.churn-action-card .btn{
  width:max-content;
  min-height:30px;
}

.workflow-filterbar{
  grid-template-columns:minmax(180px,1.1fr) minmax(150px,.8fr) minmax(150px,.8fr) repeat(4,minmax(140px,1fr)) auto;
}
.workflow-kpis{
  grid-template-columns:repeat(auto-fit,minmax(210px,1fr));
}
.workflow-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:12px 0;
}
.workflow-tabs button{
  min-height:34px;
  border:1px solid var(--line);
  border-radius:8px;
  background:rgba(7,25,45,.78);
  color:#dff2ff;
  padding:0 13px;
  font-weight:900;
}
.workflow-tabs button.active{
  border-color:rgba(54,163,255,.72);
  background:linear-gradient(180deg,rgba(43,140,255,.92),rgba(17,95,190,.92));
  color:white;
}
.workflow-kanban{
  display:grid;
  grid-auto-flow:column;
  grid-auto-columns:minmax(340px,420px);
  gap:14px;
  overflow-x:auto;
  padding:0 2px 10px;
}
.workflow-column{
  min-height:420px;
  border:1px solid var(--line);
  border-radius:8px;
  background:linear-gradient(180deg,rgba(13,37,65,.96),rgba(5,18,33,.96));
  min-width:0;
}
.workflow-column-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-height:44px;
  padding:12px 14px;
  border-bottom:1px solid var(--line-soft);
}
.workflow-column-head strong{
  min-width:0;
  font-size:14px;
  line-height:1.25;
}
.workflow-column-head span{
  display:inline-grid;
  place-items:center;
  min-width:30px;
  height:24px;
  border-radius:999px;
  background:rgba(54,163,255,.16);
  color:#dff3ff;
  font-size:12px;
  font-weight:900;
}
.workflow-column-body{
  display:grid;
  gap:10px;
  align-content:start;
  padding:12px;
}
.workflow-card{
  border:1px solid color-mix(in srgb,var(--accent,var(--blue)) 48%,transparent);
  border-left:3px solid var(--accent,var(--blue));
  border-radius:8px;
  background:rgba(6,22,39,.86);
  padding:12px;
  cursor:grab;
  box-shadow:0 8px 22px rgba(0,0,0,.16);
}
.workflow-card:active{
  cursor:grabbing;
}
.workflow-card.red,.workflow-badge.red{--accent:var(--red)}
.workflow-card.yellow,.workflow-badge.yellow{--accent:var(--yellow)}
.workflow-card.green,.workflow-badge.green{--accent:var(--green)}
.workflow-card.blue,.workflow-badge.blue{--accent:var(--blue)}
.workflow-card-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
}
.workflow-card-head strong{
  min-width:0;
  color:#f2fbff;
  font-size:13px;
  line-height:1.25;
  word-break:break-word;
}
.workflow-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  min-width:68px;
  min-height:24px;
  border:1px solid color-mix(in srgb,var(--accent,var(--blue)) 58%,transparent);
  border-radius:999px;
  background:color-mix(in srgb,var(--accent,var(--blue)) 18%,rgba(6,17,31,.86));
  color:#f8fcff;
  font-size:10px;
  font-weight:900;
  text-transform:uppercase;
}
.workflow-card span,.workflow-card small{
  display:block;
  margin-top:8px;
  color:var(--muted);
  font-size:12px;
  line-height:1.4;
}
.workflow-card small{
  color:#d8e9f7;
}
.workflow-card-meta{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  margin-top:11px;
}
.workflow-card-meta div{
  min-height:48px;
  border:1px solid var(--line-soft);
  border-radius:6px;
  padding:7px 8px;
  overflow:hidden;
  background:rgba(8,27,48,.56);
}
.workflow-card-meta div span{
  margin:0;
  color:#8db6d2;
  font-size:10px;
  font-weight:900;
  text-transform:uppercase;
}
.workflow-card-meta b{
  display:block;
  margin-top:4px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#eff8ff;
  font-size:12px;
}
.workflow-card-diagnostic{
  max-height:0;
  opacity:0;
  overflow:hidden;
  transform:translateY(-4px);
  transition:max-height .18s ease, opacity .18s ease, transform .18s ease, margin-top .18s ease;
}
.workflow-card:hover .workflow-card-diagnostic,
.workflow-card:focus-within .workflow-card-diagnostic{
  max-height:520px;
  opacity:1;
  transform:translateY(0);
  margin-top:11px;
}
.workflow-card-diagnostic p{
  display:grid;
  grid-template-columns:86px minmax(0,1fr);
  gap:8px;
  margin:0;
  padding:7px 0;
  border-top:1px solid var(--line-soft);
}
.workflow-card-diagnostic p span{
  margin:0;
  color:#8db6d2;
  font-size:10px;
  font-weight:900;
  text-transform:uppercase;
}
.workflow-card-diagnostic p b{
  min-width:0;
  color:#eff8ff;
  font-size:12px;
  line-height:1.35;
  overflow-wrap:anywhere;
}
.workflow-diagnostic-checklist{
  display:grid;
  gap:6px;
  padding-top:8px;
  border-top:1px solid var(--line-soft);
}
.workflow-diagnostic-checklist b{
  color:#8db6d2;
  font-size:10px;
  text-transform:uppercase;
}
.workflow-diagnostic-checklist span{
  margin:0;
  border:1px solid rgba(54,163,255,.24);
  border-radius:6px;
  padding:6px 7px;
  background:rgba(54,163,255,.08);
  color:#dff2ff;
}
.workflow-card-actions{
  display:flex;
  justify-content:stretch;
  margin-top:11px;
}
.workflow-card-actions .btn{
  width:100%;
  min-height:32px;
  padding:0 10px;
  font-size:12px;
}
.workflow-supervisor-grid{
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  margin-bottom:12px;
}
.workflow-routing-panel{
  margin-top:12px;
}
.workflow-routing-form{
  display:grid;
  grid-template-columns:minmax(180px,1fr) repeat(4,minmax(130px,1fr)) minmax(74px,.42fr) auto;
  gap:8px;
}
.workflow-routing-help{
  margin:10px 0;
  color:var(--muted);
  font-size:12px;
}
.workflow-routing-list{
  display:grid;
  gap:8px;
}
.workflow-routing-list article{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
  border:1px solid var(--line-soft);
  border-radius:8px;
  background:rgba(8,27,48,.68);
  padding:10px;
}
.workflow-routing-list article.inactive{
  opacity:.55;
}
.workflow-routing-list strong,.workflow-routing-list span,.workflow-routing-list small{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.workflow-routing-list span{
  margin-top:3px;
  color:#dff2ff;
  font-size:12px;
}
.workflow-routing-list small{
  margin-top:4px;
  color:var(--muted);
  font-size:11px;
}

.noc-incident-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
  gap:12px;
}
.noc-incident-card{
  border-left:4px solid var(--accent,var(--blue));
}
.noc-incident-card.red{--accent:var(--red)}
.noc-incident-card.orange{--accent:var(--orange)}
.noc-incident-card.yellow{--accent:var(--yellow)}
.noc-incident-card.green{--accent:var(--green)}
.noc-incident-card .mini-table{
  margin:12px 0;
}
.noc-incident-card .mini-table th{
  color:var(--muted);
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.04em;
  width:72px;
}
.noc-incident-card .mini-table td{
  max-width:240px;
}
.noc-incident-table table{
  min-width:1180px;
}
.noc-incident-row{
  border-left:4px solid var(--accent,var(--blue));
}
.noc-incident-row.red{--accent:var(--red)}
.noc-incident-row.orange{--accent:var(--orange)}
.noc-incident-row.yellow{--accent:var(--yellow)}
.noc-incident-row.green{--accent:var(--green)}
.noc-incident-row td{
  vertical-align:top;
}
.row-actions.compact{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.bureau-search-grid.offline-map-filter-grid{
  grid-template-columns:110px 145px 145px repeat(4,minmax(120px,1fr)) minmax(220px,1.4fr) 150px 110px;
}
.offline-map-kpis{
  margin-bottom:12px;
}
.offline-map-panel .leaflet-route-map{
  min-height:560px;
}
.offline-action-panel{
  margin-top:12px;
}
.offline-action-list{
  display:grid;
  gap:8px;
}
.offline-action-row{
  --accent:var(--red);
  display:grid;
  grid-template-columns:minmax(220px,.75fr) minmax(0,1.35fr) auto;
  gap:10px;
  align-items:center;
  min-width:0;
  padding:10px;
  border:1px solid color-mix(in srgb,var(--accent) 34%,var(--line));
  border-left:4px solid var(--accent);
  border-radius:8px;
  background:rgba(7,21,38,.78);
}
.offline-action-row.orange{--accent:var(--orange)}
.offline-action-row.yellow{--accent:var(--yellow)}
.offline-action-row.red{--accent:var(--red)}
.offline-action-main{
  display:grid;
  gap:4px;
  min-width:0;
}
.offline-action-main strong,
.offline-action-main small{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.offline-action-main strong{
  color:var(--text);
  font-size:14px;
}
.offline-action-main small{
  color:var(--muted);
  font-size:12px;
}
.offline-pill{
  width:max-content;
  max-width:100%;
  padding:3px 7px;
  border-radius:999px;
  background:color-mix(in srgb,var(--accent) 22%,transparent);
  color:#fff;
  font-size:11px;
  font-weight:900;
  text-transform:uppercase;
}
.offline-action-meta{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:7px 12px;
  min-width:0;
}
.offline-action-meta span{
  min-width:0;
  overflow:hidden;
  color:#dcecff;
  font-size:12px;
  line-height:1.3;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.offline-action-meta b{
  display:block;
  margin-bottom:2px;
  color:var(--muted);
  font-size:10px;
  text-transform:uppercase;
}
.offline-action-buttons{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:6px;
}
.noc-queue-card{
  --accent:var(--blue);
  min-width:0;
  padding:12px;
  border:1px solid color-mix(in srgb,var(--accent) 36%,var(--line));
  border-left:4px solid var(--accent);
  border-radius:8px;
  background:linear-gradient(180deg,rgba(12,34,60,.96),rgba(7,21,38,.96));
}
.noc-queue-card.red{--accent:var(--red)}
.noc-queue-card.orange{--accent:var(--orange)}
.noc-queue-card.yellow{--accent:var(--yellow)}
.noc-queue-card.green{--accent:var(--green)}
.noc-queue-card.audit{
  border-style:dashed;
  background:linear-gradient(180deg,rgba(39,36,18,.96),rgba(20,25,24,.96));
}
.noc-queue-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.noc-queue-title{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:7px;
  min-width:0;
}
.noc-queue-title strong{
  font-size:15px;
  line-height:1.2;
}
.noc-queue-title small{
  color:var(--muted);
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
}
.noc-priority-pill{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:0 8px;
  border-radius:999px;
  background:color-mix(in srgb,var(--accent) 24%,transparent);
  color:#fff;
  font-size:11px;
  font-weight:900;
  line-height:1;
  text-transform:uppercase;
}
.noc-queue-actions{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:6px;
  min-width:min(100%,390px);
}
.noc-queue-actions .btn{
  min-height:34px;
  white-space:nowrap;
}
.noc-queue-facts{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  margin:12px 0;
}
.noc-queue-facts span{
  min-width:0;
  padding:9px;
  border:1px solid var(--line);
  border-radius:8px;
  background:rgba(4,15,28,.36);
}
.noc-queue-facts strong,
.noc-queue-facts small{
  display:block;
}
.noc-queue-facts strong{
  overflow:hidden;
  color:var(--text);
  font-size:16px;
  line-height:1.15;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.noc-queue-facts small{
  margin-top:3px;
  color:var(--muted);
  font-size:11px;
  text-transform:uppercase;
}
.noc-queue-detail{
  display:grid;
  grid-template-columns:minmax(112px,.32fr) minmax(0,1fr) auto;
  gap:8px;
  align-items:center;
  margin-bottom:10px;
  padding:9px;
  border-radius:8px;
  background:rgba(5,17,32,.46);
}
.noc-queue-detail span,
.noc-queue-detail small,
.noc-queue-meta b{
  color:var(--muted);
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
}
.noc-queue-detail strong{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.noc-queue-meta{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  gap:8px;
}
.noc-queue-meta span{
  min-width:0;
  overflow:hidden;
  color:#dcecff;
  font-size:12px;
  line-height:1.35;
  text-overflow:ellipsis;
  white-space:normal;
}
.noc-queue-meta b{
  display:block;
  margin-bottom:2px;
}
@media(max-width:680px){
  .noc-incident-grid{
    grid-template-columns:1fr;
  }
  .offline-map-filter-grid,
  .offline-action-row,
  .offline-action-meta{
    grid-template-columns:1fr;
  }
  .offline-map-panel .leaflet-route-map{
    min-height:430px;
  }
  .offline-action-buttons{
    justify-content:flex-start;
  }
  .noc-queue-head{
    display:block;
  }
  .noc-queue-actions{
    justify-content:flex-start;
    min-width:0;
    margin-top:10px;
  }
  .noc-queue-actions .btn{
    flex:1 1 145px;
  }
  .noc-queue-facts,
  .noc-queue-meta,
  .noc-queue-detail{
    grid-template-columns:1fr;
  }
  .noc-queue-detail strong{
    white-space:normal;
  }
}
.noc-timeline-editor .table-wrap table{
  min-width:1040px;
}
.noc-timeline-editor input,
.noc-timeline-editor select,
.noc-timeline-editor textarea{
  width:100%;
}
.noc-timeline-note{
  min-height:42px;
  resize:vertical;
}
.noc-extra-details{
  padding:16px;
}
.noc-extra-details summary{
  cursor:pointer;
  font-weight:700;
  color:var(--text);
}
.good{color:var(--green)!important}
.bad{color:var(--red)!important}
.flat{color:var(--muted)!important}

.ceo-page{
  display:block;
}
.ceo-hero{
  --accent:var(--blue);
  display:grid;
  grid-template-columns:minmax(0,1.7fr) minmax(280px,.8fr);
  gap:14px;
  align-items:stretch;
  margin-bottom:12px;
  padding:16px;
  border:1px solid var(--line);
  border-radius:8px;
  background:
    linear-gradient(135deg,color-mix(in srgb,var(--accent) 18%,transparent),transparent 46%),
    linear-gradient(180deg,rgba(14,39,68,.96),rgba(7,23,41,.96));
  box-shadow:var(--shadow);
}
.ceo-hero.green{--accent:var(--green)}
.ceo-hero.yellow{--accent:var(--yellow)}
.ceo-hero.orange{--accent:var(--orange)}
.ceo-hero.red{--accent:var(--red)}
.ceo-hero.purple{--accent:var(--purple)}
.ceo-hero span,
.ceo-focus span{
  color:#9fceff;
  font-size:12px;
  font-weight:900;
  text-transform:uppercase;
}
.ceo-hero h2{
  margin:6px 0 8px;
  font-size:24px;
  line-height:1.15;
}
.ceo-hero p{
  max-width:980px;
  margin:0;
  color:#d8ecff;
  font-size:14px;
  line-height:1.55;
}
.ceo-focus{
  min-width:0;
  padding:12px;
  border:1px solid color-mix(in srgb,var(--accent) 52%,transparent);
  border-radius:8px;
  background:rgba(3,14,27,.38);
}
.ceo-focus strong{
  display:block;
  margin:8px 0;
  color:#f2f8ff;
  font-size:18px;
  line-height:1.25;
}
.ceo-focus small{
  color:var(--muted);
  line-height:1.45;
}
.ceo-main-grid{
  display:grid;
  grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);
  gap:12px;
  margin-bottom:12px;
}
.ceo-priority-list{
  display:grid;
  gap:8px;
}
.ceo-priority-row{
  width:100%;
  display:grid;
  grid-template-columns:34px minmax(0,1fr);
  gap:10px;
  align-items:start;
  min-height:72px;
  padding:10px;
  border:1px solid var(--line-soft);
  border-radius:7px;
  background:rgba(7,24,43,.7);
  color:#eaf6ff;
  text-align:left;
}
.ceo-priority-row:hover{border-color:var(--blue)}
.ceo-priority-row>span{
  width:28px;
  height:28px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:rgba(39,145,255,.22);
  color:#dff1ff;
  font-weight:900;
}
.ceo-priority-row strong{
  display:block;
  font-size:13px;
  line-height:1.25;
}
.ceo-priority-row p{
  margin:4px 0;
  color:#cfe4f8;
  font-size:12px;
  line-height:1.35;
}
.ceo-priority-row small{
  color:var(--muted);
  font-size:11px;
  line-height:1.35;
}
.ceo-area-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(240px,1fr));
  gap:12px;
}
.ceo-area-card{
  --accent:var(--blue);
  min-width:0;
  padding:12px;
  border:1px solid color-mix(in srgb,var(--accent) 46%,transparent);
  border-radius:8px;
  background:linear-gradient(180deg,rgba(10,33,58,.92),rgba(5,18,33,.92));
}
.ceo-area-card.green{--accent:var(--green)}
.ceo-area-card.yellow{--accent:var(--yellow)}
.ceo-area-card.orange{--accent:var(--orange)}
.ceo-area-card.red{--accent:var(--red)}
.ceo-area-card.purple{--accent:var(--purple)}
.ceo-area-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
.ceo-status{
  display:inline-flex;
  align-items:center;
  min-height:22px;
  padding:0 8px;
  border:1px solid color-mix(in srgb,var(--accent) 58%,transparent);
  border-radius:999px;
  color:#e8f6ff;
  background:color-mix(in srgb,var(--accent) 16%,transparent);
  font-size:10px;
  font-weight:900;
}
.ceo-area-card h3{
  margin:8px 0 0;
  font-size:16px;
  line-height:1.2;
}
.ceo-area-kpi{
  margin:12px 0;
  padding:10px;
  border:1px solid var(--line-soft);
  border-radius:7px;
  background:rgba(4,14,27,.42);
}
.ceo-area-kpi span{
  display:block;
  color:#9fc6ed;
  font-size:11px;
  font-weight:800;
}
.ceo-area-kpi strong{
  display:block;
  margin-top:4px;
  color:#f3fbff;
  font-size:20px;
}
.ceo-area-card p{
  margin:0 0 10px;
  color:#d9ecff;
  font-size:12px;
  line-height:1.45;
}
.ceo-area-card dl{
  margin:0;
  display:grid;
  gap:5px;
}
.ceo-area-card dt{
  color:#9fceff;
  font-size:11px;
  font-weight:900;
}
.ceo-area-card dd{
  margin:0 0 6px;
  color:#c8def4;
  font-size:12px;
  line-height:1.4;
}
.ceo-indicators{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  margin-top:10px;
}
.ceo-indicator{
  min-width:0;
  padding:8px;
  border:1px solid rgba(61,151,255,.18);
  border-radius:7px;
  background:rgba(6,22,40,.55);
}
.ceo-indicator span{
  display:block;
  color:#94badf;
  font-size:10px;
  font-weight:800;
}
.ceo-indicator strong{
  display:block;
  margin-top:4px;
  font-size:14px;
  line-height:1.2;
}
.ceo-pdca-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(180px,1fr));
  gap:12px;
}
.ceo-pdca-card{
  min-width:0;
  padding:12px;
  border:1px solid var(--line-soft);
  border-radius:8px;
  background:rgba(5,18,33,.55);
}
.ceo-pdca-card span{
  color:#8ec8ff;
  font-size:12px;
  font-weight:900;
  text-transform:uppercase;
}
.ceo-pdca-card strong{
  display:block;
  margin:8px 0;
  color:#f1f8ff;
  font-size:14px;
  line-height:1.3;
}
.ceo-pdca-card ul,
.ceo-note-list{
  margin:0;
  padding-left:17px;
  color:#cfe4f8;
  font-size:12px;
  line-height:1.45;
}
.ceo-pdca-card li,
.ceo-note-list li{margin:6px 0}

.ceo-history-panel{
  margin-bottom:12px;
}
.ceo-history-notes{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:0 0 12px;
}
.ceo-history-notes span{
  min-height:26px;
  display:inline-flex;
  align-items:center;
  padding:0 9px;
  border:1px solid rgba(61,151,255,.22);
  border-radius:999px;
  background:rgba(7,24,43,.64);
  color:#b9d8f2;
  font-size:11px;
  font-weight:800;
}
.ceo-history-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(280px,1fr));
  gap:12px;
}
.ceo-year-card{
  --accent:var(--blue);
  min-width:0;
  padding:12px;
  border:1px solid color-mix(in srgb,var(--accent) 46%,transparent);
  border-radius:8px;
  background:linear-gradient(180deg,rgba(10,33,58,.92),rgba(5,18,33,.92));
}
.ceo-year-card.green{--accent:var(--green)}
.ceo-year-card.yellow{--accent:var(--yellow)}
.ceo-year-card.red{--accent:var(--red)}
.ceo-year-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.ceo-year-head span{
  display:inline-flex;
  min-height:22px;
  align-items:center;
  padding:0 8px;
  border:1px solid color-mix(in srgb,var(--accent) 58%,transparent);
  border-radius:999px;
  color:#e8f6ff;
  background:color-mix(in srgb,var(--accent) 16%,transparent);
  font-size:10px;
  font-weight:900;
}
.ceo-year-head h3{
  margin:7px 0 0;
  font-size:22px;
}
.ceo-year-head>strong{
  width:46px;
  height:46px;
  display:grid;
  place-items:center;
  border:1px solid color-mix(in srgb,var(--accent) 50%,transparent);
  border-radius:50%;
  background:rgba(4,14,27,.42);
  color:#f3fbff;
  font-size:16px;
}
.ceo-year-metrics{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  margin-bottom:12px;
}
.ceo-year-metric{
  min-width:0;
  padding:8px;
  border:1px solid rgba(61,151,255,.18);
  border-radius:7px;
  background:rgba(6,22,40,.55);
}
.ceo-year-metric small{
  display:block;
  color:#94badf;
  font-size:10px;
  font-weight:800;
}
.ceo-year-metric strong{
  display:block;
  margin-top:4px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#f2fbff;
  font-size:13px;
}
.ceo-formal-analysis{
  margin:0 0 12px;
  padding:10px;
  border:1px solid rgba(61,151,255,.2);
  border-radius:7px;
  background:rgba(4,14,27,.38);
}
.ceo-formal-analysis b{
  display:block;
  margin-bottom:6px;
  color:#dff1ff;
  font-size:12px;
}
.ceo-formal-analysis p{
  margin:6px 0;
  color:#cfe4f8;
  font-size:12px;
  line-height:1.48;
}
.ceo-region-block{
  margin:0 0 12px;
  padding:10px;
  border:1px solid rgba(61,151,255,.2);
  border-radius:7px;
  background:rgba(4,14,27,.3);
}
.ceo-region-block>b{
  display:block;
  margin-bottom:8px;
  color:#dff1ff;
  font-size:12px;
}
.ceo-region-block table{
  min-width:960px;
}
.ceo-region-block th,
.ceo-region-block td{
  white-space:nowrap;
}
.ceo-region-block small{
  display:block;
  margin-top:7px;
  color:var(--muted);
  font-size:11px;
}
.ceo-year-lists{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.ceo-year-lists b{
  color:#dff1ff;
  font-size:12px;
}
.ceo-year-lists ul{
  margin:6px 0 0;
  padding-left:17px;
  color:#cfe4f8;
  font-size:12px;
  line-height:1.45;
}
.ceo-year-lists li{
  margin:5px 0;
}

.math-tree{
  display:grid;
  gap:12px;
}
.math-lane{
  border:1px solid rgba(61,151,255,.28);
  border-radius:8px;
  background:rgba(5,18,33,.42);
  padding:12px;
  min-width:0;
}
.math-lane h3{
  margin:0 0 10px;
  font-size:13px;
  color:#dff1ff;
}
.math-row{
  display:grid;
  grid-template-columns:minmax(180px,1fr) 28px minmax(180px,1fr) 28px minmax(180px,1fr) 28px minmax(180px,1fr);
  gap:8px;
  align-items:stretch;
  margin-top:8px;
}
.math-row.compact-row{
  grid-template-columns:minmax(180px,1fr) 28px minmax(180px,1fr) 28px minmax(180px,1fr) 28px minmax(180px,1fr);
}
.math-row.audit-row{
  grid-template-columns:minmax(180px,1fr) 28px minmax(180px,1fr);
  max-width:780px;
}
.math-node{
  min-height:78px;
  min-width:0;
  border:1px solid var(--line);
  border-radius:8px;
  background:rgba(12,36,62,.82);
  padding:10px;
  position:relative;
  overflow:hidden;
}
.math-node:before{
  content:"";
  position:absolute;
  inset:0 0 auto;
  height:2px;
  background:var(--accent,var(--blue));
}
.math-node span{
  display:block;
  color:#d6e9ff;
  font-size:12px;
  font-weight:800;
  line-height:1.25;
}
.math-node strong{
  display:block;
  margin-top:8px;
  font-size:19px;
  line-height:1.08;
}
.math-node small{
  display:block;
  margin-top:5px;
  color:var(--muted);
  font-size:11px;
  line-height:1.25;
}
.math-node.blue{--accent:var(--blue)}
.math-node.green{--accent:var(--green)}
.math-node.purple{--accent:var(--purple)}
.math-node.yellow{--accent:var(--yellow)}
.math-node.orange{--accent:var(--orange)}
.math-node.red{--accent:var(--red)}
.math-op{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:78px;
  color:#9cc7ef;
  font-weight:900;
  font-size:16px;
}
.finance-checklist{
  display:grid;
  gap:12px;
}
.finance-check-section{
  border:1px solid rgba(61,151,255,.26);
  border-radius:8px;
  background:rgba(5,18,33,.42);
  padding:12px;
}
.finance-check-section h3{
  margin:0 0 10px;
  color:#dff1ff;
  font-size:13px;
}
.finance-check-row{
  --accent:var(--blue);
  display:grid;
  grid-template-columns:minmax(210px,260px) minmax(0,1fr);
  gap:10px;
  align-items:stretch;
  margin-top:8px;
  border:1px solid rgba(120,174,238,.18);
  border-left:4px solid var(--accent);
  border-radius:8px;
  background:rgba(8,27,48,.64);
  padding:10px;
}
.finance-check-row.green{--accent:var(--green)}
.finance-check-row.blue{--accent:var(--blue)}
.finance-check-row.orange{--accent:var(--orange)}
.finance-check-row.yellow{--accent:var(--yellow)}
.finance-check-row.red{--accent:var(--red)}
.finance-check-result{
  min-width:0;
  border-radius:8px;
  background:rgba(4,14,27,.58);
  padding:10px;
}
.finance-check-result span,
.finance-term span{
  display:block;
  color:#d6e9ff;
  font-size:12px;
  font-weight:900;
  line-height:1.25;
}
.finance-check-result strong{
  display:block;
  margin-top:7px;
  color:#fff;
  font-size:22px;
  line-height:1.08;
}
.finance-check-result small,
.finance-term small{
  display:block;
  margin-top:5px;
  color:var(--muted);
  font-size:11px;
  line-height:1.25;
}
.finance-check-formula{
  display:flex;
  flex-wrap:wrap;
  align-items:stretch;
  gap:8px;
  min-width:0;
}
.finance-check-formula > b{
  align-self:center;
  color:#9cc7ef;
  font-size:14px;
  font-weight:900;
}
.finance-term{
  --accent:var(--blue);
  flex:1 1 170px;
  min-width:150px;
  border:1px solid rgba(120,174,238,.22);
  border-top:2px solid var(--accent);
  border-radius:8px;
  background:rgba(12,36,62,.74);
  padding:9px;
}
.finance-term strong{
  display:block;
  margin-top:7px;
  color:#fff;
  font-size:17px;
  line-height:1.08;
}
.finance-term.blue{--accent:var(--blue)}
.finance-term.green{--accent:var(--green)}
.finance-term.purple{--accent:var(--purple)}
.finance-term.yellow{--accent:var(--yellow)}
.finance-term.orange{--accent:var(--orange)}
.finance-term.red{--accent:var(--red)}

.exec-grid{display:grid;gap:12px}
.main-grid{grid-template-columns:minmax(360px,.9fr) minmax(520px,1.25fr)}
.lower-grid{grid-template-columns:1.05fr .95fr 1fr;margin-top:12px}
.sync-grid,.churn-grid,.geo-grid{grid-template-columns:minmax(0,1fr) minmax(360px,.72fr);margin-top:12px}
.bairros-grid{grid-template-columns:minmax(0,1.25fr) minmax(420px,.75fr);margin-top:12px}
.receita-grid{grid-template-columns:minmax(0,1fr) minmax(360px,.8fr);margin-top:12px}
.receita-page{display:grid;gap:12px}
.receita-block{min-width:0}
.receita-section-kpis.kpis.compact{
  grid-template-columns:repeat(auto-fit,minmax(178px,1fr));
  margin-bottom:0;
}
.receita-main-kpis.kpis.compact{
  grid-template-columns:repeat(auto-fit,minmax(190px,1fr));
}
.receita-detail-panel{
  padding:0;
  overflow:hidden;
}
.receita-detail-panel summary{
  min-height:46px;
  display:flex;
  align-items:center;
  padding:12px;
  cursor:pointer;
  color:#e8f6ff;
  font-weight:900;
  border-bottom:1px solid rgba(120,174,238,.16);
}
.receita-detail-panel .panel-body{
  padding:12px;
}
.receita-note{
  display:block;
  margin-bottom:10px;
  color:var(--muted);
}
@media (max-width:900px){
  .finance-check-row{
    grid-template-columns:1fr;
  }
  .finance-check-formula{
    display:grid;
    grid-template-columns:1fr;
  }
  .finance-check-formula > b{
    text-align:center;
  }
}
.wide{min-width:0}

.geo-filterbar{
  display:grid;
  grid-template-columns:minmax(390px,auto) 150px 150px minmax(220px,1fr) auto;
  gap:8px;
  align-items:center;
  margin-bottom:12px;
}
.geo-filterbar .period-strip{min-width:0}
.geo-filterbar input.select,.geo-filterbar select.select{
  width:100%;
  min-width:0;
}
.geo-bairros-panel{margin-top:12px}
.projection-page{display:grid;gap:12px}
.projection-filterbar{
  grid-template-columns:minmax(260px,auto) 150px 150px minmax(210px,1fr) auto;
}
.projection-scroll{
  overflow:auto;
  border:1px solid rgba(61,151,255,.24);
  border-radius:8px;
  background:rgba(4,14,27,.36);
}
.projection-timeline{
  --label-width:230px;
  display:grid;
  grid-template-columns:var(--label-width) repeat(var(--months), minmax(136px,1fr));
  min-width:calc(var(--label-width) + (var(--months) * 136px));
}
.projection-head,
.projection-label,
.projection-cell,
.projection-section{
  border-bottom:1px solid rgba(120,174,238,.16);
  border-right:1px solid rgba(120,174,238,.13);
}
.projection-head{
  position:sticky;
  top:0;
  z-index:3;
  min-height:40px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#123354;
  color:#e9f6ff;
  font-size:12px;
  font-weight:900;
}
.projection-sticky{
  position:sticky;
  left:0;
  z-index:2;
}
.projection-label.projection-sticky{
  z-index:3;
  box-shadow:10px 0 18px rgba(2,11,21,.24);
}
.projection-head.projection-sticky{z-index:4;justify-content:flex-start;padding-left:12px}
.projection-section{
  grid-column:1/-1;
  min-height:30px;
  display:flex;
  align-items:center;
  padding:0;
  background:linear-gradient(90deg,rgba(47,156,255,.18),rgba(24,216,137,.08));
  color:#9fe0ff;
  font-size:11px;
  font-weight:900;
  text-transform:uppercase;
}
.projection-section span{
  position:sticky;
  left:0;
  z-index:3;
  width:var(--label-width);
  min-height:30px;
  display:flex;
  align-items:center;
  padding:0 12px;
  background:linear-gradient(90deg,#123354,#102c4b);
  box-shadow:10px 0 18px rgba(2,11,21,.28);
}
.projection-label{
  min-height:66px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:4px;
  padding:8px 12px;
  background:#0b2139;
}
.projection-label strong{
  font-size:12px;
  line-height:1.2;
  color:#eef8ff;
}
.projection-label small{
  color:var(--muted);
  font-size:11px;
  line-height:1.2;
}
.projection-cell{
  min-height:66px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:4px;
  padding:8px 10px;
  background:rgba(10,32,58,.62);
}
.projection-cell strong{
  display:block;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#f2f9ff;
  font-size:13px;
  line-height:1.2;
}
.projection-cell small{
  color:#8fc6ff;
  font-size:11px;
  line-height:1.2;
}

.gauges{
  display:grid;
  grid-template-columns:repeat(3,minmax(120px,1fr));
  gap:12px;
}
.gauge{
  min-height:170px;
  display:grid;
  place-items:center;
  align-content:center;
  gap:7px;
  padding:10px;
}
.gauge-ring{
  --value:35;
  --color:var(--blue);
  width:122px;
  aspect-ratio:1;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:conic-gradient(var(--color) calc(var(--value)*1%),#203653 0);
  position:relative;
}
.gauge-ring:after{
  content:"";
  position:absolute;
  inset:17px;
  border-radius:50%;
  background:#0b1b2f;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.04);
}
.gauge strong{
  position:relative;
  z-index:1;
  font-size:22px;
}
.gauge span{
  color:#e8f5ff;
  font-size:12px;
  font-weight:800;
  text-align:center;
}
.gauge small{color:var(--muted);font-size:11px;text-align:center}

.mrr-row{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
  margin-top:8px;
}
.mrr-row div{
  min-height:54px;
  border:1px solid var(--line-soft);
  border-radius:7px;
  padding:9px;
  background:#0a203a;
}
.mrr-row span{display:block;color:var(--muted);font-size:11px}
.mrr-row strong{display:block;margin-top:5px;font-size:15px}

.line-card{min-width:0}
.line-chart{
  width:100%;
  height:278px;
  display:block;
  overflow:visible;
}
.line-chart line{
  stroke:rgba(156,195,240,.13);
  stroke-width:1;
}
.line-chart text{
  fill:#91aeca;
  font-size:11px;
}
.line{
  fill:none;
  stroke-width:4;
  stroke-linecap:round;
  stroke-linejoin:round;
  filter:drop-shadow(0 8px 12px rgba(0,0,0,.22));
}
.line.red{stroke:var(--red)}
.line.blue{stroke:var(--blue)}
.line.green{stroke:var(--green)}
.line.yellow{stroke:var(--yellow)}
.legend{
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:18px;
  color:var(--muted);
  font-size:12px;
}
.legend span:before{
  content:"";
  display:inline-block;
  width:8px;
  height:8px;
  margin-right:7px;
  border-radius:50%;
  background:currentColor;
}
.legend .red{color:var(--red)}
.legend .blue{color:var(--blue)}
.legend .green{color:var(--green)}
.legend .yellow{color:var(--yellow)}

.mini-kpis{
  display:grid;
  grid-auto-flow:column;
  grid-auto-columns:minmax(132px,1fr);
  gap:10px;
  margin-top:12px;
  overflow-x:auto;
  overscroll-behavior-x:contain;
  padding-bottom:6px;
}
.mini-card{
  min-height:128px;
  padding:10px 9px 8px;
  position:relative;
  overflow:hidden;
}
.mini-card:before{
  content:"";
  position:absolute;
  inset:0 0 auto;
  height:2px;
  background:var(--accent,var(--blue));
}
.mini-card span{
  display:-webkit-box;
  min-height:25px;
  color:#dbeeff;
  font-size:10px;
  line-height:1.18;
  font-weight:900;
  overflow:hidden;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
}
.mini-card strong{
  display:-webkit-box;
  max-width:100%;
  min-height:33px;
  margin-top:6px;
  color:#f5fbff;
  font-size:clamp(12px,.95vw,16px);
  line-height:1.14;
  overflow:hidden;
  overflow-wrap:anywhere;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
}
.mini-card small{
  display:-webkit-box;
  min-height:24px;
  color:var(--muted);
  font-size:10px;
  line-height:1.2;
  margin-top:4px;
  overflow:hidden;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
}
.mini-card.blue{--accent:var(--blue)}
.mini-card.purple{--accent:var(--purple)}
.mini-card.green{--accent:var(--green)}
.mini-card.orange{--accent:var(--orange)}
.mini-card.red{--accent:var(--red)}

.tv-filterbar{
  grid-template-columns:repeat(6,minmax(120px,1fr));
}
.tv-admin-filterbar{
  grid-template-columns:minmax(150px,190px) minmax(150px,190px) auto auto auto 1fr;
}
.tv-admin-screen{
  display:grid;
  gap:14px;
}
.tv-admin-hero{
  grid-template-columns:minmax(0,1.4fr) minmax(180px,.5fr) minmax(280px,.9fr);
}
.tv-admin-summary{
  display:grid;
  grid-template-columns:repeat(4,minmax(160px,1fr));
  gap:12px;
}
.tv-admin-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(420px,1fr));
  gap:12px;
  align-items:start;
}
.tv-admin-sector{
  --accent:var(--blue);
  min-width:0;
  display:grid;
  gap:12px;
  padding:14px;
  border:1px solid color-mix(in srgb,var(--accent) 54%,transparent);
  border-radius:8px;
  background:linear-gradient(180deg,color-mix(in srgb,var(--accent) 10%,rgba(11,27,47,.98)),rgba(7,20,36,.96));
  box-shadow:0 18px 42px rgba(0,0,0,.2);
}
.tv-admin-sector.green{--accent:var(--green)}
.tv-admin-sector.red{--accent:var(--red)}
.tv-admin-sector.orange{--accent:var(--orange)}
.tv-admin-sector.blue{--accent:var(--blue)}
.tv-admin-sector.purple{--accent:var(--purple)}
.tv-admin-sector-head{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(120px,.28fr) auto;
  gap:10px;
  align-items:center;
}
.tv-admin-sector-head h3{
  margin:4px 0;
  color:#fff;
  font-size:25px;
  line-height:1.05;
  overflow-wrap:anywhere;
}
.tv-admin-sector-head p{
  margin:0;
  color:var(--muted);
  font-size:12px;
  font-weight:800;
  overflow-wrap:anywhere;
}
.tv-admin-score{
  min-height:76px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:10px;
  border:1px solid rgba(255,255,255,.13);
  border-radius:8px;
  background:rgba(255,255,255,.04);
}
.tv-admin-score span,
.tv-admin-score small{
  color:var(--muted);
  font-size:11px;
  font-weight:900;
  text-transform:uppercase;
}
.tv-admin-score strong{
  color:var(--accent);
  font-size:32px;
  line-height:1;
}
.tv-admin-kpis{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
}
.tv-admin-kpi{
  --accent:var(--blue);
  min-height:112px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  padding:10px;
  border:1px solid color-mix(in srgb,var(--accent) 48%,transparent);
  border-radius:8px;
  background:rgba(3,12,23,.34);
  overflow:hidden;
}
.tv-admin-kpi.green{--accent:var(--green)}
.tv-admin-kpi.red{--accent:var(--red)}
.tv-admin-kpi.orange{--accent:var(--orange)}
.tv-admin-kpi.blue{--accent:var(--blue)}
.tv-admin-kpi.purple{--accent:var(--purple)}
.tv-admin-kpi span{
  display:-webkit-box;
  color:#dff4ff;
  font-size:11px;
  line-height:1.18;
  font-weight:900;
  overflow:hidden;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
}
.tv-admin-kpi strong{
  display:block;
  color:#fff;
  font-size:clamp(18px,1.5vw,28px);
  line-height:1;
  overflow-wrap:anywhere;
}
.tv-admin-kpi small{
  color:var(--accent);
  font-size:11px;
  font-weight:900;
  text-transform:uppercase;
}
.tv-admin-pdca{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
.tv-admin-pdca div{
  min-height:62px;
  padding:9px;
  border-left:3px solid var(--accent);
  border-radius:8px;
  background:rgba(3,12,23,.36);
}
.tv-admin-pdca b{
  display:block;
  color:#fff;
  font-size:12px;
  line-height:1.2;
}
.tv-admin-pdca span{
  display:-webkit-box;
  margin-top:4px;
  color:#cdddf0;
  font-size:11px;
  line-height:1.25;
  overflow:hidden;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
}
.tv-sector-tabs{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin:12px 0;
}
.tv-sector-tabs button{
  min-height:34px;
  padding:0 12px;
  border:1px solid rgba(119,213,255,.32);
  border-radius:7px;
  background:rgba(7,24,43,.74);
  color:#dff4ff;
  font-weight:800;
}
.tv-sector-tabs button.active,
.tv-sector-tabs button:hover{
  border-color:var(--yellow);
  color:#fff;
  background:linear-gradient(135deg,rgba(255,210,63,.22),rgba(47,156,255,.18));
}
.tv-sector-screen{
  display:grid;
  gap:14px;
}
.tv-sector-screen:fullscreen{
  padding:18px;
  overflow:auto;
  background:linear-gradient(135deg,#050b13 0%,#071a2d 52%,#04101d 100%);
}
.tv-sector-hero{
  min-height:148px;
  display:grid;
  grid-template-columns:minmax(0,1.6fr) minmax(180px,.55fr) minmax(240px,.85fr);
  gap:12px;
  align-items:stretch;
  padding:18px;
  border:1px solid rgba(119,213,255,.24);
  border-radius:8px;
  background:linear-gradient(135deg,rgba(13,42,73,.94),rgba(6,17,31,.86));
  box-shadow:var(--shadow);
}
.tv-eyebrow{
  display:block;
  color:var(--yellow);
  font-size:12px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:0;
}
.tv-sector-hero h2{
  margin:8px 0;
  font-size:clamp(32px,4vw,58px);
  line-height:1;
  overflow-wrap:anywhere;
}
.tv-sector-hero p{
  margin:0;
  color:var(--muted);
  font-weight:800;
}
.tv-sector-score,
.tv-sector-license{
  display:flex;
  flex-direction:column;
  justify-content:center;
  min-width:0;
  padding:14px;
  border:1px solid rgba(255,255,255,.14);
  border-radius:8px;
  background:rgba(255,255,255,.045);
}
.tv-sector-score span,
.tv-sector-license span{
  color:var(--muted);
  font-size:12px;
  font-weight:900;
  text-transform:uppercase;
}
.tv-sector-score strong{
  margin-top:4px;
  font-size:42px;
  line-height:1;
}
.tv-sector-score.red strong{color:var(--red)}
.tv-sector-score.orange strong{color:var(--orange)}
.tv-sector-score.green strong{color:var(--green)}
.tv-sector-score.blue strong{color:var(--blue)}
.tv-sector-score.purple strong{color:var(--purple)}
.tv-sector-license strong{
  margin:6px 0;
  font-size:22px;
  overflow-wrap:anywhere;
}
.tv-sector-license small{
  color:var(--muted);
  overflow-wrap:anywhere;
}
.tv-kpi-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(180px,1fr));
  gap:12px;
}
.tv-kpi-card{
  --accent:var(--blue);
  min-height:245px;
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:14px;
  border:1px solid color-mix(in srgb,var(--accent) 58%,transparent);
  border-radius:8px;
  background:linear-gradient(180deg,color-mix(in srgb,var(--accent) 13%,rgba(11,27,47,.96)),rgba(7,20,36,.94));
  box-shadow:0 18px 46px rgba(0,0,0,.22);
  overflow:hidden;
}
.tv-kpi-card.green{--accent:var(--green)}
.tv-kpi-card.red{--accent:var(--red)}
.tv-kpi-card.orange{--accent:var(--orange)}
.tv-kpi-card.blue{--accent:var(--blue)}
.tv-kpi-card.purple{--accent:var(--purple)}
.tv-kpi-top,
.tv-kpi-actions{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
}
.tv-kpi-top span,
.tv-kpi-actions span{
  color:var(--muted);
  font-size:11px;
  font-weight:900;
  text-transform:uppercase;
}
.tv-kpi-top strong{
  color:var(--accent);
  font-size:12px;
  text-align:right;
}
.tv-kpi-card h3{
  margin:0;
  min-height:42px;
  font-size:20px;
  line-height:1.08;
  overflow-wrap:anywhere;
}
.tv-kpi-value{
  color:#fff;
  font-size:clamp(25px,2.4vw,38px);
  font-weight:950;
  line-height:1;
  overflow-wrap:anywhere;
}
.tv-kpi-card p{
  margin:0;
  color:#c8d9ef;
  font-size:13px;
  line-height:1.35;
  overflow-wrap:anywhere;
}
.tv-kpi-card p b{color:#fff}
.tv-two-columns{
  display:grid;
  grid-template-columns:1.15fr .85fr;
  gap:12px;
}
.tv-pdca-list,
.tv-meta-grid{
  display:grid;
  gap:10px;
}
.tv-pdca-card,
.tv-meta-card{
  border:1px solid rgba(119,213,255,.22);
  border-radius:8px;
  background:rgba(255,255,255,.035);
  padding:12px;
}
.tv-pdca-card{
  --accent:var(--blue);
  border-left:4px solid var(--accent);
}
.tv-pdca-card.green{--accent:var(--green)}
.tv-pdca-card.red{--accent:var(--red)}
.tv-pdca-card.orange{--accent:var(--orange)}
.tv-pdca-card.blue{--accent:var(--blue)}
.tv-pdca-card.purple{--accent:var(--purple)}
.tv-pdca-card header{
  display:flex;
  justify-content:space-between;
  gap:8px;
  margin-bottom:10px;
}
.tv-pdca-card header strong,
.tv-meta-card strong{
  overflow-wrap:anywhere;
}
.tv-pdca-card header span{
  color:var(--accent);
  font-weight:900;
  white-space:nowrap;
}
.tv-pdca-steps{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
}
.tv-pdca-steps div{
  min-height:74px;
  padding:8px;
  border-radius:7px;
  background:rgba(3,12,23,.42);
}
.tv-pdca-steps b{
  display:inline-grid;
  place-items:center;
  width:24px;
  height:24px;
  margin-bottom:5px;
  border-radius:50%;
  background:var(--accent);
  color:#04101d;
}
.tv-pdca-steps span{
  display:block;
  color:#d7e8fa;
  font-size:12px;
  line-height:1.28;
  overflow-wrap:anywhere;
}
.tv-meta-card span{
  display:block;
  color:var(--yellow);
  font-size:12px;
  font-weight:900;
  text-transform:uppercase;
}
.tv-meta-card strong{
  display:block;
  margin:5px 0;
  font-size:17px;
}
.tv-meta-card p{
  margin:0 0 8px;
  color:#d7e8fa;
  line-height:1.35;
  overflow-wrap:anywhere;
}
.tv-meta-card small{color:var(--muted);font-weight:800}
.valuation-filterbar{
  grid-template-columns:minmax(210px,260px) minmax(430px,1.4fr) minmax(130px,160px) minmax(130px,160px) minmax(170px,220px) auto;
}
.valuation-period-strip{
  width:100%;
}
.valuation-grid{
  grid-template-columns:minmax(260px,.4fr) minmax(520px,1fr);
  margin-top:12px;
}
.valuation-multipliers{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}
.valuation-mult-card{
  min-height:92px;
}
.valuation-mult-card strong{
  font-size:26px;
}
.valuation-table-wrap table{
  min-width:980px;
}
.shareholder-card{
  display:grid;
  gap:12px;
  margin-bottom:12px;
}
.shareholder-copy{
  display:grid;
  gap:9px;
  padding:12px;
  border:1px solid rgba(111,190,255,.16);
  border-radius:8px;
  background:linear-gradient(180deg,rgba(8,29,51,.72),rgba(4,16,29,.64));
}
.shareholder-copy p{
  margin:0;
  max-width:1180px;
  color:#dbeeff;
  font-size:13px;
  line-height:1.55;
}
.shareholder-table-wrap table{
  min-width:1960px;
}
.shareholder-total-row td{
  background:rgba(47,156,255,.10);
  font-weight:900;
}
.city-agg-summary{
  display:grid;
  grid-template-columns:repeat(4,minmax(170px,1fr));
  gap:8px;
}
.city-agg-summary-card{
  min-height:92px;
  border:1px solid var(--line);
  border-radius:8px;
  padding:12px 14px;
  background:linear-gradient(180deg,rgba(10,38,67,.92),rgba(6,24,43,.92));
  color:#e8f6ff;
  text-align:left;
  cursor:pointer;
  box-shadow:inset 0 2px 0 rgba(47,156,255,.75);
}
.city-agg-summary-card.active{
  border-color:var(--yellow);
  box-shadow:inset 0 2px 0 var(--yellow),0 0 0 1px rgba(255,197,26,.14);
  background:linear-gradient(180deg,rgba(29,60,86,.98),rgba(8,35,62,.98));
}
.city-agg-summary-card.filter-active{
  border-color:var(--cyan);
  box-shadow:inset 0 2px 0 var(--cyan),0 0 0 1px rgba(30,226,214,.14);
}
.city-agg-summary-card span,
.city-agg-summary-card strong,
.city-agg-summary-card small{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.city-agg-summary-card span{
  color:#d9edff;
  font-size:12px;
  font-weight:900;
}
.city-agg-summary-card strong{
  margin-top:8px;
  font-size:25px;
  line-height:1;
}
.city-agg-summary-card small{
  margin-top:8px;
  color:var(--muted);
  font-size:11px;
}
.city-agg-panel{
  display:grid;
  gap:12px;
}
.city-agg-tabs{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
}
.city-agg-tabs button{
  min-height:58px;
  border:1px solid var(--line);
  border-radius:8px;
  padding:10px 12px;
  background:rgba(8,28,50,.74);
  color:#dff2ff;
  text-align:left;
}
.city-agg-tabs button.active{
  border-color:var(--yellow);
  background:linear-gradient(180deg,rgba(19,59,101,.94),rgba(8,34,62,.94));
}
.city-agg-tabs strong,
.city-agg-tabs small{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.city-agg-tabs small{
  margin-top:4px;
  color:var(--muted);
}
.city-agg-toolbar{
  display:grid;
  grid-template-columns:minmax(180px,260px) minmax(220px,1fr) auto auto auto auto;
  gap:8px;
  align-items:center;
}
.city-agg-toolbar .select{width:100%}
.city-agg-group-select{
  font-weight:900;
}
.city-agg-current{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-height:36px;
  padding:8px 10px;
  border:1px solid rgba(111,190,255,.16);
  border-radius:8px;
  background:rgba(5,18,33,.5);
}
.city-agg-current div{
  min-width:0;
}
.city-agg-current small,
.city-agg-current strong{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.city-agg-current small{
  color:var(--muted);
  font-size:11px;
}
.city-agg-current span{
  color:var(--cyan);
  font-weight:900;
  white-space:nowrap;
}
.city-agg-list{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
}
.city-agg-row{
  min-height:54px;
  display:flex;
  align-items:center;
  gap:9px;
  border:1px solid var(--line-soft);
  border-radius:8px;
  padding:8px 10px;
  background:rgba(6,21,38,.68);
}
.city-agg-row input{
  width:16px;
  height:16px;
  flex:0 0 auto;
  accent-color:var(--blue);
}
.city-agg-row span{
  min-width:0;
}
.city-agg-row strong,
.city-agg-row small{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.city-agg-row small{
  margin-top:3px;
  color:var(--muted);
  font-size:11px;
}
.valuation-share{
  display:grid;
  grid-template-columns:minmax(72px,1fr) 54px;
  align-items:center;
  gap:8px;
  min-width:138px;
}
.valuation-share:before{
  content:"";
  grid-column:1;
  grid-row:1;
  height:8px;
  border-radius:999px;
  background:rgba(77,139,196,.26);
}
.valuation-share i{
  grid-column:1;
  grid-row:1;
  height:8px;
  border-radius:999px;
  background:linear-gradient(90deg,var(--blue),var(--green));
}
.valuation-share span{
  color:#e7f6ff;
  font-weight:900;
  font-size:11px;
}
.muted-cell{
  display:block;
  margin-top:2px;
  color:var(--muted);
  font-size:10px;
}
.spark{
  width:100%;
  height:29px;
  margin-top:4px;
}
.spark polyline{
  fill:none;
  stroke:var(--accent,var(--blue));
  stroke-width:3;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.monthly-kpis{
  display:grid;
  gap:10px;
  margin-top:12px;
}
.monthly-kpis-head{
  min-height:44px;
  padding:0 2px;
}
.monthly-kpi-row{
  display:grid;
  grid-template-columns:82px minmax(0,1fr);
  gap:10px;
  align-items:stretch;
}
.monthly-kpi-month{
  min-height:128px;
  border:1px solid var(--line);
  border-radius:8px;
  background:linear-gradient(180deg,rgba(14,39,68,.96),rgba(7,23,41,.96));
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:10px;
}
.monthly-kpi-month strong{
  color:#f5fbff;
  font-size:18px;
  line-height:1.1;
}
.monthly-kpi-month small{
  color:var(--muted);
  font-size:10px;
  line-height:1.2;
  margin-top:5px;
}
.monthly-mini-kpis{
  margin-top:0;
}

.table-wrap{
  width:100%;
  overflow:auto;
  border:1px solid var(--line-soft);
  border-radius:7px;
  background:#08192d;
}
table{
  width:100%;
  min-width:760px;
  border-collapse:collapse;
}
th,td{
  padding:9px 11px;
  border-bottom:1px solid var(--line-soft);
  text-align:left;
  white-space:nowrap;
  font-size:12px;
}
th{
  position:sticky;
  top:0;
  z-index:1;
  color:#cfe7ff;
  background:#103154;
}
td{color:#edf7ff}
tbody tr:hover td{background:rgba(48,132,214,.08)}
.dividas-table-wrap{
  max-height:min(68vh,680px);
  overflow:auto;
  border-color:rgba(61,151,255,.34);
  background:#06182b;
}
.dividas-matrix{
  --plan-w:235px;
  --metric-w:112px;
  --share-w:74px;
  min-width:1180px;
  border-collapse:separate;
  border-spacing:0;
}
.dividas-matrix th,
.dividas-matrix td{
  min-width:112px;
  height:42px;
  padding:10px 12px;
  border-right:1px solid rgba(61,151,255,.09);
  vertical-align:middle;
}
.dividas-matrix thead th{
  top:0;
  z-index:5;
  color:#f3fbff;
  background:linear-gradient(180deg,#15466f,#0c2f52);
  box-shadow:0 1px 0 rgba(111,190,255,.36),0 8px 18px rgba(0,0,0,.22);
  font-size:11px;
  font-weight:950;
  text-transform:uppercase;
}
.dividas-matrix .plan-col{
  left:0;
  width:var(--plan-w);
  min-width:var(--plan-w);
  max-width:var(--plan-w);
  white-space:normal;
  line-height:1.24;
}
.dividas-matrix th.plan-col,
.dividas-matrix td.plan-col,
.dividas-matrix th.total-col,
.dividas-matrix td.total-col,
.dividas-matrix th.open-col,
.dividas-matrix td.open-col,
.dividas-matrix th.paid-col,
.dividas-matrix td.paid-col,
.dividas-matrix th.late-col,
.dividas-matrix td.late-col,
.dividas-matrix th.share-col,
.dividas-matrix td.share-col{
  position:sticky;
  z-index:4;
  background:#08213b;
  box-shadow:1px 0 0 rgba(111,190,255,.18);
}
.dividas-matrix .total-col,
.dividas-matrix .open-col,
.dividas-matrix .paid-col,
.dividas-matrix .late-col{
  width:var(--metric-w);
  min-width:var(--metric-w);
  max-width:var(--metric-w);
}
.dividas-matrix .total-col{left:var(--plan-w)}
.dividas-matrix .open-col{left:calc(var(--plan-w) + var(--metric-w))}
.dividas-matrix .paid-col{left:calc(var(--plan-w) + var(--metric-w) + var(--metric-w))}
.dividas-matrix .late-col{left:calc(var(--plan-w) + var(--metric-w) + var(--metric-w) + var(--metric-w))}
.dividas-matrix .share-col{left:calc(var(--plan-w) + var(--metric-w) + var(--metric-w) + var(--metric-w) + var(--metric-w))}
.dividas-matrix thead th.plan-col{
  z-index:7;
  background:linear-gradient(180deg,#16507d,#0c355c);
}
.dividas-matrix thead th.total-col,
.dividas-matrix thead th.open-col,
.dividas-matrix thead th.paid-col,
.dividas-matrix thead th.late-col,
.dividas-matrix thead th.share-col{
  z-index:7;
  background:linear-gradient(180deg,#15466f,#0c2f52);
}
.dividas-matrix td.plan-col strong{
  display:block;
  color:#f6fbff;
  font-size:12px;
  line-height:1.22;
}
.dividas-matrix td.plan-col small{
  display:block;
  margin-top:3px;
  color:#9fc6ed;
  font-size:10px;
  font-weight:800;
}
.dividas-matrix .total-col{color:#f7fbff}
.dividas-matrix .open-col{color:#ffe98f}
.dividas-matrix .paid-col{color:#58f0bd}
.dividas-matrix .late-col{color:#ff8aa6}
.dividas-matrix .share-col{
  width:var(--share-w);
  min-width:var(--share-w);
  max-width:var(--share-w);
  color:#9fd5ff;
  box-shadow:1px 0 0 rgba(111,190,255,.18),12px 0 18px rgba(0,0,0,.18);
}
.dividas-matrix thead .total-col{border-top:3px solid var(--blue)}
.dividas-matrix thead .open-col{border-top:3px solid var(--yellow)}
.dividas-matrix thead .paid-col{border-top:3px solid var(--green)}
.dividas-matrix thead .late-col{border-top:3px solid var(--red)}
.dividas-matrix thead .share-col{border-top:3px solid var(--purple)}
.dividas-matrix tbody tr:hover td{background:rgba(48,132,214,.11)}
.dividas-matrix tbody tr:hover td.plan-col,
.dividas-matrix tbody tr:hover td.total-col,
.dividas-matrix tbody tr:hover td.open-col,
.dividas-matrix tbody tr:hover td.paid-col,
.dividas-matrix tbody tr:hover td.late-col,
.dividas-matrix tbody tr:hover td.share-col{background:#0a2a4c}
.dividas-matrix tfoot td{
  position:sticky;
  bottom:0;
  z-index:3;
  border-top:1px solid rgba(111,190,255,.45);
  background:#0b2b4b;
  color:#f5fbff;
  font-weight:950;
  box-shadow:0 -8px 18px rgba(0,0,0,.24);
}
.dividas-matrix tfoot td.plan-col{
  z-index:6;
  background:#0d365c;
}
.dividas-matrix tfoot td.total-col,
.dividas-matrix tfoot td.open-col,
.dividas-matrix tfoot td.paid-col,
.dividas-matrix tfoot td.late-col,
.dividas-matrix tfoot td.share-col{
  z-index:6;
  background:#0d365c;
}
.dre-table-wrap table{
  min-width:1680px;
}
.dre-collapsible-panel{
  padding:0;
  overflow:hidden;
}
.dre-collapsible-panel[open]{
  padding-bottom:14px;
}
.dre-panel-summary{
  min-height:58px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:14px;
  cursor:pointer;
  list-style:none;
}
.dre-panel-summary::-webkit-details-marker{
  display:none;
}
.dre-panel-summary h2{
  margin:0;
  font-size:15px;
  line-height:1.2;
}
.dre-panel-summary small{
  display:block;
  margin-top:4px;
  color:var(--muted);
}
.dre-panel-summary span{
  min-width:72px;
  min-height:28px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(111,190,255,.42);
  border-radius:7px;
  color:#dff3ff;
  background:rgba(8,28,50,.74);
  font-size:12px;
  font-weight:900;
}
.dre-panel-summary span::before{
  content:"Abrir";
}
.dre-collapsible-panel[open] .dre-panel-summary{
  border-bottom:1px solid rgba(120,174,238,.16);
}
.dre-collapsible-panel[open] .dre-panel-summary span::before{
  content:"Fechar";
}
.dre-collapsible-panel .panel-body{
  padding:14px;
}
.dre-money-cell{
  min-width:118px;
  display:grid;
  gap:3px;
}
.dre-money-cell strong{
  color:#f4fbff;
  font-size:12px;
  line-height:1.15;
  white-space:nowrap;
}
.dre-money-cell small{
  color:#8fb8df;
  font-size:10px;
  line-height:1.12;
  white-space:nowrap;
}
.dre-analysis-table th,
.dre-tree-table th{
  white-space:nowrap;
  background:#154a78;
  color:#f5fbff;
  border-bottom:2px solid rgba(54,163,255,.72);
  box-shadow:inset 0 -1px 0 rgba(255,255,255,.08);
}
.dre-analysis-table td,
.dre-tree-table td{
  vertical-align:top;
}
.dre-analysis-table tbody tr:nth-child(odd) td,
.dre-tree-table tbody tr:nth-child(odd) td{
  background:rgba(9,30,53,.72);
}
.dre-analysis-table tbody tr:nth-child(even) td,
.dre-tree-table tbody tr:nth-child(even) td{
  background:rgba(14,43,73,.86);
}
.dre-analysis-table tbody tr:hover td,
.dre-tree-table tbody tr:hover td{
  background:rgba(35,104,161,.45);
}
.dre-highlight-row td{
  background:rgba(39,124,199,.28) !important;
  font-weight:900;
}
.dre-tree-parent td{
  background:rgba(39,124,199,.28) !important;
  font-weight:900;
}
.dre-tree-child td{
  color:#b9d7f5;
}
.dre-tree-child td:nth-child(2){
  padding-left:28px;
}
.status{font-weight:900}
.status.OK,.status.CONCLUIDO,.status.RECEBIDO,.status.ATIVO,.status.A,.status.SIM{color:var(--green)}
.status.PARCIAL,.status.RODANDO,.status.SINCRONIZANDO,.status.ABERTO,.status.PENDENTE,.status.DUPLICADO{color:var(--yellow)}
.status.ERRO,.status.INATIVO,.status.I,.status.NAO,.status.CANCELADO{color:var(--red)}
.empty{
  min-height:92px;
  display:grid;
  place-items:center;
  border:1px dashed var(--line);
  border-radius:7px;
  color:var(--muted);
  background:rgba(7,24,43,.56);
}

.donut-wrap{
  display:grid;
  grid-template-columns:170px minmax(0,1fr);
  align-items:center;
  gap:14px;
}
.donut{
  width:160px;
  aspect-ratio:1;
  border-radius:50%;
  display:grid;
  place-items:center;
  position:relative;
}
.donut:after{
  content:"";
  position:absolute;
  inset:45px;
  border-radius:50%;
  background:#0b1b2f;
}
.donut strong{
  position:relative;
  z-index:1;
  text-align:center;
  font-size:18px;
  line-height:1.2;
}
.donut-list{display:grid;gap:7px;min-width:0}
.donut-list div{
  display:grid;
  grid-template-columns:10px minmax(0,1fr) auto auto;
  gap:8px;
  align-items:center;
  font-size:12px;
}
.donut-list i{width:9px;height:9px;border-radius:50%}
.donut-list span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#dfefff}
.donut-list b{font-weight:800}
.donut-list em{font-style:normal;color:var(--muted)}

.city-list{display:grid;gap:9px}
.geo-click-list button{
  display:grid;
  grid-template-columns:minmax(0,1fr) 72px;
  grid-template-rows:auto 8px;
  gap:5px 12px;
  align-items:center;
  width:100%;
  border:0;
  border-radius:7px;
  background:transparent;
  color:var(--text);
  padding:2px 4px;
  text-align:left;
}
.geo-click-list button:hover,.geo-click-list button.selected{
  background:rgba(43,140,255,.13);
}
.geo-click-list button.selected{
  outline:1px solid rgba(54,163,255,.55);
}
.geo-click-list span{min-width:0}
.geo-click-list strong,.geo-click-list small{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.geo-click-list strong{font-size:12px}
.geo-click-list small{
  margin-top:3px;
  color:var(--muted);
  font-size:11px;
}
.geo-click-list em{
  justify-self:end;
  font-style:normal;
  color:#e5f2ff;
  font-weight:900;
}
.geo-click-list i{
  grid-column:1/-1;
  height:8px;
  border-radius:999px;
  overflow:hidden;
  background:#203754;
}
.geo-click-list b{
  display:block;
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg,var(--blue),var(--green));
}
.city-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) 68px;
  align-items:center;
  gap:10px;
}
.city-row strong{
  display:block;
  margin-bottom:5px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:12px;
}
.city-row small{
  display:block;
  margin-bottom:6px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:var(--muted);
  font-size:11px;
}
.city-row span{text-align:right;color:#dfefff;font-weight:800}
.track{
  height:8px;
  border-radius:999px;
  overflow:hidden;
  background:#203754;
}
.fill{
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg,var(--blue),var(--green));
}

.map-card{
  min-height:340px;
  border:1px solid var(--line);
  border-radius:8px;
  background:
    linear-gradient(120deg,rgba(54,163,255,.12),transparent),
    repeating-linear-gradient(45deg,rgba(70,139,221,.10) 0 12px,transparent 12px 24px),
    #081b31;
  position:relative;
  overflow:hidden;
}
.map-card:before{
  content:"";
  position:absolute;
  inset:38px 78px 34px 92px;
  background:linear-gradient(135deg,#2b8cff,#16489b 58%,#0e2c67);
  clip-path:polygon(35% 0,58% 8%,78% 27%,72% 51%,89% 67%,61% 100%,35% 88%,8% 70%,19% 42%,4% 18%);
  filter:drop-shadow(0 22px 34px rgba(36,134,255,.23));
}
.map-card span{
  position:absolute;
  left:var(--x);
  top:var(--y);
  z-index:1;
  max-width:130px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  border:1px solid rgba(111,183,255,.45);
  border-radius:999px;
  background:rgba(5,18,33,.72);
  padding:4px 8px;
  color:#dff1ff;
  font-size:11px;
}
.operational-map{
  min-height:340px;
  padding:0;
}
.operational-map:before{display:none}
.operational-map svg{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
}
.map-shape{
  fill:url(#none);
  fill:#1453a8;
  opacity:.88;
  filter:drop-shadow(0 22px 34px rgba(36,134,255,.22));
}
.map-point{
  cursor:pointer;
  outline:none;
}
.map-point circle{
  fill:rgba(33,160,255,.42);
  stroke:rgba(199,234,255,.85);
  stroke-width:2;
  transition:transform .15s ease,fill .15s ease;
}
.map-point.ok circle{fill:rgba(29,223,143,.34)}
.map-point.warn circle{fill:rgba(255,211,72,.36)}
.map-point.risk circle{fill:rgba(255,71,117,.38)}
.map-point:hover circle{
  transform:scale(1.08);
  fill:rgba(54,163,255,.62);
}
.map-point text{
  text-anchor:middle;
  paint-order:stroke;
  stroke:#06182a;
  stroke-width:4px;
  stroke-linejoin:round;
  fill:#eef8ff;
  pointer-events:none;
}
.map-point .city{
  font-size:15px;
  font-weight:900;
}
.map-point .metrics{
  font-size:12px;
  font-weight:800;
  fill:#d7ecff;
}

.kpis.compact{
  grid-template-columns:repeat(4,minmax(170px,1fr));
  margin-bottom:12px;
}
.sync-runner{margin-bottom:12px}
.logs-panel{margin-top:12px}
.module-page,.enterprise-page{display:grid;gap:12px}

.login{
  padding:20px;
  background:
    radial-gradient(circle at 50% 0%,rgba(47,156,255,.17),transparent 38%),
    linear-gradient(135deg,#040c16,#081b30);
}
.login-card{
  width:min(430px,100%);
  padding:28px;
}
.login-brand{padding:0;margin-bottom:16px}
.login-card h1{margin:0 0 6px;font-size:28px}
.login-card p{margin:0 0 18px;color:var(--muted)}
.form{display:grid;gap:12px}
.form label{
  display:grid;
  gap:6px;
  color:#cfe0f4;
  font-size:13px;
}
.form input,
.form select{
  min-height:38px;
  border:1px solid var(--line);
  border-radius:7px;
  background:#07182b;
  color:var(--text);
  padding:0 12px;
}
.form button{min-height:42px}
.success-msg{
  border-color:rgba(29,223,143,.5);
  background:rgba(29,223,143,.12);
  color:#bfffe4;
  margin-bottom:12px;
}
.user-admin-grid{
  grid-template-columns:minmax(280px,.85fr) minmax(340px,1.15fr);
  align-items:start;
  margin-bottom:12px;
}
.user-create-form{
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.user-create-form button{grid-column:1 / -1}
.user-admin-table table{min-width:980px}
.user-admin-table input.select,
.user-admin-table select.select{
  width:100%;
  min-width:130px;
}
.user-admin-actions{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
}
.finance-modal{
  position:fixed;
  inset:0;
  z-index:60;
  display:grid;
  place-items:start center;
  padding:28px 16px;
  background:rgba(1,8,16,.72);
  backdrop-filter:blur(10px);
  overflow:auto;
}
.finance-box{
  width:min(1180px,100%);
  border:1px solid var(--line);
  border-radius:8px;
  background:linear-gradient(180deg,rgba(13,39,68,.98),rgba(5,18,32,.98));
  box-shadow:0 28px 90px rgba(0,0,0,.45);
  padding:16px;
}
.finance-form{
  display:grid;
  gap:12px;
}
.finance-form-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}
.finance-form-grid label,
.finance-wide-label{
  display:grid;
  gap:6px;
  color:#cfe0f4;
  font-size:12px;
  font-weight:800;
}
.finance-form-grid .select,
.finance-wide-label .select{
  width:100%;
  min-width:0;
}
.finance-wide-label textarea{
  min-height:86px;
  padding:10px 12px;
  resize:vertical;
}
.finance-form .checkline{
  justify-content:flex-start;
  min-height:36px;
}
.finance-form .checkline input{
  width:auto;
  min-height:auto;
}
.error{
  padding:10px;
  margin-bottom:12px;
  border:1px solid #86324d;
  border-radius:7px;
  background:#3b1420;
  color:#ffe0e9;
}
.success-msg{
  padding:10px;
  margin-bottom:12px;
  border:1px solid rgba(29,223,143,.5);
  border-radius:7px;
  background:rgba(29,223,143,.12);
  color:#bfffe4;
}
.config-card{max-width:760px}
.checkline{
  min-height:38px;
  display:flex;
  align-items:center;
  gap:8px;
  padding:0 10px;
  border:1px solid var(--line);
  border-radius:7px;
  background:#07182b;
  color:#d9e8fa;
  font-size:13px;
}
.json-preview{
  margin:0;
  min-width:620px;
  padding:12px;
  color:#dcecff;
  white-space:pre-wrap;
  font-size:12px;
  line-height:1.45;
}

.agenda-config-panel{
  margin-bottom:12px;
  padding:0;
  overflow:hidden;
}
.agenda-config-panel summary{
  min-height:48px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 14px;
  cursor:pointer;
}
.agenda-config-panel summary span{
  color:var(--muted);
  font-size:12px;
}
.agenda-config-panel[open]{padding-bottom:12px}
.agenda-config-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  padding:0 14px 12px;
}
.agenda-config-box{
  border:1px solid var(--line-soft);
  border-radius:8px;
  padding:12px;
  background:rgba(5,18,33,.46);
  min-width:0;
}
.agenda-form-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
}
.agenda-form-grid .select{width:100%;min-width:0}
.scenario-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(220px,1fr));
  gap:10px;
}
.scenario-card{
  border:1px solid var(--line-soft);
  border-radius:8px;
  background:rgba(5,18,33,.54);
  padding:12px;
}
.scenario-card.menor_km{border-top:2px solid var(--green)}
.scenario-card.melhor_sla{border-top:2px solid var(--yellow)}
.scenario-card.equilibrado{border-top:2px solid var(--purple)}
.scenario-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.scenario-head strong{
  display:block;
  font-size:15px;
}
.scenario-head small{
  display:block;
  margin-top:4px;
  color:var(--muted);
  line-height:1.35;
}
.scenario-head span{
  border:1px solid var(--line-soft);
  border-radius:999px;
  padding:4px 8px;
  color:#dff1ff;
  background:rgba(47,156,255,.12);
  font-size:11px;
  font-weight:900;
}
.real-map-shell{
  display:grid;
  gap:10px;
}
.leaflet-route-map{
  min-height:430px;
  border:1px solid var(--line-soft);
  border-radius:8px;
  overflow:hidden;
  background:#07182b;
}
.map-expanded .leaflet-route-map{
  min-height:min(78vh,900px);
  height:min(78vh,900px);
}
.leaflet-route-map > span{
  min-height:430px;
  display:grid;
  place-items:center;
  color:var(--muted);
}
.map-expanded .leaflet-route-map > span{
  min-height:min(78vh,900px);
}
.map-fallback{display:none}
.leaflet-popup-content{
  color:#0a1728;
  line-height:1.35;
}
.agenda-map-controls{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr)) auto minmax(120px,auto);
  gap:8px;
  align-items:center;
  margin-bottom:10px;
}
.agenda-map-controls .select{
  width:100%;
  min-width:0;
}
.map-focus-count{
  min-height:36px;
  display:grid;
  place-items:center;
  padding:0 10px;
  border:1px solid rgba(67,212,255,.34);
  border-radius:7px;
  background:rgba(10,36,64,.58);
  color:#c7ecff;
  font-size:12px;
  font-weight:900;
  white-space:nowrap;
}
.agenda-action-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(220px,1fr));
  gap:10px;
}
.agenda-action-card{
  border:1px solid var(--line-soft);
  border-top:2px solid var(--green);
  border-radius:8px;
  padding:10px;
  background:rgba(5,18,33,.54);
}
.agenda-action-card.queue{border-top-color:var(--yellow)}
.agenda-action-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
}
.agenda-action-head strong,
.agenda-message-card strong{
  display:block;
  color:#f3fbff;
  font-size:14px;
}
.agenda-action-head small{
  display:block;
  margin-top:3px;
  color:var(--muted);
  font-size:11px;
}
.agenda-action-head span{
  border:1px solid rgba(24,216,137,.44);
  border-radius:7px;
  padding:5px 8px;
  background:rgba(24,216,137,.12);
  color:#c7ffe6;
  font-weight:900;
  white-space:nowrap;
}
.agenda-action-card.queue .agenda-action-head span{
  border-color:rgba(255,211,72,.5);
  color:#fff2a7;
  background:rgba(255,211,72,.12);
}
.agenda-action-path{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  gap:8px;
  align-items:center;
  margin-bottom:8px;
}
.agenda-action-path b{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  border:1px solid var(--line-soft);
  border-radius:7px;
  padding:7px 8px;
  color:#eaf7ff;
  background:rgba(10,36,64,.54);
}
.agenda-action-path i{
  color:var(--cyan);
  font-size:11px;
  font-style:normal;
  font-weight:900;
  text-transform:uppercase;
}
.agenda-action-card p,
.agenda-action-card small{
  display:block;
  margin:0 0 8px;
  color:var(--muted);
  font-size:12px;
  line-height:1.35;
}
.agenda-message-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(220px,1fr));
  gap:10px;
}
.agenda-message-card{
  border:1px solid var(--line-soft);
  border-radius:8px;
  padding:10px;
  background:rgba(5,18,33,.5);
}
.agenda-message-card span,
.agenda-message-card small{
  display:block;
  margin-top:4px;
  color:var(--muted);
  font-size:11px;
}
.agenda-message-card p{
  min-height:42px;
  margin:8px 0;
  color:#dceeff;
  font-size:12px;
  line-height:1.4;
}

.route-map-grid{
  display:grid;
  grid-template-columns:minmax(520px,1.2fr) minmax(420px,.8fr);
  gap:12px;
  margin-bottom:12px;
}
.route-map-panel{min-width:0}
.route-map-grid .map-expanded{
  grid-column:1 / -1;
}

.noc-map-panel{
  overflow:hidden;
}
.noc-map-toolbar{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  margin-bottom:10px;
}
.noc-map-toolbar span{
  border:1px solid rgba(119,213,255,.22);
  border-radius:7px;
  padding:7px 9px;
  background:rgba(4,18,32,.68);
  font-size:12px;
  color:#e9f7ff;
  font-weight:800;
}
.noc-real-map{
  position:relative;
  height:560px;
  min-height:360px;
  border:1px solid rgba(119,213,255,.25);
  border-radius:8px;
  overflow:hidden;
  background:#071b2d;
}
.map-expanded .noc-real-map{
  height:min(78vh,900px);
}
.noc-map-tile{
  position:absolute;
  object-fit:cover;
}
.noc-map-grid{
  position:absolute;
  inset:0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size:64px 64px;
  pointer-events:none;
}
.noc-map-point{
  position:absolute;
  transform:translate(-50%,-50%);
  border:2px solid rgba(255,255,255,.9);
  border-radius:999px;
  box-shadow:0 0 0 2px rgba(0,0,0,.4), 0 0 14px rgba(0,0,0,.55);
  z-index:5;
}
.noc-map-point.cto_inferida{
  border-radius:3px;
  transform:translate(-50%,-50%) rotate(45deg);
}
.noc-map-point.incremento_rede{
  border-radius:0;
  clip-path:polygon(50% 0, 100% 100%, 0 100%);
}
.noc-map-attribution{
  position:absolute;
  right:8px;
  bottom:8px;
  background:rgba(3,13,24,.78);
  border:1px solid rgba(119,213,255,.2);
  border-radius:6px;
  padding:5px 7px;
  color:#cfeaff;
  font-size:11px;
  z-index:7;
}
.noc-map-legend{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:10px 0 14px;
}
.noc-map-legend span{
  display:flex;
  align-items:center;
  gap:6px;
  border:1px solid rgba(119,213,255,.2);
  border-radius:999px;
  padding:6px 9px;
  background:rgba(4,18,32,.68);
  font-size:12px;
  color:#d9f1ff;
}
.noc-map-legend i{
  display:inline-block;
  width:10px;
  height:10px;
  border-radius:999px;
}
.empty-map{
  display:grid;
  place-items:center;
  color:var(--muted);
}
.route-map{
  position:relative;
  min-height:430px;
  border:1px solid var(--line-soft);
  border-radius:8px;
  overflow:hidden;
  background:
    radial-gradient(circle at 30% 20%,rgba(67,212,255,.16),transparent 28%),
    linear-gradient(135deg,rgba(15,45,80,.96),rgba(5,18,33,.96));
}
.route-map.empty{
  display:grid;
  place-items:center;
  color:var(--muted);
}
.route-map svg{
  display:block;
  width:100%;
  height:430px;
}
.agenda-route-line{
  fill:none;
  stroke:var(--route-color,var(--blue));
  stroke-width:4;
  stroke-linecap:round;
  stroke-linejoin:round;
  opacity:.72;
  filter:drop-shadow(0 0 8px rgba(47,156,255,.22));
}
.agenda-map-point circle{
  stroke:#06111f;
  stroke-width:3;
  filter:drop-shadow(0 6px 10px rgba(0,0,0,.35));
}
.agenda-map-point text{
  fill:#f5fbff;
  stroke:#06111f;
  stroke-width:4;
  paint-order:stroke;
  font-size:11px;
  font-weight:900;
  pointer-events:none;
}
.route-legend{
  position:absolute;
  left:12px;
  right:12px;
  bottom:10px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  padding:8px;
  border:1px solid var(--line-soft);
  border-radius:8px;
  background:rgba(4,15,27,.78);
  backdrop-filter:blur(8px);
}
.route-legend span{
  display:flex;
  align-items:center;
  gap:6px;
  max-width:170px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#dff1ff;
  font-size:11px;
  font-weight:800;
}
.route-legend i{
  width:10px;
  height:10px;
  border-radius:50%;
  flex:0 0 10px;
}
.route-card-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
}
.route-card{
  border:1px solid var(--line-soft);
  border-radius:8px;
  background:rgba(5,18,33,.48);
  padding:10px;
}
.route-card-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
}
.route-card-head strong{
  display:block;
  font-size:14px;
}
.route-card-head small{
  display:block;
  margin-top:3px;
  color:var(--muted);
  font-size:11px;
}
.route-gain{
  min-width:72px;
  text-align:center;
  border:1px solid rgba(24,216,137,.52);
  border-radius:7px;
  padding:6px 8px;
  background:rgba(24,216,137,.12);
  color:#c7ffe6;
  font-weight:900;
  white-space:nowrap;
}
.route-metrics{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:6px;
  margin-bottom:8px;
}
.route-metrics span{
  min-height:32px;
  border:1px solid var(--line-soft);
  border-radius:7px;
  padding:5px 7px;
  color:var(--muted);
  font-size:11px;
}
.route-metrics b{
  display:block;
  color:#eff8ff;
  font-size:12px;
}
.route-stops{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.route-stop{
  min-width:96px;
  max-width:150px;
  border:1px solid rgba(67,212,255,.34);
  border-radius:7px;
  padding:6px 8px;
  background:rgba(10,36,64,.62);
  color:#edf8ff;
  font-size:11px;
  overflow:hidden;
}
.route-stop b{
  display:inline-grid;
  place-items:center;
  width:20px;
  height:20px;
  margin-right:5px;
  border-radius:50%;
  background:var(--blue);
  color:white;
}
.route-stop small{
  display:block;
  margin-top:4px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:var(--muted);
}
.agenda-lanes{
  display:grid;
  grid-template-columns:repeat(4,minmax(220px,1fr));
  gap:10px;
}
.agenda-lane{
  min-width:0;
  border:1px solid var(--line-soft);
  border-radius:8px;
  background:rgba(4,15,27,.42);
  padding:8px;
}
.agenda-lane-head{
  min-height:34px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:0 4px 7px;
  border-bottom:1px solid var(--line-soft);
  margin-bottom:8px;
}
.agenda-lane-head strong{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.agenda-lane-head span{
  color:var(--cyan);
  font-size:12px;
  font-weight:900;
  white-space:nowrap;
}
.agenda-os-card{
  display:grid;
  gap:4px;
  min-height:74px;
  border:1px solid rgba(47,156,255,.24);
  border-left:3px solid var(--blue);
  border-radius:7px;
  margin-bottom:7px;
  padding:8px;
  background:rgba(11,35,63,.66);
}
.agenda-os-card b{
  font-size:12px;
}
.agenda-os-card span,
.agenda-os-card small{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:var(--muted);
  font-size:11px;
}

@media (max-width:1420px){
  .exec-cards{grid-template-columns:repeat(3,minmax(0,1fr))}
  .ceo-area-grid{grid-template-columns:repeat(2,minmax(240px,1fr))}
  .ceo-pdca-grid{grid-template-columns:repeat(2,minmax(180px,1fr))}
  .ceo-year-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
  .mini-kpis{grid-template-columns:none}
  .reneg-filterbar{grid-template-columns:repeat(4,minmax(0,1fr))}
  .bureau-search-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
  .bureau-op-grid{grid-template-columns:1fr}
  .agenda-config-grid{grid-template-columns:1fr}
  .agenda-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .scenario-grid{grid-template-columns:1fr}
  .agenda-map-controls{grid-template-columns:repeat(2,minmax(0,1fr))}
  .agenda-action-grid{grid-template-columns:1fr}
  .agenda-message-grid{grid-template-columns:repeat(2,minmax(220px,1fr))}
  .route-map-grid{grid-template-columns:1fr}
  .agenda-lanes{grid-template-columns:repeat(2,minmax(220px,1fr))}
  .churn-study-grid,.churn-action-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .workflow-filterbar{grid-template-columns:repeat(4,minmax(0,1fr))}
  .workflow-supervisor-grid{grid-template-columns:1fr}
  .workflow-routing-form{grid-template-columns:repeat(3,minmax(0,1fr))}
  .math-row,.math-row.compact-row{grid-template-columns:1fr 24px 1fr}
  .math-row .math-node:nth-of-type(7){grid-column:1/-1}
  .math-row.audit-row{grid-template-columns:minmax(150px,1fr) 28px minmax(150px,1fr)}
  .main-grid,.lower-grid,.valuation-grid{grid-template-columns:1fr}
  .city-agg-list{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:980px){
  .shell{grid-template-columns:1fr}
  .shell.sidebar-collapsed{grid-template-columns:1fr}
  .sidebar{position:relative;height:auto}
  .shell.sidebar-collapsed .sidebar{padding:14px 12px}
  .shell.sidebar-collapsed .brand{display:flex;justify-items:initial;gap:12px;padding:8px}
  .shell.sidebar-collapsed .brand-copy{display:block}
  .shell.sidebar-collapsed .sidebar-toggle{margin-left:auto;width:34px;height:34px}
  .shell.sidebar-collapsed .nav-group{
    height:auto;
    margin:14px 4px 7px;
    padding:0 4px 7px;
    border-bottom:1px solid var(--line-soft);
    color:#77d5ff;
    font-size:10px;
  }
  .shell.sidebar-collapsed .nav button{justify-content:flex-start;padding:0 10px}
  .shell.sidebar-collapsed .nav-label{display:inline}
  .nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 8px}
  .topbar,.period-row{display:grid}
  .topbar-tools{justify-content:flex-start;min-width:0}
  .region-filter{width:100%}
  .region-filter select{min-width:0;width:100%}
  .actions{justify-content:flex-start}
  .exec-cards,.kpis.compact{grid-template-columns:repeat(2,minmax(0,1fr))}
  .city-agg-summary,.city-agg-tabs{grid-template-columns:1fr}
  .city-agg-toolbar{grid-template-columns:1fr 1fr}
  .ceo-hero,.ceo-main-grid{grid-template-columns:1fr}
  .ceo-area-grid{grid-template-columns:1fr}
  .ceo-history-grid{grid-template-columns:1fr}
  .mini-kpis{
    grid-auto-flow:row;
    grid-auto-columns:auto;
    grid-template-columns:repeat(2,minmax(0,1fr));
    overflow-x:visible;
    padding-bottom:0;
  }
  .monthly-kpi-row{
    grid-template-columns:1fr;
  }
  .monthly-kpi-month{
    min-height:auto;
    display:block;
  }
  .mini-card strong{font-size:17px}
  .geo-filterbar,.period-filterbar,.projection-filterbar,.reneg-filterbar,.valuation-filterbar{grid-template-columns:1fr 1fr}
  .workflow-filterbar{grid-template-columns:1fr 1fr}
  .workflow-kanban{grid-auto-columns:minmax(320px,78vw)}
  .workflow-routing-form{grid-template-columns:1fr 1fr}
  .user-admin-grid{grid-template-columns:1fr}
  .user-create-form{grid-template-columns:1fr 1fr}
  .reneg-filterbar.dre-filterbar{grid-template-columns:1fr 1fr;max-width:none}
  .bureau-search-grid,.bureau-control-grid{grid-template-columns:1fr 1fr}
  .geo-filterbar .period-strip,.projection-filterbar .period-strip,.valuation-filterbar .period-strip{grid-column:1/-1}
  .sync-grid,.churn-grid,.geo-grid,.bairros-grid,.receita-grid{grid-template-columns:1fr}
  .churn-band-scale{grid-template-columns:repeat(2,minmax(0,1fr))}
  .agenda-lanes{grid-template-columns:1fr}
  .editor-grid{grid-template-columns:1fr 1fr}
  .wide-field{grid-column:1/-1}
  .gauges,.mrr-row{grid-template-columns:1fr}
  .math-row,.math-row.compact-row,.math-row.audit-row{grid-template-columns:1fr;max-width:none}
  .math-row .math-node:nth-of-type(7){grid-column:auto}
  .math-op{min-height:22px}
}
@media (max-width:640px){
  .main{padding:11px}
  .title h1{font-size:23px}
  .nav{grid-template-columns:1fr}
  .region-filter{white-space:normal}
  .exec-cards,.kpis.compact,.mini-kpis{grid-template-columns:1fr}
  .churn-study-grid,.churn-action-grid,.churn-band-scale{grid-template-columns:1fr}
  .city-agg-summary,.city-agg-tabs,.city-agg-toolbar,.city-agg-list{grid-template-columns:1fr}
  .mini-kpis{grid-auto-flow:row}
  .monthly-kpi-month strong{font-size:16px}
  .mini-card strong{font-size:18px}
  .ceo-pdca-grid{grid-template-columns:1fr}
  .ceo-indicators{grid-template-columns:1fr}
  .ceo-year-metrics,.ceo-year-lists{grid-template-columns:1fr}
  .period-strip{width:100%;overflow:auto}
  .period-strip button{min-width:72px}
  .geo-filterbar,.period-filterbar,.projection-filterbar,.reneg-filterbar,.valuation-filterbar{grid-template-columns:1fr}
  .workflow-filterbar{grid-template-columns:1fr}
  .workflow-kanban{grid-auto-columns:minmax(286px,86vw)}
  .workflow-card-meta{grid-template-columns:1fr}
  .workflow-card-meta div:nth-child(3){grid-column:auto}
  .workflow-routing-form,.workflow-routing-list article{grid-template-columns:1fr}
  .user-create-form{grid-template-columns:1fr}
  .reneg-filterbar.dre-filterbar{grid-template-columns:1fr}
  .valuation-multipliers{grid-template-columns:1fr}
  .bureau-search-grid,.bureau-control-grid{grid-template-columns:1fr}
  .geo-filterbar .period-strip,.projection-filterbar .period-strip,.valuation-filterbar .period-strip{grid-column:auto}
  .donut-wrap{grid-template-columns:1fr}
  .donut{margin:auto}
  .search{min-width:100%;width:100%}
  .actions .btn,.actions .select{width:100%}
  .editor-grid{grid-template-columns:1fr}
  .wide-field{grid-column:auto}
  .route-map svg{height:360px}
  .route-map{min-height:360px}
  .leaflet-route-map,.leaflet-route-map > span{min-height:360px}
  .agenda-form-grid{grid-template-columns:1fr}
  .agenda-map-controls{grid-template-columns:1fr}
  .agenda-message-grid{grid-template-columns:1fr}
  .route-metrics{grid-template-columns:1fr}
}

.assistant-panel{
  position:fixed;
  top:0;
  right:0;
  z-index:60;
  width:min(430px,calc(100vw - 18px));
  height:100vh;
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto auto;
  background:linear-gradient(180deg,rgba(8,28,51,.98),rgba(4,14,26,.98));
  border-left:1px solid rgba(119,213,255,.34);
  box-shadow:-24px 0 70px rgba(0,0,0,.34);
  transform:translateX(105%);
  transition:transform .18s ease;
}
.assistant-panel.open{transform:translateX(0)}
.assistant-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 14px 12px;
  border-bottom:1px solid var(--line-soft);
}
.assistant-head strong{
  display:block;
  font-size:16px;
}
.assistant-head span{
  display:block;
  margin-top:2px;
  color:#9ec9f0;
  font-size:12px;
}
.assistant-close{
  width:32px;
  height:32px;
  border:1px solid rgba(119,213,255,.38);
  border-radius:7px;
  background:#0a213b;
  color:#fff;
  font-weight:900;
}
.assistant-messages{
  min-height:0;
  overflow:auto;
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.assistant-msg{
  max-width:92%;
  border:1px solid rgba(119,213,255,.22);
  border-radius:8px;
  padding:10px 11px;
  background:rgba(12,36,63,.82);
}
.assistant-msg.user{
  align-self:flex-end;
  border-color:rgba(47,156,255,.45);
  background:rgba(18,85,150,.78);
}
.assistant-msg.assistant{
  align-self:flex-start;
}
.assistant-msg p{
  margin:0;
  color:#eef8ff;
  font-size:13px;
  line-height:1.45;
}
.assistant-cards{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:6px;
  margin-top:10px;
}
.assistant-cards span{
  min-width:0;
  border:1px solid rgba(119,213,255,.2);
  border-radius:6px;
  padding:7px;
  background:rgba(4,18,32,.72);
  color:#eaf6ff;
  font-size:12px;
}
.assistant-cards b{
  display:block;
  margin-bottom:3px;
  color:#8ccfff;
  font-size:10px;
  text-transform:uppercase;
}
.assistant-suggestions{
  display:flex;
  gap:6px;
  padding:10px 12px;
  border-top:1px solid var(--line-soft);
  overflow:auto;
}
.assistant-suggestions button{
  flex:0 0 auto;
  border:1px solid rgba(119,213,255,.32);
  border-radius:999px;
  background:#09213a;
  color:#cfeaff;
  padding:7px 10px;
  font-size:12px;
}
.assistant-form{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
  padding:12px;
  border-top:1px solid var(--line-soft);
}
.assistant-form input{
  min-width:0;
  border:1px solid rgba(119,213,255,.35);
  border-radius:7px;
  background:#06182b;
  color:#fff;
  padding:10px 11px;
}
.assistant-form button{
  border:1px solid rgba(47,156,255,.7);
  border-radius:7px;
  background:linear-gradient(180deg,#2f9cff,#1268e4);
  color:#fff;
  padding:0 13px;
  font-weight:800;
}

@media (max-width:720px){
  .assistant-panel{
    width:100vw;
  }
  .assistant-cards{
    grid-template-columns:1fr;
  }
}

.passivos-page{
  display:flex;
  flex-direction:column;
  gap:14px;
}
.passivos-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  border-bottom:1px solid var(--line-soft);
  padding-bottom:8px;
}
.passivos-tabs button{
  border:1px solid var(--line-soft);
  border-radius:7px;
  background:var(--panel-soft);
  color:var(--text);
  padding:8px 10px;
  font-weight:800;
  font-size:12px;
}
.passivos-tabs button.active{
  border-color:rgba(47,156,255,.65);
  background:#0d3558;
  color:#fff;
}
.passivos-toolbar{
  justify-content:flex-start;
}
.passivo-form-grid{
  grid-template-columns:repeat(4,minmax(170px,1fr));
}
.strategy-callout{
  border:1px solid var(--line-soft);
  border-radius:8px;
  background:rgba(7,31,52,.72);
  padding:14px;
}
.strategy-callout strong{
  display:block;
  color:#fff;
  font-size:15px;
  margin-bottom:6px;
}
.strategy-callout p{
  margin:0;
  color:var(--muted);
  line-height:1.45;
}
.strategy-metrics{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:12px;
}
.strategy-metrics span{
  border:1px solid rgba(119,213,255,.22);
  border-radius:7px;
  padding:7px 9px;
  background:rgba(4,18,32,.68);
  color:#e9f7ff;
  font-weight:800;
  font-size:12px;
}
.passivos-creditor-matrix table{
  width:max-content;
  min-width:100%;
}
.passivos-creditor-matrix th,
.passivos-creditor-matrix td{
  text-align:right;
  min-width:130px;
}
.passivos-creditor-matrix th:first-child,
.passivos-creditor-matrix td:first-child{
  position:sticky;
  left:0;
  z-index:2;
  min-width:70px;
  text-align:left;
  background:#0b2744;
}
.passivos-creditor-matrix th:nth-child(2),
.passivos-creditor-matrix td:nth-child(2){
  position:sticky;
  left:70px;
  z-index:2;
  min-width:110px;
  text-align:left;
  background:#0b2744;
}
.passivos-creditor-matrix th{
  z-index:3;
}
.ma-report-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin-bottom:14px;
}
.passivos-chart{
  border-top:1px solid var(--line-soft);
  margin-top:14px;
  padding-top:14px;
}
.passivos-chart h3{
  margin:0 0 10px;
  color:#fff;
  font-size:14px;
}
.passivos-bar-row{
  display:grid;
  grid-template-columns:minmax(190px,1.1fr) minmax(180px,2fr) minmax(130px,.6fr);
  gap:10px;
  align-items:center;
  margin:7px 0;
}
.passivos-bar-row span{
  color:var(--muted);
  font-size:12px;
}
.passivos-bar-row div{
  height:12px;
  border-radius:999px;
  background:rgba(255,255,255,.08);
  overflow:hidden;
}
.passivos-bar-row i{
  display:block;
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg,#2f9cff,#2ed3a2);
}
.passivos-bar-row strong{
  color:#fff;
  font-size:12px;
  text-align:right;
}
.equipment-tree{
  display:grid;
  gap:12px;
}
.equipment-node{
  border:1px solid var(--line-soft);
  border-radius:8px;
  background:rgba(8,30,52,.58);
  overflow:hidden;
}
.equipment-node summary{
  display:grid;
  grid-template-columns:22px minmax(240px,1fr) auto auto;
  gap:12px;
  align-items:center;
  min-height:64px;
  padding:12px 14px;
  cursor:pointer;
  list-style:none;
}
.equipment-node summary::-webkit-details-marker{
  display:none;
}
.equipment-dot{
  width:12px;
  height:12px;
  border-radius:50%;
  background:#2f9cff;
  box-shadow:0 0 0 5px rgba(47,156,255,.14);
}
.equipment-main strong,
.equipment-port-name strong{
  display:block;
  color:#fff;
  font-size:14px;
  line-height:1.25;
}
.equipment-main small,
.equipment-port-name small,
.equipment-port-values small{
  display:block;
  color:var(--muted);
  font-size:11px;
  line-height:1.35;
  margin-top:3px;
}
.equipment-pill,
.equipment-speed{
  border:1px solid var(--line-soft);
  border-radius:999px;
  padding:6px 10px;
  color:#dfefff;
  background:rgba(255,255,255,.05);
  font-size:12px;
  white-space:nowrap;
}
.equipment-speed{
  color:#fff;
  font-weight:800;
}
.equipment-branches{
  border-top:1px solid var(--line-soft);
  padding:8px 14px 12px 34px;
}
.equipment-port{
  position:relative;
  padding:9px 0 9px 18px;
  border-left:1px solid rgba(143,179,217,.25);
}
.equipment-port-line{
  display:grid;
  grid-template-columns:18px minmax(260px,1fr) minmax(220px,.5fr);
  gap:10px;
  align-items:center;
}
.equipment-branch{
  width:18px;
  height:1px;
  background:rgba(143,179,217,.35);
}
.equipment-port-values{
  text-align:right;
}
.equipment-port-values b{
  display:block;
  color:#fff;
  font-size:13px;
}
.equipment-bar{
  margin:7px 0 0 28px;
  height:7px;
  border-radius:999px;
  background:rgba(255,255,255,.08);
  overflow:hidden;
}
.equipment-bar i{
  display:block;
  height:100%;
  border-radius:999px;
  background:#2f9cff;
}
.equipment-bar.ok i{ background:#16d39a; }
.equipment-bar.warn i{ background:#ffc928; }
.equipment-bar.danger i{ background:#ff3b75; }
.equipment-bar.muted i{ background:#74a3d7; }

.ma-doc-page{
  display:grid;
  gap:12px;
}
.ma-doc-summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.ma-doc-summary h2{
  margin:0 0 4px;
}
.ma-doc-flags{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.ma-doc-flags span{
  border:1px solid rgba(47,156,255,.35);
  border-radius:6px;
  padding:7px 10px;
  color:#b9d9ff;
  background:rgba(47,156,255,.08);
  font-size:12px;
  font-weight:700;
}
.ma-doc-grid{
  display:grid;
  grid-template-columns:minmax(310px,390px) minmax(0,1fr);
  gap:12px;
  align-items:start;
}
.ma-doc-form{
  position:sticky;
  top:76px;
}
.ma-doc-form-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:9px;
}
.ma-doc-field{
  display:grid;
  gap:5px;
}
.ma-doc-field span{
  color:#b9d9ff;
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
}
.ma-doc-field textarea.select{
  min-height:72px;
  resize:vertical;
  line-height:1.35;
}
.ma-doc-values-head{
  margin-top:14px;
}
.ma-doc-viewer{
  min-width:0;
}
.ma-doc-viewer .panel-head{
  align-items:center;
}
.ma-doc-preview{
  background:#f9fbff;
  color:#151b22;
  border:1px solid rgba(255,255,255,.18);
  border-radius:8px;
  padding:34px 42px;
  min-height:720px;
  max-height:calc(100vh - 220px);
  overflow:auto;
  box-shadow:0 16px 32px rgba(0,0,0,.22);
}
.ma-doc-preview h1{
  color:#111827;
  text-align:center;
  font-size:18px;
  margin:0 0 10px;
  letter-spacing:0;
}
.ma-doc-preview h2{
  color:#1f2937;
  text-align:center;
  font-size:14px;
  margin:0 0 22px;
  letter-spacing:0;
}
.ma-doc-preview h3{
  color:#111827;
  font-size:13px;
  margin:22px 0 8px;
  text-transform:uppercase;
  letter-spacing:0;
}
.ma-doc-preview p{
  color:#1f2937;
  font-size:12px;
  line-height:1.48;
  margin:0 0 10px;
  text-align:justify;
}
.ma-doc-preview .ma-doc-clause{
  margin-left:12px;
}
.ma-doc-preview .ma-doc-signature{
  white-space:pre-wrap;
  text-align:left;
  margin-top:18px;
}

@media (max-width:980px){
  .tv-filterbar,
  .tv-admin-filterbar,
  .tv-sector-hero,
  .tv-two-columns,
  .tv-admin-sector-head{
    grid-template-columns:1fr;
  }
  .tv-admin-grid,
  .tv-admin-summary{
    grid-template-columns:1fr;
  }
  .tv-kpi-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .tv-admin-kpis{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .tv-pdca-steps{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .passivo-form-grid,
  .ma-report-grid,
  .ma-doc-grid{
    grid-template-columns:1fr;
  }
  .ma-doc-form{
    position:static;
  }
  .ma-doc-summary{
    align-items:flex-start;
    flex-direction:column;
  }
  .ma-doc-preview{
    padding:24px 20px;
    max-height:none;
  }
  .passivos-bar-row{
    grid-template-columns:1fr;
  }
  .equipment-node summary,
  .equipment-port-line{
    grid-template-columns:1fr;
  }
  .equipment-port-values{
    text-align:left;
  }
  .passivos-bar-row strong{
    text-align:left;
  }
}

@media (max-width:640px){
  .tv-kpi-grid,
  .tv-pdca-steps,
  .tv-admin-kpis,
  .tv-admin-pdca{
    grid-template-columns:1fr;
  }
  .tv-sector-hero h2{
    font-size:32px;
  }
  .tv-kpi-card{
    min-height:auto;
  }
}
