/* ============ Huerto La Pirámide — Sistema de gestión ============ */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400..800&family=Instrument+Sans:ital,wght@0,400..700;1,400&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400..800&family=IBM+Plex+Mono:wght@400;500;600&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  --font-head: 'Bricolage Grotesque', sans-serif;
  --font-body: 'Instrument Sans', sans-serif;
}

/* ---- Tema Claro (default) ---- */
:root, [data-theme="claro"] {
  --bg: #F6F1E7;
  --bg-deep: #EFE8D9;
  --surface: #FFFFFF;
  --surface-2: #FBF8F1;
  --ink: #1E332B;
  --ink-soft: #5C6F66;
  --ink-faint: #93A29A;
  --line: #E4DCCB;
  --line-strong: #CFC5AE;
  --accent: #1E6B52;
  --accent-ink: #FFFFFF;
  --accent-soft: #DCEBE0;
  --glacier: #6FBEE0;
  --glacier-soft: #E2F1F8;
  --warn: #C2542C;
  --warn-soft: #F9E5DC;
  --ok: #3E7D32;
  --soil: #B89B72;
  --grass: #A8C686;
  --shadow: 0 1px 2px rgba(30,51,43,.06), 0 8px 24px rgba(30,51,43,.07);
  --header-bg: linear-gradient(180deg, #FFFFFF 0%, #FDFBF6 100%);
  --scene-sky: linear-gradient(180deg, #CDE9F5 0%, #EAF5EC 60%, #F6F1E7 100%);
}

/* ---- Tema Oscuro: centro de control ---- */
[data-theme="oscuro"] {
  --bg: #0E1714;
  --bg-deep: #0A110F;
  --surface: #16221D;
  --surface-2: #1C2A24;
  --ink: #E8F0EA;
  --ink-soft: #9FB3A8;
  --ink-faint: #6B7F74;
  --line: #24352D;
  --line-strong: #335043;
  --accent: #4DC58F;
  --accent-ink: #07130D;
  --accent-soft: #1D3A2E;
  --glacier: #6FBEE0;
  --glacier-soft: #15303C;
  --warn: #E8845B;
  --warn-soft: #3A241A;
  --ok: #7BC96A;
  --soil: #8A744F;
  --grass: #4C6B3F;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.45);
  --header-bg: linear-gradient(180deg, #131E19 0%, #0E1714 100%);
  --scene-sky: linear-gradient(180deg, #14242C 0%, #11201A 60%, #0E1714 100%);
}

/* ---- Tema Patagonia: claro con ambiente ---- */
[data-theme="patagonia"] {
  --bg: #F2F4EE;
  --bg-deep: #E8ECE2;
  --surface: #FFFFFF;
  --surface-2: #F7F9F3;
  --ink: #20342C;
  --ink-soft: #5E7168;
  --ink-faint: #97A69D;
  --line: #DFE5D8;
  --line-strong: #C4CFBB;
  --accent: #2C7A5B;
  --accent-ink: #FFFFFF;
  --accent-soft: #DFEDE3;
  --glacier: #5EB3DB;
  --glacier-soft: #DFF0F9;
  --warn: #C2542C;
  --warn-soft: #F9E5DC;
  --ok: #3E7D32;
  --soil: #B89B72;
  --grass: #9DBF7C;
  --shadow: 0 1px 2px rgba(32,52,44,.06), 0 8px 24px rgba(32,52,44,.08);
  --header-bg: linear-gradient(135deg, #BFE3F2 0%, #DDEFE0 55%, #F2F4EE 100%);
  --scene-sky: linear-gradient(180deg, #A9D9EF 0%, #DCEFE0 55%, #F2F4EE 100%);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-head); margin: 0; }

/* ---------- Shell ---------- */
.app-header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  display: flex; flex-direction: column;
  position: sticky; top: 0; z-index: 40;
}
/* Movimientos de la app: curvas de resorte (como en iOS) calculadas de un resorte amortiguado.
   --resorte: rebote leve (paneles); --vivo: rebote marcado (íconos y la marca de la sección); --suave: sin rebote,
   para lo que mueve el contenido de la página. Los navegadores sin linear() usan la cubic-bezier de respaldo. */
:root {
  --resorte: cubic-bezier(.3, 1.2, .5, 1);
  --vivo: cubic-bezier(.3, 1.45, .5, 1);
  --suave: cubic-bezier(.2, .8, .2, 1);
}
@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --resorte: linear(0, 0.03, 0.105, 0.209, 0.326, 0.446, 0.562, 0.668, 0.761, 0.84, 0.905, 0.955, 0.993, 1.021, 1.039, 1.049, 1.054, 1.054, 1.051, 1.046, 1.04, 1.034, 1.027, 1.021, 1.016, 1.011, 1.007, 1.004, 1.001, 1, 0.998, 0.998, 0.997, 0.997, 0.997, 0.997, 0.998, 0.998, 0.998, 0.999, 1);
    --vivo: linear(0, 0.029, 0.104, 0.209, 0.331, 0.457, 0.58, 0.694, 0.795, 0.881, 0.951, 1.005, 1.045, 1.072, 1.087, 1.094, 1.094, 1.089, 1.08, 1.069, 1.057, 1.045, 1.034, 1.024, 1.015, 1.007, 1.002, 0.997, 0.994, 0.992, 0.991, 0.991, 0.991, 0.992, 0.993, 0.994, 0.995, 0.996, 0.997, 0.998, 1);
    --suave: linear(0, 0.057, 0.18, 0.32, 0.455, 0.572, 0.671, 0.75, 0.812, 0.86, 0.896, 0.924, 0.944, 0.959, 0.971, 0.979, 0.985, 0.989, 0.992, 0.994, 0.996, 0.997, 0.998, 0.999, 1);
  }
}

/* Barra izquierda: las 4 secciones principales (Plan general, Comercial, Operaciones, Reportería).
   Recogida: solo el logo y un círculo por sección (el activo, relleno). Al pasar el mouse se despliega
   por encima de la pantalla y muestra los nombres; no empuja el contenido.
   Guardada (clic en el logo, .rail-guardado): el panel se encoge hasta quedar en el círculo del logo, arriba a la izquierda,
   y la pantalla usa todo el ancho. --rail-w es el ancho que la barra le quita a la pantalla. */
.app-shell { display: flex; align-items: flex-start; min-height: 100vh; --rail-w: 72px; }
.app-shell.rail-guardado { --rail-w: 0px; }
.app-col { flex: 1; min-width: 0; }
.rail { flex: none; width: var(--rail-w); position: sticky; top: 0; align-self: flex-start; height: 100vh; z-index: 45; transition: width .66s var(--suave); }
.rail-panel {
  position: absolute; top: 0; left: 0; bottom: 0; width: 72px; overflow: hidden;
  display: flex; flex-direction: column; align-items: flex-start; gap: 22px; padding: 16px 12px;
  background: var(--header-bg); border-right: 1px solid var(--line);
  clip-path: inset(0 -48px 0 0 round 0);
  transition: width .74s var(--resorte), box-shadow .3s, clip-path .74s var(--resorte);
}
.rail:hover .rail-panel, .rail:has(:focus-visible) .rail-panel { width: 212px; box-shadow: 14px 0 36px -18px rgba(14,23,20,.35); }

/* Logo con vida: aro que gira, brillo que respira y un balanceo suave. Es también el botón que guarda la barra */
.rail-logo {
  display: flex; align-items: center; gap: 12px; flex: none; width: 100%; white-space: nowrap;
  padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: 28px;
  transition: translate .74s var(--resorte), scale .6s var(--vivo);
}
.rail-logo:hover { scale: 1.04; }
.rail-logo:active { scale: .94; }
.rail-logo:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rail-logo-b { display: none; z-index: 2; }
.rail-logo-img { position: relative; flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; animation: railFlota 5s ease-in-out infinite; }
.rail-logo-img::before {
  content: ''; position: absolute; inset: -3px; border-radius: 50%; z-index: 0;
  background: conic-gradient(from 0deg, var(--accent), #7FD0EE, #F2C94C, var(--accent));
  animation: railGira 6s linear infinite;
}
.rail-logo-img::after {
  content: ''; position: absolute; inset: -9px; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, color-mix(in oklab, var(--accent) 38%, transparent) 0%, transparent 68%);
  animation: railLatido 3.2s ease-in-out infinite;
}
.rail-logo-img img { position: relative; z-index: 1; width: 100%; height: 100%; border-radius: 50%; background: #fff; border: 2.5px solid var(--surface); box-sizing: border-box; }
.rail-logo-t { display: flex; flex-direction: column; gap: 1px; opacity: 0; transition: opacity .15s; }
.rail-logo-t b { font-family: var(--font-head); font-weight: 700; font-size: 16px; letter-spacing: .01em; color: var(--ink); }
.rail-logo-t i { font-style: normal; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
@keyframes railGira { to { transform: rotate(360deg); } }
@keyframes railLatido { 0%, 100% { opacity: .55; transform: scale(.94); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes railFlota { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
@media (prefers-reduced-motion: reduce) { .rail-logo-img, .rail-logo-img::before, .rail-logo-img::after { animation: none; } }

.rail-nav { position: relative; display: flex; flex-direction: column; gap: 10px; width: 100%; }
.rail-i {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 0; border: 0; background: transparent;
  color: var(--ink-soft); font-family: var(--font-head); cursor: pointer; text-align: left; white-space: nowrap; border-radius: 28px;
  /* Al volver a mostrar la barra, los íconos salen del logo uno tras otro */
  transition: opacity .3s var(--suave), translate .6s var(--vivo), scale .6s var(--vivo);
  transition-delay: calc(var(--i, 0) * 45ms + 60ms);
}
.rail-ic {
  position: relative; flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  transition: background .2s, color .2s, transform .45s var(--vivo);
}
.rail-i:not(.on):hover .rail-ic { background: var(--accent-soft); color: var(--ink); }
.rail-i:active .rail-ic { transform: scale(.9); transition-duration: .1s; }
.rail-i:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* El círculo verde de la sección activa es uno solo (.rail-ind) que se desliza; el ícono se vuelve blanco cuando llega */
.rail-i.on .rail-ic { color: var(--accent-ink); transition: color .2s .12s, transform .45s var(--vivo); }
.rail-i.on { color: var(--ink); }
.rail-i .ri-clip { fill: var(--surface); transition: fill .2s .12s; }
.rail-i.on .ri-clip { fill: var(--accent); }
/* Efecto líquido: el borde que va adelante parte primero y el de atrás lo alcanza, así la marca se estira al moverse */
.rail-ind {
  position: absolute; left: 0; width: 48px; border-radius: 24px; pointer-events: none;
  top: calc(var(--i) * 58px); bottom: calc((var(--n) - 1 - var(--i)) * 58px);
  background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), 0 6px 14px -4px color-mix(in oklab, var(--accent) 65%, transparent);
  transition: top .62s var(--vivo) .07s, bottom .5s var(--vivo), opacity .3s var(--suave), scale .6s var(--vivo);
}
.rail-ind.sube { transition: top .5s var(--vivo), bottom .62s var(--vivo) .07s, opacity .3s var(--suave), scale .6s var(--vivo); }
.rail-t, .rail-logo-t { pointer-events: none; }
.rail-t { font-weight: 700; font-size: 14px; letter-spacing: .01em; opacity: 0; transition: opacity .15s; }
.rail:hover .rail-t, .rail:has(:focus-visible) .rail-t, .rail:hover .rail-logo-t, .rail:has(:focus-visible) .rail-logo-t { opacity: 1; transition-delay: .08s; }
.rail-b { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--warn); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; font-variant-numeric: tabular-nums; border: 2px solid var(--surface); box-sizing: content-box; line-height: 1; }

/* Barra guardada (solo en computador; en el celular la barra va abajo y no se guarda) */
@media (min-width: 761px) {
  /* El panel se recoge hasta un círculo de 60 px alrededor del logo, centrado en la altura de la cabecera */
  .rail-guardado .rail-panel, .rail-guardado .rail:hover .rail-panel, .rail-guardado .rail:has(:focus-visible) .rail-panel {
    width: 72px; box-shadow: none; clip-path: inset(-1px 6px calc(100% - 59px) 6px round 30px);
  }
  .rail-guardado .rail-logo { translate: 0 -11px; scale: .86; }
  .rail-guardado .rail-logo:hover { scale: .92; }
  .rail-guardado .rail-logo:active { scale: .8; }
  .rail-guardado .rail-logo-b { display: grid; top: 0; right: 0; }
  .rail-guardado .rail-logo-t, .rail-guardado .rail:hover .rail-logo-t, .rail-guardado .rail:has(:focus-visible) .rail-logo-t { opacity: 0; transition-delay: 0s; }
  /* Los íconos se recogen hacia el logo; después dejan de ser alcanzables con el teclado */
  .rail-guardado .rail-nav { visibility: hidden; transition: visibility 0s .5s; }
  .rail-guardado .rail-i, .rail-guardado .rail-ind { opacity: 0; translate: 0 -24px; scale: .6; transition-delay: 0s; }
  /* La cabecera deja espacio al círculo del logo */
  .rail-guardado .app-subnav { padding-left: 80px; }
}

/* Sub-nav (fila 2) */
.app-subnav {
  display: flex; align-items: center; gap: 2px;
  padding: 0 24px; min-height: 58px;
  transition: padding-left .66s var(--suave);
}
.subnav-sec {
  font-family: var(--font-head); font-weight: 600; font-size: 11px;
  color: var(--ink-faint); letter-spacing: .08em; text-transform: uppercase;
  white-space: nowrap; padding-right: 10px;
}
.subnav-div { width: 1px; height: 16px; background: var(--line-strong); margin: 0 8px 0 2px; flex-shrink: 0; }
.subtab {
  font-family: var(--font-head); font-weight: 600; font-size: 13px;
  color: var(--ink-soft); background: transparent; border: none;
  border-radius: 8px; padding: 5px 13px; cursor: pointer;
  transition: background .12s, color .12s;
}
.tab { font-family: var(--font-head); font-weight: 600; font-size: 13px; color: var(--ink-soft); background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 6px 14px; cursor: pointer; transition: background .12s, color .12s; }
.tab:hover { background: var(--accent-soft); color: var(--ink); }
.tab.active { background: var(--accent-soft); color: var(--accent); font-weight: 700; border-color: color-mix(in oklab, var(--accent) 30%, transparent); }
.subtab:hover { background: var(--accent-soft); color: var(--ink); }
.subtab.active { background: var(--accent-soft); color: var(--accent); font-weight: 700; }

.header-right { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; min-width: 0; padding-left: 12px; }
.header-right > * { flex: none; }
/* El encabezado tiene muchas acciones: por debajo de 1600px (con la barra izquierda) las secundarias quedan solo con su ícono */
@media (max-width: 1600px) {
  .header-right .btn.ghost.sm svg { margin-right: 0 !important; }
  .header-right .btn.ghost.sm { font-size: 0; padding: 7px 9px; gap: 0; }
  .header-right .tema-toggle .tt-label { display: none; }
}
@media (max-width: 1350px) {
  .header-right .btn.danger.sm { font-size: 0; padding: 7px 9px; }
  .header-right .btn.danger.sm:after { content: '🧹'; font-size: 13px; }
}

/* Toggle de tema en el header */
.tema-toggle {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-head); font-weight: 600; font-size: 12.5px;
  color: var(--ink-soft); background: var(--surface-2);
  border: 1px solid var(--line-strong); border-radius: 20px;
  padding: 5px 12px; cursor: pointer;
  transition: background .15s, color .15s;
}
.tema-toggle:hover { background: var(--accent-soft); color: var(--ink); }
.tt-icon { font-size: 13px; }
.tt-label { letter-spacing: .02em; }
.week-chip {
  display: flex; flex-direction: column; align-items: flex-end;
  font-size: 11px; color: var(--ink-soft); line-height: 1.25;
}
.week-chip b { font-size: 14px; color: var(--ink); font-family: var(--font-head); }

.main { padding: 22px 24px 60px; max-width: 1500px; margin: 0 auto; }
/* Al cambiar de pantalla, la nueva entra con un leve ascenso. Solo mientras dura la entrada (sin «forwards»):
   después no deja transformaciones puestas que descoloquen las ventanas fijas de la pantalla */
.main > *, .vz-cuerpo > * { animation: vistaEntra .5s var(--suave) backwards; }
@keyframes vistaEntra { from { opacity: 0; translate: 0 12px; } }
@media (prefers-reduced-motion: reduce) {
  .main > *, .vz-cuerpo > * { animation: none; }
  .rail, .rail-panel, .rail-logo, .rail-i, .rail-ic, .rail-ind, .app-subnav, .asis-wrap { transition-duration: .01s !important; transition-delay: 0s !important; }
}

/* ---------- Cards / panels ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.card-h {
  padding: 14px 18px 0;
  display: flex; align-items: baseline; gap: 10px;
}
.card-h h3 { font-size: 16px; font-weight: 700; }
.card-h .sub { font-size: 12.5px; color: var(--ink-soft); }
.card-b { padding: 14px 18px 18px; }

/* ---------- Buttons & inputs ---------- */
.btn {
  font-family: var(--font-head); font-weight: 600; font-size: 14px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  border-radius: 10px; padding: 9px 16px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  transition: transform .08s ease, background .15s ease;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.08); background: var(--accent); }
.btn.danger { color: var(--warn); border-color: var(--warn); background: transparent; }
.btn.sm { padding: 5px 10px; font-size: 12.5px; border-radius: 8px; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--ink-soft); }
.btn.ghost:hover { background: var(--accent-soft); color: var(--ink); }

.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 12px; font-weight: 600; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .06em; }
.field input, .field select, .field textarea {
  font-family: var(--font-body); font-size: 15px; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--line-strong);
  border-radius: 10px; padding: 10px 12px; outline: none; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .03em;
  border-radius: 999px; padding: 3px 10px;
  background: var(--accent-soft); color: var(--accent);
}
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.glacier { background: var(--glacier-soft); color: var(--ink); }
.badge.neutral { background: var(--bg-deep); color: var(--ink-soft); }

.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }

/* ---------- Consola de cálculo ---------- */
.console {
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 12.8px; line-height: 1.7;
  padding: 14px 16px;
  min-height: 130px; max-height: 320px; overflow-y: auto;
  color: var(--ink-soft);
}
[data-theme="oscuro"] .console { background: #0A110F; }
.console .ln { opacity: 0; animation: lnIn .3s ease forwards; white-space: pre-wrap; }
@keyframes lnIn { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.console .ln b { color: var(--ink); font-weight: 600; }
.console .ln.ok { color: var(--ok); }
.console .ln.err { color: var(--warn); font-weight: 600; }
.console .ln.head { color: var(--accent); font-weight: 700; }

/* ---------- Gantt ---------- */
.gantt-wrap { overflow: auto; max-height: 460px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.gantt { border-collapse: collapse; font-size: 11px; }
.gantt th, .gantt td { padding: 0; border: none; }
.gantt thead th {
  background: var(--surface-2); color: var(--ink-soft);
  font-weight: 600; min-width: 17px;
}
.gantt thead tr.month-row th.mcol {
  position: sticky; top: 0; z-index: 3;
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--ink);
  padding: 6px 0 5px; height: 24px;
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line-strong);
}
.gantt thead tr.week-row th {
  position: sticky; top: 30px; z-index: 3;
  font-size: 9.5px; font-weight: 600; padding: 3px 0 4px;
  border-bottom: 1px solid var(--line-strong);
}
.gantt thead tr.week-row th.mstart { border-left: 1px solid var(--line-strong); }
.gantt thead th.cur { background: var(--glacier-soft); color: var(--ink); }
.gantt thead tr.month-row th.mcol.cur { color: var(--accent); }
.gantt .rowname {
  position: sticky; left: 0; z-index: 2;
  background: var(--surface); color: var(--ink);
  font-weight: 600; font-size: 11.5px;
  padding: 0 10px; white-space: nowrap;
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
}
.gantt thead .rowname { position: sticky; top: 0; left: 0; z-index: 5; background: var(--surface-2); vertical-align: middle; border-bottom: 1px solid var(--line-strong); }
.gantt .cell { min-width: 17px; height: 20px; border-bottom: 1px solid var(--line); border-right: 1px dotted var(--line); position: relative; }
.gantt .cell.cur { background: var(--glacier-soft); }
.gantt .cell.mstart { border-left: 1px solid var(--line); }
.gantt .cell .blk { position: absolute; inset: 2px 0; }
.gantt .cell .blk.start { border-radius: 5px 0 0 5px; inset: 2px 0 2px 2px; }
.gantt .cell .blk.end { border-radius: 0 5px 5px 0; inset: 2px 2px 2px 0; }
.gantt .cell .blk.solo { border-radius: 5px; inset: 2px; }
.gantt .cell .blk.prep { opacity: .45; background-image: repeating-linear-gradient(-45deg, transparent 0 3px, rgba(255,255,255,.55) 3px 6px); }
.gantt .cell .blk.nuevo { animation: blkPulse 1.6s ease 3; }
@keyframes blkPulse { 0%,100% { filter: brightness(1); } 50% { filter: brightness(1.45); } }

/* ---------- Escena 3D ---------- */
.scene-wrap {
  position: relative; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--line);
  background: var(--scene-sky);
}
.scene-wrap svg { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.scene-wrap svg.panning { cursor: grabbing; }
/* Pantalla completa: el cuadro cubre la ventana (y la pantalla, si el navegador lo permite) */
.scene-wrap.completa { position: fixed; inset: 0; z-index: 9990; width: auto; height: auto !important; min-height: 0 !important; border: 0; border-radius: 0; }
.scene-wrap:fullscreen { width: 100vw; height: 100vh !important; }
.scene-tools .btn svg { width: 15px; height: 15px; }
.scene-tools .btn.activo { border-color: var(--accent); color: var(--accent); }
/* Clima en vivo sobre la maqueta (pantalla completa) */
.clima-hud { position: absolute; left: 12px; top: 12px; z-index: 5; width: 262px; max-height: calc(100% - 96px); overflow: auto; padding: 12px 14px 10px; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in oklab, var(--surface) 92%, transparent); backdrop-filter: blur(6px); color: var(--ink); font-size: 12.5px; line-height: 1.35; box-shadow: 0 6px 22px rgba(15, 34, 24, .16); }
.clima-hud .ch-cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.clima-hud .ch-cab b { font-family: var(--font-head); font-size: 14px; }
.clima-hud .ch-estado { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: var(--accent); }
.clima-hud .ch-estado i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: chLatido 1.8s ease-in-out infinite; }
.clima-hud .ch-estado.viejo { color: var(--warn); }
.clima-hud .ch-estado.viejo i { animation: none; }
@keyframes chLatido { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.clima-hud .ch-temp b { display: block; font-family: var(--font-head); font-size: 30px; line-height: 1.05; }
.clima-hud .ch-temp b small, .clima-hud .ch-v small { font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.clima-hud .ch-temp span { color: var(--ink-soft); font-size: 11.5px; }
.clima-hud .ch-avisos { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 0; }
.clima-hud .ch-aviso { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: color-mix(in oklab, var(--glacier) 22%, transparent); }
.clima-hud .ch-aviso.mal { background: color-mix(in oklab, var(--warn) 24%, transparent); color: var(--ink); }
.clima-hud .ch-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; margin: 10px 0 0; padding-top: 9px; border-top: 1px solid var(--line); }
.clima-hud .ch-celda { display: flex; flex-direction: column; min-width: 0; }
.clima-hud .ch-k { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); }
.clima-hud .ch-v { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-head); font-size: 17px; font-weight: 700; }
.clima-hud .ch-s { font-size: 11px; color: var(--ink-soft); }
.clima-hud .ch-flecha { width: 17px; height: 17px; color: var(--accent); flex: none; transition: transform .4s ease; }
.clima-hud .ch-hoy { display: flex; flex-direction: column; margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 11.5px; }
.clima-hud .ch-hoy span { color: var(--ink-soft); }
.clima-hud .ch-otros { margin-top: 8px; padding-top: 7px; border-top: 1px solid var(--line); font-size: 11.5px; }
.clima-hud .ch-otros div { display: flex; justify-content: space-between; gap: 8px; }
.clima-hud .ch-otros em { font-style: normal; color: var(--ink-soft); font-size: 10.5px; }
.clima-hud .ch-pie, .clima-hud .ch-nota { margin: 8px 0 0; font-size: 10.5px; color: var(--ink-soft); }
.clima-hud .ch-nota { font-size: 12px; margin: 4px 0 8px; }
.clima-hud .ch-der { display: inline-flex; align-items: center; gap: 8px; }
.clima-hud .ch-cerrar { width: 24px; height: 24px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink-soft); font-size: 15px; line-height: 1; cursor: pointer; }
.clima-hud .ch-cerrar:hover { background: var(--line); }
/* Pastilla chica y semitransparente; al apretarla se abre el panel entero */
.clima-hud.compacto { display: inline-flex; align-items: center; gap: 9px; width: auto; max-height: none; overflow: visible; padding: 6px 13px; border-radius: 999px; background: color-mix(in oklab, var(--surface) 76%, transparent); font: inherit; font-size: 12px; font-weight: 600; color: var(--ink); cursor: pointer; box-shadow: 0 3px 12px rgba(15, 34, 24, .12); }
.clima-hud.compacto:hover { background: color-mix(in oklab, var(--surface) 94%, transparent); }
.clima-hud.compacto b { font-family: var(--font-head); font-size: 14px; }
.clima-hud.compacto .ch-mini { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-soft); }
.clima-hud.compacto .ch-alerta { color: var(--warn); font-weight: 700; }
.clima-hud.compacto .ch-flecha { width: 13px; height: 13px; }
.scene-wrap .clima-chip { cursor: pointer; }
.scene-wrap .clima-chip:hover rect { fill-opacity: .96; }
@media (max-width: 700px) { .clima-hud { width: 206px; padding: 9px 10px 8px; font-size: 11.5px; } .clima-hud .ch-temp b { font-size: 24px; } .clima-hud .ch-v { font-size: 15px; } }
@media (prefers-reduced-motion: reduce) { .clima-hud .ch-estado i { animation: none; } .clima-hud .ch-flecha { transition: none; } }
.scene-tools {
  position: absolute; top: 12px; right: 12px; display: flex; flex-direction: column; gap: 6px; z-index: 5;
}
.scene-tools .btn { width: 34px; height: 34px; padding: 0; justify-content: center; font-size: 17px; }
.scene-tip {
  position: absolute; pointer-events: none; z-index: 6;
  background: var(--ink); color: var(--bg);
  font-size: 12px; line-height: 1.4; padding: 7px 10px; border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
  max-width: 230px;
}
[data-theme="oscuro"] .scene-tip { background: #E8F0EA; color: #0E1714; }
.scene-legend {
  position: absolute; left: 12px; bottom: 12px; z-index: 5;
  display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center;
  background: color-mix(in oklab, var(--surface) 86%, transparent);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line); border-radius: 10px; padding: 7px 12px;
  font-size: 11.5px; color: var(--ink-soft); max-width: 70%;
}
.scene-wrap .no-toca { pointer-events: none; }
.scene-wrap .cama { cursor: pointer; }
.scene-wrap svg.panning .cama { cursor: grabbing; }
.scene-wrap .cama:hover .cama-top { stroke: #FFFFFF; stroke-width: .32; }
.scene-wrap .sector-et { cursor: pointer; }
.scene-wrap .sector-et:hover text { fill: #0B6B45; }
.scene-wrap .arbol-cerca { opacity: .55; }
.scene-wrap .escena-giro { animation: escenaGiro .4s ease; }
@keyframes escenaGiro { from { opacity: 0; } to { opacity: 1; } }
.scene-norte { position: absolute; right: 12px; bottom: 12px; z-index: 5; line-height: 0; pointer-events: auto; }
.scene-norte svg { width: 38px; height: 38px; cursor: default; }
@media (prefers-reduced-motion: reduce) { .scene-wrap .escena-giro { animation: none; } }
.cama-pulse { animation: camaPulse 1.4s ease 4; }
@keyframes camaPulse { 0%,100% { filter: brightness(1); } 50% { filter: brightness(1.6); } }

/* ---------- Scrubber semanas ---------- */
.scrubber { display: flex; align-items: center; gap: 12px; padding: 10px 4px 2px; }
.scrubber input[type="range"] { flex: 1; accent-color: var(--accent); height: 24px; }
.scrubber .wk { font-family: var(--font-head); font-weight: 700; font-size: 14px; min-width: 118px; text-align: right; }
.scrubber .wk small { display: block; font-family: var(--font-body); font-weight: 400; font-size: 11px; color: var(--ink-soft); }

/* ---------- Kanban CRM ---------- */
.kanban { display: grid; grid-template-columns: repeat(var(--kcols, 4), minmax(218px, 1fr)); gap: 12px; overflow-x: auto; align-items: start; }
.kcol { background: var(--bg-deep); border: 1px solid var(--line); border-radius: 14px; padding: 10px; min-height: 200px; }
.kcol-h { display: flex; align-items: center; gap: 8px; padding: 2px 6px 10px; font-family: var(--font-head); font-weight: 700; font-size: 13.5px; }
.kcol-sel { display: flex; align-items: center; gap: 8px; margin: 0 2px 8px; padding: 6px 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; font-size: 11.5px; color: var(--ink-soft); }
.kcol-sel label { display: flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 600; }
.kcol-sel input { accent-color: var(--accent, #1E6B52); width: 14px; height: 14px; cursor: pointer; }
.kcol-go { margin-left: auto; font-family: inherit; font-size: 11px; font-weight: 600; line-height: 1; background: var(--accent, #1E6B52); color: #fff; border: none; border-radius: 999px; padding: 5px 10px; cursor: pointer; white-space: nowrap; }
.kcol-go:hover { filter: brightness(1.12); }
.kc-pago { display: flex; align-items: center; gap: 6px; width: 100%; margin: 2px 0 8px; padding: 5px 8px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--ink-soft); font-family: inherit; font-size: 11px; font-weight: 600; line-height: 1; cursor: pointer; }
.kc-pago .d { width: 7px; height: 7px; border-radius: 50%; background: var(--warn, #C97A2B); }
.kc-pago.ok { color: var(--accent, #1E6B52); border-color: color-mix(in oklab, var(--accent, #1E6B52) 40%, transparent); background: color-mix(in oklab, var(--accent, #1E6B52) 8%, transparent); }
.kc-pago.ok .d { background: var(--accent, #1E6B52); }
.kc-pago:hover { border-color: var(--ink-faint); }
.karrow.sii.fac { color: var(--accent, #1E6B52); border-color: color-mix(in oklab, var(--accent, #1E6B52) 45%, transparent); background: color-mix(in oklab, var(--accent, #1E6B52) 8%, transparent); }
.karrow.sii { display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; width: auto; text-decoration: none; font-family: inherit; font-size: 9.5px; font-weight: 700; line-height: 1; letter-spacing: .04em; padding: 0 8px; }
.kcol-pagos { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 2px 8px; }
.kcol-pagos .pg { flex: 1 1 92px; min-width: 0; display: flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-size: 11px; font-weight: 600; color: var(--ink-faint); }
.kcol-pagos .pg .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kcol-pagos .pg i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.kcol-pagos .pg.ok { color: var(--accent, #1E6B52); }
.kcol-pagos .pg.pend { color: var(--warn, #C97A2B); border-color: color-mix(in oklab, var(--warn, #C97A2B) 35%, transparent); background: color-mix(in oklab, var(--warn, #C97A2B) 9%, transparent); }
.pago-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-left: 6px; background: var(--warn, #C97A2B); vertical-align: middle; }
.pago-dot.ok { background: var(--accent, #1E6B52); }
.kc-acts { display: flex; align-items: center; gap: 4px; margin-top: 6px; }
.kc-acts .karrow.sii { margin-right: auto; }
.kc-foot .badge { white-space: nowrap; }
.kc-val { font-size: 11.5px; font-weight: 700; color: var(--ink); }
.hist-filtros { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.hist-filtros .hf { display: flex; flex-direction: column; gap: 4px; }
.hist-filtros .hf label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); }
.hist-filtros .hf input, .hist-filtros .hf select { font-family: var(--font-body); font-size: 14px; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 9px; padding: 7px 10px; outline: none; }
.hist-filtros .hf input:focus, .hist-filtros .hf select:focus { border-color: var(--accent); }
.hist-filtros .hf input { width: 116px; }
.hist-filtros .hf select { min-width: 148px; }
.hist-actual td { background: color-mix(in oklab, var(--accent, #1E6B52) 6%, transparent); }
.hist-hoy { margin-left: 6px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent, #1E6B52); }
.hist-bar { display: block; height: 7px; border-radius: 999px; background: var(--bg-deep); overflow: hidden; }
.hist-bar i { display: block; height: 100%; background: var(--accent, #1E6B52); border-radius: 999px; }
.hist-cli { cursor: pointer; font-weight: 600; }
.hist-cli:hover { color: var(--accent, #1E6B52); text-decoration: underline; }
.crm-semana { display: flex; align-items: stretch; gap: 2px; padding: 3px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.crm-semana button { font-family: inherit; background: transparent; border: none; border-radius: 7px; cursor: pointer; color: var(--ink); }
.crm-semana .cs-nav { width: 26px; font-size: 15px; line-height: 1; color: var(--ink-soft); }
.crm-semana .cs-lbl.on { background: color-mix(in oklab, var(--accent, #1E6B52) 10%, transparent); }
.crm-semana .cs-lbl { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 3px 10px; min-width: 168px; }
.crm-semana .cs-lbl b { font-size: 12.5px; }
.crm-semana .cs-lbl span { font-size: 10.5px; color: var(--ink-soft); }
.crm-semana .cs-hoy, .crm-semana .cs-rep { padding: 0 9px; font-size: 11px; font-weight: 600; color: var(--accent, #1E6B52); }
.crm-semana button:hover { background: var(--bg-deep); }
.ped-items { display: flex; flex-direction: column; gap: 6px; }
.ped-row { display: grid; grid-template-columns: 1fr 76px 90px 84px 30px; gap: 8px; align-items: center; }
.ped-row.head { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); }
.ped-row .sub { font-size: 12px; font-weight: 600; text-align: right; }
.ped-total { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.ped-total span { margin-left: auto; font-size: 12.5px; color: var(--ink-soft); }
.ped-total b { font-size: 15px; color: var(--ink); margin-left: 6px; }
.kc-doc { cursor: pointer; background: transparent; border: 1px solid var(--line); font-family: inherit; font-size: 9px; font-weight: 700; line-height: 1; letter-spacing: .06em; border-radius: 3px; padding: 3px 4px; flex: none; }
.kc-doc.bol { color: var(--ink-soft); }
.kc-doc:hover { border-color: var(--ink-faint); }
.kc-doc.fac { color: var(--accent, #1E6B52); border: 1px solid color-mix(in oklab, var(--accent, #1E6B52) 45%, transparent); background: color-mix(in oklab, var(--accent, #1E6B52) 8%, transparent); }
.kc-chk { accent-color: var(--accent, #1E6B52); width: 14px; height: 14px; cursor: pointer; flex: none; }
.kcard.sel { border-color: var(--accent, #1E6B52); box-shadow: 0 0 0 2px color-mix(in oklab, var(--accent, #1E6B52) 22%, transparent); }
.kcol-pdf { font-family: inherit; font-size: 11px; font-weight: 600; line-height: 1; color: var(--accent, #1E6B52); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 8px; cursor: pointer; white-space: nowrap; }
.kcol-pdf:hover:not(:disabled) { background: var(--accent, #1E6B52); color: #fff; border-color: transparent; }
.kcol-pdf:disabled { opacity: .4; cursor: default; }
.kcol-h .count { margin-left: auto; font-size: 11.5px; color: var(--ink-soft); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }
.kcard {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 12px; margin-bottom: 8px; box-shadow: var(--shadow);
  font-size: 13px;
}
.kcard .kc-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.kcard .kc-name { font-weight: 700; font-family: var(--font-head); font-size: 13.5px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kcard .kc-items { color: var(--ink-soft); font-size: 12.3px; line-height: 1.5; }
.kcard .kc-foot { display: flex; align-items: center; gap: 6px; margin-top: 9px; }
.kcard .kc-foot .spacer { flex: 1; }
.karrow { border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--ink); border-radius: 8px; width: 26px; height: 26px; cursor: pointer; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }
.karrow:hover { background: var(--accent-soft); }
.karrow:disabled { opacity: .3; cursor: default; }

/* ---------- Tablas ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-soft); padding: 8px 10px; border-bottom: 1px solid var(--line-strong); }
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:hover td { background: var(--surface-2); }
.tbl input, .tbl select {
  font-family: var(--font-body); font-size: 13.5px; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--line-strong);
  border-radius: 8px; padding: 6px 8px; width: 100%;
}

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); }
.kpi .v { font-family: var(--font-head); font-weight: 800; font-size: 26px; line-height: 1.1; }
.kpi .l { font-size: 12px; color: var(--ink-soft); margin-top: 3px; }

/* ---------- Modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(14,23,20,.45); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: var(--surface); border-radius: 18px; box-shadow: 0 24px 60px rgba(0,0,0,.3); width: 520px; max-width: 100%; max-height: 90vh; overflow-y: auto; padding: 22px; }
.modal h3 { margin-bottom: 14px; }

/* ---------- Alert banners ---------- */
.banner { border-radius: 12px; padding: 12px 14px; font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start; }
.banner.warn { background: var(--warn-soft); color: var(--warn); border: 1px solid color-mix(in oklab, var(--warn) 30%, transparent); }
.banner.ok { background: var(--accent-soft); color: var(--accent); border: 1px solid color-mix(in oklab, var(--accent) 25%, transparent); }
.banner.info { background: var(--surface-2); color: var(--ink-soft); border: 1px solid var(--line-strong); }

/* ---------- Banda de periodos en el Gantt ---------- */
.gantt tbody.periodos-band .periodo-row td { border-bottom: 1px solid var(--line); }
.gantt tbody.periodos-band .periodo-row:last-child td { border-bottom: 2px solid var(--line-strong); }
.gantt .periodo-name {
  background: var(--surface-2); font-weight: 600; font-size: 11px;
  border-right: 1px solid var(--line-strong); white-space: nowrap;
}
.gantt .periodo-label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; padding: 3px 0; }
.gantt .periodo-label:hover .periodo-pen { opacity: 1; }
.periodo-sw { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.periodo-rango { color: var(--ink-faint); font-weight: 500; font-size: 10px; }
.periodo-pen { opacity: .35; font-size: 10px; margin-left: 1px; }
.periodo-edit { display: inline-flex; align-items: center; gap: 4px; }
.periodo-edit input { width: 38px; padding: 3px 5px; font-size: 11px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--ink); text-align: center; }
.periodo-cell { min-width: 17px; height: 16px; border-right: 1px dotted var(--line); position: relative; }
.periodo-cell.on { opacity: .85; }
.periodo-cell.cur { box-shadow: inset 0 0 0 99px color-mix(in oklab, var(--glacier) 22%, transparent); }

/* periodo pills (vista Semana) */
.periodo-pill { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: 999px; color: #fff; background: var(--pc); }

/* ---------- Perfil de cliente ---------- */
.perfil-back { margin-bottom: 14px; }
.perfil-card { margin-bottom: 16px; }
.perfil-id { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; position: relative; }
.perfil-id h2 { font-family: var(--font-head); font-size: 21px; font-weight: 800; }
.perfil-id-meta { display: flex; gap: 16px; font-size: 13px; color: var(--ink-soft); }
.perfil-id-meta a { color: var(--accent); text-decoration: none; }
.perfil-nota { flex-basis: 100%; font-size: 13px; font-style: italic; color: var(--ink-soft); }
.perfil-del { margin-left: auto; }
.perfil-kpis { margin-bottom: 16px; }
.perfil-grid { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
.perfil-items span { display: inline-flex; align-items: center; gap: 5px; margin: 0 10px 4px 0; font-size: 12.5px; }
.perfil-sem { color: var(--ink-faint); font-size: 11px; }
.inv-grid { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .inv-grid { grid-template-columns: 1fr; } }
.inv-cul { display: flex; align-items: center; gap: 9px; }
.inv-fam { font-size: 11px; color: var(--ink-faint); font-weight: 400; }
.inv-sub { font-size: 11.5px; color: var(--ink-faint); }
.inv-alerts { display: flex; flex-direction: column; gap: 8px; }
.inv-alert-row { display: flex; align-items: center; gap: 10px; font-size: 13px; background: var(--warn-soft); border-radius: 10px; padding: 9px 12px; }
.inv-alert-detail { color: var(--ink-soft); }
.inv-alert-falta { margin-left: auto; font-family: var(--font-head); font-weight: 700; color: var(--warn); white-space: nowrap; }
.inv-mov { display: flex; flex-direction: column; gap: 2px; }
.inv-mov-row { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 8px 2px; border-bottom: 1px solid var(--line); }
.inv-mov-row:last-child { border-bottom: none; }
.inv-mov-kg { font-family: var(--font-head); font-weight: 700; color: var(--warn); white-space: nowrap; }
.inv-mov-motivo { color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.inv-mov-empty { color: var(--ink-soft); font-size: 13px; text-align: center; padding: 20px 0; }
.loc-filtros { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-left: auto; }
.loc-chip { display: flex; align-items: center; gap: 5px; font-family: inherit; font-size: 11.5px; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); cursor: pointer; }
.loc-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--lc, var(--ink-faint)); }
.loc-chip.vacia { border-style: dashed; color: var(--ink-faint); }
.loc-chip.on { border-color: var(--accent); background: color-mix(in oklab, var(--accent) 10%, transparent); color: var(--ink); font-weight: 600; }
.loc-chip .n { font-variant-numeric: tabular-nums; opacity: .6; }
.loc-edit { font-family: inherit; font-size: 11.5px; padding: 4px 9px; border-radius: 999px; border: 1px dashed var(--line-strong); background: transparent; color: var(--ink-soft); cursor: pointer; }
.loc-fila { display: flex; gap: 8px; align-items: center; }
.loc-fila input[type=color] { width: 34px; height: 34px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; }
.loc-fila input:not([type=color]) { flex: 1; }
.loc-fila input.por-definir { border-style: dashed; color: var(--ink-faint); font-style: italic; }
.cli-sel { font-family: inherit; font-size: 12px; padding: 3px 6px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-left: 3px solid var(--lc, var(--line)); min-width: 96px; max-width: 128px; }
.cli-row { cursor: pointer; }
.loc-filtros { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-left: auto; }
.loc-chip { display: flex; align-items: center; gap: 5px; font-family: inherit; font-size: 11.5px; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); cursor: pointer; }
.loc-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--lc, var(--ink-faint)); }
.loc-chip.vacia { border-style: dashed; color: var(--ink-faint); }
.loc-chip.on { border-color: var(--accent); background: color-mix(in oklab, var(--accent) 10%, transparent); color: var(--ink); font-weight: 600; }
.loc-chip .n { font-variant-numeric: tabular-nums; opacity: .6; }
.loc-edit { font-family: inherit; font-size: 11.5px; padding: 4px 9px; border-radius: 999px; border: 1px dashed var(--line-strong); background: transparent; color: var(--ink-soft); cursor: pointer; }
.loc-fila { display: flex; gap: 8px; align-items: center; }
.loc-fila input[type=color] { width: 34px; height: 34px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; }
.loc-fila input:not([type=color]) { flex: 1; }
.loc-fila input.por-definir { border-style: dashed; color: var(--ink-faint); font-style: italic; }
.cli-sel { font-family: inherit; font-size: 12px; padding: 3px 6px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-left: 3px solid var(--lc, var(--line)); min-width: 96px; max-width: 128px; }
.cli-row .cli-go { color: var(--ink-faint); font-size: 11px; margin-left: 7px; opacity: 0; transition: opacity .15s; }
.loc-filtros { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-left: auto; }
.loc-chip { display: flex; align-items: center; gap: 5px; font-family: inherit; font-size: 11.5px; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); cursor: pointer; }
.loc-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--lc, var(--ink-faint)); }
.loc-chip.vacia { border-style: dashed; color: var(--ink-faint); }
.loc-chip.on { border-color: var(--accent); background: color-mix(in oklab, var(--accent) 10%, transparent); color: var(--ink); font-weight: 600; }
.loc-chip .n { font-variant-numeric: tabular-nums; opacity: .6; }
.loc-edit { font-family: inherit; font-size: 11.5px; padding: 4px 9px; border-radius: 999px; border: 1px dashed var(--line-strong); background: transparent; color: var(--ink-soft); cursor: pointer; }
.loc-fila { display: flex; gap: 8px; align-items: center; }
.loc-fila input[type=color] { width: 34px; height: 34px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; }
.loc-fila input:not([type=color]) { flex: 1; }
.loc-fila input.por-definir { border-style: dashed; color: var(--ink-faint); font-style: italic; }
.cli-sel { font-family: inherit; font-size: 12px; padding: 3px 6px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-left: 3px solid var(--lc, var(--line)); min-width: 96px; max-width: 128px; }
.cli-row:hover .cli-go { opacity: 1; }
@media (max-width: 900px) { .perfil-grid { grid-template-columns: 1fr; } }

/* ---------- Vista Semana ---------- */
.semana-head .card-b { padding: 14px 18px; }
.semana-nav { display: flex; align-items: center; gap: 10px; }
.semana-big { text-align: center; min-width: 132px; line-height: 1.15; }
.semana-big b { font-family: var(--font-head); font-size: 19px; display: block; }
.semana-big span { font-size: 11.5px; color: var(--ink-soft); }
.semana-periodos { display: flex; gap: 6px; flex-wrap: wrap; }
.semana-rutina { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-soft); flex-wrap: wrap; }
.semana-rutina b { color: var(--accent); font-family: var(--font-head); }
.semana-rutina i { color: var(--ink-faint); font-style: normal; }

.semana-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 16px; margin-top: 16px; align-items: start; }
.tareas-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tarea-col { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface-2); }
.tarea-h { display: flex; align-items: center; gap: 9px; padding: 11px 12px; border-bottom: 1px solid var(--line); }
.tarea-ico { font-size: 18px; }
.tarea-t { font-family: var(--font-head); font-weight: 700; font-size: 13.5px; }
.tarea-d { font-size: 10.5px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .06em; }
.tarea-n { margin-left: auto; font-family: var(--font-head); font-weight: 800; font-size: 20px; color: var(--ink); }
.tarea-col.cos .tarea-n { color: var(--warn); }
.tarea-col.prep .tarea-n { color: var(--soil); }
.tarea-col.sie .tarea-n { color: var(--ok); }
.tarea-b { padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; min-height: 56px; }
.tarea-row { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 3px 2px; }
.tarea-cant { font-family: var(--font-head); font-weight: 800; font-size: 15px; min-width: 16px; }
.tarea-cul { flex: 1; }
.tarea-meta { font-size: 11.5px; color: var(--ink-soft); }
.tarea-vacio { font-size: 12px; color: var(--ink-faint); padding: 6px 2px; }

/* Sugerencias */
.sug-list { display: flex; flex-direction: column; gap: 8px; }
.sug-row { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; transition: border-color .12s ease; }
.sug-row.open { border-color: var(--accent); }
.sug-main { display: grid; grid-template-columns: 120px 1.3fr 1.1fr 1.4fr auto; gap: 12px; align-items: center; padding: 10px 14px; cursor: pointer; }
.sug-main:hover { background: var(--surface-2); }
.sug-row.compact .sug-main { grid-template-columns: 92px 1fr auto; }
.sug-cama b { font-family: var(--font-head); font-size: 15px; display: block; }
.sug-cama span { font-size: 11px; color: var(--ink-soft); }
.sug-prev { font-size: 12.5px; color: var(--ink); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sug-prev .muted { color: var(--ink-faint); }
.sug-top { display: flex; align-items: center; gap: 7px; font-size: 14px; }
.sug-score { font-family: var(--font-head); font-weight: 700; font-size: 12px; color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 1px 6px; }
.sug-alts { display: flex; gap: 5px; flex-wrap: wrap; }
.sug-chip { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-body); font-size: 12px; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px 9px; cursor: pointer; }
.sug-chip:hover { background: var(--accent-soft); border-color: var(--accent); }
.sug-go { white-space: nowrap; }
.dot.sm { width: 7px; height: 7px; }
.badge.sm { font-size: 10px; padding: 1px 7px; }
.badge.warn-b { background: var(--warn-soft); color: var(--warn); }
.sug-detalle { border-top: 1px dashed var(--line-strong); background: var(--surface-2); padding: 6px 14px 12px; }
.sug-d-row { display: grid; grid-template-columns: 150px 1fr auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.sug-d-row:last-child { border-bottom: none; }
.sug-d-cul { display: flex; align-items: center; gap: 7px; font-size: 13.5px; }
.sug-razones { display: flex; gap: 5px; flex-wrap: wrap; }
.razon { font-size: 11px; border-radius: 6px; padding: 2px 7px; background: var(--bg-deep); color: var(--ink-soft); }
.razon.g { background: var(--accent-soft); color: var(--accent); }
.razon.b { background: var(--warn-soft); color: var(--warn); }
.sug-foot { margin-top: 12px; font-size: 12px; color: var(--ink-soft); line-height: 1.5; max-width: 760px; }
.rend-cell { display: flex; align-items: center; gap: 6px; }
.rend-cell input { width: 64px; }
.rend-u { font-size: 11px; color: var(--ink-soft); white-space: nowrap; }

/* ---------- Tablero de producción (4 etapas) ---------- */
.etapas-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.etapas-n  { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.etapa-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface-2); }
.etapa-card .etapa-h { display: flex; align-items: center; gap: 9px; padding: 11px 12px; border-bottom: 1px solid var(--line); border-top: 3px solid var(--line-strong); }
.etapa-card.alm .etapa-h { border-top-color: var(--ok); }
.etapa-card.prep .etapa-h { border-top-color: var(--soil); }
.etapa-card.sie .etapa-h { border-top-color: var(--accent); }
.etapa-card.cos .etapa-h { border-top-color: var(--warn); }
.etapa-ico { font-size: 17px; }
.etapa-tt { min-width: 0; }
.etapa-t { font-family: var(--font-head); font-weight: 700; font-size: 12.5px; line-height: 1.15; }
.etapa-d { font-size: 10px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .05em; }
.etapa-n { margin-left: auto; font-family: var(--font-head); font-weight: 800; font-size: 19px; }
.etapa-card.alm .etapa-n { color: var(--ok); }
.etapa-card.prep .etapa-n { color: var(--soil); }
.etapa-card.sie .etapa-n { color: var(--accent); }
.etapa-card.pcos .etapa-h { border-top-color: #A569BD; }
.etapa-card.pcos .etapa-n { color: #A569BD; }
.etapa-b { padding: 8px 10px; display: flex; flex-direction: column; gap: 3px; flex: 1; min-height: 64px; }
.etapa-row { display: flex; align-items: center; gap: 7px; font-size: 12.5px; padding: 2px 1px; }
.etapa-cant { font-family: var(--font-head); font-weight: 800; font-size: 14px; min-width: 15px; }
.etapa-cul { flex: 1; display: flex; align-items: center; gap: 6px; min-width: 0; }
.met-tag { font-size: 9.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; border-radius: 5px; padding: 1px 5px; }
.met-tag.tras { background: var(--accent-soft); color: var(--accent); }
.met-tag.dir { background: var(--glacier-soft); color: var(--ink-soft); }

/* toggle Día/Semana + nav de días en producción */
.prod-toggle { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 9px; overflow: hidden; }
.prod-toggle button { border: none; background: var(--surface-2); color: var(--ink-soft); font-family: var(--font-body); font-size: 12px; font-weight: 600; padding: 6px 13px; cursor: pointer; }
.prod-toggle button.on { background: var(--accent); color: var(--accent-ink); }
.prod-days { display: flex; gap: 6px; padding: 0 18px 4px; flex-wrap: wrap; }
.pd-chip { display: flex; flex-direction: column; align-items: center; gap: 1px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 9px; padding: 5px 11px; cursor: pointer; min-width: 52px; }
.pd-chip span { font-family: var(--font-head); font-weight: 700; font-size: 12px; color: var(--ink); }
.pd-chip b { font-size: 10px; font-weight: 500; color: var(--ink-faint); }
.pd-chip:hover { border-color: var(--line-strong); }
.pd-chip.on { background: var(--accent-soft); border-color: var(--accent); }
.pd-chip.on span { color: var(--accent); }
.pd-chip.hoy { box-shadow: inset 0 -2px 0 var(--glacier); }

/* chips del cronograma dentro de los paneles de producción */
.etapa-crono { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; padding-top: 7px; border-top: 1px dashed var(--line-strong); }
.crono-mini { display: inline-flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--ct); border-radius: 6px; padding: 2px 6px; font-size: 10.5px; font-weight: 700; color: var(--ink); }
.crono-mini .cm-dia { font-weight: 800; color: var(--ink-faint); font-size: 9.5px; }
.crono-mini.done { opacity: .5; text-decoration: line-through; }

/* tachado de chips en el cronograma */
.cc-check { width: 0; overflow: hidden; color: var(--ok); font-weight: 800; cursor: pointer; transition: width .12s; }
.crono-chip.done .cc-check { width: 12px; }
.cc-code { cursor: pointer; }
.crono-chip.done { opacity: .55; }
.crono-chip.done .cc-code { text-decoration: line-through; }
.etapa-meta { font-size: 11px; color: var(--ink-soft); white-space: nowrap; }
.etapa-foot { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-top: 1px dashed var(--line-strong); background: var(--surface); }
.resp-pick { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.resp-av { width: 22px; height: 22px; border-radius: 50%; flex: none; color: #fff; font-family: var(--font-head); font-weight: 700; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
.resp-pick select { font-family: var(--font-body); font-size: 11.5px; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 8px; padding: 5px 6px; width: 100%; }
.wa-btn { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; background: #25D366; color: #06351A; border-color: #25D366; font-weight: 700; text-decoration: none; }
.wa-btn:hover { filter: brightness(1.05); background: #25D366; }
.wa-btn.disabled { background: var(--surface-2); color: var(--ink-faint); border-color: var(--line-strong); cursor: not-allowed; }
.wa-ico { font-size: 13px; }

/* Responsables modal */
.resp-edit-list { display: flex; flex-direction: column; gap: 8px; }
.resp-edit-row { display: grid; grid-template-columns: 34px 1fr 1.2fr 1.3fr 30px; gap: 8px; align-items: center; }
.resp-edit-row input[type="color"] { width: 34px; height: 30px; padding: 2px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface-2); }
.resp-edit-row input { font-family: var(--font-body); font-size: 13px; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 8px; padding: 7px 9px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .app-header { height: auto; }
  .app-subnav { padding: 6px 14px; height: auto; flex-wrap: wrap; }
  .main { padding: 14px 12px 80px; }
  .kanban { grid-template-columns: repeat(var(--kcols, 4), 240px); }
  .planner-grid { grid-template-columns: 1fr !important; }
  .semana-grid { grid-template-columns: 1fr; }
  .semana-rutina { margin-left: 0; width: 100%; }
  .sug-main { grid-template-columns: 1fr 1fr; gap: 8px; }
  .sug-go { grid-column: 1 / -1; }
  .sug-d-row { grid-template-columns: 1fr; gap: 6px; }
  .resp-edit-row { grid-template-columns: 30px 1fr 30px; grid-auto-flow: row; }
}
@media (max-width: 620px) {
  .etapas-4 { grid-template-columns: 1fr; }
}

/* ---------- Reportería ---------- */
.rep-kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.rep-kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.rep-kpi-v { font-family: var(--font-head); font-weight: 800; font-size: 34px; line-height: 1; }
.rep-kpi-l { font-family: var(--font-head); font-weight: 600; font-size: 13px; color: var(--ink); }
.rep-kpi-s { font-size: 11.5px; color: var(--ink-soft); }

.rep-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.rep-bar-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.rep-bar-row:last-child { border-bottom: none; }
.rep-bar-label { min-width: 120px; max-width: 160px; font-size: 12.5px; display: flex; align-items: center; gap: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rep-bar-label span { font-size: 11px; color: var(--ink-soft); }
.rep-bar-track { flex: 1; height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.rep-bar-fill { height: 100%; border-radius: 4px; transition: width .4s; }
.rep-bar-right { font-size: 11.5px; color: var(--ink-soft); white-space: nowrap; min-width: 90px; text-align: right; }

.rep-tipo-row { margin-bottom: 10px; }
.rep-tipo-h { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 13px; }
.rep-tipo-n { margin-left: auto; font-family: var(--font-head); font-weight: 700; font-size: 13px; }

@media (max-width: 1100px) { .rep-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px)  { .rep-kpi-row { grid-template-columns: 1fr 1fr; } .rep-grid { grid-template-columns: 1fr; } }
.crono-scroll { overflow-x: auto; overflow-y: visible; }
.crono-grid { display: grid; grid-template-columns: repeat(7, minmax(116px, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: visible; min-width: 760px; }
.crono-col { display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.crono-col:last-child { border-right: none; }
.crono-dh { background: var(--accent); color: var(--accent-ink); padding: 8px 10px; display: flex; align-items: baseline; justify-content: space-between; gap: 4px; }
.crono-col:first-child .crono-dh { border-top-left-radius: 11px; }
.crono-col:last-child .crono-dh { border-top-right-radius: 11px; }
.cdh-dia { font-family: var(--font-head); font-weight: 700; font-size: 12.5px; }
.cdh-fecha { font-size: 10.5px; opacity: .8; }
.crono-cell { padding: 8px 7px; display: flex; flex-direction: column; gap: 5px; flex: 1; min-height: 132px; background: var(--surface); }
.crono-col:nth-child(even) .crono-cell { background: var(--surface-2); }
.crono-chip { display: inline-flex; align-items: center; gap: 5px; background: var(--surface-2); border: 1px solid var(--line); border-left: 3px solid var(--ct); border-radius: 7px; padding: 3px 5px 3px 7px; font-size: 11.5px; font-weight: 600; color: var(--ink); }
.crono-col:nth-child(even) .crono-chip { background: var(--surface); }
.crono-chip.libre { font-weight: 500; font-style: italic; color: var(--ink-soft); }
.cc-code { line-height: 1.2; }
.cc-x { border: none; background: transparent; color: var(--ink-faint); cursor: pointer; font-size: 14px; line-height: 1; padding: 0 1px; margin-left: auto; }
.cc-x:hover { color: var(--warn); }
.crono-add-wrap { position: relative; margin-top: 2px; }
.crono-add { width: 100%; border: 1px dashed var(--line-strong); background: transparent; color: var(--ink-faint); border-radius: 7px; padding: 5px; font-family: var(--font-body); font-size: 11px; cursor: pointer; }
.crono-add:hover { border-color: var(--accent); color: var(--accent); }
.crono-hint { margin-top: 12px; font-size: 12.5px; color: var(--ink-soft); text-align: center; padding: 10px; border: 1px dashed var(--line-strong); border-radius: 10px; }

/* popover agregar */
.crono-pop { position: absolute; top: calc(100% + 4px); left: 0; z-index: 40; width: 230px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow); padding: 10px; }
.crono-pop-t { font-family: var(--font-head); font-weight: 700; font-size: 12px; margin-bottom: 8px; }
.crono-pop-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 9px; }
.pop-chip { border: 1px solid var(--line); border-left: 3px solid var(--ct); background: var(--surface-2); border-radius: 7px; padding: 3px 7px; font-size: 11px; font-weight: 700; color: var(--ink); cursor: pointer; }
.pop-chip:hover { border-color: var(--ct); background: var(--accent-soft); }
.crono-pop-free { display: flex; gap: 6px; }
.crono-pop-free input { flex: 1; min-width: 0; font-family: var(--font-body); font-size: 12px; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 8px; padding: 6px 8px; }

/* plantillas modal */
.plant-save { display: flex; gap: 8px; margin-bottom: 14px; }
.plant-save input { flex: 1; font-family: var(--font-body); font-size: 13px; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 8px; padding: 8px 10px; }
.plant-list { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow-y: auto; }
.plant-row { display: flex; align-items: center; gap: 8px; }
.plant-name { flex: 1; font-family: var(--font-body); font-size: 13px; font-weight: 600; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; }
.plant-n { font-size: 11.5px; color: var(--ink-soft); white-space: nowrap; }

/* tareas modal */
.tareas-edit { display: flex; flex-direction: column; gap: 7px; max-height: 360px; overflow-y: auto; }
.tarea-edit-row { display: grid; grid-template-columns: 74px 1fr 140px 30px; gap: 8px; align-items: center; }
.tarea-edit-row input, .tarea-edit-row select { font-family: var(--font-body); font-size: 13px; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 8px; padding: 7px 9px; }
.te-cod { font-weight: 700; text-transform: uppercase; }

@media (max-width: 980px) {
  .tarea-edit-row { grid-template-columns: 66px 1fr 30px; }
  .tarea-edit-row select { grid-column: 2 / 3; }
}

/* ---------- Comercial · oferta de la semana, buscador y ficha de cliente ---------- */
.perfil-top{display:flex;align-items:center;gap:10px;margin-bottom:14px}
.perfil-top .perfil-back{margin-bottom:0}
.perfil-top .btn:last-child{margin-left:auto}
.cli-buscar{font-family:inherit;font-size:12.5px;padding:6px 10px;border-radius:9px;border:1px solid var(--line);background:var(--surface);color:var(--ink);min-width:230px;margin-left:auto}
.cli-buscar:focus{outline:none;border-color:var(--accent)}
.loc-lbl{font-size:10.5px;text-transform:uppercase;letter-spacing:.06em;color:var(--ink-faint);margin-right:2px}
.kpi .src{margin-top:4px;font-size:10.5px;line-height:1.35;color:var(--ink-faint)}
.modal.wide{width:720px;max-width:100%}
.of-tbl td,.of-tbl th{padding:5px 8px;font-size:12.5px}
.of-tbl tr.off td{opacity:.45}

/* ---------- Oferta de la semana: header de marca + lista tipo catalogo de WhatsApp Business ---------- */
.of-brand{display:flex;align-items:center;gap:10px;background:var(--accent-soft);border:1px solid color-mix(in oklab, var(--accent) 25%, transparent);border-radius:12px;padding:8px 12px;margin-bottom:10px}
.of-brand-logo{width:34px;height:34px;border-radius:9px;object-fit:cover;flex:none}
.of-brand-text{display:flex;flex-direction:column;line-height:1.3}
.of-brand-text b{font-size:13.5px;color:var(--accent)}
.of-brand-text span{font-size:11.5px;color:var(--ink-soft)}
.of-list{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:14px;overflow:hidden;background:var(--surface)}
.of-item{display:flex;align-items:center;gap:11px;padding:9px 12px;border-bottom:1px solid var(--line)}
.of-item:last-child{border-bottom:none}
.of-item.off{opacity:.5}
.of-item-thumb{flex:none;width:36px;height:36px;border-radius:9px;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:700;font-size:14px;text-transform:uppercase}
.of-item-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.of-item-name-row{display:flex;align-items:center;gap:7px}
.of-item-name{font-weight:700;font-size:13.5px}
.of-item-sub{font-size:11.5px;color:var(--ink-soft);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.of-item-price{flex:none;display:flex;align-items:baseline;gap:2px;font-weight:700;font-size:13px}
.of-item-price input{width:70px;font-family:inherit;font-size:13px;font-weight:700;padding:4px 6px;border-radius:7px;border:1px solid var(--line);background:var(--surface);color:var(--ink);text-align:right}
.of-item-unit{font-size:10.5px;color:var(--ink-faint);font-weight:400}
.of-item-empty{text-align:center;color:var(--ink-soft);padding:26px 16px;font-size:13px}
.of-cierre{display:flex;align-items:center;gap:9px;margin-top:12px}
.of-cierre label{font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--ink-faint)}
.of-cierre input{font-family:inherit;font-size:12.5px;padding:5px 9px;border-radius:8px;border:1px solid var(--line);background:var(--surface);color:var(--ink)}
.of-lbl{display:block;margin:14px 0 5px;font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--ink-faint)}
.of-msg{width:100%;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;line-height:1.5;padding:10px 12px;border-radius:10px;border:1px solid var(--line);background:var(--surface-2);color:var(--ink);resize:vertical}
.of-saltos{display:flex;align-items:center;gap:5px;flex-wrap:wrap;font-size:10.5px;color:var(--ink-faint);text-transform:uppercase;letter-spacing:.05em}
.of-saltos .loc-chip{text-transform:none;letter-spacing:0}

/* ---------- Panel de administración de usuarios ---------- */
.modal.adm{width:860px;max-width:100%}
.adm-b{max-height:76vh;overflow:auto}
.adm-grid{display:grid;grid-template-columns:250px 1fr;gap:16px;margin-top:12px}
@media (max-width:820px){.adm-grid{grid-template-columns:1fr}}
.adm-lista{display:flex;flex-direction:column;gap:4px}
.adm-lista-h{display:flex;align-items:center;justify-content:space-between;font-size:10.5px;text-transform:uppercase;letter-spacing:.06em;color:var(--ink-faint);margin-bottom:4px}
.adm-item{display:flex;align-items:center;gap:9px;padding:7px 9px;border-radius:10px;border:1px solid var(--line);background:var(--surface);cursor:pointer;text-align:left;font-family:inherit;color:var(--ink)}
.adm-item:hover{border-color:var(--line-strong)}
.adm-item.on{border-color:var(--accent);background:color-mix(in oklab,var(--accent) 8%,transparent)}
.adm-item.off{opacity:.55}
.adm-av{width:28px;height:28px;flex:none;border-radius:50%;background:var(--accent);color:#fff;display:grid;place-items:center;font-weight:700;font-size:12.5px}
.adm-txt{flex:1;min-width:0;display:flex;flex-direction:column}
.adm-txt b{font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.adm-txt span{font-size:10.5px;color:var(--ink-soft);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.adm-yo{flex:none;font-size:9.5px;text-transform:uppercase;letter-spacing:.05em;border:1px solid var(--accent);color:var(--accent);border-radius:99px;padding:1px 6px}
.adm-yo.off{border-color:var(--line-strong);color:var(--ink-faint)}
.adm-det{border:1px solid var(--line);border-radius:12px;padding:14px 16px;min-height:280px}
.adm-det h4{margin:0 0 12px;font-family:var(--font-head);font-size:15px}
.adm-det h5{margin:16px 0 8px;font-size:10.5px;text-transform:uppercase;letter-spacing:.06em;color:var(--ink-faint)}
.adm-campos{display:grid;grid-template-columns:1fr 1fr;gap:10px}
@media (max-width:620px){.adm-campos{grid-template-columns:1fr}}
.adm-campos label{display:flex;flex-direction:column;gap:4px;font-size:10.5px;text-transform:uppercase;letter-spacing:.05em;color:var(--ink-faint)}
.adm-campos input,.adm-campos select{font-family:inherit;font-size:13px;padding:6px 9px;border-radius:8px;border:1px solid var(--line);background:var(--surface);color:var(--ink);text-transform:none;letter-spacing:0}
.adm-campos input:focus,.adm-campos select:focus{outline:none;border-color:var(--accent)}
.adm-campos input:disabled{opacity:.6}
.adm-clave{display:flex;gap:6px}
.adm-clave input{flex:1;min-width:0}
.adm-perms{display:grid;grid-template-columns:1fr 1fr;gap:7px}
@media (max-width:620px){.adm-perms{grid-template-columns:1fr}}
.adm-perm{display:flex;gap:8px;align-items:flex-start;padding:8px 10px;border:1px solid var(--line);border-radius:9px;cursor:pointer}
.adm-perm.on{border-color:var(--accent);background:color-mix(in oklab,var(--accent) 7%,transparent)}
.adm-perm input{margin-top:2px;accent-color:var(--accent)}
.adm-perm span{display:flex;flex-direction:column;gap:1px;font-size:10.5px;color:var(--ink-soft);line-height:1.35}
.adm-perm b{font-size:12.5px;color:var(--ink)}
.adm-acciones{display:flex;align-items:center;gap:10px;margin-top:16px;padding-top:12px;border-top:1px solid var(--line)}
.adm-acciones .btn.primary,.adm-acciones .btn.danger{margin-left:auto}
.adm-activo{display:flex;align-items:center;gap:7px;font-size:12.5px;color:var(--ink-soft);cursor:pointer}
.adm-activo input{accent-color:var(--accent)}
.adm-rol-desc{margin:10px 0 0;font-size:11px;line-height:1.45;color:var(--ink-faint)}
.adm-vacio{display:grid;place-items:center;height:240px;font-size:13px;color:var(--ink-faint);text-align:center}
/* Panel de usuarios con Supabase */
.adm-pro.modal.wide{width:880px}
.adm-pro .adm-grid{grid-template-columns:290px 1fr}
@media (max-width:820px){.adm-pro .adm-grid{grid-template-columns:1fr}}
.adm-resumen{display:flex;flex-wrap:wrap;align-items:center;gap:8px 18px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2);margin-bottom:12px}
.adm-resumen>div{display:flex;flex-direction:column;gap:1px;min-width:54px}
.adm-resumen b{font-family:var(--font-head);font-size:18px;line-height:1.1}
.adm-resumen span{font-size:10.5px;color:var(--ink-soft);text-transform:uppercase;letter-spacing:.05em}
.adm-resumen .off b{color:var(--ink-faint)}
.adm-matriz{overflow-x:auto;margin-bottom:12px;border:1px solid var(--line);border-radius:12px}
.adm-matriz table{border-collapse:collapse;width:100%;font-size:12px}
.adm-matriz th,.adm-matriz td{padding:7px 10px;text-align:center;border-bottom:1px solid var(--line)}
.adm-matriz thead th{font-size:10.5px;text-transform:uppercase;letter-spacing:.05em;color:var(--ink-faint);background:var(--surface-2)}
.adm-matriz tbody th{text-align:left;font-weight:600}
.adm-matriz tr:last-child th,.adm-matriz tr:last-child td{border-bottom:none}
.adm-matriz td.si{color:var(--accent);font-weight:700}
.adm-matriz td.no{color:var(--ink-faint)}
.adm-busca{width:100%;font-family:inherit;font-size:13px;padding:7px 10px;border-radius:9px;border:1px solid var(--line);background:var(--surface);color:var(--ink);margin-bottom:6px}
.adm-busca:focus{outline:none;border-color:var(--accent)}
.adm-filtros{display:flex;gap:6px;margin-bottom:8px}
.adm-chip{font-family:inherit;font-size:11.5px;padding:3px 10px;border-radius:99px;border:1px solid var(--line);background:var(--surface);color:var(--ink-soft);cursor:pointer}
.adm-chip.on{border-color:var(--accent);color:var(--accent);background:color-mix(in oklab,var(--accent) 8%,transparent)}
.adm-enlace{border:1px solid color-mix(in oklab,var(--accent) 35%,transparent);background:color-mix(in oklab,var(--accent) 6%,transparent);border-radius:12px;padding:12px 14px;margin-bottom:14px}
.adm-enlace p{margin:6px 0 8px;font-size:12px;color:var(--ink-soft);line-height:1.45}
.adm-enlace textarea{width:100%;font-family:ui-monospace,Menlo,Consolas,monospace;font-size:11.5px;padding:8px;border-radius:8px;border:1px solid var(--line);background:var(--surface);color:var(--ink);resize:none;word-break:break-all}
.adm-perm.ro{cursor:default}
.adm-det h4 .adm-yo{margin-left:6px;vertical-align:middle}

/* ---------- Encabezado y cuerpo de modales (Admin, Oferta) ---------- */
.modal-h{display:flex;align-items:center;gap:12px;padding-bottom:10px;margin-bottom:12px;border-bottom:1px solid var(--line)}
.modal-h h3{margin:0;flex:1;font-family:var(--font-head);font-size:17px;letter-spacing:-.01em}
.modal-h .x{flex:none;width:28px;height:28px;display:grid;place-items:center;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink-soft);font-size:13px;cursor:pointer;font-family:inherit;line-height:1}
.modal-h .x:hover{border-color:var(--line-strong);color:var(--ink)}
.modal-b{display:block}
.ro-chip{font-size:10.5px;text-transform:uppercase;letter-spacing:.06em;border:1px solid var(--line-strong);color:var(--ink-faint);border-radius:99px;padding:3px 9px;white-space:nowrap}

/* ---------- Menú de cuenta en el encabezado ---------- */
.cuenta{position:relative;flex:none}
.cuenta-btn{display:flex;align-items:center;gap:7px;padding:4px 9px 4px 4px;border:1px solid var(--line);border-radius:99px;background:var(--surface);color:var(--ink);font-family:inherit;font-size:12.5px;cursor:pointer;max-width:180px}
.cuenta-btn:hover{border-color:var(--line-strong)}
.cuenta-av{width:26px;height:26px;flex:none;border-radius:50%;background:var(--accent);color:#fff;display:grid;place-items:center;font-weight:700;font-size:12px}
.cuenta-nom{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left}
.cuenta-fl{flex:none;font-size:9px;color:var(--ink-faint)}
.cuenta-cap{position:fixed;inset:0;z-index:60}
.cuenta-menu{position:absolute;top:calc(100% + 8px);right:0;z-index:61;min-width:230px;display:flex;flex-direction:column;padding:6px;border:1px solid var(--line);border-radius:13px;background:var(--surface);box-shadow:0 14px 40px rgba(0,0,0,.16)}
.cuenta-h{padding:8px 10px 10px;margin-bottom:4px;border-bottom:1px solid var(--line);display:flex;flex-direction:column;gap:1px}
.cuenta-h b{font-family:var(--font-head);font-size:13.5px}
.cuenta-h span{font-size:11px;color:var(--ink-soft)}
.cuenta-menu>button{text-align:left;padding:8px 10px;border:none;border-radius:9px;background:none;color:var(--ink);font-family:inherit;font-size:13px;cursor:pointer}
.cuenta-menu>button:hover{background:color-mix(in oklab,var(--accent) 9%,transparent)}

/* ---------- Asistente del huerto (botón flotante + panel de chat) ---------- */
.asis-wrap{position:fixed;right:22px;bottom:22px;z-index:58;display:flex;flex-direction:column;align-items:flex-end;gap:12px}
.asis-btn{width:54px;height:54px;border-radius:50%;border:none;background:var(--accent);color:var(--accent-ink);font-size:22px;box-shadow:var(--shadow);cursor:pointer;display:grid;place-items:center;transition:transform .12s}
.asis-btn:hover{transform:scale(1.06)}
.asis-panel{width:360px;max-width:calc(100vw - 44px);height:min(560px,calc(100vh - 120px));display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--line);border-radius:18px;box-shadow:0 24px 60px rgba(0,0,0,.28);overflow:hidden}
.asis-head{display:flex;align-items:center;gap:10px;padding:14px 14px;border-bottom:1px solid var(--line);background:var(--surface-2)}
.asis-head-ic{font-size:20px}
.asis-head-t{flex:1;display:flex;flex-direction:column;line-height:1.25}
.asis-head-t b{font-family:var(--font-head);font-size:14px}
.asis-head-t span{font-size:11px;color:var(--ink-soft)}
.asis-x{flex:none;width:26px;height:26px;display:grid;place-items:center;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink-soft);font-size:12px;cursor:pointer}
.asis-x:hover{border-color:var(--line-strong);color:var(--ink)}
.asis-msgs{flex:1;overflow-y:auto;padding:14px;display:flex;flex-direction:column;gap:10px}
.asis-msg{max-width:88%;padding:9px 12px;border-radius:13px;font-size:13px;line-height:1.5;white-space:pre-line}
.asis-msg.bot{align-self:flex-start;background:var(--surface-2);color:var(--ink);border:1px solid var(--line);border-bottom-left-radius:4px}
.asis-msg.user{align-self:flex-end;background:var(--accent);color:var(--accent-ink);border-bottom-right-radius:4px}
.asis-pensando{display:flex;gap:4px;padding:12px}
.asis-pensando span{width:6px;height:6px;border-radius:50%;background:var(--ink-faint);animation:asis-pulso 1s infinite ease-in-out}
.asis-pensando span:nth-child(2){animation-delay:.15s}
.asis-pensando span:nth-child(3){animation-delay:.3s}
@keyframes asis-pulso{0%,80%,100%{opacity:.25;transform:scale(.8)}40%{opacity:1;transform:scale(1)}}
.asis-quick{display:flex;flex-wrap:wrap;gap:6px;padding:0 14px 10px}
.asis-quick button{font-family:var(--font-body);font-size:11.5px;color:var(--ink);background:var(--surface-2);border:1px solid var(--line-strong);border-radius:999px;padding:5px 10px;cursor:pointer}
.asis-quick button:hover{border-color:var(--accent);color:var(--accent)}
.asis-input-row{display:flex;gap:8px;padding:12px 14px;border-top:1px solid var(--line)}
.asis-input-row input{flex:1;min-width:0;font-family:var(--font-body);font-size:13.5px;color:var(--ink);background:var(--surface-2);border:1px solid var(--line-strong);border-radius:10px;padding:9px 11px;outline:none}
.asis-input-row input:focus{border-color:var(--accent)}
.asis-send{flex:none;width:38px;height:38px;border-radius:10px;border:none;background:var(--accent);color:var(--accent-ink);font-size:14px;cursor:pointer;display:grid;place-items:center}
.asis-send:disabled{opacity:.4;cursor:default}
@media (max-width:520px){.asis-wrap{right:14px;bottom:14px}.asis-panel{width:calc(100vw - 28px)}}
.cuenta-salir{margin-top:4px;border-top:1px solid var(--line)!important;border-radius:0 0 9px 9px!important;color:var(--ink-soft)!important;padding-top:10px!important}

/* ===== Comercial con el diseño de Vocero y los colores del huerto =====
   El menú de la izquierda (.vz-nav) y las pantallas Bandeja, Resultados y Agente IA (.vz) siguen la forma de Vocero CRM (MIT):
   Archivo para la interfaz, Instrument Serif en cursiva para los acentos e IBM Plex Mono para etiquetas y horas. Los colores son
   los del tema elegido (Patagonia, Claro u Oscuro). El resto de las pantallas de Comercial conserva el diseño del huerto. */
.vz-page { display: flex; align-items: flex-start; min-height: calc(100vh - var(--hdr-h, 108px)); }
.vz-main { flex: 1; min-width: 0; }
.vz-main.pagina { min-height: calc(100vh - var(--hdr-h, 108px)); background: var(--bg); }
.vz-main.pagina .vz-cuerpo { padding: 24px; max-width: 1240px; margin: 0 auto; box-sizing: border-box; }
.vz-main.pagina.ancha .vz-cuerpo { max-width: 1500px; }
.vz-main.llena { height: calc(100vh - var(--hdr-h, 108px) - var(--vz-strip, 0px)); overflow: hidden; }
.vz-main.llena .vz-cuerpo { height: 100%; }
.vz-ph { padding: 16px 24px; border-bottom: 1px solid var(--line); background: var(--vz-bg); }
.vz-ph h2 { font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.vz-ph p { margin: 2px 0 0; font-size: 12px; color: var(--ink-faint); }

/* Colores de la zona: salen de la paleta de cada tema del huerto (Patagonia es la de siempre). El cliente va en azul glaciar y
   nosotros en verde bosque; la tierra y el terracota hacen de aviso y de error. Lo único que se cambia es la forma, no los colores. */
.vz {
  --font-body: 'Archivo', system-ui, sans-serif; --font-head: var(--font-body);
  color: var(--ink); font-family: var(--font-body); font-size: 14px; line-height: 1.5; letter-spacing: -.01em;
  --vz-bg: #ffffff; --vz-chat: var(--bg); --vz-chip: #ffffff; --vz-row: var(--surface-2);
  --vz-hover: #e8ece2; --vz-panel: #edf1e8; --vz-text4: #b5c1b9; --vz-line-2: #aebba9;
  --ink-faint: #68796f;
  --vz-accent-hover: #245f47; --vz-accent-line: #bfd9cb; --vz-accent-text: #1d5c44; --vz-accent-ink: #2c7a5b;
  --vz-glow: color-mix(in srgb, var(--glacier) 26%, transparent); --vz-read: #3a9bd0;
  --vz-in: #e3f1f8; --vz-in-line: #c2dfee; --vz-out: var(--accent-soft); --vz-out-line: #c3dacc;
  --vz-ok: #4c9a3a; --vz-ok-tint: #e7f1e1; --vz-ok-line: #cde2c2; --vz-ok-text: #3e7d32;
  --vz-warn: #c9962e; --vz-warn-tint: #f7f0e1; --vz-warn-line: #e7d8b8; --vz-warn-text: #7a5b1f;
  --vz-bad: #c2542c; --vz-bad-tint: #f9e5dc; --vz-bad-line: #ebc3b1; --vz-bad-text: #9a3f1c;
  --vz-info-tint: #dff0f9; --vz-info-line: #bedff0; --vz-info-text: #1c6a90;
  --vz-shadow-sm: 0 1px 2px rgba(32,52,44,.07);
}
[data-theme="claro"] .vz {
  --vz-hover: #efe8d9; --vz-panel: #f3eddf; --vz-text4: #bdb4a0; --vz-line-2: #c9bea5;
  --ink-faint: #677970;
  --vz-accent-hover: #185641; --vz-accent-line: #b9d4c4; --vz-accent-text: #175040; --vz-accent-ink: #1e6b52;
  --vz-in: #e2f1f8; --vz-in-line: #c5e2f1; --vz-out-line: #bdd6c6;
  --vz-warn-tint: #f8efd9; --vz-warn-line: #e8d6ae;
}
[data-theme="oscuro"] .vz {
  --vz-bg: #16221d; --vz-chip: #1c2a24; --vz-row: #1a2823;
  --vz-hover: #24352d; --vz-panel: #22322a; --vz-text4: #587064; --vz-line-2: #3d5a4b;
  --ink-faint: #8aa095;
  --vz-accent-hover: #6fd9a8; --vz-accent-line: #2b5a47; --vz-accent-text: #8be3bd; --vz-accent-ink: #5fd3a0;
  --vz-glow: color-mix(in srgb, var(--glacier) 14%, transparent); --vz-read: #6fbee0;
  --vz-in: #14303b; --vz-in-line: #234b5b; --vz-out: #1d3a2e; --vz-out-line: #2b5a47;
  --vz-ok: #7bc96a; --vz-ok-tint: #1b3a1f; --vz-ok-line: #2e5a33; --vz-ok-text: #9ad98a;
  --vz-warn: #d6a94a; --vz-warn-tint: #3a2f17; --vz-warn-line: #5c4a22; --vz-warn-text: #e3bf6e;
  --vz-bad: #e8845b; --vz-bad-tint: #3a241a; --vz-bad-line: #5e3a2a; --vz-bad-text: #f0a583;
  --vz-info-tint: #15303c; --vz-info-line: #24505f; --vz-info-text: #8ccfec;
  --vz-shadow-sm: 0 1px 2px rgba(0,0,0,.4);
}
.vz h2, .vz h3, .vz h4 { letter-spacing: -.02em; }
.vz button, .vz input, .vz select, .vz textarea { font-family: inherit; letter-spacing: inherit; }
.vz .card { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow); }
.vz .card-h h3 { font-size: 15px; font-weight: 700; }
.vz .card-h .sub { color: var(--ink-faint); }
.vz .btn { border-radius: 999px; font-weight: 600; font-size: 13.5px; padding: 8px 16px; background: transparent; border-color: var(--line-strong); color: var(--ink); transition: transform .15s, background .15s, border-color .15s; }
.vz .btn:hover { background: transparent; border-color: var(--ink); transform: translateY(-1px); }
.vz .btn:active { transform: none; }
.vz .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: var(--vz-shadow-sm); }
.vz .btn.primary:hover { background: var(--vz-accent-hover); border-color: var(--vz-accent-hover); filter: none; }
.vz .btn.sm { padding: 5px 12px; font-size: 12.5px; border-radius: 999px; }
.vz .btn:disabled { opacity: .5; cursor: default; transform: none; }
.vz input:not([type=checkbox]):not([type=radio]):not([type=file]):focus, .vz textarea:focus, .vz select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--vz-accent-line); }
.vz-k { font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }

/* Menú de la izquierda: el mismo degradado de la cabecera de la app (glaciar, menta y crema) puesto en vertical; el tema Oscuro lo lleva casi negro verdoso */
.vz-nav {
  --nv-bg: linear-gradient(180deg, color-mix(in srgb, var(--glacier) 30%, #fff) 0%, var(--accent-soft) 46%, var(--bg) 100%);
  --nv-line: var(--line-strong); --nv-text: var(--ink);
  --nv-text2: color-mix(in srgb, var(--ink) 84%, var(--surface)); --nv-text3: color-mix(in srgb, var(--ink) 76%, var(--surface));
  --nv-hover: color-mix(in srgb, var(--accent) 11%, transparent);
  --nv-on-bg: var(--accent); --nv-on-text: var(--accent-ink); --nv-on-ico: var(--accent-ink); --nv-focus: var(--accent);
  --nv-badge-bg: var(--accent); --nv-badge-text: var(--accent-ink); --nv-ava-bg: var(--accent); --nv-ava-text: var(--accent-ink); --nv-led: var(--ok);
  flex: none; width: 224px; box-sizing: border-box; position: sticky; top: var(--hdr-h, 108px); align-self: flex-start;
  height: calc(100vh - var(--hdr-h, 108px)); overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; padding: 16px 12px 14px;
  background: var(--nv-bg); color: var(--nv-text); border-right: 1px solid var(--nv-line);
  font-family: 'Archivo', var(--font-body), system-ui, sans-serif; letter-spacing: -.01em;
  transition: width .66s var(--suave);
}
[data-theme="oscuro"] .vz-nav {
  --nv-bg: #0a110f; --nv-line: #1c2b24; --nv-text: #e6f0ea; --nv-text2: #afc5b9; --nv-text3: #86a193;
  --nv-hover: #14221c; --nv-on-bg: #1d3a2e; --nv-on-text: #4dc58f; --nv-on-ico: #4dc58f; --nv-focus: #4dc58f;
  --nv-badge-bg: #4dc58f; --nv-badge-text: #07130d; --nv-ava-bg: #24523f; --nv-ava-text: #8be3bd; --nv-led: #4dc58f;
}
.vz-nav .vz-k { color: var(--nv-text3); }
.vz-menu { display: flex; flex-direction: column; gap: 18px; }
.vz-grupo { display: flex; flex-direction: column; gap: 2px; }
.vz-gt { padding: 0 10px; margin-bottom: 4px; }
.vz-nav-i { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 9px; background: transparent; color: var(--nv-text2); font: 600 13.5px/1.2 'Archivo', var(--font-body), system-ui, sans-serif; letter-spacing: -.01em; text-align: left; cursor: pointer; transition: background .2s, color .2s, box-shadow .2s, transform .45s var(--vivo); }
.vz-nav-i:active { transform: scale(.96); transition-duration: .1s; }
.vz-nav-i svg { flex: none; color: var(--nv-text3); transition: color .2s, transform .45s var(--vivo); }
.vz-nav-i:hover svg { transform: translateX(1px) scale(1.08); }
.vz-nav-i:hover { background: var(--nv-hover); color: var(--nv-text); }
.vz-nav-i:focus-visible { outline: 2px solid var(--nv-focus); outline-offset: 1px; }
.vz-nav-i.on { background: var(--nv-on-bg); color: var(--nv-on-text); box-shadow: 0 1px 2px rgba(32, 52, 44, .18); }
.vz-nav-i.on svg { color: var(--nv-on-ico); }
.vz-t { flex: 1; white-space: nowrap; }
.vz-nav-b { min-width: 18px; height: 18px; padding: 0 6px; border-radius: 999px; background: var(--nv-badge-bg); color: var(--nv-badge-text); font-size: 10.5px; font-weight: 700; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.vz-nav-i.on .vz-nav-b { background: var(--nv-on-text); color: var(--nv-on-bg); }
.vz-resto { flex: 1; min-height: 12px; }
.vz-user { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; }
.vz-ua { width: 32px; height: 32px; border-radius: 50%; background: var(--nv-ava-bg); color: var(--nv-ava-text); font-size: 12px; font-weight: 700; display: grid; place-items: center; flex: none; }
.vz-ut { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.vz-ut b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--nv-text); }
.vz-ut span { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--nv-text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vz-led { width: 6px; height: 6px; border-radius: 50%; background: var(--nv-led); flex: none; }
.vz-led.off { background: var(--nv-text3); }

/* Botón para plegar el menú, a la derecha del primer título («Trabajo») */
.vz-gt-fila { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.vz-gt-fila .vz-gt { flex: 1; min-width: 0; margin-bottom: 0; white-space: nowrap; overflow: hidden; }
.vz-plegar {
  flex: none; display: grid; place-items: center; width: 28px; height: 28px; margin-right: 2px; padding: 0; border: 0; border-radius: 8px;
  background: transparent; color: var(--nv-text3); cursor: pointer;
  transition: background .2s, color .2s, transform .45s var(--vivo), margin .66s var(--suave);
}
.vz-plegar svg { width: 18px; height: 18px; }
.vz-plegar:hover { background: var(--nv-hover); color: var(--nv-text); }
.vz-plegar:active { transform: scale(.88); transition-duration: .1s; }
.vz-plegar:focus-visible { outline: 2px solid var(--nv-focus); outline-offset: 1px; }

/* Menú plegado (solo en pantallas anchas; bajo 1100 px ya va en íconos): queda en 68 px con los íconos centrados.
   Los textos se desvanecen sin dejar de ocupar su alto, así los íconos no saltan de lugar mientras el menú se encoge */
@media (min-width: 1101px) {
  .vz-gt, .vz-t, .vz-ut { transition: opacity .25s var(--suave), padding .66s var(--suave); }
  .vz-gt-fila { transition: gap .66s var(--suave); }
  .nav-plegado .vz-gt-fila { gap: 0; }
  .nav-plegado .vz-gt-fila .vz-gt { padding: 0; }
  .vz-nav-i, .vz-user { transition: background .2s, color .2s, box-shadow .2s, transform .45s var(--vivo), padding .66s var(--suave); }
  .nav-plegado .vz-nav { width: 68px; }
  .nav-plegado .vz-gt, .nav-plegado .vz-t, .nav-plegado .vz-ut { opacity: 0; }
  .nav-plegado .vz-plegar { margin-right: 8px; }
  .nav-plegado .vz-nav-i { position: relative; padding-left: 12px; overflow: hidden; }
  .nav-plegado .vz-nav-b { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; font-size: 9.5px; }
  .nav-plegado .vz-user { padding-left: 6px; }
}

/* ===== Bandeja (Zernio): lista, conversación y detalles ===== */
.bdj { display: grid; grid-template-columns: 360px minmax(0, 1fr); height: 100%; min-height: 460px; position: relative; overflow: hidden; background: var(--vz-bg); }
.bdj.con-det { grid-template-columns: 360px minmax(0, 1fr) 320px; }

/* Lista */
.bdj-lista { display: flex; flex-direction: column; min-height: 0; min-width: 0; border-right: 1px solid var(--line); }
.bdj-h { padding: 16px 16px 12px; border-bottom: 1px solid var(--line); }
.bdj-h-top { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.bdj-h-top > b { font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.bdj-n { margin-left: 2px; font: 500 12px 'IBM Plex Mono', ui-monospace, monospace; color: var(--ink-faint); }
.bdj-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px 3px 5px; border: 1px solid var(--line-strong); background: transparent; border-radius: 999px; color: var(--ink-faint); font-size: 11.5px; font-weight: 500; cursor: pointer; }
.bdj-chip:hover { background: var(--vz-hover); }
.bdj-chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.bdj-chip.tenue { opacity: .45; }
.bdj-canal { display: inline-grid; place-items: center; flex: none; border-radius: 4.5px; }
.bdj-busca { display: flex; align-items: center; gap: 8px; padding: 7px 14px; border: 1px solid var(--line-strong); background: var(--vz-chip); border-radius: 999px; box-shadow: var(--vz-shadow-sm); color: var(--ink-faint); cursor: text; transition: border-color .15s, box-shadow .15s; }
.bdj-busca:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--vz-accent-line); }
.bdj-busca input { flex: 1; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent; box-shadow: none; font-size: 13px; color: var(--ink); }
.bdj-busca input:focus { box-shadow: none; }
.bdj-busca input::placeholder, .bdj-caja textarea::placeholder { color: var(--ink-faint); }
.bdj-x { display: grid; place-items: center; padding: 2px; border: 0; background: transparent; border-radius: 999px; color: var(--ink-faint); cursor: pointer; }
.bdj-x:hover { background: var(--vz-hover); color: var(--ink); }
.bdj-filtros { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 6px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.bdj-f { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line-strong); background: var(--vz-chip); border-radius: 999px; color: var(--ink-soft); font-size: 12.5px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: border-color .15s; }
.bdj-f:hover { border-color: var(--ink-faint); }
.bdj-f span { padding: 0 6px; border-radius: 999px; background: var(--vz-panel); color: var(--ink-faint); font-size: 11px; font-weight: 500; }
.bdj-f.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.bdj-f.on span { background: color-mix(in srgb, var(--accent-ink) 24%, transparent); color: var(--accent-ink); }
.bdj-etapa { margin-left: auto; min-width: 0; max-width: 42%; padding: 5px 8px; border: 1px solid var(--line-strong); background: var(--vz-chip); border-radius: 999px; color: var(--ink-soft); font-size: 12.5px; font-weight: 600; }
.bdj-etapa.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.bdj-items { overflow-y: auto; flex: 1; }
.bdj-item { position: relative; display: flex; align-items: flex-start; gap: 11px; width: 100%; padding: 11px 16px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: background .12s; }
.bdj-item:hover { background: var(--vz-row); }
.bdj-item.on { background: var(--accent-soft); }
.bdj-item.on::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.bdj-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.bdj-av { position: relative; flex: none; width: 36px; height: 36px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600; }
.bdj-av.lg { width: 48px; height: 48px; font-size: 14px; }
.bdj-vent { position: absolute; right: 0; bottom: 0; width: 11px; height: 11px; box-sizing: border-box; border-radius: 50%; border: 2.5px solid var(--vz-bg); background: var(--vz-ok); }
.bdj-it-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bdj-it-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bdj-it-nom { display: flex; align-items: center; gap: 6px; min-width: 0; }
.bdj-it-nom b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bdj-item.nl .bdj-it-nom b { font-weight: 680; }
.bdj-it-hora { flex: none; font: 400 10.5px 'IBM Plex Mono', ui-monospace, monospace; letter-spacing: .02em; color: var(--ink-faint); }
.bdj-item.nl .bdj-it-hora { color: var(--vz-accent-ink); font-weight: 600; }
.bdj-it-fila { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bdj-it-pre { flex: 1; min-width: 0; font-size: 13px; color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bdj-item.nl .bdj-it-pre { color: var(--ink-soft); font-weight: 500; }
.vz .bdj-badge { margin-left: 0; min-width: 18px; height: 18px; padding: 0 6px; background: var(--accent); color: var(--accent-ink); font-size: 10.5px; font-weight: 600; }
.bdj-dot { flex: none; width: 8px; height: 8px; margin: 0 5px; border-radius: 50%; background: var(--accent); }
.bdj-it-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; }
.bdj-pill { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border: 1px solid var(--line-strong); background: var(--vz-chip); border-radius: 999px; color: var(--ink-soft); font-size: 11px; font-weight: 500; white-space: nowrap; }
.bdj-pill i { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.bdj-pill.aviso { border-color: var(--vz-warn-line); background: var(--vz-warn-tint); color: var(--vz-warn-text); }
.bdj-pill.info { border-color: var(--vz-info-line); background: var(--vz-info-tint); color: var(--vz-info-text); }
.bdj-vacio { padding: 28px 18px; text-align: center; font-size: 12px; color: var(--ink-faint); }

/* Conversación */
.bdj-chat { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--vz-bg); }
.bdj-chat-h { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--vz-bg); border-bottom: 1px solid var(--line); }
.bdj-chat-id { min-width: 0; }
.bdj-chat-id b { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.bdj-chat-id b span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bdj-sub { margin-top: 2px; font: 400 10.5px 'IBM Plex Mono', ui-monospace, monospace; letter-spacing: .04em; color: var(--ink-faint); }
.bdj-sub .abierta { color: var(--vz-ok-text); font-weight: 500; }
.bdj-wa { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--ink); font-size: 12.5px; font-weight: 600; text-decoration: none; transition: border-color .15s; }
.bdj-wa:hover { border-color: var(--ink); }
.bdj-ib { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; background: transparent; border-radius: 8px; color: var(--ink-faint); cursor: pointer; }
.bdj-ib:hover { background: var(--vz-hover); color: var(--ink); }
.bdj-ib.borde { width: 32px; height: 32px; border: 1px solid var(--line-strong); border-radius: 999px; }
.bdj-atras { display: none; padding: 6px; border: 0; background: transparent; border-radius: 8px; color: var(--ink-soft); cursor: pointer; }
.bdj-msgs { flex: 1; overflow-y: auto; display: flex; flex-direction: column; padding: 20px 6%; background-color: var(--vz-chat); background-image: radial-gradient(circle at 82% 0%, var(--vz-glow), transparent 58%); }
.bdj-msgs.vacia { align-items: center; justify-content: center; gap: 8px; text-align: center; }
.bdj-serif { margin: 0; font-family: 'Instrument Serif', Georgia, serif; font-style: italic; font-size: 24px; line-height: 1.15; letter-spacing: 0; color: var(--ink-soft); }
.bdj-dia { display: flex; justify-content: center; margin: 12px 0 2px; }
.bdj-dia span { padding: 4px 12px; border: 1px solid var(--line-strong); background: var(--vz-bg); border-radius: 999px; color: var(--ink-soft); box-shadow: var(--vz-shadow-sm); }
.bdj-row { display: flex; margin-top: 10px; }
.bdj-row.g { margin-top: 3px; }
.bdj-row.out { justify-content: flex-end; }
.bdj-msg { max-width: 64%; padding: 8px 12px 5px; border: 1px solid; border-radius: 14px; font-size: 13.5px; line-height: 1.45; word-break: break-word; box-shadow: var(--vz-shadow-sm); }
.bdj-txt { white-space: pre-wrap; }
.bdj-msg.in { background: var(--vz-in); border-color: var(--vz-in-line); }
.bdj-msg.out { background: var(--vz-out); border-color: var(--vz-out-line); }
.bdj-msg.in.first { border-top-left-radius: 5px; }
.bdj-msg.out.first { border-top-right-radius: 5px; }
.bdj-msg.pend { opacity: .72; }
.bdj-msg.fallo { opacity: 1; border-color: var(--vz-bad-line); }
.bdj-hora { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin-top: 2px; font: 400 10px 'IBM Plex Mono', ui-monospace, monospace; letter-spacing: .04em; color: var(--ink-soft); }
.bdj-hora.err { display: block; text-align: right; font-family: inherit; font-size: 11.5px; letter-spacing: 0; color: var(--vz-bad-text); }
.bdj-tag { display: inline-flex; align-items: center; gap: 3px; font: 500 10px 'Archivo', system-ui, sans-serif; letter-spacing: 0; color: var(--ink-soft); }
.bdj-tag.ia { color: var(--vz-accent-ink); }
.bdj-tk { display: inline-flex; color: var(--vz-text4); }
.bdj-tk.read { color: var(--vz-read); }
.bdj-tk.fail { color: var(--vz-bad); }
.bdj-falla { display: flex; align-items: flex-start; gap: 6px; margin-top: 6px; padding: 6px 8px; border: 1px solid var(--vz-bad-line); border-radius: 8px; background: var(--vz-bad-tint); color: var(--vz-bad-text); font-size: 11.5px; line-height: 1.35; }
.bdj-falla svg { flex: none; margin-top: 1px; }
.bdj-msg .bdj-img { display: block; max-width: 100%; max-height: 260px; margin-bottom: 6px; border-radius: 8px; }
.bdj-msg .bdj-aud { display: block; width: 240px; max-width: 100%; margin-bottom: 6px; }
.bdj-adj { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; padding: 8px 10px; border: 1px dashed var(--line-strong); border-radius: 8px; background: var(--vz-bg); color: var(--ink-faint); font-size: 12.5px; }
.bdj-doc { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--vz-bg); color: var(--ink); font-size: 13px; text-decoration: none; }
.bdj-doc:hover { background: var(--vz-row); }
.bdj-doc span { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bdj-doc i { margin-left: auto; font-size: 11px; font-style: normal; color: var(--ink-faint); }
.bdj-sintexto { font-size: 13px; font-style: italic; color: var(--ink-faint); }

/* Caja de escritura en píldora */
.bdj-resp { padding: 12px 18px; background: var(--vz-bg); border-top: 1px solid var(--line); }
.bdj-caja { display: flex; align-items: flex-end; gap: 6px; padding: 6px 6px 6px 8px; border: 1px solid var(--line-strong); background: var(--vz-bg); border-radius: 23px; box-shadow: var(--vz-shadow-sm); transition: border-color .15s, box-shadow .15s; }
.bdj-caja:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--vz-accent-line); }
.bdj-caja textarea { flex: 1; min-width: 0; align-self: center; max-height: 120px; padding: 5px 4px; border: 0; outline: 0; resize: none; background: transparent; box-shadow: none; color: var(--ink); font-size: 14px; line-height: 1.5; }
.bdj-caja textarea:focus { box-shadow: none; }
.bdj-ic { flex: none; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; background: transparent; border-radius: 8px; color: var(--ink-faint); cursor: pointer; transition: background .15s, color .15s; }
.bdj-ic:hover:not(:disabled) { background: var(--vz-panel); color: var(--ink); }
.bdj-ic:disabled { opacity: .5; cursor: default; }
.bdj-env { flex: none; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: var(--accent); color: var(--accent-ink); cursor: pointer; transition: background .15s, opacity .15s; }
.bdj-env:hover:not(:disabled) { background: var(--vz-accent-hover); }
.bdj-env:disabled { opacity: .4; cursor: default; }
.bdj-pie { display: flex; justify-content: flex-end; gap: 12px; margin-top: 6px; font: 400 10.5px 'IBM Plex Mono', ui-monospace, monospace; letter-spacing: .04em; color: var(--ink-faint); }
.bdj-pie.cerrada span:last-child { color: var(--vz-warn-text); }
.bdj-err { margin-bottom: 8px; padding: 7px 10px; border: 1px solid var(--vz-bad-line); border-radius: 8px; background: var(--vz-bad-tint); color: var(--vz-bad-text); font-size: 12.5px; }
.bdj-aviso { margin-bottom: 8px; font-size: 12.5px; color: var(--ink-soft); }
.bdj-chipadj { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 8px; padding: 5px 10px; border: 1px solid var(--vz-accent-line); background: var(--accent-soft); border-radius: 999px; font-size: 12.5px; }
.bdj-lnk { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: transparent; color: var(--vz-accent-ink); font: inherit; font-size: 11.5px; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.bdj-snd { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; background: transparent; border-radius: 8px; color: var(--ink-faint); cursor: pointer; }
.bdj-snd:hover { background: var(--vz-hover); color: var(--ink); }

/* Agente de IA en la Bandeja */
.bdj-sug { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; padding: 10px 12px; border: 1px solid var(--vz-accent-line); background: var(--accent-soft); border-radius: 12px; }
.bdj-sug.tras { background: var(--vz-warn-tint); border-color: var(--vz-warn-line); }
.bdj-sug-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.bdj-sug-h b { display: inline-flex; align-items: center; gap: 6px; }
.bdj-sug-h b svg { color: var(--accent); flex: none; }
.bdj-sug.tras .bdj-sug-h b svg { color: var(--vz-warn-text); }
.bdj-sug-t { padding: 8px 10px; border: 1px solid var(--line); background: var(--vz-bg); border-radius: 10px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; }
.bdj-sug-m { font-size: 12px; color: var(--ink-soft); }
.bdj-sug-a { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bdj-conf { padding: 2px 9px; border: 1px solid var(--line-strong); background: var(--vz-bg); border-radius: 999px; color: var(--ink-soft); font-size: 11px; font-weight: 500; }
.bdj-conf.alta { border-color: var(--vz-ok-line); background: var(--vz-ok-tint); color: var(--vz-ok-text); }
.bdj-conf.media { border-color: var(--vz-warn-line); background: var(--vz-warn-tint); color: var(--vz-warn-text); }
.bdj-conf.baja { border-color: var(--vz-bad-line); background: var(--vz-bad-tint); color: var(--vz-bad-text); }
.bdj-modos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.bdj-modo { padding: 6px 8px; border: 1px solid var(--line-strong); background: var(--vz-chip); border-radius: 999px; color: var(--ink-soft); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: border-color .15s; }
.bdj-modo:hover:not(:disabled) { border-color: var(--ink-faint); }
.bdj-modo.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.bdj-modo:disabled { cursor: default; opacity: .7; }
.bdj-handoff { display: flex; align-items: flex-start; gap: 8px; padding: 9px 10px; border: 1px solid var(--vz-warn-line); background: var(--vz-warn-tint); border-radius: 8px; color: var(--vz-warn-text); font-size: 12px; line-height: 1.4; }
.bdj-handoff svg { flex: none; margin-top: 1px; }
.bdj-modochip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border: 1px solid var(--line-strong); background: var(--vz-chip); border-radius: 999px; color: var(--ink-soft); font: inherit; font-size: 11.5px; font-weight: 500; white-space: nowrap; cursor: pointer; }
.bdj-modochip.recomienda { border-color: var(--vz-accent-line); background: var(--accent-soft); color: var(--vz-accent-text); }
.bdj-modochip.auto { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }

/* Panel de detalles */
.bdj-det { min-height: 0; overflow-y: auto; border-left: 1px solid var(--line); background: var(--vz-bg); }
.bdj-det-h { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--vz-bg); }
.bdj-det-sec { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-bottom: 1px solid var(--line); }
.bdj-det-id { flex-direction: row; align-items: center; gap: 12px; }
.bdj-det-nom { min-width: 0; }
.bdj-det-nom b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 700; letter-spacing: -.02em; }
.bdj-det-nom .bdj-sub { font: 400 12px 'Archivo', system-ui, sans-serif; letter-spacing: 0; }
.bdj-det-t { display: flex; align-items: center; justify-content: space-between; }
.bdj-det-ayuda { font-size: 12px; line-height: 1.45; color: var(--ink-soft); }
.bdj-det-cli { font-size: 13px; }
.bdj-ped { display: flex; justify-content: space-between; padding: 6px 10px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 8px; font-size: 12.5px; }
.bdj-pipe { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.bdj-pipe-i { position: relative; display: flex; align-items: flex-start; gap: 12px; padding-bottom: 14px; }
.bdj-pipe-i:last-child { padding-bottom: 0; }
.bdj-pipe-l { position: absolute; left: 7px; top: 18px; bottom: -2px; width: 1px; background: var(--vz-line-2); }
.bdj-pipe-l.hecha { background: var(--accent); }
.bdj-pipe-p { position: relative; z-index: 1; flex: none; display: grid; place-items: center; width: 15px; height: 15px; margin-top: 2px; padding: 0; border: 1px solid var(--vz-line-2); background: var(--vz-bg); border-radius: 50%; color: var(--accent-ink); cursor: pointer; }
.bdj-pipe-p:hover:not(:disabled) { border-color: var(--accent); }
.bdj-pipe-p.hecha { border-color: var(--accent); background: var(--accent); }
.bdj-pipe-p.actual { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 4px var(--vz-accent-line); }
.bdj-pipe-p.actual.mala { border-color: var(--vz-bad); background: var(--vz-bad); box-shadow: 0 0 0 4px var(--vz-bad-line); }
.bdj-pipe-p:disabled, .bdj-pipe-n:disabled { cursor: default; }
.bdj-pipe-n { padding: 0; border: 0; background: transparent; color: var(--ink-soft); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.bdj-pipe-n:hover:not(:disabled) { color: var(--ink); }
.bdj-pipe-n.on { color: var(--vz-accent-text); font-weight: 650; }
.bdj-ficha { display: grid; grid-template-columns: 1fr 1.3fr auto; gap: 6px; align-items: center; }
.bdj-ficha input, .bdj-det textarea { min-width: 0; padding: 7px 9px; border: 1px solid var(--line-strong); background: var(--vz-bg); border-radius: 8px; color: var(--ink); font: inherit; font-size: 13px; }
.bdj-det textarea { resize: vertical; }
.bdj-det .btn { align-self: flex-start; }
.bdj-del { color: var(--ink-faint); font-size: 12.5px; text-decoration: none; text-align: left; }
.bdj-del:hover { color: var(--vz-bad-text); }

/* El asistente flotante pasa al hueco del menú de la izquierda (a la derecha de la barra de secciones) mientras se ve la Bandeja: ahí no tapa ni el botón de enviar ni las notas */
@media (min-width: 761px) {
  body:has(.vz-main.llena) .asis-wrap { right: auto; left: calc(var(--rail-w, 72px) + 12px); bottom: 76px; align-items: flex-start; transition: left .66s var(--suave); }
}

/* Pantallas medianas y angostas */
@media (max-width: 1400px) {
  .bdj { grid-template-columns: 330px minmax(0, 1fr); }
  .bdj.con-det { grid-template-columns: 330px minmax(0, 1fr) 300px; }
}
@media (max-width: 1240px) {
  .bdj, .bdj.con-det { grid-template-columns: 320px minmax(0, 1fr); }
  .bdj-det { position: absolute; right: 0; top: 0; bottom: 0; z-index: 6; width: min(320px, 88vw); box-shadow: var(--shadow); }
}
@media (max-width: 1100px) {
  .vz-nav { width: 68px; align-items: center; padding: 14px 8px; }
  .vz-gt, .vz-ut, .vz-t, .vz-gt-fila { display: none; }
  .vz-menu { align-items: center; gap: 10px; }
  .vz-grupo { align-items: center; }
  .vz-nav-i { position: relative; justify-content: center; width: 44px; padding: 10px; }
  .vz-nav-b { position: absolute; top: 1px; right: 1px; min-width: 16px; height: 16px; padding: 0 4px; font-size: 9.5px; }
  .vz-user { padding: 6px 0; }
}
@media (max-width: 760px) {
  .vz-page { flex-direction: column; align-items: stretch; --vz-strip: 57px; }
  .vz-nav { position: sticky; top: var(--hdr-h, 108px); z-index: 30; flex-direction: row; align-items: center; gap: 4px; width: 100%; height: auto; padding: 8px 10px; overflow: auto hidden; border-right: 0; border-bottom: 1px solid var(--nv-line); }
  .vz-resto, .vz-user { display: none; }
  .vz-menu, .vz-grupo { flex-direction: row; gap: 4px; }
  .vz-nav-i { width: auto; flex: none; padding: 8px 12px; }
  .vz-nav-i .vz-t { display: inline; }
  .vz-nav-b { position: static; }
  .vz-main.pagina .vz-cuerpo { padding: 14px 12px; }
  .bdj, .bdj.con-det { grid-template-columns: 1fr; }
  .bdj.ver-lista .bdj-chat { display: none; }
  .bdj:not(.ver-lista) .bdj-lista { display: none; }
  .bdj-atras { display: block; }
  .bdj-msgs { padding: 14px 12px; }
  .bdj-msg { max-width: 85%; }
  .bdj-wa { display: none; }
  /* En el celular el asistente flotante taparía el botón de enviar: se oculta mientras se ve la Bandeja */
  body:has(.vz-main.llena) .asis-wrap { display: none; }
}

/* ===== La misma forma de Vocero para todo Comercial (CRM, Plan vs pedidos, Post-entrega, Estadísticas, Resultados y Agente) =====
   Tarjetas con el encabezado separado por un filo, indicadores con la etiqueta arriba, tablas con encabezado en mono, pastillas,
   tableros y ventanas. Los colores siguen saliendo del tema elegido. */
.vz { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.vz ::selection { background: var(--accent); color: var(--accent-ink); }
.vz .subnav { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.vz .subnav .btn, .vz .hist-filtros .btn, .vz .card-h .btn, .vz .pg-modal .btn, .vz .pg-pie .btn { white-space: nowrap; }

/* Tarjetas */
.vz .card { box-shadow: var(--vz-shadow-sm); }
.vz .card-h { flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.vz .card-h h3 { font-size: 15px; font-weight: 700; letter-spacing: -.02em; }
.vz .card-h .sub { font-size: 12px; color: var(--ink-faint); }
.vz .card-b { padding: 16px; }

/* Indicadores: la etiqueta arriba y el número debajo */
.vz .kpis, .vz .st-kpis { gap: 10px; }
.vz .kpi, .vz .st-kpi { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; box-shadow: none; }
.vz .kpi .l, .vz .st-kpi .l { order: -1; margin: 0; font-size: 12px; font-weight: 500; line-height: 1.3; letter-spacing: 0; text-transform: none; color: var(--ink-soft); }
.vz .kpi .v, .vz .st-kpi .v { margin-top: 2px; font-family: inherit; font-size: 22px; font-weight: 600; line-height: 1.2; letter-spacing: -.02em; }
.vz .kpi .src { margin-top: 2px; font-size: 11px; color: var(--ink-faint); }
.vz .st-kpi.clickable:hover { border-color: var(--line-strong); background: var(--vz-hover); }
.vz .kpi-btn { background: var(--surface-2); }
.vz .kpi-btn.sel { border-color: var(--accent); background: var(--accent-soft); }

/* Pestañas y filtros en pastilla */
.vz .tab { padding: 5px 12px; border: 1px solid var(--line-strong); background: var(--vz-chip); border-radius: 999px; color: var(--ink-soft); font: inherit; font-size: 12.5px; font-weight: 600; transition: border-color .15s, background .15s, color .15s; }
.vz .tab:hover { background: var(--vz-chip); border-color: var(--ink-faint); color: var(--ink); }
.vz .tab.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.vz .seg { padding: 3px; border-color: var(--line-strong); background: var(--vz-chip); border-radius: 999px; }
.vz .seg button { padding: 4px 11px; border-radius: 999px; color: var(--ink-soft); font-weight: 600; }
.vz .seg button.on { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.vz .loc-chip { padding: 4px 10px; border-color: var(--line-strong); background: var(--vz-chip); border-radius: 999px; color: var(--ink-soft); font-size: 12px; font-weight: 500; }
.vz .loc-chip:hover { border-color: var(--ink-faint); }
.vz .loc-chip.on { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.vz .loc-chip.on i { box-shadow: 0 0 0 2px var(--accent-ink); }
.vz .loc-edit { border-radius: 999px; border-color: var(--line-strong); }
.vz .cli-buscar { padding: 7px 14px; border-color: var(--line-strong); background: var(--vz-chip); border-radius: 999px; box-shadow: var(--vz-shadow-sm); }
.vz .crm-semana { border-color: var(--line-strong); background: var(--vz-chip); border-radius: 12px; }
.vz .crm-semana .cs-lbl.on { background: var(--accent-soft); }
.vz .crm-semana button:hover { background: var(--vz-hover); }
.vz .hist-filtros { border-color: var(--line-strong); border-radius: 12px; }
.vz .hist-filtros .hf label { font: 500 10.5px 'IBM Plex Mono', ui-monospace, monospace; letter-spacing: .12em; color: var(--ink-faint); }
.vz .hist-filtros .hf input, .vz .hist-filtros .hf select, .vz .pg-temp, .vz .tbl input, .vz .tbl select, .vz .cli-sel { background: var(--vz-bg); border-color: var(--line-strong); border-radius: 9px; }
.vz .pg-check input, .vz .kcol-sel input, .vz .kc-chk, .vz .dash-wcheck input { accent-color: var(--accent); }

/* Tablas con el encabezado en mono */
.vz .tbl { font-size: 13px; }
.vz .tbl th { padding: 9px 12px; border-bottom: 1px solid var(--line-strong); background: var(--surface-2); color: var(--ink-soft); font: 500 10.5px 'IBM Plex Mono', ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.vz .tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.vz .tbl tr:hover td { background: var(--vz-row); }
.vz .tbl td > .dot { margin-right: 7px; }
.vz .ped-row.head { font: 500 10.5px 'IBM Plex Mono', ui-monospace, monospace; letter-spacing: .12em; color: var(--ink-faint); }

/* Tablero de pedidos: columnas como las del pipeline de Vocero */
.vz .kcol { padding: 0 8px 8px; border-color: var(--line-strong); background: var(--surface-2); border-radius: 12px; }
.vz .kcol-h { padding: 10px 6px; font-size: 13.5px; font-weight: 700; letter-spacing: -.02em; }
.vz .kcol-h .count { padding: 1px 8px; border-color: var(--line-strong); background: var(--vz-chip); color: var(--ink-faint); font: 500 11px 'IBM Plex Mono', ui-monospace, monospace; }
.vz .kcol-sel { background: var(--vz-chip); border-color: var(--line-strong); }
.vz .kcol-go { background: var(--accent); color: var(--accent-ink); }
.vz .kcol-pdf { border-color: var(--line-strong); border-radius: 999px; }
.vz .kcol-pdf:hover:not(:disabled) { background: var(--accent); color: var(--accent-ink); }
.vz .kcard { border-color: var(--line); background: var(--surface); border-radius: 12px; box-shadow: var(--vz-shadow-sm); transition: border-color .15s; }
.vz .kcard:hover { border-color: var(--line-strong); }
.vz .kcard .kc-name { font-family: inherit; font-weight: 600; letter-spacing: -.01em; }
.vz .karrow { border-color: var(--line-strong); background: var(--vz-chip); }
.vz .karrow:hover { background: var(--accent-soft); }
.vz .kc-doc { border-radius: 999px; }
.vz .perfil-id h2 { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }

/* Pastillas de estado */
.vz .badge { padding: 2px 9px; border: 1px solid var(--vz-accent-line); background: var(--accent-soft); color: var(--vz-accent-text); font-size: 11px; font-weight: 500; letter-spacing: 0; }
.vz .badge.neutral { border-color: var(--line-strong); background: var(--vz-chip); color: var(--ink-soft); }
.vz .badge.glacier { border-color: var(--vz-info-line); background: var(--vz-info-tint); color: var(--vz-info-text); }
.vz .badge.warn, .vz .badge.warn-b { border-color: var(--vz-bad-line); background: var(--vz-bad-tint); color: var(--vz-bad-text); }
.vz .badge.ok { border-color: var(--vz-ok-line); background: var(--vz-ok-tint); color: var(--vz-ok-text); }

/* Avisos */
.vz .banner { border-radius: 10px; font-size: 13px; }
.vz .banner.warn, .vz .pg-aviso { border: 1px solid var(--vz-warn-line); background: var(--vz-warn-tint); color: var(--vz-warn-text); }
.vz .pg-aviso { border-radius: 10px; }
.vz .pg-aviso b { color: inherit; }
.vz .banner.ok { border-color: var(--vz-accent-line); background: var(--accent-soft); color: var(--vz-accent-text); }
.vz .banner.info { border-color: var(--line-strong); background: var(--surface-2); color: var(--ink-soft); }
.vz .pg-vacio { color: var(--ink-faint); }

/* Botones secundarios y ventanas */
.vz .btn.ghost { border-color: transparent; background: transparent; color: var(--ink-soft); }
.vz .btn.ghost:hover { border-color: transparent; background: var(--vz-hover); color: var(--ink); transform: none; }
.vz .btn.danger { border-color: var(--vz-bad-line); background: transparent; color: var(--vz-bad-text); }
.vz .btn.danger:hover { border-color: var(--vz-bad); background: var(--vz-bad-tint); }
.vz .modal-bg { background: rgba(10, 24, 18, .55); }
[data-theme="oscuro"] .vz .modal-bg { background: rgba(2, 8, 6, .72); }
.vz .modal { padding: 20px; border: 1px solid var(--line-strong); background: var(--vz-bg); border-radius: 16px; box-shadow: 0 30px 80px -20px rgba(10, 24, 18, .4), 0 8px 24px -12px rgba(10, 24, 18, .2); }
.vz .modal h3 { font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.vz .field label { font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink-soft); }
.vz .field input, .vz .field select, .vz .field textarea { padding: 8px 12px; border-color: var(--line-strong); background: var(--vz-bg); border-radius: 10px; font-family: inherit; font-size: 14px; }

/* Al imprimir o guardar como PDF (botón «Imprimir / PDF» de Resultados) sale solo la pantalla: sin el menú de la izquierda ni los márgenes de la zona */
@media print {
  .vz-nav { display: none !important; }
  .vz-page { display: block; min-height: 0; }
  .vz-main.pagina { min-height: 0; background: #fff; }
  .vz-main.pagina .vz-cuerpo { max-width: none; padding: 0; }
  .vz-ph { padding: 0 0 10px; border-bottom: 0; }
}

/* Resultados */
.res-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.res-chip { border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-soft); border-radius: 999px; padding: 6px 13px; font: inherit; font-size: 13px; cursor: pointer; }
.res-chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.dash-f input[type="date"] { font-family: var(--font-body); font-size: 13.5px; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 9px; padding: 6px 10px; outline: none; }
.res-delta { font-size: 11.5px; font-weight: 600; }
.res-delta.bien { color: var(--ok); }
.res-delta.mal { color: var(--warn); }
.res-delta.flat { color: var(--ink-faint); font-weight: 500; }
.res-nota { margin-top: 12px; font-size: 12.5px; color: var(--ink-soft); line-height: 1.45; }
.res-caidas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 28px; }
.res-caida-h { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.res-n { font-size: 11.5px; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-faint); }
.res-n.hay { background: var(--warn); color: #fff; }
.res-caida-sub { font-size: 12px; color: var(--ink-faint); margin: 2px 0 8px; }
.res-caida-fila { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13px; }
.res-caida-nom { font-weight: 600; flex: none; max-width: 38%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-caida-det { flex: 1; color: var(--ink-soft); min-width: 0; }
.res-caida-ok { font-size: 12.5px; color: var(--ink-soft); }
@media (max-width: 900px) { .res-caidas { grid-template-columns: 1fr; } }
@media print { .dash-no-print { display: none !important; } }

/* Pantalla Agente IA */
.agt { display: flex; flex-direction: column; gap: 14px; }
.agt-modos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 8px; }
.agt-modo { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; text-align: left; border: 2px solid var(--line); background: var(--surface); color: var(--ink-soft); border-radius: 12px; padding: 12px 14px; font: inherit; font-size: 12.5px; line-height: 1.35; cursor: pointer; }
.agt-modo b { color: var(--ink); font-size: 14px; }
.agt-modo-i { font-size: 20px; }
.agt-modo.on { border-color: var(--accent); background: var(--accent-soft); }
.agt-modo:disabled { cursor: default; opacity: .8; }
.agt-sub { font-size: 12px; color: var(--ink-soft); }
.agt-fila { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: end; margin-top: 10px; }
.agt-fila select, .agt-form input, .agt-form textarea, .agt-nuevo input, .agt-nuevo textarea, .agt-kb input, .agt-kb textarea, .agt .card-b > textarea, .agt-busca { width: 100%; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface-2); color: var(--ink); font: inherit; font-size: 13.5px; box-sizing: border-box; }
.agt-form { display: flex; flex-direction: column; gap: 12px; }
.agt-form .agt-fila { grid-template-columns: 1fr 1fr; }
.agt-form input[type="range"] { padding: 0; }
.agt-form input[type="checkbox"], .agt-ej-a input[type="checkbox"] { width: auto; }
.agt-conex { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.agt-ok { color: var(--ok); font-size: 13px; }
.agt-mal { color: var(--warn); font-size: 13px; }
.agt-aviso { margin-top: 12px; font-size: 12px; color: var(--ink-soft); background: var(--surface-2); border-radius: 8px; padding: 8px 10px; }
.agt-aprende { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 24px; align-items: start; }
.agt-tasa-n { font-family: var(--font-head); font-size: 44px; line-height: 1; color: var(--ink); }
.agt-tasa-l { font-size: 12.5px; color: var(--ink-soft); margin: 4px 0 10px; }
.agt-meta { position: relative; height: 8px; border-radius: 99px; background: color-mix(in oklab, var(--ink) 10%, transparent); }
.agt-meta i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.agt-meta b { position: absolute; top: -4px; width: 2px; height: 16px; background: var(--ink); opacity: .55; }
.agt-listo { margin-top: 10px; font-size: 12.5px; color: var(--ink-soft); line-height: 1.4; }
.agt-listo.si { color: var(--ok); font-weight: 600; }
.agt-barra { display: flex; height: 14px; border-radius: 99px; overflow: hidden; background: var(--surface-2); }
.agt-leyenda { list-style: none; margin: 10px 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; font-size: 12.5px; color: var(--ink-soft); }
.agt-leyenda li { display: flex; align-items: center; gap: 7px; }
.agt-leyenda i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.agt-leyenda b { margin-left: auto; color: var(--ink); }
.agt-leyenda span { color: var(--ink-faint); }
.agt-datos { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; color: var(--ink-soft); }
.agt-datos b { color: var(--ink); }
.agt-vacio { font-size: 13px; color: var(--ink-soft); padding: 10px 0; }
.agt-lista { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; max-height: 420px; overflow-y: auto; }
.agt-ej, .agt-kb { border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; background: var(--surface); display: flex; flex-direction: column; gap: 5px; font-size: 13px; }
.agt-ej.off, .agt-kb.off { opacity: .55; }
.agt-ej-t { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-faint); }
.agt-tag { border-radius: 999px; padding: 1px 8px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-soft); }
.agt-tag.ok { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.agt-ej-a { display: flex; justify-content: space-between; align-items: center; }
.agt-sw { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-soft); cursor: pointer; }
.agt-nuevo { display: flex; flex-direction: column; gap: 8px; border-top: 1px dashed var(--line-strong); padding-top: 12px; margin-top: 6px; }
.agt-nuevo .btn { align-self: flex-start; }
.agt-tabs { display: flex; gap: 4px; }
.agt-precios { font-size: 13px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.agt-precios-l { columns: 2; margin: 8px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--ink-soft); max-height: 220px; overflow-y: auto; }
.agt-res { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--surface-2); }
.agt-res-h { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.agt-res-t { white-space: pre-wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; font-size: 14px; line-height: 1.4; }
.agt-det { font-size: 12.5px; }
.agt .btn.primary { align-self: flex-start; }
@media (max-width: 900px) { .agt-modos, .agt-aprende, .agt-fila, .agt-form .agt-fila { grid-template-columns: 1fr; } .agt-precios-l { columns: 1; } }

/* Barra izquierda en el celular y en pantallas angostas: pasa abajo, con los mismos 4 íconos y sus nombres */
@media (max-width: 760px) {
  .app-shell { flex-direction: column; align-items: stretch; }
  .app-col { padding-bottom: 70px; }
  .rail { position: fixed; top: auto; bottom: 0; left: 0; right: 0; width: 100%; height: auto; z-index: 55; }
  .rail-panel, .rail:hover .rail-panel, .rail:has(:focus-visible) .rail-panel {
    position: static; width: 100%; flex-direction: row; justify-content: center; gap: 0; padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
    border-right: 0; border-top: 1px solid var(--line-strong); box-shadow: 0 -6px 20px rgba(0,0,0,.08); overflow: visible; transition: none;
  }
  .rail-logo { display: none; }
  .rail-nav { flex-direction: row; justify-content: space-around; gap: 4px; }
  .rail-i { flex: 1; flex-direction: column; gap: 2px; align-items: center; justify-content: center; border-radius: 14px; }
  .rail-ic { width: 42px; height: 42px; }
  .rail-ind { display: none; }
  .rail-i.on .rail-ic { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
  .rail-t, .rail:hover .rail-t { opacity: 1; font-size: 11px; }
  .asis-wrap { bottom: 86px; }
  .vz-main.llena, .vz-main.tablero { height: calc(100vh - var(--hdr-h, 108px) - var(--vz-strip, 0px) - 70px); }
}
@media print {
  .rail { display: none !important; }
}

/* ===== Actualización visual (nov 2026) · base compartida =====
   Los colores del logo pasan a ser acentos de la interfaz, el lienzo gana ambiente, las tarjetas se suavizan
   y las pestañas de cada pantalla son píldoras. Solo forma y color: no cambia la estructura de ninguna pantalla.
   Comercial (.vz) conserva su propia capa, que pesa más que estas reglas. */
:root {
  --hl-cielo: #6CD2F1; --hl-teal: #008D82; --hl-verde: #54AD7D; --hl-lima: #A9C871;
  --hl-sol: #E2A93B; --hl-tierra: #B98A5E; --hl-uva: #8E6BBF;
  --grad-marca: linear-gradient(90deg, var(--hl-teal) 0%, var(--hl-verde) 55%, var(--hl-lima) 100%);
  --sombra-suave: 0 1px 2px rgba(32,52,44,.04), 0 14px 30px -18px rgba(32,52,44,.22);
}
[data-theme="oscuro"] { --sombra-suave: 0 1px 2px rgba(0,0,0,.35), 0 14px 30px -14px rgba(0,0,0,.6); }
/* Fondo más claro y limpio (menos plomo); las líneas acompañan */
[data-theme="patagonia"] { --bg: #F9FBF6; --surface-2: #F5F8F1; --line: #E1E8DB; }
[data-theme="claro"], :root:not([data-theme]) { --bg: #FAF7F0; }

/* Lienzo: un velo de cielo y de pasto detrás de todo, fijo (no se mueve al desplazar) */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1100px 520px at 6% -8%, color-mix(in oklab, var(--hl-cielo) 26%, transparent), transparent 70%),
    radial-gradient(1000px 480px at 97% -6%, color-mix(in oklab, var(--hl-lima) 24%, transparent), transparent 70%);
}
[data-theme="oscuro"] body::before { opacity: .35; }

/* El contenido usa todo el ancho de la pantalla: sin franjas vacías a los lados en monitores grandes,
   y alineado con la cabecera */
.main { max-width: none; }

.card { border-radius: 20px; border-color: color-mix(in oklab, var(--line) 80%, transparent); box-shadow: var(--sombra-suave); }
.card-h h3 { font-size: 16.5px; letter-spacing: -.01em; }
.kpi { border-radius: 18px; box-shadow: var(--sombra-suave); }
.btn { border-radius: 11px; }
.btn.sm { border-radius: 9px; }
.btn.primary { box-shadow: 0 8px 16px -10px color-mix(in oklab, var(--accent) 85%, transparent); }

/* Pestañas de cada pantalla (Resumen, Planificación…): píldoras; la activa, rellena */
.main .subnav .tab { border-radius: 999px; padding: 7px 15px; border: 1px solid transparent; transition: background .18s, color .18s, box-shadow .18s; }
.main .subnav .tab:hover { background: color-mix(in oklab, var(--accent) 10%, transparent); color: var(--ink); }
.main .subnav .tab.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; box-shadow: 0 8px 18px -10px color-mix(in oklab, var(--accent) 90%, transparent); }

/* Menú lateral y cabecera: los íconos sin elegir dejan de ser un gris suelto (van en un botón claro, con tinte verde),
   el nombre de la sección toma el color de la marca y la pestaña abierta de la cabecera es una píldora blanca */
.rail-i:not(.on) .rail-ic { color: color-mix(in oklab, var(--accent) 62%, var(--ink-soft)); background: color-mix(in oklab, var(--surface) 62%, transparent); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--accent) 14%, transparent); }
.rail-i:not(.on):hover .rail-ic { color: var(--accent); background: var(--surface); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--accent) 30%, transparent), 0 6px 14px -8px color-mix(in oklab, var(--accent) 70%, transparent); }
.subnav-sec { color: var(--accent); font-weight: 700; letter-spacing: .1em; }
.subtab { border-radius: 999px; padding: 6px 14px; }
.subtab.active { background: var(--surface); color: var(--accent); box-shadow: 0 1px 2px rgba(32,52,44,.06), 0 8px 16px -10px rgba(32,52,44,.3); }

/* ---------- Tablero del huerto (se abre desde el logo) ----------
   La maqueta 3D cubre la ventana con el clima y, debajo, el resumen de la semana o del día.
   Entra «acercándose» al logo: el logo crece hacia la persona y la maqueta se abre en un círculo desde ese punto
   (--ox, --oy: centro del logo en pantalla). Al salir se recoge hacia el mismo punto. */
.tablero-capa { position: fixed; inset: 0; z-index: 9980; background: var(--scene-sky); overflow: hidden; }
.tablero-capa .scene-wrap.completa { position: absolute; inset: 0; z-index: auto; }
.tablero-capa.entra { animation: tabEntra 1.25s cubic-bezier(.76, 0, .18, 1) both; }
.tablero-capa.sale { animation: tabSale .6s cubic-bezier(.6, 0, .3, 1) both; pointer-events: none; }
@keyframes tabEntra {
  0% { clip-path: circle(0px at var(--ox) var(--oy)); }
  30% { clip-path: circle(34px at var(--ox) var(--oy)); }
  100% { clip-path: circle(150vmax at var(--ox) var(--oy)); }
}
@keyframes tabSale {
  from { clip-path: circle(150vmax at var(--ox) var(--oy)); }
  to { clip-path: circle(0px at var(--ox) var(--oy)); }
}
/* El logo que se viene encima: parte del tamaño del botón, crece hacia el centro y se deshace sobre la maqueta */
.tablero-zoom {
  position: fixed; z-index: 9985; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%; background: #fff; pointer-events: none;
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--accent) 40%, transparent), 0 4px 18px rgba(14, 23, 20, .18);
  animation: tabLogo 1.1s cubic-bezier(.6, 0, .25, 1) both;
}
@keyframes tabLogo {
  0% { transform: scale(1); opacity: 1; }
  32% { transform: scale(2.4); opacity: 1; }
  100% { transform: translate(calc(50vw - var(--ox)), calc(46vh - var(--oy))) scale(12); opacity: 0; }
}
/* Los cuadros del tablero llegan después de abrirse el círculo */
.tablero-capa.entra .tablero-col > *, .tablero-capa.entra .scene-tools, .tablero-capa.entra .scene-legend, .tablero-capa.entra .scene-norte { animation: tabCuadro .5s ease both; animation-delay: .8s; }
.tablero-capa.entra .tablero-col > * + * { animation-delay: .92s; }
@keyframes tabCuadro { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }
@keyframes tabFundido { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .tablero-capa.entra { animation: tabFundido .2s ease both; }
  .tablero-capa.sale { animation: tabFundido .2s ease reverse both; }
  .tablero-zoom { display: none; }
  .tablero-capa.entra .tablero-col > *, .tablero-capa.entra .scene-tools, .tablero-capa.entra .scene-legend, .tablero-capa.entra .scene-norte { animation: none; }
}

/* Columna izquierda del tablero: clima arriba y resumen debajo; si no caben, la columna se desplaza */
.tablero-col { position: absolute; left: 12px; top: 12px; bottom: 58px; z-index: 5; width: 288px; max-width: calc(100vw - 70px); display: flex; flex-direction: column; align-items: flex-start; gap: 10px; overflow-y: auto; overflow-x: hidden; padding: 0 6px 6px 0; pointer-events: none; scrollbar-width: thin; }
.tablero-col > * { pointer-events: auto; flex: none; }
.tablero-col .clima-hud { position: static; max-height: none; overflow: visible; }
.tablero-col .clima-hud:not(.compacto) { width: 100%; box-sizing: border-box; }
.tb-panel { width: 100%; box-sizing: border-box; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in oklab, var(--surface) 92%, transparent); backdrop-filter: blur(6px); color: var(--ink); font-size: 12.5px; line-height: 1.35; box-shadow: 0 6px 22px rgba(15, 34, 24, .16); }
.tb-cab { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tb-cab b { display: block; font-family: var(--font-head); font-size: 15px; }
.tb-cab span { font-size: 11px; color: var(--ink-soft); }
.tb-modo { display: inline-flex; flex: none; padding: 3px; border-radius: 999px; background: color-mix(in oklab, var(--ink) 9%, transparent); }
.tb-modo button { padding: 4px 11px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-soft); font: inherit; font-size: 11.5px; font-weight: 700; cursor: pointer; transition: background .2s, color .2s; }
.tb-modo button.on { background: var(--accent); color: var(--accent-ink, #fff); }
.tb-modo button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.tb-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line); }
.tb-kpis div { display: flex; flex-direction: column; min-width: 0; }
.tb-kpis span, .tb-h b { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); }
.tb-kpis b { font-family: var(--font-head); font-size: 19px; font-variant-numeric: tabular-nums; }
.tb-kpis small, .tb-cos small { font-size: 11px; font-weight: 600; color: var(--ink-soft); }
.tb-sec { margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line); }
.tb-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 5px; }
.tb-h span { font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tb-barra { height: 6px; border-radius: 999px; background: color-mix(in oklab, var(--ink) 10%, transparent); overflow: hidden; }
.tb-barra i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .5s ease; }
.tb-barra.mal i { background: var(--warn); }
.tb-panel ul { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.tb-panel li { display: flex; align-items: center; gap: 7px; min-width: 0; }
.tb-panel li > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-panel li > b { flex: none; font-variant-numeric: tabular-nums; }
.tb-grupos i, .tb-lista i { flex: none; width: 18px; text-align: center; font-style: normal; }
.tb-lista li { align-items: flex-start; }
.tb-lista li > span { white-space: normal; }
.tb-panel li.hecho { color: var(--ink-soft); }
.tb-lista li.hecho i, .tb-grupos li.hecho b { color: var(--accent); font-weight: 700; }
.tb-cos i { flex: none; width: 9px; height: 9px; border-radius: 3px; }
.tb-nota { margin: 6px 0 0; font-size: 11.5px; color: var(--ink-soft); }
.tb-nota.mal { color: var(--warn); font-weight: 600; }
.tb-ir { margin-top: 11px; width: 100%; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--ink); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.tb-ir:hover { background: var(--accent-soft); }
@media (max-width: 700px) { .tablero-col { width: 232px; } }

/* El logo ya no guarda la barra: lo hace el último botón del menú; con la barra guardada, «Menú» la devuelve */
.rail-guardar { opacity: .75; }
.rail-guardar:hover { opacity: 1; }
.rail-volver { flex: none; }

/* ---------- Oficina del centro de operaciones (dentro del tablero) ----------
   Se entra apretando el centro de operaciones en la maqueta. Es una maqueta isométrica de la oficina con tres escritorios;
   cada uno lleva a su sección. Al elegir uno, la vista se mete en su monitor (.yendo) y el tablero se desvanece (.va). */
.oficina-zona { cursor: pointer; }
.oficina-zona polygon { fill: transparent; stroke: transparent; stroke-width: .5; stroke-linejoin: round; transition: fill .2s, stroke .2s; }
.oficina-zona:hover polygon { fill: rgba(255, 255, 255, .24); stroke: #FFFFFF; }
.oficina-zona rect { fill: var(--accent); stroke: #FFFFFF; stroke-width: .35; }
.oficina-zona text { fill: #FFFFFF; }
.oficina-zona:hover rect { fill: color-mix(in oklab, var(--accent) 80%, #000); }

.oficina { position: absolute; inset: 0; z-index: 20; overflow: hidden; background: var(--scene-sky); animation: ofEntra .6s cubic-bezier(.2, .7, .2, 1) both; }
.oficina svg { display: block; width: 100%; height: 100%; font-family: var(--font-head); user-select: none; }
@keyframes ofEntra { from { opacity: 0; transform: scale(1.4); } to { opacity: 1; transform: none; } }
.oficina.saliendo { animation: ofSale .36s ease both; pointer-events: none; }
@keyframes ofSale { to { opacity: 0; transform: scale(1.18); } }
.oficina.yendo { animation: none; transform: scale(11); transition: transform .9s cubic-bezier(.62, 0, .3, 1); pointer-events: none; }
.oficina.yendo .of-barra, .oficina.yendo .of-rot, .oficina.yendo .of-guia, .oficina.yendo .of-guia-p, .oficina.yendo .of-riel { opacity: 0; transition: opacity .2s; }
.tablero-capa.va { animation: tabVa .9s ease both; pointer-events: none; }
@keyframes tabVa { 0%, 60% { opacity: 1; } 100% { opacity: 0; } }

/* Escritorios: al señalar uno se levanta apenas, brilla con el color de su sección y los otros dos se apagan un poco */
.of-esc { cursor: pointer; outline: none; }
.of-mueble { transition: transform .35s cubic-bezier(.2, .8, .2, 1), filter .3s, opacity .3s; }
.of-esc.sobre .of-mueble { transform: translateY(-8px); filter: drop-shadow(0 10px 14px color-mix(in srgb, var(--of) 70%, transparent)); }
.oficina svg:has(.of-esc.sobre) .of-esc:not(.sobre) .of-mueble { filter: saturate(.55) brightness(.9); opacity: .82; }
.of-guia { stroke-width: 2; stroke-dasharray: 2 6; stroke-linecap: round; opacity: .75; transition: opacity .2s; }
.of-rot { filter: drop-shadow(0 4px 10px rgba(20, 30, 24, .22)); }
.of-rot rect, .of-rot circle, .of-rot text { transition: fill .2s; }
.of-esc.sobre .of-rot rect { fill: var(--of); }
.of-esc.sobre .of-rot text { fill: #FFFFFF; }
.of-esc.sobre .of-rot circle { fill: #FFFFFF; }
.of-esc.sobre .of-rot text.of-num { fill: var(--of); }
.of-esc:focus-visible .of-rot rect { stroke-width: 5; }
.of-esc.cerrado { cursor: not-allowed; filter: grayscale(.85) opacity(.6); }
.of-pant { animation: ofPant 3.2s ease-in-out infinite; }
@keyframes ofPant { 50% { filter: brightness(1.25); } }
.of-foco { animation: ofFoco 5s ease-in-out infinite; }
@keyframes ofFoco { 50% { opacity: .8; } }
.of-riel { pointer-events: none; }

.of-barra { position: absolute; left: 14px; top: 14px; z-index: 2; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.of-volver { padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px; background: color-mix(in oklab, var(--surface) 94%, transparent); color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; box-shadow: 0 6px 22px rgba(15, 34, 24, .18); }
.of-volver:hover { background: var(--surface); }
.of-volver:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.of-titulo { display: flex; flex-direction: column; padding: 7px 16px; border-radius: 14px; background: color-mix(in oklab, var(--surface) 90%, transparent); backdrop-filter: blur(6px); box-shadow: 0 6px 22px rgba(15, 34, 24, .16); }
.of-titulo b { font-family: var(--font-head); font-size: 15px; color: var(--ink); }
.of-titulo span { font-size: 11.5px; color: var(--ink-soft); }
@media (prefers-reduced-motion: reduce) {
  .oficina, .oficina.saliendo { animation: tabFundido .2s ease both; }
  .oficina.saliendo { animation-direction: reverse; }
  .oficina.yendo { transform: none; transition: none; }
  .of-mueble { transition: none; }
  .of-pant, .of-foco { animation: none; }
}

/* ===== Ficha de cama (detalle al apretar una cama de la maqueta) ===== */
.ficha-cama { position: absolute; top: 12px; right: 56px; bottom: 12px; width: min(350px, calc(100% - 76px)); z-index: 7; display: flex; flex-direction: column; background: color-mix(in oklab, var(--surface) 95%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 30px rgba(15, 34, 24, .22); color: var(--ink); font-size: 12.5px; line-height: 1.4; overflow: hidden; animation: fichaEntra .22s ease; }
@keyframes fichaEntra { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.ficha-cama .fc-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding: 11px 12px 9px 14px; border-bottom: 1px solid var(--line); background: linear-gradient(120deg, color-mix(in oklab, var(--surface) 70%, #BFE3F2), color-mix(in oklab, var(--surface) 80%, #CDEBC4)); }
.ficha-cama .fc-id { display: block; font-family: var(--font-head); font-size: 17px; }
.ficha-cama .fc-sub { color: var(--ink-soft); font-size: 11.5px; }
.ficha-cama .fc-x { flex: none; width: 26px; height: 26px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink-soft); font-size: 12px; cursor: pointer; }
.ficha-cama .fc-x:hover { background: var(--line); }
.ficha-cama .fc-cuerpo { flex: 1 1 auto; overflow-y: auto; padding: 4px 14px 12px; }
.ficha-cama .fc-bloque { padding: 10px 0 8px; border-bottom: 1px dashed var(--line); }
.ficha-cama .fc-bloque:last-child { border-bottom: 0; }
.ficha-cama h4 { margin: 0 0 7px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); font-weight: 700; }
.ficha-cama h4 small { font-weight: 600; letter-spacing: 0; }
.ficha-cama .fc-cult { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.ficha-cama .fc-cult i, .ficha-cama .fc-prox i, .ficha-cama .fc-hist > li > i { display: inline-block; flex: none; width: 11px; height: 11px; border-radius: 3px; }
.ficha-cama .fc-fase { margin-left: auto; padding: 2px 9px; border-radius: 999px; color: #fff; font-size: 10.5px; font-weight: 700; }
.ficha-cama .fc-barra { height: 7px; margin: 8px 0 7px; border-radius: 99px; background: var(--line); overflow: hidden; }
.ficha-cama .fc-barra span { display: block; height: 100%; border-radius: 99px; }
.ficha-cama .fc-dl { margin: 0; }
.ficha-cama .fc-dl > div { display: flex; justify-content: space-between; gap: 10px; padding: 2.5px 0; }
.ficha-cama .fc-dl dt { color: var(--ink-soft); }
.ficha-cama .fc-dl dd { margin: 0; text-align: right; font-weight: 600; }
.ficha-cama .fc-dl dd small { font-weight: 400; color: var(--ink-soft); }
.ficha-cama .fc-vacio { margin: 0 0 4px; color: var(--ink-soft); }
.ficha-cama .fc-prox { margin: 8px 0 2px; padding: 6px 9px; border-radius: 8px; background: color-mix(in oklab, var(--line) 45%, transparent); }
.ficha-cama .fc-prox i { margin: 0 5px -1px 0; }
.ficha-cama .fc-tenue { color: var(--ink-soft); }
.ficha-cama .fc-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.ficha-cama .fc-kpis > div { display: flex; flex-direction: column; padding: 7px 9px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.ficha-cama .fc-kpis b { font-family: var(--font-head); font-size: 19px; line-height: 1.1; }
.ficha-cama .fc-kpis span { color: var(--ink-soft); font-size: 11px; }
.ficha-cama .fc-kpis small { color: var(--ink-soft); font-size: 10.5px; min-height: 12px; }
.ficha-cama .fc-compara { margin: 10px 0 6px; font-size: 11.5px; color: var(--ink-soft); }
.ficha-cama .fc-compara b { color: var(--ink); }
.ficha-cama .fc-dos { position: relative; height: 8px; margin-top: 5px; border-radius: 99px; background: var(--line); }
.ficha-cama .fc-dos span { display: block; height: 100%; border-radius: 99px; background: #5E9A2E; }
.ficha-cama .fc-dos em { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--ink); border-radius: 2px; }
.ficha-cama .fc-notas { margin: 6px 0 0; padding-left: 16px; }
.ficha-cama .fc-notas li { margin: 2px 0; }
.ficha-cama .fc-notas small { color: var(--ink-soft); }
.ficha-cama .fc-aviso { color: var(--warn, #B5541C); font-weight: 600; }
.ficha-cama .fc-tl { display: grid; gap: 1px; height: 20px; }
.ficha-cama .fc-tl i { border-radius: 2px; background: var(--line); }
.ficha-cama .fc-tl i.ahora { outline: 2px solid var(--ink); outline-offset: 1px; position: relative; z-index: 1; }
.ficha-cama .fc-tl-ej { display: flex; justify-content: space-between; margin-top: 4px; font-size: 10.5px; color: var(--ink-soft); }
.ficha-cama .fc-hist { margin: 0; padding: 0; list-style: none; }
.ficha-cama .fc-hist > li { display: flex; gap: 9px; padding: 7px 0; border-top: 1px solid var(--line); }
.ficha-cama .fc-hist > li:first-child { border-top: 0; }
.ficha-cama .fc-hist > li > i { margin-top: 3px; }
.ficha-cama .fc-hist small { margin-left: 4px; color: var(--ink-soft); }
.ficha-cama .fc-etq { margin-left: 6px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line); font-size: 10px; color: var(--ink-soft); }
.ficha-cama .est-en.curso .fc-etq, .ficha-cama .est-en-curso .fc-etq { border-color: #5E9A2E; color: #3F7A1C; }
.ficha-cama .est-planificada { opacity: .85; }
.ficha-cama .fc-fechas, .ficha-cama .fc-prod { color: var(--ink-soft); font-size: 11.5px; }
.ficha-cama .fc-prod { color: var(--ink); }
.ficha-cama .fc-pie { margin: 8px 0 0; font-size: 10.5px; color: var(--ink-soft); }
@media (max-width: 700px) { .ficha-cama { top: auto; right: 8px; left: 8px; bottom: 8px; width: auto; max-height: 62%; } }
@media (prefers-reduced-motion: reduce) { .ficha-cama { animation: none; } }
