/* Panel interno · sistema de Kavor (fondo oscuro, acento azul). Sin estilos en línea (CSP). */
@font-face { font-family: 'Bricolage Grotesque'; font-weight: 700; font-display: swap; src: url(/fuentes/BricolageGrotesque-700.woff2) format('woff2'); }
@font-face { font-family: 'Bricolage Grotesque'; font-weight: 800; font-display: swap; src: url(/fuentes/BricolageGrotesque-800.woff2) format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-weight: 400; font-display: swap; src: url(/fuentes/InstrumentSans-400.woff2) format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-weight: 500; font-display: swap; src: url(/fuentes/InstrumentSans-500.woff2) format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-weight: 600; font-display: swap; src: url(/fuentes/InstrumentSans-600.woff2) format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-weight: 700; font-display: swap; src: url(/fuentes/InstrumentSans-700.woff2) format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 500; font-display: swap; src: url(/fuentes/JetBrainsMono-500.woff2) format('woff2'); }

:root {
  color-scheme: dark;
  --ink: #0A0E1A; --surface: #111729; --surface-2: #161E35; --line: #222B45;
  --text: #EAF0FA; --muted: #98A3C0; --accent: #2E7BFF; --accent-hover: #4A8FFF; --cool: #9FD8FF;
  --ok: #3DD68C; --warn: #F2B544; --error: #FF4D5E;
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --r: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--ink); color: var(--text); font: 15px/1.5 var(--font); min-height: 100vh; }
a { color: var(--cool); }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -.01em; margin: 0; }
h1 { font-size: 28px; }
h2 { font-size: 17px; margin-bottom: 12px; }
h3 { font-size: 14px; margin: 12px 0 6px; }
small { display: block; color: var(--muted); font-size: 12.5px; }
:focus-visible { outline: 2px solid var(--cool); outline-offset: 2px; }

