:root{
  --bg:#0b1220;
  --muted:#8aa0c7;
  --text:#e9f0ff;
  --ok:#22c55e;
  --warn:#f59e0b;
  --bad:#ef4444;
}
*{box-sizing:border-box}
body{
  margin:0; font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 700px at 20% 0%, #101c35 0%, var(--bg) 55%);
  color:var(--text);
}
.wrap{
  max-width:1200px;
  margin:0 auto;
  padding:24px;
}

@media (max-width: 700px){
  .wrap{
    padding:14px;
  }
}

.top{display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom:10px;}
.title h1{margin:0; font-size:28px; letter-spacing:.2px}
.title small{display:block; color:var(--muted); margin-top:6px; line-height:1.4}
.status{text-align:right; color:var(--muted); font-size:13px;}

.grid{display:grid; grid-template-columns: repeat(12, 1fr); gap:14px;}
.card{
  background: linear-gradient(180deg, rgba(255,255,255,.03) 0%, rgba(255,255,255,.01) 100%);
  border:1px solid rgba(255,255,255,.06);
  border-radius:16px;
  padding:14px 14px 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,.25);
  min-height:92px;
}

.kpi{display:flex; align-items:flex-start; justify-content:space-between; gap:10px;}
.kpi .label{color:var(--muted); font-size:13px}
.kpi .value{font-size:28px; font-weight:700; margin-top:6px}
.kpi .unit{color:var(--muted); font-weight:600; margin-left:6px; font-size:14px}
.subkpi{margin-top:10px; font-size:12px; color: rgba(138,160,199,.95);}

.pill{
  font-size:12px; padding:4px 10px; border-radius:999px;
  background: rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.08);
  color:var(--muted);
  white-space:nowrap;
}

.span-3{grid-column: span 3;}
.span-4{grid-column: span 4;}
.span-6{grid-column: span 6;}
.span-12{grid-column: span 12;}

.chart-wrap{height:300px;}
.chart-wrap.tall{height:340px;}
canvas{width:100% !important; height:100% !important;}
.footer{margin-top:16px; color:var(--muted); font-size:12px; display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap; padding-top:10px; border-top:1px solid rgba(255,255,255,.06);}
.url{color:#cfe0ff}

@media (max-width: 980px){
  .span-3,.span-4,.span-6{grid-column: span 12;}
  .chart-wrap{height:260px;}
  .status{text-align:left}
  .top{align-items:flex-start; flex-direction:column}
}

/* Tabs */
.tabs{display:flex; gap:10px; justify-content:center; margin:14px 0 6px 0; flex-wrap:wrap;}
.tab{background:transparent; border:1px solid rgba(140,170,255,.25); color:#cfe0ff; padding:8px 12px; border-radius:999px; font-size:12px; letter-spacing:.6px; cursor:pointer; user-select:none;}
.tab:hover{ border-color: rgba(140,170,255,.45); }
.tab.active{border-color: rgba(80,170,255,.85); box-shadow: 0 0 0 2px rgba(80,170,255,.12) inset;}

/* Gerencia */
.card.executive{border:1px solid rgba(80,170,255,.15); background: linear-gradient(180deg, rgba(80,170,255,.04), rgba(255,255,255,.01));}
.bar{height:20px; border-radius:999px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); overflow:hidden;}
.bar-fill{height:100%; border-radius:999px; background: linear-gradient(90deg, rgba(34,197,94,.85), rgba(80,170,255,.85)); box-shadow: 0 0 18px rgba(80,170,255,.25); transition: width .35s ease;}
.label-block{margin-bottom:10px; color:var(--muted); font-size:13px;}
.muted{color:var(--muted); font-size:13px; line-height:1.5;}
.subnote{color:var(--muted); font-size:12px; margin-top:6px;}
.exec-head{display:flex; justify-content:space-between; align-items:flex-end; margin-bottom:14px;}
.exec-title{font-size:18px; font-weight:600; letter-spacing:.3px;}
.exec-sub{color:var(--muted); font-size:12px; margin-top:4px;}
.exec-score{font-size:18px; font-weight:700; color:#cfe0ff;}
.risk{margin-top:12px; color:var(--muted); font-size:13px;}
.summary{font-size:16px; color:#cfe0ff; line-height:1.6;}

/* Status Panel */
.status-panel{display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin:6px 0 12px 0; padding:10px 12px; border-radius:16px; border:1px solid rgba(255,255,255,.06); background: linear-gradient(180deg, rgba(255,255,255,.03) 0%, rgba(255,255,255,.01) 100%); box-shadow: 0 10px 25px rgba(0,0,0,.20);}
.status-item{display:flex; align-items:center; gap:8px; padding:6px 10px; border-radius:999px; border:1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.03); color: var(--muted); font-size:12px;}
.status-item .key{ color:#cfe0ff; letter-spacing:.4px; }
.status-item .val{ color:var(--muted); }
.status-spacer{ flex:1; min-width: 20px; }
.dot{width:10px; height:10px; border-radius:999px; border:1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.10); box-shadow: 0 0 0 2px rgba(0,0,0,.12) inset;}
.dot[data-state="ok"]{ background: rgba(34,197,94,.9); border-color: rgba(34,197,94,.45); }
.dot[data-state="warn"]{ background: rgba(245,158,11,.9); border-color: rgba(245,158,11,.45); }
.dot[data-state="bad"]{ background: rgba(239,68,68,.9); border-color: rgba(239,68,68,.45); }
.dot[data-state="unk"]{ background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.18); }

/* Pipeline (siempre entendible) */
.pipe{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:10px 12px;
  border-radius:14px;
  border:1px dashed rgba(140,170,255,.22);
  background: rgba(80,170,255,.04);
  margin: 10px 0 14px 0;
}

.pipe-row{
  display:flex;
  align-items:center;
  gap:14px;
  overflow-x:auto;
}

.pipe-chip{
  padding:6px 14px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  color:#cfe0ff;
  font-size:13px;
  letter-spacing:.4px;
}
.pipe-arrow{color: rgba(138,160,199,.95); font-size:14px;}
.pipe-note{color: rgba(138,160,199,.95); font-size:12px;}

/* Hero (que se entienda sí o sí) */
.card.hero{
  border:1px solid rgba(80,170,255,.22);
  background: linear-gradient(180deg, rgba(80,170,255,.08), rgba(255,255,255,.01));
}
.hero-top{
  display:flex;
  align-items:stretch;
  justify-content:space-between;
  gap:16px;
}
.hero-left{flex: 1; min-width: 280px;}
.hero-right{flex: 0 0 340px; display:flex; flex-direction:column; gap:10px; align-items:stretch;}
.hero-divider{
  width:1px;
  background: rgba(255,255,255,.06);
}
.hero-value{font-size:58px; font-weight:900; letter-spacing:.2px; line-height:1.05; margin-top:6px;}
.hero-value .unit{font-size:16px; font-weight:800; margin-left:10px; color:var(--muted);}
.hero-sub{margin-top:10px; color: rgba(138,160,199,.95); font-size:13px;}

.hero-metric{
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.12);
}
.mini-label{color: var(--muted); font-size:12px;}
.mini-value{margin-top:6px; font-size:18px; font-weight:800; color:#cfe0ff;}
.mini-unit{color: var(--muted); font-size:12px; font-weight:700;}
.mini-sub{margin-top:6px; color: rgba(138,160,199,.95); font-size:12px;}

.pills{display:flex; gap:8px; flex-wrap:wrap; margin-top:10px;}
.hero-chart{height:360px;}
@media (max-width: 980px){
  .hero-top{flex-direction:column;}
  .hero-right{flex: 1 1 auto;}
  .hero-divider{display:none;}
  .hero-value{font-size:44px;}
  .hero-chart{height:300px;}
}

.chart-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:12px;
  flex-wrap:wrap;
}

