/* =====================================================
   TRADE MANAGER · RADAR TARIFAS
===================================================== */

.radar-salesforce-page{
  display:grid;
  gap:20px;
}

/* HERO */
.radar-sf-header{
  min-height:126px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  padding:24px 30px;
  border:1px solid var(--line-soft);
  border-top:4px solid var(--primary);
  border-radius:var(--radius-xl);
  background:
    radial-gradient(circle at 88% 12%,rgba(25,165,125,.14),transparent 32%),
    linear-gradient(135deg,var(--surface),var(--surface-2));
  box-shadow:var(--shadow);
}

.radar-sf-title{
  display:flex;
  align-items:center;
  gap:18px;
}

.radar-sf-icon{
  width:66px;
  height:66px;
  display:grid;
  place-items:center;
  border-radius:22px;
  background:var(--primary-soft);
  color:var(--primary);
  font-size:30px;
  box-shadow:var(--shadow-sm);
}

.radar-sf-title span{
  display:block;
  margin:0 0 7px;
  color:var(--primary);
  font-size:11px;
  line-height:1;
  font-weight:950;
  letter-spacing:.18em;
  text-transform:uppercase;
}

.radar-sf-title h1{
  margin:0;
  color:var(--heading);
  font-size:38px;
  line-height:1;
  font-weight:950;
  letter-spacing:-.055em;
}

.radar-sf-title p{
  max-width:760px;
  margin:10px 0 0;
  color:var(--muted);
  font-size:15px;
  line-height:1.42;
  font-weight:650;
}

