: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;
  }
}