.chart-switch{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.chart-btn{
  background:#16213a;
  color:#dbe7ff;
  border:1px solid #2a3b63;
  border-radius:10px;
  padding:8px 14px;
  font-size:13px;
  font-weight:600;
  cursor:pointer;
  transition:all .2s ease;
}

.chart-btn:hover{
  background:#1c2a49;
  border-color:#3a4e7e;
}

.chart-btn.active{
  background:#f2a000;
  color:#0b1220;
  border-color:#f2a000;
}

.industrial-pipe{
  position: relative;
  margin: 18px 0 22px;
  padding: 18px;
  border: 1px solid rgba(70,110,180,.28);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(18,28,48,.96), rgba(10,16,30,.96)),
    repeating-linear-gradient(
      90deg,
      rgba(255,255,255,.02) 0px,
      rgba(255,255,255,.02) 1px,
      transparent 1px,
      transparent 28px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(255,255,255,.015) 0px,
      rgba(255,255,255,.015) 1px,
      transparent 1px,
      transparent 28px
    );
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.02),
    0 10px 30px rgba(0,0,0,.22);
  overflow: hidden;
}

.industrial-pipe::before{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(242,160,0,.05) 35%,
    transparent 70%
  );
  pointer-events:none;
}

.pipe-title-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
  margin-bottom:14px;
}

.pipe-title{
  font-size:15px;
  font-weight:700;
  color:#eef4ff;
  letter-spacing:.2px;
}

.pipe-live{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:12px;
  color:#aebfdf;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.06);
}

.live-dot{
  width:9px;
  height:9px;
  border-radius:50%;
  background:#22c55e;
  box-shadow:0 0 0 0 rgba(34,197,94,.7);
  animation: livePulse 1.8s infinite;
}

@keyframes livePulse{
  0%{ box-shadow:0 0 0 0 rgba(34,197,94,.7); }
  70%{ box-shadow:0 0 0 10px rgba(34,197,94,0); }
  100%{ box-shadow:0 0 0 0 rgba(34,197,94,0); }
}

.animated-pipe{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

@media (max-width:700px){

  .pipe-row{
    flex-direction:column;
    align-items:flex-start;
    gap:8px;
  }

  .pipe-link{
    transform:rotate(90deg);
    margin-left:14px;
  }

}

.pipe-chip{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:10px 14px;
  border-radius:12px;
  font-size:13px;
  font-weight:700;
  letter-spacing:.2px;
  color:#eaf1ff;
  border:1px solid rgba(255,255,255,.08);
  background:linear-gradient(180deg, rgba(34,47,76,.95), rgba(17,25,43,.95));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.04),
    0 4px 14px rgba(0,0,0,.18);
}

.pipe-chip.ot{
  border-color:rgba(34,197,94,.28);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.04),
    0 0 18px rgba(34,197,94,.08);
}

.pipe-chip.proto{
  border-color:rgba(59,130,246,.28);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.04),
    0 0 18px rgba(59,130,246,.08);
}

.pipe-chip.edge{
  border-color:rgba(242,160,0,.35);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.04),
    0 0 18px rgba(242,160,0,.10);
}

.pipe-chip.data{
  border-color:rgba(168,85,247,.30);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.04),
    0 0 18px rgba(168,85,247,.08);
}

.pipe-chip.viz{
  border-color:rgba(6,182,212,.30);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.04),
    0 0 18px rgba(6,182,212,.08);
}

/* ===== Conector tipo enlace entre chips ===== */
.pipe-link{
  display:inline-flex;
  align-items:center;
  gap:0;
  opacity:1;
  position:relative;
}

.flow-dot{
  width:7px;
  height:7px;
  border-radius:50%;
  background:#22c55e;
  box-shadow:
    0 0 0 2px rgba(34,197,94,.10),
    0 0 8px rgba(34,197,94,.45);
  position:relative;
  z-index:2;
}

/* pequeña línea de conexión */
.flow-dot::after{
  content:"";
  position:absolute;
  top:50%;
  left:100%;
  width:10px;
  height:2px;
  transform:translateY(-50%);
  background:linear-gradient(to right, rgba(34,197,94,.85), rgba(34,197,94,.25));
  border-radius:999px;
  box-shadow:0 0 6px rgba(34,197,94,.25);
}

/* flecha integrada */
.pipe-arrow{
  margin-left:10px;
  color:#22c55e;
  font-size:12px;
  line-height:1;
  text-shadow:0 0 8px rgba(34,197,94,.22);
  animation:pipeArrowFlow 1s ease-in-out infinite;
}

/* activo */
.pipe-link.is-on .flow-dot{
  background:#22c55e;
  box-shadow:
    0 0 0 2px rgba(34,197,94,.10),
    0 0 8px rgba(34,197,94,.45);
  animation:pipeDotFlow 1s ease-in-out infinite;
}

.pipe-link.is-on .flow-dot::after{
  background:linear-gradient(to right, rgba(34,197,94,.85), rgba(34,197,94,.25));
  box-shadow:0 0 6px rgba(34,197,94,.25);
}

.pipe-link.is-on .pipe-arrow{
  color:#22c55e;
  text-shadow:0 0 8px rgba(34,197,94,.22);
  animation:pipeArrowFlow 1s ease-in-out infinite;
}

/* apagado */
.pipe-link.is-off .flow-dot{
  background:#475569;
  box-shadow:none;
  animation:none;
  opacity:.45;
}

.pipe-link.is-off .flow-dot::after{
  background:linear-gradient(to right, rgba(100,116,139,.5), rgba(100,116,139,.15));
  box-shadow:none;
}

.pipe-link.is-off .pipe-arrow{
  color:#64748b;
  text-shadow:none;
  animation:none;
  opacity:.45;
}

@keyframes pipeDotFlow{
  0%   { transform:scale(1); opacity:.8; }
  50%  { transform:scale(1.15); opacity:1; }
  100% { transform:scale(1); opacity:.8; }
}

@keyframes pipeArrowFlow{
  0%   { transform:translateX(0); opacity:.7; }
  50%  { transform:translateX(2px); opacity:1; }
  100% { transform:translateX(0); opacity:.7; }
}

@keyframes flowMove{
  0%{
    left:0;
    opacity:0;
  }
  10%{
    opacity:1;
  }
  85%{
    opacity:1;
  }
  100%{
    left:30px;
    opacity:0;
  }
}