/* barra superior */
.barra { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 20px; padding: 12px 24px; background: rgba(10,14,26,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.marca { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-family: var(--font-display); font-size: 18px; }
.marca b { color: var(--cool); font-weight: 700; }
.punto { width: 10px; height: 10px; border-radius: 50%; background: #fff; box-shadow: 0 0 12px 3px var(--accent); }
#nav { display: flex; gap: 4px; flex-wrap: wrap; }
#nav a { color: var(--muted); text-decoration: none; padding: 6px 12px; border-radius: 999px; font-weight: 500; }
#nav a:hover { color: var(--text); }
#nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.yo { margin-left: auto; text-align: right; font-size: 13px; }
.yo small { font-family: var(--mono); font-size: 11px; color: var(--cool); }

main { max-width: 1200px; margin: 0 auto; padding: 28px 24px 80px; outline: none; }
main:focus, main:focus-visible { outline: none; }
.cargando, .vacio { color: var(--muted); text-align: center; padding: 48px 16px; }
.titulo { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.titulo h1 + .estado, .titulo .estado { margin-left: 4px; vertical-align: middle; }
.sub { color: var(--muted); }
.volver { display: inline-block; margin-bottom: 12px; text-decoration: none; color: var(--muted); }
.acciones { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mes { min-width: 150px; text-align: center; text-transform: capitalize; }

/* botones */
.btn { font: inherit; font-weight: 600; border: 0; border-radius: 999px; padding: 9px 18px; background: var(--accent); color: #fff; cursor: pointer; }
.btn:hover { background: var(--accent-hover); }
.btn-sec { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.btn-sec:hover { background: var(--line); }
.btn-peligro { background: transparent; color: var(--error); box-shadow: inset 0 0 0 1px rgba(255,77,94,.4); }
.link { font: inherit; background: none; border: 0; color: var(--cool); cursor: pointer; padding: 4px 0; text-decoration: underline; text-underline-offset: 3px; }
.mini { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); cursor: pointer; }
.mini:disabled { opacity: .3; cursor: default; }

/* paneles y tarjetas */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; margin-bottom: 16px; }
.columnas { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.tarjetas { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.tarjeta { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; color: var(--text); text-decoration: none; }
a.tarjeta:hover { border-color: var(--accent); }
.tarjeta-cab { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 8px; color: var(--muted); font-size: 13px; }
.necesidad { margin: 10px 0 0; color: var(--muted); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.texto { white-space: pre-wrap; margin: 0; }
.alerta { color: var(--warn); }

/* estados: siempre con texto, el color solo acompaña */
.estado { display: inline-block; font-family: var(--mono); font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
.estado-potencial { color: var(--cool); }
.estado-propuesta { color: var(--warn); }
.estado-cliente { color: var(--ok); }
.estado-pausado, .estado-terminado, .estado-descartado { color: var(--muted); }

/* filtros */
.herramientas { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: inherit; font-size: 13px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--surface-2); color: var(--text); border-color: var(--accent); }
input, select, textarea { font: inherit; color: var(--text); background: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
input[type="search"] { min-width: 260px; }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }

/* ficha */
.datos { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }
.datos dt { color: var(--muted); }
.datos dd { margin: 0; }
.propuesta { border-top: 1px solid var(--line); padding: 12px 0; }
.propuesta:first-child { border-top: 0; padding-top: 0; }
.propuesta ul { list-style: none; padding: 0; margin: 8px 0; }
.propuesta li { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 2px 0; }
.totales { display: flex; gap: 16px; flex-wrap: wrap; margin: 6px 0; }
.etapas { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.etapa { background: var(--surface-2); border-radius: 10px; padding: 12px; }
.etapa h3 { margin-top: 0; }
.etapa h3 small { display: inline; }
.tarea { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: start; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.tarea.hecha span { text-decoration: line-through; color: var(--muted); }
.eventos { list-style: none; padding: 0; margin: 0; }
.eventos li { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.eventos li small { display: inline; }

/* calendario a pantalla completa · colores por tipo (siempre acompañados del nombre) */
:root { --ev-reunion: #4A8FFF; --ev-entrega: #3DD68C; --ev-publicacion: #FF3EA5; --ev-otro: #F2B544; }
.ev-reunion { --ev: var(--ev-reunion); }
.ev-entrega { --ev: var(--ev-entrega); }
.ev-publicacion { --ev: var(--ev-publicacion); }
.ev-otro { --ev: var(--ev-otro); }
main.ancho { max-width: none; padding: 16px 20px 16px; }
.cal-full { display: flex; flex-direction: column; gap: 12px; height: calc(100dvh - 61px - 32px); min-height: 560px; }
.cal-cab { display: flex; align-items: center; gap: 14px 20px; flex-wrap: wrap; }
.cal-cab h1 { font-size: 24px; }
.cal-cab > .btn { margin-left: auto; }
.leyenda { display: flex; gap: 12px; list-style: none; margin: 0; padding: 0; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.leyenda li { display: flex; align-items: center; gap: 6px; }
.leyenda li::before { content: ''; width: 10px; height: 10px; border-radius: 3px; background: var(--ev); box-shadow: 0 0 8px var(--ev); }
.cal-cuerpo { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; }
.cal-mes { display: flex; flex-direction: column; min-height: 0; }
.dias-semana { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-bottom: 4px; }
.dias-semana div { text-align: center; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; }
.grilla-mes { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: 4px; }
.dia { min-height: 0; overflow: hidden; background: rgba(17,23,41,.72); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.06); border-radius: 10px; padding: 6px; display: flex; flex-direction: column; gap: 4px; transition: border-color .2s; }
.dia:hover { border-color: rgba(74,143,255,.35); }
.dia.finde { background: rgba(13,18,34,.72); }
.dia.fuera { opacity: .4; }
.dia.hoy { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent), 0 0 18px rgba(46,123,255,.25); }
.dia.hoy .num span { background: var(--accent); color: #fff; border-radius: 999px; padding: 0 7px; }
.num { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--muted); }
.mas { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; padding: 0 4px; opacity: 0; transition: opacity .15s; }
.dia:hover .mas, .mas:focus-visible { opacity: 1; }
.eventos-dia { display: flex; flex-direction: column; gap: 3px; min-height: 0; }
.evento { display: flex; gap: 5px; align-items: baseline; font: inherit; font-size: 11.5px; text-align: left; border: 0; border-left: 3px solid var(--ev); border-radius: 5px; padding: 3px 6px; color: var(--text); cursor: pointer; overflow: hidden; white-space: nowrap;
  background: linear-gradient(90deg, color-mix(in srgb, var(--ev) 28%, transparent), color-mix(in srgb, var(--ev) 8%, transparent)); transition: transform .15s, filter .15s; }
.evento:hover { transform: translateX(2px); filter: brightness(1.2); }
.ev-hora { font-family: var(--mono); font-size: 10px; color: color-mix(in srgb, var(--ev) 60%, white); flex: none; }
.ev-titulo { overflow: hidden; text-overflow: ellipsis; }
.ver-mas { font: inherit; font-size: 11px; color: var(--cool); background: none; border: 0; text-align: left; cursor: pointer; padding: 0 6px; }
.cal-lista { margin: 0; overflow: auto; background: rgba(17,23,41,.8); backdrop-filter: blur(6px); }
.lista-eventos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.lista-eventos button { width: 100%; display: grid; gap: 2px; text-align: left; font: inherit; color: var(--text); cursor: pointer; border: 0; border-left: 3px solid var(--ev); border-radius: 8px; padding: 8px 10px; background: color-mix(in srgb, var(--ev) 10%, transparent); transition: background .15s; }
.lista-eventos button:hover { background: color-mix(in srgb, var(--ev) 20%, transparent); }
.le-fecha { font-family: var(--mono); font-size: 11px; color: color-mix(in srgb, var(--ev) 70%, white); }
.le-titulo { font-weight: 600; font-size: 14px; }
.le-meta { font-size: 12px; color: var(--muted); }
@media (max-width: 1100px) { .cal-cuerpo { grid-template-columns: 1fr; } .cal-lista { max-height: 260px; } .cal-full { height: auto; } .grilla-mes { grid-auto-rows: 96px; } }
@media (max-width: 720px) { .cal-mes { display: none; } .cal-lista { max-height: none; } }

/* calculadora */
.controles { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 16px; }
.controles label { display: flex; gap: 8px; align-items: center; }
.segmentado { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.segmentado button { font: inherit; font-size: 13.5px; border: 0; background: none; color: var(--muted); padding: 6px 14px; border-radius: 999px; cursor: pointer; }
.segmentado button[aria-checked="true"] { background: var(--accent); color: #fff; }
.calc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
@media (max-width: 980px) { .calc-grid { grid-template-columns: 1fr; } }
.resumen { position: sticky; top: 80px; }
.opciones-web { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.opcion { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.opcion.elegida { border-color: var(--accent); }
.opcion h3 { margin: 0; }
.opcion ul { margin: 0; padding-left: 18px; font-size: 13px; color: var(--muted); flex: 1; }
.opcion .btn { align-self: flex-start; }
.precio { font-family: var(--font-display); font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.precio small { display: inline; font-family: var(--font); font-weight: 400; font-size: 12px; }
.disciplina { border-top: 1px solid var(--line); padding: 8px 0; }
.disciplina summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.servicio { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.servicio .precio { font-size: 15px; }
.no-incluye { color: #7E88A6; }
.lineas { list-style: none; padding: 0; margin: 0 0 12px; }
.lineas li { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.cant { display: flex; align-items: center; gap: 4px; }
.mon { font-variant-numeric: tabular-nums; white-space: nowrap; }
.total { display: flex; justify-content: space-between; font-size: 18px; margin-top: 8px; }
.total b { font-family: var(--font-display); font-variant-numeric: tabular-nums; }
.desc { color: var(--ok); margin: 4px 0; font-size: 13.5px; }
.resumen .acciones { margin-top: 14px; }

/* tarifario */
.scroll { overflow-x: auto; }
.tabla { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabla th, .tabla td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tabla th { color: var(--muted); font-weight: 500; }
.tabla .n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fuentes { columns: 2 320px; padding-left: 18px; }
.fuentes small { display: inline; }

/* avance */
.progreso { height: 8px; background: var(--surface-2); border-radius: 999px; margin-top: 12px; overflow: hidden; }
.barra-p { height: 100%; background: var(--accent); border-radius: 999px; }

/* diálogos y avisos */
.dialogo { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 16px; padding: 22px; width: min(560px, 92vw); max-height: 90vh; overflow: auto; }
.dialogo::backdrop { background: rgba(5,8,16,.7); }
.form { display: grid; gap: 12px; margin-top: 14px; }
.campo { display: grid; gap: 4px; }
.campo label { font-size: 13px; color: var(--muted); }
.campo-check { grid-template-columns: auto 1fr; align-items: center; gap: 4px 10px; }
.campo-check label { color: var(--text); font-size: 14px; }
.campo-check small { grid-column: 2; }
.dialogo .acciones { justify-content: flex-end; margin-top: 6px; }
.aviso { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--surface-2); border: 1px solid var(--line); padding: 10px 18px; border-radius: 999px; z-index: 100; box-shadow: 0 8px 30px rgba(0,0,0,.4); }
.aviso-error { border-color: var(--error); color: #FFB3BB; }

/* descuentos y ventas */
.total.lista { font-size: 14px; color: var(--muted); }
.total.lista s { font-variant-numeric: tabular-nums; }
.segmentado button:disabled { cursor: default; opacity: .75; }
.venta { border-top: 1px solid var(--line); padding: 12px 0; }
.venta:first-of-type { border-top: 0; }
.venta .acciones { margin-top: 10px; }
.estado-fact-a_pedir { color: var(--warn); }
.estado-fact-pedida { color: var(--cool); }
.estado-fact-emitida { color: var(--ok); }
.aviso-fiscal p { margin: 0 0 8px; }
a.btn { display: inline-block; text-decoration: none; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* celular: menú en una fila que se desliza */
@media (max-width: 720px) {
  .barra { gap: 8px 12px; padding: 10px 14px; }
  #nav { order: 3; width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  #nav a { white-space: nowrap; }
  main, main.ancho { padding: 18px 14px 60px; }
}

/* fondo animado, transiciones e ingreso */
.fondo { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
body { background: radial-gradient(ellipse at top, #0E1430, var(--ink) 60%) fixed; }
.barra { background: rgba(10,14,26,.72); }
.panel, .tarjeta { background: rgba(17,23,41,.78); backdrop-filter: blur(6px); }
.entrar { animation: entrar .45s cubic-bezier(.2,.7,.2,1) both; }
@keyframes entrar { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.tarjetas > * { animation: entrar .45s cubic-bezier(.2,.7,.2,1) both; }
.tarjetas > *:nth-child(2) { animation-delay: .04s; } .tarjetas > *:nth-child(3) { animation-delay: .08s; } .tarjetas > *:nth-child(4) { animation-delay: .12s; } .tarjetas > *:nth-child(n+5) { animation-delay: .16s; }
a.tarjeta { transition: border-color .2s, transform .2s; }
a.tarjeta:hover { transform: translateY(-2px); }
.btn { transition: background .15s, transform .15s; }
.btn:active { transform: scale(.97); }
#nav a { transition: color .15s, background .15s; }
.yo { display: flex; align-items: center; gap: 10px; }
.sonido { font-size: 16px; background: none; border: 1px solid var(--line); border-radius: 999px; width: 34px; height: 34px; cursor: pointer; }
.sonido[aria-pressed="false"] { opacity: .55; }

/* ingreso */
.sin-sesion .barra, .sin-sesion main { display: none; }
.ingreso { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px; }
.ing-tarjeta { width: min(420px, 100%); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ing-marca { margin: 0; font-family: var(--font-display); font-size: 18px; animation: entrar .6s .8s both; }
.ing-marca b { color: var(--cool); }
.ing-titulo { margin-top: 14px; font-size: clamp(30px, 6vw, 44px); font-weight: 800; letter-spacing: -.02em; line-height: 1.05; background: linear-gradient(90deg, #fff, var(--cool)); -webkit-background-clip: text; background-clip: text; color: transparent; animation: entrar .7s .9s both; }
.ing-texto { margin: 8px 0 0; color: var(--muted); animation: entrar .7s 1s both; }
.ing-form { width: 100%; display: flex; flex-direction: column; gap: 10px; margin-top: 26px; text-align: left; animation: entrar .7s 1.1s both; }
.ing-form label { font-size: 13px; color: var(--muted); }
.ing-form input { font: inherit; font-size: 16px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: rgba(10,14,26,.8); color: var(--text); }
.ing-form input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(46,123,255,.3); }
.ing-codigo { font-family: var(--mono) !important; font-size: 26px !important; letter-spacing: .5em; text-align: center; }
.ing-boton { margin-top: 6px; padding: 13px 20px; font-size: 16px; box-shadow: 0 0 30px rgba(46,123,255,.45); }
.ing-boton:disabled { opacity: .6; cursor: wait; }
.ing-form .link { align-self: center; font-size: 13.5px; }
.ing-error { margin: 0; min-height: 1.2em; color: var(--error); font-size: 13.5px; }
.ing-error:empty { min-height: 0; }
.ing-prueba { color: var(--warn); font-family: var(--mono); }
.ingreso.saliendo { animation: salir .6s ease both; }
.bv-luz { position: relative; width: 220px; height: 24px; margin-bottom: 14px; }
.bv-linea { position: absolute; left: 0; top: 11px; width: 200px; height: 2px; background: linear-gradient(90deg, transparent, var(--accent-hover), #fff); transform-origin: left; animation: bv-trazo 1s cubic-bezier(.6,0,.2,1) both; }
.bv-punto { position: absolute; right: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 5px rgba(46,123,255,.45), 0 0 30px 10px rgba(46,123,255,.6); animation: bv-encender .6s .85s both; }
.salir { font-size: 13px; color: var(--muted); }

/* cartel de bienvenida (mientras habla la voz) */
.bv-cartel { position: fixed; bottom: 28px; left: 50%; z-index: 150; display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-radius: 999px;
  background: rgba(17,23,41,.92); border: 1px solid rgba(46,123,255,.45); box-shadow: 0 10px 40px rgba(0,0,0,.45), 0 0 30px rgba(46,123,255,.25);
  transform: translateX(-50%); animation: cartel .6s cubic-bezier(.2,.7,.2,1) both; }
.bv-cartel strong { font-family: var(--font-display); font-size: 16px; }
.bv-cartel small { color: var(--cool); }
.bv-cartel.saliendo { animation: cartel-fuera .5s ease both; }
@keyframes cartel { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translateX(-50%); } }
@keyframes cartel-fuera { to { opacity: 0; transform: translate(-50%, 12px); } }

/* «Para hoy» en el calendario */
.bloque-hoy { margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.para-hoy { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.para-hoy li { border-left: 3px solid var(--ev); padding: 6px 10px; background: color-mix(in srgb, var(--ev) 12%, transparent); border-radius: 8px; font-size: 13.5px; transition: background .3s, transform .3s; }
.para-hoy li b { font-family: var(--mono); font-size: 11.5px; margin-right: 4px; }
.para-hoy li.leyendo { background: color-mix(in srgb, var(--ev) 34%, transparent); transform: translateX(4px); }
.tarea-hoy { --ev: var(--cool); }
.tarea-vencida { --ev: var(--error); }

/* calendarios de campañas */
.col-azul { --marca: #2E7BFF; } .col-celeste { --marca: #9FD8FF; } .col-verde { --marca: #3DD68C; }
.col-rosa { --marca: #FF3EA5; } .col-ambar { --marca: #F2B544; } .col-violeta { --marca: #A78BFA; }
.campana { border-top: 3px solid var(--marca); }
.campana-cab { display: flex; align-items: center; gap: 10px; }
.campana-cab h2 { margin: 0; }
.campana-punto { width: 12px; height: 12px; border-radius: 50%; background: var(--marca); box-shadow: 0 0 12px var(--marca); flex: none; }
.campana-titulo { display: flex; align-items: center; gap: 12px; }
.campana-objetivo { margin: 10px 0 6px; font-size: 14px; }
.it-post { --ev: #4A8FFF; } .it-carrusel { --ev: #9FD8FF; } .it-reel { --ev: #FF3EA5; } .it-historia { --ev: #A78BFA; }
.it-anuncio { --ev: #F2B544; } .it-email { --ev: #3DD68C; } .it-otro { --ev: #98A3C0; }
.evento.est-idea { opacity: .7; border-left-style: dashed; }
.evento.est-publicado .ev-titulo::before { content: '✓ '; color: var(--ok); }
.plan-mes { margin: 0 0 12px; display: grid; gap: 4px; }
.plan-mes dt { font-size: 12px; color: var(--muted); margin-top: 6px; }
.plan-mes dd { margin: 0; }
.plan-mes .pre { white-space: pre-wrap; }
.estados-mes { list-style: none; padding: 0; margin: 14px 0 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-size: 12.5px; color: var(--muted); }
.estados-mes li { background: var(--surface-2); border-radius: 8px; padding: 6px 8px; }
.estados-mes b { color: var(--text); font-size: 15px; }
.estados-mes .est-publicado b { color: var(--ok); }
@keyframes bv-trazo { from { transform: scaleX(0); opacity: 0; } to { transform: scaleX(1); opacity: 1; } }
@keyframes bv-encender { from { transform: scale(.2); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes salir { to { opacity: 0; transform: scale(1.04); } }
@media (prefers-reduced-motion: reduce) {
  .entrar, .tarjetas > *, .ingreso *, .ingreso.saliendo, .bv-cartel { animation: none !important; }
  .evento:hover, a.tarjeta:hover { transform: none; }
}

/* aprobación del plan de campaña */
.estado-plan { margin-left: auto; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0; padding: 3px 9px; border-radius: 999px; white-space: nowrap; color: var(--muted); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.campana-titulo .estado-plan { margin-left: 4px; }
.estado-plan.ap-enviado { color: var(--cool); box-shadow: inset 0 0 0 1px rgba(159,216,255,.4); }
.estado-plan.ap-aprobado { color: var(--ok); box-shadow: inset 0 0 0 1px rgba(61,214,140,.5); background: rgba(61,214,140,.08); }
.estado-plan.ap-cambios { color: var(--warn); box-shadow: inset 0 0 0 1px rgba(242,181,68,.5); }
.aprobacion { margin: 0 0 18px; padding: 14px; border-radius: 10px; border: 1px solid var(--line); display: grid; gap: 8px; }
.aprobacion h2 { margin: 0; font-size: 15px; }
.aprobacion .ap-estado { margin: 0; font-weight: 700; }
.aprobacion .ap-detalle { margin: 0; color: var(--muted); font-size: 13.5px; white-space: pre-wrap; }
.aprobacion.ap-aprobado { border-color: rgba(61,214,140,.5); background: rgba(61,214,140,.06); }
.aprobacion.ap-aprobado .ap-estado { color: var(--ok); }
.aprobacion.ap-enviado .ap-estado { color: var(--cool); }
.aprobacion.ap-cambios { border-color: rgba(242,181,68,.5); }
.aprobacion.ap-cambios .ap-estado { color: var(--warn); }
.aprobacion > .btn { text-align: center; text-decoration: none; }

/* estado del sonido en el ingreso y «Escuchar» en el cartel de bienvenida */
.ing-sonido { align-self: center; margin-top: 6px; font-size: 13px; color: var(--muted); }
.ing-sonido .link { font-size: 13px; }
.bv-escuchar { padding: 7px 14px; font-size: 14px; flex: none; }
.bv-sin-voz { color: var(--warn); }

/* galería de ejemplos del tarifario */
.ver-ejemplo { display: inline-block; margin-top: 6px; font-size: 13.5px; }
.dialogo.galeria { width: min(1100px, 96vw); max-height: 94vh; padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.dialogo.galeria:not([open]) { display: none; }
.gal-cab { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.gal-cab h2 { margin: 0; margin-right: auto; }
.gal-cab a { font-size: 14px; }
.gal-figura { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.gal-figura img { width: 100%; max-height: 64vh; object-fit: contain; border-radius: 10px; background: var(--ink); }
.gal-figura figcaption { grid-column: 1 / -1; text-align: center; color: var(--muted); font-size: 14px; }
.gal-n { font-family: var(--mono); font-size: 12px; color: var(--cool); }
.gal-flecha { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font-size: 22px; cursor: pointer; }
.gal-flecha:hover { border-color: var(--accent); }
.gal-miniaturas { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.gal-mini { flex: none; width: 84px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: var(--ink); cursor: pointer; opacity: .6; }
.gal-mini img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gal-mini[aria-current="true"] { border-color: var(--accent); opacity: 1; }
.gal-mini:hover { opacity: 1; }

/* pestañas de una campaña: Calendario · Resultados */
.pestanas { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 4px 0 8px; }
.pestanas a { padding: 10px 16px; color: var(--muted); text-decoration: none; font-weight: 500; margin-bottom: -1px; }
.pestanas a:hover { color: var(--text); }
.pestanas a[aria-current="page"] { color: var(--text); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }
.campana-resultados { display: flex; flex-direction: column; gap: 12px; max-width: 1280px; margin: 0 auto; }

/* resultados de campaña */
.res { display: flex; flex-direction: column; gap: 16px; }
.res .panel { margin-bottom: 0; }
.res-cabecera { display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: flex-start; }
.res-meta { flex: 1 1 360px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.res-meta-nombre { font-family: var(--font-display); font-size: 20px; }
.res-meta-fila { display: flex; align-items: center; gap: 14px; width: 100%; }
.res-pauta { flex: 0 1 320px; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 12px; background: var(--surface-2); }
.res-par { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); }
.res-par b { color: var(--text); font-family: var(--mono); font-weight: 500; font-size: 13px; }
.res-etiqueta { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--cool); }
.res-mono { font-family: var(--mono); font-size: 13px; white-space: nowrap; }
.res-bien { color: var(--ok); }
.res-mal { color: #FF8A95; }
.res-barra { flex: 1; display: block; height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; min-width: 60px; }
.res-relleno { display: block; height: 100%; border-radius: 999px; background: #3B5FA8; }
.res-relleno.acento { background: var(--accent); box-shadow: 0 0 10px rgba(46,123,255,.6); }
.res-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.res-kpi { display: flex; flex-direction: column; gap: 4px; }
.res-kpi-valor { font-family: var(--font-display); font-size: 28px; line-height: 1.1; }
.res-dos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.res-filas { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.res-filas li { display: grid; grid-template-columns: 130px minmax(0, 1fr) 64px; gap: 12px; align-items: center; font-size: 14px; }
.res-filas li small { display: inline; }
.res-filas .res-mono { text-align: right; }
.res-dia { text-transform: capitalize; }
.res-lectura { margin: 14px 0 0; padding: 10px 14px; border-radius: 10px; background: var(--surface-2); font-size: 14px; }
.res-lectura b { color: var(--cool); }
.res-cab-tabla { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.res-tabla td { vertical-align: middle; }
.res-cargar { padding: 6px 12px; font-size: 13px; white-space: nowrap; }
.estado.res-arriba { color: var(--ok); }
.estado.res-promedio { color: var(--muted); }
.estado.res-abajo { color: #FF8A95; }
.res-pie { text-align: center; font-size: 13px; }
@media (max-width: 900px) { .res-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .res-dos { grid-template-columns: 1fr; } }
