:root{
  --bg:#eef3fb; --surface:#ffffff; --surface2:#f8fbff; --text:#101828; --muted:#64748b;
  --blue:#073f8f; --blue2:#0b65d8; --gold:#f5b51b; --green:#17a56b; --red:#d94d5c;
  --line:#dce6f3; --shadow:0 22px 55px rgba(16,24,40,.09); --radius:24px;
}
*{box-sizing:border-box} body{margin:0;background:linear-gradient(135deg,#eef3fb,#f8fbff);font-family:Inter,system-ui,sans-serif;color:var(--text)}
button,input,select,textarea{font:inherit} button{cursor:pointer}
.app{display:grid;grid-template-columns:280px 1fr;min-height:100vh}
.sidebar{padding:24px;position:sticky;top:0;height:100vh;background:#071b3c;color:#fff;display:flex;flex-direction:column;gap:26px}
.brand{display:flex;gap:13px;align-items:center}.brand-mark{width:44px;height:44px;border-radius:16px;background:linear-gradient(135deg,var(--gold),#ffe38a);color:#071b3c;display:grid;place-items:center;font-weight:900;font-size:22px}.brand strong{display:block;font-size:18px}.brand span{font-size:13px;color:#a9bddb}
.menu{display:grid;gap:8px}.nav{border:0;background:transparent;color:#b8c9e5;border-radius:16px;padding:13px 14px;text-align:left;font-weight:700;display:flex;gap:10px;align-items:center}.nav.active,.nav:hover{background:rgba(255,255,255,.11);color:#fff}.nav span{color:var(--gold)}
.side-card{margin-top:auto;border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.08);border-radius:22px;padding:18px}.side-card span{color:#b8c9e5;font-size:13px}.side-card strong{display:block;font-size:40px;letter-spacing:-.06em;margin:8px 0}.mini-progress{height:10px;border-radius:999px;background:rgba(255,255,255,.15);overflow:hidden}.mini-progress i{display:block;height:100%;width:0;background:var(--gold);border-radius:999px}
.main{padding:28px 34px 46px;max-width:1500px;width:100%;margin:0 auto}.top{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:24px}.top p{margin:0;color:var(--blue);font-weight:800;text-transform:uppercase;letter-spacing:.12em;font-size:12px}.top h1{margin:6px 0 0;font-size:34px;letter-spacing:-.05em}.actions{display:flex;gap:10px;flex-wrap:wrap}.btn{border:0;border-radius:15px;padding:12px 16px;font-weight:800}.btn.primary{background:linear-gradient(135deg,var(--blue),var(--blue2));color:#fff;box-shadow:0 12px 24px rgba(7,63,143,.2)}.btn.soft{background:#fff;border:1px solid var(--line);color:var(--blue)}.btn.danger{color:var(--red)}
.page{display:none}.page.active{display:block}.hero{min-height:230px;border-radius:32px;background:radial-gradient(circle at 15% 0%,#1b73d8,transparent 34%),linear-gradient(135deg,#072b66,#071b3c);color:#fff;padding:34px;display:flex;justify-content:space-between;align-items:end;gap:24px;box-shadow:var(--shadow);margin-bottom:20px}.tag{display:inline-flex;border-radius:999px;background:rgba(245,181,27,.18);border:1px solid rgba(245,181,27,.35);color:#ffe39b;padding:7px 12px;font-weight:800;font-size:13px}.hero h2{max-width:720px;font-size:42px;line-height:1.02;letter-spacing:-.06em;margin:18px 0 12px}.hero p{max-width:650px;color:#c8d8ef;margin:0;font-size:16px}.hero-number{min-width:270px;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.18);border-radius:26px;padding:22px;text-align:right}.hero-number span{color:#c8d8ef}.hero-number strong{display:block;font-size:34px;margin-top:8px}
.kpi-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:20px}.kpi,.panel,.table-card,.meeting-column,.service-card{background:rgba(255,255,255,.9);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}.kpi{padding:20px}.kpi span{color:var(--muted);font-weight:700}.kpi strong{display:block;font-size:28px;letter-spacing:-.05em;margin:12px 0 6px}.kpi small{color:var(--blue);font-weight:800}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-bottom:18px}.panel{padding:22px}.panel-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.panel-head h3,.section-intro h2{margin:0;letter-spacing:-.03em}.panel-head span,.section-intro p{color:var(--muted)}
.funnel{display:grid;gap:12px}.funnel-row{display:grid;grid-template-columns:125px 1fr 140px;align-items:center;gap:14px}.funnel-row strong{font-size:14px}.bar{height:16px;border-radius:999px;background:#e8eef7;overflow:hidden}.bar i{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,var(--blue),var(--gold))}.funnel-row span{text-align:right;color:var(--muted);font-weight:700}
.alert-list,.clean-list{display:grid;gap:10px}.alert,.list-item{padding:14px;border-radius:18px;background:var(--surface2);border:1px solid var(--line);display:grid;grid-template-columns:1fr auto;gap:12px;align-items:center}.alert{grid-template-columns:auto 1fr}.dot{width:12px;height:12px;background:var(--gold);border-radius:999px}.list-item b{display:block}.list-item small{display:block;color:var(--muted);margin-top:4px}.list-item strong{color:var(--blue)}
.section-intro{margin:4px 0 20px}.section-intro h2{font-size:30px}.with-action{display:flex;justify-content:space-between;align-items:center;gap:20px}.filters{display:flex;gap:10px}.filters input,.filters select{border:1px solid var(--line);border-radius:16px;background:#fff;padding:13px 14px;min-width:230px}
.kanban{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}.kanban-col{background:rgba(255,255,255,.62);border:1px solid var(--line);border-radius:26px;padding:14px;min-height:610px}.kanban-head{padding:10px 8px 16px;display:flex;justify-content:space-between;align-items:center}.kanban-head h3{margin:0}.kanban-head span{font-weight:900;color:var(--blue)}.deal-card{background:#fff;border:1px solid var(--line);border-radius:20px;padding:15px;margin-bottom:12px;box-shadow:0 10px 26px rgba(16,24,40,.055)}.deal-card b{display:block;margin-bottom:6px}.deal-card p{color:var(--muted);font-size:13px;margin:0 0 12px;line-height:1.35}.deal-foot{display:flex;justify-content:space-between;align-items:center}.pill{display:inline-flex;padding:7px 10px;border-radius:999px;font-size:12px;font-weight:900}.pill.Negociación{background:#e8f1ff;color:var(--blue)}.pill.Programada{background:#fff3d1;color:#9a6800}.pill.Cerrada{background:#e6f8ef;color:var(--green)}.pill.Descartada{background:#fff0f2;color:var(--red)}
.table-card{overflow:hidden}table{width:100%;border-collapse:collapse;background:#fff}th,td{text-align:left;padding:16px;border-bottom:1px solid var(--line)}th{font-size:12px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);background:#f7faff}td{font-size:14px}.money{font-weight:900;color:var(--blue);white-space:nowrap}.row-service{color:var(--muted);max-width:420px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.linkbtn{border:0;background:#eff5ff;color:var(--blue);border-radius:12px;padding:9px 12px;font-weight:900}
.meeting-board{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.meeting-column{padding:18px}.meeting-column h3{margin:0 0 14px}.meeting-card{border:1px solid var(--line);background:#fff;border-radius:18px;padding:14px;margin-bottom:10px}.meeting-card b{display:block}.meeting-card span{display:block;color:var(--muted);font-size:13px;margin-top:5px}.meeting-card small{display:inline-block;margin-top:10px;color:var(--blue);font-weight:900}
.service-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.service-card{padding:20px}.service-card h3{margin:0 0 12px;font-size:17px}.service-card .big-money{font-size:26px;color:var(--blue);font-weight:900}.service-card p{color:var(--muted);margin:8px 0 0}.service-card .service-bar{height:10px;background:#e8eef7;border-radius:999px;margin-top:18px;overflow:hidden}.service-bar i{display:block;height:100%;background:linear-gradient(90deg,var(--blue),var(--gold));border-radius:999px}
.goals-layout{display:grid;grid-template-columns:1fr 1fr;gap:18px}.goal-panel h3{margin-top:0}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:14px 0}.form-grid label,.modal-grid label{color:var(--muted);font-size:13px;font-weight:800}.form-grid input,.modal-grid input,.modal-grid select,.modal-grid textarea{display:block;width:100%;margin-top:7px;border:1px solid var(--line);border-radius:15px;padding:12px;background:#fff;color:var(--text)}.goal-result{display:grid;grid-template-columns:1fr 1fr;gap:12px}.goal-result div{background:var(--surface2);border:1px solid var(--line);border-radius:18px;padding:18px}.goal-result span{display:block;color:var(--muted);font-weight:700}.goal-result strong{display:block;margin-top:8px;font-size:24px;color:var(--blue)}
dialog{border:0;padding:0;background:transparent}dialog::backdrop{background:rgba(7,27,60,.45);backdrop-filter:blur(6px)}.modal{width:min(920px,calc(100vw - 28px));background:#fff;border-radius:28px;padding:24px;box-shadow:0 40px 90px rgba(7,27,60,.25)}.modal-head{display:flex;justify-content:space-between;align-items:start;margin-bottom:20px}.modal-head span{color:var(--blue);font-weight:900;text-transform:uppercase;font-size:12px;letter-spacing:.12em}.modal-head h3{margin:6px 0 0;font-size:28px}.x{border:0;background:#f1f5fb;width:38px;height:38px;border-radius:999px;font-size:22px;color:var(--muted)}.modal-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.modal-grid .full{grid-column:1/-1}.modal-actions{display:flex;justify-content:space-between;align-items:center;margin-top:20px}.modal-actions div{display:flex;gap:10px}
@media(max-width:1150px){.app{grid-template-columns:1fr}.sidebar{position:relative;height:auto}.menu{grid-template-columns:repeat(3,1fr)}.kpi-grid,.kanban,.service-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:780px){.main{padding:18px}.top,.with-action,.hero{flex-direction:column;align-items:stretch}.grid-2,.kpi-grid,.kanban,.meeting-board,.service-grid,.goals-layout,.form-grid,.modal-grid{grid-template-columns:1fr}.hero h2{font-size:32px}.filters{flex-direction:column}.funnel-row{grid-template-columns:1fr}.funnel-row span{text-align:left}th:nth-child(2),td:nth-child(2){display:none}}


/* Informe Ejecutivo */
.report-hero{
  border-radius:32px;
  background:
    radial-gradient(circle at 85% 0%, rgba(245,181,27,.55), transparent 26%),
    linear-gradient(135deg,#ffffff,#eef5ff);
  border:1px solid var(--line);
  box-shadow:var(--shadow);
  padding:30px;
  display:flex;
  justify-content:space-between;
  gap:28px;
  align-items:end;
  margin-bottom:18px;
}
.report-hero h2{
  margin:14px 0 10px;
  font-size:36px;
  letter-spacing:-.055em;
  max-width:760px;
}
.report-hero p{
  margin:0;
  color:var(--muted);
  max-width:720px;
  line-height:1.55;
}
.tag.dark{
  background:#071b3c;
  color:#fff;
  border:0;
}
.report-total{
  min-width:260px;
  background:#071b3c;
  color:#fff;
  border-radius:26px;
  padding:22px;
  text-align:right;
}
.report-total span{
  color:#b8c9e5;
  font-weight:700;
}
.report-total strong{
  display:block;
  font-size:32px;
  margin-top:10px;
  letter-spacing:-.05em;
}
.report-kpis{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:16px;
  margin-bottom:18px;
}
.report-kpis article{
  background:#fff;
  border:1px solid var(--line);
  border-radius:24px;
  padding:20px;
  box-shadow:var(--shadow);
}
.report-kpis span{
  display:block;
  color:var(--muted);
  font-weight:800;
}
.report-kpis strong{
  display:block;
  margin-top:10px;
  font-size:26px;
  color:var(--blue);
  letter-spacing:-.045em;
}
.status-report{
  display:grid;
  gap:13px;
}
.status-row{
  display:grid;
  grid-template-columns:135px 1fr 150px;
  gap:14px;
  align-items:center;
  padding:12px;
  border-radius:18px;
  background:var(--surface2);
  border:1px solid var(--line);
}
.status-row b{
  font-size:14px;
}
.status-row small{
  color:var(--muted);
  font-weight:800;
  text-align:right;
}
.status-line{
  height:14px;
  background:#e8eef7;
  border-radius:999px;
  overflow:hidden;
}
.status-line i{
  display:block;
  height:100%;
  background:linear-gradient(90deg,var(--blue),var(--gold));
  border-radius:999px;
}
.executive-notes,.recommendations{
  display:grid;
  gap:12px;
}
.note-card,.rec-card{
  background:var(--surface2);
  border:1px solid var(--line);
  border-radius:20px;
  padding:15px;
}
.note-card b,.rec-card b{
  display:block;
  margin-bottom:6px;
}
.note-card p,.rec-card p{
  margin:0;
  color:var(--muted);
  line-height:1.45;
}
.ranking{
  display:grid;
  gap:10px;
}
.rank-row{
  display:grid;
  grid-template-columns:36px 1fr auto;
  gap:12px;
  align-items:center;
  background:#fff;
  border:1px solid var(--line);
  border-radius:18px;
  padding:12px;
}
.rank-num{
  width:36px;
  height:36px;
  display:grid;
  place-items:center;
  border-radius:12px;
  background:#eff5ff;
  color:var(--blue);
  font-weight:900;
}
.rank-row b{
  display:block;
}
.rank-row small{
  display:block;
  color:var(--muted);
  margin-top:4px;
}
.rank-row strong{
  color:var(--blue);
  white-space:nowrap;
}
@media(max-width:900px){
  .report-hero{flex-direction:column;align-items:stretch}
  .report-total{text-align:left;min-width:0}
  .report-kpis{grid-template-columns:1fr 1fr}
  .status-row,.rank-row{grid-template-columns:1fr}
  .status-row small{text-align:left}
}


/* Formulario para alimentar informe */
.feed-panel{
  background:#fff;
  border:1px solid var(--line);
  border-radius:28px;
  box-shadow:var(--shadow);
  padding:22px;
  margin-bottom:18px;
}
.feed-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  margin-bottom:16px;
}
.feed-head h3{
  margin:0;
  font-size:22px;
  letter-spacing:-.035em;
}
.feed-head p{
  margin:6px 0 0;
  color:var(--muted);
}
.feed-grid{
  display:grid;
  grid-template-columns:1.1fr 1.4fr .8fr .9fr .8fr .8fr;
  gap:12px;
  align-items:end;
}
.feed-grid label{
  color:var(--muted);
  font-size:13px;
  font-weight:800;
}
.feed-grid input,
.feed-grid select{
  display:block;
  width:100%;
  margin-top:7px;
  border:1px solid var(--line);
  border-radius:15px;
  padding:12px;
  background:#f8fbff;
  color:var(--text);
  outline:none;
}
.feed-grid input:focus,
.feed-grid select:focus{
  border-color:var(--blue2);
  box-shadow:0 0 0 4px rgba(11,101,216,.09);
}
.feed-grid .wide{
  grid-column:1 / span 5;
}
.feed-button{
  height:47px;
}
@media(max-width:1200px){
  .feed-grid{
    grid-template-columns:1fr 1fr;
  }
  .feed-grid .wide{
    grid-column:1 / -1;
  }
}
@media(max-width:700px){
  .feed-head{
    flex-direction:column;
    align-items:stretch;
  }
  .feed-grid{
    grid-template-columns:1fr;
  }
  .feed-grid .wide{
    grid-column:auto;
  }
}


/* v6 editable y botones estilizados */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  transition:.18s ease;
}
.btn:hover{
  transform:translateY(-1px);
  filter:saturate(1.08);
}
.linkbtn{
  transition:.18s ease;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.linkbtn:hover{
  transform:translateY(-1px);
  background:#dfeeff;
}
textarea{
  font-family:Inter,system-ui,sans-serif;
}
.feed-grid textarea,
.modal-grid textarea,
.config-textarea{
  display:block;
  width:100%;
  margin-top:7px;
  border:1px solid var(--line);
  border-radius:16px;
  padding:13px 14px;
  background:#f8fbff;
  color:var(--text);
  outline:none;
  resize:vertical;
  line-height:1.45;
}
.feed-grid textarea:focus,
.modal-grid textarea:focus,
.config-textarea:focus{
  border-color:var(--blue2);
  box-shadow:0 0 0 4px rgba(11,101,216,.09);
}
.status-actions{
  display:flex;
  gap:8px;
  justify-content:flex-end;
  flex-wrap:wrap;
}
.status-btn{
  border:0;
  border-radius:999px;
  padding:9px 12px;
  font-size:12px;
  font-weight:900;
  transition:.18s ease;
}
.status-btn:hover{
  transform:translateY(-1px);
}
.status-btn.edit{
  background:#eff5ff;
  color:var(--blue);
}
.status-btn.quick{
  background:#071b3c;
  color:#fff;
}
.config-layout{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
}
.config-panel .helper{
  color:var(--muted);
  margin:0 0 12px;
  line-height:1.45;
}
.config-actions{
  background:#fff;
  border:1px solid var(--line);
  border-radius:24px;
  box-shadow:var(--shadow);
  padding:18px;
  display:flex;
  justify-content:flex-end;
  gap:12px;
  margin-top:18px;
}
.small-modal{
  width:min(520px,calc(100vw - 28px));
}
.state-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
.state-option{
  min-height:74px;
  border:1px solid var(--line);
  border-radius:20px;
  font-weight:900;
  font-size:15px;
  transition:.18s ease;
}
.state-option:hover{
  transform:translateY(-2px);
  box-shadow:0 16px 35px rgba(16,24,40,.09);
}
.option-neg{
  background:#e8f1ff;
  color:var(--blue);
}
.option-prog{
  background:#fff3d1;
  color:#9a6800;
}
.option-ok{
  background:#e6f8ef;
  color:var(--green);
}
.option-bad{
  background:#fff0f2;
  color:var(--red);
}
.quick-edit-cell{
  white-space:nowrap;
}
@media(max-width:900px){
  .config-layout{
    grid-template-columns:1fr;
  }
  .status-actions{
    justify-content:flex-start;
  }
  .state-grid{
    grid-template-columns:1fr;
  }
}


/* v7: altura controlada, menos crecimiento vertical */
.main{
  padding-bottom:26px;
}
.hero{
  min-height:180px;
  padding:26px;
  margin-bottom:16px;
}
.hero h2{
  font-size:34px;
}
.hero-number{
  padding:18px;
}
.hero-number strong{
  font-size:28px;
}
.kpi-grid{
  gap:14px;
  margin-bottom:16px;
}
.kpi{
  padding:17px;
}
.kpi strong{
  font-size:24px;
  margin:9px 0 4px;
}
.panel{
  padding:18px;
}
.executive-dashboard{
  margin-bottom:16px;
}
.decision-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:12px;
}
.decision-card{
  background:linear-gradient(180deg,#ffffff,#f8fbff);
  border:1px solid var(--line);
  border-radius:20px;
  padding:15px;
  min-height:150px;
}
.decision-card .label{
  display:inline-flex;
  padding:6px 9px;
  border-radius:999px;
  font-size:11px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.05em;
  margin-bottom:10px;
}
.decision-card.risk .label{background:#fff0f2;color:var(--red)}
.decision-card.action .label{background:#fff3d1;color:#9a6800}
.decision-card.focus .label{background:#e8f1ff;color:var(--blue)}
.decision-card.result .label{background:#e6f8ef;color:var(--green)}
.decision-card b{
  display:block;
  font-size:15px;
  margin-bottom:7px;
}
.decision-card p{
  color:var(--muted);
  margin:0;
  line-height:1.38;
  font-size:13px;
}
.decision-card small{
  display:block;
  margin-top:10px;
  color:var(--blue);
  font-weight:900;
  line-height:1.35;
}

/* Paneles con altura máxima y scroll interno */
.kanban-compact{
  max-height:680px;
  overflow:auto;
  padding-right:4px;
}
.kanban-col{
  min-height:0;
  max-height:660px;
  overflow:auto;
}
.deal-card{
  padding:13px;
  border-radius:17px;
  margin-bottom:10px;
}
.deal-card p{
  max-height:38px;
  overflow:hidden;
}
.compact-scroll{
  max-height:620px;
  overflow:auto;
}
.compact-scroll table{
  min-width:980px;
}
.compact-scroll thead th{
  position:sticky;
  top:0;
  z-index:2;
}
td,th{
  padding:12px 14px;
}
.board-compact{
  max-height:650px;
  overflow:auto;
}
.meeting-column{
  max-height:630px;
  overflow:auto;
}
.meeting-card{
  padding:12px;
  border-radius:16px;
}
.service-compact{
  max-height:650px;
  overflow:auto;
  padding-right:4px;
}
.service-card{
  padding:16px;
}
.service-card h3{
  min-height:42px;
  max-height:42px;
  overflow:hidden;
}
.service-card .big-money{
  font-size:22px;
}
.ranking-compact{
  max-height:520px;
  overflow:auto;
  padding-right:4px;
}
.clean-list{
  max-height:360px;
  overflow:auto;
  padding-right:4px;
}
.alert-list{
  max-height:360px;
  overflow:auto;
  padding-right:4px;
}
.status-report{
  max-height:360px;
  overflow:auto;
  padding-right:4px;
}
.executive-notes,
.recommendations{
  max-height:520px;
  overflow:auto;
  padding-right:4px;
}
.feed-panel{
  padding:18px;
}
.feed-grid{
  grid-template-columns:1fr 1.4fr .75fr .9fr .75fr .8fr;
}
.feed-grid .wide{
  grid-column:1 / span 5;
}
.feed-grid textarea{
  min-height:46px;
  max-height:90px;
}
.report-hero{
  min-height:170px;
  padding:24px 30px;
  margin-bottom:16px;
}
.report-hero h2{
  font-size:31px;
}
.report-kpis{
  gap:14px;
  margin-bottom:16px;
}
.report-kpis article{
  padding:17px;
}
.report-kpis strong{
  font-size:23px;
}
::-webkit-scrollbar{
  width:10px;
  height:10px;
}
::-webkit-scrollbar-thumb{
  background:#c9d7ea;
  border-radius:999px;
  border:2px solid #f4f7fb;
}
::-webkit-scrollbar-track{
  background:#f4f7fb;
  border-radius:999px;
}
@media(max-width:1200px){
  .decision-grid{
    grid-template-columns:1fr 1fr;
  }
}
@media(max-width:760px){
  .decision-grid{
    grid-template-columns:1fr;
  }
  .compact-scroll{
    max-height:560px;
  }
}


/* v8 - pestañas internas del embudo */
.subtabs{
  display:flex;
  gap:10px;
  margin:0 0 16px;
}
.subtab{
  border:1px solid var(--line);
  background:#fff;
  color:var(--muted);
  border-radius:14px;
  padding:11px 15px;
  font-weight:900;
  transition:.18s ease;
}
.subtab.active{
  background:#071b3c;
  color:#fff;
  border-color:#071b3c;
}
.subtab:hover{
  transform:translateY(-1px);
}
.pipeline-view{
  display:none;
}
.pipeline-view.active{
  display:block;
}
.pipeline-tools{
  display:flex;
  gap:12px;
  margin-bottom:14px;
}
.pipeline-tools input,
.pipeline-tools select{
  border:1px solid var(--line);
  border-radius:15px;
  padding:12px 14px;
  background:#fff;
  color:var(--text);
  outline:none;
}
.pipeline-tools input{
  flex:1;
}
.pipeline-tools select{
  min-width:220px;
}
.pipeline-all-list{
  display:grid;
  gap:10px;
  max-height:620px;
  overflow:auto;
  padding-right:4px;
}
.pipeline-row{
  display:grid;
  grid-template-columns:1.1fr 1.2fr 160px 150px 130px;
  gap:14px;
  align-items:center;
  background:#fff;
  border:1px solid var(--line);
  border-radius:18px;
  padding:14px;
}
.pipeline-row .company{
  font-weight:900;
  display:block;
}
.pipeline-row .service{
  color:var(--muted);
  display:block;
  line-height:1.35;
}
.pipeline-row .meta{
  color:var(--muted);
  font-size:13px;
}
.pipeline-row .value{
  font-weight:900;
  color:var(--blue);
  white-space:nowrap;
}
.pipeline-row .actions{
  display:flex;
  justify-content:flex-end;
  gap:8px;
}
.pipeline-empty{
  padding:30px 12px;
  text-align:center;
  color:var(--muted);
  border:1px dashed var(--line);
  border-radius:18px;
  background:#f9fbff;
}
@media(max-width:980px){
  .pipeline-tools{
    flex-direction:column;
  }
  .pipeline-tools select{
    min-width:0;
  }
  .pipeline-row{
    grid-template-columns:1fr;
  }
  .pipeline-row .actions{
    justify-content:flex-start;
  }
}


/* v11 - Tarjeta corregida de cumplimiento del mes */
.compliance-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:24px;
  box-shadow:var(--shadow);
  padding:18px;
  margin-bottom:16px;
  display:grid;
  grid-template-columns:1fr 1fr .9fr;
  gap:18px;
  align-items:stretch;
}
.compliance-left,
.compliance-right,
.compliance-note{
  background:#f8fbff;
  border:1px solid var(--line);
  border-radius:20px;
  padding:16px;
}
.compliance-label{
  display:inline-flex;
  color:var(--blue);
  font-size:12px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.09em;
}
.compliance-title-row{
  display:flex;
  align-items:center;
  gap:12px;
  margin:8px 0 12px;
}
.compliance-title-row strong{
  font-size:34px;
  letter-spacing:-.07em;
  color:var(--blue);
}
.compliance-title-row span{
  background:#e8f1ff;
  color:var(--blue);
  border-radius:999px;
  padding:7px 10px;
  font-size:12px;
  font-weight:900;
}
.compliance-bar{
  height:16px;
  background:#e6edf7;
  border-radius:999px;
  overflow:hidden;
  margin-bottom:10px;
}
.compliance-bar i{
  display:block;
  height:100%;
  width:0%;
  min-width:4px;
  background:linear-gradient(90deg,var(--blue),var(--gold));
  border-radius:999px;
  transition:.35s ease;
}
.compliance-left p,
.compliance-note p{
  margin:0;
  color:var(--muted);
  line-height:1.45;
}
.origin-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.origin-head strong{
  font-size:14px;
}
.origin-head span{
  color:var(--muted);
  font-size:13px;
  font-weight:800;
}
.origin-bars{
  display:grid;
  gap:9px;
  max-height:130px;
  overflow:auto;
  padding-right:4px;
}
.origin-row{
  display:grid;
  grid-template-columns:105px 1fr 90px;
  gap:8px;
  align-items:center;
}
.origin-row b{
  font-size:12px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.origin-row small{
  text-align:right;
  color:var(--muted);
  font-size:12px;
  font-weight:800;
}
.origin-line{
  height:9px;
  background:#e6edf7;
  border-radius:999px;
  overflow:hidden;
}
.origin-line i{
  display:block;
  height:100%;
  background:linear-gradient(90deg,var(--blue),var(--gold));
  border-radius:999px;
}
.compliance-note strong{
  display:block;
  color:var(--blue);
  margin-bottom:8px;
}
@media(max-width:1100px){
  .compliance-card{
    grid-template-columns:1fr;
  }
}


/* v12 - Cumplimiento final estable */
.dash-compliance{
  display:grid;
  grid-template-columns:1fr 1.05fr .9fr;
  gap:14px;
  background:#ffffff;
  border:1px solid var(--line);
  border-radius:24px;
  box-shadow:var(--shadow);
  padding:16px;
  margin-bottom:16px;
}
.dash-compliance-main,
.dash-compliance-origin,
.dash-compliance-reading{
  background:#f8fbff;
  border:1px solid var(--line);
  border-radius:20px;
  padding:16px;
  min-height:150px;
}
.dash-compliance-head{
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:flex-start;
}
.dash-compliance-head span{
  color:var(--blue);
  font-size:12px;
  font-weight:900;
  letter-spacing:.09em;
  text-transform:uppercase;
}
.dash-compliance-head h3{
  margin:6px 0 0;
  font-size:38px;
  line-height:1;
  color:var(--blue);
  letter-spacing:-.07em;
}
.dash-compliance-status{
  background:#e8f1ff;
  color:var(--blue);
  border-radius:999px;
  padding:8px 11px;
  font-size:12px;
  font-weight:900;
  white-space:nowrap;
}
.dash-progress{
  height:18px;
  border-radius:999px;
  background:#e5edf8;
  overflow:hidden;
  margin:18px 0 12px;
}
.dash-progress i{
  display:block;
  height:100%;
  width:0%;
  background:linear-gradient(90deg,#073f8f,#f5b51b);
  border-radius:999px;
  transition:.35s ease;
}
.dash-compliance-values{
  display:flex;
  justify-content:space-between;
  gap:12px;
  font-size:14px;
}
.dash-compliance-values strong{
  color:var(--text);
}
.dash-compliance-values span{
  color:var(--muted);
  font-weight:800;
}
.dash-origin-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.dash-origin-head strong{
  font-size:14px;
}
.dash-origin-head span{
  color:var(--muted);
  font-size:13px;
  font-weight:800;
}
.dash-origin-bars{
  display:grid;
  gap:9px;
  max-height:104px;
  overflow:auto;
  padding-right:4px;
}
.dash-origin-row{
  display:grid;
  grid-template-columns:105px 1fr 84px;
  gap:8px;
  align-items:center;
}
.dash-origin-row b{
  font-size:12px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.dash-origin-row small{
  color:var(--muted);
  font-size:12px;
  text-align:right;
  font-weight:800;
}
.dash-origin-line{
  height:9px;
  background:#e5edf8;
  border-radius:999px;
  overflow:hidden;
}
.dash-origin-line i{
  display:block;
  height:100%;
  background:linear-gradient(90deg,#073f8f,#f5b51b);
  border-radius:999px;
}
.dash-compliance-reading strong{
  display:block;
  color:var(--blue);
  margin-bottom:8px;
}
.dash-compliance-reading p{
  margin:0;
  color:var(--muted);
  line-height:1.45;
  font-size:14px;
}
@media(max-width:1120px){
  .dash-compliance{
    grid-template-columns:1fr;
  }
}


/* v13 - servicios seleccionables y filtros */
.hidden{
  display:none !important;
}
.service-other input{
  border-color:var(--blue2) !important;
  background:#fff !important;
}
.pipeline-tools select,
.filters select{
  min-width:210px;
}
.feed-grid{
  grid-template-columns:1fr 1.25fr 1.05fr .75fr .9fr .75fr .8fr;
}
.feed-grid .service-other{
  grid-column:auto;
}
.feed-grid .wide{
  grid-column:1 / span 6;
}
@media(max-width:1300px){
  .feed-grid{
    grid-template-columns:1fr 1fr;
  }
  .feed-grid .wide{
    grid-column:1 / -1;
  }
}
@media(max-width:980px){
  .filters{
    flex-direction:column;
  }
  .filters input,
  .filters select{
    min-width:0;
    width:100%;
  }
}


/* v14 - Base de datos, clientes y tipo de cliente */
.client-summary{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:14px;
  margin-bottom:16px;
}
.client-summary article{
  background:#fff;
  border:1px solid var(--line);
  border-radius:22px;
  box-shadow:var(--shadow);
  padding:18px;
}
.client-summary span{
  display:block;
  color:var(--muted);
  font-weight:800;
}
.client-summary strong{
  display:block;
  margin-top:8px;
  color:var(--blue);
  font-size:25px;
  letter-spacing:-.04em;
}
.clients-list{
  display:grid;
  gap:10px;
  max-height:620px;
  overflow:auto;
  padding-right:4px;
}
.client-row{
  display:grid;
  grid-template-columns:1.1fr 150px 1fr 160px 120px;
  gap:12px;
  align-items:center;
  background:#fff;
  border:1px solid var(--line);
  border-radius:18px;
  padding:14px;
}
.client-row b{
  display:block;
}
.client-row small{
  display:block;
  color:var(--muted);
  margin-top:4px;
}
.client-type{
  display:inline-flex;
  width:max-content;
  border-radius:999px;
  padding:7px 10px;
  font-size:12px;
  font-weight:900;
}
.client-type.directo{
  background:#e8f1ff;
  color:var(--blue);
}
.client-type.arl{
  background:#fff3d1;
  color:#9a6800;
}
.db-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:14px;
}
@media(max-width:1100px){
  .client-summary{
    grid-template-columns:1fr 1fr;
  }
  .client-row{
    grid-template-columns:1fr;
  }
}
@media(max-width:650px){
  .client-summary{
    grid-template-columns:1fr;
  }
}


/* v15 - Base de datos rellenada desde Excel */
.db-table-wrap{
  max-height:620px;
  overflow:auto;
  border:1px solid var(--line);
  border-radius:18px;
}
.db-table{
  width:100%;
  min-width:1400px;
  border-collapse:collapse;
  background:#fff;
}
.db-table th{
  position:sticky;
  top:0;
  z-index:2;
  background:#f7faff;
}
.db-table th,
.db-table td{
  padding:12px 13px;
  border-bottom:1px solid var(--line);
  text-align:left;
  vertical-align:top;
  font-size:13px;
}
.db-table td:nth-child(4),
.db-table td:nth-child(10){
  max-width:300px;
  white-space:normal;
  line-height:1.35;
}
.db-table .money{
  white-space:nowrap;
}
.db-note{
  color:var(--muted);
}