.pipe-layers{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:14px;
}

.layer-badge{
  display:inline-flex;
  align-items:center;
  padding:7px 11px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  letter-spacing:.2px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.03);
  color:#dbe7ff;
}

.layer-badge.ot{ border-color:rgba(34,197,94,.25); color:#b9f5cd; }
.layer-badge.edge{ border-color:rgba(242,160,0,.28); color:#ffd98a; }
.layer-badge.data{ border-color:rgba(168,85,247,.28); color:#e1c7ff; }
.layer-badge.viz{ border-color:rgba(6,182,212,.28); color:#a8f1ff; }

.pipe-note{
  margin-top:14px;
  font-size:12px;
  color:#8ea3c7;
}

@media (max-width: 900px){
  .animated-pipe{
    gap:8px;
  }

  .pipe-link{
    width:28px;
  }

  @keyframes flowMove{
    0%{
      left:0;
      opacity:0;
    }
    10%{
      opacity:1;
    }
    85%{
      opacity:1;
    }
    100%{
      left:18px;
      opacity:0;
    }
  }
}

.ger-hero{
  display:grid;
  grid-template-columns: 1.35fr 1px 1fr;
  gap:22px;
  align-items:center;
  padding:22px;
  border:1px solid rgba(242,160,0,.18);
  background:
    linear-gradient(180deg, rgba(25,34,56,.98), rgba(12,18,31,.98));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.03),
    0 12px 28px rgba(0,0,0,.18);
}

.ger-hero-left{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.ger-hero-label{
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:.12em;
  color:#98aed5;
  font-weight:700;
}

.ger-hero-value{
  display:flex;
  align-items:flex-end;
  gap:10px;
  font-size:46px;
  font-weight:800;
  line-height:1;
  color:#f4f7ff;
}

.ger-hero-value .unit{
  font-size:18px;
  color:#f2a000;
  margin-bottom:6px;
}

.ger-hero-sub{
  font-size:13px;
  color:#9cb0d3;
}

.ger-hero-divider{
  width:1px;
  height:100%;
  background:linear-gradient(180deg, transparent, rgba(255,255,255,.12), transparent);
}

.ger-hero-right{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap:14px;
}

.ger-badge-block{
  padding:14px;
  border-radius:14px;
  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.06);
  min-height:92px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}

.ger-badge-title{
  font-size:12px;
  color:#8fa4ca;
  font-weight:700;
}

.ger-risk-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:34px;
  padding:8px 12px;
  border-radius:10px;
  font-size:13px;
  font-weight:800;
  color:#eaf1ff;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.04);
}

.ger-kpi-card{
  min-height:150px;
}

.ger-eff-card{
  padding-top:20px;
}

.ger-eff-number{
  font-size:30px;
  font-weight:800;
  color:#f2a000;
}

.ger-bar{
  margin-top:12px;
}

.ger-eff-scale{
  margin-top:10px;
  display:flex;
  justify-content:space-between;
  font-size:12px;
  color:#8da2c8;
}

.ger-summary-card,
.ger-message-card{
  min-height:180px;
}

.ger-message{
  font-size:15px;
  line-height:1.7;
}

@media (max-width: 980px){
  .ger-hero{
    grid-template-columns: 1fr;
  }

  .ger-hero-divider{
    display:none;
  }

  .ger-hero-right{
    grid-template-columns: 1fr;
  }

  .ger-hero-value{
    font-size:36px;
  }
}

.ger-insight-card{
  min-height: 250px;
}

.ger-insight-grid{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap:14px;
  margin-top:10px;
}

.ger-insight-item{
  padding:14px;
  border-radius:14px;
  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.06);
  min-height:88px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}

.ger-insight-label{
  font-size:12px;
  color:#8fa4ca;
  font-weight:700;
}

.ger-insight-value{
  font-size:24px;
  font-weight:800;
  color:#eef4ff;
  line-height:1.1;
}

.ger-action-box{
  margin-top:16px;
  padding:14px;
  border-radius:14px;
  background:rgba(242,160,0,.06);
  border:1px solid rgba(242,160,0,.18);
}

.ger-action-title{
  font-size:12px;
  color:#ffd98a;
  font-weight:700;
  margin-bottom:6px;
  text-transform:uppercase;
  letter-spacing:.06em;
}

.ger-action-text{
  font-size:14px;
  line-height:1.6;
  color:#eaf1ff;
}

@media (max-width: 980px){
  .ger-insight-grid{
    grid-template-columns: 1fr;
  }
}

.ger-tarifa-big{
  font-size:22px;
  font-weight:800;
  color:#f2a000;
  line-height:1.2;
}

.ops-hero{
  display:grid;
  grid-template-columns: 1.2fr 1px 1fr;
  gap:20px;
  align-items:center;
  padding:22px;
  border:1px solid rgba(6,182,212,.18);
  background:linear-gradient(180deg, rgba(18,28,48,.98), rgba(10,16,30,.98));
}

.ops-hero-left{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.ops-hero-label{
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:.12em;
  color:#98aed5;
  font-weight:700;
}

.ops-state-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  width:max-content;
  padding:10px 18px;
  border-radius:14px;
  font-size:18px;
  font-weight:800;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.04);
  color:#eef4ff;
}

.ops-hero-sub{
  font-size:14px;
  color:#9cb0d3;
  line-height:1.5;
}

.ops-hero-divider{
  width:1px;
  height:100%;
  background:linear-gradient(180deg, transparent, rgba(255,255,255,.12), transparent);
}

.ops-hero-right{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:14px;
}

.ops-mini-card{
  padding:14px;
  border-radius:14px;
  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.06);
}

.ops-mini-label{
  font-size:12px;
  color:#8fa4ca;
  font-weight:700;
  margin-bottom:8px;
}

.ops-mini-value{
  font-size:20px;
  font-weight:800;
  color:#eef4ff;
}

.ops-big-card{
  min-height:155px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}

.ops-big-label{
  font-size:13px;
  color:#9bb0d4;
  font-weight:700;
}

.ops-big-value{
  display:flex;
  align-items:flex-end;
  gap:8px;
  font-size:40px;
  font-weight:800;
  color:#f4f7ff;
  line-height:1;
}

.ops-big-value .unit{
  font-size:16px;
  color:#8fb0e8;
  margin-bottom:6px;
}

.ops-big-state{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:max-content;
  min-height:32px;
  padding:6px 12px;
  border-radius:10px;
  font-size:12px;
  font-weight:800;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.04);
  color:#eaf1ff;
}

.ops-check-card{
  min-height:180px;
}

.ops-checklist{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin-top:10px;
}

.ops-check-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  border-radius:12px;
  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.06);
  color:#dce8ff;
}

.ops-check-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:72px;
  min-height:30px;
  padding:4px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.04);
}

.ops-diagnostic{
  margin-top:10px;
  padding:14px;
  border-radius:14px;
  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.06);
  font-size:15px;
  line-height:1.7;
  color:#eaf1ff;
}

.ops-chart-btn{
  background:#16213a;
  color:#dbe7ff;
  border:1px solid #2a3b63;
  border-radius:10px;
  padding:8px 14px;
  font-size:13px;
  font-weight:600;
  cursor:pointer;
  transition:all .2s ease;
}

