/* NiranERP — sistema visual: tinta, neutros cálidos y verde petróleo */
:root {
  --bg: #faf9f6;
  --bg-alt: #f2f0ea;
  --surface: #ffffff;
  --ink: #14212b;
  --text: #1c2730;
  --muted: #5e6770;
  --faint: #8a9199;
  --border: #e5e2da;
  --border-strong: #cfcbc0;
  --accent: #1f5f55;
  --accent-hover: #174a42;
  --accent-soft: #e6efeb;
  --accent-contrast: #ffffff;
  --danger: #a33a2c;
  --danger-soft: #f8e9e6;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(20, 33, 43, .04), 0 8px 24px rgba(20, 33, 43, .06);
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f151b;
    --bg-alt: #131b22;
    --surface: #17212a;
    --ink: #eef0f1;
    --text: #dfe3e6;
    --muted: #9aa3ab;
    --faint: #6f7881;
    --border: #25313b;
    --border-strong: #34424e;
    --accent: #7fc4b4;
    --accent-hover: #9dd4c7;
    --accent-soft: #1a2e2b;
    --accent-contrast: #0f151b;
    --danger: #e38b7d;
    --danger-soft: #2e1c19;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
  .logo-claro { display: none !important; }
  .logo-oscuro { display: block !important; }
}
.logo-oscuro { display: none; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 .5em; }

