:root{
  --pstg-blue: #0B5ED7;
  --pstg-blue-2: #0A4FB7;
  --pstg-bg: #F5F8FF;
}
.pstg-bg{ background: radial-gradient(1200px 600px at 20% -10%, rgba(11,94,215,.18), transparent 60%), var(--pstg-bg); min-height: 100vh; }
.pstg-navbar{ background: linear-gradient(90deg, var(--pstg-blue-2), var(--pstg-blue)); }
.pstg-card{ border: 0; border-radius: 18px; box-shadow: 0 10px 30px rgba(10,30,70,.10); }
.pstg-btn{ border-radius: 12px; font-weight: 600; }
.pstg-logo{
  width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(135deg, #ffffff, rgba(255,255,255,.35));
  position: relative; overflow: hidden;
}
.pstg-logo:before{
  content: "";
  position: absolute; inset: -40%;
  background: radial-gradient(circle at 30% 30%, rgba(11,94,215,.8), rgba(11,94,215,0));
  transform: rotate(25deg);
}

.pstg-loading{
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(15, 23, 42, .35);
  backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  cursor: wait;
}
.pstg-loading-card{
  background: #fff;
  border-radius: 16px;
  padding: 18px 22px;
  box-shadow: 0 10px 30px rgba(10,30,70,.18);
  min-width: 220px;
  text-align: center;
}


/* CSP-safe width helpers (0..100) */
.pstg-w-0{width:0%;}
.pstg-w-1{width:1%;}
.pstg-w-2{width:2%;}
.pstg-w-3{width:3%;}
.pstg-w-4{width:4%;}
.pstg-w-5{width:5%;}
.pstg-w-6{width:6%;}
.pstg-w-7{width:7%;}
.pstg-w-8{width:8%;}
.pstg-w-9{width:9%;}
.pstg-w-10{width:10%;}
.pstg-w-11{width:11%;}
.pstg-w-12{width:12%;}
.pstg-w-13{width:13%;}
.pstg-w-14{width:14%;}
.pstg-w-15{width:15%;}
.pstg-w-16{width:16%;}
.pstg-w-17{width:17%;}
.pstg-w-18{width:18%;}
.pstg-w-19{width:19%;}
.pstg-w-20{width:20%;}
.pstg-w-21{width:21%;}
.pstg-w-22{width:22%;}
.pstg-w-23{width:23%;}
.pstg-w-24{width:24%;}
.pstg-w-25{width:25%;}
.pstg-w-26{width:26%;}
.pstg-w-27{width:27%;}
.pstg-w-28{width:28%;}
.pstg-w-29{width:29%;}
.pstg-w-30{width:30%;}
.pstg-w-31{width:31%;}
.pstg-w-32{width:32%;}
.pstg-w-33{width:33%;}
.pstg-w-34{width:34%;}
.pstg-w-35{width:35%;}
.pstg-w-36{width:36%;}
.pstg-w-37{width:37%;}
.pstg-w-38{width:38%;}
.pstg-w-39{width:39%;}
.pstg-w-40{width:40%;}
.pstg-w-41{width:41%;}
.pstg-w-42{width:42%;}
.pstg-w-43{width:43%;}
.pstg-w-44{width:44%;}
.pstg-w-45{width:45%;}
.pstg-w-46{width:46%;}
.pstg-w-47{width:47%;}
.pstg-w-48{width:48%;}
.pstg-w-49{width:49%;}
.pstg-w-50{width:50%;}
.pstg-w-51{width:51%;}
.pstg-w-52{width:52%;}
.pstg-w-53{width:53%;}
.pstg-w-54{width:54%;}
.pstg-w-55{width:55%;}
.pstg-w-56{width:56%;}
.pstg-w-57{width:57%;}
.pstg-w-58{width:58%;}
.pstg-w-59{width:59%;}
.pstg-w-60{width:60%;}
.pstg-w-61{width:61%;}
.pstg-w-62{width:62%;}
.pstg-w-63{width:63%;}
.pstg-w-64{width:64%;}
.pstg-w-65{width:65%;}
.pstg-w-66{width:66%;}
.pstg-w-67{width:67%;}
.pstg-w-68{width:68%;}
.pstg-w-69{width:69%;}
.pstg-w-70{width:70%;}
.pstg-w-71{width:71%;}
.pstg-w-72{width:72%;}
.pstg-w-73{width:73%;}
.pstg-w-74{width:74%;}
.pstg-w-75{width:75%;}
.pstg-w-76{width:76%;}
.pstg-w-77{width:77%;}
.pstg-w-78{width:78%;}
.pstg-w-79{width:79%;}
.pstg-w-80{width:80%;}
.pstg-w-81{width:81%;}
.pstg-w-82{width:82%;}
.pstg-w-83{width:83%;}
.pstg-w-84{width:84%;}
.pstg-w-85{width:85%;}
.pstg-w-86{width:86%;}
.pstg-w-87{width:87%;}
.pstg-w-88{width:88%;}
.pstg-w-89{width:89%;}
.pstg-w-90{width:90%;}
.pstg-w-91{width:91%;}
.pstg-w-92{width:92%;}
.pstg-w-93{width:93%;}
.pstg-w-94{width:94%;}
.pstg-w-95{width:95%;}
.pstg-w-96{width:96%;}
.pstg-w-97{width:97%;}
.pstg-w-98{width:98%;}
.pstg-w-99{width:99%;}
.pstg-w-100{width:100%;}
.pstg-progress{height:10px;}

.pstg-quotas-table th, .pstg-quotas-table td{ vertical-align: middle; }
.pstg-sticky-col{
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 2;
  min-width: 260px;
}
.pstg-quotas-table thead .pstg-sticky-col{ z-index: 3; }
.pstg-quota-cell{ min-width: 130px; }

.pstg-minw-220{min-width:220px;}
.pstg-maxw-320{max-width:320px;}
.pstg-maxw-130{max-width:130px;}
.pstg-w-120{width:120px;}
.pstg-w-140{width:140px;}

.pstg-w-160{width:160px;}

.pstg-minw-240{min-width:240px;}

.pstg-w-110px{width:110px;}

.pstg-w-220px{width:220px;}

.table-responsive:has(.pstg-quotas-table) { height: 100vh; }



.pstg-sticky-head thead th{position:sticky;top:0;background:#fff;z-index:2;}

.pstg-quotas-scroll{max-height:70vh;overflow:auto;}

.text-right { text-align: right; }
.pstg-compact-filters{margin-left:auto;}
.pstg-minw-140{min-width:140px;}
.pstg-minw-160{min-width:160px;}

.pstg-card-updated{
  box-shadow: 0 0 0 2px rgba(11,94,215,.15), 0 18px 38px rgba(10,30,70,.16);
}
.pstg-card-updated .display-6{ color: var(--pstg-blue-2); }
.pstg-badge-updated{
  background: rgba(11,94,215,.08);
  color: var(--pstg-blue-2);
  border: 1px solid rgba(11,94,215,.18);
}

.pstg-sector-map-wrap{
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(10,30,70,.08);
  background: #eef3ff;
}
.pstg-sector-map{
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 720 / 380;
}
.pstg-sector-map-bg{ fill: #eef3ff; }
.pstg-sector-polygon{
  fill: rgba(11,94,215,.14);
  stroke: rgba(11,94,215,.95);
  stroke-width: 2;
}
.pstg-sector-point{
  fill: #dc3545;
  stroke: #fff;
  stroke-width: 2;
}
.pstg-sector-point-label{
  fill: #0f172a;
  font-size: 12px;
  font-weight: 600;
  paint-order: stroke;
  stroke: rgba(255,255,255,.95);
  stroke-width: 3px;
  stroke-linejoin: round;
}

.pstg-kpi-label{
  color:#64748b;
  font-size:.78rem;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.pstg-kpi-value{
  font-size:1.9rem;
  font-weight:700;
  line-height:1.1;
  margin:.35rem 0;
}
.pstg-inline-metric{
  border:1px solid rgba(10,30,70,.08);
  border-radius:14px;
  padding:12px 14px;
  background:rgba(255,255,255,.55);
  height:100%;
}
.pstg-status-note{
  border-radius:14px;
  background:rgba(11,94,215,.06);
  border:1px solid rgba(11,94,215,.12);
  padding:12px 14px;
  color:#334155;
}
.pstg-empty-state{
  border:1px dashed rgba(10,30,70,.15);
  border-radius:14px;
  padding:16px;
  color:#64748b;
  background:rgba(255,255,255,.55);
}
.pstg-list-stack{
  display:grid;
  gap:.9rem;
}
.pstg-list-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) 86px;
  gap:.8rem;
  align-items:center;
}
.pstg-svg-chart{
  width:100%;
  height:auto;
  display:block;
}
.pstg-svg-axis{
  stroke:rgba(10,30,70,.22);
  stroke-width:1.2;
}
.pstg-svg-grid{
  stroke:rgba(10,30,70,.09);
  stroke-width:1;
}
.pstg-svg-bar-total{
  fill:rgba(11,94,215,.20);
}
.pstg-svg-bar-completed{
  fill:rgba(11,94,215,.95);
}
.pstg-svg-label{
  fill:#64748b;
  font-size:11px;
}
.pstg-svg-value{
  fill:#0f172a;
  font-size:12px;
  font-weight:700;
  paint-order:stroke;
  stroke:#fff;
  stroke-width:4px;
  stroke-linejoin:round;
}
.pstg-map-kpi{
  border:1px solid rgba(10,30,70,.08);
  border-radius:14px;
  padding:12px 14px;
  background:#fff;
  height:100%;
}

.pstg-section-nav{
  position: sticky;
  top: 76px;
  z-index: 10;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
}
.pstg-collapse-card{ overflow: hidden; }
.pstg-collapse-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
  padding:14px 16px;
  border-bottom:1px solid rgba(10,30,70,.07);
  background:rgba(255,255,255,.70);
}
.pstg-collapse-title{
  appearance:none;
  border:0;
  background:transparent;
  display:flex;
  align-items:center;
  gap:.75rem;
  padding:0;
  text-align:left;
  color:#0f172a;
  width:100%;
}
.pstg-collapse-title:hover .fw-semibold{ color:var(--pstg-blue-2); }
.pstg-collapse-chevron{
  width:28px;
  height:28px;
  border-radius:10px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:rgba(11,94,215,.08);
  color:var(--pstg-blue-2);
  font-size:.95rem;
  flex:0 0 auto;
}
.pstg-collapse-title[aria-expanded="false"] .pstg-collapse-chevron{ transform:rotate(-90deg); }
.pstg-collapse-body{ padding:16px; }

/* v4.6.20 - Setores / geografia */
.pstg-sector-point-outside { fill: #dc3545; stroke: #842029; }
.pstg-sector-point-tolerance { fill: #ffc107; stroke: #997404; }
.pstg-sector-table-muted { opacity: .72; }
.pstg-minw-180 { min-width: 180px; }


/* Floating dashboard alerts */
.pstg-floating-alerts{
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1060;
  width: min(420px, calc(100vw - 32px));
}
.pstg-floating-alerts-card{
  border: 1px solid rgba(10,30,70,.08);
  box-shadow: 0 20px 50px rgba(15,23,42,.22);
}
.pstg-floating-alerts-list{
  display: grid;
  gap: .55rem;
  max-height: min(54vh, 430px);
  overflow: auto;
  padding-right: 2px;
}
.pstg-floating-alert-item{
  border: 1px solid rgba(10,30,70,.08);
  border-radius: 14px;
  padding: .65rem .75rem;
  background: #fff;
}
.pstg-floating-alert-item:hover{
  box-shadow: 0 10px 22px rgba(10,30,70,.10);
}
.pstg-alert-danger{ background: #f8d7da; border-color: #f1aeb5; }
.pstg-alert-warning{ background: #fff3cd; border-color: #ffe69c; }
.pstg-alert-info{ background: #cff4fc; border-color: #9eeaf9; }
@media (max-width: 575.98px){
  .pstg-floating-alerts{
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
  }
}

/* v4.7.0 - layout moderno, sidebar e login */
:root{
  --pstg-primary:#5b46e8;
  --pstg-primary-2:#4432c7;
  --pstg-navy:#211b58;
  --pstg-navy-2:#30277b;
  --pstg-surface:#ffffff;
  --pstg-page:#f5f7fb;
  --pstg-text:#182033;
  --pstg-muted:#748096;
  --pstg-border:#e7ebf2;
  --pstg-sidebar-w:250px;
  --pstg-topbar-h:72px;
  --pstg-blue:var(--pstg-primary);
  --pstg-blue-2:var(--pstg-primary-2);
}
html{scroll-behavior:smooth;}
body{color:var(--pstg-text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;}
.pstg-app-body{background:var(--pstg-page);min-height:100vh;}
.pstg-app-shell{min-height:100vh;display:flex;}
.pstg-sidebar{
  position:fixed;inset:0 auto 0 0;width:var(--pstg-sidebar-w);z-index:1045;
  background:linear-gradient(180deg,#211b58 0%,#2b236d 55%,#241d60 100%);
  color:#fff;display:flex;flex-direction:column;box-shadow:8px 0 30px rgba(29,25,79,.12);
}
.pstg-brand{display:flex;align-items:center;gap:.75rem;color:#fff;text-decoration:none;padding:18px 18px 16px;border-bottom:1px solid rgba(255,255,255,.09);}
.pstg-brand:hover{color:#fff;}
.pstg-brand-mark,.pstg-login-logo{width:42px;height:42px;display:inline-flex;align-items:center;justify-content:center;border-radius:12px;background:linear-gradient(145deg,#fff,#dcd8ff);color:var(--pstg-primary);box-shadow:0 8px 20px rgba(0,0,0,.12);flex:0 0 auto;}
.pstg-brand-mark svg,.pstg-login-logo svg{width:24px;height:24px;fill:currentColor;}
.pstg-brand strong{display:block;line-height:1.1;font-size:1rem;}.pstg-brand small{display:block;color:rgba(255,255,255,.55);font-size:.72rem;margin-top:.18rem;}
.pstg-side-nav{padding:12px 10px 18px;overflow-y:auto;flex:1;}
.pstg-nav-section{font-size:.68rem;text-transform:uppercase;letter-spacing:.11em;color:rgba(255,255,255,.4);padding:18px 12px 7px;}
.pstg-nav-link{display:flex;align-items:center;gap:.8rem;color:rgba(255,255,255,.72);text-decoration:none;padding:.72rem .8rem;border-radius:11px;margin:2px 0;font-weight:600;font-size:.91rem;transition:.18s ease;}
.pstg-nav-link svg{width:20px;height:20px;fill:currentColor;flex:0 0 auto;}
.pstg-nav-link:hover{color:#fff;background:rgba(255,255,255,.08);transform:translateX(2px);}
.pstg-nav-link.active{color:#fff;background:linear-gradient(90deg,rgba(129,111,255,.42),rgba(129,111,255,.12));box-shadow:inset 3px 0 0 #a99cff;}
.pstg-sidebar-user{display:flex;align-items:center;gap:.7rem;padding:15px 14px;border-top:1px solid rgba(255,255,255,.09);background:rgba(0,0,0,.08);}
.pstg-user-avatar{width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#e6e2ff;color:var(--pstg-primary-2);font-weight:800;flex:0 0 auto;}
.pstg-sidebar-logout{color:rgba(255,255,255,.65);display:inline-flex;padding:.4rem;border-radius:9px;}.pstg-sidebar-logout:hover{color:#fff;background:rgba(255,255,255,.08);}.pstg-sidebar-logout svg{width:19px;height:19px;fill:currentColor;}
.pstg-main-shell{margin-left:var(--pstg-sidebar-w);width:calc(100% - var(--pstg-sidebar-w));min-height:100vh;}
.pstg-topbar{height:var(--pstg-topbar-h);position:sticky;top:0;z-index:1030;display:flex;align-items:center;gap:1rem;padding:0 26px;background:rgba(255,255,255,.94);backdrop-filter:blur(12px);border-bottom:1px solid var(--pstg-border);box-shadow:0 4px 16px rgba(20,29,55,.035);}
.pstg-topbar-eyebrow{font-size:.67rem;text-transform:uppercase;letter-spacing:.1em;color:var(--pstg-muted);line-height:1.1;}.pstg-topbar-title{font-weight:750;font-size:1.02rem;}
.pstg-topbar-user{display:flex;align-items:center;gap:.65rem;max-width:260px;}.pstg-topbar-role{font-size:.7rem;color:var(--pstg-muted);text-transform:capitalize;}
.pstg-sidebar-toggle{display:none;border:0;background:transparent;width:38px;height:38px;border-radius:10px;padding:8px;}.pstg-sidebar-toggle:hover{background:#f0f2f8;}.pstg-sidebar-toggle span{display:block;height:2px;background:#3c4560;margin:4px 0;border-radius:2px;}
.pstg-sidebar-backdrop{display:none;position:fixed;inset:0;z-index:1040;background:rgba(20,20,45,.45);border:0;}
.pstg-content{padding:24px 28px 38px;max-width:1680px;width:100%;margin:0 auto;}
.pstg-card{border:1px solid rgba(229,233,242,.9);border-radius:16px;box-shadow:0 8px 24px rgba(28,38,70,.065);background:#fff;}
.pstg-card:hover{box-shadow:0 12px 30px rgba(28,38,70,.09);}
.pstg-btn{border-radius:9px;font-weight:650;}
.btn-primary{background:linear-gradient(90deg,var(--pstg-primary),#6f54ed);border-color:var(--pstg-primary);}.btn-primary:hover{background:var(--pstg-primary-2);border-color:var(--pstg-primary-2);}
.btn-outline-primary{color:var(--pstg-primary);border-color:rgba(91,70,232,.45);}.btn-outline-primary:hover{background:var(--pstg-primary);border-color:var(--pstg-primary);}
.form-control,.form-select{border-color:#dfe4ee;border-radius:10px;}.form-control:focus,.form-select:focus{border-color:#8f7ef0;box-shadow:0 0 0 .2rem rgba(91,70,232,.12);}
.text-muted{color:var(--pstg-muted)!important;}

.pstg-login-body{min-height:100vh;background:radial-gradient(circle at 75% 20%,rgba(111,84,237,.58),transparent 38%),linear-gradient(135deg,#1d174b 0%,#2d256e 55%,#4c38c7 100%);}
.pstg-login-shell{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px;position:relative;}
.pstg-login-shell>.alert{position:fixed;top:18px;left:50%;transform:translateX(-50%);z-index:20;max-width:min(520px,calc(100vw - 32px));}
.pstg-login-card{width:min(390px,100%);background:#fff;border-radius:20px;padding:32px;box-shadow:0 28px 70px rgba(7,6,28,.28);}
.pstg-login-brand{text-align:center;}.pstg-login-logo{margin:0 auto 14px;width:54px;height:54px;border-radius:15px;background:#ebe8ff;box-shadow:none;}.pstg-login-logo svg{width:30px;height:30px;}
.pstg-input-icon{position:relative;}.pstg-input-icon>span{position:absolute;left:0;top:0;bottom:0;width:42px;display:flex;align-items:center;justify-content:center;color:#7f889b;border-right:1px solid #dfe4ee;z-index:2;}.pstg-input-icon .form-control{padding-left:52px;min-height:46px;background:#f6f8fc;}

.pstg-summary-icon{width:46px;height:46px;border-radius:13px;display:flex;align-items:center;justify-content:center;font-size:1.25rem;font-weight:800;}.pstg-summary-icon-primary{background:#ece8ff;color:#5b46e8;}.pstg-summary-icon-success{background:#dcf8e9;color:#159c62;}.pstg-summary-icon-warning{background:#fff3cd;color:#b77900;}.pstg-summary-icon-info{background:#dff4ff;color:#1185b5;}
.pstg-summary-card{display:flex;align-items:center;gap:1rem;}.pstg-summary-card .display-6{font-size:2rem;line-height:1;margin:0;}
.pstg-dashboard-meta{display:flex;align-items:center;gap:.5rem;color:var(--pstg-muted);font-size:.78rem;}.pstg-dashboard-dot{width:7px;height:7px;border-radius:50%;background:#2fbd7f;display:inline-block;}.pstg-dashboard-dot.is-stale{background:#f0a329;}
.pstg-card-link{display:block;height:100%;}.pstg-project-card{transition:transform .18s ease,box-shadow .18s ease;}.pstg-project-card:hover{transform:translateY(-2px);}

.pstg-leaflet-map{height:min(58vh,560px);min-height:380px;border-radius:14px;overflow:hidden;border:1px solid var(--pstg-border);background:#eef2f7;}
.pstg-map-toolbar{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;justify-content:space-between;margin-bottom:.7rem;}
.pstg-map-legend{display:flex;flex-wrap:wrap;gap:.75rem;font-size:.78rem;color:var(--pstg-muted);}.pstg-map-legend span{display:inline-flex;align-items:center;gap:.35rem;}.pstg-map-legend i{width:10px;height:10px;border-radius:50%;display:inline-block;}
.pstg-map-popup{min-width:210px;font-size:.82rem;}.pstg-map-popup strong{display:block;font-size:.9rem;margin-bottom:.25rem;}.pstg-map-popup-row{display:grid;grid-template-columns:74px 1fr;gap:.35rem;margin:.12rem 0;}.pstg-map-popup-row span:first-child{color:#6d778a;}
.pstg-sector-outside-row{background:#fff1f2!important;}.pstg-sector-tolerance-row{background:#fff9e8!important;}
.pstg-kpi-strip{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:.75rem;}

@media(max-width:991.98px){
  .pstg-sidebar{transform:translateX(-102%);transition:transform .22s ease;}
  .pstg-main-shell{margin-left:0;width:100%;}
  .pstg-sidebar-toggle{display:block;}
  .pstg-sidebar-open .pstg-sidebar{transform:translateX(0);}
  .pstg-sidebar-open .pstg-sidebar-backdrop{display:block;}
  .pstg-content{padding:18px 16px 30px;}
  .pstg-topbar{padding:0 16px;}
}
@media(max-width:575.98px){.pstg-login-card{padding:24px 20px;}.pstg-topbar{height:64px}.pstg-leaflet-map{min-height:330px}.pstg-content{padding:14px 12px 28px}.pstg-summary-card .display-6{font-size:1.7rem}}

/* v4.7.0 - componentes executivos e Setores interativo */
.pstg-page-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:1rem;flex-wrap:wrap}
.pstg-page-kicker{font-size:.7rem;letter-spacing:.12em;text-transform:uppercase;color:var(--pstg-primary);font-weight:800;margin-bottom:.25rem}
.pstg-card-header{background:#fff;border-bottom:1px solid var(--pstg-border);padding:14px 16px;border-radius:16px 16px 0 0!important}
.pstg-stat-card{height:100%;min-height:92px;display:flex;align-items:center;gap:.85rem;padding:15px 16px;border:1px solid var(--pstg-border);border-radius:15px;background:#fff;box-shadow:0 7px 20px rgba(28,38,70,.055)}
.pstg-stat-icon{width:42px;height:42px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:1.2rem;font-weight:800;flex:0 0 auto}
.pstg-icon-purple{background:#ece8ff;color:#5b46e8}.pstg-icon-blue{background:#e2edff;color:#3376e8}.pstg-icon-green{background:#dcf8e9;color:#159c62}.pstg-icon-amber{background:#fff1cb;color:#b77900}.pstg-icon-cyan{background:#ddf7f5;color:#0c958b}
.pstg-stat-value{font-size:1.65rem;line-height:1;font-weight:800;color:#111827}.pstg-stat-label{font-size:.76rem;color:var(--pstg-muted);margin-top:.28rem;white-space:nowrap}
.pstg-data-table thead th{font-size:.72rem;text-transform:uppercase;letter-spacing:.045em;color:#6e788d;background:#f8f9fc;border-bottom-color:var(--pstg-border);white-space:nowrap}
.pstg-data-table td{border-bottom-color:#edf0f5;padding-top:.78rem;padding-bottom:.78rem}
.pstg-progress-mini{height:4px;min-width:60px;background:#eceff5}.pstg-progress-mini .progress-bar{background:var(--pstg-primary)}
.pstg-dot{width:10px;height:10px;border-radius:50%;display:inline-block}.pstg-dot-inside{background:#10b981}.pstg-dot-tolerance{background:#f59e0b}.pstg-dot-outside{background:#ef4444}.pstg-dot-cancelled{background:#94a3b8}.pstg-dot-other{background:#60a5fa}
.pstg-leaflet-map .leaflet-popup-content{margin:12px 15px}.pstg-map-popup>div{margin:.15rem 0}.pstg-map-popup strong{display:inline;font-size:inherit;margin:0}
@media(max-width:575.98px){.pstg-stat-card{min-height:82px;padding:12px}.pstg-stat-value{font-size:1.4rem}.pstg-stat-label{white-space:normal}}

/* v4.7.1 - revisão de setores e ações operacionais */
.pstg-review-history{display:grid;gap:.55rem;max-height:240px;overflow:auto;padding-right:.25rem}
.pstg-review-history-item{border-left:3px solid #c7c0ff;background:#f8f7ff;border-radius:0 10px 10px 0;padding:.6rem .75rem}
.pstg-status-id-btn{font-weight:750}
#sectorDetailModal .modal-header .btn{white-space:nowrap}
#sectorDetailModal .table td,#sectorDetailModal .table th{vertical-align:middle}
@media(max-width:575.98px){
  #sectorDetailModal .modal-header{flex-wrap:wrap}
  #sectorDetailModal .modal-header .modal-title{width:100%;margin-bottom:.25rem}
}

/* v4.7.2 - áudio, transcrição e ações de Setores */
.pstg-audio-player{
  min-height:54px;
  accent-color:var(--pstg-primary);
}
.pstg-transcript-text{
  white-space:pre-wrap;
  line-height:1.72;
  color:#20283a;
  background:#f8f9fc;
  border:1px solid var(--pstg-border);
  border-radius:12px;
  padding:1rem;
  max-height:380px;
  overflow:auto;
}
.pstg-interview-accordion .accordion-item{
  border-color:var(--pstg-border);
  overflow:hidden;
}
.pstg-interview-accordion .accordion-item:first-child{border-radius:15px 15px 0 0}
.pstg-interview-accordion .accordion-item:last-child{border-radius:0 0 15px 15px}
.pstg-interview-accordion .accordion-button{font-weight:700;background:#fff;color:var(--pstg-text)}
.pstg-interview-accordion .accordion-button:not(.collapsed){color:var(--pstg-primary);background:#f8f7ff;box-shadow:none}
.pstg-status-change-panel{
  border:1px solid rgba(91,70,232,.24);
  background:linear-gradient(135deg,#f8f7ff,#fff);
  border-radius:14px;
  padding:1rem;
}
.pstg-sector-position{
  min-width:68px;
  text-align:center;
  color:var(--pstg-muted);
  font-size:.78rem;
  font-weight:700;
}
.pstg-validation-card{border-left:4px solid var(--pstg-primary)}
.pstg-validation-card.is-validated{border-left-color:#19a66a}
.pstg-validation-card.is-verified{border-left-color:#24a4c8}
.pstg-sector-id-action{font-weight:800;text-decoration:none}
.pstg-sector-id-action:hover{text-decoration:underline}
@media(max-width:575.98px){
  .pstg-sector-position{order:3;width:100%;text-align:left}
}

/* Resumo por Survey dentro do card do projeto */
.pstg-survey-breakdown{border:1px solid var(--pstg-border);border-radius:12px;background:rgba(248,250,252,.78);padding:.65rem .75rem;display:grid;gap:.35rem;}
.pstg-survey-breakdown-title{font-size:.7rem;text-transform:uppercase;letter-spacing:.06em;color:var(--pstg-muted);font-weight:700;margin-bottom:.1rem;}
.pstg-survey-row{display:grid;grid-template-columns:9px minmax(0,1fr) auto;align-items:center;gap:.5rem;min-height:1.45rem;font-size:.78rem;}
.pstg-survey-row.is-closed{opacity:.65;}
.pstg-survey-state{width:7px;height:7px;border-radius:999px;background:#94a3b8;display:block;}
.pstg-survey-state.is-active{background:#22a06b;box-shadow:0 0 0 3px rgba(34,160,107,.12);}
.pstg-survey-state.is-closed{background:#64748b;}
.pstg-survey-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--pstg-text);}
.pstg-survey-count{font-weight:800;font-variant-numeric:tabular-nums;background:#fff;border:1px solid var(--pstg-border);border-radius:999px;min-width:2.15rem;text-align:center;padding:.08rem .45rem;color:var(--pstg-primary);}
.pstg-card-main-link:hover{color:var(--pstg-primary)!important}
.pstg-survey-row{border-radius:8px;padding:.18rem .25rem;margin:0 -.25rem;transition:background-color .15s ease,transform .15s ease}
.pstg-survey-row:hover{background:#fff;transform:translateX(2px)}
.pstg-survey-row:focus-visible{outline:2px solid rgba(79,70,229,.3);outline-offset:2px}

/* v4.7.5 — ações operacionais do setor */
.pstg-sector-actionbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.75rem;padding:.85rem 1rem;border:1px solid rgba(91,75,232,.2);background:rgba(91,75,232,.055);border-radius:var(--bs-border-radius-lg,.75rem)}
.pstg-sector-id-action .badge{font-size:.64rem;vertical-align:middle}

/* v4.7.7 — assets físicos, contagem por Survey e Setores operacionais */
.pstg-survey-count{display:inline-flex;align-items:baseline;gap:.22rem;white-space:nowrap;min-width:auto}
.pstg-survey-count small{font-size:.62rem;font-weight:600;color:var(--pstg-muted);text-transform:none}
[data-sectors-table] .pstg-data-table{min-width:1480px}
.pstg-status-change-panel{border-left:4px solid var(--pstg-primary);padding:.8rem 1rem;background:rgba(91,75,232,.05);border-radius:.65rem}
.pstg-survey-name{display:flex;flex-direction:column;min-width:0;white-space:normal;line-height:1.15}
.pstg-survey-name>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pstg-survey-name small{font-size:.64rem;color:var(--pstg-muted);font-weight:500;margin-top:.1rem}
.pstg-survey-row{min-height:2.05rem}

/* v4.7.7 — Surveys visíveis como unidades operacionais dentro do projeto */
.pstg-survey-mini-grid{display:grid;gap:.5rem}
.pstg-survey-mini-card{
  display:grid;
  grid-template-columns:9px minmax(0,1fr) auto;
  align-items:center;
  gap:.65rem;
  padding:.65rem .7rem;
  border:1px solid var(--pstg-border);
  border-radius:10px;
  background:#fff;
  color:var(--pstg-text);
  transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease;
}
.pstg-survey-mini-card:hover{transform:translateY(-1px);border-color:rgba(91,75,232,.32);box-shadow:0 6px 16px rgba(15,23,42,.06)}
.pstg-survey-mini-card:focus-visible{outline:2px solid rgba(79,70,229,.3);outline-offset:2px}
.pstg-survey-mini-card.is-closed{opacity:.72;background:#f8fafc}
.pstg-survey-mini-content{display:flex;flex-direction:column;min-width:0;line-height:1.15}
.pstg-survey-mini-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.82rem}
.pstg-survey-mini-content small{color:var(--pstg-muted);font-size:.67rem;margin-top:.2rem}
.pstg-survey-mini-count{display:flex;flex-direction:column;align-items:flex-end;line-height:1;color:var(--pstg-primary);font-variant-numeric:tabular-nums}
.pstg-survey-mini-count strong{font-size:1.35rem}
.pstg-survey-mini-count small{font-size:.63rem;color:var(--pstg-muted);font-weight:600;margin-top:.2rem}
.pstg-build-badge{font-size:.65rem;color:rgba(255,255,255,.55);letter-spacing:.03em;white-space:nowrap}
@media(min-width:1400px){.pstg-survey-mini-grid{grid-template-columns:repeat(1,minmax(0,1fr))}}

/* v4.7.8 - Progress Reports */
.pstg-progress-stat{background:#fff;border:1px solid var(--pstg-border);border-radius:18px;padding:1rem;box-shadow:0 10px 28px rgba(15,23,42,.06);height:100%}
.pstg-progress-stat.is-good{border-color:#bbf7d0;background:linear-gradient(180deg,#fff,#f0fdf4)}
.pstg-progress-stat.is-warn{border-color:#fed7aa;background:linear-gradient(180deg,#fff,#fff7ed)}
.pstg-progress-label{font-size:.72rem;text-transform:uppercase;letter-spacing:.06em;color:var(--pstg-muted);font-weight:800}
.pstg-progress-value{font-size:1.8rem;font-weight:850;color:#182033;line-height:1.1;margin-top:.25rem}
.pstg-progress-note{font-size:.78rem;color:var(--pstg-muted);margin-top:.35rem}
.pstg-bar-row+.pstg-bar-row{margin-top:.75rem}.pstg-bar-track{height:8px;background:#eef2ff;border-radius:999px;overflow:hidden;margin:.25rem 0}.pstg-bar-fill{height:100%;background:linear-gradient(90deg,#7367f0,#26c6da);border-radius:999px}.pstg-day-bars{display:flex;gap:.75rem;align-items:end;min-height:210px;overflow-x:auto;padding:.25rem}.pstg-day-bar{min-width:54px;text-align:center;display:flex;flex-direction:column;gap:.25rem;align-items:center}.pstg-day-bar-col{height:145px;width:28px;background:#eef2ff;border-radius:999px;display:flex;align-items:end;overflow:hidden}.pstg-day-bar-col span{display:block;width:100%;background:linear-gradient(180deg,#7367f0,#26c6da);border-radius:999px}.pstg-maxw-260{max-width:260px}.pstg-maxw-320{max-width:320px}

/* v4.7.8 - transcrição paginada */
.pstg-transcript-text{max-height:none;overflow:visible}.pstg-transcript-paragraph{white-space:pre-wrap;line-height:1.8;margin-bottom:1rem}.pstg-transcript-paragraph:last-child{margin-bottom:0}.pstg-transcript-time{display:inline-block;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.72rem;font-weight:800;background:#eef2ff;color:#4f46e5;border-radius:999px;padding:.1rem .45rem;margin-right:.45rem}.pstg-transcript-toolbar{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;justify-content:space-between;margin-bottom:.75rem}.pstg-transcript-muted{font-size:.78rem;color:var(--pstg-muted)}
.pstg-transcript-speaker{display:inline-block;font-size:.72rem;font-weight:800;background:#f1f5f9;color:#334155;border:1px solid #e2e8f0;border-radius:999px;padding:.1rem .45rem;margin-right:.45rem}.pstg-transcript-summary{line-height:1.6}

/* v4.7.17 — cards gerenciais discretos de setores */
.pstg-sector-insight-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(176px,1fr));
  gap:.75rem;
}
.pstg-sector-insight-card{
  position:relative;
  min-height:108px;
  padding:.92rem .98rem;
  border:1px solid rgba(148,163,184,.28);
  border-radius:18px;
  background:linear-gradient(180deg,#fff,rgba(248,250,252,.92));
  box-shadow:0 10px 26px rgba(15,23,42,.055);
  overflow:hidden;
}
.pstg-sector-insight-card::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:4px;
  background:linear-gradient(180deg,rgba(91,75,232,.28),rgba(38,198,218,.18));
}
.pstg-sector-insight-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:.5rem;
  color:#64748b;
  font-size:.68rem;
  font-weight:850;
  letter-spacing:.055em;
  text-transform:uppercase;
}
.pstg-sector-insight-top i{
  width:26px;
  height:26px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background:#f1f5f9;
  color:#64748b;
  font-style:normal;
  font-size:.88rem;
}
.pstg-sector-insight-value{
  margin-top:.38rem;
  color:#182033;
  font-size:1.68rem;
  font-weight:900;
  line-height:1.05;
  font-variant-numeric:tabular-nums;
}
.pstg-sector-insight-note{
  margin-top:.28rem;
  color:#64748b;
  font-size:.76rem;
  line-height:1.25;
}
.pstg-sector-insight-card.is-ok{border-color:rgba(34,197,94,.22);background:linear-gradient(180deg,#fff,#f7fef9)}
.pstg-sector-insight-card.is-ok::before{background:linear-gradient(180deg,#22c55e,#86efac)}
.pstg-sector-insight-card.is-warn{border-color:rgba(245,158,11,.24);background:linear-gradient(180deg,#fff,#fffaf0)}
.pstg-sector-insight-card.is-warn::before{background:linear-gradient(180deg,#f59e0b,#fde68a)}
.pstg-sector-insight-card.is-danger{border-color:rgba(239,68,68,.24);background:linear-gradient(180deg,#fff,#fff5f5)}
.pstg-sector-insight-card.is-danger::before{background:linear-gradient(180deg,#ef4444,#fecaca)}
.pstg-sector-insight-card.is-muted{background:linear-gradient(180deg,#fff,#f8fafc)}
@media(max-width:575.98px){.pstg-sector-insight-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem}.pstg-sector-insight-card{min-height:100px;padding:.8rem}.pstg-sector-insight-value{font-size:1.35rem}.pstg-sector-insight-note{font-size:.7rem}}