.ops-chart-btn:hover{
  background:#1c2a49;
  border-color:#3a4e7e;
}

.ops-chart-btn.active{
  background:#06b6d4;
  color:#08111f;
  border-color:#06b6d4;
}

@media (max-width: 980px){
  .ops-hero{
    grid-template-columns: 1fr;
  }

  .ops-hero-divider{
    display:none;
  }

  .ops-hero-right{
    grid-template-columns: 1fr;
  }

  .ops-big-value{
    font-size:32px;
  }
}

.ops-sys{
  display:grid;
  gap:6px;
}

.ops-sys-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size:13px;
}

.ops-sys-section{
  font-size:11px;
  letter-spacing:.08em;
  color:var(--muted);
  margin-top:6px;
}

/* ===== Pipeline dinámico ===== */
.pipe-chip{
  transition: all .25s ease, opacity .25s ease, transform .25s ease;
}

.pipe-link{
  transition: opacity .25s ease;
}

.pipe-link .flow-dot,
.pipe-link .pipe-arrow{
  transition: all .25s ease;
}

/* Nodo OK */
.pipe-chip.is-ok{
  box-shadow: 0 0 0 1px rgba(34,197,94,.45), 0 0 16px rgba(34,197,94,.18);
  border-color: rgba(34,197,94,.45);
}

.pipe-chip.is-ok::after{
  content:"";
  position:absolute;
  inset:-1px;
  border-radius:inherit;
  pointer-events:none;
  box-shadow: 0 0 18px rgba(34,197,94,.14);
}

/* Nodo FAIL */
.pipe-chip.is-fail{
  box-shadow: 0 0 0 1px rgba(239,68,68,.50), 0 0 16px rgba(239,68,68,.20);
  border-color: rgba(239,68,68,.50);
}

/* Nodo downstream apagado */
.pipe-chip.is-off{
  opacity:.38;
  filter:grayscale(.25);
}

/* Link activo */
.pipe-link.is-on .flow-dot{
  background: var(--ok);
  box-shadow: 0 0 10px rgba(34,197,94,.55);
  animation: pipeFlowPulse 1s infinite ease-in-out;
}

.pipe-link.is-on .pipe-arrow{
  color: var(--ok);
  text-shadow: 0 0 8px rgba(34,197,94,.45);
}

/* Link cortado */
.pipe-link.is-off .flow-dot{
  background:#475569;
  box-shadow:none;
  animation:none;
}

.pipe-link.is-off .pipe-arrow{
  color:#64748b;
  text-shadow:none;
}

/* Badge superior */
.pipe-live.is-ok .live-dot{
  background: var(--ok);
  box-shadow: 0 0 10px rgba(34,197,94,.55);
}

.pipe-live.is-fail .live-dot{
  background: var(--bad);
  box-shadow: 0 0 10px rgba(239,68,68,.55);
}

@keyframes pipeFlowPulse{
  0%   { transform:scale(1); opacity:.7; }
  50%  { transform:scale(1.18); opacity:1; }
  100% { transform:scale(1); opacity:.7; }
}

/* =========================================================
   FORMACIÓN / EDUCATION VIEW
   Vista didáctica e interactiva para AquaSur 2026
========================================================= */

/* ---------- CONTENEDOR GENERAL ---------- */

.edu-section-card{
  position: relative;
  overflow: hidden;
}

.edu-section-card::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0));
}

.edu-badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 14px;
  border:1px solid rgba(242,160,0,.28);
  border-radius:999px;
  background:rgba(242,160,0,.08);
  color:#ffd27a;
  font-size:12px;
  font-weight:700;
  letter-spacing:.08em;
  margin-bottom:14px;
}

/* ---------- HERO ---------- */

.edu-hero,
.edu-hero-pro{
  position: relative;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:28px;
  flex-wrap:nowrap;
  overflow:hidden;
  background:
    radial-gradient(circle at 15% 20%, rgba(242,160,0,.10), transparent 25%),
    radial-gradient(circle at 85% 20%, rgba(59,130,246,.08), transparent 25%),
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01));
}

.edu-hero-left{
  flex:1 1 62%;
  min-width:0;
  position:relative;
  z-index:2;
}

.edu-hero-right{
  flex:0 0 320px;
  width:320px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  position:relative;
  z-index:2;
}

.edu-hero-divider{
  width:1px;
  align-self:stretch;
  background:linear-gradient(
    180deg,
    rgba(255,255,255,0),
    rgba(242,160,0,.22),
    rgba(255,255,255,0)
  );
  flex:0 0 1px;
}

.edu-hero-label{
  font-size:16px;
  color:#ffffff;
  margin-bottom:6px;
}

.edu-hero-title{
  font-size:34px;
  line-height:1.12;
  font-weight:800;
  max-width:none;
  color:var(--text);
  letter-spacing:-0.02em;
  text-wrap:balance;
}

.edu-hero-text{
  margin-top:14px;
  max-width:none;
  color:var(--muted);
  line-height:1.7;
  font-size:15px;
}

.edu-hero-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:20px;
}

.edu-action-btn{
  border:1px solid rgba(255,255,255,.08);
  background:#121d34;
  color:var(--text);
  border-radius:12px;
  padding:12px 16px;
  cursor:pointer;
  transition:.25s ease;
  font-weight:700;
  box-shadow:0 4px 12px rgba(0,0,0,.15);
}

.edu-action-btn:hover,
.edu-action-btn.active{
  border-color:rgba(242,160,0,.35);
  background:rgba(242,160,0,.10);
  transform:translateY(-1px);
  box-shadow:0 10px 22px rgba(242,160,0,.10);
}

/* ---------- ORBIT / EDGE ---------- */

.edu-orbit-card{
  position:relative;
  width:280px;
  height:280px;
  margin:0;
  border-radius:50%;
  border:1px solid rgba(255,255,255,.08);
  background:
    radial-gradient(circle at center, rgba(242,160,0,.10), transparent 45%),
    rgba(255,255,255,.02);
  box-shadow:
    inset 0 0 40px rgba(255,255,255,.02),
    0 12px 32px rgba(0,0,0,.18);
}

.edu-orbit-card::before{
  content:"";
  position:absolute;
  inset:18px;
  border-radius:50%;
  border:1px solid rgba(255,255,255,.05);
}

.edu-orbit-center{
  position:absolute;
  top:50%;
  left:50%;
  transform:translate(-50%,-50%);
  width:92px;
  height:92px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  letter-spacing:.06em;
  color:#fff3d8;
  background:linear-gradient(180deg, rgba(242,160,0,.22), rgba(242,160,0,.08));
  border:1px solid rgba(242,160,0,.35);
  box-shadow:0 0 24px rgba(242,160,0,.18);
}

.edu-orbit-node{
  position:absolute;
  width:68px;
  height:68px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  font-size:12px;
  font-weight:700;
  color:#dfe9ff;
  background:#18233d;
  border:1px solid rgba(255,255,255,.08);
  animation:eduFloat 4.5s ease-in-out infinite;
  box-shadow:0 0 18px rgba(0,0,0,.15);
  user-select:none;
}

