/* Panel Flowboost — lenguaje de Apple con los colores de Flowboost (Diego, 25-09-2026).
   Lienzo gris claro (#f5f5f7), tarjetas blancas de 28 px sin sombras, cabecera translúcida,
   botones en píldora y SF Pro (la fuente del sistema en Mac; Inter en el resto).
   El morado de Flowboost (--acento, #8B3EFF) hace el papel del azul de Apple: acciones y enlaces.
   El rosa (--acento2, #FF0080) es un acento puntual (segunda serie de los gráficos, avisos de marca).
   Sin degradados ni sombras: la profundidad sale del contraste entre superficies.
   --acento y --acento2 los puede cambiar un administrador en Ajustes (se aplican desde app.js).
   Copia del diseño anterior: copias/app.css.bak-antes-apple */
:root {
  color-scheme: light;
  --acento: #8b3eff; --acento2: #ff0080;
  --fuente: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", Inter, "Helvetica Neue", system-ui, sans-serif;
  --fuente-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", Inter, "Helvetica Neue", system-ui, sans-serif;

  --fondo: #f5f5f7;             /* lienzo (Studio Mist) */
  --panel: #ffffff;             /* tarjetas */
  --panel-2: #fafafc;           /* rellenos suaves, filas al pasar */
  --control: #e8e8ed;           /* píldoras neutras */
  --borde: #d2d2d7;             /* hairlines */
  --borde-suave: #e8e8ed;
  --texto: #1d1d1f; --texto-2: #6e6e73; --texto-3: #86868b;
  --enlace: color-mix(in srgb, var(--acento) 82%, #000);   /* morado un punto más oscuro para leer sobre blanco */
  --acento-suave: color-mix(in srgb, var(--acento) 26%, #ffffff);
  --acento-fondo: color-mix(in srgb, var(--acento) 8%, #ffffff);
  --bien: #1a7f37; --bien-fondo: #e8f5ec; --mal: #d70015; --mal-fondo: #fdecee;
  --aviso: #b25000; --aviso-fondo: #fff4e5;
  --grid: #ececf0;
  --cristal: rgba(255, 255, 255, .72);
  --tip: rgba(29, 29, 31, .92);
  --radio: 28px;
  --logo-filtro: invert(1);     /* el logo es blanco: en claro se pinta en negro */
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --fondo: #000000; --panel: #1d1d1f; --panel-2: #242426; --control: #333336;
    --borde: #424245; --borde-suave: #2c2c2e;
    --texto: #f5f5f7; --texto-2: #a1a1a6; --texto-3: #86868b;
    --enlace: color-mix(in srgb, var(--acento) 70%, #ffffff);
    --acento-suave: color-mix(in srgb, var(--acento) 40%, #1d1d1f);
    --acento-fondo: color-mix(in srgb, var(--acento) 16%, #1d1d1f);
    --bien: #30d158; --bien-fondo: #0f2e18; --mal: #ff453a; --mal-fondo: #3a1614;
    --aviso: #ff9f0a; --aviso-fondo: #3a2a0c; --grid: #2c2c2e;
    --cristal: rgba(22, 22, 23, .72); --tip: rgba(245, 245, 247, .94);
    --logo-filtro: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --fondo: #000000; --panel: #1d1d1f; --panel-2: #242426; --control: #333336;
  --borde: #424245; --borde-suave: #2c2c2e;
  --texto: #f5f5f7; --texto-2: #a1a1a6; --texto-3: #86868b;
  --enlace: color-mix(in srgb, var(--acento) 70%, #ffffff);
  --acento-suave: color-mix(in srgb, var(--acento) 40%, #1d1d1f);
  --acento-fondo: color-mix(in srgb, var(--acento) 16%, #1d1d1f);
  --bien: #30d158; --bien-fondo: #0f2e18; --mal: #ff453a; --mal-fondo: #3a1614;
  --aviso: #ff9f0a; --aviso-fondo: #3a2a0c; --grid: #2c2c2e;
  --cristal: rgba(22, 22, 23, .72); --tip: rgba(245, 245, 247, .94);
  --logo-filtro: none;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--fondo); color: var(--texto);
  font: 400 14px/1.43 var(--fuente); letter-spacing: -.016em;
  -webkit-font-smoothing: antialiased; font-feature-settings: "tnum" 1; }
h1, h2, h3, .titulo { font-family: var(--fuente-display); font-weight: 600; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, select, input, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
.muted { color: var(--texto-2); } .peq { font-size: 12px; letter-spacing: -.003em; }
.num { font-variant-numeric: tabular-nums; }
.vacio { color: var(--texto-3); }
/* Enlaces dentro del contenido: el morado hace de azul de Apple */
.vista a:not(.btn):not(.sb-item):not(.feed-item):not(.lista-fila):not(.tarjeta) { color: var(--enlace); }
.vista a:not(.btn):not(.sb-item):not(.feed-item):not(.lista-fila):not(.tarjeta):hover { text-decoration: underline; }
.vista .migas a, .vista a.celda-cli { color: inherit; }

/* ───────── botones y campos: píldoras ───────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 980px;
  padding: 8px 17px; font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: transform .1s ease-out, filter .15s, background-color .15s; }
.btn:active { transform: scale(.97); }
.btn-primario { background: var(--acento); color: #fff; }
.btn-primario:hover { filter: brightness(1.08); }
.btn-sec { background: var(--control); color: var(--texto); }
.btn-sec:hover { filter: brightness(.97); }
.btn-peligro { background: none; box-shadow: inset 0 0 0 1px var(--borde); color: var(--mal); }
.btn-peligro:hover { background: var(--mal-fondo); box-shadow: none; }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.campo { display: grid; gap: 6px; font-weight: 500; font-size: 13px; color: var(--texto-2); }
.campo input, .campo select, .campo textarea { padding: 11px 16px; border: 1px solid var(--borde); border-radius: 12px;
  background: var(--panel); color: var(--texto); width: 100%; font-weight: 400; font-size: 15px; }
.campo input:focus, .campo select:focus, .campo textarea:focus, .barra select:focus, .sb-buscar input:focus {
  outline: none; border-color: var(--acento); box-shadow: 0 0 0 4px color-mix(in srgb, var(--acento) 22%, transparent); }
.error { color: var(--mal); font-size: 13px; margin: 0; }

/* ───────── puerta (entrar, primer admin, invitación): escenario negro ───────── */
.puerta { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 36px; padding: 24px 16px;
  background: #000; }
.puerta-marca img { display: block; height: auto; }
.puerta-card { width: min(420px, 100%); background: var(--panel); border-radius: 28px; padding: 36px 32px; display: grid; gap: 16px; }
.puerta-card h1 { margin: 0; font-size: 28px; line-height: 1.14; letter-spacing: -.01em; }
.puerta-card p { margin: 0; }
.puerta-card .btn { padding: 12px 20px; font-size: 15px; }

/* ───────── estructura ───────── */
.app { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }

/* Barra lateral como en macOS: material translúcido, texto oscuro, selección en píldora */
.sidebar { background: color-mix(in srgb, var(--panel) 62%, var(--fondo)); border-right: 1px solid var(--borde-suave);
  color: var(--texto); padding: 22px 12px 16px; display: flex; flex-direction: column; gap: 2px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sb-logo { padding: 2px 10px 18px; display: block; }
.sb-logo img { display: block; height: auto; max-width: 132px; filter: var(--logo-filtro); }
.sb-buscar input { width: 100%; padding: 8px 14px; border: 1px solid transparent; border-radius: 980px;
  background: var(--control); color: var(--texto); margin-bottom: 8px; font-size: 13px; }
.sb-buscar input::placeholder { color: var(--texto-3); }
.sb-titulo { font-size: 11px; font-weight: 600; letter-spacing: 0; color: var(--texto-3); margin: 18px 12px 4px; }
.sb-nav { display: grid; gap: 1px; }
.sb-item { position: relative; display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 10px;
  font-size: 13.5px; color: var(--texto); transition: background-color .12s; }
.sb-item:hover { background: color-mix(in srgb, var(--texto) 6%, transparent); }
.sb-item:active { background: color-mix(in srgb, var(--texto) 10%, transparent); }
.sb-item.activo { background: var(--acento); color: #fff; font-weight: 500; }
.sb-item.activo .sb-ico { color: #fff; }
.sb-ico { width: 22px; text-align: center; color: var(--texto-3); }
.sb-item .punto { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; flex: none; }
.punto.alerta { background: var(--mal); }
.sb-item.activo .punto.alerta { background: #fff; }
.punto.si { background: var(--bien); }
.sb-pie { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--borde-suave); display: grid; gap: 6px; }
.sb-yo { display: flex; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 12px; line-height: 1.25; }
.sb-yo:hover { background: color-mix(in srgb, var(--texto) 6%, transparent); }
.sb-yo b { font-weight: 600; } .sb-yo small { color: var(--texto-3); font-size: 11.5px; word-break: break-all; }
.sb-salir { background: none; border: 0; padding: 2px 8px; color: var(--enlace); cursor: pointer; text-align: left; font-size: 13px; }
.sb-salir:hover { text-decoration: underline; }
.sb-estado { margin: 0; padding: 0 8px; font-size: 11.5px; color: var(--texto-3); }

/* logos y avatares: sin degradado, el tinte de la marca muy suave */
.avatar { width: 26px; height: 26px; border-radius: 8px; flex: none; display: grid; place-items: center; overflow: hidden;
  font: 600 11px/1 var(--fuente-display); color: var(--acento); background: var(--acento-fondo); }
.sb-item.activo .avatar:not(:has(img)) { background: rgba(255,255,255,.22); color: #fff; }
.avatar img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.avatar.g { width: 64px; height: 64px; border-radius: 16px; font-size: 22px; }
.avatar.m { width: 34px; height: 34px; border-radius: 10px; font-size: 12px; }

.contenido { min-width: 0; }
/* Cabecera: material translúcido, el contenido pasa por debajo */
.barra { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; display: flex; align-items: center; gap: 12px;
  padding: 12px 40px; min-height: 52px; background: var(--cristal);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid color-mix(in srgb, var(--borde) 60%, transparent); }
.migas { font-size: 13px; color: var(--texto-2); } .migas b { color: var(--texto); font-weight: 600; }
.migas a { color: var(--enlace); } .migas a:hover { text-decoration: underline; }
.barra-der { margin-left: auto; display: flex; gap: 8px; }
.barra select { padding: 7px 32px 7px 14px; border: 0; border-radius: 980px; background: var(--control); font-size: 13px;
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2386868b' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; }
/* Selectores dentro de las tarjetas (p. ej. el mes del reporte): píldora neutra, como el del periodo */
select.btn-sec { border: 0 !important; border-radius: 980px !important; background-color: var(--control); color: var(--texto);
  padding: 7px 14px !important; font-size: 13px; cursor: pointer; }
.btn-icono { display: none; background: var(--control); border: 0; border-radius: 980px; padding: 6px 12px; cursor: pointer; }
.vista { padding: 40px 40px 80px; display: grid; gap: 20px; max-width: 1440px; }

/* Encabezado de página: titular grande, compacto, como en apple.com */
.cabecera { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 8px; }
.cabecera h1 { margin: 0; font-size: 40px; line-height: 1.1; letter-spacing: -.022em; }
.cabecera p { margin: 6px 0 0; color: var(--texto-2); font-size: 17px; line-height: 1.47; letter-spacing: -.022em; }
.cabecera .der { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.degradado-texto { color: var(--acento); }

/* ───────── tarjetas: blanco sobre gris, 28 px, sin sombra ───────── */
.tarjeta { background: var(--panel); border-radius: var(--radio); padding: 24px 28px; min-width: 0; }
.tarjeta-cab { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.tarjeta-cab h2 { margin: 0; font-size: 21px; line-height: 1.19; font-weight: 600; letter-spacing: .011em; }
.tarjeta-cab .der { margin-left: auto; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.kpi { display: grid; gap: 6px; align-content: start; }
.tarjeta.kpi { padding: 22px 24px; border-radius: 22px; }
.kpi .etiqueta { color: var(--texto-2); font-weight: 500; font-size: 13px; }
.kpi .fila { display: flex; align-items: end; justify-content: space-between; gap: 4px 8px; flex-wrap: wrap; }
.kpi .valor { white-space: nowrap; font: 600 32px/1.1 var(--fuente-display); letter-spacing: -.024em; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 12px; color: var(--texto-2); }
.delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 500; font-size: 12px; }
.delta.bien { color: var(--bien); } .delta.mal { color: var(--mal); } .delta.neutro { color: var(--texto-3); font-weight: 400; }
.spark { width: 96px; height: 34px; flex: none; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 20px; }
.grid-2-igual { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
/* Control segmentado */
.pestanas { display: inline-flex; background: var(--control); border-radius: 980px; padding: 3px; gap: 2px; }
.pestanas button { border: 0; background: none; padding: 5px 14px; border-radius: 980px; cursor: pointer; color: var(--texto-2);
  font-weight: 500; font-size: 13px; transition: background-color .15s, color .15s; }
.pestanas button:hover { color: var(--texto); }
.pestanas button.activo { background: var(--panel); color: var(--texto); box-shadow: 0 0 0 1px var(--borde-suave); }
.grande { font: 600 32px/1.1 var(--fuente-display); letter-spacing: -.024em; }

/* ───────── gráficos ───────── */
.graf { width: 100%; }
.grafico { display: block; }
.grafico text { fill: var(--texto-3); font-size: 11px; font-family: var(--fuente); }
.grafico .rejilla { stroke: var(--grid); }
.grafico .barra { fill: var(--acento); }
.grafico .barra.tenue { fill: var(--acento-suave); }
.grafico .barra.dos { fill: var(--acento2); }
.grafico .zona { fill: transparent; }
.grafico g:hover .barra { filter: brightness(1.1); }
.leyenda { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--texto-2); }
.leyenda i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 0; background: var(--acento); }
.leyenda i.tenue { background: var(--acento-suave); } .leyenda i.dos { background: var(--acento2); }

/* ───────── actividad ───────── */
.feed { display: grid; gap: 2px; max-height: 440px; overflow-y: auto; margin: 0 -10px; }
.feed-item { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 9px 10px; border-radius: 14px;
  transition: background-color .12s; }
.feed-item:hover { background: var(--panel-2); }
.feed-item b { font-weight: 600; } .feed-item .muted { font-size: 12px; }
.feed-hora { font-size: 12px; color: var(--texto-3); white-space: nowrap; }
/* Chips: texto con tinte suave, sin bordes */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 980px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.chip.bien { background: var(--bien-fondo); color: var(--bien); }
.chip.mal { background: var(--mal-fondo); color: var(--mal); }
.chip.aviso { background: var(--aviso-fondo); color: var(--aviso); }
.chip.neutro { background: var(--control); color: var(--texto-2); }
.chip.marca { background: var(--acento-fondo); color: var(--acento); }

/* ───────── tablas: hairlines, cabecera discreta ───────── */
.tabla-caja { overflow-x: auto; margin: 0 -28px -24px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-weight: 500; font-size: 12px; color: var(--texto-3); padding: 10px 16px;
  border-bottom: 1px solid var(--borde-suave); white-space: nowrap; }
th:first-child, td:first-child { padding-left: 28px; } th:last-child, td:last-child { padding-right: 28px; }
td { padding: 12px 16px; border-bottom: 1px solid var(--borde-suave); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
th.d, td.d { text-align: right; }
tbody tr.link { cursor: pointer; transition: background-color .12s; } tbody tr.link:hover { background: var(--panel-2); }
.celda-cli { display: flex; align-items: center; gap: 10px; font-weight: 600; }

/* ───────── embudo y respuestas ───────── */
.embudo { display: grid; gap: 10px; }
.embudo-fila { display: grid; grid-template-columns: minmax(0, 1fr) 56px 56px; gap: 10px; align-items: center; font-size: 13px; }
.embudo-fila .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--texto-2); }
.pista { position: relative; height: 8px; background: var(--control); border-radius: 980px; overflow: hidden; grid-column: 1 / -1; }
.pista i { position: absolute; inset: 0 auto 0 0; background: var(--acento); border-radius: 980px; }
.subtitulo { margin: 0 0 14px; font-size: 13px; font-weight: 600; letter-spacing: -.01em; color: var(--texto-2); }
.pregunta { display: grid; gap: 8px; margin-bottom: 20px; }
.pregunta h3 { margin: 0 0 2px; font-size: 14px; font-weight: 600; font-family: var(--fuente); }
.opcion { display: grid; grid-template-columns: minmax(0, 1fr) 84px; gap: 10px; align-items: center; font-size: 12.5px; }
.opcion .barra-h { height: 6px; background: var(--control); border-radius: 980px; overflow: hidden; margin-top: 5px; }
.opcion .barra-h i { display: block; height: 100%; background: var(--acento); border-radius: 980px; }
.opcion.descarta .barra-h i { background: var(--texto-3); }
.opcion .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opcion .cual { font-size: 11.5px; text-align: right; }
.nota { background: var(--aviso-fondo); color: var(--aviso); border-radius: 18px; padding: 14px 20px; font-size: 14px; }
.explica { background: var(--fondo); border-radius: 16px; padding: 12px 16px; font-size: 13px; color: var(--texto-2); }

/* ───────── equipo y ajustes ───────── */
.lista { display: grid; }
.lista-fila { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--borde-suave); flex-wrap: wrap; }
.lista-fila:last-child { border-bottom: 0; }
.lista-fila .der { margin-left: auto; display: flex; gap: 8px; align-items: center; }
a.lista-fila { color: inherit; transition: background-color .12s; border-radius: 12px; }
a.lista-fila:hover { background: var(--panel-2); }
.form-linea { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.enlace-caja { display: flex; gap: 10px; align-items: center; background: var(--fondo); border-radius: 16px; padding: 12px 16px; margin-top: 14px; flex-wrap: wrap; }
.enlace-caja code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 12.5px; }
.muestras { display: flex; gap: 12px; flex-wrap: wrap; }
.muestra { width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; padding: 0;
  box-shadow: 0 0 0 1px var(--borde-suave); transition: transform .1s ease-out; }
.muestra:active { transform: scale(.94); }
.muestra.activo { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--texto); }
.colores-libres { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.colores-libres label { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.colores-libres input[type=color] { width: 40px; height: 32px; border: 0; border-radius: 10px; padding: 2px; background: var(--control); }
.logo-editor { display: flex; align-items: center; gap: 10px; }

/* ───────── capas flotantes ───────── */
.tip { position: fixed; z-index: 50; pointer-events: none; background: var(--tip); color: var(--fondo); padding: 8px 12px; border-radius: 12px;
  font-size: 12px; white-space: nowrap; -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.toast { position: fixed; z-index: 60; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  background: var(--tip); color: var(--fondo); padding: 11px 20px; border-radius: 980px; font-size: 13px; font-weight: 500;
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); animation: aparece .25s ease-out; }
@keyframes aparece { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
.cargando { color: var(--texto-3); padding: 48px 0; text-align: center; }

@media (max-width: 1100px) {
  .grid-2, .grid-2-igual { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 20; transform: translateX(-100%);
    transition: transform .3s cubic-bezier(.32, .72, 0, 1); background: var(--panel); }
  .sidebar.abierta { transform: none; }
  .btn-icono { display: inline-block; }
  .barra { padding: 10px 16px; }
  .vista { padding: 24px 16px 56px; gap: 16px; }
  .cabecera h1 { font-size: 30px; }
  .cabecera p { font-size: 15px; }
  .tarjeta { padding: 20px; border-radius: 22px; }
  .tabla-caja { margin: 0 -20px -20px; }
  th:first-child, td:first-child { padding-left: 20px; } th:last-child, td:last-child { padding-right: 20px; }
  .kpi .valor { font-size: 24px; }
  .spark { width: 64px; }
  .form-linea { grid-template-columns: 1fr; }
  .opcion { grid-template-columns: minmax(0, 1fr) 40px 76px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .barra, .tip, .toast { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .barra { background: var(--fondo); }
}

/* Competencia */
.comp-lista { display: grid; gap: 12px; }
.comp { border: 1px solid var(--borde-suave); border-radius: 20px; padding: 16px 18px; }
.comp-top { border-color: var(--acento); }
.comp-cab { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.comp-cab .der { margin-left: auto; }
.comp-nombre { font-size: 16px; letter-spacing: -.01em; }
.fuerza { display: inline-grid; place-items: center; min-width: 40px; height: 40px; border-radius: 50%; background: var(--acento-fondo); color: var(--acento); font-weight: 700; font-variant-numeric: tabular-nums; }
.comp-meta { margin-top: 6px; }
.comp-angulo { margin-top: 8px; font-size: 14px; line-height: 1.45; }
.comp-ads { margin-top: 6px; }
.comp-seccion { margin: 26px 0 12px; font-size: 17px; letter-spacing: -.01em; }
.comp-analisis { margin-top: 12px; background: var(--panel-2); border-radius: 14px; padding: 10px 14px; }
.comp-analisis summary, .ad summary { cursor: pointer; }
.an-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 18px; margin-top: 10px; }
.an-campo { font-size: 13.5px; line-height: 1.45; }
.an-campo + .an-campo { margin-top: 0; }
.an-et { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--texto-3); margin-bottom: 2px; }
.an-robar { margin-top: 12px; padding: 10px 14px; border-radius: 12px; background: var(--acento-fondo); font-size: 13.5px; line-height: 1.45; }
.comp-ul { margin: 0; padding-left: 18px; }
.ad { border-top: 1px solid var(--borde-suave); }
.ad-cab { display: flex; align-items: center; gap: 12px; padding: 10px 0; list-style: none; }
.ad-cab::-webkit-details-marker { display: none; }
.ad-mini { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: none; background: var(--fondo); }
.ad-mini-v { display: grid; place-items: center; color: var(--texto-3); }
.ad-txt { display: grid; gap: 3px; flex: 1; min-width: 0; }
.ad-linea { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ad-mas { flex: none; }
.ad[open] .ad-mas::after { content: " ▴"; } .ad:not([open]) .ad-mas::after { content: " ▾"; }
.ad-cuerpo { padding: 0 0 14px 68px; display: grid; gap: 10px; }
.ad-copy { white-space: pre-line; font-size: 13.5px; }
.ad-trans p { font-size: 13px; line-height: 1.5; color: var(--texto-2); margin: 6px 0 0; }
.comp-dias { min-width: 64px; font-weight: 600; }
.comp-tit { flex: 1; min-width: 180px; overflow-wrap: anywhere; }
.comp-pie { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.comp-pie .der { margin-left: auto; }
.comp-desc { margin-top: 16px; }
.comp-desc summary { cursor: pointer; padding: 6px 0; }
.btn.peq { padding: 5px 12px; font-size: 12px; }
@media (max-width: 640px) { .comp { padding: 14px; } .comp-pie .der, .comp-cab .der { margin-left: 0; } .ad-cuerpo { padding-left: 0; } }
.comp-como summary { cursor: pointer; }
.comp-como p { margin: 10px 0 0; }

/* Leads y cierres por anuncio */
.celda-anuncio { white-space: normal; min-width: 240px; }
.origen-anuncio { display: flex; gap: 10px; align-items: center; }
.origen-img { width: 40px; height: 40px; object-fit: cover; border-radius: 10px; flex: none; }
.cierre-titulo { margin: 18px 0 8px; }
.form-linea.form-cierre { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto; }
.cierres-apuntados { margin-top: 12px; }
.cierre-anuncio { flex: 1; min-width: 180px; }
@media (max-width: 760px) { .form-linea.form-cierre { grid-template-columns: 1fr; } }

/* ───────── Economía de la oferta (Break-Even ROAS, 30-09-2026) ───────── */
.eco-oferta { padding: 18px 0 22px; border-top: 1px solid var(--borde-suave); }
.eco-oferta:first-of-type { border-top: 0; padding-top: 0; }
.eco-titulo { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: .012em; }
.eco-acciones { display: flex; gap: 8px; flex-wrap: wrap; }
.eco-kpis { margin-bottom: 14px; }
.eco-kpis .valor { font-size: 26px; }
.eco-cpl .muted { white-space: normal; font-weight: 400; font-size: 13px; line-height: 1.35; }
.eco-capa { display: inline-block; margin-left: 4px; font-size: 10.5px; font-weight: 500; color: var(--texto-3);
  text-transform: lowercase; letter-spacing: 0; }
.eco-frase { margin: 0 0 16px; font-size: 15px; color: var(--texto-2); }
.eco-form { display: grid; gap: 16px; margin-top: 18px; padding: 22px 24px; background: var(--fondo); border-radius: 22px; }
.eco-form .campo .muted { font-weight: 400; }
.eco-coste { display: grid; grid-template-columns: minmax(0, 2fr) minmax(90px, 1fr) auto; gap: 8px; margin-bottom: 8px; }
.eco-coste input { padding: 10px 14px; border: 1px solid var(--borde); border-radius: 12px; background: var(--panel); color: var(--texto); font-size: 15px; }
.eco-cond { display: grid; gap: 12px; }
.eco-cond[open] { gap: 12px; }
.eco-cond summary { cursor: pointer; margin: 0; }
.eco-cond > * + * { margin-top: 12px; }
.eco-check { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: var(--texto); }
.form-linea.eco-rec, .form-linea.eco-tasas { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.eco-botones { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 760px) {
  .form-linea.eco-rec, .form-linea.eco-tasas { grid-template-columns: 1fr; }
  .eco-form { padding: 18px 16px; }
}
.eco-sub { margin-top: 6px; }
.form-linea.eco-tres { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.eco-aviso-rec { display: block; padding: 10px 14px; border-radius: 14px; background: var(--aviso-fondo); color: var(--aviso); font-size: 13px; font-weight: 400; }
@media (max-width: 760px) { .form-linea.eco-tres { grid-template-columns: 1fr; } }
/* Leads por canal (Meta / Instagram orgánico / Google / sin UTM), 01-10-2026 */
.canales { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0 0 16px; }
.canal { display: grid; gap: 2px; padding: 12px 16px; border-radius: 16px; background: var(--fondo); }
.canal b { font: 600 22px/1.15 var(--fuente-display); letter-spacing: -.02em; }