.radar-sf-tabs{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.radar-sf-tabs button{
  white-space:nowrap;
}

/* KPIS */
.radar-sf-kpis{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
}

.radar-sf-kpis article{
  min-height:112px;
  display:grid;
  grid-template-columns:auto 1fr;
  gap:14px;
  align-items:center;
  padding:16px;
  border:1px solid var(--line-soft);
  border-top:4px solid var(--primary);
  border-radius:22px;
  background:linear-gradient(180deg,#fff,#fbfdfb);
  box-shadow:var(--shadow);
  position:relative;
  overflow:hidden;
}

.radar-sf-kpis article:nth-child(2){border-top-color:var(--success);}
.radar-sf-kpis article:nth-child(3){border-top-color:#2563eb;}
.radar-sf-kpis article:nth-child(4){border-top-color:#f97316;}

.radar-sf-kpis small{
  display:block;
  color:var(--muted);
  font-size:11px;
  font-weight:950;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.radar-sf-kpis strong{
  display:block;
  margin-top:8px;
  color:var(--heading);
  font-size:28px;
  line-height:1;
  font-weight:950;
}

.radar-sf-kpis em{
  display:inline-flex;
  margin-top:9px;
  padding:5px 9px;
  border-radius:999px;
  background:var(--primary-soft);
  color:var(--primary);
  font-size:11px;
  font-style:normal;
  font-weight:900;
}

/* PANEL PRINCIPAL */
.radar-sf-panel,
.radar-sf-result-panel{
  padding:24px;
  border:1px solid var(--line-soft);
  border-radius:26px;
  background:linear-gradient(180deg,#fff,#fbfdfb);
  box-shadow:var(--shadow);
}

.radar-sf-panel{
  border-top:4px solid var(--primary);
}

.radar-sf-result-panel{
  border-top:4px solid #2563eb;
}

.radar-sf-panel-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  margin-bottom:18px;
}

.radar-sf-panel-head span{
  display:block;
  margin:0 0 7px;
  color:var(--primary);
  font-size:11px;
  line-height:1;
  font-weight:950;
  letter-spacing:.18em;
  text-transform:uppercase;
}

.radar-sf-panel-head h2{
  margin:0;
  color:var(--heading);
  font-size:26px;
  line-height:1.05;
  font-weight:950;
  letter-spacing:-.045em;
}

.radar-sf-panel-head p{
  max-width:820px;
  margin:8px 0 0;
  color:var(--muted);
  font-size:14px;
  line-height:1.45;
  font-weight:700;
}

.radar-sf-illustration{
  min-width:86px;
  height:86px;
  display:grid;
  place-items:center;
  border-radius:24px;
  background:var(--primary-soft);
  font-size:34px;
}

/* FORMULARIOS */
.radar-sf-form-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}

.radar-sf-form-grid .form-field{
  min-width:0;
}

.radar-sf-info-action{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-top:18px;
  padding:16px;
  border:1px solid var(--line-soft);
  border-radius:20px;
  background:#fff;
}

.radar-sf-info{
  display:grid;
  gap:4px;
}

.radar-sf-info strong{
  color:var(--heading);
  font-size:14px;
  font-weight:950;
}

.radar-sf-info small{
  color:var(--muted);
  font-size:13px;
  font-weight:750;
}

/* EMPTY RESULT */
.radar-empty-state{
  display:grid;
  gap:18px;
}

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

.radar-empty-kpis article{
  min-height:88px;
  display:grid;
  place-items:center;
  padding:12px;
  border:1px solid var(--line-soft);
  border-radius:18px;
  background:#fff;
  box-shadow:var(--shadow-sm);
  text-align:center;
}

.radar-empty-kpis span{
  font-size:22px;
}

.radar-empty-kpis strong{
  margin-top:4px;
  color:var(--heading);
  font-size:20px;
  font-weight:950;
}

.radar-empty-kpis small{
  margin-top:3px;
  color:var(--muted);
  font-size:10px;
  font-weight:900;
  text-transform:uppercase;
}

.radar-empty-state p{
  margin:0;
  color:var(--muted);
  font-size:14px;
  font-weight:800;
}

/* TIMELINE / CARDS */
.radar-pro-card{
  padding:20px;
  border:1px solid var(--line-soft);
  border-radius:22px;
  background:#fff;
  box-shadow:var(--shadow-sm);
}

/* RESPONSIVE */
@media(max-width:1180px){
  .radar-sf-header{
    align-items:flex-start;
    flex-direction:column;
  }

  .radar-sf-tabs{
    width:100%;
    justify-content:flex-start;
  }

  .radar-sf-kpis{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .radar-sf-form-grid{
    grid-template-columns:1fr;
  }

  .radar-empty-kpis{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}
/* =====================================================
   RADAR · INPUT FILE PRO
===================================================== */

.radar-sf-form-grid input[type="file"]{
  width:100%;
  min-height:64px;
  padding:18px;
  border:1px dashed rgba(15,107,87,.35);
  border-radius:18px;
  background:
    radial-gradient(circle at 100% 0%,rgba(15,107,87,.08),transparent 34%),
    #fff;
  color:var(--muted);
  font-size:13px;
  font-weight:850;
  cursor:pointer;
}

.radar-sf-form-grid input[type="file"]::file-selector-button{
  min-height:38px;
  margin-right:12px;
  padding:0 14px;
  border:0;
  border-radius:999px;
  background:var(--primary);
  color:#fff;
  font-size:12px;
  font-weight:950;
  cursor:pointer;
  box-shadow:var(--shadow-sm);
}

.radar-sf-form-grid input[type="file"]:hover{
  border-color:var(--primary);
  background:
    radial-gradient(circle at 100% 0%,rgba(25,165,125,.12),transparent 34%),
    #fff;
}
/* =====================================================
   RADAR · CIERRE VISUAL PRO
===================================================== */

/* Tabs superiores más consistentes */
.radar-sf-tabs .pro-btn,
.radar-sf-tabs .ghost-btn{
  min-width:170px;
  min-height:46px;
  justify-content:center;
}

/* KPIs con misma fuerza visual que Tarifas */
.radar-sf-kpis article{
  min-height:124px;
}

.radar-sf-kpis .radar-kpi-icon{
  width:56px;
  height:56px;
  font-size:26px;
}

.radar-sf-kpis strong{
  font-size:30px;
}

.radar-sf-kpis em{
  min-width:92px;
  justify-content:center;
}

/* Caja informativa de acción */
.radar-sf-info-action{
  min-height:92px;
  padding:18px;
  background:
    radial-gradient(circle at 100% 0%,rgba(25,165,125,.10),transparent 34%),
    #fff;
}

.radar-sf-info strong{
  font-size:15px;
}

.radar-sf-info small{
  max-width:720px;
  line-height:1.35;
}

/* Botones de acción radar */
.radar-sf-info-action .pro-btn{
  min-width:210px;
  min-height:48px;
  justify-content:center;
}

/* Resultado radar */
.radar-sf-result-panel .crm-section-head{
  margin-bottom:18px;
}

.radar-sf-result-panel .crm-section-head h3{
  font-size:24px;
}

/* Empty state más profesional */
.radar-empty-state{
  padding:6px 0 0;
}

.radar-empty-kpis article{
  min-height:104px;
  border-top:4px solid var(--primary);
}

.radar-empty-kpis article:nth-child(2){
  border-top-color:#16a34a;
}

.radar-empty-kpis article:nth-child(3){
  border-top-color:#dc2626;
}

.radar-empty-kpis article:nth-child(4){
  border-top-color:#2563eb;
}

.radar-empty-kpis article:nth-child(5){
  border-top-color:#f97316;
}

.radar-empty-kpis article:nth-child(6){
  border-top-color:#8b5cf6;
}

.radar-empty-kpis strong{
  font-size:24px;
}

.radar-empty-state p{
  padding:14px 16px;
  border:1px dashed var(--line-soft);
  border-radius:18px;
  background:#fff;
  text-align:center;
}

/* Timeline versiones guardadas */
#radarSavedTimeline{
  display:grid;
  gap:10px;
}

#radarSavedTimeline .crm-empty{
  padding:18px;
}

.radar-pro-card{
  border-top:4px solid var(--primary);
}

/* Responsive fino */
@media(max-width:760px){
  .radar-sf-kpis,
  .radar-empty-kpis{
    grid-template-columns:1fr 1fr;
  }

  .radar-sf-tabs{
    display:grid;
    grid-template-columns:1fr;
  }

  .radar-sf-tabs .pro-btn,
  .radar-sf-tabs .ghost-btn,
  .radar-sf-info-action .pro-btn{
    width:100%;
  }

  .radar-sf-info-action{
    flex-direction:column;
    align-items:stretch;
  }
}
/* =====================================================
   RADAR · RESULTADOS PRO
===================================================== */

.radar-impact-list{
  display:grid;
  gap:10px;
}

.radar-impact-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) 118px;
  gap:16px;
  align-items:center;
  padding:14px 16px;
  border:1px solid var(--line-soft);
  border-radius:18px;
  background:#fff;
  box-shadow:var(--shadow-sm);
  cursor:pointer;
}

.radar-impact-row.up{
  border-left:5px solid #16a34a;
}

.radar-impact-row.down{
  border-left:5px solid #dc2626;
}

.radar-impact-row.same{
  border-left:5px solid #64748b;
}

.radar-impact-row.new{
  border-left:5px solid #2563eb;
}

.radar-impact-row.gone{
  border-left:5px solid #f97316;
}

.radar-impact-main strong{
  display:block;
  color:var(--heading);
  font-size:15px;
  font-weight:950;
}

.radar-impact-main small{
  display:block;
  margin-top:5px;
  color:var(--muted);
  font-size:12px;
  font-weight:750;
}

.radar-bar{
  height:8px;
  margin-top:10px;
  overflow:hidden;
  border-radius:999px;
  background:#edf2f4;
}

.radar-bar span{
  display:block;
  height:100%;
  min-width:6px;
  border-radius:999px;
  background:var(--primary);
}

.radar-impact-row.up .radar-bar span{
  background:#16a34a;
}

.radar-impact-row.down .radar-bar span{
  background:#dc2626;
}

.radar-impact-row.new .radar-bar span{
  background:#2563eb;
}

.radar-impact-row.gone .radar-bar span{
  background:#f97316;
}

.radar-impact-value{
  min-height:62px;
  display:grid;
  place-items:center;
  padding:10px;
  border-radius:16px;
  background:var(--primary-soft);
  text-align:center;
}

.radar-impact-value strong{
  display:block;
  color:var(--heading);
  font-size:18px;
  font-weight:950;
}

.radar-impact-value small{
  display:block;
  margin-top:3px;
  color:var(--muted);
  font-size:11px;
  font-weight:850;
}

/* TOP SUBIDAS / BAJADAS */
.radar-top-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) 90px;
  gap:14px;
  align-items:center;
  padding:13px 14px;
  border:1px solid var(--line-soft);
  border-radius:16px;
  background:#fff;
  box-shadow:var(--shadow-sm);
}