.edu-orbit-node.n1{ top:6px; left:106px; animation-delay:0s; }
.edu-orbit-node.n2{ top:46px; right:16px; animation-delay:.4s; }
.edu-orbit-node.n3{ bottom:56px; right:6px; animation-delay:.8s; }
.edu-orbit-node.n4{ bottom:8px; left:106px; animation-delay:1.2s; }
.edu-orbit-node.n5{ bottom:56px; left:6px; animation-delay:1.6s; }
.edu-orbit-node.n6{ top:46px; left:16px; animation-delay:2s; }

.edu-mini-kpis{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
  margin-top:18px;
  width:100%;
}

.edu-mini-stat{
  border:1px solid rgba(255,255,255,.08);
  border-radius:16px;
  padding:14px;
  background:rgba(255,255,255,.02);
}

.edu-mini-stat-num{
  font-size:18px;
  font-weight:800;
  color:#ffd27a;
  margin-bottom:4px;
}

.edu-mini-stat-text{
  color:var(--muted);
  font-size:13px;
  line-height:1.5;
}

/* ---------- PANEL INTERACTIVO ---------- */

.edu-panel-card{
  overflow:hidden;
}

.edu-panel{
  display:none;
}

.edu-panel.active{
  display:block;
  animation:fadeSlide .35s ease;
}

.edu-journey-head{
  margin-bottom:18px;
}

.edu-journey-title{
  font-size:24px;
  font-weight:800;
  color:var(--text);
}

.edu-journey-sub{
  margin-top:6px;
  color:var(--muted);
}

.edu-journey-line{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:22px;
}

.edu-stage{
  min-width:160px;
  flex:1 1 160px;
  border:1px solid rgba(255,255,255,.08);
  background:#121d34;
  color:var(--text);
  border-radius:16px;
  padding:14px;
  text-align:left;
  cursor:pointer;
  transition:.25s ease;
  box-shadow:0 6px 16px rgba(0,0,0,.15);
}

.edu-stage:hover,
.edu-stage.active{
  transform:translateY(-2px);
  border-color:rgba(242,160,0,.35);
  background:rgba(242,160,0,.10);
  box-shadow:0 10px 24px rgba(242,160,0,.08);
}

.edu-stage-num{
  display:inline-flex;
  width:28px;
  height:28px;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  background:rgba(242,160,0,.18);
  color:#ffd27a;
  font-weight:800;
  margin-bottom:10px;
}

.edu-stage-name{
  display:block;
  font-weight:800;
  margin-bottom:4px;
}

.edu-stage-sub{
  display:block;
  font-size:12px;
  color:var(--muted);
}

.edu-stage-link{
  width:28px;
  height:2px;
  background:linear-gradient(90deg, rgba(242,160,0,.15), rgba(242,160,0,.45), rgba(242,160,0,.15));
  position:relative;
  overflow:hidden;
  border-radius:999px;
}

.edu-stage-link::after{
  content:"";
  position:absolute;
  top:50%;
  left:-20px;
  width:20px;
  height:6px;
  transform:translateY(-50%);
  border-radius:999px;
  background:rgba(242,160,0,.75);
  filter:blur(1px);
  animation:eduFlow 2.2s linear infinite;
}

.edu-stage-detail,
.edu-concept-detail{
  border:1px solid rgba(255,255,255,.08);
  border-radius:18px;
  padding:20px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015));
}

.edu-stage-detail-badge{
  display:inline-block;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(59,130,246,.10);
  color:#9ec3ff;
  font-size:12px;
  font-weight:700;
  margin-bottom:10px;
}

.edu-stage-detail-title{
  font-size:24px;
  font-weight:800;
  margin-bottom:10px;
  color:var(--text);
}

.edu-stage-detail-text{
  color:var(--muted);
  line-height:1.7;
  max-width:900px;
}

/* ---------- CONCEPTOS ---------- */

.edu-concepts-grid,
.edu-concepts-grid-pro{
  display:grid;
  gap:14px;
  margin-bottom:18px;
  grid-template-columns:repeat(3, minmax(0, 1fr));
}

.edu-concept-card{
  position:relative;
  border:1px solid rgba(255,255,255,.08);
  border-radius:18px;
  padding:18px;
  background:linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015));
  color:var(--text);
}

.edu-concept-card.interactive{
  cursor:pointer;
  transition:.25s ease;
}

.edu-concept-card.interactive:hover,
.edu-concept-card.interactive.active{
  transform:translateY(-2px);
  border-color:rgba(242,160,0,.30);
  box-shadow:0 12px 26px rgba(242,160,0,.08);
}

.edu-concept-icon{
  width:44px;
  height:44px;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  margin-bottom:12px;
  background:rgba(242,160,0,.12);
  color:#ffd27a;
}

.edu-concept-title{
  font-size:18px;
  font-weight:800;
  margin-bottom:8px;
}

.edu-concept-text{
  color:var(--muted);
  line-height:1.6;
  font-size:14px;
}

/* ---------- VARIABLES ---------- */

.edu-vars-grid,
.edu-vars-grid-pro{
  display:grid;
  gap:14px;
  margin-bottom:18px;
  grid-template-columns:repeat(4, minmax(0, 1fr));
}

.edu-var-card{
  position:relative;
  border:1px solid rgba(255,255,255,.08);
  border-radius:18px;
  padding:18px;
  background:linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015));
  color:var(--text);
}

.edu-var-card.interactive{
  cursor:pointer;
  transition:.25s ease;
}

.edu-var-card.interactive:hover,
.edu-var-card.interactive.active{
  transform:translateY(-2px);
  border-color:rgba(242,160,0,.30);
  box-shadow:0 12px 26px rgba(242,160,0,.08);
}

.edu-var-title{
  font-size:18px;
  font-weight:800;
  margin-bottom:8px;
}

.edu-var-text{
  color:var(--muted);
  line-height:1.6;
  font-size:14px;
}

/* ---------- CHECKLIST / GLOW ---------- */

.edu-glow-card{
  position:relative;
  overflow:hidden;
}

.edu-glow-card::before{
  content:"";
  position:absolute;
  inset:-40%;
  background:radial-gradient(circle, rgba(242,160,0,.08), transparent 45%);
  animation:eduRotate 12s linear infinite;
  pointer-events:none;
}

.edu-checklist{
  display:grid;
  gap:12px;
}

.edu-checklist.pro .edu-check-item{
  position:relative;
  padding-left:30px;
  color:var(--text);
  line-height:1.6;
}

.edu-checklist.pro .edu-check-item::before{
  content:"✓";
  position:absolute;
  left:0;
  top:0;
  width:20px;
  height:20px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(34,197,94,.14);
  color:#7ee7a3;
  font-size:12px;
  font-weight:800;
}

/* ---------- DE DATO A DECISIÓN ---------- */