.contenedor { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.estrecho { max-width: 760px; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 500 15px/1 var(--sans);
  padding: 12px 20px; border-radius: var(--radius);
  border: 1px solid transparent; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.btn-primario { background: var(--ink); color: var(--bg); }
.btn-primario:hover { background: var(--accent); color: var(--accent-contrast); }
.btn-acento { background: var(--accent); color: var(--accent-contrast); }
.btn-acento:hover { background: var(--accent-hover); color: var(--accent-contrast); }
.btn-borde { border-color: var(--border-strong); color: var(--ink); background: transparent; }
.btn-borde:hover { border-color: var(--ink); color: var(--ink); }
.btn-texto { color: var(--muted); padding: 8px 12px; background: none; }
.btn-texto:hover { color: var(--ink); }
.btn-bloque { width: 100%; }
.btn-grande { padding: 15px 26px; font-size: 16px; }

/* Cabecera pública */
.cabecera {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.cabecera .contenedor { display: flex; align-items: center; gap: 24px; height: 68px; }
.marca { flex: none; }
.marca img { height: 30px; width: auto; }
/* Logotipo: solo la palabra "Niran", con el degradado de la marca; se adapta al tema claro/oscuro */
.marca { text-decoration: none; display: inline-flex; align-items: center; }
.logotipo { font-family: "Plus Jakarta Sans", var(--sans); font-weight: 800; font-size: 27px; line-height: 1.1; letter-spacing: -.04em; white-space: nowrap;
  padding-right: .04em; background: linear-gradient(115deg, #14212b 0%, #14212b 38%, #1f5f55 70%, #0f8f86 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.lateral .logotipo, .panel-movil .logotipo { font-size: 24px; }
.pie .logotipo { font-size: 24px; margin-bottom: 12px; }
.panel-gestoria .lateral .logotipo { background-image: linear-gradient(115deg, #ffffff 0%, #ffffff 40%, #7fc4b4 100%); }
@media (prefers-color-scheme: dark) { body:not(.web) .logotipo { background-image: linear-gradient(115deg, #eef0f1 0%, #eef0f1 38%, #7fc4b4 75%, #19c2ae 100%); } }
body.web .logotipo { background-image: linear-gradient(115deg, #0b1f2a 0%, #0b1f2a 38%, #0f8f86 72%, #19c2ae 100%); }
.nav { display: flex; gap: 4px; margin-left: 16px; }
.nav a { white-space: nowrap; color: var(--muted); font-size: 15px; padding: 8px 12px; border-radius: 8px; }
.nav a:hover, .nav a.activo { color: var(--ink); background: var(--bg-alt); }
.acciones { margin-left: auto; display: flex; align-items: center; gap: 8px; }
@media (max-width: 980px) { .nav { display: none; } }
@media (max-width: 760px) {
  .acciones .btn-texto { display: none; }
  .acciones .btn { padding: 10px 14px; font-size: 14px; }
}

/* Portada */
.hero { padding: 88px 0 72px; }
.hero .contenedor { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.etiqueta {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500; color: var(--accent);
  background: var(--accent-soft); padding: 6px 12px; border-radius: 999px; margin-bottom: 24px;
}
.etiqueta svg { width: 15px; height: 15px; flex: none; }
.hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(42px, 6vw, 68px); letter-spacing: -0.02em; line-height: 1.02; }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero p.lead { font-size: 19px; color: var(--muted); max-width: 520px; margin: 20px 0 32px; }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .nota { font-size: 14px; color: var(--faint); margin-top: 16px; }
@media (max-width: 900px) {
  .hero { padding: 56px 0 48px; }
  .hero .contenedor { grid-template-columns: 1fr; gap: 40px; }
}

/* Maqueta del producto */
.maqueta {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); overflow: hidden; font-size: 13px;
}
.maqueta-barra { display: flex; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--border); background: var(--bg-alt); }
.maqueta-barra i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.maqueta-cuerpo { padding: 20px; display: grid; gap: 14px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kpi { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; }
.kpi small { color: var(--muted); display: block; font-size: 12px; }
.kpi strong { font-size: 18px; color: var(--ink); font-variant-numeric: tabular-nums; }
.kpi .sube { color: var(--accent); font-size: 12px; }
.kpi strong { white-space: nowrap; }
@media (max-width: 480px) { .kpis { gap: 6px; } .kpi { padding: 10px 8px; } .kpi strong { font-size: 14px; } .kpi .sube { display: none; } }
.grafico { height: 110px; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; display: flex; align-items: flex-end; gap: 6px; }
.grafico span { flex: 1; background: var(--accent-soft); border-radius: 4px 4px 0 0; }
.grafico span.act { background: var(--accent); }
.filas { border: 1px solid var(--border); border-radius: var(--radius); }
.fila { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-top: 1px solid var(--border); gap: 8px; }
.fila:first-child { border-top: 0; }
.fila .num { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 500; }
.pill { font-size: 11px; font-weight: 500; padding: 3px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.pill.gris { background: var(--bg-alt); color: var(--muted); }

/* Secciones */
.seccion { padding: 88px 0; }
.seccion.alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.seccion-cab { max-width: 640px; margin-bottom: 48px; }
.seccion-cab.centro { margin-left: auto; margin-right: auto; text-align: center; }
.seccion h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 4.5vw, 46px); letter-spacing: -0.015em; }
.seccion-cab p { color: var(--muted); font-size: 18px; }
.antetitulo { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; display: block; }

.rejilla { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .rejilla { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .rejilla { grid-template-columns: 1fr; } }
.tarjeta { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; }
.tarjeta h3 { font-size: 18px; font-weight: 600; margin: 18px 0 8px; }
.tarjeta p { color: var(--muted); margin: 0; font-size: 15px; }
.icono {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.icono svg { width: 20px; height: 20px; }

.pasos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; counter-reset: paso; }
@media (max-width: 800px) { .pasos { grid-template-columns: 1fr; } }
.paso::before {
  counter-increment: paso; content: counter(paso, decimal-leading-zero);
  font-family: var(--serif); font-size: 40px; color: var(--accent); display: block; line-height: 1; margin-bottom: 12px;
}
.paso h3 { font-size: 18px; }
.paso p { color: var(--muted); margin: 0; }

/* Precios */
.planes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
@media (max-width: 900px) { .planes { grid-template-columns: 1fr; max-width: 440px; margin: 0 auto; } }
.plan { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; display: flex; flex-direction: column; position: relative; }
.plan.destacado { border-color: var(--ink); box-shadow: var(--shadow); }
.plan .insignia { position: absolute; top: -12px; left: 32px; background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: 999px; }
.plan h3 { font-size: 20px; margin-bottom: 4px; }
.plan .para { color: var(--muted); font-size: 14px; margin: 0 0 24px; min-height: 44px; }
.plan .precio { font-family: var(--serif); font-size: 56px; color: var(--ink); line-height: 1; }
.plan .precio small { font-family: var(--sans); font-size: 15px; color: var(--muted); }
.plan .anual { font-size: 13px; color: var(--faint); margin: 8px 0 24px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 10px; font-size: 15px; flex: 1; }
.plan li { display: flex; gap: 10px; align-items: flex-start; }
.plan li::before { content: ""; flex: none; width: 16px; height: 16px; margin-top: 4px; border-radius: 50%; background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%231f5f55' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }
.plan-unico { max-width: 560px; margin: 0 auto; }
.precios-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 8px; }
.precios-duo .precio { font-size: 44px; }
.opcion-anual { border-left: 1px solid var(--border); padding-left: 16px; }
.opcion-anual strong { color: var(--accent); font-weight: 600; }
@media (max-width: 480px) {
  .precios-duo { grid-template-columns: 1fr; }
  .opcion-anual { border-left: 0; padding-left: 0; border-top: 1px solid var(--border); padding-top: 16px; }
}
.precios-nota { text-align: center; color: var(--faint); font-size: 14px; margin-top: 28px; }

.plan ul.incluye-emoji { grid-template-columns: 1fr 1fr; column-gap: 16px; margin-bottom: 16px; }
.plan ul.incluye-emoji li { align-items: center; }
.plan ul.incluye-emoji li::before { display: none; }
.incluye-emoji li span { width: 22px; flex: none; text-align: center; }
@media (max-width: 480px) { .plan ul.incluye-emoji { grid-template-columns: 1fr; } }
.nota-usuarios { font-size: 13.5px; color: var(--muted); margin: 0 0 20px; }
.extras { max-width: 860px; margin: 64px auto 0; text-align: center; }
.extras h3 { font-family: var(--serif); font-weight: 400; font-size: 30px; margin-bottom: 4px; }
.extras > p { color: var(--muted); margin: 0 0 24px; }
.extras-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; text-align: left; }
.extra { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; background: var(--surface); }
.extra strong { display: block; color: var(--ink); font-weight: 600; font-size: 15px; }
.extra span { color: var(--muted); font-size: 14px; }

/* Dos interfaces */
.dos-vistas { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 860px) { .dos-vistas { grid-template-columns: 1fr; } }
.vista { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow); }
.vista-gestoria { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.vista-gestoria .pill.gris { background: rgba(255, 255, 255, .1); color: #cfd5da; }
.vista-cab { margin-bottom: 18px; }
.vista-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.vista-kpis div { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; }
.vista-kpis small { display: block; color: var(--muted); font-size: 12px; }
.vista-kpis strong { color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.vista-kpis strong.pos { color: var(--accent); }
@media (max-width: 480px) { .vista-kpis { grid-template-columns: 1fr 1fr; } }
.alertas { display: grid; gap: 8px; }
.alerta-fila { display: flex; align-items: center; gap: 10px; font-size: 14px; padding: 10px 12px; border-radius: var(--radius); background: var(--bg-alt); }
.punto { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.punto.rojo { background: #c2410c; }
.punto.ambar { background: #d69e2e; }
.punto.verde { background: #2f855a; }
.gestoria-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; margin-bottom: 20px; }
.gestoria-cols h4, .gestoria-clientes h4 { color: #fff; font-size: 14px; margin: 0 0 4px; }
.gestoria-cols p { margin: 0; font-size: 13px; color: #b9c1c8; }
.gestoria-clientes { border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 16px; }
.gestoria-clientes .fila { border-top: 0; padding: 8px 0; font-size: 14px; }
.gestoria-clientes .pill { background: rgba(127, 196, 180, .15); color: #7fc4b4; }

/* Todo conectado */
.flujo { list-style: none; padding: 0; margin: 0 0 32px; display: flex; flex-wrap: wrap; gap: 10px 0; align-items: center; }
.flujo li { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 8px 14px; font-size: 14px; font-weight: 500; color: var(--ink); }
.flujo li:not(:last-child)::after { content: "→"; color: var(--faint); margin: 0 -26px 0 22px; }
.flujo li:not(:last-child) { margin-right: 30px; }
.flujo li.ia { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.burbuja-ia { display: flex; gap: 14px; align-items: center; max-width: 620px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 20px; box-shadow: var(--shadow); }
.burbuja-ia p { margin: 0; font-family: var(--serif); font-size: 22px; line-height: 1.3; color: var(--ink); }
.avatar-ia { width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #7fc4b4; display: grid; place-items: center; flex: none; }
.avatar-ia svg { width: 20px; height: 20px; }

/* Asistente */
.asistente-rejilla { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 860px) { .asistente-rejilla { grid-template-columns: 1fr; } }
.lista-simple { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 8px; }
.lista-simple li { color: var(--text); padding-left: 18px; position: relative; }
.lista-simple li::before { content: "“"; position: absolute; left: 0; color: var(--accent); font-family: var(--serif); font-size: 22px; line-height: 1.1; }
.chat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; display: grid; gap: 10px; box-shadow: var(--shadow); }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 14px; font-size: 14.5px; line-height: 1.45; }
.msg.usuario { justify-self: end; background: var(--ink); color: var(--bg); border-bottom-right-radius: 4px; }
.msg.ia { justify-self: start; background: var(--bg-alt); color: var(--text); border-bottom-left-radius: 4px; }
.msg.ia strong { color: var(--ink); }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--border); padding: 20px 0; }
.faq summary { cursor: pointer; font-weight: 500; color: var(--ink); font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: "+"; color: var(--muted); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--muted); margin: 12px 0 0; }

.cta-final { text-align: center; }
.cta-final .caja { background: var(--ink); color: var(--bg); border-radius: 24px; padding: 72px 24px; }
.cta-final h2 { color: var(--bg); }
.cta-final p { color: color-mix(in srgb, var(--bg) 70%, transparent); font-size: 18px; margin: 0 0 32px; }
.cta-final .btn-acento { background: var(--bg); color: var(--ink); }
.cta-final .btn-acento:hover { background: var(--accent-soft); }

/* Pie */
.pie { border-top: 1px solid var(--border); padding: 56px 0 40px; font-size: 14px; color: var(--muted); }
.pie-rejilla { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 800px) { .pie-rejilla { grid-template-columns: 1fr 1fr; } }
.pie h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink); margin-bottom: 12px; }
.pie ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.pie a { color: var(--muted); }
.pie a:hover { color: var(--ink); }
.pie .marca img { height: 26px; margin-bottom: 12px; }
.pie-legal { border-top: 1px solid var(--border); margin-top: 40px; padding-top: 24px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--faint); }

/* Textos legales */
.legal { padding: 64px 0 96px; }
.legal-rejilla { display: grid; grid-template-columns: 220px 1fr; gap: 56px; }
@media (max-width: 800px) { .legal-rejilla { grid-template-columns: 1fr; gap: 24px; } }
.legal-menu { position: sticky; top: 96px; align-self: start; display: grid; gap: 4px; }
.legal-menu a { color: var(--muted); padding: 8px 12px; border-radius: 8px; font-size: 15px; }
.legal-menu a.activo, .legal-menu a:hover { color: var(--ink); background: var(--bg-alt); }
@media (max-width: 800px) { .legal-menu { position: static; display: flex; flex-wrap: wrap; } }
.legal-texto { max-width: 720px; }
.legal-texto h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 5vw, 48px); }
.legal-texto .vigencia { color: var(--faint); font-size: 14px; margin-bottom: 40px; }
.legal-texto h2 { font-size: 20px; font-weight: 600; margin-top: 44px; }
.legal-texto h3 { font-size: 16px; font-weight: 600; margin-top: 24px; }
.legal-texto p, .legal-texto li { color: var(--text); font-size: 15.5px; }
.legal-texto ul, .legal-texto ol { padding-left: 22px; }
.legal-texto li { margin-bottom: 6px; }
.legal-texto table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 16px 0; display: block; overflow-x: auto; }
.legal-texto th, .legal-texto td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; vertical-align: top; }
.legal-texto th { background: var(--bg-alt); color: var(--ink); font-weight: 600; }
.recuadro { background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin: 20px 0; }
.recuadro p:last-child { margin-bottom: 0; }

/* Formularios y acceso */
.acceso-pagina { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .acceso-pagina { grid-template-columns: 1fr; } .acceso-lateral { display: none !important; } }
.acceso-form { display: flex; flex-direction: column; padding: 32px 20px; }
.acceso-form .marca { margin-bottom: auto; }
.acceso-caja { width: 100%; max-width: 420px; margin: 48px auto; }
.acceso-caja h1 { font-family: var(--serif); font-weight: 400; font-size: 40px; margin-bottom: 8px; }
.acceso-caja .sub { color: var(--muted); margin: 0 0 32px; }
.acceso-pie { margin-top: auto; font-size: 13px; color: var(--faint); text-align: center; }
.acceso-lateral { background: var(--ink); color: var(--bg); padding: 56px; display: flex; flex-direction: column; justify-content: center; }
.acceso-lateral blockquote { font-family: var(--serif); font-size: 34px; line-height: 1.2; margin: 0 0 40px; max-width: 480px; }
.acceso-lateral ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; color: color-mix(in srgb, var(--bg) 78%, transparent); }
.acceso-lateral li { display: flex; gap: 12px; }
.acceso-lateral li::before { content: "—"; color: #7fc4b4; }

.campo { margin-bottom: 18px; }
.campo label { display: block; font-size: 14px; font-weight: 500; color: var(--ink); margin-bottom: 6px; }
.campo input, .campo select {
  width: 100%; font: 15px var(--sans); color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius);
  padding: 12px 14px; transition: border-color .15s, box-shadow .15s;
}
.campo input:focus, .campo select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.campo.error input { border-color: var(--danger); }
.campo .ayuda { font-size: 13px; color: var(--faint); margin-top: 6px; }
.campo .msg-error, .msg-error { font-size: 13px; color: var(--danger); margin-top: 6px; }
.fila-campos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .fila-campos { grid-template-columns: 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.alerta { padding: 12px 14px; border-radius: var(--radius); font-size: 14px; margin-bottom: 20px; background: var(--danger-soft); color: var(--danger); }
.separador { text-align: center; color: var(--faint); font-size: 14px; margin: 24px 0 0; }
.selector-plan { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; }
.selector-plan label { border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 10px; cursor: pointer; text-align: center; font-size: 14px; margin: 0; font-weight: 500; }
.selector-plan label small { display: block; color: var(--muted); font-weight: 400; }
.selector-plan input { position: absolute; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.selector-plan.dos { grid-template-columns: 1fr 1fr; }
.logo-ajustes { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.logo-muestra { width: 120px; height: 80px; border: 1px dashed var(--border-strong); border-radius: var(--radius); display: grid; place-items: center; background: #fff; overflow: hidden; }
.logo-muestra img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-muestra span { color: var(--faint); font-size: 13px; }
.logo-form { flex: 1; min-width: 240px; }
.pasos-vf { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 12px; }
.pasos-vf li { padding: 12px 14px 12px 40px; position: relative; border: 1px solid var(--border); border-radius: var(--radius); }
.pasos-vf li::before { content: ""; position: absolute; left: 14px; top: 15px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border-strong); }
.pasos-vf li.hecho::before { background: var(--accent); border-color: var(--accent); }
.pasos-vf li.actual { border-color: var(--accent); background: var(--accent-soft); }
.pasos-vf li.actual::before { border-color: var(--accent); }
.firmante { margin-top: 12px; }
.uso { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 8px; }
@media (max-width: 560px) { .uso { grid-template-columns: 1fr; } }
.uso div { display: grid; gap: 4px; }
.uso span { font-size: 13px; color: var(--muted); }
.uso strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.uso i { display: block; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--accent) var(--p), var(--bg-alt) var(--p)); }
.selector-plan input:checked + label { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.selector-plan input:focus-visible + label { box-shadow: 0 0 0 3px var(--accent-soft); }

/* Panel */
.panel { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
@media (max-width: 860px) { .panel { grid-template-columns: 1fr; } .lateral { display: none !important; } }
.lateral { border-right: 1px solid var(--border); background: var(--surface); padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.lateral .marca { padding: 4px 10px 20px; }
.lateral .marca img { height: 26px; }
.lateral a, .lateral .inactivo { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--muted); font-size: 14.5px; }
.lateral a svg, .lateral .inactivo svg { width: 18px; height: 18px; flex: none; }
.lateral a:hover { background: var(--bg-alt); color: var(--ink); }
.lateral a.activo { background: var(--bg-alt); color: var(--ink); font-weight: 500; }
.lateral .inactivo { opacity: .55; cursor: default; }
.lateral .inactivo .pill { margin-left: auto; font-size: 10px; }
.lateral .grupo { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); padding: 16px 10px 6px; }
.lateral-pie { margin-top: auto; border-top: 1px solid var(--border); padding-top: 14px; font-size: 13px; }
.lateral-pie .empresa { padding: 0 10px 10px; }
.lateral-pie .empresa strong { color: var(--ink); display: block; font-size: 14px; }
.lateral-pie .empresa span { color: var(--faint); }
.panel-main { padding: 32px clamp(20px, 4vw, 48px) 64px; min-width: 0; }
.panel-cab { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.panel-cab h1 { font-family: var(--serif); font-weight: 400; font-size: 38px; margin: 0; }
.panel-cab p { color: var(--muted); margin: 4px 0 0; }
.aviso-prueba { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: var(--accent-soft); color: var(--accent); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 28px; font-size: 14.5px; }
.aviso-prueba strong { color: var(--accent); }
.bienvenida { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; margin-bottom: 28px; }
.bienvenida h2 { font-family: var(--serif); font-weight: 400; font-size: 28px; }
.bienvenida ol { margin: 12px 0 0; padding-left: 20px; color: var(--muted); display: grid; gap: 6px; }
.modulos { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.modulo { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; }
.modulo h3 { font-size: 16px; margin: 14px 0 4px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.modulo p { color: var(--muted); font-size: 14px; margin: 0; }
.panel-movil { display: none; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--border); background: var(--surface); }
.panel-movil img { height: 24px; }
@media (max-width: 860px) { .panel-movil { display: flex; } }

.lateral { overflow-y: auto; }
@media (max-width: 860px) {
  .panel.menu-abierto .lateral { display: flex !important; position: fixed; top: 57px; left: 0; right: 0; bottom: 0; height: auto; z-index: 40; }
  .panel.menu-abierto .lateral > .marca { display: none; }
}
.lateral .modo { margin: 0 10px 12px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.panel-gestoria .lateral { background: var(--ink); border-right-color: var(--ink); }
.panel-gestoria .lateral .logo-claro { display: none; }
.panel-gestoria .lateral .logo-oscuro { display: block; }
.panel-gestoria .lateral a, .panel-gestoria .lateral .inactivo { color: #b9c1c8; }
.panel-gestoria .lateral a:hover, .panel-gestoria .lateral a.activo { background: rgba(255, 255, 255, .08); color: #fff; }
.panel-gestoria .lateral .grupo { color: #7d8891; }
.panel-gestoria .lateral .modo { color: #7fc4b4; }
.panel-gestoria .lateral .pill.gris { background: rgba(255, 255, 255, .08); color: #9aa3ab; }
.panel-gestoria .lateral-pie { border-top-color: rgba(255, 255, 255, .12); }
.panel-gestoria .lateral-pie .empresa strong { color: #fff; }
.panel-gestoria .lateral-pie .btn-texto { color: #b9c1c8; }
.kpis-panel { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 28px; }
.kpi-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; }
.kpi-panel small { display: block; color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.kpi-panel strong { font-size: 22px; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi-panel.destacado { background: var(--ink); border-color: var(--ink); }
.kpi-panel.destacado small { color: #b9c1c8; }
.kpi-panel.destacado strong { color: #fff; }
.atencion { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; display: grid; gap: 8px; }
.atencion h2 { font-size: 16px; margin: 0 0 4px; }
.vacio { color: var(--muted); margin: 0; font-size: 14.5px; }
.subtitulo { font-family: var(--serif); font-weight: 400; font-size: 28px; margin: 36px 0 16px; }
.tabla-caja { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow-x: auto; margin-bottom: 24px; }
.tabla { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tabla th { text-align: left; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); padding: 12px 16px; border-bottom: 1px solid var(--border); }
.tabla td { padding: 12px 16px; border-top: 1px solid var(--border); color: var(--text); }
.tabla tr:first-child td { border-top: 0; }
.tabla tr.actual td { background: var(--accent-soft); }
.tabla td strong { color: var(--ink); font-weight: 500; }
.tabla .der { text-align: right; }
.tabla .tenue { color: var(--faint); }
.tabla form { margin: 0; }
.solo-movil { display: none; }
@media (max-width: 640px) {
  .solo-movil { display: inline; }
  .solo-escritorio { display: none !important; }
  .tabla.tarjetas thead { display: none; }
  .tabla.tarjetas, .tabla.tarjetas tbody, .tabla.tarjetas tr, .tabla.tarjetas td { display: block; width: 100%; }
  .tabla.tarjetas tr { padding: 14px 16px; border-top: 1px solid var(--border); }
  .tabla.tarjetas tr:first-child { border-top: 0; }
  .tabla.tarjetas td { border: 0 !important; padding: 2px 0; text-align: left; }
  .tabla.tarjetas td.principal { padding-bottom: 6px; }
  .tabla.tarjetas td[data-label] { display: flex; justify-content: space-between; gap: 12px; }
  .tabla.tarjetas td[data-label]::before { content: attr(data-label); color: var(--faint); font-size: 12.5px; }
  .tabla.tarjetas td:empty, .tabla.tarjetas td.principal:empty { display: none; }
  .tabla.tarjetas td.der:not([data-label]) { padding-top: 10px; }
  .tabla.tarjetas td.der:not([data-label]):empty { display: none; }
  .tabla.tarjetas tr.fila-permisos { padding-top: 0; border-top: 0; }
  .tabla.diario.tarjetas tr:not(.inicio-asiento) { border-top: 0; padding-top: 4px; }
  .tabla.diario.tarjetas tr.inicio-asiento td { border-top: 0 !important; }
  .tabla.diario.tarjetas td[data-label="Concepto"] { display: none; }
  .tabla.diario.tarjetas td[data-label="Debe"]:empty, .tabla.diario.tarjetas td[data-label="Haber"]:empty { display: none; }
  .tabla.tarjetas td[data-label="Nº"]:empty { display: none; }
}
.enlace-invitacion { background: var(--accent-soft); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 24px; }
.enlace-invitacion strong { color: var(--accent); }
.enlace-invitacion p { margin: 4px 0 12px; color: var(--text); font-size: 14px; }
.copiar { display: flex; gap: 8px; }
.copiar input { flex: 1; min-width: 0; font: 14px var(--sans); padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); }
.tabla tr.fila-permisos td { border-top: 0; padding-top: 0; }
.fila-permisos summary { cursor: pointer; font-size: 13.5px; color: var(--accent); }
.permisos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 16px; padding: 14px 0 4px; align-items: center; }
.permisos .check { margin: 0; }
.permisos .btn { grid-column: 1 / -1; justify-self: start; margin-top: 8px; }
.form-invitar { display: grid; grid-template-columns: 2fr 1fr auto; gap: 12px; align-items: end; }
.form-invitar .campo { margin: 0; }
@media (max-width: 640px) { .form-invitar { grid-template-columns: 1fr; } }

/* Gastos y escáner */
.pill.ambar { background: #fbf0dc; color: #8a5a0b; }
.pill.rojo { background: var(--danger-soft); color: var(--danger); }
@media (prefers-color-scheme: dark) { .pill.ambar { background: #3a2e17; color: #e8c07a; } }
.tabla .num, .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabla small { font-size: 12.5px; }
.subida { margin-bottom: 24px; }
.zona { position: relative; display: grid; justify-items: center; gap: 6px; text-align: center; padding: 36px 20px; border: 1.5px dashed var(--border-strong); border-radius: var(--radius-lg); background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.zona:hover, .zona.encima { border-color: var(--accent); background: var(--accent-soft); }
.zona input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.zona strong { color: var(--ink); font-weight: 600; }
.zona span { color: var(--muted); font-size: 14px; }
.zona-icono { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #7fc4b4 !important; margin-bottom: 6px; }
.zona-icono svg { width: 22px; height: 22px; }
.zona .zona-enviando { display: none; color: var(--accent); font-weight: 500; }
.zona.enviando .zona-enviando { display: block; }
.migas { margin: 0 0 6px; font-size: 14px; color: var(--muted); }
.revision { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 1100px) { .revision { grid-template-columns: 1fr; } }
.visor { position: sticky; top: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 12px; display: grid; gap: 8px; }
.visor iframe { width: 100%; height: 72vh; border: 0; border-radius: var(--radius); background: #fff; }
.visor img { width: 100%; max-height: 72vh; object-fit: contain; border-radius: var(--radius); background: #fff; }
@media (max-width: 1100px) { .visor { position: static; } .visor iframe { height: 60vh; } }
.avisos-ia { background: #fbf0dc; color: #6b4608; border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; font-size: 14px; }
.avisos-ia ul, .lista-errores { margin: 6px 0 0; padding-left: 18px; }
@media (prefers-color-scheme: dark) { .avisos-ia { background: #3a2e17; color: #e8c07a; } }
.form-gasto fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.form-gasto fieldset:disabled input, .form-gasto fieldset:disabled select { background: var(--bg-alt); color: var(--text); }
.fila-campos.tres { grid-template-columns: 1.2fr 1fr 1fr; }
@media (max-width: 560px) { .fila-campos.tres { grid-template-columns: 1fr; } }
.tabla-iva { width: 100%; border-collapse: collapse; }
.tabla-iva th { text-align: left; font-size: 12px; color: var(--faint); font-weight: 500; padding: 0 4px 6px; }
.tabla-iva td { padding: 3px 4px 3px 0; }
.tabla-iva input, .tabla-iva select { width: 100%; font: 15px var(--sans); color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 8px; padding: 9px 10px; }
.campo input.total { font-weight: 600; }
.cuadre { font-size: 13.5px; margin: 0 0 16px; font-variant-numeric: tabular-nums; }
.cuadre.ok { color: var(--accent); }
.cuadre.mal { color: var(--danger); }
.acciones-form { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.asiento { margin-top: 28px; }
.asiento h3 { font-size: 15px; margin-bottom: 10px; }
.tabla.diario tr.inicio-asiento td { border-top: 2px solid var(--border-strong); }
.tabla.diario tr:first-child td { border-top: 0; }

/* Contabilidad */
.dos-columnas { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 860px) { .dos-columnas { grid-template-columns: 1fr; } }
.linea-informe { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14.5px; }
.linea-informe strong { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink); font-weight: 500; }
.linea-informe.total { border-bottom: 0; border-top: 1px solid var(--ink); margin-top: 6px; font-weight: 600; }
.linea-informe.total strong { font-weight: 700; }
.selector-periodo input[type=date], .campo-fecha { font: 14px var(--sans); padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); }
.apuntes { display: grid; gap: 6px; margin: 8px 0; }
.apunte { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; }
.apunte.cab span { font-size: 12px; color: var(--faint); }
.apunte input { font: 14.5px var(--sans); padding: 9px 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text); min-width: 0; }

/* Impuestos */
.selector-periodo { display: flex; gap: 8px; }
.selector-periodo select { font: 14px var(--sans); padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); }
.modelos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-bottom: 24px; }
.modelo-tarjeta { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; display: grid; gap: 4px; color: var(--text); transition: border-color .15s, box-shadow .15s; }
.modelo-tarjeta:hover { border-color: var(--accent); box-shadow: var(--shadow); color: var(--text); }
.modelo-codigo { justify-self: start; font-size: 12px; font-weight: 700; background: var(--ink); color: var(--bg); border-radius: 6px; padding: 2px 8px; }
.modelo-tarjeta strong { color: var(--ink); }
.modelo-importe { font-size: 24px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.modelo-importe.positivo { color: var(--danger); }
.modelo-importe.negativo { color: var(--accent); }
.modelo-tarjeta small { color: var(--muted); font-size: 13px; }
.resultado-modelo { display: flex; justify-content: space-between; align-items: center; gap: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 22px; margin-bottom: 18px; }
.resultado-modelo span { color: var(--muted); }
.resultado-modelo strong { font-size: 28px; color: var(--ink); font-variant-numeric: tabular-nums; }
.resultado-modelo.positivo strong { color: var(--danger); }
.resultado-modelo.negativo strong { color: var(--accent); }
.casilla { display: inline-block; min-width: 38px; text-align: center; font-weight: 700; font-size: 13px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 6px; padding: 2px 6px; font-variant-numeric: tabular-nums; }

/* Bancos */
.cuentas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-bottom: 24px; }
.cuenta-banco { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; display: grid; gap: 10px; align-content: start; }
.cuenta-banco.sel { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cuenta-banco-cab strong { display: block; color: var(--ink); }
.cuenta-banco-cab span, .cuenta-banco.nueva summary span { font-size: 13px; color: var(--muted); display: block; }
.cuenta-saldo { font-size: 24px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.cuenta-saldo small { font-size: 12px; font-weight: 400; color: var(--faint); margin-left: 6px; }
.cuenta-acciones { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cuenta-acciones form { margin: 0; }
.importar summary { list-style: none; }
.importar[open] form { display: grid; gap: 8px; margin-top: 8px; width: 100%; }
.cuenta-banco.nueva { border-style: dashed; cursor: pointer; }
.cuenta-banco.nueva summary { list-style: none; }
.cuenta-banco.nueva form { margin-top: 12px; }
.movimientos { display: grid; gap: 10px; }
.mov { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.mov.conciliado { opacity: .75; }
.mov.ignorado { opacity: .5; }
.mov-datos { display: flex; gap: 14px; align-items: flex-start; }
.mov-fecha { font-size: 13px; color: var(--muted); white-space: nowrap; padding-top: 2px; font-variant-numeric: tabular-nums; }
.mov-texto { flex: 1; min-width: 0; display: grid; }
.mov-texto strong { color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
.mov-texto small { font-size: 12.5px; color: var(--muted); }
.mov-importe { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mov-importe.entrada { color: var(--accent); }
.mov-importe.salida { color: var(--ink); }
.mov-conciliar { margin-top: 10px; display: grid; gap: 6px; }
.mov-conciliar form { margin: 0; }
.sugerencia { width: 100%; text-align: left; background: var(--accent-soft); color: var(--accent); border: 1px solid transparent; border-radius: 8px; padding: 8px 12px; font: 14px var(--sans); cursor: pointer; }
.sugerencia:hover { border-color: var(--accent); }
.mov-mas summary { cursor: pointer; font-size: 13.5px; color: var(--muted); }
.mov-mas[open] { display: grid; gap: 8px; }
.fila-form { display: flex; gap: 8px; flex-wrap: wrap; }
.fila-form select { flex: 1; min-width: 200px; font: 14px var(--sans); padding: 9px 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text); }
.mov-estado { margin: 8px 0 0; font-size: 13px; color: var(--accent); }
.btn-enlace { border: 0; background: none; color: var(--accent); cursor: pointer; font: inherit; padding: 0; text-decoration: underline; }
.bancos-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; max-height: 420px; overflow-y: auto; padding: 2px; }
.banco-opcion { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.banco-opcion img { width: 28px; height: 28px; object-fit: contain; }
.banco-opcion input { accent-color: var(--accent); }
.banco-opcion:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

/* Editor de factura con aspecto de factura */
.barra-meta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.barra-meta .campo { margin: 0; width: 160px; }
.barra-meta .campo.crece { flex: 1; min-width: 220px; }
.hoja { background: #fff; color: #334155; border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); padding: 32px clamp(18px, 4vw, 40px); max-width: 920px; }
.hoja input, .hoja textarea, .hoja select { font: inherit; color: inherit; background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 6px 8px; width: 100%; min-width: 0; }
.hoja input:hover, .hoja textarea:hover, .hoja select:hover { background: #f8fafc; border-color: #e2e8f0; }
.hoja input:focus, .hoja textarea:focus, .hoja select:focus { outline: none; background: #fff; border-color: #1f5f55; box-shadow: 0 0 0 3px #e6efeb; }
.hoja textarea { resize: none; overflow: hidden; }
.hoja .ayuda { color: #94a3b8; }
.hoja-cab { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 22px; border-bottom: 1px solid #e2e8f0; }
.hoja-emisor { display: flex; gap: 14px; align-items: center; }
.hoja-emisor strong { display: block; color: #0f172a; font-size: 17px; }
.hoja-emisor span { font-size: 13px; color: #64748b; }
.hoja-logo { width: auto; max-width: 120px; max-height: 52px; object-fit: contain; border-radius: 10px; }
.vacio-logo { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; border: 1.5px dashed #cbd5e1; color: #64748b; font-size: 11px; font-weight: 600; text-align: center; }
.hoja-qr { width: 64px; height: 64px; border: 1.5px dashed #cbd5e1; border-radius: 8px; display: grid; place-items: center; text-align: center; font-size: 9.5px; font-weight: 600; color: #94a3b8; line-height: 1.2; flex: none; }
.etiqueta-hoja { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #64748b; margin-bottom: 4px; }
.hoja-cliente { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding: 22px 0; border-bottom: 1px solid #e2e8f0; }
.hoja-cliente-datos { flex: 1; max-width: 460px; display: grid; gap: 2px; margin-left: -8px; }
.hoja-cliente-datos .etiqueta-hoja { margin-left: 8px; }
.hoja-cliente-datos .grande { font-size: 18px; color: #0f172a; }
.selector-cliente { font-size: 13px !important; color: #1f5f55 !important; }
.dos-campos { display: grid; grid-template-columns: 1fr 1.4fr; gap: 4px; }
.hoja-total { text-align: right; }
.hoja-total strong { font-size: clamp(24px, 4vw, 32px); color: #0f172a; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hoja-lineas { display: grid; margin: 8px 0 0; }
.hl { display: grid; grid-template-columns: minmax(0, 1fr) 80px 100px 64px 78px 110px 28px; gap: 6px; align-items: start; padding: 12px 0; border-bottom: 1px solid #f1f5f9; }
.hl.cab { padding: 10px 0; border-bottom: 1px solid #e2e8f0; }
.hl.cab span { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #64748b; padding: 0 8px; }
.hl.cab span:nth-child(n+2) { text-align: right; }
.hl-desc { display: grid; margin-left: -8px; }
.hl-desc .negrita { font-weight: 600; color: #0f172a; }
.hl-desc textarea { font-size: 13px; color: #64748b; padding-top: 2px; }
.hl .num { text-align: right; font-variant-numeric: tabular-nums; }
.hl select { text-align: right; }
.hl .importe { padding: 7px 8px; font-weight: 700; color: #0f172a; white-space: nowrap; }
.hl .quitar { border: 0; background: none; color: #cbd5e1; font-size: 20px; cursor: pointer; padding-top: 4px; }
.hl .quitar:hover { color: var(--danger); }
.anadir-linea { border: 0; background: none; color: #1f5f55; font: 600 14px var(--sans); cursor: pointer; padding: 14px 0; }
.hoja-pie { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; border-top: 1px solid #e2e8f0; padding-top: 22px; margin-top: 6px; }
.hoja-info { flex: 1; max-width: 420px; margin-left: -8px; }
.hoja-info .etiqueta-hoja { margin-left: 8px; }
.hoja-info textarea { font-size: 13.5px; }
.hoja .totales { margin: 0; min-width: 260px; color: #64748b; }
.hoja .totales strong { color: #334155; font-weight: 500; }
.hoja .totales .total { border-top-color: #0f172a; }
.hoja .totales .total span, .hoja .totales .total strong { color: #0f172a; font-weight: 700; }
@media (max-width: 760px) {
  .hoja { padding: 20px 14px; }
  .hoja-cliente, .hoja-pie { flex-direction: column; align-items: stretch; }
  .hoja-total { text-align: left; }
  .hl.cab { display: none; }
  .hl { grid-template-columns: 1fr 1fr 1fr; }
  .hl-desc { grid-column: 1 / -1; }
  .hl .importe { grid-column: 1 / 3; text-align: left; }
  .hl .quitar { justify-self: end; }
  .dos-campos { grid-template-columns: 1fr; }
}

/* Ventas, contactos y ajustes */
.campo textarea { width: 100%; font: 15px/1.5 var(--sans); color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 10px 14px; resize: vertical; }
.campo textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.campo input:disabled { background: var(--bg-alt); color: var(--muted); }
.pestanas { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.pestanas a { padding: 10px 14px; color: var(--muted); font-size: 14.5px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.pestanas a:hover { color: var(--ink); }
.pestanas a.activa { color: var(--ink); border-bottom-color: var(--ink); font-weight: 500; }
.buscador { margin-bottom: 16px; }
.buscador input { width: 100%; max-width: 420px; font: 15px var(--sans); padding: 10px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); }
.fila-enlace { cursor: pointer; }
.fila-enlace:hover td { background: var(--bg-alt); }
.fila-enlace a { color: var(--ink); }
.bloque { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; margin-bottom: 20px; }
.bloque h2 { font-size: 15px; font-weight: 600; margin: 0 0 14px; }
.bloque .tabla-caja { border: 0; border-radius: 0; margin: -6px -6px 0; }
.lineas { display: grid; gap: 6px; margin-bottom: 12px; }
.linea { display: grid; grid-template-columns: minmax(0, 3fr) 70px 100px 70px 82px 100px 32px; gap: 6px; align-items: center; }
.linea.cab span { font-size: 12px; color: var(--faint); padding: 0 2px; }
.linea input, .linea select { width: 100%; min-width: 0; font: 14.5px var(--sans); color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 8px; padding: 9px 10px; }
.linea input:focus, .linea select:focus { outline: none; border-color: var(--accent); }
.linea .importe { font-size: 14.5px; color: var(--ink); }
.linea .quitar { border: 0; background: none; color: var(--faint); font-size: 20px; cursor: pointer; line-height: 1; }
.linea .quitar:hover { color: var(--danger); }
@media (max-width: 760px) {
  .linea.cab { display: none; }
  .linea { grid-template-columns: 1fr 1fr 1fr; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); }
  .linea input[name=concepto] { grid-column: 1 / -1; }
  .linea .importe { grid-column: 1 / 3; font-weight: 600; }
  .linea .quitar { justify-self: end; }
}
.totales { margin: 18px 0 0 auto; max-width: 320px; display: grid; gap: 6px; font-size: 14.5px; }
.totales div { display: flex; justify-content: space-between; gap: 16px; font-variant-numeric: tabular-nums; }
.totales span { color: var(--muted); }
.totales .total { border-top: 1px solid var(--ink); padding-top: 8px; font-size: 17px; }
.totales .total span { color: var(--ink); font-weight: 600; }
.barra-acciones { position: sticky; bottom: 0; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); padding: 14px 0; border-top: 1px solid var(--border); z-index: 5; }
form.eliminar { margin-top: 8px; }
.acciones-cab { display: flex; gap: 8px; flex-wrap: wrap; }
.detalle-rejilla { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
@media (max-width: 1000px) { .detalle-rejilla { grid-template-columns: 1fr; } }
.acciones-lado .bloque { padding: 18px; }
.botones-acciones { display: grid; gap: 8px; }
.botones-acciones form { margin: 0; }
.fila-botones { display: flex; gap: 8px; }
.fila-botones .btn { flex: 1; }
.vf img { border-radius: 6px; background: #fff; padding: 4px; margin-bottom: 8px; }
.vf p { margin: 4px 0; font-size: 14px; }
.form-pago { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; margin-top: 20px; }
.form-pago .campo { margin: 0; }

.error-pagina { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 64px 20px; }
.error-pagina h1 { font-family: var(--serif); font-weight: 400; font-size: 64px; }
.error-pagina p { color: var(--muted); }

/* ===================== Web pública (tema de marca, siempre claro) ===================== */
body.web {
  --bg: #f7f7f4; --bg-alt: #eef3f1; --surface: #ffffff;
  --ink: #0b1f2a; --text: #33475b; --muted: #667785; --faint: #8795a1;
  --border: #e6e9e7; --border-strong: #cfd8d5;
  --accent: #0f8f86; --accent-hover: #0b6e68; --accent-soft: #e7f6f3; --accent-contrast: #fff;
  --brand-2: #19c2ae; --coral: #ff7a59; --coral-soft: #fff1ec;
  --radius: 12px; --radius-lg: 18px;
  --shadow: 0 1px 2px rgba(11, 31, 42, .05), 0 8px 24px rgba(11, 31, 42, .06);
  --shadow-lg: 0 24px 60px rgba(11, 31, 42, .16);
  --serif: "Plus Jakarta Sans", system-ui, sans-serif;
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
  background: var(--bg); color: var(--text);
}
body.web .logo-claro { display: block !important; }
body.web .logo-oscuro { display: none !important; }
body.web h1, body.web h2, body.web h3 { color: var(--ink); font-weight: 800; letter-spacing: -0.025em; }
body.web .hero h1, body.web .seccion h2 { font-weight: 800; }
body.web .btn-primario { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(15, 143, 134, .25); }
body.web .btn-primario:hover { background: var(--accent-hover); color: #fff; }
body.web .btn-borde { border-color: var(--border-strong); color: var(--ink); background: #fff; }
body.web .cabecera { background: rgba(255, 255, 255, .88); }
body.web .nav a.activo, body.web .nav a:hover { background: var(--accent-soft); color: var(--accent-hover); }
body.web .antetitulo { color: var(--accent); }
body.web .resalta { color: var(--accent); }

/* Hero oscuro con brillo turquesa */
body.web .hero { position: relative; background: radial-gradient(900px 480px at 78% -10%, rgba(25, 194, 174, .35), transparent 60%), radial-gradient(700px 420px at 0% 110%, rgba(15, 143, 134, .28), transparent 60%), #0b1f2a; color: #d6e2e6; overflow: hidden; }
body.web .hero h1 { color: #fff; }
body.web .hero h1 em { color: var(--brand-2); font-style: normal; }
body.web .hero p.lead { color: #c3d2d8; }
body.web .hero p.lead strong { color: #fff; }
body.web .hero .nota { color: #9fb3bb; }
body.web .hero .etiqueta { background: rgba(255, 255, 255, .08); color: #d8f3ee; border: 1px solid rgba(255, 255, 255, .14); }
body.web .hero .btn-borde { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
body.web .hero .btn-borde:hover { border-color: #fff; }
body.web .hero .maqueta { box-shadow: var(--shadow-lg); border-color: rgba(255, 255, 255, .1); }
body.web .hero-simple { padding: 72px 0 56px; }
body.web .hero-simple .contenedor { display: block; max-width: 820px; }
body.web .hero-precio { display: inline-flex; gap: 10px; align-items: baseline; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); border-radius: 14px; padding: 12px 16px; margin: 4px 0 28px; color: #fff; }
body.web .hero-precio strong { font-size: 28px; }
body.web .hero-precio s { color: #9fb3bb; }
body.web .hero-precio span { color: var(--coral); font-weight: 700; }

/* Tarjetas de funciones resaltadas */
body.web .tarjeta { border-radius: var(--radius-lg); transition: transform .15s, box-shadow .15s, border-color .15s; }
body.web .tarjeta:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--brand-2); }
body.web .icono { background: linear-gradient(135deg, var(--accent), var(--brand-2)); color: #fff; box-shadow: 0 6px 14px rgba(15, 143, 134, .3); }
body.web .seccion.alt { background: #fff; }
body.web .flujo li.ia { background: var(--accent); border-color: var(--accent); }
body.web .avatar-ia { background: var(--accent); color: #fff; }
body.web .msg.usuario { background: var(--accent); }
body.web .vista-gestoria { background: #0b1f2a; }
body.web .cta-final .caja { background: radial-gradient(600px 300px at 80% 0%, rgba(25, 194, 174, .35), transparent 60%), #0b1f2a; }
body.web .cta-final .btn-acento { background: var(--coral); color: #fff; }
body.web .cta-final .btn-acento:hover { background: #f0643f; }

/* Precios */
.p-radio { position: absolute; opacity: 0; pointer-events: none; }
.conmutador { display: flex; justify-content: center; gap: 6px; background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 5px; width: max-content; max-width: 100%; margin: 0 auto 32px; box-shadow: var(--shadow); }
.conmutador label { cursor: pointer; padding: 9px 16px; border-radius: 999px; font-weight: 600; font-size: 14.5px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
#p-mensual:checked ~ .conmutador label[for=p-mensual], #p-anual:checked ~ .conmutador label[for=p-anual] { background: var(--ink); color: #fff; }
.chip-oferta { background: var(--coral); color: #fff; font-size: 11.5px; padding: 3px 8px; border-radius: 999px; }
.chip-ahorro { background: var(--accent-soft); color: var(--accent-hover); font-size: 11.5px; padding: 3px 8px; border-radius: 999px; }
#p-mensual:checked ~ .precios-grid .solo-anual, #p-anual:checked ~ .precios-grid .solo-mensual { display: none !important; }
.precios-grid { display: grid; gap: 18px; grid-template-columns: repeat(4, 1fr); align-items: stretch; }
.precios-grid.n1 { grid-template-columns: minmax(0, 440px); justify-content: center; }
.precios-grid.n3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1100px) { .precios-grid, .precios-grid.n3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .precios-grid, .precios-grid.n3 { grid-template-columns: 1fr; } }
.tarjeta-plan { position: relative; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px 22px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.tarjeta-plan.destacado { border: 2px solid var(--accent); box-shadow: 0 18px 40px rgba(15, 143, 134, .18); }
.tarjeta-plan .insignia { position: absolute; top: -12px; left: 22px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.tarjeta-plan h3 { font-size: 21px; margin: 0; }
.tarjeta-plan .para { color: var(--muted); font-size: 14px; margin: 4px 0 16px; min-height: 40px; }
.oferta-etiqueta { display: inline-block; background: var(--coral-soft); color: #c2410c; font-weight: 700; font-size: 12.5px; padding: 4px 10px; border-radius: 8px; margin: 0 0 8px; }
.oferta-etiqueta.verde { background: var(--accent-soft); color: var(--accent-hover); }
.tarjeta-plan .precio { font-size: 38px; font-weight: 800; color: var(--ink); letter-spacing: -0.03em; line-height: 1.1; }
.tarjeta-plan .precio small { font-size: 15px; font-weight: 600; color: var(--muted); }
.tarjeta-plan .tachado { font-size: 18px; color: var(--faint); text-decoration: line-through; font-weight: 600; margin-right: 4px; }
.tarjeta-plan .despues { font-size: 13px; color: var(--muted); margin: 6px 0 18px; }
.limites { list-style: none; padding: 16px 0 0; margin: 0 0 22px; border-top: 1px solid var(--border); display: grid; gap: 9px; font-size: 14.5px; flex: 1; }
.limites li { padding-left: 24px; position: relative; }
.limites li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 17px; height: 17px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.limites strong { color: var(--ink); }
.limites li.extra { font-size: 13px; color: var(--muted); }
.limites li.extra::before { content: "+"; background: var(--coral-soft); color: #c2410c; }
.precios-nota { text-align: center; color: var(--muted); font-size: 13.5px; margin-top: 22px; }

/* Todas las funciones */
.todo-incluido { background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.funciones-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 1000px) { .funciones-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .funciones-grid { grid-template-columns: 1fr; } }
.funcion { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; background: var(--bg); transition: border-color .15s, box-shadow .15s; }
.funcion:hover { border-color: var(--brand-2); box-shadow: var(--shadow); background: #fff; }
.funcion-cab { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.funcion-cab h3 { font-size: 16.5px; margin: 0; flex: 1; }
.funcion-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; background: #fff; border: 1px solid var(--border); }
.chip-incluido { font-size: 11px; font-weight: 700; color: var(--accent-hover); background: var(--accent-soft); padding: 3px 8px; border-radius: 999px; }
.funcion ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 14px; color: var(--text); }
.funcion li { padding-left: 18px; position: relative; }
.funcion li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--brand-2); }

/* Menú móvil de la web */
.menu-web { display: none; }
.menu-movil { display: none; }
@media (max-width: 980px) {
  body.web .menu-web { display: inline-flex; }
  .menu-movil.abierto { display: grid; padding: 8px 20px 16px; border-top: 1px solid var(--border); background: #fff; }
  .menu-movil a { padding: 12px 4px; color: var(--ink); font-weight: 600; border-bottom: 1px solid var(--border); }
}
@media (max-width: 760px) { body.web .acciones .btn-texto { display: none; } }

/* Impresión y PDF de textos legales */
@media print {
  :root { --bg: #fff; --text: #111; --ink: #111; --muted: #444; --border: #ccc; --bg-alt: #f3f3f3; color-scheme: light; }
  .cabecera, .pie, .legal-menu, .logo-oscuro { display: none !important; }
  .logo-claro { display: block !important; }
  .legal { padding: 0; }
  .legal-rejilla { display: block; }
  .legal-texto { max-width: none; }
  .legal-texto h1 { font-size: 30px; }
  .legal-texto h2 { break-after: avoid; margin-top: 28px; }
  .legal-texto p, .legal-texto li { font-size: 11pt; }
  .legal-texto table { display: table; }
  .legal-texto a { color: inherit; }
  @page { margin: 18mm 16mm; }
}
form.en-linea { display: inline; margin-left: 6px; font-size: 12px; }
.resumen-precio { display: grid; gap: 6px; max-width: 420px; margin: 14px 0 18px; }
.resumen-precio div { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.resumen-precio span { color: var(--muted); }
.resumen-precio strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.aviso-lectura a { font-weight: 600; }

/* Asistente IA */
.asistente { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); display: grid; grid-template-rows: 1fr auto auto; height: min(70vh, 720px); max-width: 880px; overflow: hidden; }
.chat-hilo { overflow-y: auto; padding: 20px; display: grid; gap: 12px; align-content: start; }
.burbuja { max-width: 82%; padding: 11px 15px; border-radius: 16px; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.burbuja.yo { justify-self: end; background: var(--ink); color: var(--bg); border-bottom-right-radius: 4px; }
.burbuja.ia { justify-self: start; background: var(--bg-alt); color: var(--text); border-bottom-left-radius: 4px; }
.burbuja.ia a { font-weight: 600; }
.burbuja.ia ul { margin: 4px 0; padding-left: 18px; }
.burbuja.pensando { color: var(--muted); font-style: italic; animation: latido 1.2s ease-in-out infinite; }
@keyframes latido { 50% { opacity: .5; } }
.sugerencias-chat { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 20px 12px; }
.sugerencias-chat button { border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); border-radius: 999px; padding: 7px 12px; font: 13.5px var(--sans); cursor: pointer; }
.sugerencias-chat button:hover { border-color: var(--accent); color: var(--accent); }
.chat-entrada { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); }
.chat-entrada textarea { flex: 1; resize: none; font: 15px var(--sans); padding: 11px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); }
.chat-entrada textarea:focus { outline: none; border-color: var(--accent); }
@media (max-width: 640px) { .asistente { height: calc(100vh - 220px); } .burbuja { max-width: 92%; } }
.tabla-chat { border-collapse: collapse; margin: 6px 0; font-size: 14px; width: 100%; display: block; overflow-x: auto; }
.tabla-chat th, .tabla-chat td { border-bottom: 1px solid var(--border); padding: 5px 8px; text-align: left; white-space: nowrap; }
.tabla-chat th { color: var(--muted); font-weight: 600; font-size: 12.5px; }

/* CRM */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.kanban-col { background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 10px; display: grid; gap: 8px; min-height: 160px; transition: border-color .15s, background .15s; }
.kanban-col.encima { border-color: var(--accent); background: var(--accent-soft); }
.kanban-col.ganada header strong { color: var(--accent); }
.kanban-col.perdida header strong { color: var(--danger); }
.kanban-col header { display: grid; gap: 2px; padding: 4px 6px; }
.kanban-col header strong { color: var(--ink); font-size: 14.5px; }
.kanban-col header span { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.kanban-lista { display: grid; gap: 8px; min-height: 40px; }
.kanban-tarjeta { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px; display: grid; gap: 4px; color: var(--text); cursor: grab; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.kanban-tarjeta:hover { border-color: var(--accent); color: var(--text); }
.kanban-tarjeta.arrastrando { opacity: .4; }
.kanban-tarjeta strong { color: var(--ink); font-size: 14.5px; font-weight: 600; }
.kanban-tarjeta > span { font-size: 13px; color: var(--muted); }
.kanban-pie { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; margin-top: 4px; }
.kanban-pie b { font-variant-numeric: tabular-nums; color: var(--ink); font-size: 14px; }
.kanban-pie small { font-size: 12px; color: var(--faint); text-align: right; }
.kanban-nueva { font-size: 13.5px; color: var(--muted); padding: 6px; border-radius: 8px; text-align: center; }
.kanban-nueva:hover { background: var(--surface); color: var(--accent); }
.campos-extra { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 12px; border-top: 1px dashed var(--border); padding-top: 12px; margin-bottom: 4px; }
.actividades { display: grid; gap: 8px; margin-bottom: 12px; }
.actividad { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius); }
.actividad form { margin: 0; }
.actividad.vencida { border-color: var(--danger); background: var(--danger-soft); }
.actividad.hecha { opacity: .6; }
.actividad.hecha strong { text-decoration: line-through; }
.check-act { width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--accent); font-weight: 800; cursor: pointer; flex: none; line-height: 1; }
.check-act:hover { border-color: var(--accent); }
.act-texto { flex: 1; min-width: 0; display: grid; gap: 2px; }
.act-texto strong { color: var(--ink); font-size: 14.5px; font-weight: 500; }
.act-texto small { color: var(--muted); font-size: 12.5px; }
.act-texto p { margin: 4px 0 0; font-size: 13.5px; }
.nueva-actividad summary { list-style: none; display: inline-flex; }
.nueva-actividad[open] form { margin-top: 12px; }
.nueva-actividad.sin-resumen summary { display: none; }
.etapas-config { display: grid; gap: 6px; margin-bottom: 12px; }
.etapa-fila { display: grid; grid-template-columns: 70px 1fr 80px 90px; gap: 8px; align-items: center; }
.etapa-fila.cab span { font-size: 12px; color: var(--faint); }
.etapa-fila input { font: 14px var(--sans); padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text); min-width: 0; }
.subtitulo-peq { font-size: 14px; margin: 0 0 8px; }
.rojo-txt { color: var(--danger) !important; }
.verde-txt { color: var(--accent) !important; }
.apunte.alb { grid-template-columns: 2fr .7fr .8fr .7fr; }
@media (max-width: 640px) { .apunte.alb { grid-template-columns: 1fr 1fr; } .apunte.alb input[name=concepto] { grid-column: 1 / -1; } }

/* ---------- TPV ---------- */
.tpv { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; margin-bottom: 24px; }
.tpv-buscar { display: flex; gap: 8px; margin-bottom: 14px; }
.tpv-buscar input { flex: 1; min-width: 0; font-size: 16px; padding: 12px 14px; }
.tpv-buscar .btn { flex-shrink: 0; }
.tpv > * { min-width: 0; }
.tpv-rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; max-height: 62vh; overflow-y: auto; padding: 2px; }
.tpv-prod { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 12px; min-height: 118px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); cursor: pointer; font: inherit; color: var(--text);
  transition: border-color .15s, transform .1s, box-shadow .15s; }
.tpv-prod:hover { border-color: var(--accent); box-shadow: 0 4px 14px rgba(15, 30, 40, .08); }
.tpv-prod:active { transform: scale(.97); }
.tpv-prod.agotado { opacity: .55; }
.tpv-inicial { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; background: var(--accent-soft); color: var(--accent); }
.tpv-nombre { font-weight: 600; font-size: 14px; line-height: 1.25; color: var(--ink); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tpv-precio { margin-top: auto; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); }
.tpv-stock { font-size: 11.5px; color: var(--muted); }
.tpv-ticket { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 12px; }
.tpv-ticket h2 { margin: 0; }
.tpv-lineas { max-height: 34vh; overflow-y: auto; border-top: 1px solid var(--border); }
.tpv-linea { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.tpv-linea-txt { display: flex; flex-direction: column; min-width: 0; }
.tpv-linea-txt strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.tpv-linea-txt span { font-size: 12px; color: var(--muted); }
.tpv-cantidad { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.tpv-cantidad button { width: 30px; height: 32px; border: 0; background: var(--bg-alt); color: var(--ink); font-size: 17px; cursor: pointer; }
.tpv-cantidad input { width: 44px; border: 0; text-align: center; padding: 6px 2px; font-variant-numeric: tabular-nums; background: transparent; }
.tpv-importe { font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 72px; text-align: right; color: var(--ink); }
.tpv-total { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0; }
.tpv-total span { color: var(--muted); font-weight: 600; }
.tpv-total strong { font-size: 30px; font-variant-numeric: tabular-nums; color: var(--ink); }
.tpv-formas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tpv-forma input { position: absolute; opacity: 0; pointer-events: none; }
.tpv-forma span { display: block; text-align: center; padding: 11px 6px; border: 1px solid var(--border); border-radius: 10px; font-weight: 600; cursor: pointer; }
.tpv-forma input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.tpv-forma input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.tpv-billetes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tpv-billetes .btn { padding: 6px 10px; font-size: 13px; }
.tpv-cambio { margin: 6px 0 0; font-size: 15px; }
.tpv-cliente summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.tpv-cliente[open] summary { margin-bottom: 10px; }
.tpv-hecho { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border-color: var(--accent); }
.tpv-hecho h2 { margin: 6px 0 0; font-size: 24px; }
.tpv-busca-ticket { display: flex; gap: 8px; }
.tpv-busca-ticket input { min-width: 0; }
@media (max-width: 1000px) {
  .tpv { grid-template-columns: 1fr; }
  .tpv-ticket { position: static; }
  .tpv-rejilla { max-height: none; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .tpv-buscar .btn { padding: 10px 12px; font-size: 14px; }
}
@media print { .lateral, .panel-movil, .panel-cab .btn, form { display: none !important; } }

/* ---------- Proyectos ---------- */
.proyectos-rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.proyecto-tarjeta { display: grid; gap: 8px; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--color, var(--accent));
  border-radius: var(--radius-lg); color: var(--text); text-decoration: none; transition: box-shadow .15s, transform .15s; }
.proyecto-tarjeta:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.proyecto-cab { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.proyecto-cab strong { color: var(--ink); font-size: 16px; line-height: 1.3; }
.proyecto-cliente, .proyecto-tareas { color: var(--muted); font-size: 13px; }
.proyecto-cifras { display: flex; gap: 18px; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 10px; margin-top: 2px; }
.proyecto-cifras small { display: block; color: var(--muted); font-size: 12px; }
.proyecto-cifras b { color: var(--ink); font-variant-numeric: tabular-nums; }
.progreso { height: 7px; background: var(--bg-alt); border-radius: 99px; overflow: hidden; margin: 2px 0 8px; }
.progreso span { display: block; height: 100%; background: var(--color, var(--accent)); border-radius: inherit; transition: width .3s; }
.progreso.alerta-barra span { background: var(--danger); }
.vacio-grande { text-align: center; padding: 48px 22px; }
.vacio-grande h2 { font-size: 20px !important; }
.vacio-grande p { color: var(--muted); max-width: 460px; margin: 0 auto 18px; }
.formulario-estrecho { max-width: 860px; }
.punto-color { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 10px; vertical-align: middle; }
.panel-cab h1 .punto-color { width: 16px; height: 16px; }
.colores { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.colores legend { font-size: 14px; font-weight: 500; margin-bottom: 8px; padding: 0; }
.color-opcion input { position: absolute; opacity: 0; }
.color-opcion span { display: block; width: 28px; height: 28px; border-radius: 50%; background: var(--c); cursor: pointer; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px transparent; }
.color-opcion input:checked + span { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--c); }
.color-opcion input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 3px; }
.tareas-kanban { grid-auto-columns: minmax(260px, 1fr); margin-bottom: 8px; }
.kanban-tarjeta.tarea { cursor: default; }
.kanban-tarjeta.tarea small { color: var(--muted); }
.kanban-tarjeta.tarea.vencida { border-left: 3px solid var(--danger); }
.tarea-acciones { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 4px; }
.tarea-acciones form { margin: 0; }
.tarea-acciones .btn { padding: 4px 8px; font-size: 12.5px; }
.tarea-nueva { display: grid; gap: 8px; }
.tarea-nueva-extra { display: none; grid-template-columns: 1fr 1fr; gap: 6px; }
.tarea-nueva:focus-within .tarea-nueva-extra, .tarea-nueva-extra:has(input:not(:placeholder-shown)) { display: grid; }
.tarea-nueva-extra .btn { grid-column: 1 / -1; }
.horas-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.horas-form .campo { margin: 0; min-width: 130px; }
.horas-form .campo.crece { flex: 1; min-width: 200px; }
.horas-form .check { margin: 0 0 10px; }
.cronometro { display: flex; gap: 6px; }
.cronometro input { width: 90px; }
.semana { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-bottom: 20px; }
.semana-dia { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; text-align: center; }
.semana-dia small { display: block; color: var(--muted); font-size: 12px; }
.semana-dia strong { font-size: 18px; color: var(--ink); font-variant-numeric: tabular-nums; }
.semana-dia.hoy { border-color: var(--accent); background: var(--accent-soft); }
.asignar-proyecto { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 14px; }
.asignar-proyecto label { color: var(--muted); }
.asignar-proyecto select { flex: 1; min-width: 150px; }
@media (max-width: 560px) { .semana { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Equipo: portal, registro de jornada y calendario ---------- */
.fichar { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; }
.fichar form { margin: 0; }
.fichar-estado { display: flex; gap: 14px; align-items: center; }
.fichar-estado strong { display: block; font-size: 18px; color: var(--ink); }
.fichar-estado small { color: var(--muted); font-size: 14px; }
.fichar-punto { width: 14px; height: 14px; border-radius: 50%; background: var(--faint); flex: none; }
.fichar.dentro { border-color: var(--accent); }
.fichar.dentro .fichar-punto { background: #16a34a; box-shadow: 0 0 0 0 rgba(22, 163, 74, .5); animation: latido 2s infinite; }
@keyframes latido { 70% { box-shadow: 0 0 0 10px rgba(22, 163, 74, 0); } 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); } }
@media (prefers-reduced-motion: reduce) { .fichar.dentro .fichar-punto { animation: none; } }
.fichar .btn-grande { min-width: 200px; }
.vacaciones-saldo { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.vacaciones-saldo div { background: var(--bg-alt); border-radius: var(--radius); padding: 10px; text-align: center; }
.vacaciones-saldo strong { display: block; font-size: 22px; color: var(--ink); font-variant-numeric: tabular-nums; }
.vacaciones-saldo small { color: var(--muted); font-size: 12px; line-height: 1.3; display: block; }
.registro-cab { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.registro-cab strong { font-size: 17px; color: var(--ink); min-width: 150px; text-align: center; }
.registro-total { margin-left: auto; color: var(--muted); font-size: 14px; }
.tabla.registro td { vertical-align: top; }
.tabla.registro tr.finde td { background: var(--bg-alt); color: var(--muted); }
.registro-dia { white-space: nowrap; font-weight: 500; width: 80px; }
.tramo { display: inline-block; padding: 2px 8px; margin: 2px 4px 2px 0; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.tramo.corregido { background: #fbf0dc; color: #8a5a0b; }
.tramo.abierto { background: var(--danger-soft); color: var(--danger); }
.corregir { display: inline-block; font-size: 13px; }
.corregir summary { cursor: pointer; color: var(--muted); display: inline; }
.corregir form { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.corregir input { padding: 6px 8px; font-size: 13px; }
.corregir input[name="motivo"] { min-width: 200px; flex: 1; }
.solicitud { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.solicitud:last-child { border-bottom: 0; }
.solicitud .ayuda { display: block; margin: 2px 0 0; }
.solicitud-form { display: flex; gap: 6px; flex-wrap: wrap; margin: 0; }
.solicitud-form input { min-width: 180px; }
.calendario { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-cab { text-align: center; font-size: 12px; font-weight: 600; color: var(--muted); padding: 6px 0; }
.cal-dia { min-height: 92px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 6px; display: flex; flex-direction: column; gap: 3px; overflow: hidden; }
.cal-dia.fuera { opacity: .45; }
.cal-dia.finde { background: var(--bg-alt); }
.cal-dia.hoy { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cal-num { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.cal-ausencia { display: block; font-size: 11.5px; padding: 2px 6px; border-radius: 5px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border: 1px solid transparent; }
.cal-ausencia.baja { background: var(--danger-soft); color: var(--danger); }
.cal-ausencia.asuntos_propios, .cal-ausencia.permiso { background: #e8eefc; color: #1d4ed8; }
.cal-ausencia.otro { background: var(--bg-alt); color: var(--muted); }
.cal-ausencia.pendiente { border-style: dashed; border-color: currentColor; background: transparent; }
.leyenda { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.leyenda .cal-ausencia { display: inline-block; }
@media (max-width: 640px) {
  .cal-dia { min-height: 56px; padding: 4px; }
  .cal-ausencia { font-size: 10px; padding: 1px 3px; }
  .registro-total { margin-left: 0; width: 100%; }
  .fichar .btn-grande { width: 100%; }
  .fichar form { width: 100%; }
}
@media (prefers-color-scheme: dark) { .tramo.corregido { background: #3a2e17; color: #e8c07a; } .cal-ausencia.asuntos_propios, .cal-ausencia.permiso { background: #1c2744; color: #9db6f5; } }

/* ---------- Compartir y documento público ---------- */
.enlace-copiar { display: flex; gap: 6px; }
.enlace-copiar input { flex: 1; min-width: 0; font-size: 13px; color: var(--muted); }
.btn-whatsapp { background: #25d366; color: #073b1c; border-color: #25d366; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; margin-top: 4px; }
.btn-whatsapp:hover { background: #1fbd5a; color: #04260f; }
.publico { background: var(--bg-alt); }
.publico-doc { max-width: 860px; margin: 0 auto; padding: 40px 16px 60px; }
.publico-cab { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 22px; }
.publico-emisor { font-weight: 600; color: var(--accent); margin: 0 0 4px; }
.publico-cab h1 { font-family: var(--serif); font-weight: 400; font-size: 38px; margin: 0; color: var(--ink); }
.publico-total { text-align: right; display: grid; gap: 4px; justify-items: end; }
.publico-total small { color: var(--muted); }
.publico-total strong { font-size: 32px; color: var(--ink); font-variant-numeric: tabular-nums; }
.publico-partes { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.publico-partes div { display: grid; gap: 2px; font-size: 14px; }
.publico-partes small { color: var(--muted); text-transform: uppercase; font-size: 11px; letter-spacing: .06em; }
.publico-partes strong { color: var(--ink); font-size: 16px; }
.publico-totales { max-width: 340px; margin: 16px 0 0 auto; }
.publico-pago { white-space: pre-line; border-top: 1px solid var(--border); padding-top: 12px; margin-top: 16px; }
.publico-acciones { display: flex; gap: 10px; flex-wrap: wrap; }
.publico-pie { margin-top: 32px; text-align: center; color: var(--faint); font-size: 13px; }
@media (max-width: 560px) { .publico-partes { grid-template-columns: 1fr; } .publico-total { text-align: left; justify-items: start; } }

/* ---------- Conexiones ---------- */
.recetas { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.receta { display: flex; flex-direction: column; gap: 6px; padding: 16px; background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); margin: 0; }
.receta strong { color: var(--ink); font-size: 15px; }
.receta-evento { font-size: 12px; color: var(--accent); font-weight: 600; }
.receta-accion { font-size: 13px; color: var(--muted); }
.receta .btn { align-self: flex-start; margin-top: 4px; }
.regla-paso { display: flex; align-items: center; gap: 10px; margin: 20px 0 10px; }
.regla-paso span { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--surface); display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.regla-paso strong { font-size: 16px; color: var(--ink); }
tr.apagada td, .linea-informe.apagada { opacity: .55; }
.acciones-fila { white-space: nowrap; }
.acciones-fila form { display: inline; margin: 0; }
.api-docs pre { background: #0f1720; color: #d7e3ea; padding: 16px; border-radius: var(--radius); overflow-x: auto; font-size: 13px; line-height: 1.5; }
.api-docs h3 { font-size: 15px; margin: 22px 0 8px; }
.api-docs code { font-size: 13px; }
.api-docs .tabla code { white-space: nowrap; }
.clave-nueva { border-color: var(--accent); background: var(--accent-soft); }
.info-conexion p { color: var(--muted); margin: 0; }

/* ---------- Botón flotante de soporte por WhatsApp (como gestionatureserva.com) ---------- */
.wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 50; display: flex; align-items: center; gap: 10px; padding: 10px 18px 10px 10px;
  background: #25d366; color: #fff; border-radius: 999px; font-family: "Plus Jakarta Sans", var(--sans); font-weight: 700; text-decoration: none;
  box-shadow: 0 10px 30px rgba(37, 211, 102, .45), 0 2px 6px rgba(0, 0, 0, .15); animation: wa-pulso 2.4s ease-in-out infinite; transition: transform .2s; }
.wa-float:hover { transform: translateY(-3px) scale(1.03); color: #fff; text-decoration: none; }
.wa-float svg { width: 42px; height: 42px; padding: 7px; background: rgba(255, 255, 255, .2); border-radius: 50%; flex: none; }
.wa-text { display: flex; flex-direction: column; line-height: 1.15; }
.wa-text small { font-weight: 500; opacity: .92; font-size: .75rem; }
@keyframes wa-pulso {
  0%, 100% { box-shadow: 0 10px 30px rgba(37, 211, 102, .45), 0 0 0 0 rgba(37, 211, 102, .5); }
  50% { box-shadow: 0 10px 30px rgba(37, 211, 102, .45), 0 0 0 14px rgba(37, 211, 102, 0); }
}
/* En el panel: solo el icono; el texto aparece al pasar el ratón */
.wa-float.compacto { padding: 6px; animation: none; box-shadow: 0 8px 22px rgba(37, 211, 102, .35), 0 2px 6px rgba(0, 0, 0, .12); }
.wa-float.compacto svg { width: 40px; height: 40px; }
.wa-float.compacto .wa-text { max-width: 0; overflow: hidden; white-space: nowrap; transition: max-width .25s ease, padding .25s ease; }
.wa-float.compacto:hover .wa-text, .wa-float.compacto:focus-visible .wa-text { max-width: 220px; padding-right: 12px; }
@media (max-width: 640px) { .wa-float { padding: 8px; right: 14px; bottom: 14px; } .wa-text { display: none; } }
@media (prefers-reduced-motion: reduce) { .wa-float { animation: none; } }
@media print { .wa-float { display: none !important; } }

/* ---------- Seguridad y 2FA ---------- */
.enlace-seguridad { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); padding: 6px 0; }
.enlace-seguridad svg { width: 16px; height: 16px; }
.enlace-seguridad .pill { margin-left: auto; font-size: 10px; }
.seguridad-cab { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 14px; }
.seguridad-cab h2 { margin-bottom: 4px !important; }
.pasos-2fa { padding-left: 20px; display: grid; gap: 16px; margin: 0; }
.pasos-2fa li { padding-left: 4px; }
.qr-2fa { margin: 12px 0 6px; display: block; width: max-content; padding: 8px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); line-height: 0; }
.qr-2fa svg { width: 190px; height: 190px; }
.clave-2fa { font-size: 14px; letter-spacing: .06em; user-select: all; }
.form-codigo { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.codigo-2fa { font-size: 20px !important; letter-spacing: .25em; font-variant-numeric: tabular-nums; max-width: 220px; }
.codigos-recuperacion { list-style: none; padding: 0; margin: 14px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.codigos-recuperacion code { display: block; text-align: center; padding: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; font-size: 14px; }
.subbloque h3 { font-size: 14px; margin: 0 0 10px; }
.ayuda-2fa { margin-top: 16px; font-size: 14px; color: var(--muted); }
.ayuda-2fa summary { cursor: pointer; }

/* ---------- Vídeo de bienvenida (tour animado) ---------- */
.ver-tour { display: inline-flex; align-items: center; gap: 12px; padding: 8px 16px 8px 8px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer; font: inherit; text-align: left; box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.ver-tour:hover { transform: translateY(-1px); border-color: var(--accent); }
.ver-tour-play { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; color: #fff;
  background: linear-gradient(135deg, #1f5f55, #0f8f86); padding-left: 3px; }
.ver-tour strong { display: block; font-size: 14px; color: var(--ink); }
.ver-tour small { color: var(--muted); font-size: 12.5px; }
body.tour-abierto { overflow: hidden; }
.tour { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.tour[hidden] { display: none; }
.tour-fondo { position: absolute; inset: 0; background: rgba(8, 16, 22, .72); backdrop-filter: blur(4px); animation: tour-entra .3s ease; }
.tour-caja { position: relative; width: min(980px, 100%); background: #0f1b24; color: #e8eef1; border-radius: 22px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45); animation: tour-sube .35s cubic-bezier(.2, .8, .2, 1); }
.tour-x { position: absolute; top: 12px; right: 12px; z-index: 3; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(20,33,43,.75); color: #fff; font-size: 15px; cursor: pointer; }
.tour-x:hover { background: #14212b; }
.tour-pantalla { display: grid; grid-template-columns: 170px 1fr; aspect-ratio: 16 / 8.2; background: #f7f7f4; color: #1c2730; }
.tour-menu { background: #fff; border-right: 1px solid #e6e9e7; padding: 16px 10px; display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; }
.tour-logo { font-family: "Plus Jakarta Sans", var(--sans); font-weight: 800; font-size: 20px; letter-spacing: -.04em; margin: 0 8px 12px;
  background: linear-gradient(115deg, #14212b 38%, #0f8f86); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tour-item { padding: 6px 10px; border-radius: 8px; color: #5e6770; transition: background .3s, color .3s, transform .3s; }
.tour-item.activo { background: #e6efeb; color: #1f5f55; font-weight: 600; transform: translateX(3px); }
.tour-escenas { position: relative; overflow: hidden; }
.tour-escena { position: absolute; inset: 0; padding: 28px 32px; display: flex; flex-direction: column; justify-content: center; gap: 16px;
  opacity: 0; transform: translateX(24px); transition: opacity .45s ease, transform .45s ease; pointer-events: none; }
.tour-escena.activa { opacity: 1; transform: none; pointer-events: auto; }
.tour-pie { position: relative; padding: 16px 22px 22px; display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.tour-texto { display: grid; gap: 3px; min-width: 0; flex: 1; }
.tour-texto strong { font-family: "Plus Jakarta Sans", var(--sans); font-size: 19px; color: #fff; }
.tour-texto span { color: #b8c6cd; font-size: 14.5px; }
.tour-controles { display: flex; align-items: center; gap: 6px; }
.tour-controles .btn-texto { color: #b8c6cd; }
.tour-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); background: transparent; color: #fff; font-size: 16px; cursor: pointer; }
.tour-btn:hover { background: rgba(255,255,255,.1); }
.tour-progreso { position: absolute; left: 22px; right: 22px; top: 0; display: flex; gap: 4px; }
.tour-progreso span { flex: 1; height: 4px; border-radius: 4px; background: rgba(255,255,255,.15); overflow: hidden; cursor: pointer; }
.tour-progreso span i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #0f8f86, #19c2ae); }
.tour-progreso span.hecho i { width: 100%; }
@keyframes tour-avance { from { width: 0; } to { width: 100%; } }
@keyframes tour-entra { from { opacity: 0; } }
@keyframes tour-sube { from { opacity: 0; transform: translateY(30px) scale(.97); } }
/* Piezas de las escenas */
.tour-escena .aparece { opacity: 0; transform: translateY(8px); }
.tour-escena.activa .aparece { animation: tour-aparece .45s ease forwards; animation-delay: var(--d, 0ms); }
@keyframes tour-aparece { to { opacity: 1; transform: none; } }
.mock-hola { text-align: center; display: grid; gap: 14px; justify-items: center; }
.mock-logo-grande { font-family: "Plus Jakarta Sans", var(--sans); font-weight: 800; font-size: clamp(44px, 8vw, 84px); letter-spacing: -.05em; line-height: 1;
  background: linear-gradient(115deg, #14212b 35%, #0f8f86 70%, #19c2ae); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tour-escena.activa .mock-logo-grande { animation: tour-aparece .7s ease both; }
.mock-hola p { margin: 0; font-size: 17px; color: #33475b; line-height: 1.5; }
.tour-atajos { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.mock-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mock-kpis div, .mock-modelo { background: #fff; border: 1px solid #e6e9e7; border-radius: 12px; padding: 12px 14px; display: grid; gap: 2px; }
.mock-kpis div.oscuro { background: #14212b; color: #fff; border-color: #14212b; }
.mock-kpis small, .mock-modelo small, .mock-campos small { color: #667785; font-size: 11.5px; }
.mock-kpis div.oscuro small { color: #b9c1c8; }
.mock-kpis b, .mock-modelo b { font-size: 21px; font-variant-numeric: tabular-nums; }
.mock-barras { display: flex; align-items: flex-end; gap: 8px; height: 110px; background: #fff; border: 1px solid #e6e9e7; border-radius: 12px; padding: 12px; }
.mock-barras span { flex: 1; height: 0; background: #d7ebe6; border-radius: 5px 5px 2px 2px; }
.mock-barras span:last-child { background: #1f5f55; }
.tour-escena.activa .mock-barras span { animation: tour-barra .7s cubic-bezier(.2, .8, .2, 1) forwards; animation-delay: var(--d); }
@keyframes tour-barra { to { height: var(--h); } }
.mock-alerta { background: #fbf0dc; color: #8a5a0b; border-radius: 10px; padding: 9px 12px; font-size: 13px; }
.mock-factura, .mock-asiento, .mock-lista { background: #fff; border: 1px solid #e6e9e7; border-radius: 14px; padding: 14px 16px; display: grid; gap: 4px; position: relative; }
.mock-fila { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 8px 0; border-bottom: 1px solid #eef0ee; font-size: 14px; }
.mock-asiento .mock-fila { grid-template-columns: 1fr 90px 90px; text-align: right; }
.mock-asiento .mock-fila span { text-align: left; }
.mock-fila.cab { border-bottom: 2px solid #14212b; }
.mock-fila.cab span { color: #667785; }
.mock-fila.total { border: 0; font-size: 16px; }
.mock-sello { position: absolute; right: 16px; bottom: -14px; display: flex; align-items: center; gap: 8px; background: #1f5f55; color: #fff; font-weight: 700;
  padding: 8px 12px; border-radius: 10px; font-size: 13px; opacity: 0; transform: scale(1.6) rotate(-6deg); box-shadow: 0 10px 24px rgba(31,95,85,.35); }
.tour-escena.activa .mock-sello { animation: tour-sello .5s cubic-bezier(.2, 1.4, .4, 1) forwards; animation-delay: var(--d); }
@keyframes tour-sello { to { opacity: 1; transform: scale(1) rotate(-3deg); } }
.mock-qr { width: 22px; height: 22px; background: repeating-conic-gradient(#fff 0 25%, transparent 0 50%) 0 0 / 6px 6px; border: 2px solid #fff; border-radius: 3px; }
.mock-escaner { display: grid; grid-template-columns: 150px 1fr; gap: 22px; align-items: center; }
.mock-ticket { position: relative; background: #fff; border: 1px solid #e6e9e7; border-radius: 6px; padding: 16px 14px; display: grid; gap: 9px; height: 190px; overflow: hidden;
  box-shadow: 0 10px 24px rgba(0,0,0,.08); transform: rotate(-3deg); }
.mock-ticket i { display: block; height: 8px; border-radius: 4px; background: #e8ecea; }
.mock-ticket i:nth-child(2) { width: 70%; } .mock-ticket i:nth-child(4) { width: 55%; } .mock-ticket i:nth-child(5) { width: 80%; height: 12px; background: #cfd8d5; margin-top: 12px; }
.mock-laser { position: absolute; left: 0; right: 0; height: 3px; top: 0; background: #19c2ae; box-shadow: 0 0 16px 4px rgba(25,194,174,.6); opacity: 0; }
.tour-escena.activa .mock-laser { animation: tour-laser 1.2s ease-in-out 2 alternate; }
@keyframes tour-laser { 0% { top: 0; opacity: 1; } 100% { top: 100%; opacity: 1; } }
.mock-campos { display: grid; gap: 10px; }
.mock-campos div { background: #fff; border: 1px solid #e6e9e7; border-radius: 10px; padding: 8px 12px; display: grid; }
.mock-chip { justify-self: start; background: #e7f6f3; color: #0f8f86; font-weight: 600; font-size: 12.5px; padding: 5px 10px; border-radius: 99px; }
.mock-mov { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 9px 0; border-bottom: 1px solid #eef0ee; font-size: 14px; }
.mock-mov:last-child { border: 0; }
.mock-ok { grid-column: 1 / -1; font-style: normal; font-size: 12.5px; color: #0f8f86; font-weight: 600; opacity: 0; }
.tour-escena.activa .mock-ok { animation: tour-aparece .4s ease forwards; animation-delay: var(--d); }
.verde { color: #0f8f86; }
.mock-nota { margin: 0; color: #667785; font-size: 14px; }
.mock-modelos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mock-modelo span { color: #667785; font-size: 12px; }
.mock-kanban { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mock-kanban > div { background: #eef3f1; border-radius: 12px; padding: 10px; min-height: 130px; display: grid; align-content: start; gap: 8px; position: relative; }
.mock-kanban small { font-weight: 600; font-size: 12px; color: #33475b; }
.mock-kanban .ganada { background: #e7f6f3; outline: 2px dashed #0f8f86; outline-offset: -4px; }
.mock-tarjeta { background: #fff; border: 1px solid #e6e9e7; border-radius: 9px; padding: 9px 10px; font-size: 13px; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.tour-escena.activa .mock-tarjeta.mueve { animation: tour-mueve 1.1s cubic-bezier(.5, 0, .2, 1) 1.2s forwards; }
@keyframes tour-mueve { 40% { transform: translate(40%, -10px) rotate(3deg); box-shadow: 0 16px 30px rgba(0,0,0,.18); } 100% { transform: translate(calc(100% + 30px), 0); background: #0f8f86; color: #fff; } }
.mock-tpv { display: grid; grid-template-columns: 1fr 170px; gap: 12px; }
.mock-productos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mock-productos span { background: #fff; border: 1px solid #e6e9e7; border-radius: 10px; padding: 16px 10px; font-weight: 600; font-size: 13.5px; text-align: center; }
.mock-caja { background: #fff; border: 1px solid #e6e9e7; border-radius: 12px; padding: 12px; display: grid; gap: 8px; align-content: center; }
.mock-caja small { color: #667785; font-size: 11.5px; }
.mock-caja b { font-size: 26px; }
.mock-btn { background: #14212b; color: #fff; border-radius: 9px; padding: 9px 14px; font-weight: 600; font-size: 13.5px; text-align: center; }
.mock-btn.claro { background: #fff; color: #14212b; border: 1px solid #cfd8d5; }
.mock-proyecto { background: #fff; border: 1px solid #e6e9e7; border-top: 4px solid #2563eb; border-radius: 14px; padding: 16px; display: grid; gap: 10px; }
.mock-progreso { height: 10px; background: #eef0ee; border-radius: 99px; overflow: hidden; }
.mock-progreso span { display: block; height: 100%; width: 0; background: #2563eb; border-radius: inherit; }
.tour-escena.activa .mock-progreso span { animation: tour-ancho 1.6s cubic-bezier(.2, .8, .2, 1) .4s forwards; }
@keyframes tour-ancho { to { width: var(--w); } }
.mock-cifras { display: flex; justify-content: space-between; font-size: 14px; color: #33475b; }
.mock-fichar { background: #fff; border: 1px solid #0f8f86; border-radius: 14px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.mock-fichar b { flex: 1; }
.mock-punto { width: 12px; height: 12px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 0 rgba(22,163,74,.5); animation: latido 2s infinite; }
.mock-vacaciones { background: #fff; border: 1px solid #e6e9e7; border-radius: 12px; padding: 12px 16px; display: grid; gap: 4px; font-size: 14px; }
.mock-chat { display: grid; gap: 10px; }
.mock-chat p { margin: 0; padding: 11px 14px; border-radius: 14px; font-size: 14.5px; line-height: 1.45; max-width: 85%; }
.mock-chat .yo { justify-self: end; background: #14212b; color: #fff; border-bottom-right-radius: 4px; }
.mock-chat .ia { background: #fff; border: 1px solid #e6e9e7; border-bottom-left-radius: 4px; min-height: 48px; }
.mock-conexiones { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mock-conexiones span { background: #fff; border: 1px solid #e6e9e7; border-radius: 12px; padding: 16px; font-weight: 600; font-size: 14.5px; }
@media (max-width: 760px) {
  .tour { padding: 0; place-items: end center; }
  .tour-caja { border-radius: 18px 18px 0 0; }
  .tour-pantalla { grid-template-columns: 1fr; aspect-ratio: auto; height: 58vh; }
  .tour-menu { display: none; }
  .tour-escena { padding: 20px 18px; }
  .mock-kpis, .mock-modelos { grid-template-columns: 1fr 1fr; }
  .mock-escaner, .mock-tpv, .mock-conexiones { grid-template-columns: 1fr; }
  .mock-ticket { display: none; }
  .tour-texto strong { font-size: 17px; }
  .panel-cab .ver-tour { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .tour-escena, .tour-caja, .tour-fondo { transition: none; animation: none; }
  .tour-escena.activa * { animation-duration: .01ms !important; animation-delay: 0ms !important; }
}

/* ---------- Selector de idioma ---------- */
.visualmente-oculto { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.selector-idioma { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); position: relative; }
.selector-idioma svg { width: 17px; height: 17px; flex: none; }
.selector-idioma select { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 8px; padding: 5px 8px; font-size: 13px; width: auto; min-width: 0; cursor: pointer; }
.menu-idiomas { display: flex; flex-wrap: wrap; gap: 6px 14px; padding-top: 10px; margin-top: 6px; border-top: 1px solid var(--border); }
.menu-idiomas a[aria-current] { font-weight: 700; color: var(--accent); }
@media (max-width: 900px) { .cabecera .selector-idioma { display: none; } }
.lateral-pie .selector-idioma { margin-bottom: 6px; }
.lateral-pie .selector-idioma select { flex: 1; }
.aviso-idioma { background: var(--accent-soft); color: var(--accent); border-radius: var(--radius); padding: 10px 14px; font-size: 14px; margin-bottom: 18px; }
.sistema-fiscal { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 16px; }
.sistema-fiscal summary { cursor: pointer; font-weight: 500; }
.sistema-fiscal[open] summary { margin-bottom: 12px; }
.fila-sistema { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.fila-sistema .campo { margin: 0; min-width: 180px; }
.codigo-tbai code { font-size: 11px; word-break: break-all; }

/* Contraste en la portada: el título del bloque final va en blanco y la maqueta del hero con texto oscuro */
body.web .cta-final h2 { color: #fff; }
body.web .cta-final p { color: #c3d2d8; }
body.web .hero .maqueta { color: var(--text); }
body.web .hero .maqueta .fila > span:first-child { color: var(--ink); font-weight: 500; }
body.web .hero .maqueta .kpi small { color: var(--muted); }

/* Vídeo promocional del hero (portada) */
.hero-video { position: relative; margin: 0; border-radius: 18px; overflow: hidden; aspect-ratio: 16 / 9; background: #0b1f2a; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .1); }
.hero-video video { display: block; width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.hero-video-boton { position: absolute; right: 12px; bottom: 16px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); background: rgba(11, 31, 42, .65); backdrop-filter: blur(6px); color: #fff; display: grid; place-items: center; cursor: pointer; opacity: .75; transition: opacity .2s, transform .2s; }
.hero-video:hover .hero-video-boton, .hero-video-boton:focus-visible, .hero-video.pausado .hero-video-boton { opacity: 1; }
.hero-video-boton:hover { transform: scale(1.06); }
.hero-video-boton svg { width: 16px; height: 16px; fill: currentColor; }
.hero-video .i-play, .hero-video.pausado .i-pausa { display: none; }
.hero-video.pausado .i-play { display: block; }
.hero-video.pausado .hero-video-boton { width: 64px; height: 64px; right: calc(50% - 32px); bottom: calc(50% - 32px); background: var(--brand, #0f8f86); border-color: transparent; }
.hero-video.pausado .hero-video-boton svg { width: 26px; height: 26px; }
.hero-video-progreso { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .12); }
.hero-video-progreso i { display: block; height: 100%; width: 0; background: var(--brand-2, #19c2ae); }
@media (min-width: 901px) { body.web .hero .contenedor:has(.hero-video) { grid-template-columns: 1fr 1.1fr; gap: clamp(56px, 6vw, 120px); } body.web .hero .contenedor:has(.hero-video) h1 { font-size: clamp(40px, 4.4vw, 60px); } }
@media (min-width: 1200px) {
  body.web .hero .contenedor:has(.hero-video) { grid-template-columns: minmax(0, .9fr) minmax(0, 1.25fr); gap: 56px; max-width: 1240px; }
}
@media (min-width: 1440px) {
  body.web .hero .contenedor:has(.hero-video) { grid-template-columns: minmax(0, .82fr) minmax(0, 1.38fr); gap: clamp(56px, 4vw, 80px); max-width: 1480px; }
  body.web .hero .hero-video { margin-right: -32px; }
}

/* Panel lateral de registro/acceso: funciones disponibles */
.acceso-lateral { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: radial-gradient(700px 420px at 100% 0%, rgba(25, 194, 174, .22), transparent 60%), var(--ink); }
.acceso-lateral blockquote { margin-bottom: 32px; }
.lateral-funciones { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; max-width: 640px; }
.lateral-funcion { display: flex; gap: 12px; padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08); transition: background .2s, border-color .2s; }
.lateral-funcion:hover { background: rgba(255, 255, 255, .07); border-color: rgba(127, 196, 180, .35); }
.lateral-icono { flex: none; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: rgba(25, 194, 174, .14); color: #7fe0d0; }
.lateral-icono svg { width: 18px; height: 18px; }
.lateral-funcion strong { display: block; font-size: 14px; font-weight: 600; color: #fff; line-height: 1.3; }
.lateral-funcion small { display: block; font-size: 12.5px; line-height: 1.4; color: #a9bcc3; margin-top: 2px; }
.lateral-sellos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; max-width: 640px; }
.lateral-sellos span { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #d6e2e6; padding: 6px 10px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); }
.lateral-sellos svg { width: 14px; height: 14px; }
@media (max-width: 1200px) { .lateral-funciones { grid-template-columns: 1fr; } .acceso-lateral { padding: 40px; } .acceso-lateral blockquote { font-size: 28px; } }

/* Editor de ventas: cliente extranjero, operaciones UE y moneda */
details.extranjero { margin: 0 0 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
details.extranjero > summary { cursor: pointer; padding: 12px 16px; font-size: 14px; color: var(--muted); list-style: none; }
details.extranjero > summary::before { content: "＋ "; color: var(--accent); }
details.extranjero[open] > summary::before { content: "－ "; }
details.extranjero > summary strong { color: var(--ink); font-weight: 600; }
.extranjero-campos { display: flex; flex-wrap: wrap; gap: 12px 16px; padding: 4px 16px 16px; }
.extranjero-campos .campo { margin: 0; min-width: 150px; }
.extranjero-campos .campo.crece { flex: 1 1 280px; }
.extranjero-campos .ayuda { margin: 6px 0 0; }
.con-boton { display: flex; gap: 6px; }
.con-boton input { min-width: 0; width: 110px; }
.totales .contravalor span, .totales .contravalor strong { font-size: 13px; color: var(--muted); font-weight: 400; }
.btn.btn-peq { padding: 6px 10px; font-size: 13px; min-height: 0; }
.form-202 { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; margin: 0 0 20px; }
.form-202 .campo { margin: 0; min-width: 200px; }
.form-dividendo { align-items: flex-end; flex-wrap: wrap; }
.totales [hidden], .extranjero-campos [hidden] { display: none !important; }

/* Cuentas anuales */
.cuentas-balance { align-items: start; }
.tabla.cuentas-anuales td { padding-top: 7px; padding-bottom: 7px; }
.tabla.cuentas-anuales tr.nivel-0 td { font-weight: 700; color: var(--ink); background: var(--bg-alt); }
.tabla.cuentas-anuales tr.nivel-1 td:first-child { padding-left: 22px; }
.tabla.cuentas-anuales tr.nivel-2 td:first-child { padding-left: 38px; color: var(--muted); }
.form-aplicacion .linea-informe { align-items: center; gap: 12px; }
.form-aplicacion .linea-informe input { width: 150px; text-align: right; }
.form-aplicacion fieldset, .form-memoria fieldset { border: 0; padding: 0; margin: 0; }
.memoria h3 { font-size: 15px; margin: 18px 0 6px; }
.memoria p { margin: 0 0 6px; color: var(--text); }
ol.pasos { padding-left: 20px; display: grid; gap: 8px; }

/* RRHH */
.ficha-rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 16px; }
.cuadrante { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 760px; }
.cuadrante th, .cuadrante td { border-bottom: 1px solid var(--border); padding: 8px; vertical-align: top; font-size: 13.5px; }
.cuadrante th { font-weight: 600; color: var(--muted); text-align: left; background: var(--bg-alt); }
.cuadrante th.festivo, .cuadrante td.festivo { background: color-mix(in srgb, var(--coral, #e8765c) 10%, transparent); }
.cuadrante td.ausente { background: repeating-linear-gradient(135deg, var(--bg-alt), var(--bg-alt) 6px, transparent 6px, transparent 12px); }
.cuadrante td.hoy, .cuadrante th.hoy { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent); }
.turno { display: flex; align-items: center; justify-content: space-between; gap: 4px; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border-radius: 8px; padding: 4px 6px; margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.turno form { margin: 0; }
.turno button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 2px; }
.turno small { display: block; color: var(--muted); font-size: 11.5px; }
.form-turnos { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; }
.form-turnos .campo { margin: 0; }
.casillas-dias { display: flex; gap: 6px; flex-wrap: wrap; }
.casillas-dias label, .casillas-personas label { display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; border: 1px solid var(--border-strong); border-radius: 999px; font-size: 13.5px; cursor: pointer; }
.casillas-personas { display: flex; gap: 6px; flex-wrap: wrap; }
.aviso-legal { border-left: 3px solid var(--coral, #e8765c); padding: 8px 12px; background: var(--surface); margin: 6px 0; font-size: 14px; }
.cal-anual { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.cal-mes { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; }
.cal-mes h3 { font-size: 14px; margin: 0 0 6px; text-transform: capitalize; }
.cal-mes table { width: 100%; border-collapse: collapse; font-size: 12px; text-align: center; }
.cal-mes td, .cal-mes th { padding: 3px 0; }
.cal-mes th { color: var(--muted); font-weight: 500; }
.cal-mes td.fuera { color: transparent; }
.cal-mes td.finde { color: var(--muted); }
.cal-mes td.fest { background: var(--coral, #e8765c); color: #fff; border-radius: 6px; font-weight: 600; }
.cal-mes td.fest.empresa { background: var(--accent); }
.exceso { color: var(--coral, #c0392b); }
.casillas-dias label, .casillas-personas label { white-space: nowrap; }
.invitado { background: color-mix(in srgb, var(--accent) 10%, transparent); border-radius: 10px; padding: 10px 14px; margin: -16px 0 22px; font-size: 14px; color: var(--ink); }
.enlace-referidos { display: block; margin: 6px 0; padding: 9px 12px; border-radius: 10px; font-size: 13.5px; font-weight: 600; color: var(--ink);
  background: linear-gradient(115deg, color-mix(in srgb, var(--accent) 16%, transparent), color-mix(in srgb, var(--coral, #e8765c) 14%, transparent)); }
.enlace-referidos:hover, .enlace-referidos.activo { background: linear-gradient(115deg, color-mix(in srgb, var(--accent) 26%, transparent), color-mix(in srgb, var(--coral, #e8765c) 22%, transparent)); }

/* Referidos (panel) */
.ref-hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: center; padding: 28px; border-radius: 20px; margin-bottom: 20px; color: #e8f1f3;
  background: radial-gradient(600px 300px at 100% 0%, rgba(25, 194, 174, .35), transparent 60%), radial-gradient(500px 280px at 0% 100%, rgba(232, 118, 92, .25), transparent 60%), #0b1f2a; }
.ref-hero h1 { color: #fff; font-size: clamp(24px, 3vw, 34px); line-height: 1.15; margin: 10px 0; }
.ref-hero p { color: #c3d2d8; margin: 0; }
.ref-hero .etiqueta { background: rgba(255, 255, 255, .1); color: #d8f3ee; border: 1px solid rgba(255, 255, 255, .16); }
.ref-enlace { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); border-radius: 14px; padding: 16px; }
.ref-enlace label { display: block; font-size: 13px; color: #c3d2d8; margin-bottom: 6px; }
.ref-enlace .con-boton input { flex: 1; width: auto; background: #fff; color: #0b1f2a; font-weight: 600; }
.ref-compartir { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ref-compartir .btn { color: #fff; border-color: rgba(255, 255, 255, .3); background: transparent; }
.ref-cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 20px; }
.ref-cifras > div { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px; }
.ref-cifras small { display: block; color: var(--muted); font-size: 12.5px; }
.ref-cifras strong { font-size: 22px; color: var(--ink); }
.ref-cifras .destacada { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.ref-pasos { list-style: none; counter-reset: paso; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.ref-pasos li { counter-increment: paso; background: var(--bg-alt); border-radius: 14px; padding: 14px 14px 14px 52px; position: relative; }
.ref-pasos li::before { content: counter(paso); position: absolute; left: 14px; top: 14px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; }
.ref-pasos strong { display: block; color: var(--ink); }
.ref-pasos span { font-size: 14px; color: var(--muted); }
@media (max-width: 860px) { .ref-hero { grid-template-columns: 1fr; padding: 20px; } }

/* Referidos (web) */
.nav a.nav-referidos { color: var(--accent-hover, var(--accent)); font-weight: 600; }
.nav a.nav-referidos::before { content: "🎁 "; }
body.web .ref-web { background: radial-gradient(700px 360px at 100% 0%, rgba(25, 194, 174, .30), transparent 60%), radial-gradient(600px 320px at 0% 100%, rgba(232, 118, 92, .22), transparent 60%), #0b1f2a; color: #d6e2e6; }
body.web .ref-web h2 { color: #fff; }
body.web .ref-web h2 em { font-style: normal; color: var(--brand-2); }
body.web .ref-web .lead { color: #c3d2d8; max-width: 560px; }
body.web .ref-web .antetitulo { color: #7fe0d0; }
body.web .ref-web .btn-borde { color: #fff; border-color: rgba(255, 255, 255, .35); background: transparent; }
.ref-web-rejilla { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.ref-web-ventajas { list-style: none; padding: 0; margin: 22px 0 28px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ref-web-ventajas li { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px; padding: 14px; }
.ref-web-ventajas strong { display: block; font-size: 24px; color: #fff; line-height: 1.1; }
.ref-web-ventajas span { font-size: 13.5px; color: #b8c9cf; }
.ref-calc { background: #fff; color: var(--text); border-radius: 20px; padding: 24px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .6); }
.ref-calc h3 { margin: 0 0 14px; color: var(--ink); font-size: 20px; }
.ref-calc label { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; color: var(--ink); margin: 14px 0 6px; }
.ref-calc output { color: var(--accent); font-size: 18px; }
.ref-calc input[type=range] { width: 100%; accent-color: var(--accent); }
.ref-calc select { width: 100%; }
.ref-calc-res { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 8px; }
.ref-calc-res div { background: var(--bg-alt); border-radius: 14px; padding: 12px 14px; }
.ref-calc-res small { display: block; color: var(--muted); font-size: 13px; }
.ref-calc-res strong { font-size: 26px; color: var(--ink); }
.ref-perfiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.ref-perfiles > div { border: 1px solid var(--border); border-radius: 16px; padding: 20px; background: var(--surface); }
.ref-perfiles h3 { margin: 0 0 6px; font-size: 17px; }
.ref-perfiles p { margin: 0; color: var(--muted); font-size: 15px; }
.legal-breve ol { display: grid; gap: 10px; padding-left: 20px; color: var(--text); }
@media (max-width: 900px) { .ref-web-rejilla { grid-template-columns: 1fr; gap: 28px; } }
@media (max-width: 520px) { .ref-web-ventajas { grid-template-columns: 1fr; } .ref-calc { padding: 18px; } }
/* Con la entrada de referidos el menú necesita algo más de ancho */
@media (max-width: 1360px) { .nav a { padding: 8px 8px; font-size: 14.5px; } .nav { margin-left: 4px; } }
@media (max-width: 1240px) { .nav { display: none; } body.web .menu-web { display: inline-flex; } .menu-movil.abierto { display: grid; padding: 8px 20px 16px; border-top: 1px solid var(--border); background: #fff; } .menu-movil a { padding: 12px 4px; color: var(--ink); font-weight: 600; border-bottom: 1px solid var(--border); } }
.ref-calc select { font: 15px var(--sans); color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 11px 12px; }
body.web .cabecera .contenedor { max-width: 1280px; }

/* Novedades */
.novedades-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.novedad { display: flex; flex-direction: column; gap: 6px; padding: 20px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); color: var(--text); transition: transform .15s, box-shadow .15s, border-color .15s; }
.novedad:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: 0 14px 30px -18px rgba(0, 0, 0, .25); }
.novedad strong { color: var(--ink); font-size: 16.5px; line-height: 1.3; }
.novedad p { margin: 0; font-size: 14.5px; color: var(--muted); }
.novedad-ico { font-size: 26px; line-height: 1; }
.novedad-fecha { font-size: 12.5px; color: var(--muted); }
.novedades-grid.compacta { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.novedades-grid.compacta .novedad { padding: 14px; }
.novedades-grid.compacta .novedad strong { font-size: 14.5px; }
.novedades-grid.compacta .novedad p { font-size: 13px; }
.novedades-inicio { margin: 0 0 20px; padding: 16px; border-radius: 16px; background: linear-gradient(115deg, color-mix(in srgb, var(--accent) 10%, transparent), color-mix(in srgb, var(--coral, #e8765c) 8%, transparent)); }
.novedades-inicio-cab { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.linea-novedades { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.linea-novedades li { display: grid; grid-template-columns: 48px 1fr; gap: 14px; padding: 18px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.linea-novedades li .novedad-ico { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--bg-alt); }
.linea-novedades h2 { font-size: 18px; margin: 2px 0 4px; }
.linea-novedades p { margin: 0 0 8px; color: var(--muted); }
.enlace-novedades { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; padding: 7px 12px; border-radius: 10px; font-size: 13.5px; color: var(--ink); }
.enlace-novedades:hover, .enlace-novedades.activo { background: var(--bg-alt); }
.enlace-novedades .contador { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--coral, #e8765c); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }

/* Plantillas de factura (miniaturas dibujadas con CSS) */
.plantillas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin: 14px 0; }
.plantilla-tarjeta { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 10px; border: 1.5px solid var(--border); border-radius: 14px; cursor: pointer; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.plantilla-tarjeta:hover { border-color: var(--border-strong); }
.plantilla-tarjeta.elegida { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.plantilla-tarjeta input { position: absolute; opacity: 0; pointer-events: none; }
.plantilla-tarjeta strong { font-size: 14px; color: var(--ink); }
.plantilla-tarjeta small { font-size: 12px; color: var(--muted); line-height: 1.35; }
.plantilla-tarjeta .ver-ejemplo { font-size: 12.5px; margin-top: 2px; }
.mini { --c: var(--pl-marca, var(--pl-acento)); position: relative; display: flex; flex-direction: column; gap: 5px; aspect-ratio: 210 / 297; padding: 12px 10px; margin-bottom: 6px; background: #fff; border: 1px solid #e5e7eb; border-radius: 6px; overflow: hidden; }
.mini i { display: block; border-radius: 2px; }
.mini .m-cab { height: 14px; width: 55%; background: #cbd5e1; }
.mini .m-cli { height: 22px; width: 100%; border-bottom: 1px solid #e5e7eb; margin-bottom: 4px; background: linear-gradient(#94a3b8, #94a3b8) 0 3px / 40% 4px no-repeat, linear-gradient(var(--c), var(--c)) 100% 8px / 30% 8px no-repeat; }
.mini .m-tab { height: 12px; border-bottom: 1px solid #e5e7eb; background: linear-gradient(#cbd5e1, #cbd5e1) 0 4px / 50% 3px no-repeat, linear-gradient(#94a3b8, #94a3b8) 100% 4px / 18% 3px no-repeat; }
.mini .m-tot { margin-top: auto; align-self: flex-end; width: 45%; height: 14px; border-top: 1.5px solid #334155; }
.mini-linea .m-cab { box-shadow: 0 6px 0 -5px #cbd5e1; }
.mini-banda .m-cab { width: calc(100% + 20px); margin: -12px -10px 4px; height: 24px; background: var(--c); border-radius: 0; }
.mini-titulo .m-cab { height: 10px; width: 60%; background: var(--c); }
.mini-centrada .m-cab { align-self: center; width: 45%; box-shadow: 0 8px 0 -6px var(--c); }
.mini-t-color .m-tab:first-of-type { background-color: var(--c); }
.mini-t-cebra .m-tab:nth-of-type(odd) { background-color: color-mix(in srgb, var(--c) 14%, #fff); }
.mini-t-caja .m-tab { border: 1px solid #d1d5db; }
.mini-tot-caja .m-tot { background: var(--c); border-top: 0; }
.mini-tot-banda .m-tot { background: color-mix(in srgb, var(--c) 16%, #fff); border-top: 2px solid var(--c); }
.mini-franja { border-left: 8px solid var(--c); }
.mini-f-times .m-cab, .mini-f-courier .m-cab { border-radius: 0; }
.plantilla-color { align-items: center; gap: 12px; }
.plantilla-color input[type=color] { width: 44px; height: 34px; padding: 2px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); }
.mini-aire .m-cab { background: #e5e7eb; } .mini-t-aire .m-tab { border-bottom: 0; } .mini-t-aire .m-tab:first-of-type { border-bottom: 1.5px solid #111; } .mini-tot-aire .m-tot { border-top: 0; background: linear-gradient(#111, #111) 100% 50% / 60% 3px no-repeat; }

/* Portal del cliente y firma */
.portal-marca { display: flex; gap: 16px; align-items: center; }
.portal-marca img { max-height: 56px; max-width: 160px; object-fit: contain; }
.portal-cifras { margin: 6px 0 22px; }
.portal-seccion-cab { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.firmar .lienzo-firma { position: relative; border: 1.5px dashed var(--border-strong); border-radius: 12px; background: #fff; margin: 6px 0 12px; }
.firmar canvas { display: block; width: 100%; height: 180px; touch-action: none; cursor: crosshair; }
.firmar #borrar-firma { position: absolute; right: 8px; top: 6px; }
.etiqueta-firma { font-size: 14px; font-weight: 500; color: var(--ink); }
.acepto { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0 14px; font-size: 14.5px; }
.firma-img { max-width: 280px; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 6px; }
.publico-pagar { border: 2px solid var(--accent); }
.crear-regla { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); flex-basis: 100%; }
.acciones-fila { display: inline-flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
tr.tenue td { opacity: .6; }
.programacion { margin: 0 0 16px; padding: 14px 16px; border: 1.5px solid color-mix(in srgb, var(--accent) 40%, var(--border)); border-radius: var(--radius); background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.programacion h2 { font-size: 16px; margin: 0 0 8px; }
.programacion .extranjero-campos { padding: 0; }
.programacion-opciones { display: grid; gap: 6px; margin-top: 10px; font-size: 14.5px; }
.programacion-opciones label { display: flex; gap: 8px; align-items: center; }
.pasarelas-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin: 14px 0; }
.pasarela-tarjeta { border: 1.5px solid var(--border); border-radius: 14px; padding: 14px; background: var(--surface); }
.pasarela-tarjeta.conectada { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 4%, var(--surface)); }
.pasarela-cab { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.pasarela-tarjeta label.fila-form { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; margin: 4px 0 10px; } .pasarela-tarjeta .ayuda { overflow-wrap: anywhere; }
.origenes-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin-bottom: 18px; }
.origen { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px; display: grid; gap: 4px; }
.origen strong { color: var(--ink); } .origen small { color: var(--muted); font-size: 13px; }
.mapa-columnas { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 16px; }
.buzon-gastos { display: grid; grid-template-columns: auto 1fr minmax(260px, 380px); gap: 14px; align-items: center; padding: 14px 16px; margin: 14px 0; border: 1px dashed color-mix(in srgb, var(--accent) 50%, var(--border)); border-radius: 14px; background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.buzon-gastos strong { display: block; color: var(--ink); } .buzon-gastos small { color: var(--muted); font-size: 13px; }
.buzon-ico { font-size: 26px; }
@media (max-width: 760px) { .buzon-gastos { grid-template-columns: 1fr; } }

/* Informes */
.grafico-barras { display: flex; align-items: flex-end; gap: 6px; height: 220px; padding: 10px 0 24px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.grafico-barras .mes { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; position: relative; min-width: 0; }
.grafico-barras .mes small { position: absolute; bottom: -20px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.grafico-barras .barra { width: 42%; max-width: 26px; border-radius: 4px 4px 0 0; min-height: 1px; }
.grafico-barras.saldo .barra { width: 70%; max-width: 34px; }
.barra.ventas { background: var(--accent); } .barra.gastos { background: var(--coral, #e8765c); } .barra.negativa { background: #c0392b; }
.leyenda { font-size: 13px; color: var(--muted); display: flex; gap: 10px; align-items: center; margin: 22px 0 12px; }
.punto { display: inline-block; width: 10px; height: 10px; border-radius: 3px; } .punto.ventas { background: var(--accent); } .punto.gastos { background: var(--coral, #e8765c); }
.fila-barra { position: relative; display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; margin-bottom: 4px; border-radius: 8px; overflow: hidden; font-size: 14px; }
.fila-barra i { position: absolute; left: 0; top: 0; bottom: 0; background: color-mix(in srgb, var(--accent) 12%, transparent); z-index: 0; }
.fila-barra span, .fila-barra strong { position: relative; z-index: 1; }
details.semana { border-bottom: 1px solid var(--border); }
details.semana summary { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 8px; padding: 10px 4px; cursor: pointer; font-size: 14px; }
details.semana .entrada, .linea-informe .entrada { color: var(--accent); } details.semana .salida, .linea-informe .salida { color: var(--coral, #c0392b); }
@media (max-width: 600px) { details.semana summary { grid-template-columns: 1fr 1fr; } }
details.semana > summary { display: grid !important; width: 100%; list-style: none; align-items: center; } details.semana > summary > * { white-space: nowrap; } details.semana > summary > strong, details.semana > summary > .entrada, details.semana > summary > .salida { text-align: right; }
details.semana { display: block !important; }

/* Remesas y ficha de contacto */
.pasos-lista { margin: 0 0 18px; padding-left: 22px; line-height: 1.7; color: var(--muted); }
details.bloque-plegable { margin: 14px 0; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); }
details.bloque-plegable > summary { cursor: pointer; }
details.bloque-plegable[open] > summary { margin-bottom: 10px; }
.buzon-gastos.completo { border-style: solid; }
.buzon-gastos .pill { vertical-align: middle; margin-right: 4px; }
.buzon-pasos { grid-column: 1 / -1; margin: 2px 0 0; padding-left: 22px; color: var(--muted); font-size: 14px; line-height: 1.6; }
@media (max-width: 760px) { .buzon-pasos { grid-column: auto; } }
.buzon-gastos.completo { grid-template-columns: auto 1fr; align-items: start; }
.buzon-gastos.completo .enlace-copiar, .buzon-gastos.completo .buzon-pasos { grid-column: 2; }
.buzon-gastos.completo .enlace-copiar { max-width: 520px; }
.buzon-gastos.completo strong { display: inline; font-size: 16px; }
.buzon-gastos.completo small { display: block; margin-top: 4px; }
@media (max-width: 760px) { .buzon-gastos.completo { grid-template-columns: 1fr; } .buzon-gastos.completo .enlace-copiar, .buzon-gastos.completo .buzon-pasos { grid-column: 1; } }

/* Teléfono de asistencia comercial y soporte */
.pie-telefono a { font-weight: 700; font-size: 17px; color: var(--ink); }
.pie-telefono small { display: block; color: var(--muted); font-size: 12px; }
.menu-movil a.menu-telefono small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.contacto-telefono { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; max-width: 720px; margin: 28px auto; padding: 16px 20px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.contacto-telefono > span { font-size: 26px; }
.contacto-telefono > div { flex: 1; min-width: 180px; }
.contacto-telefono strong { display: block; color: var(--ink); }
.contacto-telefono small { color: var(--muted); }
.cta-telefono { margin-top: 14px; font-size: 15px; opacity: .9; }
.cta-telefono a { color: inherit; font-weight: 700; text-decoration: underline; white-space: nowrap; }

/* Revisión móvil: nada debe ensanchar la página */
.selector-periodo { flex-wrap: wrap; }
.selector-periodo input[type=date] { min-width: 0; flex: 1 1 130px; }
.linea-novedades li { grid-template-columns: 48px minmax(0, 1fr); }
.linea-novedades p, .novedad p, .buzon-gastos small, .ayuda, .vacio { overflow-wrap: anywhere; }
.color-opcion { position: relative; }
fieldset.campo, fieldset.colores { min-width: 0; }
.panel-main { min-width: 0; }
.legal-rejilla > * { min-width: 0; }
.legal table { display: block; max-width: 100%; overflow-x: auto; }
.legal td, .legal th { overflow-wrap: anywhere; }
@media (max-width: 520px) {
  .kpis-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kpi-panel { padding: 12px 14px; }
  .kpi-panel strong { font-size: 18px; overflow-wrap: anywhere; }
  .ref-cifras { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px; }
  .ref-cifras strong { font-size: 18px; overflow-wrap: anywhere; }
}

/* Banner de cookies (mismo formato que gestionatureserva.com, con los colores de Niran) */
.cookie-bar { position: fixed; left: 16px; bottom: 16px; z-index: 2147483647; /* por encima del chat de Tidio */ max-width: 520px; background: #14212b; color: #e8eef0; border-radius: 16px;
  padding: 16px 18px; box-shadow: 0 18px 50px rgba(15, 21, 27, .35); display: grid; gap: 12px; font-size: 14.5px; line-height: 1.5; }
.cookie-bar[hidden] { display: none; }
.cookie-bar p { margin: 0; }
.cookie-bar a { color: #7fc4b4; }
.cookie-bar .fila { display: flex; gap: 8px; flex-wrap: wrap; }
.cookie-bar .btn { padding: 9px 16px; font-size: 14px; }
.cookie-bar .btn-borde { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .3); }
.cookie-bar .btn-primario { background: #7fc4b4; color: #14212b; border-color: #7fc4b4; }
@media (max-width: 640px) {
  .cookie-bar { left: 10px; right: 10px; bottom: 10px; max-width: none; padding: 12px 14px; gap: 10px; font-size: 13px; line-height: 1.4; border-radius: 14px; }
  .cookie-bar .fila { flex-wrap: nowrap; }
  .cookie-bar .btn { flex: 1; padding: 9px 10px; font-size: 14px; }
}
@media print { .cookie-bar { display: none !important; } }

/* Panel interno de campañas */
.marketing-barra { height: 8px; border-radius: 4px; background: var(--accent-soft); overflow: hidden; min-width: 80px; }
.marketing-barra i { display: block; height: 100%; background: var(--accent); }
.etiqueta-fila { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.enlace-olvido { font-size: 13.5px; color: var(--accent); font-weight: 600; }
.verificar-icono { font-size: 44px; line-height: 1; margin-bottom: 8px; }
.codigo-verificacion { font-size: 30px !important; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; font-weight: 700; }
.verificar-reenviar { text-align: center; margin-top: 4px; }
.casillas-fila { display: grid; gap: 8px; margin: 12px 0; }
.casillas-fila label, .casilla-sola { display: flex; gap: 8px; align-items: flex-start; font-size: 14.5px; }
.casilla-sola { align-self: end; padding-bottom: 10px; }
.subtitulo-ficha { font-size: 15px; margin: 18px 0 6px; }
.calcular-nominas { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.calcular-nominas h2 { margin: 0 0 4px; } .calcular-nominas p { margin: 0; color: var(--muted); }
.campo-num { width: 84px; text-align: right; font: inherit; padding: 6px 8px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); }
.nomina-detalle td, .nomina-detalle th { font-size: 14px; }

/* Asistente con IA flotante en el panel */
.wa-float.compacto { bottom: 88px; }
.ia-flotante { position: fixed; right: 20px; bottom: 20px; z-index: 60; }
.ia-boton { display: flex; align-items: center; gap: 10px; padding: 8px 18px 8px 8px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--ink); color: #fff; font: 600 15px var(--sans); box-shadow: 0 12px 30px rgba(15, 26, 33, .28); transition: transform .15s ease; }
.ia-boton:hover { transform: translateY(-2px); }
.ia-avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: linear-gradient(135deg, #7fc4b4, #1f5f55); color: #fff; }
.ia-avatar svg { width: 20px; height: 20px; }
.ia-flotante.abierto .ia-boton { display: none; }
.ia-panel { position: absolute; right: 0; bottom: 0; width: 400px; height: min(620px, calc(100vh - 40px)); display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: 0 24px 70px rgba(15, 26, 33, .28); overflow: hidden; }
.ia-panel[hidden] { display: none; }
.ia-cab { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; border-bottom: 1px solid var(--border); background: var(--bg-alt); }
.ia-cab div { flex: 1; min-width: 0; }
.ia-cab strong { display: block; font-size: 15px; color: var(--ink); }
.ia-cab small { color: var(--muted); font-size: 12.5px; }
.ia-accion { width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; font-size: 17px;
  display: grid; place-items: center; text-decoration: none; }
.ia-accion:hover { background: var(--border); color: var(--ink); text-decoration: none; }
.ia-hilo { flex: 1; overflow-y: auto; padding: 14px; display: grid; gap: 10px; align-content: start; }
.ia-hilo .burbuja { max-width: 90%; font-size: 14.5px; }
.ia-sugerencias { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; }
.ia-sugerencias[hidden] { display: none; }
.ia-sugerencias button { border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); border-radius: 999px; padding: 6px 12px;
  font: 13px var(--sans); cursor: pointer; text-align: left; }
.ia-sugerencias button:hover { border-color: var(--accent); color: var(--accent); }
.ia-entrada { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); }
.ia-entrada textarea { flex: 1; resize: none; font: 15px var(--sans); padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 12px;
  background: var(--bg); color: var(--text); max-height: 120px; }
.ia-enviar { width: 44px; padding: 0; font-size: 18px; }
.ia-aviso { margin: 0; padding: 0 14px 10px; font-size: 11.5px; color: var(--muted); }
@media (max-width: 720px) {
  .ia-boton { padding: 6px; } .ia-boton .ia-texto { display: none; }
  .ia-flotante.abierto { inset: 0; right: 0; bottom: 0; }
  .ia-panel { position: fixed; inset: 0; width: auto; height: auto; border-radius: 0; }
  .wa-float.compacto { bottom: 76px; }
}
@media print { .ia-flotante { display: none !important; } }
.whatsapp-vincular { display: flex; gap: 32px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.whatsapp-qr svg { width: 220px; height: 220px; display: block; }
.codigo-whatsapp { font: 700 28px var(--sans); letter-spacing: .08em; margin: 14px 0 10px; color: var(--ink); }
.rejilla-ejemplos { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 12px; }
.tarjeta-ejemplo { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; background: var(--bg); }
.tarjeta-ejemplo p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
/* App instalable (PWA) */
.enlace-instalar { background: none; border: 0; padding: 6px 0; font: 600 14px var(--sans); color: var(--accent); cursor: pointer; text-align: left; }
.dialogo-ios { border: 0; border-radius: 20px; padding: 24px; max-width: 360px; box-shadow: 0 24px 70px rgba(15, 26, 33, .3); }
.dialogo-ios::backdrop { background: rgba(15, 26, 33, .45); }
.dialogo-ios h2 { font-size: 20px; margin: 0 0 10px; } .dialogo-ios ol { padding-left: 20px; line-height: 1.6; margin: 0 0 16px; }
.boton-camara { display: none; margin-top: 12px; width: 100%; justify-content: center; }
@media (pointer: coarse) { .boton-camara { display: flex; } }
/* Semáforo de gestorías */
.presentacion-proxima { display: grid; text-align: right; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 16px; }
.presentacion-proxima small, .presentacion-proxima span { color: var(--muted); font-size: 13px; } .presentacion-proxima strong { font-size: 20px; color: var(--ink); }
.semaforo-resumen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.semaforo-caja { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.semaforo-caja strong { font-size: 22px; color: var(--ink); } .semaforo-caja small { color: var(--muted); }
.luz, .luz-semaforo { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex: none; }
.rojo .luz, .luz-semaforo.rojo { background: #d9534f; box-shadow: 0 0 0 4px rgba(217, 83, 79, .15); }
.ambar .luz, .luz-semaforo.ambar { background: #e0a31b; box-shadow: 0 0 0 4px rgba(224, 163, 27, .15); }
.verde .luz, .luz-semaforo.verde { background: #2f9e6e; box-shadow: 0 0 0 4px rgba(47, 158, 110, .15); }
@media (max-width: 640px) { .semaforo-resumen { grid-template-columns: 1fr; } .presentacion-proxima { text-align: left; } }

/* Calculadoras públicas */
.calc-cabecera { padding-bottom: 28px; } .calc-cabecera h1 { font-size: clamp(34px, 5vw, 54px); margin: 6px 0 12px; }
.migas-web { font-size: 14px; color: var(--muted); margin-bottom: 10px; } .migas-web a { color: var(--accent); }
.calc-rejilla { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 28px; align-items: start; }
.calc-form, .calc-resultado { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow); }
.calc-form .campo { margin-bottom: 14px; } .calc-form .fila-campos { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.calc-form .btn-bloque { margin-top: 10px; }
.calc-destacado { display: grid; gap: 4px; padding: 20px 22px; border-radius: 16px; background: var(--ink); color: #fff; margin-bottom: 16px; }
.calc-destacado small { color: #b9c7cc; font-size: 14px; } .calc-destacado strong { font: 800 clamp(34px, 5vw, 46px)/1.05 var(--sans); letter-spacing: -.03em; }
.calc-destacado span { color: #cfe3dc; font-size: 14.5px; }
.calc-tabla { width: 100%; border-collapse: collapse; font-size: 15px; } .calc-tabla td { padding: 9px 0; border-bottom: 1px solid var(--border); }
.calc-tabla td:last-child { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; } .calc-tabla tr.total td { font-weight: 700; color: var(--ink); }
.calc-tabla tr.tenue td { color: var(--muted); font-size: 13.5px; }
.calc-detalle { margin-top: 14px; } .calc-detalle summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.calc-vacio { text-align: center; color: var(--muted); padding: 40px 10px; } .calc-vacio span { font-size: 44px; }
.calc-texto { max-width: 860px; } .calc-texto p { color: var(--text); line-height: 1.65; }
.calc-cta { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; margin: 28px 0; padding: 22px 24px; border-radius: var(--radius-lg); background: var(--accent-soft); }
.calc-cta p { margin: 4px 0 0; color: var(--muted); }
.calc-otras { display: flex; flex-wrap: wrap; gap: 10px; } .calc-otras a { padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px; font-size: 14px; }
.calc-modo { display: grid; gap: 6px; margin-bottom: 14px; } .calc-modo label { display: flex; gap: 8px; font-size: 15px; }
.calc-form .solo-mensual { display: none; } .calc-form.mensual .solo-mensual { display: block; } .calc-form.mensual .solo-anual { display: none; }
.calc-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.calc-tarjeta { display: grid; gap: 8px; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.calc-tarjeta:hover { transform: translateY(-3px); box-shadow: var(--shadow); text-decoration: none; }
.calc-tarjeta strong { font-size: 19px; color: var(--ink); } .calc-tarjeta p { margin: 0; color: var(--muted); font-size: 15px; } .calc-ico { font-size: 34px; } .calc-ir { color: var(--accent); font-weight: 700; }
@media (max-width: 860px) { .calc-rejilla { grid-template-columns: 1fr; } }

/* ---------- Marca blanca para gestorías ---------- */
.marca-despacho { display: flex; flex-direction: column; gap: 4px; padding-left: 10px; border-left: 3px solid var(--color-despacho, var(--accent)); }
.marca-despacho .marca img { height: 36px; max-width: 180px; object-fit: contain; object-position: left center; }
.nombre-despacho { font-weight: 800; font-size: 19px; line-height: 1.15; letter-spacing: -.02em; color: inherit; }
.con-niran { font-size: 11px; opacity: .7; }
.panel-movil .marca-despacho .con-niran { display: none; }
.tu-gestoria { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 16px 20px; margin: 0 0 20px; background: var(--surface);
  border: 1px solid var(--border); border-left: 4px solid var(--color-despacho); border-radius: var(--radius-lg); }
.tu-gestoria img { height: 44px; max-width: 150px; object-fit: contain; }
.tu-gestoria-texto { flex: 1 1 220px; min-width: 0; }
.tu-gestoria-texto small { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.tu-gestoria-texto strong { font-size: 17px; }
.tu-gestoria-texto p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.tu-gestoria-contacto { display: flex; gap: 8px; flex-wrap: wrap; }
.check-destacado { background: var(--accent-soft); border-radius: var(--radius); padding: 10px 12px; }
.portal-enlace { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 20px; margin: 0 0 20px;
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--color-despacho); border-radius: var(--radius-lg); }
.portal-enlace > div:first-child { min-width: 0; flex: 1 1 260px; }
.portal-enlace small { display: block; color: var(--muted); }
.portal-enlace code { display: block; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; margin: 4px 0; }
.rejilla-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 20px; }
.rejilla-form .ancho { grid-column: 1 / -1; }
.rejilla-form input[type="color"] { height: 42px; padding: 4px; width: 100%; }
.con-prefijo { display: flex; align-items: stretch; }
.con-prefijo span { display: flex; align-items: center; padding: 0 10px; background: var(--bg-alt); border: 1px solid var(--border-strong); border-right: 0; border-radius: var(--radius) 0 0 var(--radius); color: var(--muted); }
.con-prefijo input { border-radius: 0 var(--radius) var(--radius) 0; min-width: 0; flex: 1; }
.logo-vista { max-height: 64px; max-width: 240px; }
.equipo-despacho { list-style: none; padding: 0; margin: 12px 0 18px; display: grid; gap: 6px; }
.equipo-despacho li { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--border); }
.portal-g { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 32px 16px; background: var(--bg);
  background-image: linear-gradient(180deg, color-mix(in srgb, var(--color-despacho) 14%, transparent), transparent 320px); }
.portal-g-cab { margin: 8px 0 28px; }
.portal-g-cab img { max-height: 72px; max-width: 260px; object-fit: contain; }
.portal-g-cab .nombre-despacho { font-size: 28px; color: var(--color-despacho); }
.portal-g-caja { width: 100%; max-width: 560px; background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--color-despacho);
  border-radius: var(--radius-lg); padding: 32px 28px; box-shadow: var(--shadow); }
.portal-g-antetitulo { color: var(--color-despacho); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; }
.portal-g h1 { margin: 6px 0 10px; font-size: 30px; line-height: 1.15; overflow-wrap: anywhere; }
.portal-g-mensaje { color: var(--muted); margin: 0 0 22px; }
.portal-g-botones { display: flex; gap: 10px; flex-wrap: wrap; }
.portal-g-botones .btn { flex: 1 1 180px; justify-content: center; }
.portal-g .btn-primario { background: var(--color-despacho); border-color: var(--color-despacho); }
.portal-g-lista { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 10px; }
.portal-g-lista li { display: flex; gap: 10px; align-items: center; color: var(--text); }
.portal-g-lista svg { width: 20px; height: 20px; color: var(--color-despacho); flex: none; }
.portal-g-contacto { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border); font-size: 14px; }
.portal-g-contacto a { overflow-wrap: anywhere; }
.portal-g-pie { margin-top: 24px; color: var(--muted); font-size: 13px; text-align: center; }
@media (max-width: 560px) { .portal-g-caja { padding: 24px 18px; } .portal-g h1 { font-size: 25px; } }
.acceso-form .nombre-despacho { color: var(--color-despacho); }
.baja-fila { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); align-items: end; padding: 10px 0; border-bottom: 1px solid var(--border); }
.baja-fila .campo { margin-bottom: 0; min-width: 0; }
.baja-fila select, .baja-fila input { width: 100%; }

/* Botón fijo «Probar gratis» en la home desde el móvil */
.cta-fija { display: none; }
@media (max-width: 700px) {
  .cta-fija { display: block; position: fixed; left: 16px; right: 96px; bottom: 16px; z-index: 50; padding: 14px; border-radius: 12px;
    background: var(--accent); color: var(--accent-contrast); text-align: center; font-weight: 700; text-decoration: none; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
  body:has(.cta-fija) { padding-bottom: 76px; }
}
.dialogo-fiscal { max-width: 440px; width: calc(100% - 32px); }
.dialogo-fiscal .fila { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.registro-gratis { background: var(--accent); color: var(--accent-contrast); border-radius: 12px; padding: 12px 14px; margin: 0 0 18px; font-size: 15px; line-height: 1.4; }
.clave-con-ojo { position: relative; }
.clave-con-ojo input { padding-right: 48px; }
.ver-clave { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; font-size: 20px; padding: 6px; cursor: pointer; line-height: 1; }
/* Niran Despacho: revisión de documentos con el original al lado */
.despacho-revision { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); gap: 20px; align-items: start; }
.despacho-visor { background: var(--bg2, #f4f2ec); border-radius: 12px; overflow: hidden; min-height: 60vh; }
.despacho-visor iframe { width: 100%; height: 75vh; border: 0; }
.despacho-visor img { width: 100%; height: auto; display: block; }
@media (max-width: 900px) { .despacho-revision { grid-template-columns: 1fr; } .despacho-visor iframe { height: 55vh; } }
@media (max-width: 600px) { body.web .hero-precio { flex-wrap: wrap; row-gap: 2px; } body.web .hero-precio strong { font-size: 24px; width: 100%; } }
body.web .hero-precio.apilado { flex-direction: column; align-items: flex-start; gap: 2px; }
