/* =========================================================
   SmartScout Dashboard Executivo v1.3
   Alinhado ao visual da tela Performance Diário
   ========================================================= */

.ssx-dashboard{
  display:grid;
  gap:16px;
  color:var(--text,#172033);
}

.ssx-filterbar{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  padding:16px;
  background:#fff;
  border:1px solid var(--line,#e5e8f1);
  border-radius:16px;
  box-shadow:0 5px 24px rgba(25,37,77,.04);
}

.ssx-filter{
  display:flex;
  align-items:center;
  gap:8px;
  min-height:42px;
  background:#f8faff;
  border:1px solid #e4e9f2;
  border-radius:10px;
  padding:7px 10px;
  color:var(--text,#172033);
}

.ssx-filter strong{
  font-size:10px;
  color:#75819a;
  text-transform:uppercase;
  letter-spacing:.06em;
}

.ssx-filter select{
  min-width:110px;
  padding:4px 26px 4px 4px;
  border:0;
  box-shadow:none;
  background:transparent;
  color:var(--text,#172033);
  font-weight:750;
}

.ssx-periods{display:flex;gap:3px}
.ssx-periods button{
  border:0;
  background:transparent;
  color:#526077;
  padding:6px 9px;
  border-radius:7px;
  font-weight:750;
}
.ssx-periods button:hover{background:#edf1fb;color:var(--primary,#2446a8)}
.ssx-periods .is-on{
  background:#e7edff;
  color:var(--primary,#2446a8);
}

.ssx-filter-spacer{flex:1}
.ssx-active{
  border-color:#bfcdf3;
  background:#f2f5ff;
}

.ssx-section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin:2px 1px 0;
}
.ssx-section-head h2{
  margin:0;
  font-size:1.05rem;
  color:var(--text,#172033);
}
.ssx-section-head p{
  margin:4px 0 0;
  color:var(--muted,#6f7890);
  font-size:12px;
}

.ssx-badge{
  display:inline-flex;
  align-items:center;
  padding:6px 9px;
  border-radius:999px;
  background:#eef2ff;
  border:1px solid #dce4fa;
  color:#3657b3;
  font-size:10px;
  font-weight:750;
}

.ssx-kpis{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:12px;
}

.ssx-card{
  background:#fff;
  border:1px solid var(--line,#e5e8f1);
  border-radius:16px;
  box-shadow:0 5px 24px rgba(25,37,77,.04);
}

.ssx-kpi{
  padding:17px;
  position:relative;
  overflow:hidden;
  min-height:112px;
}

.ssx-kpi small{
  color:#75819a;
  display:flex;
  justify-content:space-between;
  gap:8px;
  font-size:11px;
  font-weight:700;
}

.ssx-kpi .ssx-value{
  color:var(--text,#172033);
  font-weight:850;
  font-size:25px;
  line-height:1.1;
  margin:9px 0 6px;
  letter-spacing:-.02em;
}

.ssx-sub{
  font-size:10px;
  color:#8b96aa;
}

.ssx-up{color:#1e9e69!important}
.ssx-down{color:#d84c4c!important}
.ssx-warn{color:#a96708!important}

.ssx-grid2{
  display:grid;
  grid-template-columns:1.45fr 1fr;
  gap:16px;
}
.ssx-grid2.ssx-equal{grid-template-columns:1fr 1fr}

.ssx-panel{
  padding:18px;
  min-width:0;
}

.ssx-panel-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  margin-bottom:14px;
  gap:12px;
}

.ssx-panel-head h3{
  margin:0;
  font-size:14px;
  color:var(--text,#172033);
}

.ssx-panel-head p{
  margin:4px 0 0;
  color:var(--muted,#6f7890);
  font-size:11px;
}

.ssx-panel-head select{
  min-width:150px;
}

.ssx-legend{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  color:#75819a;
  font-size:10px;
}
.ssx-legend i{
  display:inline-block;
  width:7px;
  height:7px;
  border-radius:99px;
  margin-right:5px;
}

.ssx-chart{
  height:245px;
  position:relative;
  background:#fff;
  border-radius:12px;
}

.ssx-chart svg{
  width:100%;
  height:100%;
  overflow:visible;
}

.ssx-axis{
  fill:#7a879e;
  font-size:9px;
}

.ssx-gridline{
  stroke:#edf0f5;
  stroke-width:1;
}

.ssx-line-a{fill:none;stroke:#416fe2;stroke-width:2.4}
.ssx-line-b{fill:none;stroke:#e49843;stroke-width:2.4}
.ssx-line-c{fill:none;stroke:#1c9b6b;stroke-width:2.4}
.ssx-line-d{
  fill:none;
  stroke:#a96708;
  stroke-width:2;
  stroke-dasharray:5 5;
}

.ssx-dot{cursor:pointer}

.ssx-tip{
  position:absolute;
  display:none;
  pointer-events:none;
  background:#fff;
  color:var(--text,#172033);
  border:1px solid #dfe5ef;
  border-radius:9px;
  padding:8px 10px;
  font-size:11px;
  z-index:3;
  box-shadow:0 12px 28px rgba(25,37,77,.15);
}

.ssx-funnel{
  display:grid;
  gap:9px;
}

.ssx-funnel-row{
  display:grid;
  grid-template-columns:95px 1fr 72px;
  align-items:center;
  gap:10px;
  cursor:pointer;
  padding:3px;
  border-radius:10px;
}

.ssx-funnel-row:hover{background:#f8faff}

.ssx-funnel-label{
  font-size:12px;
  color:#34405b;
  font-weight:700;
}

.ssx-funnel-bar{
  height:34px;
  background:#f2f5fa;
  border-radius:9px;
  overflow:hidden;
  border:1px solid #e1e7f0;
}

.ssx-funnel-fill{
  height:100%;
  display:flex;
  align-items:center;
  padding:0 10px;
  font-weight:800;
  font-size:12px;
  color:#fff;
  background:linear-gradient(90deg,#315fcf,#416fe2);
}

.ssx-funnel-rate{
  font-size:11px;
  text-align:right;
  color:#75819a;
  font-weight:700;
}

.ssx-geo-wrap{
  display:grid;
  grid-template-columns:1.4fr .8fr;
  gap:12px;
}

.ssx-map{
  height:265px;
  border-radius:14px;
  background:#f8faff;
  border:1px solid #e3e8f1;
  position:relative;
  overflow:hidden;
}

.ssx-map svg{width:100%;height:100%}

.ssx-land{
  fill:#e7edf7;
  stroke:#cbd7e9;
  stroke-width:1;
}

.ssx-geo-dot{cursor:pointer}
.ssx-geo-dot circle{
  fill:#416fe2;
  stroke:#fff;
  stroke-width:2;
}
.ssx-geo-dot text{
  fill:#172033;
  font-size:9px;
  font-weight:800;
}

.ssx-geo-list{
  display:grid;
  gap:7px;
  align-content:start;
}

.ssx-geo-item{
  padding:11px;
  border:1px solid #e5eaf2;
  background:#f9fbfe;
  border-radius:10px;
  cursor:pointer;
}

.ssx-geo-item:hover,
.ssx-geo-item.is-active{
  border-color:#bfcdf3;
  background:#f2f5ff;
}

.ssx-geo-item strong{
  display:flex;
  justify-content:space-between;
  color:#25324b;
}

.ssx-geo-item small{
  color:#75819a;
  margin-top:3px;
  display:block;
}

.ssx-table{
  width:100%;
  border-collapse:collapse;
  min-width:620px;
}

.ssx-table th,
.ssx-table td{
  padding:10px 9px;
  border-bottom:1px solid #edf0f5;
  text-align:right;
  font-size:11px;
  color:#34405b;
}

.ssx-table th{
  color:#6f7b94;
  font-weight:800;
  text-transform:uppercase;
  font-size:9px;
  background:#f7f9fc;
}

.ssx-table th:first-child,
.ssx-table td:first-child{text-align:left}

.ssx-product{
  display:flex;
  align-items:center;
  gap:8px;
  font-weight:750;
  color:#263657;
}

.ssx-product:before{
  content:"";
  width:8px;
  height:8px;
  border-radius:50%;
  background:#416fe2;
}

.ssx-row{cursor:pointer}
.ssx-row:hover{background:#f8faff}

.ssx-status-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
}

.ssx-status{
  padding:14px;
  border:1px solid #e5eaf2;
  border-radius:12px;
  background:#f9fbfe;
  cursor:pointer;
}

.ssx-status:hover{
  border-color:#bdcae6;
  background:#f5f8fd;
}

.ssx-status strong{
  font-size:22px;
  display:block;
  margin:7px 0;
  color:#172033;
}

.ssx-status small{color:#75819a}

.ssx-pill{
  display:inline-flex;
  padding:4px 7px;
  border-radius:999px;
  font-size:9px;
  font-weight:850;
}

.ssx-approved{background:#e8f7f0;color:#15855a}
.ssx-pending{background:#fff5df;color:#a96708}
.ssx-new{background:#edf1ff;color:#3657b3}

.ssx-health{
  display:grid;
  gap:0;
}

.ssx-health-item{
  display:grid;
  grid-template-columns:30px 1fr auto;
  align-items:center;
  gap:10px;
  padding:11px 0;
  border-bottom:1px solid #edf0f5;
}

.ssx-health-item:last-child{border-bottom:0}

.ssx-health-ico{
  width:30px;
  height:30px;
  border-radius:9px;
  display:grid;
  place-items:center;
  background:#edf2fb;
  color:#315fcf;
}

.ssx-health-item strong{
  font-size:11px;
  display:block;
  color:#263657;
}

.ssx-health-item span{
  font-size:10px;
  color:#75819a;
}

.ssx-health-val{
  font-weight:800;
  font-size:11px;
}

.ssx-empty{
  height:100%;
  display:grid;
  place-items:center;
  color:#7a879e;
  font-size:12px;
  text-align:center;
  padding:24px;
}

.ssx-error{
  border:1px solid #efc0c0;
  background:#fff0f0;
  color:#a23838;
  padding:11px 13px;
  border-radius:10px;
  font-size:11px;
}

/* Melhor integração com os botões do Portal */
.ssx-filterbar .btn-secondary{
  background:#eef1f8;
  color:#263657;
}
.ssx-filterbar .btn-primary{
  background:linear-gradient(135deg,var(--primary,#2446a8),var(--primary2,#416fe2));
  color:#fff;
}

/* Responsivo */
@media(max-width:1200px){
  .ssx-kpis{grid-template-columns:repeat(3,1fr)}
  .ssx-grid2,
  .ssx-grid2.ssx-equal{grid-template-columns:1fr}
  .ssx-geo-wrap{grid-template-columns:1fr}
}

@media(max-width:820px){
  .ssx-kpis{grid-template-columns:repeat(2,1fr)}
  .ssx-status-grid{grid-template-columns:1fr}
  .ssx-filterbar{align-items:stretch}
  .ssx-filter{flex:1 1 45%}
  .ssx-filter-spacer{display:none}
  .ssx-section-head{align-items:flex-start;flex-direction:column}
}

@media(max-width:520px){
  .ssx-kpis{grid-template-columns:1fr 1fr}
  .ssx-kpi{padding:14px}
  .ssx-kpi .ssx-value{font-size:20px}
  .ssx-filter{flex:1 1 100%}
}

/* v1.4 — período customizado e dimensão campanha */
.ssx-filter input[type="date"]{border:0;background:transparent;color:var(--text,#172033);font:inherit;font-weight:750;outline:0;min-width:128px;padding:3px 0}
.ssx-date-filter{min-width:175px}
.ssx-table-scroll{overflow:auto;max-width:100%}
#ssxCampaign{min-width:160px;max-width:240px}
@media(max-width:1100px){.ssx-filterbar .ssx-filter{flex:1 1 190px}.ssx-filter-spacer{display:none}}
