:root {
  --azul: #1d3a6e;
  --azul-2: #2b5192;
  --naranja: #f39c34;
  --fondo: #f3f5f9;
  --panel: #ffffff;
  --borde: #dfe4ec;
  --texto: #1f2733;
  --suave: #667085;
  --ok: #1f8a4c;
  --alerta: #c27400;
  --error: #c0392b;
  --burbuja-in: #ffffff;
  --burbuja-out: #dcf3e3;
  --burbuja-asesor: #e3ecfb;
  --radio: 10px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--texto);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--fondo); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--azul-2); }

.btn { border: 1px solid var(--borde); background: #fff; border-radius: 8px; padding: 7px 12px; }
.btn:hover { border-color: var(--azul-2); }
.btn.primario { background: var(--azul); color: #fff; border-color: var(--azul); }
.btn.primario:hover { background: var(--azul-2); }
.btn.naranja { background: var(--naranja); border-color: var(--naranja); color: #1f1300; font-weight: 600; }
.btn.chico { padding: 4px 9px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: default; }
input, select, textarea { border: 1px solid var(--borde); border-radius: 8px; padding: 7px 10px; background: #fff; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid #b8cdf3; border-color: var(--azul-2); }
label { font-size: 13px; color: var(--suave); display: block; margin: 10px 0 4px; }

/* Login */
.login { min-height: 100%; display: grid; place-items: center; padding: 16px; background: linear-gradient(160deg, var(--azul) 0%, #0f2346 100%); }
.login form { background: #fff; padding: 28px; border-radius: 14px; width: 100%; max-width: 360px; box-shadow: 0 18px 50px rgba(0,0,0,.25); }
.login h1 { margin: 0 0 4px; font-size: 22px; color: var(--azul); }
.login p { margin: 0 0 12px; color: var(--suave); font-size: 14px; }
.login .btn { width: 100%; margin-top: 18px; padding: 10px; }
.error-txt { color: var(--error); font-size: 14px; margin-top: 10px; min-height: 18px; }

/* Estructura */
.punto { width: 9px; height: 9px; border-radius: 50%; background: #aaa; display: inline-block; }
.punto.on { background: #37d67a; }
.contenido { overflow: hidden; min-height: 0; }
.pagina { height: 100%; overflow: auto; padding: 18px; }
.pagina h2 { margin: 0 0 14px; font-size: 20px; }
.tarjeta { background: var(--panel); border: 1px solid var(--borde); border-radius: var(--radio); padding: 16px; margin-bottom: 14px; }

/* Bandeja */
.bandeja { display: grid; grid-template-columns: 330px minmax(0, 1fr) 300px; grid-template-rows: minmax(0, 1fr); height: 100%; min-height: 0; }
.lista { border-right: 1px solid var(--borde); background: #fff; display: flex; flex-direction: column; min-height: 0; }
.filtros { display: flex; gap: 4px; padding: 10px; flex-wrap: wrap; border-bottom: 1px solid var(--borde); }
.filtros button { border: 1px solid var(--borde); background: #fff; border-radius: 16px; padding: 4px 10px; font-size: 13px; }
.filtros button.activo { background: var(--azul); color: #fff; border-color: var(--azul); }
.buscar { padding: 8px 10px; border-bottom: 1px solid var(--borde); display: flex; gap: 6px; }
.buscar input { flex: 1; min-width: 0; }
.btn-filtros { border: 1px solid var(--borde); background: #fff; border-radius: 8px; padding: 0 10px; font-size: 13px; white-space: nowrap; cursor: pointer; }
.btn-filtros.con { border-color: var(--azul); color: var(--azul); }
.btn-filtros b { background: var(--azul); color: #fff; border-radius: 9px; padding: 0 6px; font-size: 11px; margin-left: 2px; }
.panel-filtros { padding: 10px; border-bottom: 1px solid var(--borde); background: #f8fafc; display: flex; flex-direction: column; gap: 6px; }
.panel-filtros.oculto { display: none; }
.panel-filtros label { font-size: 12px; color: var(--suave); font-weight: 600; display: block; margin-bottom: 2px; }
.panel-filtros select, .panel-filtros input[type=date] { width: 100%; font-size: 13px; padding: 5px 6px; border: 1px solid var(--borde); border-radius: 6px; background: #fff; }
.periodos { display: flex; flex-wrap: wrap; gap: 4px; }
.periodos button { border: 1px solid var(--borde); background: #fff; border-radius: 14px; padding: 3px 9px; font-size: 12px; cursor: pointer; }
.periodos button.activo { background: var(--azul); color: #fff; border-color: var(--azul); }
.rango { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--suave); }
.rejilla { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; }
.panel-filtros .link { align-self: flex-start; background: none; border: 0; color: #c0392b; font-size: 13px; cursor: pointer; padding: 2px 0; }
.resumen-lista { font-size: 12px; color: var(--suave); padding: 6px 12px; border-bottom: 1px solid #eef1f5; }
.resumen-lista:empty { display: none; }
.sep-dia { position: sticky; top: 0; z-index: 1; background: #eef2f7; color: #475569; font-size: 12px; font-weight: 600; padding: 4px 12px; }
.chip.at-ia { background: #ede9fe; color: #5b21b6; }
.chip.at-asesor { background: #dcfce7; color: #166534; }
.chip.at-sin_respuesta { background: #fef3c7; color: #92400e; }
.items { overflow-y: auto; flex: 1; }
.item { padding: 10px 12px; border-bottom: 1px solid #eef1f5; cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; }
.item:hover { background: #f7f9fc; }
.item.sel { background: #eaf1fd; }
.item .nom { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .hora { font-size: 12px; color: var(--suave); }
.item .ult { font-size: 13px; color: var(--suave); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .chips { grid-column: 1 / -1; display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }
.chip { font-size: 11px; padding: 1px 7px; border-radius: 10px; background: #eef1f6; color: #3d4a5c; }
.chip.bot { background: #fff3e0; color: #8a5200; }
.chip.humano { background: #e6f4ea; color: var(--ok); }
.chip.espera { background: #fdecea; color: var(--error); font-weight: 600; }
.badge { background: var(--naranja); color: #1f1300; border-radius: 10px; font-size: 11px; padding: 1px 7px; font-weight: 700; justify-self: end; }
.vacio { color: var(--suave); padding: 30px 16px; text-align: center; font-size: 14px; }

.chat { display: flex; flex-direction: column; min-height: 0; background: #eef0f4; }
.chat-cab { background: #fff; border-bottom: 1px solid var(--borde); padding: 10px 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chat-cab .t { font-weight: 700; }
.chat-cab .s { font-size: 13px; color: var(--suave); }
.chat-cab .acciones { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.mensajes { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.msg { max-width: 72%; padding: 8px 11px; border-radius: 10px; font-size: 14px; line-height: 1.4; white-space: pre-wrap; word-wrap: break-word; box-shadow: 0 1px 1px rgba(0,0,0,.06); }
.msg.in { align-self: flex-start; background: var(--burbuja-in); }
.msg.out { align-self: flex-end; background: var(--burbuja-out); }
.msg.out.asesor { background: var(--burbuja-asesor); }
.msg img { max-width: 260px; border-radius: 8px; display: block; }
/* Imagen con texto debajo en una sola burbuja, como en WhatsApp */
.msg.con-imagen { padding: 4px; width: 320px; max-width: 80%; }
.msg.con-imagen img, .msg.con-imagen video { width: 100%; max-width: 100%; border-radius: 7px; }
.msg.con-imagen .pie { padding: 6px 7px 0; }
.msg.con-imagen .meta { padding: 0 7px 2px; }
.msg .pie.corto { max-height: 9.8em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.msg .leer-mas { background: none; border: 0; color: #027eb5; font-weight: 600; font-size: 14px; padding: 2px 7px; cursor: pointer; }
.msg .meta { font-size: 11px; color: var(--suave); margin-top: 3px; text-align: right; }
.msg .meta.err { color: var(--error); }
.evento { align-self: center; font-size: 12px; color: var(--suave); background: #e2e6ee; padding: 3px 10px; border-radius: 10px; }
.redactar { background: #fff; border-top: 1px solid var(--borde); padding: 10px; display: flex; gap: 8px; align-items: flex-end; }
.redactar textarea { resize: none; height: 44px; max-height: 140px; }
.aviso-24 { background: #fff7e6; color: #7a4d00; font-size: 13px; padding: 8px 12px; border-top: 1px solid #f2d9a6; }
.rapidas { display: flex; gap: 6px; padding: 6px 10px 0; flex-wrap: wrap; background: #fff; }
.rapidas button { font-size: 12px; border: 1px dashed var(--borde); background: #fafbfd; border-radius: 12px; padding: 3px 9px; }

.ficha { background: #fff; border-left: 1px solid var(--borde); overflow-y: auto; padding: 14px; }
.ficha h3 { margin: 0 0 8px; font-size: 15px; }
.ficha .fila { display: grid; grid-template-columns: 1fr; margin-bottom: 4px; }
.historial { font-size: 12px; color: var(--suave); margin-top: 14px; }
.historial div { padding: 4px 0; border-bottom: 1px dashed #eef1f5; }

/* Simulador */
.sim { display: grid; grid-template-columns: 380px 1fr; gap: 18px; height: 100%; padding: 18px; }
.telefono { background: #111; border-radius: 30px; padding: 14px 10px; display: flex; flex-direction: column; min-height: 0; max-height: 760px; box-shadow: 0 12px 30px rgba(0,0,0,.2); }
.telefono .pantalla { background: #e5ddd5; border-radius: 18px; flex: 1; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.telefono .cab { background: #075e54; color: #fff; padding: 10px 14px; font-weight: 600; }
.telefono .cab small { display: block; font-weight: 400; opacity: .8; font-size: 12px; }
.telefono .mensajes { background: transparent; }
.telefono .msg.out { align-self: flex-start; background: #fff; }
.telefono .msg.in { align-self: flex-end; background: #dcf8c6; }
.telefono .redactar { border-radius: 0 0 18px 18px; }

/* Tablas */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--borde); vertical-align: top; }
th { font-size: 12px; color: var(--suave); text-transform: uppercase; letter-spacing: .03em; }
.nota { padding: 8px 12px; border-radius: 8px; margin-bottom: 6px; font-size: 14px; }
.nota.n-error { background: #fdecea; color: #8e2418; }
.nota.n-aviso { background: #fff4e0; color: #7a4d00; }
.nota.n-info { background: #eef3fb; color: #2b4a7a; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpi { background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); padding: 14px; }
.kpi .n { font-size: 28px; font-weight: 700; color: var(--azul); }
.kpi .l { font-size: 13px; color: var(--suave); }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.vista-previa { background: #e5ddd5; border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 6px; max-height: 520px; overflow: auto; }
.vista-previa .msg { align-self: flex-start; background: #fff; max-width: 100%; }
#toasts { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast { background: var(--azul); color: #fff; padding: 10px 14px; border-radius: 8px; box-shadow: 0 8px 20px rgba(0,0,0,.2); z-index: 9; max-width: 360px; }
.toast.err { background: var(--error); }

@media (max-width: 1100px) {
  .bandeja { grid-template-columns: 290px 1fr; }
  .ficha { display: none; }
  .bandeja.con-ficha .ficha { display: block; position: fixed; right: 0; top: 60px; bottom: 0; width: 320px; z-index: 5; box-shadow: -8px 0 20px rgba(0,0,0,.12); }
}
@media (max-width: 760px) {
  .bandeja { grid-template-columns: 1fr; }
  .bandeja.abierto .lista { display: none; }
  .bandeja:not(.abierto) .chat { display: none; }
  .sim { grid-template-columns: 1fr; }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .msg { max-width: 88%; }
}

/* =================== CRM =================== */
.e-nuevo { --c: #8a94a6; } .e-informado { --c: #4a90d9; } .e-interesado { --c: #e0a800; }
.e-envio_requisitos { --c: #f08c2e; } .e-inscrito { --c: #1f8a4c; } .e-perdido { --c: #b23b3b; }
.etapa-pill { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; background: color-mix(in srgb, var(--c) 15%, white); color: color-mix(in srgb, var(--c) 75%, black); border: 1px solid color-mix(in srgb, var(--c) 35%, white); }
.txt-rojo { color: var(--error); } .txt-verde { color: var(--ok); }
.sub { font-size: 12px; color: var(--suave); }
.ayuda { font-size: 13px; color: var(--suave); margin: 4px 0 8px; }
.chip.ok { background: #e6f4ea; color: var(--ok); }
.vacio.chico { padding: 12px; }

/* Mi día */
.dia-saludo h2 { margin-bottom: 2px; }
.dia-saludo span { color: var(--suave); }
.dia-kpis { margin-top: 14px; }
.kpi.enlace { text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.kpi.enlace:hover { border-color: var(--azul-2); transform: translateY(-1px); }
.kpi.alerta { border-left: 4px solid var(--error); }
.dia-cab { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.dia-cab h3 { margin: 0; font-size: 16px; }
.cuenta { background: #eef1f6; color: #3d4a5c; border-radius: 10px; padding: 1px 8px; font-size: 12px; font-weight: 600; }
.dia-fila { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid #eef1f5; }
.dia-fila .sub { margin-top: 2px; max-width: 70ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Barra de filtros */
.crm { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.crm-barra { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 14px; background: #fff; border-bottom: 1px solid var(--borde); }
.crm-barra input[type=search] { width: 260px; }
.crm-barra select { width: auto; max-width: 190px; }
.interruptor { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; color: var(--texto); white-space: nowrap; cursor: pointer; }
.interruptor input { width: auto; }
.crm-acciones { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.segmentado { display: inline-flex; border: 1px solid var(--borde); border-radius: 8px; overflow: hidden; }
.segmentado button { border: 0; background: #fff; padding: 6px 12px; font-size: 13px; }
.segmentado button.activo { background: var(--azul); color: #fff; }
.crm-cuerpo { flex: 1; min-height: 0; overflow: auto; padding: 14px; }

/* Tablero */
.tablero { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: 10px; height: 100%; min-height: 0; }
.columna { background: #e9edf3; border-radius: 12px; display: flex; flex-direction: column; min-height: 0; transition: background .15s; }
.columna.sobre { background: #dbe6f7; outline: 2px dashed var(--azul-2); }
.col-cab { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 4px solid var(--c); border-radius: 12px 12px 0 0; background: #fff; }
.col-suma { margin-left: auto; font-size: 12px; color: var(--suave); }
.col-cuerpo { padding: 8px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.col-vacia { color: var(--suave); font-size: 13px; text-align: center; padding: 18px 0; border: 1px dashed #c8d0dc; border-radius: 8px; }
.tarjeta-op { background: #fff; border-radius: 10px; padding: 10px; box-shadow: 0 1px 2px rgba(16,24,40,.08); cursor: pointer; border: 1px solid transparent; }
.tarjeta-op:hover, .tarjeta-op:focus { border-color: var(--azul-2); outline: none; }
.tarjeta-op.arrastrando { opacity: .5; }
.t-cab { display: flex; justify-content: space-between; gap: 6px; }
.t-cab b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-sub { font-size: 12px; color: var(--suave); margin-top: 2px; }
.t-pie { display: flex; align-items: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.t-dias { font-size: 11px; color: var(--suave); margin-left: auto; }
.temp { font-size: 11px; padding: 1px 7px; border-radius: 10px; font-weight: 600; }
.temp.caliente { background: #fde8e4; color: #b3361c; }
.temp.tibio { background: #fff4e0; color: #8a5200; }
.temp.frio { background: #eef3fb; color: #2b4a7a; }
.avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--azul); color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; flex: none; }
.avatar.grande { width: 42px; height: 42px; font-size: 15px; }
.barra-pago { height: 6px; background: #e3e8ef; border-radius: 4px; overflow: hidden; margin-top: 6px; }
.barra-pago span { display: block; height: 100%; background: var(--ok); border-radius: 4px; }
.barra-pago.grande { height: 10px; }
.lista-crm .orden { border: 0; background: none; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; padding: 0; cursor: pointer; }
.fila-click { cursor: pointer; }
.fila-click:hover { background: #f5f8fd; }

/* Panel lateral */
.cajon-fondo { position: fixed; inset: 0; background: rgba(15,23,42,.35); z-index: 20; display: flex; justify-content: flex-end; }
.cajon { width: min(560px, 100%); height: 100%; background: #fff; display: flex; flex-direction: column; box-shadow: -10px 0 30px rgba(0,0,0,.15); animation: entra .18s ease-out; }
.cajon.quieto { animation: none; }
@keyframes entra { from { transform: translateX(30px); opacity: .6; } to { transform: none; opacity: 1; } }
.cajon-cab { display: flex; gap: 12px; align-items: center; padding: 16px; border-bottom: 1px solid var(--borde); }
.cajon-tit h3 { margin: 0; font-size: 18px; }
.cerrar { margin-left: auto; border: 0; background: none; font-size: 18px; color: var(--suave); padding: 4px 8px; }
.cajon-acciones { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 16px; }
.cajon-acciones a.btn { text-decoration: none; color: inherit; }
.pasos { display: flex; gap: 4px; padding: 0 16px 10px; flex-wrap: wrap; }
.paso { flex: 1; min-width: 70px; border: 1px solid var(--borde); background: #fff; font-size: 12px; padding: 6px 4px; border-radius: 6px; }
.paso.hecho { background: #eef6f0; border-color: #cfe6d6; color: var(--ok); }
.paso.actual { background: var(--c); border-color: var(--c); color: #fff; font-weight: 700; }
.paso:hover:not(.actual) { border-color: var(--azul-2); }
.pestanas { display: flex; border-bottom: 1px solid var(--borde); padding: 0 16px; gap: 4px; }
.pestanas button { border: 0; background: none; padding: 9px 10px; font-size: 14px; color: var(--suave); border-bottom: 2px solid transparent; }
.pestanas button.activo { color: var(--azul); border-color: var(--azul); font-weight: 600; }
.cajon-cuerpo { flex: 1; overflow-y: auto; padding: 16px; }
.cajon-cuerpo h4 { margin: 16px 0 6px; }
.resumen-cobro { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 8px; margin-bottom: 10px; }
.resumen-cobro div { background: #f6f8fb; border-radius: 8px; padding: 8px 10px; }
.resumen-cobro b { display: block; font-size: 17px; }
.seg-caja { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: #f6f8fb; border-radius: 8px; padding: 10px; margin-bottom: 4px; font-size: 14px; }
.seg-caja.vencido { background: #fdecea; }
.seg-caja .btn { margin-left: auto; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
fieldset.plan { border: 1px solid var(--borde); border-radius: 8px; margin: 12px 0 0; padding: 4px 10px 10px; }
fieldset.plan legend { font-size: 13px; color: var(--suave); padding: 0 4px; }
.tabla-chica { font-size: 13px; }
.tabla-chica th, .tabla-chica td { padding: 6px 8px; }
tr.anulado td { text-decoration: line-through; color: var(--suave); }
.mensajes.mini { max-height: 420px; background: #eef0f4; border-radius: 8px; }
.op-mini { display: block; width: 100%; text-align: left; border: 1px solid var(--borde); background: #fafbfd; border-radius: 8px; padding: 8px; margin-bottom: 8px; font-size: 13px; }
.op-mini .abrir { display: block; color: var(--azul-2); font-size: 12px; margin-top: 4px; }

/* Ventanas */
.modal-fondo { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 30; display: grid; place-items: center; padding: 16px; }
.modal { background: #fff; border-radius: 14px; width: 100%; box-shadow: 0 20px 50px rgba(0,0,0,.25); max-height: 92vh; display: flex; flex-direction: column; }
.modal-cab { display: flex; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--borde); }
.modal-cuerpo { padding: 6px 16px 14px; overflow-y: auto; }
.modal-pie { display: flex; gap: 8px; justify-content: flex-end; align-items: center; padding: 12px 16px; border-top: 1px solid var(--borde); }
.modal-pie .error-txt { margin: 0 auto 0 0; }
.opciones-radio { display: grid; gap: 6px; }
.opciones-radio label { display: flex; gap: 8px; align-items: center; color: var(--texto); font-size: 14px; margin: 0; padding: 8px; border: 1px solid var(--borde); border-radius: 8px; cursor: pointer; }
.opciones-radio input { width: auto; }
.rapidas-fecha { display: flex; gap: 6px; margin-bottom: 6px; }
.comprobantes { display: flex; gap: 8px; flex-wrap: wrap; }
.comp { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 1px solid var(--borde); border-radius: 8px; padding: 6px; margin: 0; cursor: pointer; font-size: 12px; color: var(--texto); }
.comp img { width: 70px; height: 70px; object-fit: cover; border-radius: 6px; }
.comp input { width: auto; }

/* Reportes */
.rep-cab { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.rep-cab h2 { margin: 0; }
.rep-rango { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rep-rango input { width: auto; }
.barras { display: grid; gap: 6px; margin-top: 8px; }
.barra-fila { display: grid; grid-template-columns: 130px 1fr auto; gap: 8px; align-items: center; font-size: 13px; }
.b-nombre { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-pista { display: block; height: 14px; background: #eef1f6; border-radius: 4px; overflow: hidden; }
.b-relleno { display: block; height: 100%; background: var(--c, var(--azul-2)); border-radius: 0 4px 4px 0; min-width: 2px; }
.b-valor { font-variant-numeric: tabular-nums; color: var(--texto); min-width: 40px; text-align: right; }
.conv { display: grid; grid-template-columns: 80px auto; gap: 6px; align-items: center; }
.acciones-fila { white-space: nowrap; }
.acciones-fila .btn { margin-left: 4px; }

@media (max-width: 760px) {
  .crm-barra input[type=search] { width: 100%; }
  .crm-acciones { margin-left: 0; width: 100%; justify-content: space-between; }
  .tablero { grid-auto-columns: 85%; scroll-snap-type: x mandatory; }
  .columna { scroll-snap-align: start; }
  .grid4 { grid-template-columns: 1fr 1fr; }
  .barra-fila { grid-template-columns: 90px 1fr auto; }
  .dia-fila { flex-wrap: wrap; }
}


/* ===================== Copiloto IA ===================== */
.ia-zona { padding: 8px 10px 0; background: #fff; }
.ficha .ia-zona, .cajon-cuerpo .ia-zona { padding: 0; margin: 12px 0; background: none; }
.ia-btn { width: 100%; display: flex; align-items: center; gap: 8px; justify-content: center; background: linear-gradient(90deg, #f3efff, #eef5ff); border: 1px solid #d9d0fb; color: #4b2fa6; font-weight: 600; padding: 9px 12px; border-radius: 10px; }
.ia-btn:hover { border-color: #8e74e8; }
.ia-btn .sub { font-weight: 400; color: #6c5bb3; font-size: 12px; }
.ia-caja { border: 1px solid #d9d0fb; background: #faf8ff; border-radius: 10px; padding: 10px 12px; font-size: 14px; max-height: 42vh; overflow: auto; }
.ia-caja.cargando { display: flex; align-items: center; gap: 10px; color: #4b2fa6; }
.girando { width: 16px; height: 16px; border: 2px solid #d9d0fb; border-top-color: #6d4fd8; border-radius: 50%; animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
.ia-cab { display: flex; align-items: center; gap: 8px; }
.ia-cab b { color: #4b2fa6; }
.ia-cab .interes { margin-right: auto; font-size: 12px; font-weight: 600; border-radius: 10px; padding: 2px 8px; }
.interes.i-alto { background: #fde8e1; color: #b4361a; }
.interes.i-medio { background: #fff4d6; color: #8a5a00; }
.interes.i-bajo { background: #e5f0fb; color: #285a8c; }
.ia-cab .btn.chico { padding: 2px 8px; }
.ia-resumen { margin: 8px 0 6px; }
.ia-obj { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.ia-paso { display: flex; align-items: center; gap: 8px; justify-content: space-between; background: #fff; border: 1px solid var(--borde); border-radius: 8px; padding: 6px 8px; margin-bottom: 8px; }
.ia-resp .ia-texto { background: var(--burbuja-asesor); border-radius: 8px; padding: 8px 10px; margin: 4px 0 8px; white-space: pre-wrap; }

/* ===================== Celular: menú abajo, como una app ===================== */
@media (max-width: 760px) {
  .ia-caja { max-height: 50vh; }
}
@media (max-width: 760px) {
  .rapidas { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .rapidas button { white-space: nowrap; }
}

/* ===================== Pagos detectados por la IA ===================== */
.ia-chip { margin-top: 6px; font-size: 12.5px; border-radius: 8px; padding: 6px 8px; background: #eef1f6; border: 1px solid var(--borde); }
.ia-chip.ok { background: #e6f6ec; border-color: #b7e2c6; color: #155c33; }
.ia-chip.alerta { background: #fff4e0; border-color: #f3d29a; color: #7a4a00; }
.t-ia { font-size: 12px; margin-top: 6px; background: #fff4e0; color: #7a4a00; border-radius: 6px; padding: 3px 6px; }
.btn.verde { background: var(--ok); border-color: var(--ok); color: #fff; }
.txt-naranja { color: var(--alerta); font-weight: 600; }
.acciones-fila { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
#b-verificar { border-left: 4px solid var(--ok); }

/* ===================== Adjuntos, audios y videos ===================== */
.btn.icono { padding: 8px 10px; font-size: 18px; line-height: 1; margin: 0; cursor: pointer; }
.msg audio { width: 260px; max-width: 100%; display: block; }
.msg video { max-width: 280px; width: 100%; border-radius: 8px; display: block; background: #000; }
.transcripcion { font-size: 13px; margin-top: 4px; color: #344054; }
.vista-previa { max-width: 100%; max-height: 50vh; border-radius: 8px; display: block; margin: 0 auto; }
.modal audio { width: 100%; }
.doc-previa { padding: 18px; background: #f3f5f9; border-radius: 8px; text-align: center; font-weight: 600; }
.grabando { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 4px; color: var(--error); font-weight: 600; }
.redactar.en-grabacion > :not(.grabando) { display: none; }
.grabando b { color: var(--texto); }
.grabando .btn:first-of-type { margin-left: auto; }
.punto-rojo { width: 10px; height: 10px; border-radius: 50%; background: var(--error); animation: latido 1s infinite; }
@keyframes latido { 50% { opacity: .3; } }

/* ===================== Llamadas ===================== */
.btn.rojo { background: var(--error); border-color: var(--error); color: #fff; }
.llamar-pasos { display: flex; gap: 12px; margin-bottom: 14px; }
.paso-num { flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--azul); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.llamar-botones { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.llamar-botones .btn { text-decoration: none; }
.tel-grande { font-size: 18px; font-weight: 700; letter-spacing: .5px; }
.lista-llamadas { margin: 0; padding-left: 18px; font-size: 13px; }
.lista-llamadas li { margin-bottom: 4px; }
#barra-llamada, #timbre { position: fixed; z-index: 70; left: 50%; transform: translateX(-50%); bottom: 18px; background: #0f2a4f; color: #fff; border-radius: 14px; padding: 10px 14px; display: flex; align-items: center; gap: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.3); max-width: calc(100vw - 24px); flex-wrap: wrap; }
#barra-llamada .sub, #timbre .sub { color: #c9d6ee; }
#barra-llamada .btn:not(.rojo) { color: var(--texto); }
.bl-info { display: flex; align-items: center; gap: 10px; margin-right: 8px; }
.bl-ico, .timbre-ico { font-size: 22px; }
#timbre { top: 70px; bottom: auto; border: 2px solid #3ddc84; animation: timbre 1s infinite; }
@keyframes timbre { 50% { box-shadow: 0 0 0 8px rgba(61,220,132,.25); } }
@media (max-width: 760px) { #barra-llamada { bottom: 74px; } }
.bandeja > .chat, .bandeja > .lista { min-width: 0; }
.redactar textarea { flex: 1; min-width: 0; }
@media (max-width: 760px) {
  .redactar { gap: 6px; padding: 8px; }
  .redactar .btn.icono { padding: 8px; }
  .chat-cab .acciones .btn, .chat-cab .acciones select { font-size: 13px; padding: 5px 8px; }
}
@media (max-width: 760px) { .ia-btn .sub { display: none; } }

/* ===================== Fase 4: campañas, plantillas y automáticos ===================== */
.segmentado.grande { margin-bottom: 14px; flex-wrap: wrap; }
.segmentado.grande button { padding: 9px 16px; font-size: 14px; }
.barra-acciones { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 10px 0 14px; }
.chip.amarillo { background: #fff4d6; color: #8a5a00; font-weight: 600; }
.chip.azul { background: #e3ecfb; color: var(--azul-2); font-weight: 600; }
.grid-plantillas { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.plantilla-card { display: flex; flex-direction: column; gap: 6px; }
.pc-cab { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pc-acciones { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.plantilla-card code { font-size: 11px; background: #f3f5f9; padding: 1px 4px; border-radius: 4px; }
/* Vista previa estilo WhatsApp */
.wp-telefono { border: 8px solid #1f2733; border-radius: 26px; overflow: hidden; max-width: 340px; margin: 8px auto 0; }
.wp-fondo { background: #e7ddd3; padding: 14px 12px; border-radius: 8px; min-height: 120px; }
.wp-telefono .wp-fondo { border-radius: 0; min-height: 360px; }
.wp-fondo.chico { min-height: 0; padding: 10px; }
.wp-burbuja { background: #fff; border-radius: 0 8px 8px 8px; padding: 6px 8px 4px; max-width: 290px; box-shadow: 0 1px 1px rgba(0,0,0,.12); font-size: 14px; line-height: 1.35; }
.wp-enc { font-weight: 700; margin-bottom: 4px; }
.wp-media { display: block; width: 100%; border-radius: 6px; margin-bottom: 6px; max-height: 160px; object-fit: cover; }
.wp-media.vacio { background: #d9dde3; text-align: center; padding: 30px 0; color: #475467; }
.wp-cuerpo { white-space: pre-wrap; word-wrap: break-word; }
.wp-pie { font-size: 12px; color: #8696a0; margin-top: 4px; }
.wp-hora { font-size: 11px; color: #8696a0; text-align: right; }
.wp-boton { background: #fff; color: #027eb5; text-align: center; padding: 8px; border-radius: 8px; margin-top: 3px; max-width: 290px; font-size: 14px; box-shadow: 0 1px 1px rgba(0,0,0,.12); }
.msg.plantilla { border-left: 3px solid #25d366; }
/* Editores */
.editor-plantilla { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; }
.ep-vista { position: sticky; top: 0; align-self: start; }
.chips-var { display: flex; flex-wrap: wrap; gap: 5px; margin: 4px 0 6px; }
.chip-var { border: 1px dashed #8e74e8; background: #f6f3ff; color: #4b2fa6; border-radius: 12px; font-size: 12px; padding: 2px 9px; }
.fila-boton { display: grid; grid-template-columns: 150px 1fr 1fr; gap: 6px; margin-bottom: 6px; }
.oculto { visibility: hidden; }
.paso-titulo { display: flex; align-items: center; gap: 8px; font-weight: 700; margin: 14px 0 6px; }
.paso-titulo:first-child { margin-top: 0; }
.casillas { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; }
.casillas label { display: inline-flex; align-items: center; gap: 4px; margin: 0; color: var(--texto); }
.casillas input { width: auto; }
.aud-total { background: #eef3fb; border-radius: 10px; padding: 12px; text-align: center; }
.aud-total .n { font-size: 34px; font-weight: 800; color: var(--azul); line-height: 1; }
.aud-muestra { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin-top: 8px; }
.tabla-lista { width: 100%; background: #fff; border-radius: 10px; border-collapse: collapse; font-size: 14px; }
.tabla-lista th { text-align: left; font-size: 12px; color: var(--suave); padding: 10px; border-bottom: 1px solid var(--borde); }
.tabla-lista td { padding: 10px; border-bottom: 1px solid var(--borde); vertical-align: middle; }
.tabla-lista tr.clic { cursor: pointer; }
.tabla-lista tr.clic:hover td { background: #f7f9fc; }
.grid-autos { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; }
.auto-card { border-left: 4px solid var(--borde); }
.auto-card.on { border-left-color: var(--ok); }
.auto-regla { font-size: 14px; line-height: 1.9; margin: 8px 0; }
.auto-regla .num { width: 64px; display: inline-block; padding: 3px 6px; }
.auto-regla .mini { display: inline-flex; gap: 3px; align-items: center; margin: 0 6px 0 0; font-size: 13px; color: var(--texto); }
.auto-regla .mini input { width: auto; }
.switch { position: relative; display: inline-block; width: 44px; height: 24px; margin: 0; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #c9ced6; border-radius: 24px; transition: .2s; cursor: pointer; }
.switch span::before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::before { transform: translateX(20px); }
@media (max-width: 860px) {
  .editor-plantilla { grid-template-columns: 1fr; }
  .ep-vista { position: static; }
  .grid-autos { grid-template-columns: 1fr; }
  .fila-boton { grid-template-columns: 1fr; }
}
.modal .kpis { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.modal .kpi .n { font-size: 26px; }

/* ===================== Diseño por módulos: menú lateral ===================== */
:root { --lateral: 236px; --lateral-plegado: 72px; --cab: 60px; --azul-oscuro: #13284d; }
.app { display: grid; grid-template-columns: var(--lateral) minmax(0, 1fr); height: 100vh; height: 100dvh; transition: grid-template-columns .2s; }
.app.plegado { grid-template-columns: var(--lateral-plegado) minmax(0, 1fr); }
.lateral { background: linear-gradient(180deg, var(--azul) 0%, var(--azul-oscuro) 100%); color: #fff; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.marca { display: flex; align-items: center; gap: 10px; height: var(--cab); padding: 0 18px; font-weight: 700; font-size: 17px; white-space: nowrap; border-bottom: 1px solid rgba(255,255,255,.08); flex-shrink: 0; }
.marca .logo { width: 34px; height: 34px; border-radius: 9px; background: var(--naranja); color: var(--azul-oscuro); display: grid; place-items: center; font-weight: 800; flex-shrink: 0; }
.marca .txt span { color: var(--naranja); }
.modulos { flex: 1; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 18px; }
.grupo { display: flex; flex-direction: column; gap: 3px; }
.grupo-t { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8fa5cc; padding: 0 10px 4px; white-space: nowrap; }
.lateral .mi { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; background: none; border: 0; color: #d3def2; padding: 9px 10px; border-radius: 10px; font-size: 14.5px; text-align: left; white-space: nowrap; }
.lateral .mi:hover { background: rgba(255,255,255,.08); color: #fff; }
.lateral .mi.activo { background: rgba(255,255,255,.15); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 var(--naranja); }
.lateral .mi .ico { font-size: 17px; width: 24px; text-align: center; flex-shrink: 0; }
.lateral .mi .txt { overflow: hidden; text-overflow: ellipsis; }
.lateral .mi .badge-nav { margin-left: auto; }
.badge-nav { background: #e5484d; color: #fff; font-size: 11px; font-weight: 700; border-radius: 10px; padding: 1px 6px; min-width: 18px; text-align: center; }
.plegar { display: flex; align-items: center; gap: 12px; margin: 8px 12px 14px; background: none; border: 1px solid rgba(255,255,255,.15); color: #b9c8e4; border-radius: 10px; padding: 8px 10px; white-space: nowrap; }
.plegar:hover { color: #fff; border-color: rgba(255,255,255,.35); }
.plegar .ico { width: 24px; text-align: center; font-size: 16px; }
/* Menú achicado: solo íconos */
.app.plegado .marca { padding: 0; justify-content: center; }
.app.plegado .lateral .txt, .app.plegado .grupo-t { display: none; }
.app.plegado .modulos { padding: 14px 10px; gap: 10px; }
.app.plegado .grupo + .grupo { border-top: 1px solid rgba(255,255,255,.1); padding-top: 10px; }
.app.plegado .lateral .mi, .app.plegado .plegar { justify-content: center; padding: 10px 0; }
.app.plegado .lateral .mi .badge-nav { position: absolute; top: 2px; right: 4px; margin: 0; }
.app.plegado .plegar { margin: 8px 10px 14px; }

.principal { display: grid; grid-template-rows: var(--cab) minmax(0, 1fr); min-width: 0; min-height: 0; }
.cabecera { display: flex; align-items: center; gap: 14px; padding: 0 24px; background: #fff; border-bottom: 1px solid var(--borde); }
.hamburguesa { display: none; background: none; border: 0; font-size: 22px; padding: 4px 8px; color: var(--azul); }
.miga { font-size: 15px; color: var(--suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.miga .sep { margin: 0 8px; color: #b3bccb; }
.miga b { color: var(--texto); font-size: 16px; }
.cabecera .derecha { margin-left: auto; display: flex; align-items: center; gap: 14px; white-space: nowrap; font-size: 14px; }
.disp { display: inline-flex; align-items: center; gap: 7px; background: #f1f4f9; border: 1px solid var(--borde); color: var(--texto); padding: 6px 12px; border-radius: 20px; font-size: 13.5px; }
.disp:hover { border-color: var(--azul-2); }
.usuario { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.usuario .avatar { width: 32px; height: 32px; font-size: 14px; }
.abajo, .velo { display: none; }

/* ----- Más espacio ----- */
.pagina { padding: 28px 32px; }
.pagina h2 { margin-bottom: 20px; font-size: 22px; }
.tarjeta { padding: 20px 22px; margin-bottom: 20px; border-radius: 14px; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.filtros { padding: 12px 14px; gap: 6px; }
.buscar { padding: 10px 14px; }
.item { padding: 14px 16px; gap: 4px 10px; }
.item .chips { margin-top: 6px; gap: 5px; }
.panel-filtros { padding: 14px; gap: 8px; }
.resumen-lista { padding: 8px 16px; }
.sep-dia { padding: 6px 16px; }

/* Tableta: menú achicado siempre */
@media (max-width: 1100px) and (min-width: 761px) {
  .app, .app.plegado { grid-template-columns: var(--lateral-plegado) minmax(0, 1fr); }
  .app .marca { padding: 0; justify-content: center; }
  .app .lateral .txt, .app .grupo-t, .plegar { display: none; }
  .app .modulos { padding: 14px 10px; gap: 10px; }
  .app .grupo + .grupo { border-top: 1px solid rgba(255,255,255,.1); padding-top: 10px; }
  .app .lateral .mi { justify-content: center; padding: 10px 0; }
  .app .lateral .mi .badge-nav { position: absolute; top: 2px; right: 4px; margin: 0; }
  .cabecera .usuario .txt { display: none; }
}
@media (max-width: 1250px) { .pagina .grid2:has(table) { grid-template-columns: minmax(0, 1fr); } }
.sub-pagina { margin: -12px 0 20px; color: var(--suave); }

/* Celular: menú que se abre con ☰ y barra rápida abajo */
@media (max-width: 760px) {
  .app, .app.plegado { grid-template-columns: minmax(0, 1fr); }
  .lateral { position: fixed; top: 0; bottom: 0; left: 0; width: min(290px, 84vw); z-index: 40; transform: translateX(-110%); transition: transform .22s ease; }
  .app.menu-abierto .lateral { transform: none; box-shadow: 8px 0 30px rgba(0,0,0,.25); }
  .app.plegado .lateral .txt, .app.plegado .grupo-t { display: revert; }
  .app.plegado .marca { padding: 0 18px; justify-content: flex-start; }
  .app.plegado .lateral .mi { justify-content: flex-start; padding: 11px 10px; }
  .app.plegado .modulos { padding: 14px 12px; gap: 18px; }
  .app.plegado .grupo + .grupo { border-top: 0; padding-top: 0; }
  .app.plegado .lateral .mi .badge-nav { position: static; margin-left: auto; }
  .plegar { display: none; }
  .lateral .mi { font-size: 16px; padding: 11px 10px; }
  .velo { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 35; opacity: 0; pointer-events: none; transition: opacity .2s; }
  .app.menu-abierto .velo { opacity: 1; pointer-events: auto; }
  .principal { grid-row: 1; }
  .cabecera { padding: 0 10px 0 4px; gap: 6px; }
  .hamburguesa { display: block; }
  .miga .mod, .miga .sep { display: none; }
  .cabecera .usuario, .disp .txt { display: none; }
  .disp { padding: 8px 10px; }
  .contenido { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
  .abajo { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid var(--borde); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 14px rgba(0,0,0,.06); }
  .abajo .mi { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; background: none; border: 0; color: var(--suave); font-size: 11px; padding: 6px 2px; border-radius: 10px; }
  .abajo .mi .ico { font-size: 21px; line-height: 1.1; }
  .abajo .mi.activo { color: var(--azul); font-weight: 700; background: #eef3fb; }
  .abajo .badge-nav { position: absolute; top: 1px; right: calc(50% - 22px); }
  .pagina { padding: 18px 14px; }
  .bandeja.con-ficha .ficha { top: 60px; }
  .ia-caja { max-height: 50vh; }
}

/* ===================== Estilo inspirado en CRMs modernos (marco de color, tarjetas, íconos de color) ===================== */
body { background: linear-gradient(150deg, #13284d 0%, #1d3a6e 45%, #33307e 100%); background-attachment: fixed; }
.lateral { background: transparent; }
.marca { border-bottom: 0; }
.lateral .mi .ico { width: 30px; height: 30px; border-radius: 8px; background: var(--c); display: grid; place-items: center; font-size: 16px; box-shadow: 0 2px 6px rgba(0,0,0,.18); }
.lateral .mi { padding: 6px 8px; }
.lateral .mi.activo { background: rgba(255,255,255,.16); box-shadow: none; }
.lateral .mi.activo::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--naranja); }
.app.plegado .lateral .mi { padding: 6px 0; }
.app.plegado .lateral .mi.activo::before { left: -10px; }
.principal { margin: 10px 10px 10px 0; border-radius: 16px; overflow: hidden; background: var(--fondo); box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.cabecera { border-radius: 16px 16px 0 0; }
.bandeja.con-ficha .ficha { top: 70px; bottom: 10px; right: 10px; border-radius: 0 0 16px 0; }

/* Indicadores de colores con número grande */
.kpis { gap: 14px; }
.kpi { --k: #1565d8; background: var(--k); border: 0; color: #fff; border-radius: 12px; padding: 16px 18px; min-height: 96px; display: flex; flex-direction: column; box-shadow: 0 4px 14px rgba(16,24,40,.10); }
.kpis .kpi:nth-child(5n+2) { --k: #2c45b5; }
.kpis .kpi:nth-child(5n+3) { --k: #f26b1d; }
.kpis .kpi:nth-child(5n+4) { --k: #1e9e4a; }
.kpis .kpi:nth-child(5n+5) { --k: #7a4fd6; }
.kpi .l { order: -1; color: rgba(255,255,255,.88); font-size: 13.5px; font-weight: 500; }
.kpi .n, .kpi .n[style], .kpi .n.txt-verde { color: #fff !important; font-size: 38px; line-height: 1.1; margin-top: auto; font-weight: 700; }
.kpi.alerta { border-left: 0; box-shadow: 0 0 0 3px #fff, 0 0 0 5px #e5484d; }
.kpi.enlace:hover { transform: translateY(-2px); filter: brightness(1.06); }
.modal .kpi, .vista-sobria .kpi { --k: #fff; color: var(--texto); border: 1px solid var(--borde); box-shadow: none; min-height: 0; }
.modal .kpi .n { color: var(--azul) !important; font-size: 26px; }
.modal .kpi .l { color: var(--suave); }

/* Etapas como flechas (Nuevo → Informado → … → Inscrito) */
.pasos { gap: 0; flex-wrap: nowrap; padding: 4px 16px 14px; overflow-x: auto; }
.paso { flex: 1 1 auto; min-width: 0; border: 0; border-radius: 0; background: #e6eaf0; color: #475467; font-size: 12px; font-weight: 600; padding: 9px 8px 9px 18px; margin-right: -6px; clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%, 12px 50%); white-space: nowrap; }
.paso:first-child { clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%); border-radius: 8px 0 0 8px; padding-left: 10px; }
.paso:last-child { margin-right: 0; }
.paso.hecho { background: #1e9e4a; color: #fff; }
.paso.actual { background: var(--c); color: #fff; }
.paso:hover:not(.actual) { filter: brightness(.95); border: 0; }

/* Tablas anchas: se desplazan dentro de su tarjeta, no rompen la página */
.tarjeta:has(table) { overflow-x: auto; }
.dia-fila > div:first-child { min-width: 0; }

@media (max-width: 760px) {
  .principal { margin: 0; border-radius: 0; box-shadow: none; }
  .cabecera { border-radius: 0; }
  .bandeja.con-ficha .ficha { top: 60px; bottom: 0; right: 0; border-radius: 0; }
  .lateral { background: linear-gradient(160deg, #13284d 0%, #1d3a6e 50%, #33307e 100%); }
  .kpi { min-height: 84px; padding: 14px; }
  .kpi .n, .kpi .n[style] { font-size: 30px; }
}

.login .version { font-size: 12px; color: #98a2b3; margin-top: -6px; }

/* ===================== Catálogo, Centro de IA y Contactos ===================== */
.esconder { display: none !important; }
.cab-cat { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.cab-cat h2 { margin-bottom: 4px; }
.cab-cat .sub-pagina { margin: 0 0 18px; }
.acciones-cat { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cuenta-t { display: inline-block; background: #e8edf5; color: #475467; font-size: 11.5px; font-weight: 700; border-radius: 10px; padding: 0 7px; margin-left: 4px; }
.segmentado.grande button.activo .cuenta-t { background: rgba(255,255,255,.25); color: #fff; }
.cuenta-t.amarillo { background: #fff1c2; color: #8a5a00; }
.menu-mini { position: relative; }
.menu-mini-op { position: absolute; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--borde); border-radius: 10px; box-shadow: 0 10px 30px rgba(16,24,40,.15); padding: 6px; z-index: 20; min-width: 210px; }
.menu-mini-op a { display: block; padding: 8px 10px; border-radius: 6px; color: var(--texto); text-decoration: none; font-size: 14px; }
.menu-mini-op a:hover { background: #f1f4f9; }
.btn.peligro { color: var(--error); border-color: #f3c3bd; background: #fff; }
.btn.peligro:hover { background: #fdecea; border-color: var(--error); }
.sel-chico { width: auto; padding: 5px 8px; font-size: 13px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.check { display: flex; align-items: center; gap: 8px; color: var(--texto); font-size: 14px; margin: 10px 0 4px; }
.check input { width: auto; }
.tarjeta h3 { margin: 0 0 6px; font-size: 17px; }
.tarjeta h4 { margin: 0 0 8px; font-size: 15px; }

/* Interruptor */
.sw { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--texto); font-size: 14px; cursor: pointer; white-space: nowrap; }
.sw input { position: absolute; opacity: 0; width: 0; height: 0; }
.sw span { width: 40px; height: 22px; border-radius: 12px; background: #cbd2dc; position: relative; transition: background .15s; flex: none; }
.sw span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .15s; }
.sw input:checked + span { background: #1e9e4a; }
.sw input:checked + span::after { left: 21px; }
.sw input:focus-visible + span { outline: 2px solid #b8cdf3; }
.sw.grande span { width: 56px; height: 30px; border-radius: 16px; }
.sw.grande span::after { width: 24px; height: 24px; }
.sw.grande input:checked + span::after { left: 29px; }

/* Segmentado con radios (modalidad, tono) */
.segmentado label { margin: 0; display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; font-size: 14px; color: var(--texto); cursor: pointer; background: #fff; }
.segmentado label + label { border-left: 1px solid var(--borde); }
.segmentado label input { position: absolute; opacity: 0; width: 0; }
.segmentado label:has(input:checked) { background: var(--azul); color: #fff; }

/* Maestro-detalle */
.md { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.md-lista { background: #fff; border: 1px solid var(--borde); border-radius: 14px; overflow: hidden; position: sticky; top: 0; max-height: calc(100vh - 230px); display: flex; flex-direction: column; }
.md-buscar { display: flex; gap: 8px; padding: 12px; border-bottom: 1px solid var(--borde); }
.md-buscar input { padding: 6px 10px; }
.md-buscar .btn { white-space: nowrap; }
.md-items { overflow-y: auto; padding: 6px; }
.md-item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: left; background: none; border: 0; border-radius: 10px; padding: 10px 12px; }
.md-item:hover { background: #f4f6fa; }
.md-item.sel { background: #e8effc; box-shadow: inset 3px 0 0 var(--azul-2); }
.md-item.inactivo .md-t { color: #98a2b3; text-decoration: line-through; }
.md-t { font-weight: 600; font-size: 14.5px; display: flex; align-items: center; gap: 6px; }
.md-s { font-size: 12.5px; color: var(--suave); }
.punto-err, .punto-av { width: 8px; height: 8px; border-radius: 50%; background: var(--error); display: inline-block; }
.punto-av { background: #f2a516; }
.md-vacio { background: #fff; border: 2px dashed var(--borde); border-radius: 14px; padding: 60px 20px; text-align: center; color: var(--suave); }
.md-volver { display: none; margin-bottom: 10px; }
.tit-ed { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.tit-ed h3 { margin: 0; }
.pie-ed, .barra-guardar { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.pie-ed .btn.peligro, .barra-guardar .btn.peligro { margin-right: auto; }
.barra-guardar { position: sticky; bottom: 0; background: rgba(243,245,249,.95); backdrop-filter: blur(4px); padding: 12px 0; margin-top: 0; z-index: 5; }
.barra-guardar.con-cambios { box-shadow: 0 -1px 0 var(--borde); }
.barra-guardar.con-cambios .sub { color: #b45309; font-weight: 600; font-size: 13px; }

/* Chips de texto (sinónimos, etiquetas) */
.chips-input { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; border: 1px solid var(--borde); border-radius: 8px; padding: 5px 7px; background: #fff; min-height: 38px; cursor: text; }
.chips-input:focus-within { outline: 2px solid #b8cdf3; border-color: var(--azul-2); }
.chips-input input { border: 0; outline: 0 !important; padding: 3px 2px; flex: 1; min-width: 120px; width: auto; }
.chip-in { background: #eef3fb; color: #23417a; border-radius: 14px; padding: 2px 4px 2px 10px; font-size: 13px; display: inline-flex; align-items: center; gap: 2px; }
.chip-in button { border: 0; background: none; color: #6b7a90; font-size: 11px; padding: 2px 5px; border-radius: 50%; }
.chip-in button:hover { background: #dbe5f5; color: var(--error); }

/* Cursos en una ciudad */
.ofertas { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.oferta { border: 1px solid var(--borde); border-radius: 12px; background: #fff; }
.oferta.inactivo { background: #f8f9fb; }
.oferta.inactivo .of-t b { color: #98a2b3; }
.of-cab { display: grid; grid-template-columns: minmax(160px, 1.1fr) minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 14px; cursor: pointer; }
.of-cab:hover { background: #f8fafd; border-radius: 12px; }
.of-fechas { display: flex; flex-wrap: wrap; gap: 4px; }
.of-lugar { font-size: 13px; color: var(--suave); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fecha { display: inline-flex; align-items: center; gap: 2px; background: #e6f4ea; color: #166534; border-radius: 6px; padding: 2px 8px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.fecha.vencida { background: #f1f2f4; color: #98a2b3; text-decoration: line-through; }
.fecha.mas { background: #eef1f6; color: #475467; }
.fecha button { border: 0; background: none; color: inherit; font-size: 11px; padding: 0 2px 0 4px; opacity: .7; }
.fecha button:hover { opacity: 1; color: var(--error); }
.of-ed { border-top: 1px solid var(--borde); padding: 4px 14px 14px; }
.fila-fechas { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fila-fechas .lista-fechas { display: flex; flex-wrap: wrap; gap: 5px; }
.fila-fechas input[type=date] { width: auto; }
.previa-of { margin-top: 12px; }

/* Vista previa estilo WhatsApp */
.dos-col { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; }
.pantalla-prev { background: #efe7dd url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Ccircle cx='20' cy='20' r='1.2' fill='%23d9cfc2'/%3E%3C/svg%3E"); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 6px; min-height: 80px; }
.pantalla-prev .msg { max-width: 100%; }
.pantalla-prev .msg.out { align-self: flex-end; background: var(--burbuja-out); }
.telefono-prev { position: sticky; top: 0; }
.telefono-prev .pantalla-prev { max-height: 560px; overflow-y: auto; }
.img-rota { background: #fdecea; color: #8e2418; font-size: 13px; padding: 30px 10px; text-align: center; border-radius: 7px; }
.fila-img { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; }
.fila-img input { flex: 1; }
.fila-img .btn { white-space: nowrap; }
.chips-ciudades { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-ciudad { border: 1px solid var(--borde); background: #fff; border-radius: 16px; padding: 4px 12px; font-size: 13px; }
.chip-ciudad:hover { border-color: var(--azul-2); color: var(--azul-2); }

/* Preguntas frecuentes */
.faq { display: flex; flex-direction: column; gap: 8px; }
.faq-par { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; background: #f8fafc; border: 1px solid #e6eaf0; border-radius: 10px; padding: 10px; }
.faq-par .faq-p { font-weight: 600; }
.faq-par .faq-r { grid-column: 1; }
.faq-par .x { grid-column: 2; grid-row: 1; border: 0; background: none; color: #98a2b3; }
.faq-par .x:hover { color: var(--error); }
.faq-mas { align-self: flex-start; }

/* Revisión */
.nota.con-accion { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.nota.con-accion .btn { white-space: nowrap; flex: none; }
.lista-cambios { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.7; }

/* Centro de IA */
.ia-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.ia-prueba { position: sticky; top: 0; }
.chat-prueba { height: calc(100vh - 330px); min-height: 320px; overflow-y: auto; }
.redactar-prueba { display: flex; gap: 8px; margin-top: 10px; }
.estado-bot { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-width: 2px; }
.estado-bot.on { border-color: #a7dfb9; background: linear-gradient(90deg, #f0fbf4, #fff); }
.estado-bot.off { border-color: #f3c3bd; background: linear-gradient(90deg, #fdf1ef, #fff); }
.estado-bot h3 { font-size: 18px; }
.ideas { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; color: var(--suave); margin: 8px 0; }
.idea { border: 1px dashed #b9a8f0; background: #f8f5ff; color: #4b2fa6; border-radius: 14px; padding: 3px 10px; font-size: 12.5px; text-align: left; }
.idea:hover { background: #efe9ff; }
.msgs-bot { display: flex; flex-direction: column; gap: 16px; }
.msg-bot { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: start; padding-top: 12px; border-top: 1px solid #eef1f5; }
.msg-bot:first-child { border-top: 0; padding-top: 0; }
.msg-bot label small { font-weight: 400; color: var(--suave); }
.pasos-bot { list-style: none; margin: 0; padding: 0; counter-reset: paso; display: flex; flex-direction: column; gap: 8px; }
.pasos-bot li { counter-increment: paso; display: flex; justify-content: space-between; align-items: center; gap: 14px; border: 1px solid var(--borde); border-radius: 12px; padding: 12px 14px 12px 52px; position: relative; background: #fff; }
.pasos-bot li::before { content: counter(paso); position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 50%; background: #1e9e4a; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.pasos-bot li.apagado { background: #f8f9fb; }
.pasos-bot li.apagado::before { background: #cbd2dc; }
.pasos-bot li.apagado b { color: #98a2b3; }
.pasos-bot li div { display: flex; flex-direction: column; gap: 2px; }

/* Contactos */
.ct-filtros { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px; }
.ct-filtros input[type=search] { flex: 2 1 260px; }
.ct-filtros select { flex: 1 1 150px; width: auto; }
.etiquetas-barra { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -6px 0 14px; }
.etq { border: 1px solid #ddd3fb; background: #f6f3ff; color: #4b2fa6; border-radius: 14px; padding: 3px 10px; font-size: 13px; }
.etq span { background: #e6defd; border-radius: 8px; padding: 0 5px; font-size: 11px; margin-left: 2px; }
.etq.activo { background: #6d4fd8; border-color: #6d4fd8; color: #fff; }
.etq.activo span { background: rgba(255,255,255,.25); }
.etq.mini { font-size: 11.5px; padding: 1px 8px; margin: 1px 3px 1px 0; display: inline-block; }
.lote { position: sticky; top: 0; z-index: 6; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: #1d3a6e; color: #fff; border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; box-shadow: 0 6px 18px rgba(16,24,40,.18); }
.lote .btn { color: var(--texto); }
.ct-resumen { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-bottom: 8px; }
.ct-resumen .check { margin: 0; }
.paginas { display: flex; align-items: center; gap: 8px; font-size: 13px; }
table.ct { width: 100%; border-collapse: collapse; font-size: 14px; }
table.ct th { text-align: left; font-size: 12px; color: var(--suave); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; padding: 8px 10px; border-bottom: 1px solid var(--borde); }
table.ct td { padding: 10px; border-bottom: 1px solid #eef1f5; vertical-align: middle; }
table.ct tbody tr { cursor: pointer; }
table.ct tbody tr:hover { background: #f8fafd; }
table.ct tbody tr.sel { background: #eef3fc; }
table.ct input[type=checkbox] { width: 16px; height: 16px; }
.ct-nom { display: flex; align-items: center; gap: 10px; }
.avatar.chico { width: 32px; height: 32px; font-size: 12px; }
.ct-acciones { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.ct-acciones .peligro { margin-left: auto; }
.pasos-imp { padding-left: 20px; line-height: 1.6; font-size: 14px; }

@media (max-width: 1250px) {
  .ia-layout { grid-template-columns: minmax(0, 1fr); }
  .ia-prueba { position: static; }
  .chat-prueba { height: 360px; }
  .msg-bot, .dos-col { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .md { grid-template-columns: minmax(0, 1fr); }
  .md-lista { position: static; max-height: none; }
  .md.con-detalle .md-lista { display: none; }
  .md:not(.con-detalle) .md-detalle { display: none; }
  .md-volver { display: inline-block; }
  .of-cab { grid-template-columns: minmax(0, 1fr) auto; }
  .of-cab .of-fechas, .of-cab .of-lugar { grid-column: 1 / -1; }
  .of-cab .of-editar { grid-row: 1; grid-column: 2; }
}
@media (max-width: 760px) {
  .grid3 { grid-template-columns: minmax(0, 1fr); }
  table.ct thead { display: none; }
  table.ct, table.ct tbody, table.ct tr, table.ct td { display: block; width: 100%; }
  table.ct tr { position: relative; border-bottom: 1px solid var(--borde); padding: 10px 0 10px 32px; }
  table.ct td { border: 0; padding: 2px 0; }
  table.ct td:first-child { position: absolute; left: 4px; top: 16px; width: auto; }
  table.ct td[data-l]::before { content: attr(data-l) ': '; color: var(--suave); font-size: 12px; }
  .estado-bot { flex-direction: column; align-items: flex-start; }
  .barra-guardar { bottom: calc(62px + env(safe-area-inset-bottom)); }
}

/* ===================== Bandeja más limpia ===================== */
.bandeja { grid-template-columns: 370px minmax(0, 1fr) 300px; }
.lista .filtros { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 10px 14px; gap: 6px; }
.lista .filtros::-webkit-scrollbar { display: none; }
.lista .filtros button { white-space: nowrap; flex: none; padding: 5px 12px; }
.buscar { padding: 8px 14px 10px; }
.resumen-lista { padding: 6px 16px; background: #fafbfd; }
.sep-dia { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; padding: 5px 16px; background: #f1f4f8; color: #667085; border-bottom: 1px solid #e6eaf0; }
.item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-bottom: 1px solid #eef1f5; }
.item.sel { background: #eaf1fd; box-shadow: inset 3px 0 0 var(--azul-2); }
.it-av { position: relative; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700; font-size: 14px; color: #fff; background: #94a3b8; }
.it-av.at-ia { background: #7c5cf0; }
.it-av.at-asesor { background: #1e9e4a; }
.it-av.at-sin_respuesta { background: #f59e0b; }
.it-at { position: absolute; right: -4px; bottom: -3px; background: #fff; border-radius: 50%; width: 20px; height: 20px; display: grid; place-items: center; font-size: 11px; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.it-cuerpo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.it-fila { display: flex; align-items: center; gap: 8px; min-width: 0; }
.it-fila .nom { flex: 1; min-width: 0; font-size: 15px; }
.item.no-leido .nom { font-weight: 800; }
.item.no-leido .ult { color: var(--texto); font-weight: 500; }
.it-fila .ult { flex: 1; min-width: 0; font-size: 13.5px; }
.it-fila .hora { flex: none; }
.item.no-leido .hora { color: #1e9e4a; font-weight: 700; }
.it-meta { margin-top: 2px; }
.it-datos { flex: 1; min-width: 0; font-size: 12px; color: #8a94a6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.it-tags { display: flex; gap: 4px; flex: none; }
.etapa-mini { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 10px; background: color-mix(in srgb, var(--c, #8a94a6) 16%, #fff); color: color-mix(in srgb, var(--c, #8a94a6) 80%, #000); white-space: nowrap; }

/* Embudo dentro del chat */
.embudo-chat { background: #fff; border-bottom: 1px solid var(--borde); padding: 8px 14px; margin: 0; }
.embudo-chat .paso { font-size: 12px; padding: 7px 8px 7px 18px; cursor: pointer; }
.embudo-chat .paso:first-child { padding-left: 10px; }
@media (max-width: 760px) { .embudo-chat .paso { font-size: 11px; padding: 6px 6px 6px 15px; } }

/* Lo que aprendió la IA */
.apr-barra { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin: 14px 0 10px; }
.apr-barra input { flex: 1 1 200px; max-width: 320px; }
.apr-lista { display: flex; flex-direction: column; gap: 10px; }
.apr-item { border: 1px solid var(--borde); border-radius: 12px; padding: 10px 12px; background: #fff; display: flex; flex-direction: column; gap: 6px; }
.apr-fila { display: flex; gap: 8px; align-items: flex-start; }
.apr-ic { font-size: 16px; padding-top: 6px; }
.apr-item textarea { border-color: transparent; background: #f7f9fc; resize: none; overflow: hidden; }
.apr-item textarea:focus { background: #fff; border-color: var(--azul-2); }
.apr-item .apr-p { font-weight: 600; }
.apr-pie { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.apr-acc { display: flex; gap: 6px; }
.apr-probar { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--borde); }
.apr-hit { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.apr-hit .msg { align-self: flex-start; max-width: 100%; background: var(--burbuja-out); }
.msg .ensenar { border: 0; background: none; color: #6d4fd8; font-size: 11px; padding: 0 6px 0 0; cursor: pointer; opacity: .55; }
.msg:hover .ensenar, .msg .ensenar:disabled { opacity: 1; }

/* Secuencia de mensajes del prospecto con "dónde se edita" */
.parte-msg { align-self: stretch; display: flex; flex-direction: column; gap: 1px; background: rgba(255,255,255,.85); border-left: 3px solid var(--azul-2); border-radius: 6px; padding: 5px 9px; margin-top: 6px; font-size: 12px; }
.parte-msg:first-child { margin-top: 0; }
.parte-msg b { color: var(--azul); font-size: 12.5px; }
.parte-msg span { color: var(--suave); }
.tit-prev { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.telefono-prev .pantalla-prev { max-height: 680px; }
