/* ============================================================
   Estilos — paleta aprobada (RUTA_DEFINICIONES C2)
   ============================================================ */
:root {
  --fondo: #f6f7f9;
  --superficie: #ffffff;
  --texto: #1f2937;
  --texto-2: #6b7280;
  --texto-3: #9ca3af;
  --borde: #e5e7eb;
  --borde-fuerte: #d1d5db;
  --principal: #111827;
  --enlace: #1d4ed8;

  --email: #2563eb;  --email-txt: #1d4ed8;  --email-bg: #eff4ff;
  --sms: #ea580c;    --sms-txt: #c2410c;    --sms-bg: #fff3eb;
  --wp: #16a34a;     --wp-txt: #15803d;     --wp-bg: #edfaf1;
  --ec: #7c3aed;     --ec-txt: #6d28d9;     --ec-bg: #f4efff;

  --rojo: #dc2626;   --rojo-txt: #b91c1c;   --rojo-bg: #fee2e2;
  --ambar: #f59e0b;  --ambar-txt: #92400e;  --ambar-bg: #fef3c7;
  --verde: #0d9488;  --verde-txt: #115e59;  --verde-bg: #ccfbf1;

  --radio: 10px;
  --fuente: 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--fondo); color: var(--texto); font-family: var(--fuente); font-size: 14px; }
a { color: var(--enlace); }
h1 { margin: 0; font-size: 26px; font-weight: 600; }
h2 { margin: 0; font-size: 16px; font-weight: 600; }
.mono { font-family: var(--mono); }
.muted { color: var(--texto-2); }
.oculto { display: none !important; }