.radar-top-row + .radar-top-row{
  margin-top:10px;
}

.radar-top-row strong{
  display:block;
  color:var(--heading);
  font-size:14px;
  font-weight:950;
}

.radar-top-row small{
  display:block;
  margin-top:4px;
  color:var(--muted);
  font-size:11px;
  font-weight:750;
}

.radar-top-row b{
  min-height:46px;
  display:grid;
  place-items:center;
  border-radius:14px;
  font-size:15px;
  font-weight:950;
}

.radar-top-row.up b{
  background:#dcfce7;
  color:#166534;
}

.radar-top-row.down b{
  background:#fee2e2;
  color:#991b1b;
}

.radar-top-row.new b{
  background:#dbeafe;
  color:#1d4ed8;
}

.radar-top-row.gone b{
  background:#ffedd5;
  color:#c2410c;
}

.radar-top-row.same b{
  background:#f1f5f9;
  color:#334155;
}

/* Grids internos de resultado */
.radar-pro-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
  margin-top:16px;
}

/* KPI internos de evolución */
.radar-kpi-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin:16px 0;
}

.radar-kpi-grid article{
  min-height:96px;
  padding:16px;
  border:1px solid var(--line-soft);
  border-top:4px solid var(--primary);
  border-radius:20px;
  background:#fff;
  box-shadow:var(--shadow-sm);
}