.edu-decision-flow{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.edu-decision-flow.horizontal{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  flex-direction:row;
}

.edu-decision-step{
  flex:1 1 180px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:16px;
  padding:16px;
  background:rgba(255,255,255,.02);
}

.edu-decision-title{
  font-size:18px;
  font-weight:800;
  color:var(--text);
  margin-bottom:8px;
}

.edu-decision-text{
  color:var(--muted);
  line-height:1.6;
  font-size:14px;
}

.edu-decision-arrow{
  text-align:center;
  color:#f2a000;
  font-size:22px;
  font-weight:800;
}

.edu-decision-arrow.side{
  font-size:22px;
  color:#f2a000;
  opacity:.9;
}

/* ---------- LINKS ---------- */

.edu-links-grid{
  display:grid;
  grid-template-columns:repeat(5, minmax(0, 1fr));
  gap:14px;
}

.edu-link-card{
  border:1px solid rgba(255,255,255,.08);
  border-radius:18px;
  padding:18px;
  background:linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015));
  transition:.25s ease;
}

.edu-link-card:hover{
  transform:translateY(-3px);
  box-shadow:0 14px 30px rgba(0,0,0,.18);
  border-color:rgba(242,160,0,.20);
}

.edu-link-title{
  font-size:17px;
  font-weight:800;
  color:var(--text);
  margin-bottom:8px;
}

.edu-link-text{
  color:var(--muted);
  line-height:1.6;
  font-size:14px;
}

.edu-link-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-top:14px;
  padding:11px 14px;
  border-radius:12px;
  background:linear-gradient(180deg, rgba(242,160,0,.18), rgba(242,160,0,.10));
  border:1px solid rgba(242,160,0,.30);
  color:#ffd27a;
  font-weight:700;
  text-decoration:none;
  transition:.25s ease;
}

.edu-link-btn:hover{
  transform:translateY(-1px);
  background:linear-gradient(180deg, rgba(242,160,0,.24), rgba(242,160,0,.12));
}

/* ---------- APLICACIONES ---------- */

.edu-apply-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:14px;
}

.edu-apply-card{
  border:1px solid rgba(255,255,255,.08);
  border-radius:18px;
  padding:18px;
  background:linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015));
}

.edu-apply-title{
  font-size:17px;
  font-weight:800;
  color:var(--text);
  margin-bottom:8px;
}

.edu-apply-text{
  color:var(--muted);
  line-height:1.6;
  font-size:14px;
}

/* ---------- ANIMACIONES ---------- */

@keyframes eduFloat{
  0%,100%{ transform:translateY(0); }
  50%{ transform:translateY(-8px); }
}

@keyframes eduFlow{
  from{ left:-24px; }
  to{ left:100%; }
}

@keyframes eduRotate{
  from{ transform:rotate(0deg); }
  to{ transform:rotate(360deg); }
}

