:root {
  --c-navy: #0f1e33; --c-navy-2: #172a45; --c-azul: #2a78d6; --c-fondo: #f3f5f8; --c-card: #ffffff;
  --c-borde: #e3e6ea; --c-txt: #0b0b0b; --c-txt2: #52514e; --c-txt3: #8a8984;
  --c-ok: #1a7f37; --c-mal: #c62828; --c-aviso: #a86a00;
  --sev-critica: #d03b3b; --sev-alta: #e37a00; --sev-media: #c9a300;
  --radio: 10px; --sombra: 0 1px 2px rgba(15, 30, 51, .06);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 14px; color: var(--c-txt); background: var(--c-fondo); }
a { color: var(--c-azul); }
#app { display: flex; min-height: 100vh; }

/* ---------- barra lateral */
.side { width: 240px; flex: 0 0 240px; background: var(--c-navy); color: rgba(255,255,255,.82); transition: background .25s; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.marca { display: flex; gap: 10px; align-items: center; padding: 20px 18px 16px; }
.marca .logo { width: 38px; height: 38px; border-radius: 9px; background: rgba(255,255,255,.16); color: #fff; font-weight: 700; font-size: 12px; display: grid; place-items: center; letter-spacing: .5px; }
.marca b { display: block; color: #fff; font-size: 14px; }
.marca span { font-size: 11.5px; color: rgba(255,255,255,.6); }
.side nav { flex: 1; overflow-y: auto; padding: 4px 10px; }
.nav-g { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.5); margin: 16px 10px 6px; }
.side nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: rgba(255,255,255,.82); text-decoration: none; font-size: 13.5px; }
.side nav a:hover { background: rgba(255,255,255,.1); color: #fff; }
.side nav a.on { background: rgba(255,255,255,.2); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 #fff; }
.side .ic { width: 18px; text-align: center; opacity: .85; }
.badge:not(:empty) { margin-left: auto; background: #e34948; color: #fff; border-radius: 9px; font-size: 10.5px; padding: 1px 6px; font-weight: 700; }
.side-pie { padding: 14px 18px; font-size: 12px; border-top: 1px solid rgba(255,255,255,.14); }
.chip-ok { color: #b9f3d0; } .chip-demo { background: #eda100; color: #1a1a19; padding: 3px 8px; border-radius: 10px; font-weight: 600; }

/* ---------- contenido */
main { flex: 1; min-width: 0; }
.top { position: sticky; top: 0; z-index: 20; background: rgba(243, 245, 248, .96); backdrop-filter: blur(6px); padding: 18px 28px 12px; border-bottom: 1px solid var(--c-borde); }
.top h1 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.top-fila { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; min-height: 44px; }
.top { border-top: 4px solid var(--c-azul); }
#contenido { padding: 20px 28px 60px; }
.filtros { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.fg { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fg label, .ms > label { font-size: 11.5px; color: var(--c-txt2); font-weight: 500; }
select, input[type=date], input[type=number], input:not([type]), input[type=password] {
  font: inherit; font-size: 13px; padding: 7px 10px; border: 1px solid var(--c-borde); border-radius: 8px; background: #fff; color: var(--c-txt); min-height: 34px; }
select:focus, input:focus { outline: 2px solid rgba(42, 120, 214, .35); border-color: var(--c-azul); }
.seg { display: inline-flex; background: #fff; border: 1px solid var(--c-borde); border-radius: 8px; overflow: hidden; }
.seg button { font: inherit; font-size: 12.5px; border: 0; background: transparent; padding: 7px 11px; cursor: pointer; color: var(--c-txt2); border-right: 1px solid var(--c-borde); }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--c-navy); color: #fff; }
.rango-txt { font-size: 13px; padding: 8px 2px; color: var(--c-txt2); }

/* selector múltiple */
.ms { position: relative; display: flex; flex-direction: column; gap: 4px; }
.ms-btn { font: inherit; font-size: 13px; min-width: 150px; max-width: 220px; text-align: left; padding: 7px 10px; border: 1px solid var(--c-borde); border-radius: 8px; background: #fff; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 34px; }
.ms-panel { display: none; position: absolute; top: 100%; left: 0; margin-top: 4px; width: 260px; background: #fff; border: 1px solid var(--c-borde); border-radius: 10px; box-shadow: 0 8px 24px rgba(15, 30, 51, .15); z-index: 50; padding: 8px; }
.ms.abierto .ms-panel { display: block; }
.ms-buscar { width: 100%; margin-bottom: 6px; }
.ms-lista { max-height: 240px; overflow-y: auto; }
.ms-op { display: flex; gap: 8px; align-items: center; padding: 5px 4px; font-size: 13px; cursor: pointer; border-radius: 6px; }
.ms-op:hover { background: var(--c-fondo); }
.ms-pie { display: flex; justify-content: space-between; margin-top: 8px; }

/* ---------- tarjetas KPI */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 10px; }
.kpis.k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi { background: var(--c-card); border: 1px solid var(--c-borde); border-left: 4px solid var(--kc); border-radius: var(--radio); padding: 12px 14px; box-shadow: var(--sombra); min-height: 104px; }
.kpi-t { font-size: 12px; color: var(--c-txt2); font-weight: 500; }
.kpi-v { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin: 2px 0; font-variant-numeric: tabular-nums; }
.kpi-s { font-size: 12.5px; color: var(--c-txt2); }
.kpi-d { font-size: 12px; margin-top: 4px; font-weight: 600; }
.kpi-d.up { color: var(--c-ok); } .kpi-d.down { color: var(--c-mal); } .kpi-d.flat { color: var(--c-txt3); }

/* ---------- tarjetas y rejillas */
.card { background: var(--c-card); border: 1px solid var(--c-borde); border-radius: var(--radio); padding: 16px 18px; margin: 14px 0; box-shadow: var(--sombra); }
.card h3 { margin: 0 0 12px; font-size: 15px; font-weight: 600; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-2 > .card, .grid-2-3 > .card { margin: 14px 0 0; }
.grid-2.sin-gap { gap: 18px; }
.grid-2-3 { display: grid; grid-template-columns: 2fr 3fr; gap: 14px; }
.ch { position: relative; width: 100%; }
.nota { font-size: 12.5px; color: var(--c-txt2); margin: 4px 0 10px; line-height: 1.45; }
.nota.mono { font-family: ui-monospace, Consolas, monospace; word-break: break-all; }
h2.sec { font-size: 16px; margin: 22px 0 8px; }
.banda-alerta { display: block; background: #fff4e0; border: 1px solid #f3d29a; color: #7a4a00; border-radius: var(--radio); padding: 10px 14px; margin-bottom: 14px; text-decoration: none; font-size: 13.5px; }
.banda-alerta:hover { background: #ffecc9; }

/* embudo */
.embudo { display: flex; flex-direction: column; gap: 14px; padding: 8px 0; }
.emb-fila { display: grid; grid-template-columns: 120px 1fr 90px; align-items: center; gap: 10px; }
.emb-n { font-size: 13px; color: var(--c-txt2); }
.emb-barra { background: #eef1f5; border-radius: 4px; height: 26px; }
.emb-barra div { height: 100%; border-radius: 4px; }
.emb-v { text-align: right; font-variant-numeric: tabular-nums; }
.emb-v b { display: block; font-size: 14px; }
.emb-v span { font-size: 12px; color: var(--c-txt2); }

/* ---------- tablas */
.tabla-scroll { overflow: auto; max-height: 560px; border: 1px solid var(--c-borde); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; font-size: 12.8px; }
thead th { position: sticky; top: 0; background: #f7f8fa; z-index: 1; }
th { text-align: left; font-weight: 600; color: var(--c-txt2); padding: 8px 10px; border-bottom: 1px solid var(--c-borde); white-space: nowrap; cursor: pointer; user-select: none; }
td { padding: 7px 10px; border-bottom: 1px solid #f0f1f3; white-space: nowrap; }
th.n, td.n { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:hover { background: #f7faff; }
tr.clic { cursor: pointer; } tr.sel { background: var(--c-suave) !important; }
.pag { display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding: 8px 2px 0; font-size: 12px; color: var(--c-txt2); }
.pag span { margin-right: auto; }
td.sev-Crítica::before, td.sev-Alta::before, td.sev-Media::before { content: '●'; margin-right: 6px; }
td.sev-Crítica::before { color: var(--sev-critica); } td.sev-Alta::before { color: var(--sev-alta); } td.sev-Media::before { color: var(--sev-media); }
.vacio { padding: 26px; text-align: center; color: var(--c-txt3); }
.vacio.grande { padding: 80px 20px; font-size: 15px; line-height: 2.6; }

/* mapa de calor */
.heat-wrap { overflow: auto; max-height: 520px; }
table.heat { width: auto; font-size: 11.5px; }
table.heat th { font-weight: 500; padding: 3px 6px; cursor: default; position: static; background: transparent; border: 0; }
table.heat tbody th { text-align: right; position: sticky; left: 0; background: #fff; }
table.heat td { text-align: center; padding: 4px 6px; min-width: 34px; border: 2px solid #fff; border-radius: 4px; font-variant-numeric: tabular-nums; }

/* ---------- botones, pestañas, chips */
.btn { font: inherit; font-size: 13.5px; font-weight: 500; padding: 9px 16px; border-radius: 8px; border: 1px solid var(--c-borde); background: #fff; cursor: pointer; color: var(--c-txt); text-decoration: none; display: inline-block; }
.btn:hover { border-color: #c3c9d2; }
.btn.prim { background: var(--c-azul); color: #fff; border-color: var(--c-azul); }
.btn.prim:hover { filter: brightness(.9); }
.btn.peligro { background: #fff; color: var(--c-mal); border-color: #f0c2c2; }
.btn-mini { font: inherit; font-size: 12px; padding: 5px 10px; border-radius: 7px; border: 1px solid var(--c-borde); background: #fff; cursor: pointer; }
.btn-mini.prim { background: var(--c-azul); color: #fff; border-color: var(--c-azul); }
.btn-mini:disabled { opacity: .45; cursor: default; }
.exportar { display: flex; gap: 6px; align-items: center; margin-top: 12px; font-size: 12px; color: var(--c-txt2); }
.tabs { display: inline-flex; gap: 4px; background: #eef1f5; padding: 3px; border-radius: 9px; flex-wrap: wrap; }
.tabs button { font: inherit; font-size: 13px; border: 0; background: transparent; padding: 6px 12px; border-radius: 7px; cursor: pointer; color: var(--c-txt2); }
.tabs button.on { background: #fff; color: var(--c-txt); font-weight: 600; box-shadow: var(--sombra); }
.tabs.grandes { margin-bottom: 6px; }
.barra { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: flex-end; margin-bottom: 12px; }
.chips { display: flex; gap: 12px; align-items: center; font-size: 13px; color: var(--c-txt2); flex-wrap: wrap; }
.chips label { display: flex; gap: 5px; align-items: center; cursor: pointer; color: var(--c-txt); }
.sev-chip { padding: 4px 10px; border-radius: 14px; border: 1px solid var(--c-borde); background: #fff; }
.fg.in { flex-direction: row; align-items: center; gap: 8px; }

/* recomendaciones */
.recos { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.reco { background: #fff; border: 1px solid var(--c-borde); border-left: 4px solid var(--c-azul); border-radius: var(--radio); padding: 12px 14px; box-shadow: var(--sombra); }
.reco.riesgo { border-left-color: var(--sev-critica); }
.reco b { font-size: 13.5px; }
.reco p { margin: 6px 0 0; font-size: 13px; color: var(--c-txt2); line-height: 1.5; }
.fila-desc { display: flex; gap: 10px; align-items: center; margin-top: 10px; font-size: 12.5px; flex-wrap: wrap; }
.fila-desc input { width: 90px; margin-left: 6px; }

/* carga y formularios */
.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 8px; }
.form.param { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.form .ancho { grid-column: 1 / -1; }
.drop { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 2px dashed #b9c6d8; border-radius: 12px; padding: 30px; margin: 10px 0; cursor: pointer; background: #fafcff; text-align: center; }
.drop.sobre { background: #eaf3ff; border-color: var(--c-azul); }
.drop input { display: none; }
.drop b { font-size: 15px; } .drop span { color: var(--c-txt2); font-size: 12.5px; }
details { margin-top: 10px; } summary { cursor: pointer; font-weight: 500; font-size: 13px; }
.msg { padding: 10px 12px; border-radius: 8px; margin: 8px 0; font-size: 13px; }
.msg.ok { background: #e8f6ec; color: #145c2a; } .msg.aviso { background: #fff4e0; color: #7a4a00; } .msg.error { background: #fdecec; color: #8f1d1d; }
.estado { font-size: 13px; color: var(--c-txt2); }
.acciones { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; align-items: center; }
table.editable td { padding: 4px 6px; }
table.editable input:not([type=checkbox]), table.editable select { width: 100%; min-height: 30px; padding: 4px 8px; }
table.editable th { cursor: default; }
td.c { text-align: center; }
.tag-nuevo { background: #fff4e0; color: #7a4a00; border-radius: 10px; padding: 2px 8px; font-size: 11.5px; }

/* pantalla de conexión */
body.sin-app { background: linear-gradient(135deg, #0f1e33 0%, #1b3558 100%); }
.conectar { width: 100%; min-height: 100vh; display: grid; place-items: center; padding: 30px 16px; }
.conectar-caja { background: #fff; border-radius: 16px; padding: 28px 30px; width: 100%; max-width: 480px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.conectar-caja .marca { padding: 0 0 12px; } .conectar-caja .marca b { color: var(--c-txt); } .conectar-caja .marca span { color: var(--c-txt2); }
.conectar-caja h2 { margin: 10px 0 4px; font-size: 18px; }
.conectar-caja .sub { margin: 0 0 14px; color: var(--c-txt2); font-size: 13px; }
.conectar-caja label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--c-txt2); font-weight: 500; margin-bottom: 10px; }
.conectar-caja .btn { width: 100%; margin-top: 4px; }
.separador { text-align: center; margin: 14px 0 10px; position: relative; color: var(--c-txt3); font-size: 12px; }
.separador::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--c-borde); }
.separador span { background: #fff; padding: 0 10px; position: relative; }
.pasos ol { padding-left: 18px; font-size: 13px; line-height: 1.55; color: var(--c-txt2); }
.pasos li { margin-bottom: 6px; }
.card ol { padding-left: 18px; font-size: 13px; line-height: 1.6; color: var(--c-txt2); }

/* avisos y progreso */
#toasts { position: fixed; bottom: 22px; right: 22px; z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast { background: var(--c-navy); color: #fff; padding: 11px 16px; border-radius: 9px; font-size: 13px; z-index: 200; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); max-width: 420px; }
.toast.error { background: #a32020; }
#progreso { position: fixed; inset: 0; background: rgba(15, 30, 51, .35); z-index: 150; display: flex; align-items: center; justify-content: center; gap: 12px; flex-direction: column; }
#progreso .ptxt { background: #fff; padding: 10px 16px; border-radius: 9px; font-size: 13px; max-width: 80vw; text-align: center; }
.spin { width: 34px; height: 34px; border: 3px solid rgba(255, 255, 255, .4); border-top-color: #fff; border-radius: 50%; animation: giro .8s linear infinite; }
@keyframes giro { to { transform: rotate(360deg); } }

/* ---------- responsive */
@media (max-width: 1200px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid-2-3 { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  #app { flex-direction: column; }
  .side { width: 100%; flex: none; height: auto; position: static; }
  .side nav { display: flex; flex-wrap: wrap; gap: 2px; } .nav-g { display: none; } .side-pie { display: none; }
  .grid-2 { grid-template-columns: 1fr; }
  .kpis, .kpis.k4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top { position: static; padding: 14px 16px; } #contenido { padding: 14px 16px 40px; }
}

.conectar-caja .marca .logo { background: var(--c-azul); }
:root { --c-suave: #eaf2fd; }

/* ---------- logos de campaña */
.logo-camp { display: inline-flex; align-items: center; justify-content: center; height: 30px; padding: 4px 10px; border-radius: 8px; border: 1px solid var(--c-borde); vertical-align: middle; }
.logo-camp img { max-height: 100%; max-width: 110px; display: block; }
.logo-camp.grande { height: 44px; padding: 6px 14px; }
.logo-camp.grande img { max-width: 170px; }

/* ---------- cuadro de cumplimiento (vista ejecutiva) */
.cuadro { background: var(--c-card); border: 1px solid var(--c-borde); border-top: 4px solid var(--cq); border-radius: var(--radio); padding: 14px 16px 16px; margin: 0 0 14px; box-shadow: var(--sombra); }
.cuadro-cab { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; text-align: left; background: none; border: 0; font: inherit; color: inherit; padding: 0; width: 100%; }
.cuadro-cab.clic { cursor: pointer; border-radius: 8px; }
.cuadro-cab.clic:hover b { text-decoration: underline; }
.cuadro-cab b { display: block; font-size: 16px; }
.cuadro-cab div > span { font-size: 12.5px; color: var(--c-txt2); }
.cuadro-grid { display: grid; gap: 12px; align-items: start; }
.cq { border: 1px solid var(--c-borde); border-radius: 8px; overflow: hidden; background: #fff; }
.cq-t { background: var(--cq); color: #fff; font-weight: 700; font-size: 12.5px; letter-spacing: .04em; text-align: center; padding: 7px 8px; }
.cq-t small { font-weight: 500; opacity: .85; letter-spacing: 0; }
.cq table { font-size: 12.5px; }
.cq td { padding: 5px 10px; border-bottom: 1px solid #eef0f3; white-space: normal; }
.cq td:first-child { color: var(--c-txt2); text-transform: uppercase; font-size: 11px; letter-spacing: .02em; }
.cq td.n { font-size: 13.5px; white-space: nowrap; }
.cq tr:last-child td { border-bottom: 0; }
.cq tr.cq-mtd td { background: var(--cq); color: #fff; font-weight: 700; }
.cq tr.cq-mtd td.n { font-size: 15px; }
.cq tr.cq-def td, .cq tr.cq-mes td { font-weight: 700; color: var(--c-txt); }
.cq.resumen .cq-t { background: #5b6472; }
.cq tbody tr:hover { background: transparent; }
.neg { color: var(--c-mal); font-weight: 700; } .pos { color: var(--c-ok); font-weight: 700; }
.cq-tabla { font-size: 13px; }
.cq-tabla th { cursor: default; background: #f7f8fa; position: static; }
.cq-tabla small { color: var(--c-txt3); }
.pildora { display: inline-block; min-width: 48px; text-align: center; padding: 2px 8px; border-radius: 10px; font-weight: 700; background: #eef0f3; }
.pildora.ok { background: #dff3e5; color: #145c2a; } .pildora.medio { background: #fff1d6; color: #7a4a00; } .pildora.bajo { background: #fde3e3; color: #8f1d1d; }
details.plegable { padding: 12px 18px; }
details.plegable > summary { font-size: 14px; font-weight: 600; }
details.plegable[open] > summary { margin-bottom: 12px; }
table.metas td.na { color: var(--c-txt3); font-size: 12px; font-style: italic; }
table.metas td { vertical-align: middle; }
@media (max-width: 1200px) { .cuadro-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 700px) { .cuadro-grid { grid-template-columns: 1fr !important; } .cuadro.compacto { overflow-x: auto; } }

.tabla-scroll { overflow-x: auto; }
table.metas th { white-space: nowrap; font-size: 12px; }
table.metas td:nth-child(2) { white-space: nowrap; }

/* ---------- barra de bancos (selector de campaña) */
.top { padding-top: 12px; }
.bancos { display: flex; gap: 8px; margin-bottom: 12px; overflow-x: auto; padding: 2px 2px 4px; scrollbar-width: thin; }
.banco { flex: 1 1 0; min-width: 104px; max-width: 190px; display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 0; font: inherit; color: var(--c-txt2);
  background: #fff; border: 1px solid var(--c-borde); border-radius: 10px; cursor: pointer; overflow: hidden; box-shadow: var(--sombra); transition: transform .12s, box-shadow .12s, border-color .12s; }
.banco:hover { transform: translateY(-1px); border-color: var(--bc); box-shadow: 0 3px 10px rgba(15, 30, 51, .12); }
.banco:focus-visible { outline: 2px solid var(--bc); outline-offset: 2px; }
.banco-logo { height: 38px; display: flex; align-items: center; justify-content: center; padding: 7px 10px; background: #f3f5f8; }
.banco-logo img { max-height: 100%; max-width: 100%; display: block; }
.banco-pie { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 5px 9px; font-size: 11.5px; border-top: 1px solid var(--c-borde); min-height: 28px; white-space: nowrap; }
.banco-pie b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.banco-pie .pildora { min-width: 0; padding: 1px 7px; font-size: 11px; }
.banco.on { border-color: var(--bc); box-shadow: 0 0 0 2px var(--bc), 0 4px 12px rgba(15, 30, 51, .14); color: var(--c-txt); }
.banco.on .banco-pie { background: var(--bc); border-top-color: var(--bc); color: #fff; }
.banco:not(.on) { opacity: .9; }
.banco.todas { flex: 0 0 104px; }
.mosaico { display: grid; grid-template-columns: repeat(2, 9px); gap: 3px; }
.mosaico i { width: 9px; height: 9px; border-radius: 2px; background: #9aa6b6; }
.banco.todas.on .mosaico i { background: var(--bc); }
.top-fila { flex-wrap: wrap; align-items: flex-end; margin-bottom: 0; min-height: 0; gap: 10px 24px; }
.top-fila h1 { padding-bottom: 4px; }
#filtros:empty { display: none; }

/* ---------- cargas, bases y metas */
.nota.intro { font-size: 13.5px; max-width: 900px; margin: 14px 0 0; }
.opciones { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; margin-bottom: 14px; }
.opcion { text-align: left; font: inherit; background: #fff; border: 1px solid var(--c-borde); border-radius: 10px; padding: 12px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.opcion b { font-size: 14px; } .opcion span { font-size: 12.5px; color: var(--c-txt2); line-height: 1.4; }
.opcion:hover { border-color: var(--c-azul); }
.opcion.on { border-color: var(--c-azul); box-shadow: 0 0 0 2px var(--c-azul); background: var(--c-suave); }
.destino { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border: 1px solid var(--c-borde); border-radius: 10px; background: var(--c-suave); min-height: 60px; }
.destino span { display: block; font-size: 11.5px; color: var(--c-txt2); } .destino b { font-size: 14.5px; }
.destino.vacio-d { background: #fff4e0; border-color: #f1d9a8; } .destino.vacio-d b { color: #7a4a00; font-size: 13.5px; }
.drop.inactiva { cursor: not-allowed; background: #f6f6f4; border-color: #d9d8d3; } .drop.inactiva b { color: var(--c-txt3); font-weight: 500; font-size: 14px; }
table.estado-carga, table.tabla-bases { width: 100%; border-collapse: collapse; font-size: 13px; }
table.estado-carga th, table.tabla-bases th { text-align: left; font-size: 11.5px; color: var(--c-txt2); font-weight: 600; padding: 6px 10px; border-bottom: 1px solid var(--c-borde); background: #f7f8fa; white-space: nowrap; cursor: default; position: static; }
table.estado-carga td, table.tabla-bases td { padding: 7px 10px; border-bottom: 1px solid #eef0f3; vertical-align: middle; white-space: nowrap; }
table.estado-carga tr.sel td, table.metas tr.sel td { background: var(--c-suave); }
table.tabla-bases th.n, table.tabla-bases td.n { text-align: right; }
.enlace-banco { font: inherit; background: none; border: 0; padding: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; font-weight: 600; color: var(--c-txt); }
.enlace-banco:hover { text-decoration: underline; }
.falta { color: #a04a00; font-weight: 600; } .listo { color: var(--c-ok); font-weight: 600; }
a.falta { text-decoration: underline; }
.barra-cob { display: inline-block; width: 90px; height: 8px; border-radius: 4px; background: #e6e9ee; overflow: hidden; vertical-align: middle; }
.barra-cob i { display: block; height: 100%; background: var(--c-azul); border-radius: 4px; }
.cob-txt { display: inline-block; margin-left: 8px; font-size: 12px; color: var(--c-txt2); min-width: 34px; }
.acciones.sin-margen { margin-top: 0; }
.fg.in .listo, .fg.in .falta { font-size: 12.5px; margin-left: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
label.btn-mini { display: inline-block; }
table.metas td.mt-conv { color: var(--c-txt2); font-size: 13px; }

/* ---------- plan para llegar a la meta */
h2.sec.primero { margin-top: 14px; }
.planes { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 12px; }
.plan { background: #fff; border: 1px solid var(--c-borde); border-top: 4px solid var(--cq); border-radius: var(--radio); padding: 12px 14px 8px; box-shadow: var(--sombra); }
.plan-cab { display: flex; align-items: center; gap: 12px; }
.plan-cab > div { flex: 1; min-width: 0; } .plan-cab b { display: block; font-size: 14.5px; } .plan-cab div > span { font-size: 12.5px; color: var(--c-txt2); }
.plan-cab div > span b { display: inline; font-size: inherit; color: var(--c-txt); }
.nivel { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 10px; white-space: nowrap; }
.nivel.riesgo { background: #fde3e3; color: #8f1d1d; } .nivel.aviso { background: #fff1d6; color: #7a4a00; } .nivel.ok { background: #dff3e5; color: #145c2a; }
.plan ul { list-style: none; margin: 10px 0 0; padding: 0; }
.plan li { position: relative; padding: 8px 0 8px 16px; border-top: 1px solid #eef0f3; font-size: 13px; line-height: 1.5; color: var(--c-txt2); }
.plan li b { color: var(--c-txt); }
.plan li::before { content: ''; position: absolute; left: 0; top: 14px; width: 8px; height: 8px; border-radius: 50%; background: #1a7f37; }
.plan li.aviso::before { background: #e39a00; } .plan li.riesgo::before { background: var(--sev-critica); }
@media (max-width: 900px) { .planes { grid-template-columns: 1fr; } .banco { min-width: 92px; } }

table.metas th { white-space: normal; line-height: 1.25; vertical-align: bottom; }
table.metas td { padding: 4px 5px; }
@media (max-width: 1400px) { table.metas th:first-child, table.metas td:first-child { display: none; } }
.planes.uno { grid-template-columns: minmax(0, 860px); }
.destino.neutro { background: #f7f8fa; } .destino.neutro b { font-size: 13.5px; font-weight: 600; }

.diag { background: #f7f8fa; border: 1px solid var(--c-borde); border-radius: 8px; padding: 10px 12px; margin: 8px 0 14px; font-size: 12.5px; line-height: 1.5; color: var(--c-txt2); }
.diag b { color: var(--c-txt); } .diag p { margin: 6px 0; } .diag ul { margin: 6px 0 0; padding-left: 18px; } .diag li { margin-bottom: 6px; }

/* ---------- cifrado */
.conectar-caja label.check { flex-direction: row; align-items: center; gap: 8px; font-size: 12.5px; margin: 4px 0 12px; cursor: pointer; }
.conectar-caja label.check input { width: auto; min-height: 0; }
.nota.cifra { font-size: 11.5px; margin-top: 12px; color: var(--c-txt3); }
.acciones.enlaces { justify-content: space-between; margin-top: 6px; }
button.enlace { font: inherit; font-size: 12.5px; background: none; border: 0; padding: 0; color: var(--c-azul); cursor: pointer; text-decoration: underline; }
.conectar-caja .acciones input { flex: 1; min-width: 120px; }
table.ficha { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 8px; }
table.ficha td { padding: 8px 10px; border-bottom: 1px solid #eef0f3; vertical-align: top; line-height: 1.5; white-space: normal; }
table.ficha td:first-child { width: 150px; color: var(--c-txt2); font-weight: 600; white-space: nowrap; }
table.ficha tbody tr:hover { background: transparent; }
.side-pie { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pie-bloq { font: inherit; font-size: 11.5px; background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 7px; padding: 3px 9px; cursor: pointer; }
.pie-bloq:hover { background: rgba(255,255,255,.22); }