.radar-kpi-grid article.up{
  border-top-color:#16a34a;
}

.radar-kpi-grid article.down{
  border-top-color:#dc2626;
}

.radar-kpi-grid article span{
  display:block;
  color:var(--muted);
  font-size:11px;
  font-weight:950;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.radar-kpi-grid article strong{
  display:block;
  margin-top:8px;
  color:var(--heading);
  font-size:22px;
  line-height:1;
  font-weight:950;
}

.radar-kpi-grid article small{
  display:block;
  margin-top:7px;
  color:var(--muted);
  font-size:11px;
  font-weight:850;
}

/* Resumen ejecutivo si aparece como bloque texto */
.radar-executive-summary,
.radar-summary,
.radar-brief{
  padding:18px;
  border:1px solid var(--line-soft);
  border-left:5px solid var(--primary);
  border-radius:20px;
  background:
    radial-gradient(circle at 100% 0%,rgba(25,165,125,.08),transparent 34%),
    #fff;
  color:var(--muted);
  font-size:14px;
  line-height:1.55;
  font-weight:750;
  box-shadow:var(--shadow-sm);
}

.radar-executive-summary strong,
.radar-summary strong,
.radar-brief strong{
  color:var(--heading);
  font-weight:950;
}

@media(max-width:980px){
  .radar-pro-grid,
  .radar-kpi-grid{
    grid-template-columns:1fr;
  }

  .radar-impact-row,
  .radar-top-row{
    grid-template-columns:1fr;
  }

  .radar-impact-value,
  .radar-top-row b{
    justify-content:start;
    place-items:start;
  }
}
/* =====================================================
   RADAR · CONTROL OVERFLOW RESULTADOS
===================================================== */

.radar-salesforce-page,
.radar-sf-result-panel,
.radar-pro-card,
.radar-pro-grid,
.radar-impact-list,
.radar-impact-row,
.radar-top-row{
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
}

.radar-sf-result-panel{
  overflow:hidden;
}

.radar-pro-grid{
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
}

.radar-pro-card{
  overflow:hidden;
}

.radar-impact-row{
  grid-template-columns:minmax(0,1fr) 112px;
  overflow:hidden;
}

.radar-impact-main{
  min-width:0;
  overflow:hidden;
}

.radar-impact-main strong,
.radar-impact-main small{
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.radar-impact-value{
  min-width:0;
  max-width:112px;
}

.radar-impact-value strong{
  font-size:17px;
  white-space:nowrap;
}

.radar-top-row{
  grid-template-columns:minmax(0,1fr) 88px;
}

.radar-top-row div{
  min-width:0;
}

.radar-top-row strong,
.radar-top-row small{
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

@media(max-width:1280px){
  .radar-pro-grid{
    grid-template-columns:1fr;
  }
}
/* =====================================================
   RADAR · RESULT HERO Y EXPORTS
===================================================== */

.radar-result-pro{
  display:grid;
  gap:20px;
  min-width:0;
  max-width:100%;
}

.radar-result-hero{
  padding:22px;
  border:1px solid var(--line-soft);
  border-top:4px solid var(--primary);
  border-radius:24px;
  background:
    radial-gradient(circle at 96% 0%,rgba(25,165,125,.10),transparent 34%),
    #fff;
  box-shadow:var(--shadow);
}

.radar-result-hero h2,
.radar-result-hero h3{
  margin:0;
  color:var(--heading);
  font-size:28px;
  line-height:1.08;
  font-weight:950;
  letter-spacing:-.045em;
}

.radar-result-hero p{
  margin:10px 0 0;
  color:var(--muted);
  font-size:14px;
  line-height:1.45;
  font-weight:750;
}

.radar-result-hero .crm-row-actions,
.radar-result-hero-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:16px;
}

.radar-result-hero .mini-btn,
.radar-result-hero .ghost-btn,
.radar-result-hero .pro-btn{
  min-width:92px;
  min-height:42px;
  justify-content:center;
  border-radius:999px;
  font-size:12px;
  font-weight:950;
}

/* KPIs de resultado */
.radar-result-pro > .radar-kpi-grid,
.radar-client-result > .radar-kpi-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}

.radar-result-pro > .radar-kpi-grid article,
.radar-client-result > .radar-kpi-grid article{
  min-height:112px;
  padding:18px;
  border:1px solid var(--line-soft);
  border-top:4px solid var(--primary);
  border-radius:22px;
  background:#fff;
  box-shadow:var(--shadow);
}

.radar-result-pro > .radar-kpi-grid article.up,
.radar-client-result > .radar-kpi-grid article.up{
  border-top-color:#16a34a;
}

.radar-result-pro > .radar-kpi-grid article.down,
.radar-client-result > .radar-kpi-grid article.down{
  border-top-color:#dc2626;
}

.radar-result-pro > .radar-kpi-grid article span,
.radar-client-result > .radar-kpi-grid article span{
  display:block;
  color:var(--muted);
  font-size:11px;
  font-weight:950;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.radar-result-pro > .radar-kpi-grid article strong,
.radar-client-result > .radar-kpi-grid article strong{
  display:block;
  margin-top:8px;
  color:var(--heading);
  font-size:26px;
  line-height:1;
  font-weight:950;
}

.radar-result-pro > .radar-kpi-grid article small,
.radar-client-result > .radar-kpi-grid article small{
  display:block;
  margin-top:8px;
  color:var(--muted);
  font-size:12px;
  font-weight:850;
}

/* Search de resultados */
.radar-result-search{
  width:100%;
  min-height:52px;
  padding:0 18px;
  border:1px solid var(--line-soft);
  border-radius:18px;
  background:#fff;
  color:var(--heading);
  font-size:15px;
  font-weight:800;
  box-shadow:var(--shadow-sm);
}

/* Ajuste tablet */
@media(max-width:980px){
  .radar-result-pro > .radar-kpi-grid,
  .radar-client-result > .radar-kpi-grid{
    grid-template-columns:1fr 1fr;
  }
}
/* =====================================================
   RADAR · DASHBOARD EJECUTIVO RESULTADOS
===================================================== */

.radar-executive-grid{
  align-items:start;
}

.radar-executive-list{
  display:grid;
  gap:9px;
}

.radar-executive-row{
  min-height:48px;
  display:grid;
  grid-template-columns:minmax(0,1fr) 92px;
  gap:12px;
  align-items:center;
  padding:10px 12px;
  border:1px solid var(--line-soft);
  border-radius:15px;
  background:#fff;
  box-shadow:var(--shadow-sm);
}

.radar-executive-row div{
  min-width:0;
}

.radar-executive-row strong{
  display:block;
  color:var(--heading);
  font-size:13px;
  line-height:1.05;
  font-weight:950;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.radar-executive-row small{
  display:block;
  margin-top:4px;
  color:var(--muted);
  font-size:10px;
  line-height:1.1;
  font-weight:800;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.radar-executive-row b{
  min-height:34px;
  display:grid;
  place-items:center;
  border-radius:12px;
  font-size:14px;
  font-weight:950;
}

.radar-executive-row b.up{
  background:#dcfce7;
  color:#166534;
}

.radar-executive-row b.down{
  background:#fee2e2;
  color:#991b1b;
}

.radar-executive-summary{
  padding:18px;
  border:1px solid var(--line-soft);
  border-left:5px solid var(--primary);
  border-radius:20px;
  background:
    radial-gradient(circle at 100% 0%,rgba(25,165,125,.08),transparent 34%),
    #fff;
  color:var(--muted);
  font-size:15px;
  line-height:1.6;
  font-weight:750;
}

.radar-executive-summary strong{
  color:var(--heading);
  font-weight:950;
}

/* Quitamos exceso vertical de resultados */
.radar-result-pro{
  gap:18px;
}

.radar-pro-grid{
  gap:14px;
}

.radar-pro-card{
  min-width:0;
}

/* Top subidas/bajadas compacto */
.radar-top-row{
  min-height:54px;
  padding:10px 12px;
}

.radar-top-row strong{
  font-size:13px;
}

.radar-top-row small{
  font-size:10px;
}

.radar-top-row b{
  min-height:34px;
  font-size:14px;
}

/* Tabla final más contenida */
.radar-result-pro .table-wrap{
  max-height:520px;
  overflow:auto;
}

.radar-result-pro .radar-table th{
  position:sticky;
  top:0;
  z-index:2;
  background:#fff;
}

@media(max-width:980px){
  .radar-executive-row{
    grid-template-columns:1fr;
  }

  .radar-executive-row b{
    justify-content:start;
    padding-left:12px;
  }
}
/* =====================================================
   RADAR · AJUSTE FINAL RESULTADO DASHBOARD
===================================================== */

/* Fuerza Familias/Subfamilias en 2 columnas */
.radar-executive-grid{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:14px !important;
}

@media(max-width:900px){
  .radar-executive-grid{
    grid-template-columns:1fr !important;
  }
}

/* Tabla detalle más compacta y con scroll interno */
.radar-result-pro .table-wrap{
  max-height:460px;
  overflow:auto;
  border-radius:18px;
}

.radar-result-pro .radar-table th{
  position:sticky;
  top:0;
  z-index:3;
  background:#fff;
  font-size:10px;
  white-space:nowrap;
}

.radar-result-pro .radar-table td{
  padding:10px 12px;
  font-size:12px;
  line-height:1.15;
  white-space:nowrap;
}

.radar-result-pro .radar-table td:nth-child(2){
  max-width:260px;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* Histórico más contenido */
#radarHistoricoBox{
  margin-top:4px;
}
/* =====================================================
   RADAR · TABLA FINAL PRO SIN SCROLL HORIZONTAL
===================================================== */

.radar-filter-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:0 0 12px;
}

.radar-filter-tabs button{
  min-height:36px;
  padding:0 14px;
  border:1px solid var(--line-soft);
  border-radius:999px;
  background:#fff;
  color:var(--primary);
  font-size:12px;
  font-weight:950;
  cursor:pointer;
  box-shadow:var(--shadow-sm);
}

.radar-filter-tabs button.active,
.radar-filter-tabs button:hover{
  background:var(--primary);
  color:#fff;
  border-color:var(--primary);
}

.radar-result-pro .table-wrap{
  max-height:480px;
  overflow:auto;
  border-radius:20px;
}

.radar-result-pro .radar-table{
  width:100%;
  min-width:0 !important;
  table-layout:fixed;
}

.radar-result-pro .radar-table th,
.radar-result-pro .radar-table td{
  padding:10px 8px;
  font-size:11px;
  line-height:1.15;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.radar-result-pro .radar-table th:nth-child(1),
.radar-result-pro .radar-table td:nth-child(1){
  width:76px;
}

.radar-result-pro .radar-table th:nth-child(2),
.radar-result-pro .radar-table td:nth-child(2){
  width:250px;
}

.radar-result-pro .radar-table th:nth-child(3),
.radar-result-pro .radar-table td:nth-child(3){
  width:100px;
}

.radar-result-pro .radar-table th:nth-child(4),
.radar-result-pro .radar-table td:nth-child(4){
  width:130px;
}

/* Valores económicos diferenciados */
.radar-result-pro .radar-table td:nth-child(5),
.radar-result-pro .radar-table td:nth-child(6){
  background:#ffedd5;
  color:#c2410c;
  font-weight:950;
  text-align:center;
  border-radius:10px;
}

.radar-result-pro .radar-table td:nth-child(7),
.radar-result-pro .radar-table td:nth-child(8){
  background:#dcfce7;
  color:#166534;
  font-weight:950;
  text-align:center;
  border-radius:10px;
}

.radar-result-pro .radar-table td:nth-child(9){
  background:#eef2ff;
  color:#3730a3;
  font-weight:950;
  text-align:center;
  border-radius:10px;
}

.radar-result-pro .radar-table td:nth-child(10){
  background:#fef3c7;
  color:#92400e;
  font-weight:950;
  text-align:center;
  border-radius:10px;
}

.radar-result-pro .radar-table td:nth-child(11){
  text-align:center;
}
/* ===== RADAR TABLA RESULTADO · LECTURA REAL ===== */

.radar-result-pro .table-wrap{
  max-height:520px;
  overflow:auto;
  border-radius:20px;
}

.radar-result-pro .radar-table{
  width:max-content;
  min-width:1360px !important;
  table-layout:auto;
}

.radar-result-pro .radar-table th,
.radar-result-pro .radar-table td{
  padding:11px 12px;
  font-size:12px;
  white-space:nowrap;
  overflow:visible;
  text-overflow:clip;
}

.radar-result-pro .radar-table th:nth-child(1),
.radar-result-pro .radar-table td:nth-child(1){
  min-width:86px;
}

.radar-result-pro .radar-table th:nth-child(2),
.radar-result-pro .radar-table td:nth-child(2){
  min-width:300px;
  max-width:360px;
  overflow:hidden;
  text-overflow:ellipsis;
}

.radar-result-pro .radar-table th:nth-child(3),
.radar-result-pro .radar-table td:nth-child(3){
  min-width:130px;
}

.radar-result-pro .radar-table th:nth-child(4),
.radar-result-pro .radar-table td:nth-child(4){
  min-width:160px;
}

.radar-result-pro .radar-table th:nth-child(n+5),
.radar-result-pro .radar-table td:nth-child(n+5){
  min-width:96px;
  text-align:center;
}

.radar-result-pro .radar-table th:nth-child(11),
.radar-result-pro .radar-table td:nth-child(11){
  min-width:130px;
}
/* ==========================================
   RADAR TOP IMPACT TAGS
========================================== */

.radar-top-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:8px;
}

.radar-top-meta span{
  padding:4px 10px;
  border-radius:999px;
  font-size:11px;
  font-weight:800;
  line-height:1;
}

.tag-code{
  background:#f3f4f6;
  color:#64748b;
}

.tag-family{
  background:#dcfce7;
  color:#166534;
}

.tag-subfamily{
  background:#dbeafe;
  color:#1d4ed8;
}
/* =====================================================
   RADAR HERO ACTIONS
===================================================== */

.radar-result-hero{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:18px;
  flex-wrap:wrap;
}

.radar-hero-actions{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
}

.radar-hero-actions strong{
  min-width:90px;
  height:42px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0 14px;
  border-radius:14px;
  background:#dcfce7;
  color:#166534;
  font-size:18px;
  font-weight:950;
}

.radar-hero-actions .mini-btn{
  min-width:100px;
  height:42px;
  border-radius:12px;
  font-weight:900;
}

@media(max-width:900px){

  .radar-result-hero{
    flex-direction:column;
    align-items:stretch;
  }

  .radar-hero-actions{
    width:100%;
  }

  .radar-hero-actions .mini-btn{
    flex:1;
  }
}
/* =====================================================
   RADAR · HISTÓRICO RECUPERABLE
===================================================== */

.radar-history-library{
  border-top-color:#8b5cf6;
}

.radar-history-cards{
  display:grid;
  gap:10px;
}

.radar-history-card{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:14px;
  align-items:center;
  padding:14px;
  border:1px solid var(--line-soft);
  border-radius:18px;
  background:#fff;
  box-shadow:var(--shadow-sm);
}

.radar-history-card strong{
  display:block;
  color:var(--heading);
  font-size:14px;
  font-weight:950;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.radar-history-card small{
  display:block;
  margin-top:5px;
  color:var(--muted);
  font-size:11px;
  font-weight:800;
}

.radar-history-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.radar-history-actions .mini-btn{
  min-height:34px;
  padding:0 12px;
  border-radius:999px;
  font-size:11px;
}

@media(max-width:900px){
  .radar-history-card{
    grid-template-columns:1fr;
  }

  .radar-history-actions{
    justify-content:flex-start;
  }
}