/* Estructura y forma de la Página del negocio.
   Los colores y las fuentes salen SOLO de los tokens de tema.css
   (= datos/pagina-del-negocio/Estilos-branding/negro/estilo.css). Acá no van colores sueltos.
   Café solo en botones. Sin mayúsculas forzadas ni itálicas: todo en escritura normal. */

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); /* color mate, sin degradado */
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--display); }
.it { font: inherit; color: inherit; font-style: normal; text-transform: none; letter-spacing: inherit; }

.app { display: flex; min-height: 100vh; }

/* ── barra lateral (distribución de la imagen 2) ── */
.lateral {
  width: 200px; flex: none; background: var(--lateral);
  padding: 22px 12px; position: sticky; top: 0; height: 100vh;
  border-right: 1px solid var(--line);
}
.marca { display: flex; align-items: center; gap: 10px; padding: 0 8px 26px; }
.marca-logo { width: 28px; height: 28px; object-fit: contain; filter: var(--logo-filter); }
.marca-nombre { font-family: var(--display); font-weight: 700; letter-spacing: .02em; }
#menu a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-card);
  color: var(--ink2); margin-bottom: 2px; font-size: 14.5px;
}
#menu a:hover { background: var(--card); color: var(--ink); }
#menu a.activo { background: var(--lateral-activo); color: var(--ink); }
.ico {
  /* íconos de línea, sin cuadrado: todos del mismo tamaño y grosor, en café */
  width: 20px; height: 20px; flex: none; fill: none;
  stroke: var(--icono); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.contador {
  margin-left: auto; background: var(--accent2); color: var(--ink); font-size: 11px; font-weight: 700;
  min-width: 20px; height: 20px; border-radius: var(--r-pill); display: none; place-items: center; padding: 0 6px;
}
.contador.si { display: grid; }

/* ── cabecera (imagen 1) ── */
.principal { flex: 1; min-width: 0; }
.cabecera {
  display: flex; align-items: center; gap: 14px; padding: 18px 32px;
  border-bottom: 1px solid var(--line);
}
.saludo { margin: 0; font-weight: 500; font-size: 28px; }
.cabecera-der { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.actualizado { color: var(--ink3); font-size: 13px; }
.logo { width: 46px; height: 46px; object-fit: contain; filter: var(--logo-filter); }
.hamburguesa { display: none; background: none; border: 0; font-size: 22px; padding: 4px; }

.vista { padding: 32px; max-width: 1400px; margin: 0 auto; }

/* ── tarjetas ── */
.tarjeta {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel);
  padding: 24px 26px; min-width: 0;
}
.tarjeta h2 { margin: 0; font-weight: 500; font-size: 23px; }
.tarjeta-cab { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; }
.ver-mas { color: var(--accent-ink); font-size: 14px; white-space: nowrap; }
.ver-mas:hover { text-decoration: underline; }

/* ── hub ── */
.hub {
  display: grid; gap: 22px;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr) minmax(0, 5fr);
  align-items: start;
}
.hub-col { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.c4 { grid-column: 1 / 3; }
.c5 { grid-column: 3; }

.boton {
  background: var(--accent); color: var(--on-accent); border: 0; border-radius: var(--r-pill);
  padding: 10px 18px; font-weight: 700; white-space: nowrap; display: inline-block;
}
.boton:hover { filter: brightness(1.12); }
.boton-sec { background: var(--accent); color: var(--on-accent); }
.boton:disabled { opacity: .5; cursor: default; }

.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 8px; }
.kpi { background: var(--tile); border-radius: var(--r-win); padding: 14px 16px; }
.kpi-valor { font-family: var(--display); font-size: 30px; font-weight: 700; color: var(--accent-ink); }
.kpi-valor.falta { font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--ink3); padding: 10px 0 8px; }
.kpi-nombre { color: var(--ink2); font-size: 13px; margin-top: 2px; }
.objetivo { margin-top: 20px; }
.objetivo-linea { display: flex; justify-content: space-between; font-size: 14px; color: var(--ink2); margin-bottom: 8px; gap: 10px; }
.barra { height: 8px; background: var(--tile); border-radius: var(--r-pill); overflow: hidden; }
.barra > i { display: block; height: 100%; background: var(--ink); }
.chip {
  display: inline-block; background: var(--tile); color: var(--ink); border-radius: var(--r-pill);
  padding: 5px 12px; font-size: 12px; font-weight: 700;
}

.falta-tag {
  display: inline-block; border: 1px dashed var(--line2); color: var(--ink);
  border-radius: var(--r-card); padding: 8px 12px; font-size: 13px; font-weight: 600;
}
.vacio { color: var(--ink2); font-size: 14px; line-height: 1.5; }
.vacio .falta-tag { margin-bottom: 10px; }

.embudo { display: flex; flex-direction: column; gap: 8px; }
.etapa { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.etapa-nombre { width: 130px; color: var(--ink2); flex: none; }
.etapa-barra { flex: 1; height: 6px; border-radius: var(--r-pill); background: var(--tile); }
.etapa-num { width: 30px; text-align: right; color: var(--ink3); }


/* reuniones por día (abajo-izq de la imagen 1) */
.dias { display: flex; flex-direction: column; gap: 12px; }
.dias.corto { max-height: 420px; overflow-y: auto; padding-right: 4px; }
.dia {
  background: var(--tile); border-left: 4px solid var(--accent2); border-radius: 6px var(--r-win) var(--r-win) 6px;
  padding: 14px 18px;
}
.dia.hoy { border-left-color: var(--ink); }
.dia-nombre { font-family: var(--display); font-weight: 700; letter-spacing: .05em; color: var(--ink); font-size: 15px; }
.dia-nombre small { font-family: var(--sans); font-weight: 500; color: var(--ink3); letter-spacing: 0; margin-left: 8px; text-transform: none; }
.reu { display: flex; gap: 14px; align-items: baseline; margin-top: 8px; color: var(--ink2); flex-wrap: wrap; }
.reu b { font-weight: 600; color: var(--ink); }
.reu-hora { color: var(--accent-ink); font-weight: 600; min-width: 150px; }
.reu.pasada { opacity: .45; }

/* ── secciones internas ── */
.seccion-titulo { font-size: 30px; font-weight: 500; margin: 0 0 22px; }
.seccion-sub { color: var(--ink2); margin: -14px 0 24px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 22px; }
.columnas-crm { display: grid; grid-template-columns: repeat(6, minmax(140px, 1fr)); gap: 12px; overflow-x: auto; }
.col-crm { background: var(--tile); border-radius: var(--r-win); padding: 14px; min-height: 160px; }
.col-crm h3 { margin: 0 0 8px; font-size: 12px; font-weight: 700; color: var(--accent-ink); letter-spacing: .08em; }

input[type="text"], select {
  background: var(--tile); border: 1px solid var(--line2); color: var(--ink); border-radius: var(--r-card);
  padding: 8px 10px; font: inherit;
}
.campos { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }
.campo { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink2); }
.acciones { display: flex; gap: 12px; align-items: center; margin-top: 20px; flex-wrap: wrap; }
.aviso { font-size: 14px; color: var(--ink3); }
.aviso.ok { color: var(--accent-ink); } .aviso.error { color: var(--bad); }