/* ---------- Estructura ---------- */
.shell { display: flex; min-height: 100vh; }
.menu {
  width: 232px; flex-shrink: 0; background: var(--superficie); border-right: 1px solid var(--borde);
  padding: 20px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh;
  transition: width 0.15s ease;
}
.menu .marca { padding: 0 6px 18px 10px; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.menu .marca strong { display: block; font-size: 18px; letter-spacing: 0.08em; }
.menu .marca span { font-size: 12px; color: var(--texto-2); white-space: nowrap; }
.btn-menu { width: 32px; height: 32px; flex-shrink: 0; border: 1px solid var(--borde); border-radius: 8px; background: #fff; color: var(--texto-2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.btn-menu:hover { color: var(--texto); background: #f3f4f6; }
.menu a:not(.btn) {
  display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px;
  border-radius: 8px; font-size: 14px; font-weight: 500; text-decoration: none; color: #374151; white-space: nowrap;
}
.menu a:not(.btn):hover { background: #f3f4f6; }
.menu a.activo { background: var(--principal); color: #fff; }
.menu a.activo:hover { background: var(--principal); }
.menu .icono { flex-shrink: 0; }
.menu .seccion { margin: 14px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--texto-3); min-height: 14px; }
.menu .usuario { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid var(--borde); display: flex; flex-direction: column; gap: 8px; }
.menu .usuario strong { display: block; font-size: 13px; }
.menu .usuario span { font-size: 12px; color: var(--texto-2); }
.menu .usuario .acciones { display: flex; gap: 12px; flex-wrap: wrap; }
.menu .usuario .acciones .btn { gap: 4px; font-size: 13px; }
.menu .usuario .acciones .btn span { color: inherit; font-size: 13px; }

/* Contraído: solo íconos (el nombre aparece al pasar el mouse) */
.menu.colapsado { width: 64px; padding: 20px 8px; }
.menu.colapsado .texto { display: none; }
.menu.colapsado .marca { padding: 0 0 18px; justify-content: center; }
.menu.colapsado a:not(.btn) { justify-content: center; padding: 0; }
.menu.colapsado .seccion { margin: 10px 8px; border-top: 1px solid var(--borde); }
.menu.colapsado .usuario { padding: 12px 0 0; align-items: center; }
.menu.colapsado .usuario .acciones { flex-direction: column; align-items: center; gap: 14px; }

.contenido { flex-grow: 1; min-width: 0; padding: 28px 32px; display: flex; flex-direction: column; gap: 20px; }
.encabezado { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.encabezado .sub { font-size: 13px; color: var(--texto-2); margin-bottom: 4px; }

/* ---------- Tarjetas y tablas ---------- */
.tarjeta { background: var(--superficie); border: 1px solid var(--borde); border-radius: 12px; padding: 20px; }
.tarjeta.sin-padding { padding: 0; overflow: hidden; }
.tabla { width: 100%; border-collapse: collapse; font-size: 13px; }
.tabla th {
  text-align: left; padding: 10px 14px; background: #f9fafb; color: var(--texto-2); font-size: 12px;
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid var(--borde);
}
.tabla td { padding: 11px 14px; border-top: 1px solid #f0f1f3; vertical-align: middle; }
.tabla tr.inactivo td { color: var(--texto-3); }
.tabla .acciones { display: flex; gap: 8px; justify-content: flex-end; }
.vacio { padding: 28px; text-align: center; color: var(--texto-2); }

/* ---------- Formularios ---------- */
label.campo { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 500; color: #4b5563; }
input[type=text], input[type=password], input[type=date], input[type=time], input[type=number], input[type=search], select, textarea {
  height: 40px; padding: 0 12px; border: 1px solid var(--borde-fuerte); border-radius: 8px; background: #fff;
  font-family: inherit; font-size: 14px; color: var(--texto);
}
textarea { height: auto; padding: 10px 12px; line-height: 1.5; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid #93c5fd; outline-offset: 0; border-color: var(--email); }
.fila { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
.checks label { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.ayuda { font-size: 12px; color: var(--texto-2); }

/* ---------- Botones ---------- */
.btn {
  height: 40px; padding: 0 16px; border: 1px solid var(--borde-fuerte); border-radius: 8px; background: #fff;
  color: var(--texto); font-family: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.btn:hover { background: #f9fafb; }
.btn.primario { background: var(--principal); border-color: var(--principal); color: #fff; font-weight: 600; }
.btn.primario:hover { background: #1f2937; }
.btn.peligro { color: var(--rojo-txt); border-color: #fca5a5; }
.btn.chico { height: 32px; padding: 0 10px; font-size: 13px; }
.btn.enlace { border: none; background: none; color: var(--enlace); padding: 0; height: auto; }
.btn:disabled { opacity: 0.5; cursor: default; }

/* ---------- Pestañas ---------- */
.pestanas { display: flex; padding: 3px; background: var(--borde); border-radius: 10px; width: fit-content; }
.pestanas button {
  padding: 8px 16px; border: none; border-radius: 8px; background: none; font-family: inherit; font-size: 14px;
  font-weight: 500; color: #374151; cursor: pointer;
}
.pestanas button.activo { background: #fff; color: var(--principal); font-weight: 600; }

/* ---------- Etiquetas ---------- */
.etiqueta { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 10px; font-size: 12px; font-weight: 600; }
.etiqueta::before { content: ''; width: 6px; height: 6px; border-radius: 3px; background: currentColor; }
.etiqueta.gris { background: #f3f4f6; color: #4b5563; }
.etiqueta.verde { background: var(--verde-bg); color: var(--verde-txt); }
.etiqueta.rojo { background: var(--rojo-bg); color: var(--rojo-txt); }
.etiqueta.ambar { background: var(--ambar-bg); color: var(--ambar-txt); }
.etiqueta.email { background: var(--email-bg); color: var(--email-txt); }
.etiqueta.sms { background: var(--sms-bg); color: var(--sms-txt); }
.etiqueta.ec { background: var(--ec-bg); color: var(--ec-txt); }
.chip { display: inline-block; padding: 2px 8px; border-radius: 10px; background: #e5e7eb; font-size: 12px; font-weight: 500; }

/* ---------- Avisos ---------- */
.aviso { padding: 12px 14px; border-radius: 8px; font-size: 13px; }
.aviso.error { background: var(--rojo-bg); color: var(--rojo-txt); }
.aviso.ok { background: var(--verde-bg); color: var(--verde-txt); }
.aviso.info { background: var(--email-bg); color: var(--email-txt); }
.clave-temporal { font-family: var(--mono); font-size: 20px; font-weight: 500; padding: 12px 16px; background: #f3f4f6; border-radius: 8px; letter-spacing: 0.06em; user-select: all; }

#toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); padding: 12px 18px; border-radius: 8px;
  background: var(--principal); color: #fff; font-size: 14px; box-shadow: 0 6px 24px rgba(0,0,0,0.18); z-index: 50;
}
#toast.error { background: var(--rojo-txt); }

/* ---------- Diálogos ---------- */
dialog { border: none; border-radius: 12px; padding: 0; width: min(560px, 92vw); box-shadow: 0 20px 60px rgba(0,0,0,0.25); }
dialog::backdrop { background: rgba(17,24,39,0.45); }
dialog .cuerpo { padding: 22px; display: flex; flex-direction: column; gap: 16px; }
dialog .pie { padding: 14px 22px; border-top: 1px solid var(--borde); display: flex; justify-content: flex-end; gap: 10px; background: #f9fafb; }

/* ---------- Login ---------- */
.pantalla-centro { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.caja-login { width: min(400px, 100%); display: flex; flex-direction: column; gap: 18px; }
.caja-login .marca strong { font-size: 22px; letter-spacing: 0.08em; }
.caja-login form { display: flex; flex-direction: column; gap: 14px; }
.caja-login .btn { justify-content: center; }

/* ---------- Próximamente ---------- */
.proximamente { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }

/* ---------- Festivos ---------- */
.festivos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.festivo-quitado td:not(:last-child) { text-decoration: line-through; color: var(--texto-3); }

/* ---------- Diálogo ancho y detalle ---------- */
dialog.ancho { width: min(760px, 94vw); }
.detalle { display: flex; flex-direction: column; gap: 14px; }
.detalle .dato { display: flex; flex-direction: column; gap: 4px; }
.detalle .dato > span { font-size: 12px; font-weight: 600; color: var(--texto-2); text-transform: uppercase; letter-spacing: 0.04em; }
.formulario { display: flex; flex-direction: column; gap: 14px; }
.formulario .fila > .campo { flex: 1; }
.urls { display: flex; flex-direction: column; gap: 8px; }
.fila-url { display: flex; gap: 8px; align-items: center; }
.fila-url input:first-child { flex: 1; }
.nowrap { white-space: nowrap; }
.recorte { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabla tr.fila-click { cursor: pointer; }
.tabla tr.fila-click:hover td { background: #f9fafb; }

/* ---------- Calendario de estrategias ---------- */
.cal-semana { border-bottom: 1px solid var(--borde); }
.cal-semana:last-child { border-bottom: none; }
.cal-dias { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: #f9fafb; border-bottom: 1px solid var(--borde); }
.cal-dia { padding: 8px 10px; font-size: 13px; font-weight: 600; border-right: 1px solid var(--borde); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal-dia:last-child { border-right: none; }
.cal-dia.fuera { color: var(--texto-3); }
.cal-dia.hoy { background: var(--principal); color: #fff; }
.cal-dia.festivo:not(.hoy) { background: var(--ambar-bg); }
.cal-festivo { font-size: 11px; font-weight: 500; color: var(--ambar-txt); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-dia.hoy .cal-festivo { color: #fde68a; }
.cal-barras {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); row-gap: 4px; padding: 8px 0 10px;
  background-image: linear-gradient(to right, #eef0f3 1px, transparent 1px); background-size: calc(100% / 7) 100%;
}
.cal-vacia { padding: 12px; font-size: 12px; color: var(--texto-3); }
.barra {
  margin: 0 4px; padding: 0 8px; height: 26px; min-width: 0; display: flex; align-items: center; gap: 6px;
  border-radius: 6px; font-family: inherit; font-size: 12px; text-align: left; cursor: pointer; overflow: hidden; white-space: nowrap;
  border: 1px solid;
}
.barra .nombre { flex-grow: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.barra .fechas { flex-shrink: 0; opacity: 0.75; }
.barra .sigue { flex-shrink: 0; }
.barra:hover { filter: brightness(0.96); }
.barra:focus-visible { outline: 2px solid var(--email); outline-offset: 1px; }
.barra.programada { background: #e2e8f0; border-color: #cbd5e1; color: #334155; }
.barra.activa { background: var(--verde-bg); border-color: #5eead4; color: #134e4a; }
.barra.finalizada { background: #f3f4f6; border-color: var(--borde); color: var(--texto-2); }
.barra.cancelada { background: var(--rojo-bg); border-color: #fca5a5; color: #991b1b; text-decoration: line-through; }
.leyenda { gap: 14px; font-size: 13px; color: #4b5563; }
.leyenda-item { display: inline-flex; align-items: center; gap: 6px; }
.muestra.barra { width: 22px; height: 12px; padding: 0; margin: 0; cursor: default; }
.barra.corta .fechas { display: none; }

/* ---------- Plan de comunicaciones ---------- */
dialog.muy-ancho { width: min(1100px, 96vw); }
.error-texto { color: var(--rojo-txt); }
.texto-ambar { color: #b45309; }
.punto { display: inline-block; width: 10px; height: 10px; border-radius: 5px; margin-right: 6px; flex-shrink: 0; }
.punto.email { background: var(--email); }
.punto.ec { background: var(--ec); }
.punto.sms { background: var(--sms); }
.punto.wp { background: var(--wp); }
.etiqueta.wp { background: var(--wp-bg); color: var(--wp-txt); }
.etiqueta.est-incompleta { background: var(--rojo-bg); color: var(--rojo-txt); }
.etiqueta.est-revision { background: var(--ambar-bg); color: var(--ambar-txt); }
.etiqueta.est-lista { background: var(--verde-bg); color: var(--verde-txt); }
.etiqueta.est-programada { background: #dbeafe; color: #1e40af; }
.etiqueta.est-enviada { background: #f3f4f6; color: #374151; }
.etiqueta.est-cancelada { background: #f3f4f6; color: var(--texto-3); text-decoration: line-through; }
.txt-incompleta { color: var(--rojo-txt); }
.txt-revision { color: var(--ambar-txt); }
.txt-lista { color: var(--verde-txt); }
.txt-programada { color: #1e40af; }

/* Semana */
.sem-contenedor { overflow-x: auto; }
.sem-grid { display: grid; grid-template-columns: 130px repeat(6, minmax(150px, 1fr)); min-width: 1030px; }
.sem-esquina, .sem-dia { padding: 10px 14px; border-bottom: 1px solid var(--borde); border-right: 1px solid var(--borde); font-size: 14px; font-weight: 600; }
.sem-esquina { font-size: 12px; color: var(--texto-2); text-transform: uppercase; letter-spacing: 0.06em; position: sticky; left: 0; background: #fff; z-index: 2; }
.sem-dia { display: flex; flex-direction: column; gap: 2px; background: #fff; }
.sem-dia.hoy { background: var(--principal); color: #fff; }
.festivo-txt { font-size: 11px; font-weight: 500; color: var(--ambar-txt); }
.sem-dia.hoy .festivo-txt { color: #fde68a; }
.sem-canal { padding: 14px; border-bottom: 1px solid var(--borde); border-right: 1px solid var(--borde); display: flex; flex-direction: column; gap: 4px; position: sticky; left: 0; z-index: 1; }
.sem-canal .nombre { display: flex; align-items: center; font-weight: 600; font-size: 14px; }
.sem-canal.email { background: var(--email-bg); color: var(--email-txt); }
.sem-canal.ec { background: var(--ec-bg); color: var(--ec-txt); }
.sem-canal.sms { background: var(--sms-bg); color: var(--sms-txt); }
.sem-canal.wp { background: var(--wp-bg); color: var(--wp-txt); }
.sem-celda { padding: 10px; border-bottom: 1px solid var(--borde); border-right: 1px solid var(--borde); display: flex; flex-direction: column; gap: 8px; min-height: 64px; background: #fff; }
.sem-celda.hoy { background: #fafbfc; }
.sem-celda.bloqueada { background: repeating-linear-gradient(135deg, #f3f4f6 0 6px, #fff 6px 12px); }
.sem-celda.sobre { outline: 2px dashed var(--email); outline-offset: -4px; background: #f5f8ff; }
.sem-celda .motivo { font-size: 12px; color: var(--texto-2); }
.sem-celda .agregar { height: 30px; border: 1px dashed var(--borde-fuerte); border-radius: 8px; background: transparent; color: var(--texto-3); font-size: 16px; cursor: pointer; }
.sem-celda .agregar:hover { color: var(--texto); border-color: var(--texto-2); }

/* Tarjeta de comunicación */
.tarjeta-com { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 8px; border: 1px solid; text-align: left; font-family: inherit; color: var(--texto); cursor: pointer; width: 100%; }
.tarjeta-com.email { background: var(--email-bg); border-color: #c7d7fe; }
.tarjeta-com.ec { background: var(--ec-bg); border-color: #ddd0fb; }
.tarjeta-com.sms { background: var(--sms-bg); border-color: #fdd3b8; }
.tarjeta-com.wp { background: var(--wp-bg); border-color: #bfe8cc; }
.tarjeta-com.est-borde-cancelada, .tarjeta-com.est-borde-enviada { opacity: 0.7; }
.tarjeta-com:hover { filter: brightness(0.98); }
.tarjeta-com.arrastrando { opacity: 0.4; }
.tarjeta-com .fila-tarjeta { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.tarjeta-com .campana { font-size: 13px; font-weight: 600; line-height: 1.3; }
.tarjeta-com .hora { font-size: 12px; color: #374151; flex-shrink: 0; }
.tarjeta-com .segmento { font-size: 11px; color: #4b5563; overflow-wrap: anywhere; }
.falta { font-size: 11px; color: var(--rojo-txt); }

/* Día */
.tabla-dia td.falta { font-size: 12px; }
.tabla-dia tr.grupo td { padding: 10px 14px; border-top: 1px solid var(--borde); }
.tabla-dia tr.grupo.email td { background: var(--email-bg); }
.tabla-dia tr.grupo.ec td { background: var(--ec-bg); }
.tabla-dia tr.grupo.sms td { background: var(--sms-bg); }
.tabla-dia tr.grupo.wp td { background: var(--wp-bg); }
.nombre-grupo { display: flex; align-items: center; font-weight: 600; }
.resumen { padding: 10px 16px; background: #fff; border: 1px solid var(--borde); border-radius: 10px; display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--texto-2); }
.resumen strong { font-size: 20px; color: var(--texto); }

/* Mes */
.mes-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.mes-cab { padding: 10px 12px; font-size: 12px; font-weight: 600; color: var(--texto-2); background: #f9fafb; border-bottom: 1px solid var(--borde); }
.mes-dia { min-height: 132px; min-width: 0; padding: 8px 8px 10px; border: none; border-right: 1px solid var(--borde); border-bottom: 1px solid var(--borde); background: #fff; display: flex; flex-direction: column; gap: 4px; text-align: left; font-family: inherit; }
.mes-dia:nth-child(7n) { border-right: none; }
.mes-dia.sobre { outline: 2px dashed var(--email); outline-offset: -3px; background: #f5f8ff; }
.mes-cabecera { display: flex; align-items: center; gap: 6px; min-width: 0; margin-bottom: 2px; }
.mes-dia .num { font-size: 14px; font-weight: 600; border: none; background: none; padding: 2px 6px; border-radius: 13px; font-family: inherit; color: inherit; cursor: pointer; }
.mes-dia button.num:hover { background: #e5e7eb; }
.mes-dia.domingo .num { cursor: default; }
.mes-cabecera .festivo-txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-com { display: flex; align-items: center; gap: 5px; width: 100%; min-width: 0; padding: 3px 6px; border: 1px solid; border-radius: 6px; font-family: inherit; font-size: 11px; text-align: left; color: var(--texto); cursor: pointer; }
.mini-com.email { background: var(--email-bg); border-color: #c7d7fe; }
.mini-com.ec { background: var(--ec-bg); border-color: #ddd0fb; }
.mini-com.sms { background: var(--sms-bg); border-color: #fdd3b8; }
.mini-com.wp { background: var(--wp-bg); border-color: #bfe8cc; }
.mini-com.est-borde-enviada, .mini-com.est-borde-cancelada { opacity: 0.6; }
.mini-com.est-borde-cancelada .campana { text-decoration: line-through; }
.mini-com.arrastrando { opacity: 0.4; }
.mini-com:hover { filter: brightness(0.97); }
.mini-com .punto { width: 7px; height: 7px; margin-right: 0; }
.mini-com .hora { flex-shrink: 0; color: #374151; }
.mini-com .campana { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.mini-com .pend { width: 7px; height: 7px; border-radius: 4px; background: var(--rojo); flex-shrink: 0; }
.mas-com { border: none; background: none; padding: 2px 6px; font-family: inherit; font-size: 11px; font-weight: 600; color: var(--enlace); text-align: left; cursor: pointer; }
.mes-dia.fuera .num { color: var(--texto-3); }
.mes-dia.hoy .num { background: var(--principal); color: #fff; border-radius: 13px; padding: 2px 8px; align-self: flex-start; }
.mes-dia.festivo { background: #fffbeb; }
.mes-dia.domingo { cursor: default; background: repeating-linear-gradient(135deg, #f3f4f6 0 6px, #fff 6px 12px); }
.chip-canal { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 6px; font-size: 12px; }
.chip-canal > span:first-child { display: flex; align-items: center; }
.chip-canal.email { background: var(--email-bg); color: var(--email-txt); }
.chip-canal.ec { background: var(--ec-bg); color: var(--ec-txt); }
.chip-canal.sms { background: var(--sms-bg); color: var(--sms-txt); }
.chip-canal.wp { background: var(--wp-bg); color: var(--wp-txt); }
.chip-canal .pend { display: inline-block; width: 8px; height: 8px; border-radius: 4px; background: var(--rojo); margin-right: 6px; vertical-align: middle; }

/* Detalle */
.detalle-com { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; max-height: 72vh; overflow-y: auto; }
.col-com { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.seccion-com { border: 1px solid var(--borde); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.seccion-com h3, .lateral-com h3 { margin: 0; font-size: 14px; font-weight: 600; }
.etiqueta-campo { font-size: 12px; font-weight: 500; color: #4b5563; }
.lateral-com { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 0; }
.lateral-com .tarjeta { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.lateral-com .tarjeta .btn { justify-content: center; }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.checklist li { display: flex; justify-content: space-between; }
.checklist li.ok .marca { color: #0f766e; font-weight: 600; }
.checklist li.falta .marca { color: var(--rojo-txt); font-weight: 600; }
.checklist li.opcional { color: var(--texto-2); }
.acciones-com { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.nombre-sms { display: flex; flex-direction: column; gap: 4px; }
.nombre-sms code { font-family: var(--mono); font-size: 11px; padding: 6px 8px; background: #f3f4f6; border-radius: 6px; overflow-wrap: anywhere; }
.estrategias-com { display: flex; flex-direction: column; gap: 8px; }
.estr-com { padding: 10px 12px; border: 1px solid #99f6e4; background: #f0fdfa; border-radius: 8px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.url-legal { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.contador { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; background: #f9fafb; border-radius: 8px; font-size: 13px; }
.barra-sms { height: 8px; background: var(--borde); border-radius: 4px; display: flex; overflow: hidden; }
.barra-sms > div { background: var(--verde); }
.barra-sms > .exceso { background: var(--ambar); }
.car-esp { font-family: var(--mono); background: var(--rojo-bg); padding: 0 4px; border-radius: 4px; margin-left: 4px; }
.emojis { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; }
.emoji { width: 32px; height: 32px; border: none; background: transparent; font-size: 18px; cursor: pointer; border-radius: 6px; }
.emoji:hover { background: #f3f4f6; }
.selector-hora { display: flex; flex-direction: column; gap: 4px; }
.selector-hora select { width: auto; }
.pregunta { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.pregunta span { flex: 1; }
.pregunta label { display: flex; gap: 6px; align-items: center; }

/* ---------- Pendientes, checklist y alertas (Fase 3) ---------- */
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--rojo); color: #fff; font-size: 11px; font-weight: 700; margin-left: 8px; }
.menu a .badge { margin-left: auto; }
.menu.colapsado a { position: relative; }
.menu.colapsado a .badge { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; margin: 0; }
.alerta-vencida { color: var(--rojo-txt); }
.alerta-por-vencer { color: #b45309; }
.chip-alerta { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 6px; align-self: flex-start; }
.chip-alerta.vencida { background: var(--rojo-bg); color: var(--rojo-txt); }
.chip-alerta.por-vencer { background: var(--ambar-bg); color: var(--ambar-txt); }

.pendientes { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.grupo-pend { display: flex; flex-direction: column; gap: 10px; }
.titulo-grupo { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.titulo-grupo .punto-grupo { width: 8px; height: 8px; border-radius: 4px; background: var(--texto-2); }
.titulo-grupo.rojo { color: var(--rojo-txt); } .titulo-grupo.rojo .punto-grupo { background: var(--rojo); }
.titulo-grupo.ambar { color: var(--ambar-txt); } .titulo-grupo.ambar .punto-grupo { background: var(--ambar); }
.item-pend {
  display: grid; grid-template-columns: 110px minmax(0, 1fr) 230px; gap: 16px; align-items: center; padding: 14px 16px;
  background: #fff; border: 1px solid var(--borde); border-radius: 10px; text-align: left; font-family: inherit; color: var(--texto); cursor: pointer; width: 100%;
}
.item-pend:hover { border-color: var(--borde-fuerte); background: #fcfcfd; }
.item-pend > .etiqueta { justify-self: start; }
.cuerpo-pend { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 12px; }
.cuerpo-pend .campana { font-size: 14px; font-weight: 600; }
.tarea { font-size: 12px; }
.tarea-falta { color: var(--rojo-txt); }
.tarea-ajustar { color: var(--ambar-txt); }
.tarea-programar { color: #1e40af; }
.plazo-pend { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.plazo-pend .ayuda { text-transform: uppercase; letter-spacing: 0.04em; font-size: 11px; }
.plazo-pend strong { font-size: 14px; }
.notas { padding: 18px; position: sticky; top: 16px; max-height: calc(100vh - 60px); overflow-y: auto; }
.notas h2 { display: flex; align-items: center; font-size: 15px; }
.nota { display: flex; gap: 10px; padding: 10px 0; border: none; border-bottom: 1px solid #f0f1f3; background: none; text-align: left; font-family: inherit; color: var(--texto); width: 100%; }
button.nota { cursor: pointer; }
button.nota:hover .texto-nota > span:first-child { text-decoration: underline; }
.nota .punto-nota { width: 8px; height: 8px; flex-shrink: 0; margin-top: 6px; border-radius: 4px; background: var(--email); }
.nota.leida .punto-nota { background: var(--borde-fuerte); }
.nota.leida .texto-nota > span:first-child { color: var(--texto-2); }
.texto-nota { display: flex; flex-direction: column; gap: 3px; font-size: 13px; line-height: 1.4; }

.tabla-checklist th.chk, .tabla-checklist td.chk { text-align: center; padding-left: 6px; padding-right: 6px; }
.tabla-checklist td.chk.ok { color: #0f766e; font-weight: 700; }
.tabla-checklist td.chk.falta { color: var(--rojo-txt); font-weight: 700; background: #fff5f5; }
.tabla-checklist td.chk.opcional, .tabla-checklist td.chk.na { color: var(--texto-3); }
.plazo-detalle { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; background: #f9fafb; border-radius: 8px; font-size: 13px; }

/* ---------- Historial (Fase 4) ---------- */
.historial { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.historial.tarjeta { padding: 6px 18px; }
.evento { padding: 12px 0; border-bottom: 1px solid #f0f1f3; display: flex; flex-direction: column; gap: 6px; }
.evento:last-child { border-bottom: none; }
.evento-cab { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.evento-detalle { margin: 0; padding-left: 18px; font-size: 12px; color: #4b5563; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }

/* ---------- Buscador de estrategias (combo) ---------- */
.combo { position: relative; }
.combo input { width: 100%; }
.combo-lista { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; max-height: 280px; overflow-y: auto; background: #fff; border: 1px solid var(--borde-fuerte); border-radius: 10px; box-shadow: 0 10px 30px rgba(17,24,39,0.15); }
.combo-op { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.combo-op.activa, .combo-op:hover { background: #f0fdfa; }
.combo-titulo { font-size: 13px; font-weight: 600; }
.combo-sub { font-size: 12px; color: var(--texto-2); display: flex; align-items: center; flex-wrap: wrap; }
.combo-vacio { padding: 10px; font-size: 13px; color: var(--texto-2); }

/* ---------- Estrategias sin URL de Tuleap ---------- */
.barra.sin-url { border-style: dashed; border-color: #f87171; }
.barra .marca-sin-url { flex-shrink: 0; color: var(--rojo-txt); font-size: 12px; }
.filtro-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #374151; white-space: nowrap; }

/* ---------- Tráfico gráfico ---------- */
.etiqueta.sol-pendiente { background: #f3f4f6; color: #374151; }
.etiqueta.sol-proceso { background: #dbeafe; color: #1e40af; }
.etiqueta.sol-revision { background: var(--ambar-bg); color: var(--ambar-txt); }
.etiqueta.sol-entregado { background: var(--verde-bg); color: var(--verde-txt); }
.etiqueta.sol-cancelada { background: #f3f4f6; color: var(--texto-3); text-decoration: line-through; }
.chip-urgente { display: inline-block; padding: 1px 7px; border-radius: 6px; background: var(--rojo); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: 0.02em; }
.nombre-sol { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tabla-sol td { vertical-align: top; }
.piezas { display: flex; flex-direction: column; gap: 8px; }
.fila-pieza { display: flex; gap: 8px; align-items: center; }
.fila-pieza select { width: 230px; flex: none; }
.fila-pieza input { flex: 1; min-width: 0; }
.fila-pieza input.cantidad { flex: none; width: 110px; }
.coms-sol { display: flex; flex-direction: column; gap: 8px; }
.com-sol { border: 1px solid var(--borde); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; }
.legales { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; font-size: 13px; }

/* Tablero por estado */
.tablero { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 14px; align-items: start; overflow-x: auto; }
.col-tablero { background: #eef0f3; border-radius: var(--radio); padding: 10px; display: flex; flex-direction: column; gap: 10px; min-height: 300px; border: 2px solid transparent; }
.col-tablero.sobre { border-color: var(--email); border-style: dashed; background: #f5f8ff; }
.col-tablero-cab { display: flex; align-items: center; gap: 8px; padding: 2px 4px; }
.contador-col { font-size: 12px; font-weight: 700; color: var(--texto-2); background: #fff; border-radius: 10px; padding: 1px 8px; }
.col-tablero-cuerpo { display: flex; flex-direction: column; gap: 8px; }
.col-vacia { font-size: 12px; color: var(--texto-3); text-align: center; padding: 18px 0; }
.tarjeta-sol { background: #fff; border: 1px solid var(--borde); border-left: 4px solid var(--borde-fuerte); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 5px; cursor: pointer; box-shadow: 0 1px 2px rgba(17,24,39,0.05); }
.tarjeta-sol:hover { box-shadow: 0 3px 10px rgba(17,24,39,0.10); }
.tarjeta-sol.arrastrando { opacity: 0.4; }
.tarjeta-sol.prioridad-alta { border-left-color: var(--rojo); }
.tarjeta-sol.prioridad-media { border-left-color: var(--ambar); }
.tarjeta-sol.prioridad-baja { border-left-color: var(--borde-fuerte); }
.tarjeta-sol-cab { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.tarjeta-sol-cab .etiqueta { margin-left: auto; }
.tarjeta-sol-nombre { font-size: 13px; line-height: 1.3; }
.tarjeta-sol-piezas { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tarjeta-sol-pie { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.tarjeta-sol-pie .avatar { margin-left: auto; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 12px; background: var(--principal); color: #fff; font-size: 10px; font-weight: 700; flex-shrink: 0; }
.avatar.sin-asignar { background: #e5e7eb; color: var(--texto-2); }

/* Calendario de entregas */
.titulo-mes { font-size: 15px; margin-right: 4px; }
.mes-dia.dia-sol { min-height: 112px; }
.mes-dia.dia-sol .num { cursor: default; }
.mes-dia.no-habil:not(.festivo) { background: #fafafa; }
.mini-sol { display: flex; align-items: center; gap: 5px; width: 100%; min-width: 0; padding: 3px 6px; border: 1px solid var(--borde); border-left-width: 3px; border-radius: 6px; background: #fff; font-family: inherit; font-size: 11px; text-align: left; color: var(--texto); cursor: pointer; }
.mini-sol:hover { filter: brightness(0.97); }
.mini-sol .punto { width: 7px; height: 7px; border-radius: 4px; background: currentColor; flex-shrink: 0; }
.mini-sol .nombre { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; color: var(--texto); }
.mini-sol.vencida { background: var(--rojo-bg); }
.mini-sol.por-vencer { background: var(--ambar-bg); }
.urg { display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; border-radius: 3px; background: var(--rojo); color: #fff; font-size: 10px; font-weight: 800; flex-shrink: 0; }
.muestra-sol { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--borde); border-left-width: 4px; background: #fff; }
.sol-borde-pendiente { border-left-color: #9ca3af; color: #6b7280; }
.sol-borde-proceso { border-left-color: #2563eb; color: #2563eb; }
.sol-borde-revision { border-left-color: var(--ambar); color: var(--ambar); }
.sol-borde-entregado { border-left-color: var(--verde); color: var(--verde); opacity: 0.75; }
.sol-borde-cancelada { border-left-color: #d1d5db; color: #d1d5db; opacity: 0.6; }
.mini-sol.sol-borde-cancelada .nombre { text-decoration: line-through; }
.sol-relacionadas { display: flex; flex-direction: column; gap: 6px; }
.sol-relacionada { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 10px; border: 1px solid var(--borde); border-radius: 8px; background: #fff; font-family: inherit; font-size: 13px; text-align: left; color: var(--texto); cursor: pointer; }
.sol-relacionada:hover { background: #f9fafb; }
.sol-relacionada .nombre { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }

/* Categoría de estrategia (F1) */
.etiqueta.cat-macro { background: #e0e7ff; color: #3730a3; }
.etiqueta.cat-reactiva { background: #fce7f3; color: #9d174d; }
.marca-cat { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border-radius: 4px; font-size: 10px; font-weight: 800; flex-shrink: 0; background: rgba(255,255,255,0.85); }
.marca-cat.macro { color: #3730a3; }
.marca-cat.reactiva { color: #9d174d; }
.bloque-cupon { display: flex; flex-direction: column; gap: 6px; }
div.item-pend { cursor: pointer; }

/* Aprobación jurídica (F2) */
.aprobacion-copy { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 8px; border-top: 1px dashed var(--borde); }
.falta-juridica { font-size: 11px; color: #6d28d9; }
.marca-juridica { font-size: 11px; color: #6d28d9; flex-shrink: 0; }
.copy-pend { font-size: 12px; color: var(--texto-2); white-space: pre-line; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }

/* VVT (G) */
.marca-vvt { display: inline-flex; align-items: center; padding: 0 5px; height: 16px; border-radius: 4px; background: #111827; color: #fde68a; font-size: 10px; font-weight: 800; letter-spacing: 0.03em; flex-shrink: 0; vertical-align: middle; }
.etiqueta.marca-vvt-etq { background: #111827; color: #fde68a; }
.checks-vvt { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 6px 0; }
.tabla-medidas { display: grid; grid-template-columns: 220px 1fr; gap: 8px 14px; align-items: center; font-size: 13px; }
.tabla-tipos { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(200px, 1.4fr) 130px 90px; gap: 8px 12px; align-items: center; font-size: 13px; }
.insumo-revision { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 10px 12px; border: 1px solid var(--borde); border-radius: 8px; }
.insumo-revision > div:first-child { min-width: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.insumo-revision .legales a { word-break: break-all; }
.copy-revision { white-space: pre-line; background: #f9fafb; border-radius: 6px; padding: 8px 10px; margin-top: 4px; }