@keyframes fadeSlide{
  from{
    opacity:0;
    transform:translateY(8px);
  }
  to{
    opacity:1;
    transform:translateY(0);
  }
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 1400px){
  .edu-links-grid{
    grid-template-columns:repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1100px){
  .edu-concepts-grid,
  .edu-concepts-grid-pro{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  .edu-vars-grid,
  .edu-vars-grid-pro{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  .edu-apply-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  .edu-links-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px){
  .edu-hero,
  .edu-hero-pro{
    flex-direction:column;
    align-items:flex-start;
  }

  .edu-hero-divider{
    display:none;
  }

  .edu-hero-right{
    width:100%;
    flex:1 1 auto;
    align-items:center;
    margin-top:8px;
  }

  .edu-orbit-card{
    margin:0 auto;
  }
}

@media (max-width: 768px){
  .edu-hero-title{
    font-size:26px;
  }

  .edu-hero-text{
    font-size:14px;
  }

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

  .edu-action-btn{
    flex:1 1 100%;
    text-align:center;
  }

  .edu-orbit-card{
    width:240px;
    height:240px;
  }

  .edu-orbit-center{
    width:82px;
    height:82px;
    font-size:14px;
  }

  .edu-orbit-node{
    width:58px;
    height:58px;
    font-size:11px;
  }

  .edu-orbit-node.n1{ top:4px; left:91px; }
  .edu-orbit-node.n2{ top:38px; right:8px; }
  .edu-orbit-node.n3{ bottom:46px; right:0; }
  .edu-orbit-node.n4{ bottom:4px; left:91px; }
  .edu-orbit-node.n5{ bottom:46px; left:0; }
  .edu-orbit-node.n6{ top:38px; left:8px; }

  .edu-concepts-grid,
  .edu-concepts-grid-pro,
  .edu-vars-grid,
  .edu-vars-grid-pro,
  .edu-links-grid,
  .edu-apply-grid{
    grid-template-columns:1fr;
  }

  .edu-journey-line{
    flex-direction:column;
    align-items:stretch;
  }

  .edu-stage-link{
    width:2px;
    height:20px;
    margin:0 auto;
  }

  .edu-stage-link::after{
    width:6px;
    height:18px;
    top:-18px;
    left:50%;
    transform:translateX(-50%);
    animation:none;
    opacity:.55;
  }

  .edu-decision-flow.horizontal{
    flex-direction:column;
    align-items:stretch;
  }

  .edu-decision-arrow.side{
    transform:rotate(90deg);
    align-self:center;
  }
}

/* =========================================================
   REPORTES / REPORT CENTER
========================================================= */

.rep-toolbar-card{
  overflow:visible;
}

.rep-toolbar{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:18px;
  flex-wrap:wrap;
}

.rep-toolbar-left{
  min-width:280px;
}

.rep-toolbar-right{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.rep-select{
  min-width:320px;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.10);
  background:#10192d;
  color:var(--text);
  font-size:14px;
  outline:none;
}

.rep-btn{
  padding:12px 16px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.10);
  background:#121d34;
  color:var(--text);
  cursor:pointer;
  font-weight:700;
  transition:.2s ease;
}

.rep-btn:hover{
  transform:translateY(-1px);
  border-color:rgba(242,160,0,.28);
}

.rep-btn.primary{
  background:linear-gradient(180deg, rgba(242,160,0,.20), rgba(242,160,0,.10));
  border-color:rgba(242,160,0,.28);
  color:#ffd27a;
}

.rep-sheet-card{
  background:transparent;
  border:none;
  padding:0;
  box-shadow:none;
}

.report-sheet{
  background:#ffffff;
  color:#1c2434;
  border-radius:20px;
  padding:34px;
  box-shadow:0 18px 44px rgba(0,0,0,.20);
}

.report-header{
  display:flex;
  justify-content:space-between;
  gap:20px;
  border-bottom:2px solid #eef2f8;
  padding-bottom:20px;
  margin-bottom:18px;
  flex-wrap:wrap;
}

.report-kicker{
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
  color:#cc8b00;
  margin-bottom:8px;
  text-transform:uppercase;
}

.report-brand h2{
  margin:0;
  font-size:32px;
  line-height:1.1;
  color:#1c2434;
}

.report-subtitle{
  margin-top:8px;
  color:#5f6f8a;
  font-size:14px;
}

.report-meta{
  display:grid;
  gap:8px;
  min-width:260px;
  font-size:14px;
  color:#4d5c75;
}

.report-meta span{
  color:#7a879b;
}

.report-banner{
  background:linear-gradient(90deg, #f7f9fc, #f2f6fb);
  border:1px solid #e8eef7;
  color:#34445f;
  padding:14px 16px;
  border-radius:14px;
  margin-bottom:20px;
  font-weight:700;
}

.report-section{
  margin-top:22px;
}

.report-section-title{
  font-size:16px;
  font-weight:800;
  color:#24324a;
  margin-bottom:12px;
}

.report-summary{
  padding:16px 18px;
  border-radius:14px;
  background:#f7f9fc;
  border:1px solid #e9eef6;
  color:#4d5c75;
  line-height:1.7;
}

.report-kpi-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:14px;
}

.report-kpi-card{
  border:1px solid #e6edf6;
  background:#fbfcfe;
  border-radius:16px;
  padding:16px;
}

.report-kpi-label{
  color:#6d7c94;
  font-size:13px;
  margin-bottom:8px;
}

.report-kpi-value{
  font-size:28px;
  font-weight:800;
  color:#1f2d45;
}

.report-kpi-value .unit{
  font-size:14px;
  font-weight:700;
  color:#6d7c94;
}

.report-econ-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:14px;
}

.report-econ-card{
  border:1px solid #e6edf6;
  background:#fbfcfe;
  border-radius:16px;
  padding:16px;
}

.report-econ-label{
  color:#6d7c94;
  font-size:13px;
  margin-bottom:8px;
}

.report-econ-value{
  font-size:24px;
  font-weight:800;
  color:#1f2d45;
}

.report-econ-value .unit{
  font-size:13px;
  font-weight:700;
  color:#6d7c94;
}

.report-two-cols{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
}

.report-status-boxes{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.report-status-box{
  border:1px solid #e6edf6;
  background:#fbfcfe;
  border-radius:16px;
  padding:16px;
}

.report-status-label{
  color:#6d7c94;
  font-size:13px;
  margin-bottom:8px;
}

.report-status-value{
  font-size:22px;
  font-weight:800;
  color:#1f2d45;
}

.report-arch-list{
  display:grid;
  gap:10px;
}

.report-arch-item{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid #e6edf6;
  background:#fbfcfe;
  color:#4d5c75;
}

.report-arch-item b{
  color:#24324a;
}

.report-observations{
  padding:16px 18px;
  border-radius:14px;
  background:#f7f9fc;
  border:1px solid #e9eef6;
  color:#4d5c75;
  line-height:1.8;
  white-space:pre-line;
}

.report-footer{
  margin-top:28px;
  padding-top:18px;
  border-top:2px solid #eef2f8;
  color:#70809a;
  font-size:13px;
  display:grid;
  gap:6px;
}

@media (max-width: 1100px){
  .report-kpi-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  .report-econ-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  .report-two-cols{
    grid-template-columns:1fr;
  }
}

@media (max-width: 700px){
  .report-sheet{
    padding:22px;
  }

  .rep-select{
    min-width:100%;
    width:100%;
  }

  .rep-toolbar-right{
    width:100%;
  }

  .rep-btn{
    flex:1 1 100%;
  }

  .report-kpi-grid,
  .report-econ-grid,
  .report-status-boxes{
    grid-template-columns:1fr;
  }

  .report-brand h2{
    font-size:26px;
  }
}


.doughnut-wrap{
  height:210px;
  position:relative;
}

.doughnut-wrap canvas{
  width:100% !important;
  height:260px !important;
}

.chart-wrap{
  height:300px;
  position:relative;
}

.chart-wrap canvas{
  width:100% !important;
  height:300px !important;
}


/* =========================================================
   AJUSTES VISUALES REPORTE GERENCIAL Y TÉCNICO
========================================================= */

/* ---------- GERENCIAL ---------- */

.report-manager-sheet{
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.manager-header{
  border-bottom: 2px solid #e4edf8;
}

.mgr-hero-strip{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:14px;
  margin-bottom:22px;
}

.mgr-hero-box{
  border-radius:16px;
  padding:18px;
  background:linear-gradient(180deg, #1f4b99 0%, #163a78 100%);
  color:#fff;
  box-shadow:0 12px 28px rgba(22,58,120,.16);
}

.mgr-hero-label{
  font-size:13px;
  opacity:.86;
  margin-bottom:8px;
}

.mgr-hero-value{
  font-size:24px;
  font-weight:800;
  line-height:1.1;
}

.manager-summary{
  background:linear-gradient(180deg, #f4f8fd, #edf4fc);
}

.mgr-kpi-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:14px;
  margin-top:18px;
}

.mgr-kpi-grid.second{
  margin-top:14px;
}

.mgr-kpi-card{
  border-radius:18px;
  padding:18px;
  color:#1d2e47;
  box-shadow:0 12px 28px rgba(31,45,69,.08);
}

.mgr-kpi-card.money{
  background:linear-gradient(180deg, #e8fff2 0%, #dff6ea 100%);
  border:1px solid #cfeedd;
}

.mgr-kpi-card.warning{
  background:linear-gradient(180deg, #fff1e7 0%, #ffe8d9 100%);
  border:1px solid #ffd8bd;
}

.mgr-kpi-card.info{
  background:linear-gradient(180deg, #eef5ff 0%, #e4efff 100%);
  border:1px solid #d5e6ff;
}

.mgr-kpi-label{
  font-size:13px;
  color:#60718b;
  margin-bottom:10px;
}

.mgr-kpi-value{
  font-size:30px;
  font-weight:800;
  color:#173150;
  line-height:1.1;
}

.mgr-kpi-value.small{
  font-size:18px;
  line-height:1.35;
}

.mgr-kpi-value .unit{
  font-size:14px;
  font-weight:700;
  color:#60718b;
}

.mgr-kpi-sub{
  margin-top:10px;
  font-size:12px;
  color:#70809a;
}

.mgr-chart-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
  margin-top:22px;
}

.mgr-chart-card{
  border:1px solid #e3ecf8;
  border-radius:18px;
  padding:18px;
  background:#ffffff;
  box-shadow:0 10px 24px rgba(31,45,69,.05);
}

.mgr-chart-wrap{
  height:300px;
  position:relative;
}

.mgr-chart-wrap canvas{
  width:100% !important;
  height:300px !important;
}

.mgr-eff-bar-card{
  display:flex;
  flex-direction:column;
  justify-content:center;
  height:300px;
}

.mgr-eff-number{
  font-size:42px;
  font-weight:800;
  color:#183154;
  margin-bottom:16px;
}

.mgr-eff-bar{
  width:100%;
  height:22px;
  background:#e9eff8;
  border-radius:999px;
  overflow:hidden;
  position:relative;
}

.mgr-eff-fill{
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg, #ef4444 0%, #f59e0b 45%, #22c55e 100%);
  transition:width .5s ease;
}

.mgr-eff-scale{
  display:flex;
  justify-content:space-between;
  margin-top:12px;
  color:#74839b;
  font-size:12px;
}

.manager-obs{
  background:linear-gradient(180deg, #f7fbff 0%, #eef5fd 100%);
}

/* ---------- TÉCNICO ---------- */

.report-technical-sheet{
  background:linear-gradient(180deg, #ffffff 0%, #f9fbfe 100%);
}

.technical-header{
  border-bottom:2px solid #e4edf8;
}

.technical-banner{
  background:linear-gradient(180deg, #eef5ff 0%, #e8f0fb 100%);
}

.tech-table-wrap{
  overflow-x:auto;
  margin-top:10px;
}

.tech-table{
  width:100%;
  border-collapse:collapse;
  font-size:13px;
  background:#fff;
}

.tech-table th{
  background:#eff5fc;
  color:#28415f;
  font-weight:700;
  border:1px solid #d8e5f3;
  padding:10px 12px;
  text-align:left;
}

.tech-table td{
  border:1px solid #e2ebf5;
  padding:10px 12px;
  color:#43556f;
}

.tech-footnote{
  margin-top:10px;
  font-size:12px;
  color:#6c7c95;
}

.report-technical-sheet .mgr-kpi-grid{
  margin-top:12px;
}

.report-technical-sheet .mgr-kpi-card{
  min-height:120px;
}

.report-technical-sheet .mgr-chart-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
  margin-top:18px;
}

.report-technical-sheet .mgr-chart-card{
  border:1px solid #e3ecf8;
  border-radius:18px;
  padding:18px;
  background:#ffffff;
  box-shadow:0 10px 24px rgba(31,45,69,.05);
}

.report-technical-sheet .mgr-chart-wrap{
  height:260px;
  position:relative;
}

.report-technical-sheet .mgr-chart-wrap canvas{
  width:100% !important;
  height:260px !important;
}

.report-technical-sheet .manager-obs,
.report-technical-sheet .report-observations{
  background:linear-gradient(180deg, #f7fbff 0%, #eef5fd 100%);
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 1100px){
  .mgr-hero-strip,
  .mgr-kpi-grid,
  .report-technical-sheet .mgr-chart-grid,
  .mgr-chart-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px){
  .mgr-hero-strip,
  .mgr-kpi-grid,
  .mgr-chart-grid,
  .report-technical-sheet .mgr-chart-grid{
    grid-template-columns:1fr;
  }

  .mgr-kpi-value{
    font-size:26px;
  }

  .mgr-hero-value{
    font-size:22px;
  }

  .report-technical-sheet .mgr-chart-wrap,
  .mgr-chart-wrap{
    height:240px;
  }

  .report-technical-sheet .mgr-chart-wrap canvas,
  .mgr-chart-wrap canvas{
    height:240px !important;
  }
}

/* =========================================================
   IMPRESIÓN OPTIMIZADA DE REPORTES
========================================================= */

@media print{
  body *{
    visibility:hidden !important;
  }

  #view-rep,
  #view-rep *{
    visibility:visible !important;
  }

  .rep-toolbar-card{
    display:none !important;
  }

  .rep-sheet-card{
    position:absolute !important;
    left:0 !important;
    top:0 !important;
    width:100% !important;
    box-shadow:none !important;
    border:none !important;
    background:#fff !important;
    padding:0 !important;
    margin:0 !important;
  }

  .report-sheet{
    display:none !important;
    visibility:hidden !important;
  }

  .report-sheet[style*="display: block"]{
    display:block !important;
    visibility:visible !important;
    position:relative !important;
    width:100% !important;
    background:#fff !important;
    color:#000 !important;
    box-shadow:none !important;
    border:none !important;
    margin:0 !important;
    padding:24px !important;
  }

  .report-sheet[style*="display: block"] *{
    visibility:visible !important;
  }

  .report-sheet[style*="display: block"] .report-header,
  .report-sheet[style*="display: block"] .report-section,
  .report-sheet[style*="display: block"] .report-banner,
  .report-sheet[style*="display: block"] .report-footer,
  .report-sheet[style*="display: block"] .mgr-kpi-card,
  .report-sheet[style*="display: block"] .mgr-chart-card,
  .report-sheet[style*="display: block"] .report-kpi-card,
  .report-sheet[style*="display: block"] .report-econ-card,
  .report-sheet[style*="display: block"] .report-status-box,
  .report-sheet[style*="display: block"] .tech-table,
  .report-sheet[style*="display: block"] .tech-table th,
  .report-sheet[style*="display: block"] .tech-table td{
    color:#000 !important;
    background:#fff !important;
    border-color:#bbb !important;
    box-shadow:none !important;
  }

  canvas{
    max-width:100% !important;
  }

/* ===== FIX IMPRESION PDF ===== */

html, body {
  background:#fff !important;
}

.wrap,
#view-rep,
.grid,
.rep-sheet-card,
.report-sheet[style*="display: block"] {
  background:#fff !important;
}

.rep-sheet-card,
.report-sheet[style*="display: block"]{
  height:auto !important;
  min-height:0 !important;
  overflow:visible !important;
}

.report-footer{
  break-inside:avoid !important;
  page-break-inside:avoid !important;
}

.mgr-chart-card,
.mgr-hero-box,
.mgr-kpi-card,
.report-section,
.report-kpi-card,
.report-econ-card,
.report-status-box{
  break-inside:avoid !important;
  page-break-inside:avoid !important;
}

.wrap,
#view-rep,
.grid,
.rep-sheet-card{
  box-shadow:none !important;
  border:none !important;
}

}


.brand-strip{
  margin: 14px 0 10px;
  padding: 10px 16px;
  border: 1px solid rgba(100,140,220,.16);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(10,20,40,.88), rgba(8,16,30,.94));
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
}

.brand-strip-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.brand-item{
  flex: 1 1 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  padding: 12px 18px;
  background: rgba(255,255,255,.96);
  border-radius: 14px;
}

.brand-item-center{
  flex: 0 1 260px;
}

.brand-logo{
  max-width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

.dartel-logo{
  max-height: 60px;
}

.ila-logo{
  max-height: 72px;
}

.phoenix-logo{
  max-height: 58px;
}

@media (max-width: 900px){
  .brand-strip-inner{
    justify-content: center;
  }

  .brand-item,
  .brand-item-center{
    flex: 1 1 100%;
  }

  .dartel-logo,
  .ila-logo,
  .phoenix-logo{
    max-height: 54px;
  }
}

@media (max-width:700px){

  .grid{
    grid-template-columns: 1fr;
  }

  .chart-wrap{
    height:220px;
  }

  .hero-chart{
    height:240px;
  }

  .hero-value{
    font-size:36px;
  }

  .status-panel{
    justify-content:center;
  }

  .status-item{
    font-size:11px;
    padding:4px 8px;
  }


  .span-3,
  .span-4,
  .span-6,
  .span-12{
    grid-column: span 1;
  }

}


@media print {

  .chart-wrap,
  .doughnut-wrap,
  .mgr-chart-wrap {
    height: 260px !important;
    max-height: 260px !important;
  }

  .chart-wrap canvas,
  .doughnut-wrap canvas,
  .mgr-chart-wrap canvas {
    height: 100% !important;
    max-height: 260px !important;
  }

  canvas {
    aspect-ratio: 1 / 1 !important;
  }

}