.conexion { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.conexion:last-child { border-bottom: 0; }
.punto { width: 10px; height: 10px; border-radius: 50%; background: var(--ink3); flex: none; }
.punto.on { background: var(--accent-ink); }
.punto.off { background: transparent; border: 1px solid var(--ink3); }
.conexion-nombre { flex: 1; }
.conexion-estado { color: var(--ink2); font-size: 14px; }

/* cuenta regresiva a la próxima reunión (minimalista) */
.cuenta { display: inline-flex; align-items: center; gap: 8px; color: var(--ink2); font-size: 13px; white-space: nowrap; }
.cuenta i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-ink); }

/* ── Mi perfil ── */
.perfil { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.perfil-foto { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.avatar-perfil { width: 190px; height: 190px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line2); }
.avatar-inicial {
  display: grid; place-items: center; background: var(--tile); color: var(--accent-ink);
  font-family: var(--display); font-weight: 800; font-size: 84px;
}
.boton-foto { cursor: pointer; }
.icono-btn { background: none; border: 0; font-size: 20px; color: var(--icono); padding: 4px 8px; border-radius: var(--r-card); }
.icono-btn:hover { background: var(--tile); }
.link-btn { background: none; border: 0; color: var(--icono); font-size: 14px; padding: 2px 6px; }
.dato { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; color: var(--ink2); }
.dato b { font-weight: 500; color: var(--ink2); text-align: right; word-break: break-word; }
.dato-edit { flex-direction: column; align-items: stretch; gap: 6px; padding: 8px 0; font-size: 14px; }
.dato-edit input { width: 100%; }
input[type="password"], input[type="email"] {
  background: var(--tile); border: 1px solid var(--line2); color: var(--ink); border-radius: var(--r-card);
  padding: 10px 12px; font: inherit;
}

/* ── foto de perfil + menú (arriba a la derecha) ── */
.menu-usuario { position: relative; }
.avatar-btn { background: none; border: 0; padding: 0; border-radius: 50%; display: block; }
.avatar-btn:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; }
.avatar-perfil.chico { width: 42px; height: 42px; font-size: 18px; display: grid; }
img.avatar-perfil.chico { display: block; }
.menu-desplegable {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 30; min-width: 210px;
  background: var(--card); border: 1px solid var(--line2); border-radius: var(--r-win); padding: 6px;
}
.menu-desplegable a, .menu-desplegable button {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 0; background: none;
  border-radius: var(--r-card); font-weight: 600; font-size: 15px; color: var(--ink); text-align: left;
}
.menu-desplegable a:hover, .menu-desplegable button:hover { background: var(--tile); }
.menu-desplegable svg { width: 18px; height: 18px; fill: none; stroke: var(--icono); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.menu-desplegable button svg { stroke: var(--icono); }
.menu-desplegable hr { border: 0; border-top: 1px solid var(--line); margin: 2px 8px; }

/* ── Equipo ── */
.miembro { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.miembro:last-child { border-bottom: 0; }
.miembro-datos { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.miembro-datos b { color: var(--ink); font-weight: 600; }
.miembro-datos span { color: var(--ink2); font-size: 14px; word-break: break-all; }
.miembro-datos small { color: var(--ink3); font-size: 12px; }
.miembro-acciones { display: flex; gap: 6px; flex-wrap: wrap; }
.link-btn.peligro { color: var(--bad); }
.rango { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.rango input { flex: 1; min-width: 200px; }
.link-invitacion { border-color: var(--line2); }

/* ── pantalla de entrada ── */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-caja { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 14px; }
.login-caja .seccion-sub { margin: 0; }
.login-caja input { width: 100%; }
.login-logo { margin-bottom: 6px; align-self: center; }
/* caja de entrar: negro mate, sin sombra, centrada */
.login-mate { background: var(--bg); }
.login-mate .error { text-align: center; }

/* ── responsive ── */
@media (max-width: 1200px) {
  .hub { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .c1 { grid-column: 1 / 3; }
  .c4 { grid-column: 1; } .c5 { grid-column: 2; }
}
@media (max-width: 860px) {
  .lateral { position: fixed; left: 0; z-index: 20; transform: translateX(-100%); transition: transform .2s; }
  .lateral.abierta { transform: none; }
  .velo { display: none; position: fixed; inset: 0; background: var(--shadow); z-index: 10; }
  .velo.si { display: block; }
  .hamburguesa { display: block; }
  .cabecera { padding: 14px 16px; }
  .saludo { font-size: 22px; }
  .actualizado { display: none; }
  .vista { padding: 16px; }
  .hub { grid-template-columns: minmax(0, 1fr); }
  .c1, .c2, .c3, .c4, .c5 { grid-column: 1; }
  .c4 { order: 1; } .c2 { order: 2; } .c3 { order: 3; } .c5 { order: 4; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
  .tarjeta { padding: 20px; }
  .reu-hora { min-width: 0; }
}

[hidden] { display: none !important; }
.aviso:empty { display: none; }

/* ── /company/: los 6 portales ── */
.marca-cabecera { padding: 0; }
.portales {
  max-width: 980px; margin: 0 auto; padding: 56px 32px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-content: start;
}
/* Botones de los portales (referencia "Pending Videos", 2026-11-05): tarjeta horizontal,
   ícono en cuadrado redondeado café a la izquierda y el nombre al lado. Colores mate. */
.portal-btn {
  display: flex; align-items: center; gap: 16px; padding: 22px 20px;
  background: var(--portal-fondo); border: 1px solid var(--line); border-radius: 18px;
  color: var(--ink);
}
.portal-btn:hover { border-color: var(--line2); background: var(--card); }
.portal-ico {
  width: 44px; height: 44px; flex: none; display: grid; place-items: center;
  background: var(--accent); border-radius: 12px;
}
.portal-ico .ico { width: 22px; height: 22px; stroke: var(--on-accent); stroke-width: 1.7; }
.portal-nombre { font-size: 17px; font-weight: 500; }
.menu-separador { border: 0; border-top: 1px solid var(--line); margin: 10px 4px; }
@media (max-width: 860px) {
  .portales { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 24px 16px; gap: 12px; }
  .portal-btn { padding: 16px 14px; gap: 12px; }
  .portal-nombre { font-size: 15px; }
}

/* Equipo: elegir el rol al invitar */
.rol-cab { margin: 22px 0 12px; }
.roles { display: flex; flex-wrap: wrap; gap: 10px; }
.rol-opcion { cursor: pointer; }
.rol-opcion input { position: absolute; opacity: 0; pointer-events: none; }
.rol-opcion span {
  display: inline-block; padding: 9px 16px; border-radius: var(--r-pill);
  border: 1px solid var(--line2); background: var(--tile); color: var(--ink); font-size: 14px;
}
.rol-opcion input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.rol-opcion input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.miembro-acciones select { padding: 6px 8px; font-size: 14px; }

/* ── Login (quoramedia.org/ y /client-login/), en inglés ── */
.acceso { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 20px; background: var(--bg); }
.acceso-cab { text-align: center; margin-bottom: 34px; }
.acceso-logo { width: 54px; height: 54px; object-fit: contain; filter: var(--logo-filter); }
.acceso-cab h1 { margin: 10px 0 0; font-size: 25px; font-weight: 800; letter-spacing: -.01em; color: var(--ink); }
.acceso-cab p { margin: 12px 0 0; font-size: 15px; color: var(--acceso-suave); }
.acceso-caja {
  width: 100%; max-width: 448px; display: flex; flex-direction: column; gap: 18px;
  background: var(--acceso-caja); border: 1px solid var(--line); border-radius: 24px; padding: 32px;
}
.acceso-campo { display: flex; flex-direction: column; gap: 10px; font-size: 14px; font-weight: 600; color: var(--ink); }
.acceso-input { display: flex; align-items: center; gap: 10px; background: var(--acceso-input); border-radius: 12px; padding: 0 14px; }
.acceso-input svg { width: 17px; height: 17px; flex: none; fill: none; stroke: var(--acceso-suave); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.acceso-input input {
  flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--ink);
  font: inherit; font-size: 15px; font-weight: 400; padding: 12px 0;
}
.acceso-input:focus-within { outline: 1px solid var(--line2); }
.acceso-input input:-webkit-autofill { -webkit-text-fill-color: var(--ink); -webkit-box-shadow: 0 0 0 40px var(--acceso-input) inset; caret-color: var(--ink); }
.acceso-boton {
  display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 4px;
  background: var(--acceso-boton); color: var(--acceso-boton-texto); border: 0; border-radius: var(--r-pill);
  padding: 11px 20px; font: inherit; font-size: 15px; font-weight: 500; cursor: pointer;
}
.acceso-boton svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.acceso-boton:hover { filter: brightness(.92); }
.acceso-boton:disabled { opacity: .6; cursor: default; }
.acceso-link { align-self: center; background: none; border: 0; padding: 4px; font: inherit; font-size: 14px; color: var(--acceso-suave); cursor: pointer; }
.acceso-link:hover { color: var(--ink); }
.acceso-nota { margin: 0; text-align: center; font-size: 13.5px; color: var(--acceso-suave); }
.acceso-error { margin: 0; text-align: center; font-size: 14px; color: var(--bad); }
.acceso-error:empty { display: none; }
.acceso-pie { margin: 24px 0 0; font-size: 14px; color: var(--acceso-suave); }
.acceso-pie a { color: var(--ink); font-weight: 500; }
.acceso-pie a:hover { text-decoration: underline; }
@media (max-width: 520px) { .acceso-caja { padding: 24px 20px; } }

/* ── Barra de arriba de los portales: todo el ancho y fija al bajar ── */
:root { --alto-barra: 64px; }
.barra-portal {
  position: sticky; top: 0; z-index: 25; height: var(--alto-barra);
  display: flex; align-items: center; gap: 14px; padding: 0 32px;
  /* lo que pasa por detrás al bajar se ve desenfocado (única excepción a "todo mate") */
  background: var(--barra-fondo);
  -webkit-backdrop-filter: blur(var(--barra-blur)); backdrop-filter: blur(var(--barra-blur));
  border-bottom: 1px solid var(--line);
}
.barra-titulo { font-size: 17px; font-weight: 500; color: var(--ink); }
.salir-btn {
  display: flex; align-items: center; gap: 8px; background: none; border: 0; padding: 6px 4px;
  font: inherit; font-size: 15px; color: var(--ink); cursor: pointer;
}
.salir-btn svg { width: 18px; height: 18px; fill: none; stroke: var(--icono); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.salir-btn:hover { opacity: .8; }
.barra-portal .avatar-perfil.chico { width: 38px; height: 38px; font-size: 16px; }
.barra-portal + .app .lateral { top: var(--alto-barra); height: calc(100vh - var(--alto-barra)); padding-top: 18px; }
.principal > .saludo { max-width: 1400px; margin: 0 auto; padding: 28px 32px 0; }
@media (max-width: 860px) {
  .barra-portal { padding: 0 16px; }
  .barra-portal + .app .lateral { top: var(--alto-barra); height: calc(100vh - var(--alto-barra)); }
  .principal > .saludo { padding: 18px 16px 0; }
  .salir-btn span, .salir-btn { font-size: 14px; }
}

/* ── Marketer Portal: selector de mes y cuadrículas (Validación de ideas, Contenido) ── */
.mes-nav { display: inline-flex; align-items: center; gap: 14px; margin: 0 0 20px; }
.mes-nav b { font-weight: 600; font-size: 15px; min-width: 56px; text-align: center; }
.mes-flecha { background: none; border: 0; padding: 4px; display: grid; place-items: center; cursor: pointer; }
.mes-flecha svg { width: 18px; height: 18px; fill: none; stroke: var(--icono); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mes-flecha:disabled { opacity: .3; cursor: default; }
.tabla-tarjeta { padding: 0; overflow: hidden; }
.tabla-tarjeta .acciones, .tabla-tarjeta > .aviso { padding: 0 20px 20px; margin-top: 16px; }
.tabla-scroll { overflow-x: auto; }
.tabla { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabla th {
  text-align: left; font-weight: 500; color: var(--ink2); white-space: nowrap;
  padding: 14px 12px; border-bottom: 1px solid var(--line); background: var(--card);
}
.tabla td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tabla tbody tr:last-child td { border-bottom: 0; }
.tabla select, .tabla input[type="text"], .tabla input[type="url"] {
  width: 100%; min-width: 92px; background: var(--tile); border: 1px solid var(--line); color: var(--ink);
  border-radius: 8px; padding: 7px 8px; font: inherit; font-size: 14px;
}
.tabla .col-idea { min-width: 280px; }
.tabla .col-notas { min-width: 220px; }
.tabla .col-num { width: 44px; color: var(--ink2); white-space: nowrap; }
.tabla .col-accion { white-space: nowrap; text-align: right; }
.tabla-vacia { text-align: center; color: var(--ink3); padding: 40px 12px !important; }
.idea-texto { display: block; min-width: 240px; line-height: 1.35; }
.tabla select:disabled, .tabla input:disabled { opacity: .7; }
.fila-aprobada td { background: var(--card); }
/* Puntuación: verde si pasa de 6, rojo si es 6 o menos (como el Excel) */
.nota { display: inline-block; min-width: 46px; text-align: center; padding: 6px 10px; border-radius: 8px; font-weight: 700; background: var(--tile); }
.nota-ok { background: var(--nota-ok); color: #fff; }
.nota-mal { background: var(--nota-mal); color: #fff; }
.chip-aprobada { display: inline-block; padding: 6px 12px; border-radius: var(--r-pill); background: var(--tile); border: 1px solid var(--line2); font-size: 13px; }
.boton-chico { padding: 7px 14px; font-size: 13.5px; }
.icono-btn { background: none; border: 0; padding: 6px; vertical-align: middle; cursor: pointer; }
.icono-btn svg { width: 18px; height: 18px; fill: none; stroke: var(--icono); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.celda-link { display: flex; align-items: center; gap: 6px; min-width: 160px; }
.celda-link a { display: grid; place-items: center; flex: none; }
.celda-link svg { width: 18px; height: 18px; fill: none; stroke: var(--icono); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabla select.status[data-status="Publicado"] { background: var(--nota-ok); border-color: var(--nota-ok); }
/* anchos de la cuadrícula: Sí/No angostos, menús largos sin cortar el texto */
.tabla th.col-sino { white-space: normal; min-width: 76px; max-width: 118px; line-height: 1.25; }
.tabla td.col-sino { padding-left: 6px; padding-right: 6px; }
.tabla select.sino { min-width: 68px; width: 76px; }
.tabla select.ancho { min-width: 168px; }
.tabla th, .tabla td { padding-left: 10px; padding-right: 10px; }
.tabla .col-idea { min-width: 260px; }

/* ── Contenido: cuadrícula como el Excel (celdas pegadas, encabezado café, chips de color) ── */
.excel-marco { overflow-x: auto; border: 1px solid var(--excel-linea); border-radius: 6px; background: var(--excel-celda); }
.excel { width: 100%; border-collapse: collapse; font-size: 13px; color: var(--excel-texto); background: var(--excel-celda); }
.excel th {
  background: var(--excel-cab); color: #fff; font-weight: 700; font-size: 14px; text-align: center;
  padding: 9px 10px; border: 1px solid var(--excel-cab-linea); white-space: nowrap;
}
.excel td { border: 1px solid var(--excel-linea); padding: 0; height: 30px; text-align: center; vertical-align: middle; }
.excel .col-num { width: 52px; font-weight: 600; font-size: 14px; padding: 0 8px; }
.excel .col-idea { min-width: 280px; text-align: left; padding: 5px 10px; line-height: 1.3; }
.excel .col-notas { min-width: 240px; }
.excel input[type="text"], .excel input[type="url"] {
  width: 100%; min-width: 110px; height: 30px; border: 0; border-radius: 0; background: transparent;
  color: var(--excel-texto); font: inherit; font-size: 13px; text-align: center; padding: 0 8px;
}
.excel input:focus { outline: 2px solid var(--excel-cab); outline-offset: -2px; background: #fff; }
.excel-chip { position: relative; height: 30px; min-width: 118px; }
.excel-chip::after {
  content: ""; position: absolute; right: 8px; top: 50%; margin-top: -2px; pointer-events: none;
  border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; opacity: .8;
}
.excel-chip select {
  appearance: none; -webkit-appearance: none; width: 100%; height: 100%; border: 0; border-radius: 0;
  background: transparent; color: inherit; font: inherit; font-size: 13px; text-align: center; text-align-last: center;
  padding: 0 22px 0 8px; cursor: pointer;
}
.excel-chip select:focus { outline: 2px solid var(--excel-cab); outline-offset: -2px; }
.excel-chip option { background: #fff; color: #000; }
.excel .celda-link { display: flex; align-items: center; gap: 4px; min-width: 150px; padding-left: 6px; }
.excel .celda-link svg { stroke: var(--excel-cab); }
.excel-vacia { color: #555; padding: 34px 12px !important; }
.excel .celda-link { justify-content: center; gap: 2px; padding: 0 4px; min-width: 120px; }
.excel-link {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px;
  background: #fff; border: 1px solid var(--excel-linea); color: #1F1F1F; font-size: 12.5px; font-weight: 600;
}
.excel-link svg, .excel-editar svg { width: 13px; height: 13px; fill: none; stroke: var(--excel-cab); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.excel-link:hover { background: #F7F7F7; }
.excel-editar { background: none; border: 0; padding: 4px; cursor: pointer; display: grid; place-items: center; opacity: .7; }
.excel-editar:hover { opacity: 1; }
.excel .celda-link a.excel-link { display: inline-flex; place-items: initial; white-space: nowrap; }
.excel input::placeholder { color: #9A9A9A; }
.excel td:nth-child(7) .excel-chip { min-width: 156px; }
.excel td:nth-child(5) input { min-width: 150px; }

/* ── Ajuste 2026-11-05: Contenido con el estilo oscuro de Validación, siempre en cuadros pegados,
   y las dos tablas enteras en pantalla (sin deslizar hacia el costado) ── */
.vista:has(.excel-marco), .vista:has(.tabla-fija) { max-width: none; }
.excel-marco { overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); }
.excel { table-layout: fixed; color: var(--ink); background: var(--card); }
.excel th {
  background: var(--card); color: var(--ink2); font-weight: 500; font-size: 13.5px; white-space: normal;
  border: 1px solid var(--line); padding: 12px 6px; line-height: 1.25;
}
.excel td { border: 1px solid var(--line); height: 38px; }
.excel tr > :first-child { border-left: 0; }
.excel tr > :last-child { border-right: 0; }
.excel thead th { border-top: 0; }
.excel tbody tr:last-child td { border-bottom: 0; }
.excel .col-num { width: auto; color: var(--ink2); padding: 0 4px; font-size: 13.5px; }
.excel .col-idea, .excel .col-notas { min-width: 0; }
.excel .col-idea { overflow-wrap: anywhere; }
.excel input[type="text"], .excel input[type="url"] { min-width: 0; height: 38px; color: var(--ink); padding: 0 6px; }
.excel input:focus { outline: 1px solid var(--line2); outline-offset: -1px; background: var(--tile); }
.excel input::placeholder { color: rgba(255,255,255,.35); }
.excel-chip, .excel td:nth-child(7) .excel-chip { min-width: 0; height: 38px; }
.excel td:nth-child(5) input { min-width: 0; }
.excel-chip select { font-size: 12.5px; padding: 0 18px 0 4px; text-overflow: ellipsis; }
.excel-chip::after { right: 6px; }
.excel-chip select:focus { outline: 1px solid var(--line2); outline-offset: -1px; }
.excel .celda-link { min-width: 0; gap: 0; padding: 0 2px; }
.excel .celda-link a.excel-link { background: var(--tile); border-color: var(--line2); color: var(--ink); padding: 3px 8px; }
.excel-link svg, .excel-editar svg { stroke: var(--icono); }
.excel-vacia { color: var(--ink3); }
/* Validación: columnas fijas para que entre toda la fila */
.tabla-fija { table-layout: fixed; }
.tabla-fija th, .tabla-fija th.col-sino { white-space: normal; min-width: 0; max-width: none; padding: 12px 6px; font-size: 13.5px; }
.tabla-fija td, .tabla-fija td.col-sino { padding: 8px 5px; }
.tabla-fija .col-idea { min-width: 0; }
.tabla-fija select, .tabla-fija select.sino, .tabla-fija select.ancho, .tabla-fija input[type="text"] { min-width: 0; width: 100%; }
.tabla-fija select { padding: 7px 4px; text-overflow: ellipsis; }
.tabla-fija .col-accion { white-space: normal; }
.tabla-fija .chip-aprobada { padding: 5px 9px; font-size: 12.5px; white-space: nowrap; }
.tabla-fija .boton-chico { padding: 7px 12px; }
.tabla-fija th, .tabla-fija th.col-sino { font-size: 12.5px; overflow-wrap: anywhere; }
@media (max-width: 1500px) {
  .excel th { font-size: 12.5px; padding: 10px 4px; }
  .excel-chip select { font-size: 12px; padding: 0 16px 0 3px; }
  .excel-chip::after { right: 5px; }
  .excel { font-size: 12.5px; }
}
.tabla-fija th, .tabla-fija th.col-sino { overflow-wrap: normal; padding: 12px 4px; }
@media (max-width: 1500px) { .tabla-fija th, .tabla-fija th.col-sino { font-size: 12px; } }

/* ── Ajuste 2026-11-05: textos que bajan de línea y celdas de lista pintadas enteras ── */
textarea.crece {
  display: block; width: 100%; min-height: 38px; resize: none; overflow: hidden;
  font: inherit; line-height: 1.35; color: var(--ink); background: transparent; border: 0;
}
.tabla-fija textarea.crece {
  background: var(--tile); border: 1px solid var(--line); border-radius: 8px; padding: 8px; font-size: 14px; min-height: 36px;
}
.tabla-fija textarea.crece:disabled { opacity: .7; }
.excel textarea.crece { padding: 10px 6px; font-size: 12.5px; text-align: center; }
.excel textarea.crece:focus { outline: 1px solid var(--line2); outline-offset: -1px; background: var(--tile); }
/* celda de lista: el color cubre toda la celda; el texto baja de línea si no entra */
.excel td.celda-chip { position: relative; cursor: pointer; padding: 0; }
.excel td.celda-chip::after {
  content: ""; position: absolute; right: 6px; top: 50%; margin-top: -2px; pointer-events: none;
  border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; opacity: .8;
}
.chip-texto { display: block; padding: 8px 18px 8px 6px; line-height: 1.3; font-size: 12.5px; overflow-wrap: anywhere; min-height: 38px; display: flex; align-items: center; justify-content: center; }
.excel td.celda-chip select {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer;
  appearance: none; -webkit-appearance: none; border: 0;
}
.excel td.celda-chip:focus-within { outline: 2px solid var(--line2); outline-offset: -2px; }
.boton:disabled { opacity: .4; cursor: not-allowed; filter: none; }
.chip-texto { overflow-wrap: normal; word-break: normal; padding: 8px 14px 8px 4px; }
.excel td.celda-chip::after { right: 4px; }

/* ── Grupos plegables del menú lateral (referencia: categorías de Discord) ── */
.menu-grupo { margin: 4px 0 2px; }
.menu-grupo-cab {
  display: flex; align-items: center; gap: 4px; width: 100%; background: none; border: 0; cursor: pointer;
  padding: 8px 10px 4px; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink2); text-align: left;
}
.menu-grupo-cab:hover { color: var(--ink); }
.menu-grupo-cab svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.menu-grupo.cerrado .menu-grupo-cab svg { transform: rotate(-90deg); }
/* cerrado: se ocultan todas sus secciones */
#menu .menu-grupo.cerrado .menu-grupo-items { display: none; }
@media (max-width: 1250px) {
  .tabla-fija th, .tabla-fija th.col-sino { font-size: 11px; padding: 10px 3px; overflow-wrap: anywhere; }
}
.excel-link.sin-link { cursor: default; font-weight: 500; white-space: normal; text-align: center; }

/* ── Ajuste 2026-11-05 ── */
/* Dropbox (grupo plegable del menú): abierto = línea vertical a la izquierda y secciones corridas
   a la derecha, como las carpetas del explorador de archivos */
.menu-grupo-items { margin-left: 19px; padding-left: 8px; border-left: 1px solid var(--line); }
#menu .menu-grupo-items a { padding-left: 8px; }
/* nombre del portal en la barra de arriba: más chico y gris */
.barra-titulo { font-size: 14px; font-weight: 400; color: var(--barra-titulo); letter-spacing: .01em; }

/* ── Contenido: fila de links arriba de los títulos (como la fila 2 del Excel), toda negra ── */
.excel thead tr.excel-carpetas td { background: #000; border: 0; border-bottom: 1px solid var(--line); height: 40px; padding: 6px 4px; text-align: center; }
.carpeta-chip {
  display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 3px 9px; border-radius: 999px;
  background: #F1F3F4; color: #1F1F1F; font-size: 11.5px; font-weight: 600; line-height: 1.2;
}
.carpeta-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.carpeta-chip svg { width: 12px; height: 12px; flex: none; fill: none; stroke: #1F1F1F; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
a.carpeta-chip:hover { background: #fff; }
.carpeta-chip.falta { background: transparent; color: var(--ink3); border: 1px dashed var(--line2); font-weight: 400; opacity: .7; }

/* Contenido en modo editor: celdas fijas (sin lista ni campo) */
.excel td.celda-chip.fija { cursor: default; }
.excel td.celda-chip.fija::after { display: none; }
.excel td.celda-chip.fija .chip-texto { padding-right: 6px; }
.celda-texto { display: block; padding: 10px 6px; font-size: 12.5px; line-height: 1.35; overflow-wrap: break-word; }

/* Founder Portal: divisor de cada portal en el menú (línea y abajo el nombre en letra chica) */
.menu-divisor { margin: 14px 8px 4px; padding-top: 10px; border-top: 1px solid var(--line); }
.menu-divisor span { display: block; padding: 0 2px; font-size: 11.5px; color: var(--ink3); opacity: .65; letter-spacing: .02em; }

/* ── Contenido: columna Editor (foto + nombre) y su lista para elegir ── */
.excel td.celda-editor { padding: 0 4px; }
.editor-btn { width: 100%; min-height: 38px; background: none; border: 0; cursor: pointer; color: var(--ink); font: inherit; display: flex; align-items: center; justify-content: center; }
.editor-btn:hover { background: var(--tile); }
.editor-elegido { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; min-width: 0; }
.editor-elegido span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.editor-vacio { font-size: 12.5px; color: rgba(255,255,255,.35); }
.avatar-perfil.mini { width: 22px; height: 22px; font-size: 11px; display: inline-grid; flex: none; border-width: 1px; }
img.avatar-perfil.mini { display: inline-block; }
.editor-menu {
  position: absolute; z-index: 40; min-width: 180px; max-height: 280px; overflow: auto;
  background: var(--card); border: 1px solid var(--line2); border-radius: var(--r-win); padding: 6px;
}
.editor-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: none;
  border-radius: var(--r-card); color: var(--ink); font: inherit; font-size: 14px; text-align: left; cursor: pointer;
}
.editor-menu button:hover, .editor-menu button.activo { background: var(--tile); }
.editor-menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 2px; }
.editor-menu .aviso { margin: 8px; }

/* ── Editor Portal → Branding → Estilo de edición ── */
.estilo { max-width: 860px; display: flex; flex-direction: column; gap: 20px; }
.estilo-fila { display: grid; grid-template-columns: 220px 1fr; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.estilo-fila:first-of-type { border-top: 0; }
.estilo-fila > b { font-weight: 500; color: var(--ink2); font-size: 14.5px; }
.estilo-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.estilo-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px 7px 9px; border-radius: var(--r-pill);
  background: var(--tile); border: 1px solid var(--line2); color: var(--ink); font-size: 13.5px; font-weight: 600;
}
.estilo-btn:hover { background: var(--accent2); }
.estilo-btn svg { width: 18px; height: 18px; flex: none; }
.estilo-btn .ico-instagram { fill: none; stroke: var(--ink); stroke-width: 1.8; }
.estilo-btn .ico-instagram .lleno { fill: var(--ink); stroke: none; }
.estilo-btn .ico-linea { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.estilo-paleta { display: flex; flex-wrap: wrap; gap: 10px; }
.color-muestra {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; border-radius: var(--r-card);
  background: var(--tile); border: 1px solid var(--line2); color: var(--ink); font: inherit; font-size: 13.5px; cursor: pointer; text-align: left;
}
.color-muestra small { display: block; font-size: 12px; color: var(--ink3); opacity: .75; }
.color-chip { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line2); flex: none; }
.estilo-pautas { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; font-size: 14.5px; line-height: 1.45; }
@media (max-width: 860px) { .estilo-fila { grid-template-columns: 1fr; gap: 8px; } }

/* aviso chico de guardado (abajo a la derecha) */
.aviso-guardado {
  position: fixed; right: 18px; bottom: 18px; z-index: 50; padding: 8px 14px; border-radius: var(--r-pill);
  background: var(--card); border: 1px solid var(--line2); color: var(--ink); font-size: 13px;
  transition: opacity .25s; opacity: 1;
}
.aviso-guardado.fuera { opacity: 0; pointer-events: none; }
.aviso-guardado.error { border-color: var(--nota-mal); }
.aviso-guardado.guardando::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--icono); vertical-align: middle; }

/* ── Editor Portal → Hoy (referencia: panel del editor) ── */
.hoy-tarjetas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 30px; }
.hoy-tarjeta {
  display: flex; align-items: center; gap: 16px; padding: 22px 20px;
  background: var(--portal-fondo); border: 1px solid var(--line); border-radius: 18px;
}
.hoy-tarjeta .portal-ico svg { width: 22px; height: 22px; fill: none; stroke: var(--on-accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.hoy-tarjeta small { display: block; font-size: 13.5px; color: var(--ink2); opacity: .75; }
.hoy-tarjeta b { display: block; font-size: 24px; font-weight: 700; margin-top: 2px; }
.hoy-tarjeta em { display: block; font-style: normal; font-size: 12px; color: var(--ink3); opacity: .55; margin-top: 2px; }
.hoy-cab { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.hoy-cab h2 { margin: 0 8px 0 0; font-size: 19px; font-weight: 600; width: 100%; }
.hoy-filtros { display: flex; gap: 8px; flex-wrap: wrap; }
.hoy-filtro { padding: 6px 13px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--tile); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.hoy-filtro.activo { background: var(--ink); color: #000; border-color: var(--ink); }
.hoy-buscar { margin-left: auto; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line2); border-radius: var(--r-pill); background: var(--bg); min-width: 240px; }
.hoy-buscar svg { width: 16px; height: 16px; fill: none; stroke: var(--ink2); stroke-width: 2; stroke-linecap: round; flex: none; }
.hoy-buscar input { flex: 1; border: 0; outline: 0; background: none; color: var(--ink); font: inherit; font-size: 13.5px; padding: 8px 0; }
.hoy-tabla td { padding: 12px 10px; }
.hoy-num { white-space: nowrap; color: var(--ink2); }
.hoy-idea { min-width: 240px; }
.hoy-status { display: inline-block; padding: 4px 10px; border-radius: var(--r-pill); font-size: 12.5px; white-space: nowrap; }
.hoy-vacio { color: rgba(255,255,255,.35); }
.hoy-sin { text-align: center; color: var(--ink3); padding: 40px 12px !important; opacity: .7; }
.hoy-tabla .excel-link { background: var(--tile); border: 1px solid var(--line2); color: var(--ink); display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.hoy-tabla .excel-link svg { width: 13px; height: 13px; fill: none; stroke: var(--icono); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 860px) { .hoy-tarjetas { grid-template-columns: 1fr; } .hoy-buscar { margin-left: 0; width: 100%; } }

/* ── Facturas (Editor Portal: Mis facturas · Facturas: Aprobación y Pagos) ── */
.factura-panel { max-width: 1100px; display: flex; flex-direction: column; gap: 14px; }
.factura-cab { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; }
.factura-cab .portal-ico svg { width: 22px; height: 22px; fill: none; stroke: var(--on-accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.factura-cab h2 { margin: 0; font-size: 20px; font-weight: 600; }
.factura-cab p { margin: 2px 0 0; font-size: 13.5px; color: var(--ink2); opacity: .7; }
.factura-mes { display: flex; justify-content: space-between; gap: 16px; padding: 18px; border: 1px solid var(--line); border-radius: var(--r-win); background: var(--portal-fondo); }
.factura-marca { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; }
.factura-titulo { display: flex; align-items: center; gap: 10px; margin: 4px 0 10px; }
.factura-titulo b { font-size: 17px; font-weight: 500; }
.factura-nota { margin: -4px 0 10px; font-size: 13px; color: #F4A3A3; }
.factura-btns, .fa-acciones { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.factura-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: var(--r-pill);
  background: none; border: 1px solid var(--line2); color: var(--ink); font: inherit; font-size: 13.5px; cursor: pointer;
}
.factura-btn:hover { background: var(--tile); }
.factura-btn.principal { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.factura-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.factura-total { text-align: right; flex: none; }
.factura-total small { display: block; font-size: 12px; color: var(--ink2); opacity: .7; }
.factura-total b { font-size: 19px; font-weight: 700; }
.factura-vacia, .factura-prox { margin: 6px 2px; font-size: 14px; color: var(--ink3); opacity: .7; }
.chip-estado { display: inline-block; padding: 3px 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip-sin { background: var(--tile); color: var(--ink2); }
.chip-esperando { background: #3A3320; color: #FFE5A0; }
.chip-aprobada-ok { background: #1C3A2A; color: #B7E1CD; }
.chip-declinada { background: #3D1E1E; color: #F4A3A3; }
.chip-pagada { background: #16323D; color: #A9DCEB; }
.boton-rojo { background: var(--nota-mal); border-color: var(--nota-mal); color: #fff; }
.fa-editor { display: flex; align-items: center; gap: 10px; }
.fa-editor b { display: block; font-size: 14px; font-weight: 600; }
.fa-editor small { display: block; font-size: 12px; color: var(--ink2); opacity: .7; }
.fa-editor .avatar-perfil.mini { width: 32px; height: 32px; font-size: 14px; }
.fa-tabla td { padding: 12px 10px; }
.fa-total { font-weight: 700; white-space: nowrap; }
.fa-nota { display: block; margin-top: 4px; font-size: 12px; color: #F4A3A3; max-width: 260px; }
.fa-tabla th.fa-acciones, .fa-tabla td.fa-acciones { text-align: right; justify-content: flex-end; }
.fa-filtros { margin-bottom: 16px; }
/* ventana (modal) del formulario */
.modal-fondo { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.72); display: grid; place-items: center; padding: 20px; }
.modal {
  position: relative; width: 100%; max-width: 560px; max-height: calc(100vh - 40px); display: flex; flex-direction: column;
  background: var(--bg); border: 1px solid var(--line2); border-radius: 22px; padding: 26px 24px 18px;
}
.modal-chico { max-width: 460px; }
.modal h2 { margin: 0 34px 6px 0; font-size: 21px; font-weight: 700; }
.modal-sub { margin: 0 0 14px; font-size: 13.5px; color: var(--ink2); opacity: .75; }
.modal-cuerpo { overflow: auto; padding-right: 4px; flex: 1; }
.modal-cerrar { position: absolute; top: 18px; right: 18px; background: none; border: 0; cursor: pointer; padding: 4px; }
.modal-cerrar svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.modal-pie { display: flex; justify-content: flex-end; align-items: center; gap: 14px; padding-top: 14px; }
.modal textarea { width: 100%; background: var(--card); border: 1px solid var(--line2); border-radius: 12px; color: var(--ink); font: inherit; padding: 10px; resize: vertical; }
.fv-caja, .fv-bloque { border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 12px; }
.fv-titulo { font-size: 15px; font-weight: 600; }
.fv-campo { display: flex; flex-direction: column; gap: 7px; font-size: 13.5px; color: var(--ink); }
.fv-campo input { background: var(--card); border: 1px solid var(--line2); border-radius: 12px; color: var(--ink); font: inherit; font-size: 14px; padding: 11px 12px; width: 100%; }
.fv-dos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fv-bloque-cab { display: flex; justify-content: space-between; align-items: center; }
.fv-bloque-cab .icono-btn svg { stroke: var(--ink2); }
.fv-link { display: flex; align-items: center; gap: 8px; }
.fv-link span { width: 18px; font-size: 13px; color: var(--ink2); }
.fv-agregar { position: relative; margin-bottom: 8px; }
/* Ventana "¿De qué cliente es?": cliente arriba, proyecto abajo */
.fv-etq { margin: 14px 0 6px; font-size: 13px; font-weight: 600; color: var(--ink2); }
.fv-opciones { display: flex; flex-direction: column; gap: 6px; }
.fv-opcion { text-align: left; background: var(--card); border: 1px solid var(--line2); color: var(--ink); font: inherit; font-size: 14px; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.fv-opcion:hover { background: var(--tile); }
.fv-opcion.activo { border-color: var(--ink); background: var(--tile); }
.fv-pista { color: var(--ink2); opacity: .7; font-size: 13px; }
.fv-proyecto { font-weight: 400; color: var(--ink2); }
.fa-borrar { vertical-align: middle; }
.fa-borrar svg { stroke: var(--nota-mal); }
.fa-borrar:hover { background: var(--tile); }
.fv-clientes { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; padding: 8px; border: 1px solid var(--line2); border-radius: 12px; background: var(--card); max-width: 280px; }
.fv-clientes small { font-size: 12px; color: var(--ink2); opacity: .75; padding: 2px 6px; }
.fv-clientes button { text-align: left; background: none; border: 0; color: var(--ink); font: inherit; font-size: 14px; padding: 8px 6px; border-radius: 8px; cursor: pointer; }
.fv-clientes button:hover { background: var(--tile); }
.fv-total { margin: 6px 2px; font-size: 14px; }
@media (max-width: 600px) { .fv-dos { grid-template-columns: 1fr; } .factura-mes { flex-direction: column; } .factura-total { text-align: left; } }

/* Mi perfil fijo abajo de todo de la barra lateral (todos los portales) */
.lateral { display: flex; flex-direction: column; overflow-y: auto; }
#menu { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.menu-pie { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
#menu .menu-pie a { margin-bottom: 0; }
#menu .menu-pie a + a { margin-top: 2px; }
/* Pagos: botón "Pagado" (verde, no se toca) y comprobante */
.boton-verde, .boton-verde:disabled { background: var(--nota-ok); border-color: var(--nota-ok); color: #fff; opacity: 1; cursor: default; filter: none; }
.modal-comprobante { max-width: 720px; }
.comprobante-img { overflow: auto; border-radius: 12px; background: var(--card); text-align: center; }
.comprobante-img img { max-width: 100%; height: auto; display: block; margin: 0 auto; }
.factura-cab .factura-crear { margin-left: auto; align-self: center; flex: none; width: auto; }
/* Ventana emergente "Factura" (Ver factura) */
.modal-factura { max-width: 680px; height: calc(100vh - 60px); max-height: 900px; }
.factura-vista { flex: 1; min-height: 0; border-radius: 14px; overflow: hidden; background: #fff; }
.factura-vista iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.factura-btn.blanco { background: #fff; border-color: #fff; color: #000; }
.factura-btn.blanco:hover { background: #e9e9e9; }

/* ── Setter → Mensajes (2026-11-06): lista | conversación | lead, como la referencia ── */
.vista:has(.ms) { max-width: none; padding-top: 20px; padding-bottom: 20px; }
.ms { display: grid; grid-template-columns: 310px minmax(0, 1fr) 290px; gap: 16px; height: calc(100vh - 64px - 40px); min-height: 480px; }
.ms-lista, .ms-centro { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.ms-lista { padding: 18px 14px 10px; }
.ms-lista-cab { display: flex; justify-content: space-between; align-items: flex-start; padding: 0 4px; }
.ms-lista-cab .seccion-titulo { margin: 0; font-size: 26px; }
.ms-lista-cab .seccion-sub { margin: 2px 0 12px; font-size: 13px; opacity: .7; }
.ms-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--tile); border-radius: var(--r-pill); padding: 3px; margin-bottom: 10px; }
.ms-tabs button { background: none; border: 0; color: var(--ink); font: inherit; font-size: 13px; padding: 7px 8px; border-radius: var(--r-pill); cursor: pointer; opacity: .7; }
.ms-tabs button.activo { background: var(--bg); opacity: 1; }
.ms-tabs b { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: var(--r-pill); background: var(--accent); color: var(--on-accent); font-size: 11px; }
.ms-buscar { width: 100%; margin-bottom: 8px; }
.ms-items { overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 2px; margin: 0 -4px; padding: 0 4px; }
.ms-item { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 10px; align-items: center; text-align: left; background: none; border: 0; color: var(--ink); font: inherit; padding: 9px 8px; border-radius: 12px; cursor: pointer; }
.ms-item:hover { background: var(--tile); }
.ms-item.activo { background: var(--lateral-activo); outline: 1px solid var(--line); }
.ms-item .avatar-perfil.mini, .ms-cab .avatar-perfil.mini { width: 38px; height: 38px; font-size: 15px; }
.ms-item-txt { display: flex; flex-direction: column; min-width: 0; }
.ms-item-txt b { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-item-txt small { font-size: 12.5px; opacity: .65; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-item-der { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.ms-item-der small { font-size: 11.5px; opacity: .6; white-space: nowrap; }
.ms-punto { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: block; }
.ms-chip { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: var(--r-pill); background: var(--tile); border: 1px solid var(--line); white-space: nowrap; }
.ms-calificado { background: var(--nota-ok); border-color: var(--nota-ok); }
.ms-no-califica { background: var(--nota-mal); border-color: var(--nota-mal); }
.ms-frio { background: var(--temp-frio); border-color: var(--temp-frio); }
.ms-tibio { background: var(--temp-tibio); border-color: var(--temp-tibio); }
.ms-caliente { background: var(--temp-caliente); border-color: var(--temp-caliente); }
.ms-vacio { padding: 18px 8px; font-size: 13.5px; opacity: .75; line-height: 1.5; }
.ms-vacio p { margin: 10px 0 0; }
.ms-nada { margin: auto; opacity: .55; font-size: 14px; }
.ms-cab { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.ms-cab div { display: flex; flex-direction: column; }
.ms-cab b { font-weight: 600; } .ms-cab small { font-size: 12.5px; opacity: .6; }
.ms-ig { margin-left: auto; }
.ms-hilo { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.ms-dia { text-align: center; margin: 10px 0; } .ms-dia span { font-size: 11.5px; opacity: .55; }
.ms-msj { display: flex; } .ms-msj.mio { justify-content: flex-end; }
.ms-burbuja { max-width: 68%; background: var(--tile); border-radius: 16px 16px 16px 4px; padding: 8px 12px; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.ms-msj.mio .ms-burbuja { background: var(--accent); color: var(--on-accent); border-radius: 16px 16px 4px 16px; }
.ms-burbuja small { margin-left: 8px; font-size: 10.5px; opacity: .6; white-space: nowrap; }
.ms-burbuja a { color: inherit; text-decoration: underline; }
.ms-24h { margin: 0; padding: 6px 18px; font-size: 12px; opacity: .75; }
.ms-escribir { display: flex; gap: 8px; align-items: flex-end; padding: 12px 14px; border-top: 1px solid var(--line); }
.ms-escribir textarea { flex: 1; resize: none; max-height: 120px; background: var(--tile); border: 1px solid var(--line); border-radius: 18px; color: var(--ink); font: inherit; font-size: 14px; padding: 9px 14px; }
.ms-enviar { width: 38px; height: 38px; flex: none; border-radius: 50%; border: 0; background: var(--accent); cursor: pointer; display: grid; place-items: center; }
.ms-enviar:disabled, .ms-escribir textarea:disabled { opacity: .45; cursor: not-allowed; }
.ms-enviar svg { width: 18px; height: 18px; fill: none; stroke: var(--on-accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ms-der { min-width: 0; }
.ms-lead { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.ms-etq { font-size: 11px; letter-spacing: .06em; opacity: .6; margin-top: 6px; }
.ms-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ms-opciones { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; } .ms-tres { grid-template-columns: 1fr 1fr 1fr; }
.ms-op { white-space: nowrap; background: var(--tile); border: 1px solid var(--line); color: var(--ink); font: inherit; font-size: 12.5px; padding: 8px 4px; border-radius: 10px; cursor: pointer; }
.ms-op.activo { border-color: var(--ink); background: var(--lateral-activo); font-weight: 600; }
.ms-ficha { margin-top: 10px; background: none; border: 0; color: var(--icono); font: inherit; font-size: 13.5px; text-align: left; padding: 0; cursor: not-allowed; }
.ms-ficha em { font-style: normal; font-size: 11px; opacity: .7; margin-left: 4px; }
[data-sync] svg { width: 18px; height: 18px; } [data-sync].girando svg { animation: ms-girar 1s linear infinite; }
@keyframes ms-girar { to { transform: rotate(360deg); } }
@media (max-width: 1100px) { .ms { grid-template-columns: 280px minmax(0, 1fr); height: auto; } .ms-der { grid-column: 1 / -1; } .ms-centro { height: 70vh; } }
@media (max-width: 760px) { .ms { grid-template-columns: 1fr; } .ms-lista { max-height: 50vh; } }

/* ── Estilo de edición: botón Editar y modo edición ── */
.estilo-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 860px; margin-bottom: 22px; }
.estilo-cab .seccion-titulo { margin: 0; }
.estilo-cab .factura-btn svg { width: 16px; height: 16px; }
.ee { display: flex; flex-direction: column; gap: 10px; }
.ee-fila { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.ee-fila-cab { display: flex; gap: 8px; align-items: center; } .ee-fila-cab input { flex: 1; font-weight: 600; }
.ee-linea { display: flex; gap: 8px; align-items: center; }
.ee-linea input[type="text"], .ee-linea input[type="url"] { flex: 1; min-width: 0; }
.ee-linea select { width: 120px; }
.ee-linea input[type="color"] { width: 44px; height: 38px; padding: 2px; border-radius: 8px; background: var(--tile); border: 1px solid var(--line); }
.ee input[type="text"], .ee input[type="url"], .ee select { background: var(--tile); border: 1px solid var(--line); color: var(--ink); font: inherit; font-size: 14px; padding: 9px 12px; border-radius: 10px; }
.ee .link-btn { align-self: flex-start; }
.ee-agregar { display: flex; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 12px; }
.ee-pie { display: flex; justify-content: flex-end; gap: 12px; align-items: center; }
