/* ==================================================================
   ARGRESIDENCE — DESIGN SYSTEM v7  ("Operational premium")
   ------------------------------------------------------------------
   Filosofía: gramática visual de marketing premium (Apple / Stripe /
   Cloudbeds / Tesla) aplicada a la densidad de un PMS operativo.
   Tipografía display grande y con carácter, degradés de marca en los
   momentos clave, divisores hairline en vez de cajas por todos lados,
   elevación mixta (plano en reposo → sombra al hover), y MOVIMIENTO en
   cada cambio de estado. La identidad ArgResidence (navy → azure) es la
   raíz: nunca blanco/negro plano.  Ver DESIGN.md para las reglas.
   ================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,500;12..96,600;12..96,700;12..96,800&family=Inter:wght@400;500;600;700;800&family=DM+Mono:wght@400;500&display=swap');

:root {
  /* ============ IDENTIDAD DE MARCA — degradé navy → azure ============ */
  /* Un par direccional único, usado en texto hero, métricas clave y CTAs
     primarios — nunca como fondo de cada sección (eso lo vuelve ruido). */
  --brand-navy:    #0e2148;
  --brand-blue:    #2563eb;
  --brand-azure:   #4f9cf0;
  --brand-sky:     #7cc0f7;
  --grad-brand:      linear-gradient(115deg, #0e2148 0%, #1d4ed8 52%, #4f9cf0 100%);
  --grad-brand-rev:  linear-gradient(115deg, #4f9cf0 0%, #1d4ed8 48%, #0e2148 100%);
  --grad-brand-soft: linear-gradient(120deg, #eef4ff 0%, #e6efff 100%);
  --grad-ink:        linear-gradient(120deg, #0e2148 0%, #24406f 100%);

  /* --- Core palette (nombres heredados: valores nuevos) --- */
  --color-primary:       #0e2148;
  --color-primary-hover: #16305f;
  --color-accent:        #1d4ed8;
  --color-accent-hover:  #1740b8;
  --color-accent-light:  #eaf1ff;
  --color-green:         #0f9d68;
  --color-green-hover:   #0b7d53;
  --color-green-light:   #e7f8f0;
  --color-danger:        #e0362f;
  --color-danger-light:  #fdeceb;
  --color-warn:          #d98207;
  --color-warn-light:    #fdf4e3;

  /* --- Surfaces — canvas cálido (no blanco puro), superficies elevadas -- */
  --color-bg:            #f6f5f1;   /* lienzo cálido off-white */
  --color-surface:       #ffffff;
  --color-surface-2:     #f4f3ef;   /* hundido cálido */
  --color-surface-raised:#ffffff;
  --bg-canvas:           #f6f5f1;
  --bg-dark:             #0d1526;   /* sección oscura navy-black (ritmo de página) */
  --bg-dark-2:           #111c33;

  /* --- Borders / hairlines --- */
  --color-border:        #e7e4dc;
  --color-border-strong: #d4d0c5;
  --color-border-light:  #efece5;
  --hairline:            rgba(14,33,72,0.10);   /* divisor fino: se usa EN LUGAR de cajas */
  --hairline-strong:     rgba(14,33,72,0.16);

  /* --- Grid (personalizable desde el modal de colores) --- */
  --grid-line:           #ded9cd;
  --grid-header-bg:      #f1efe8;
  --grid-room-bg:        #edeae1;
  --grid-weekend-bg:     #efeee7;

  /* --- Text / ink --- */
  --color-text:          #14161a;
  --color-text-secondary:#3f4652;
  --color-text-muted:    #6a7280;
  --color-text-subtle:   #9aa1ab;
  --ink-primary:         #14161a;
  --ink-secondary:       #5b5f66;
  --ink-inverse:         #f6f5f1;

  /* --- Grid status colors --- */
  --color-free:          #eef9f2;
  --color-free-hover:    #d8f2e3;
  --color-today:         #e4edff;
  --color-cell-today:    #eef3ff;
  --color-header-bg:     #f1efe8;
  --color-row-hover:     #f4f3ef;

  /* --- Shadows — plano en reposo, elevación como cambio de estado --- */
  --shadow-xs:       0 1px 2px rgba(14,33,72,.05);
  --shadow-sm:       0 1px 2px rgba(14,33,72,.06), 0 4px 12px rgba(14,33,72,.04);
  --shadow-md:       0 4px 16px rgba(14,33,72,.10), 0 2px 5px rgba(14,33,72,.05);
  --shadow-lg:       0 18px 44px rgba(14,33,72,.16), 0 6px 14px rgba(14,33,72,.08);
  --shadow-flat:     none;
  --shadow-raised:   0 1px 2px rgba(14,33,72,.06), 0 4px 12px rgba(14,33,72,.05);
  --shadow-elevated: 0 10px 30px rgba(14,33,72,.12), 0 3px 8px rgba(14,33,72,.06);
  /* Versiones "cero" con la MISMA cantidad de capas que su destino animado —
     el box-shadow solo interpola entre listas del mismo largo; si el reposo usa
     `none` (0 capas) y el hover usa 2 capas, el navegador no interpola: salta a
     mitad de camino. Usar estas como reposo evita ese salto/parpadeo. */
  --shadow-raised-0:   0 1px 2px rgba(14,33,72,0), 0 4px 12px rgba(14,33,72,0);
  --shadow-elevated-0: 0 10px 30px rgba(14,33,72,0), 0 3px 8px rgba(14,33,72,0);
  --shadow-glass:    inset 0 1px 0 rgba(255,255,255,.5), 0 8px 40px rgba(14,33,72,.10);
  --glow-brand:      0 6px 20px rgba(37,99,235,.28);

  /* --- Geometría — MIXTA por jerarquía (no todo el mismo radio) --- */
  --radius:      12px;   /* default medio */
  --radius-sm:   8px;    /* inputs, tags, botones chicos */
  --radius-md:   12px;   /* cards, modales */
  --radius-lg:   18px;   /* paneles grandes, media */
  --radius-xl:   24px;   /* hero / superficies mayores */
  --radius-pill: 999px;  /* CTAs primarios */

  /* --- Escala de espaciado --- */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px;
  --space-12: 48px; --space-16: 64px; --space-24: 96px;

  /* --- Grid --- */
  --col-label: 184px;

  /* --- Tipografía --- */
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Bricolage Grotesque', 'Inter', sans-serif;
  --font-mono:    'DM Mono', 'Fira Code', monospace;

  /* Escala de tipo — no lineal, saltos grandes arriba (estilo "Whoosh.") */
  --text-hero:  clamp(2.4rem, 5.5vw, 4.6rem);
  --text-h1:    clamp(1.7rem, 3vw, 2.6rem);
  --text-h2:    1.5rem;
  --text-h3:    1.125rem;
  --text-body:  0.9375rem;
  --text-small: 0.8125rem;
  --text-micro: 0.6875rem;   /* eyebrows: uppercase + tracked */

  /* --- Motion — el corazón del rediseño --- */
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out:      cubic-bezier(0, 0, 0.2, 1);
  --ease-spring:   cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 130ms;
  --dur-base: 220ms;
  --dur-slow: 420ms;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 13.5px;
  line-height: 1.5;
  background:
    radial-gradient(1100px 520px at 82% -8%, rgba(79,156,240,.10) 0%, transparent 60%),
    radial-gradient(900px 460px at -6% 4%, rgba(14,33,72,.05) 0%, transparent 55%),
    var(--bg-canvas);
  background-attachment: fixed;
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'ss01', 'cv05';
  /* La página NUNCA scrollea horizontal: cada zona (grilla, etc.) maneja su propio
     scroll interno — esto mantiene fija la columna de habitaciones/camas */
  overflow-x: hidden;
}

/* Accesibilidad: respetar quien pide menos movimiento */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   LOGIN
   ============================================================ */
.login-screen {
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(16px, 3vw, 40px);
  background:
    radial-gradient(1200px 700px at 78% -10%, rgba(79,156,240,.16), transparent 55%),
    radial-gradient(900px 600px at 8% 108%, rgba(37,99,235,.12), transparent 55%),
    var(--bg-canvas);
  overflow: hidden;
}

/* Split marketing: hero de marca (izq) + tarjeta de acceso (der) */
.login-shell {
  width: 100%; max-width: 1060px;
  display: grid; grid-template-columns: 1.15fr .85fr;
  background: var(--color-surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: ar-fade-up var(--dur-slow) var(--ease-out);
}

.login-hero {
  position: relative; overflow: hidden;
  padding: clamp(28px, 4vw, 56px);
  display: flex; flex-direction: column; justify-content: center; gap: 22px;
  color: var(--ink-inverse);
  background:
    radial-gradient(700px 420px at 88% -10%, rgba(79,156,240,.34), transparent 60%),
    radial-gradient(520px 420px at -10% 120%, rgba(37,99,235,.30), transparent 60%),
    var(--bg-dark);
}
.login-hero-inner { position: relative; z-index: 2; }
.login-hero .eyebrow { color: var(--brand-sky); margin-bottom: 20px; }
.login-hero-title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2rem, 3.6vw, 3.3rem); line-height: 1; letter-spacing: -.03em;
  margin-bottom: 16px;
}
.login-hero-title .grad-text { background: linear-gradient(110deg,#7cc0f7,#bfe0ff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.login-hero-sub { font-size: 15px; line-height: 1.55; color: rgba(246,245,241,.72); max-width: 40ch; }
.login-hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.login-chip {
  font-size: 11px; font-weight: 600; letter-spacing: .02em;
  padding: 6px 13px; border-radius: var(--radius-pill);
  background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.16);
  color: rgba(246,245,241,.9); backdrop-filter: blur(6px);
  display: inline-flex; align-items: center; gap: 7px;
}
.login-chip .ico { color: var(--brand-sky); }
/* Orbes decorativos flotando */
.login-orb { position: absolute; border-radius: 50%; filter: blur(8px); z-index: 1; pointer-events: none; }
.login-orb-1 { width: 220px; height: 220px; right: -60px; top: -50px; background: radial-gradient(circle at 30% 30%, rgba(124,192,247,.5), transparent 70%); animation: ar-float 7s var(--ease-standard) infinite; }
.login-orb-2 { width: 160px; height: 160px; left: -40px; bottom: -30px; background: radial-gradient(circle at 40% 40%, rgba(37,99,235,.45), transparent 70%); animation: ar-float 9s var(--ease-standard) infinite reverse; }

.login-card {
  padding: clamp(28px, 3.4vw, 48px);
  display: flex; flex-direction: column; justify-content: center;
  background: var(--color-surface);
}
.login-card > img { width: auto; }
.login-logo { font-family: var(--font-display); font-size: 24px; font-weight: 800; color: var(--color-primary); text-align: center; margin-bottom: 4px; letter-spacing: -.03em; }
.login-logo span { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.login-subtitle {
  font-size: var(--text-micro); color: var(--color-text-muted); text-align: center;
  margin-bottom: 26px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700;
}
.login-error {
  background: var(--color-danger-light); color: var(--color-danger);
  border: 1px solid rgba(224,54,47,.35); border-radius: var(--radius-sm);
  padding: 10px 12px; font-size: 12px; font-weight: 600; margin-bottom: 10px;
  animation: ar-pop-in var(--dur-base) var(--ease-spring);
}

@media (max-width: 780px) {
  .login-shell { grid-template-columns: 1fr; max-width: 440px; }
  .login-hero { display: none; }
}

/* ==================================================================
   LOGIN v7.1 — MOVIMIENTO AMBIENTE CONSTANTE + inputs/botones premium
   ================================================================== */
@keyframes ar-aurora     { to   { transform: rotate(360deg); } }
@keyframes ar-pan-text   { 0%{background-position:0% 50%}   100%{background-position:300% 50%} }
@keyframes ar-marquee    { 0%{transform:translateX(0)}      100%{transform:translateX(-50%)} }
@keyframes ar-blob       { 0%,100%{border-radius:44% 56% 62% 38%/52% 44% 56% 48%; transform:translate(0,0) rotate(0)}
                           50%    {border-radius:58% 42% 38% 62%/44% 58% 42% 56%; transform:translate(12px,-16px) rotate(20deg)} }
@keyframes ar-card3d     { 0%,100%{transform:rotateY(-17deg) rotateX(8deg) translateY(0)}
                           50%    {transform:rotateY(-7deg)  rotateX(3deg) translateY(-14px)} }
@keyframes ar-sheen      { 0%{transform:translateX(-160%) skewX(-18deg)} 55%,100%{transform:translateX(260%) skewX(-18deg)} }
@keyframes ar-rise       { to { transform: translateY(-14px); opacity: 0; } }

/* Aurora giratoria detrás del contenido del hero (movimiento constante) */
.login-hero::before {
  content: ''; position: absolute; inset: -55%; z-index: 0; pointer-events: none;
  background: conic-gradient(from 0deg,
    transparent 0deg, rgba(79,156,240,.30) 55deg, transparent 130deg,
    rgba(37,99,235,.24) 210deg, transparent 285deg, rgba(124,192,247,.22) 340deg, transparent 360deg);
  filter: blur(26px);
  animation: ar-aurora 26s linear infinite;
}
/* Degradé que recorre las letras del título de forma continua */
.login-hero-title .grad-text {
  background: linear-gradient(110deg,#7cc0f7 0%,#bfe0ff 25%,#4f9cf0 50%,#bfe0ff 75%,#7cc0f7 100%);
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: ar-pan-text 7s linear infinite;
}
/* Orbes → blobs que mutan y flotan (más notorios que antes) */
.login-orb-1 { width: 260px; height: 260px; right: -70px; top: -60px;
  background: radial-gradient(circle at 32% 30%, rgba(124,192,247,.62), transparent 68%);
  filter: blur(4px); animation: ar-blob 13s var(--ease-standard) infinite; }
.login-orb-2 { width: 200px; height: 200px; left: -50px; bottom: -50px;
  background: radial-gradient(circle at 40% 40%, rgba(37,99,235,.55), transparent 70%);
  filter: blur(4px); animation: ar-blob 17s var(--ease-standard) infinite reverse; }

/* Marquee infinito de features del PMS (se mueve constante hacia la izquierda) */
.login-marquee { position: relative; z-index: 2; margin-top: 30px; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.login-marquee-track { display: flex; gap: 10px; width: max-content; animation: ar-marquee 30s linear infinite; }
.login-marquee:hover .login-marquee-track { animation-play-state: paused; }
.login-feat { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  font-size: 11px; font-weight: 600; letter-spacing: .01em; color: rgba(246,245,241,.9);
  padding: 7px 14px; border-radius: 999px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); }
.login-feat .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-sky); box-shadow: 0 0 8px rgba(124,192,247,.9); }

/* CTA de login: sólido y limpio, sin barridos ni línea de borde superior */
.login-card .nbtn { font-weight: 700; letter-spacing: .02em; box-shadow: var(--glow-brand); }

/* Inputs premium SIN icono (simplicidad) — dejan de parecer HTML plano por el
   tamaño, el label micro en mayúsculas y el foco con anillo de marca. */
.login-field { position: relative; margin-bottom: 12px; }
.login-field > label { display: block; font-size: var(--text-micro); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--color-text-muted); margin-bottom: 6px; }
.login-field input {
  width: 100%; height: 46px; padding: 0 16px;
  font-size: 14.5px; font-family: var(--font-body); color: var(--color-primary);
  background: var(--color-surface-2);
  border: 1.5px solid var(--color-border-strong); border-radius: 12px;
  outline: none; transition: border-color var(--dur-base), box-shadow var(--dur-base), background var(--dur-base);
}
.login-field input::placeholder { color: var(--color-text-subtle); font-weight: 400; }
.login-field input:focus { background: var(--color-surface); border-color: var(--color-accent); box-shadow: 0 0 0 4px rgba(37,99,235,.14); }

/* ============================================================
   LOADING
   ============================================================ */
.loading-overlay {
  position: fixed; inset: 0;
  background: rgba(15,31,61,.2);
  backdrop-filter: blur(2px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.loading-spinner {
  width: 36px; height: 36px;
  border: 3px solid rgba(255,255,255,.3);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   APP SHELL
   ============================================================ */
.app {
  width: 100%;
  margin: 0;
  padding: 10px 12px 0;
  min-height: 100vh;
}

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0 clamp(8px, 1vw, 14px);
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: clamp(4px, .7vw, 10px);
  margin-bottom: 6px;
  /* UNA sola fila, siempre. Entre ~900px y pantalla ancha, lo que se achica es
     la tipografía y los espacios (clamp de acá abajo), no la cantidad de
     botones: envolver a dos filas se veía mal y partía la barra al medio.
     Abajo de 900px ya no hay forma de que entre nada legible, así que la
     navegación pasa a un menú lateral (ver el bloque de teléfono). */
  flex-wrap: nowrap;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  overflow: visible;   /* el dropdown de resultados de búsqueda no debe recortarse */
}
/* Contenedor de nav + acciones. En escritorio es transparente (sigue siendo
   una fila); en teléfono se transforma en el panel lateral. */
.topbar-panels {
  display: flex;
  align-items: center;
  gap: clamp(4px, .7vw, 10px);
  flex: 1;
  min-width: 0;
  align-self: stretch;
}
/* Búsqueda unificada en el header — visible en cualquier sección */
.topbar-search input[type="search"] { width: clamp(110px, 12vw, 220px) !important; }
@media (max-width: 1240px){ .topbar-search #flt-past { display:none; } }
@media (max-width: 1080px){ .topbar-search #flt-current, .topbar-search #flt-future { display:none; } }
/* El nombre del usuario es lo primero que sobra cuando falta lugar: el dato ya
   está en Configuración y no se usa para operar. */
@media (max-width: 1160px){ #user-name { display:none !important; } }

/* Hamburguesa: sólo en teléfono */
.nav-toggle {
  display: none;
  position: relative;
  align-items: center; justify-content: center;
  width: 34px; height: 34px; flex-shrink: 0;
  border: 1px solid var(--color-border); border-radius: var(--radius);
  background: var(--color-surface); cursor: pointer; color: var(--color-primary);
  transition: background var(--dur-fast), border-color var(--dur-fast);
}
.nav-toggle svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.nav-toggle:hover { background: var(--color-surface-2); }
.nav-toggle:active { transform: scale(.96); }
/* Punto de aviso: en teléfono la campanita vive adentro del menú, así que si
   no se avisa acá afuera los avisos nuevos pasarían desapercibidos. */
.nav-toggle-dot {
  position: absolute; top: -3px; right: -3px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--color-danger); border: 2px solid var(--color-surface);
}
.nav-scrim { display: none; }

.logo {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary);
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: -.02em;
  font-family: var(--font-display);
  align-self: center;
}
.logo span { color: var(--color-accent); font-weight: 500; }

.topbar-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;   /* que sus propios botones (avisos, academia, voz, salir, ⚙) envuelvan si no entran */
  gap: 8px;
  row-gap: 6px;
  margin-left: auto;
  justify-content: flex-end;
  flex-shrink: 0;
  align-self: center;
}

/* ============================================================
   SECTION NAV — underline style
   ============================================================ */
.section-nav {
  display: flex;
  gap: 0;
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--color-border);
  border-radius: 0;
  padding: 0;
  flex-shrink: 0;
  align-self: stretch;
  align-items: center;
}

.snav-btn {
  position: relative;
  /* Se achican con el ancho en vez de desaparecer o mandar la barra a dos
     filas. Los mínimos están calculados para que a 900px (donde arranca el
     menú lateral) el texto siga siendo legible, no apretado. */
  padding: 0 clamp(7px, .85vw, 13px);
  height: 100%;
  display: flex;
  align-items: center;
  font-size: clamp(11px, 1vw, 12px);
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  border-radius: 0;
  transition: color .18s;
  white-space: nowrap;
  letter-spacing: .01em;
  font-family: var(--font-display);
}
.snav-btn::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--color-primary);
  border-radius: 2px 2px 0 0;
  transform: scaleX(0);
  transition: transform .2s cubic-bezier(.4,0,.2,1), background .18s;
}
.snav-btn.active {
  color: var(--color-primary);
  font-weight: 700;
  background: transparent;
  box-shadow: none;
}
.snav-btn.active::after { transform: scaleX(1); }
.snav-btn:not(.active):hover { color: var(--color-text-secondary); }
.snav-btn:not(.active):hover::after {
  transform: scaleX(1);
  background: var(--color-border-strong);
}

/* ============================================================
   BUTTONS — pill-shaped, varied styles
   ============================================================ */
.nbtn {
  background: var(--color-primary);
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  padding: 7px 18px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  font-family: var(--font-body);
  transition: background .15s, box-shadow .15s, transform .1s;
  white-space: nowrap;
  letter-spacing: .01em;
}
.nbtn:hover {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.nbtn:active { transform: translateY(0); }

/* Navigation date buttons — ghost/outline style */
.nav-dates .nbtn {
  background: transparent;
  border: 1.5px solid var(--color-border);
  color: var(--color-text-secondary);
  padding: 6px 13px;
  font-weight: 500;
}
.nav-dates .nbtn:hover {
  background: var(--color-surface-2);
  border-color: var(--color-border-strong);
  color: var(--color-primary);
  transform: none;
  box-shadow: none;
}

/* "Hoy" — accent pill */
.nav-dates .nbtn.green {
  background: var(--color-accent-light);
  border-color: #bfdbfe;
  color: var(--color-accent);
  font-weight: 700;
}
.nav-dates .nbtn.green:hover {
  background: #dbeafe;
  border-color: var(--color-accent);
  transform: none;
  box-shadow: none;
}

/* Primary green CTA — main action */
.nbtn.green {
  background: var(--color-green);
  border-color: transparent;
}
.nbtn.green:hover {
  background: var(--color-green-hover);
  box-shadow: 0 4px 14px rgba(5,150,105,.25);
}

/* Settings gear button */
#snav-settings {
  background: transparent !important;
  border: 1.5px solid var(--color-border) !important;
  border-radius: var(--radius-pill) !important;
  padding: 6px 12px !important;
  cursor: pointer;
  font-size: 15px;
  color: var(--color-text-muted);
  line-height: 1;
  transition: background .15s, border-color .15s !important;
  align-self: center;
}
#snav-settings:hover {
  background: var(--color-surface-2) !important;
  border-color: var(--color-border-strong) !important;
}

/* Logout button */
button[onclick="doLogout()"] {
  background: transparent !important;
  color: var(--color-danger) !important;
  border: 1.5px solid #fca5a5 !important;
  border-radius: var(--radius-pill) !important;
  padding: 5px 14px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: background .15s !important;
  font-family: var(--font-body) !important;
}
button[onclick="doLogout()"]:hover {
  background: var(--color-danger-light) !important;
}

/* ============================================================
   USER BAR
   ============================================================ */
.user-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--color-text-muted);
  font-weight: 500;
}

#user-name {
  font-size: 12px !important;
  color: var(--color-text-secondary) !important;
  font-weight: 500 !important;
}

/* ============================================================
   TOOLBAR (reservas)
   ============================================================ */
.toolbar {
  display: flex;
  gap: 6px;
  margin-bottom: 0;
  align-items: center;
  flex-wrap: wrap;
  position: sticky;
  /* Antes era un "top: 50px" fijo, calculado para una topbar de una sola fila.
     Ahora que la topbar puede envolver a 2-3 filas en pantallas angostas, un
     valor fijo la tapaba. --topbar-h mide la altura real (js/app/11-ota-files-
     dragdrop.js) y se actualiza sola en cada resize. */
  top: var(--topbar-h, 50px);
  z-index: 90;
  background: var(--color-bg);
  padding: 6px 0 4px;
}

.toggle-view {
  display: flex;
  background: var(--color-surface-2);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-pill);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}
.tvb {
  padding: 7px 18px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-family: var(--font-body);
  transition: all .15s;
}
.tvb.active {
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
  border-radius: var(--radius-pill);
  margin: 2px;
}
.tvb:not(.active):hover { background: var(--color-surface); color: var(--color-text-secondary); }

/* Envuelve por la misma razón que .topbar: 7 controles (←7d ‹ Hoy › 7d→ selector
   fecha-puntual) no entran juntos en una pantalla angosta, y body bloquea el
   scroll horizontal a propósito. Sin este wrap, el navegador de fechas se
   cortaba y el selector de "días visibles" o el de fecha puntual quedaban
   inalcanzables. */
.nav-dates { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; row-gap: 6px; }

.grpbar {
  display: flex;
  gap: 6px;
  align-items: center;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 4px 6px 4px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-primary);
  box-shadow: var(--shadow-xs);
}
.grpbar span { color: var(--color-text-muted); font-weight: 400; }

.grpbar select {
  border: none;
  border-radius: var(--radius-pill);
  padding: 4px 8px;
  font-size: 12px;
  color: var(--color-primary);
  background: transparent;
  cursor: pointer;
  font-weight: 500;
  font-family: var(--font-body);
  outline: none;
}

.gbtn {
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background .15s;
}
.gbtn:hover { background: var(--color-primary-hover); }

/* ============================================================
   DATE PICKER
   ============================================================ */
.date-picker-wrap { position: relative; }
.date-pick-btn {
  background: var(--color-surface) !important;
  color: var(--color-text) !important;
  border: 1.5px solid var(--color-border) !important;
  border-radius: var(--radius-pill) !important;
  font-size: 12px !important;
  max-width: 190px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500 !important;
  box-shadow: var(--shadow-xs) !important;
}
.date-pick-btn:hover {
  background: var(--color-surface-2) !important;
  border-color: var(--color-border-strong) !important;
}
.date-picker-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 14px;
  z-index: 200;
  min-width: 220px;
  box-shadow: var(--shadow-lg);
}
.date-picker-dropdown div[style*="font-size:11px"] {
  font-size: 11px !important;
  color: var(--color-text-muted) !important;
  margin-bottom: 6px;
  font-weight: 600;
}
.date-picker-dropdown input[type="date"] {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 7px 9px;
  font-size: 13px;
  color: var(--color-primary);
  background: var(--color-surface-2);
  cursor: pointer;
  font-family: var(--font-body);
  outline: none;
}
.date-picker-dropdown input[type="date"]:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px rgba(37,99,235,.12);
}

/* ============================================================
   LEGEND
   ============================================================ */
.legend {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  background: var(--color-surface);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  border: 1px solid var(--color-border);
  border-bottom: none;
  padding: 7px 14px;
  font-size: 11px;
  color: var(--color-text-secondary);
  font-weight: 500;
  position: sticky;
  top: 111px;
  z-index: 80;
}
.legend > span { display: flex; align-items: center; gap: 5px; }
.ld {
  width: 10px; height: 10px;
  border-radius: 3px;
  border: 1px solid rgba(0,0,0,.10);
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
.legend-note {
  margin-left: auto;
  font-size: 10px;
  color: var(--color-text-muted);
  font-style: italic;
}

/* Legend gear */
.legend > button {
  background: none !important;
  border: 1px solid var(--color-border) !important;
  border-radius: var(--radius) !important;
  padding: 3px 8px !important;
  cursor: pointer;
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.4;
  transition: background .15s !important;
}
.legend > button:hover {
  background: var(--color-surface-2) !important;
}

/* ============================================================
   STATS
   ============================================================ */
.stats { display: flex; gap: 5px; flex-shrink: 0; }
.stat {
  background: var(--color-surface-2);
  border-radius: var(--radius);
  padding: 4px 10px;
  font-size: 10px;
  color: var(--color-text-muted);
  text-align: center;
  border: 1px solid var(--color-border);
}
.stat b {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary);
}

/* ============================================================
   GRID — BEDS GRID
   ============================================================ */
.grid-wrap {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-top: none;
  overflow-x: scroll;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f1f5f9;
  position: relative;
  margin: 0 -12px;
  max-height: calc(100vh - 158px);
  padding-bottom: 12px;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}
.grid-wrap::-webkit-scrollbar        { height: 10px; width: 8px; }
.grid-wrap::-webkit-scrollbar-track  { background: #f1f5f9; }
.grid-wrap::-webkit-scrollbar-thumb  { background: #cbd5e1; border-radius: 10px; }
.grid-wrap::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

.grid-header {
  display: grid;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-header-bg);
  position: sticky;
  top: 0;
  z-index: 70;
}

.ghc {
  padding: 6px 2px 4px;
  font-size: 10px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-align: center;
  border-right: 1px solid var(--grid-line);
  line-height: 1.3;
  background: var(--grid-header-bg);
}
.ghc.tod  { background: #dbeafe; color: var(--color-accent); }
.ghc.wknd { background: var(--grid-weekend-bg); }

.ghc-label {
  text-align: left;
  padding-left: 12px;
  font-size: 10px;
  font-weight: 700;
  color: var(--color-text-secondary);
  border-right: 1px solid var(--color-border);
  position: sticky;
  left: 0;
  z-index: 80;
  background: var(--color-header-bg);
  display: flex;
  align-items: center;
  width: var(--col-label);
  min-width: var(--col-label);
  max-width: var(--col-label);
  box-sizing: border-box;
  flex-shrink: 0;
  letter-spacing: .02em;
}
.ghc-day { font-size: 8px; font-weight: 600; opacity: .7; line-height: 1; text-transform: uppercase; letter-spacing: .04em; }
.ghc-num { font-size: 15px; font-weight: 700; line-height: 1.1; }
.ghc-mon { font-size: 7px; opacity: .5; margin-bottom: 1px; text-transform: uppercase; letter-spacing: .04em; }
/* Camas libres por noche en el header (verde=hay, naranja=pocas, rojo=FULL) */
.ghc-free { font-size: 8px; font-weight: 800; line-height: 1.1; white-space: nowrap; }
.ghc-occ  { font-weight: 600; opacity: .75; }
.ghc-ampm {
  display: flex;
  justify-content: space-around;
  border-top: 1px dashed var(--color-border);
  margin-top: 3px;
  padding-top: 2px;
  font-size: 7px;
  opacity: .6;
  letter-spacing: .01em;
}

/* ---- Rooms ---- */
.room-header-row {
  display: grid;
  border-bottom: 1px solid var(--grid-line);
}
/* Encabezado de GRUPO de habitaciones (colapsable) — más marcado que el de habitación */
.group-header-row .rh-cell { background: #dbeafe; color: #0d3b66; }
.group-header-row .rh-spacer { background: #eef6ff; }
.rh-cell {
  background: var(--grid-room-bg);
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 6px;
  border-right: 1px solid var(--color-border);
  position: sticky;
  left: 0;
  z-index: 60;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: var(--col-label);
  min-width: var(--col-label);
  max-width: var(--col-label);
  box-sizing: border-box;
  flex-shrink: 0;
  letter-spacing: .01em;
}
.rh-spacer { background: var(--color-surface-2); border-right: 1px solid var(--color-border-light); }

.bed-row {
  display: grid;
  align-items: stretch;
  border-bottom: 1px solid var(--grid-line);
  min-height: var(--grid-row-h, 36px);
  transition: background .08s;
}
/* Drag-to-select highlight — dibujado como una reserva real: en el día de llegada se
   pinta solo la mitad PM (la noche) y en el día de salida solo la mitad AM (la mañana),
   igual que los pills de la grilla. Los días intermedios se pintan completos. */
.cell.selrange { background: rgba(31,111,235,.16) !important; box-shadow: inset 0 0 0 1px rgba(31,111,235,.45); }
.cell.selrange-start { background: linear-gradient(90deg, transparent 50%, rgba(31,111,235,.22) 50%) !important; }
.cell.selrange-end   { background: linear-gradient(90deg, rgba(31,111,235,.22) 50%, transparent 50%) !important; }

/* Línea marcada que separa una habitación de otra (editable desde ⚙️ → Grilla) */
.room-divider { border-top: var(--grid-room-line-w, 2px) solid var(--grid-room-line, #9fb0c7); }

/* Pantallas angostas: la barra de herramientas se COMPRIME proporcionalmente
   (sin scroll lateral ni botones cortados); solo en extremos permite envolver */
@media (max-width: 1200px){
  .toolbar { gap: 4px; }
  .toolbar .nbtn, .toolbar .tvb { padding: 0 8px; font-size: 11px; height: 28px; }
  .toolbar #days-visible-sel { height: 28px !important; font-size: 10px !important; padding: 0 4px !important; }
  .toolbar .date-pick-btn { font-size: 10px; }
  .toolbar .grpbar { display: none; }
}
@media (max-width: 980px){
  .toolbar .nbtn, .toolbar .tvb { padding: 0 6px; font-size: 10px; height: 26px; }
  .toolbar .snav-btn { font-size: 9px !important; padding: 2px 5px !important; }
  .toolbar #days-visible-sel { font-size: 9px !important; }
}

/* Fila colapsada de habitación privada/dpto. — mismo color que la franja de habitaciones */
.bl.bl-room {
  background: var(--grid-room-bg);
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1px;
  line-height: 1.25;
}
.bl-room .rm-name { font-weight: 700; color: var(--color-primary); font-size: calc(var(--grid-font, 10px) + 1px); display: flex; align-items: center; gap: 5px; }
.bl-room .rm-beds { font-size: calc(var(--grid-font, 10px) - 1px); color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.rm-tag {
  background: #dbe7f5; color: #0d3b66; border-radius: 4px; padding: 0 5px;
  font-size: 8px; font-weight: 800; letter-spacing: .04em; flex-shrink: 0;
}

/* Vencida pre-reserva: pulso rojo notable, imposible de pasar por alto en la grilla */
@keyframes pillExpiredPulse {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 0 0 1px rgba(229,57,53,.15), 0 1px 3px rgba(0,0,0,.13); }
  50%      { box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 0 0 3px rgba(229,57,53,.65), 0 1px 3px rgba(0,0,0,.13); }
}
.pill-expired-pulse { animation: pillExpiredPulse 1.4s ease-in-out infinite; }
.bed-row:last-child { border-bottom: none; }
.bed-row:hover { background: #fafbfe; }
.bed-row.hilite { background: #fffbeb; }

.bl {
  padding: 0 10px;
  font-size: calc(var(--grid-font, 10px) + 1px);
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
  border-right: 1px solid var(--color-border);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: sticky;
  left: 0;
  z-index: 50;
  background: var(--color-surface);
  width: var(--col-label);
  min-width: var(--col-label);
  max-width: var(--col-label);
  box-sizing: border-box;
  flex-shrink: 0;
}
.bed-row:hover .bl  { background: #fafbfe; }
.bed-row.hilite .bl { background: #fffbeb; }
.bl .atag, .bl .dtag { display: none; }
.rh-cell .sel-btn { display: none; }
.rh-cell .rbadge  { display: none; }

.atag {
  font-size: 8px;
  color: #5b21b6;
  background: #ede9fe;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: var(--font-mono);
}
.dtag {
  font-size: 8px;
  color: #92400e;
  background: #fef3c7;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: var(--font-mono);
}
.rbadge { font-size: 9px; padding: 2px 9px; border-radius: var(--radius-pill); font-weight: 600; }
.grp-badge { font-size: 9px; padding: 2px 9px; border-radius: var(--radius-pill); font-weight: 700; }

.bs { background: #dcfce7; color: #166534; }
.bp { background: #ffedd5; color: #9a3412; }
.bd { background: #dbeafe; color: #1e40af; }

.sel-btn {
  margin-left: auto;
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background .15s;
}
.sel-btn:hover { background: var(--color-accent-hover); }

/* ---- Cells ---- */
.cell {
  position: relative;
  border-right: 1px solid var(--grid-line);
  display: flex;
  align-items: stretch;
  overflow: visible;
  background: #fff;
}
.cell.tod { background: var(--color-cell-today); }
.cell-free::after {
  content: "";
  position: absolute;
  left: 50%; top: 25%; bottom: 25%;
  width: 1px;
  background: var(--grid-line);
  pointer-events: none;
  z-index: 1;
}
.cell-covered { background: transparent; overflow: hidden; }
.cell-covered.tod { background: rgba(219,234,254,.25); }
.seg-am, .seg-pm { flex: 1; cursor: pointer; transition: background .08s; min-width: 0; }
.seg-am { border-right: none; }
.seg-am:hover, .seg-pm:hover { background: rgba(37,99,235,.06); }

/* ============================================================
   TODAY VIEW
   ============================================================ */
.today-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-xs);
}
.tp-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 14px;
  letter-spacing: -.01em;
}
.tp-cols { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.tp-col {
  background: var(--color-surface-2);
  border-radius: var(--radius-md);
  padding: 12px;
  border: 1px solid var(--color-border-light);
}
.tp-ct {
  font-size: 10px;
  font-weight: 700;
  color: var(--color-text-muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.tp-item {
  font-size: 12px;
  color: var(--color-primary);
  padding: 6px 10px;
  background: var(--color-surface);
  border-radius: var(--radius);
  margin-bottom: 5px;
  border: 1px solid var(--color-border-light);
  font-weight: 600;
  box-shadow: var(--shadow-xs);
}
.tp-item span {
  display: block;
  font-size: 10px;
  color: var(--color-text-muted);
  font-weight: 400;
  margin-top: 1px;
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,31,61,.4);
  backdrop-filter: blur(3px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeInOverlay .15s ease;
}
.modal-overlay.open { display: flex; }
@keyframes fadeInOverlay { from{opacity:0} to{opacity:1} }

.modal-box {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  padding: 24px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUpModal .18s ease;
}
@keyframes slideUpModal { from{transform:translateY(16px);opacity:0} to{transform:translateY(0);opacity:1} }

.modal-box h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border-light);
  letter-spacing: -.01em;
}

/* Header fijo dentro de la ficha de reserva (huésped/canal/personas/estado): usa el propio
   scroll del modal-box, se "pega" arriba con los bordes de la caja compensados */
.mheader-sticky {
  position: sticky;
  top: -24px;
  margin: -24px -24px 14px -24px;
  padding: 16px 24px 12px;
  background: var(--color-surface);
  z-index: 5;
  border-bottom: 1px solid var(--color-border-light);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

/* ============================================================
   FORMS
   ============================================================ */
.section-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--color-text-muted);
  margin: 14px 0 5px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.mrow {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--color-border-light);
  color: var(--color-text-secondary);
}
.mrow b { color: var(--color-primary); font-weight: 600; }
.mactions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }

.mb {
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all .15s;
  font-family: var(--font-body);
  letter-spacing: .01em;
}
/* Secondary — outlined */
.mb.sec     { background: transparent; color: var(--color-text-secondary); border-color: var(--color-border); }
.mb.sec:hover { background: var(--color-surface-2); border-color: var(--color-border-strong); color: var(--color-primary); }
/* Warning — soft filled */
.mb.warn    { background: var(--color-warn-light); color: var(--color-warn); border-color: #fcd34d; }
.mb.warn:hover { background: #fef3c7; }
/* Danger — ghost red */
.mb.danger  { background: transparent; color: var(--color-danger); border-color: #fca5a5; }
.mb.danger:hover { background: var(--color-danger-light); }
/* Primary — solid navy */
.mb.primary { background: var(--color-primary); color: #fff; border-color: transparent; }
.mb.primary:hover { background: var(--color-primary-hover); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
/* Block — purple accent */
.mb.block   { background: #6d28d9; color: #fff; border-color: transparent; }
.mb.block:hover { background: #5b21b6; box-shadow: 0 4px 14px rgba(109,40,217,.2); }
/* Green — filled success */
.mb.green   { background: var(--color-green); color: #fff; border-color: transparent; }
.mb.green:hover { background: var(--color-green-hover); box-shadow: 0 4px 14px rgba(5,150,105,.2); }

.winline {
  background: var(--color-warn-light);
  border: 1px solid #fcd34d;
  border-radius: var(--radius);
  padding: 9px 12px;
  font-size: 11px;
  color: var(--color-warn);
  margin-top: 8px;
  font-weight: 600;
}

.form-row { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.form-row label {
  font-size: 11px;
  color: var(--color-text-secondary);
  font-weight: 600;
  letter-spacing: .01em;
}
.form-row input,
.form-row select,
.form-row textarea {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 8px 10px;
  font-size: 13px;
  color: var(--color-primary);
  background: var(--color-surface-2);
  width: 100%;
  font-family: var(--font-body);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: var(--color-accent);
  background: var(--color-surface);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

.two-col   { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.three-btn { display: flex; gap: 6px; margin-bottom: 12px; }
.three-btn .mb { flex: 1; text-align: center; }

/* Distribution option cards */
.dist-opt:hover { border-color: #90caf9 !important; background: #f0f7ff !important; }

/* ============================================================
   ADMIN TABS — floating pill cluster
   ============================================================ */
.admin-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.atab, .ctab, .mtab {
  padding: 7px 16px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  border-radius: var(--radius-pill);
  transition: all .18s;
  white-space: nowrap;
  font-family: var(--font-body);
  box-shadow: var(--shadow-xs);
}
.atab.active, .ctab.active, .mtab.active {
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(15,31,61,.18);
  transform: translateY(-1px);
}
.atab:not(.active):hover,
.ctab:not(.active):hover,
.mtab:not(.active):hover {
  background: var(--color-surface-2);
  border-color: var(--color-border-strong);
  color: var(--color-primary);
  transform: translateY(-1px);
}

/* ============================================================
   ADMIN PANELS
   ============================================================ */
.admin-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  min-height: 300px;
  box-shadow: var(--shadow-xs);
}
.admin-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--color-border-light);
  flex-wrap: wrap;
  gap: 10px;
}
.admin-panel-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -.01em;
}
.admin-panel-subtitle { font-size: 11px; color: var(--color-text-muted); margin-top: 2px; }

/* ---- Tables ---- */
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table th {
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 9px 12px;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  white-space: nowrap;
}
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border-light);
  color: var(--color-text);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--color-surface-2); }
.data-table .td-actions { display: flex; gap: 5px; }
.data-table .td-name { font-weight: 600; color: var(--color-primary); }
.data-table .td-muted { color: var(--color-text-muted); font-size: 11px; }

/* ---- Empty state ---- */
.empty-state { text-align: center; padding: 48px 20px; color: var(--color-text-muted); }
.empty-state-icon { font-size: 32px; margin-bottom: 12px; opacity: .5; }
.empty-state-title { font-size: 14px; font-weight: 600; color: var(--color-primary); margin-bottom: 6px; }
.empty-state-sub { font-size: 12px; color: var(--color-text-muted); }

/* ---- Badges ---- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: .03em;
}
.badge-green  { background: #dcfce7; color: #166534; }
.badge-blue   { background: #dbeafe; color: #1e40af; }
.badge-orange { background: #ffedd5; color: #9a3412; }
.badge-red    { background: #fee2e2; color: #991b1b; }
.badge-gray   { background: #f1f5f9; color: #475569; }
.badge-purple { background: #ede9fe; color: #5b21b6; }
.badge-teal   { background: #ccfbf1; color: #134e4a; }
.badge-yellow { background: #fef9c3; color: #713f12; }

/* ---- Summary cards ---- */
.summary-cards { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.scard {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  flex: 1;
  min-width: 100px;
  text-align: center;
}
.scard-label { font-size: 10px; font-weight: 700; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 5px; }
.scard-value { font-size: 20px; font-weight: 700; color: var(--color-primary); }
.scard.green { background: var(--color-green-light); border-color: #a7f3d0; }
.scard.green .scard-value { color: var(--color-green); }
.scard.red   { background: var(--color-danger-light); border-color: #fca5a5; }
.scard.red .scard-value   { color: var(--color-danger); }
.scard.blue  { background: var(--color-accent-light); border-color: #bfdbfe; }
.scard.blue .scard-value  { color: var(--color-accent); }

/* ---- Filter row ---- */
.filter-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 10px 14px;
  background: var(--color-surface-2);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-light);
}
.filter-row label { font-size: 11px; color: var(--color-text-muted); font-weight: 600; }
.filter-row input,
.filter-row select {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 6px 9px;
  font-size: 12px;
  color: var(--color-primary);
  background: var(--color-surface);
  font-family: var(--font-body);
  outline: none;
}
.filter-row input:focus,
.filter-row select:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px rgba(37,99,235,.10);
}

/* ============================================================
   EMERGENCY
   ============================================================ */
.emergency-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 700px) { .emergency-grid { grid-template-columns: 1fr; } }
.emergency-card {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: 14px;
}
.emergency-card.alert { background: var(--color-danger-light); border-color: #fca5a5; }
.emergency-card-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.emergency-phone { font-size: 18px; font-weight: 700; color: var(--color-accent); font-family: var(--font-mono); }
.emergency-note  { font-size: 11px; color: var(--color-text-muted); margin-top: 2px; }
.instruction-block {
  background: var(--color-accent-light);
  border-left: 3px solid var(--color-accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 10px 14px;
  margin-bottom: 8px;
}
.instruction-title { font-size: 12px; font-weight: 700; color: var(--color-primary); margin-bottom: 6px; }
.instruction-step  { font-size: 12px; color: var(--color-text-secondary); margin-bottom: 3px; display: flex; gap: 6px; }
.instruction-step::before { content: attr(data-n); font-weight: 700; color: var(--color-accent); flex-shrink: 0; width: 16px; }

/* ============================================================
   SECTION ANIMATION
   ============================================================ */
.section-content { animation: fadeIn .15s ease; }
@keyframes fadeIn { from{opacity:0;transform:translateY(4px)} to{opacity:1;transform:translateY(0)} }

/* ============================================================
   TASKS (kanban)
   ============================================================ */
.task-cols { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
@media (max-width: 800px) { .task-cols { grid-template-columns: 1fr; } }
.task-col-header {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-text-muted);
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: var(--radius);
}
.task-col-header.pendiente   { background: #fee2e2; color: #991b1b; }
.task-col-header.en-progreso { background: #fef3c7; color: #92400e; }
.task-col-header.completada  { background: #dcfce7; color: #166534; }
.task-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: 11px 12px;
  margin-bottom: 7px;
  cursor: pointer;
  transition: box-shadow .15s, border-color .15s;
  box-shadow: var(--shadow-xs);
}
.task-card:hover { box-shadow: var(--shadow-sm); border-color: var(--color-border); }
.task-card-title { font-size: 12px; font-weight: 600; color: var(--color-primary); margin-bottom: 5px; }
.task-card-meta  { font-size: 10px; color: var(--color-text-muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.prio-alta  { border-left: 3px solid #ef4444; }
.prio-media { border-left: 3px solid #f97316; }
.prio-baja  { border-left: 3px solid #22c55e; }

/* ============================================================
   INVENTORY
   ============================================================ */
.inv-category-header {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-text-muted);
  padding: 10px 0 5px;
  border-bottom: 1px solid var(--color-border-light);
  margin-bottom: 5px;
}
.low-stock { background: #fffbeb; }
.low-stock td { color: #92400e !important; background: #fffbeb !important; }
.costo-area-header {
  background: var(--color-surface-2);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-primary);
  padding: 9px 12px;
  border-bottom: 1px solid var(--color-border-light);
  border-top: 1px solid var(--color-border-light);
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: var(--radius);
}

/* ============================================================
   CRM
   ============================================================ */
.crm-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  min-height: 400px;
  box-shadow: var(--shadow-xs);
}
.crm-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--color-border-light);
  flex-wrap: wrap;
  gap: 10px;
}

/* Channel status */
.channel-status-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  margin-bottom: 14px;
}
.ch-status-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  color: var(--color-text-secondary);
}
.ch-status-pill.disconnected { background: var(--color-surface-2); color: var(--color-text-muted); border-color: transparent; }
.ch-status-pill.connected    { background: var(--color-green-light); color: var(--color-green); border-color: #a7f3d0; }
.ch-status-pill.error        { background: var(--color-danger-light); color: var(--color-danger); border-color: #fca5a5; }
.ch-dot { width: 6px; height: 6px; border-radius: 50%; background: #cbd5e1; flex-shrink: 0; }
.ch-status-pill.connected .ch-dot { background: var(--color-green); }
.ch-status-pill.error .ch-dot    { background: var(--color-danger); }

/* Inbox */
.inbox-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 500px;
}
.inbox-sidebar { border-right: 1px solid var(--color-border); display: flex; flex-direction: column; background: var(--color-surface-2); }
.inbox-ch-tabs { display: flex; flex-direction: column; border-bottom: 1px solid var(--color-border-light); }
.inbox-ch-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--color-text-secondary);
  text-align: left;
  border-bottom: 1px solid var(--color-border-light);
  transition: background .1s;
  font-family: var(--font-body);
}
.inbox-ch-tab:hover  { background: var(--color-surface); }
.inbox-ch-tab.active { background: var(--color-surface); color: var(--color-primary); font-weight: 600; }
.inbox-badge {
  background: var(--color-danger);
  color: #fff;
  border-radius: 20px;
  padding: 1px 6px;
  font-size: 9px;
  font-weight: 700;
  margin-left: auto;
}
.inbox-msg-list { overflow-y: auto; flex: 1; max-height: 600px; }
.inbox-msg-row {
  display: flex;
  gap: 10px;
  padding: 11px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--color-border-light);
  transition: background .1s;
  align-items: flex-start;
}
.inbox-msg-row:hover    { background: var(--color-surface); }
.inbox-msg-row.selected { background: var(--color-accent-light); }
.inbox-msg-row.unread   { background: #f0f7ff; }
.inbox-msg-ch   { font-size: 18px; flex-shrink: 0; padding-top: 2px; }
.inbox-msg-body { flex: 1; min-width: 0; }
.inbox-msg-from    { font-size: 12px; font-weight: 700; color: var(--color-primary); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.inbox-msg-subject { font-size: 11px; font-weight: 600; color: var(--color-text); }
.inbox-msg-preview { font-size: 10px; color: var(--color-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-msg-time    { font-size: 10px; color: var(--color-text-muted); white-space: nowrap; flex-shrink: 0; }

.inbox-detail { display: flex; flex-direction: column; }
.inbox-no-select {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 40px;
  color: var(--color-text-muted);
  text-align: center;
}
.inbox-detail-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border-light);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}
.msg-thread { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; max-height: 400px; }
.msg-bubble { max-width: 75%; flex-shrink: 0; }
.msg-bubble.inbound  { align-self: flex-start; }
.msg-bubble.outbound { align-self: flex-end; }
.msg-bubble-body { padding: 10px 14px; border-radius: 12px; font-size: 12px; line-height: 1.6; }
.msg-bubble.inbound  .msg-bubble-body { background: var(--color-surface-2); border: 1px solid var(--color-border-light); color: var(--color-text); border-radius: 4px 12px 12px 12px; }
.msg-bubble.outbound .msg-bubble-body { background: var(--color-primary); color: #fff; border-radius: 12px 4px 12px 12px; }
.msg-bubble-time { font-size: 9px; color: var(--color-text-muted); margin-top: 3px; }
.msg-bubble.outbound .msg-bubble-time { text-align: right; }
.inbox-reply-box {
  padding: 12px 16px;
  border-top: 1px solid var(--color-border-light);
  background: var(--color-surface-2);
}
.inbox-reply-box textarea {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 9px 12px;
  font-size: 12px;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-surface);
  resize: vertical;
  outline: none;
}
.inbox-reply-box textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px rgba(37,99,235,.10);
}

/* Knowledge base */
.kb-info-banner {
  background: var(--color-green-light);
  border: 1px solid #a7f3d0;
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 12px;
  color: var(--color-green);
  margin-bottom: 14px;
}
.kb-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap: 10px; }
.kb-card {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: box-shadow .15s;
}
.kb-card:hover { box-shadow: var(--shadow-sm); border-color: var(--color-border); }
.kb-card.kb-inactive { opacity: .55; }
.kb-card-cat    { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--color-text-muted); }
.kb-card-title  { font-size: 13px; font-weight: 700; color: var(--color-primary); }
.kb-card-preview{ font-size: 11px; color: var(--color-text-muted); line-height: 1.6; flex: 1; }
.kb-card-footer { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: 4px; }

/* Integrations */
.integration-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap: 12px; margin-bottom: 10px; }
.integration-card {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 16px;
}
.integration-card-header { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.integration-steps { font-size: 11px; color: var(--color-text-muted); line-height: 1.7; margin-bottom: 10px; }

/* Secrets */
.secrets-table { background: var(--color-surface-2); border: 1px solid var(--color-border-light); border-radius: var(--radius); overflow: hidden; }
.secret-row { display: flex; align-items: center; gap: 12px; padding: 9px 14px; border-bottom: 1px solid var(--color-border-light); font-size: 11px; }
.secret-row:last-child { border-bottom: none; }
.secret-row code { font-family: var(--font-mono); font-size: 11px; background: #e0e7ff; color: #3730a3; padding: 2px 7px; border-radius: 4px; white-space: nowrap; flex-shrink: 0; }
.secret-row span { color: var(--color-text-muted); }

/* Templates */
.template-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap: 10px; }
.template-card {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: 14px;
}
.template-card-header { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.template-body { font-size: 11px; color: var(--color-text-muted); line-height: 1.6; white-space: pre-line; }

/* ============================================================
   ANALYTICS
   ============================================================ */
.analytics-wrap { padding: 4px 0; }
.analytics-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}
.range-btn {
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font-family: var(--font-body);
  transition: all .15s;
}
.range-btn.active { background: var(--color-primary); color: #fff; border-color: transparent; box-shadow: 0 4px 14px rgba(15,31,61,.15); }
.range-btn:not(.active):hover { background: var(--color-surface-2); border-color: var(--color-border-strong); color: var(--color-primary); }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(160px,1fr)); gap: 10px; margin-bottom: 18px; }
.kpi-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--shadow-xs);
}
.kpi-card.blue   { background: var(--color-accent-light); border-color: #bfdbfe; }
.kpi-card.green  { background: var(--color-green-light); border-color: #a7f3d0; }
.kpi-card.purple { background: #f5f3ff; border-color: #ddd6fe; }
.kpi-card.teal   { background: #f0fdfa; border-color: #99f6e4; }
.kpi-card.red    { background: var(--color-danger-light); border-color: #fca5a5; }
.kpi-icon  { font-size: 18px; }
.kpi-value { font-size: 24px; font-weight: 700; color: var(--color-primary); line-height: 1; letter-spacing: -.02em; }
.kpi-label { font-size: 11px; color: var(--color-text-muted); font-weight: 600; }

.chart-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.chart-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-xs);
}
.chart-card.wide { grid-column: span 2; }
@media (max-width: 700px) { .chart-row { grid-template-columns: 1fr; } .chart-card.wide { grid-column: span 1; } }
.chart-title    { font-size: 13px; font-weight: 700; color: var(--color-primary); margin-bottom: 2px; letter-spacing: -.01em; }
.chart-subtitle { font-size: 11px; color: var(--color-text-muted); margin-bottom: 12px; }
.chart-container { height: 200px; position: relative; }
.chart-card.wide .chart-container { height: 180px; }

/* ============================================================
   MARKETING
   ============================================================ */
.mkt-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  min-height: 400px;
  box-shadow: var(--shadow-xs);
}
.mkt-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--color-border-light);
  flex-wrap: wrap;
  gap: 10px;
}

/* Reviews */
.review-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(320px,1fr)); gap: 12px; margin-bottom: 18px; }
.review-card {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 16px;
  transition: box-shadow .15s;
}
.review-card:hover { box-shadow: var(--shadow-sm); }
.review-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.review-source { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--color-primary); }
.review-score  { font-size: 22px; font-weight: 700; }
.review-score.high { color: var(--color-green); }
.review-score.mid  { color: var(--color-warn); }
.review-score.low  { color: var(--color-danger); }
.review-stars { color: #f59e0b; font-size: 13px; letter-spacing: 1px; }
.review-body  { font-size: 12px; color: var(--color-text-secondary); line-height: 1.6; margin-bottom: 8px; }
.review-meta  { font-size: 10px; color: var(--color-text-muted); display: flex; gap: 8px; flex-wrap: wrap; }
.review-meta b { color: var(--color-primary); }

/* Platform cards */
.platform-cards { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.platform-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  flex: 1;
  min-width: 130px;
  text-align: center;
  transition: box-shadow .15s, border-color .15s;
}
.platform-card:hover { box-shadow: var(--shadow-sm); border-color: var(--color-border); }
.platform-card-icon  { font-size: 22px; margin-bottom: 5px; }
.platform-card-name  { font-size: 11px; font-weight: 700; color: var(--color-primary); margin-bottom: 3px; }
.platform-card-score { font-size: 22px; font-weight: 700; color: var(--color-primary); line-height: 1; }
.platform-card-count { font-size: 10px; color: var(--color-text-muted); }
.platform-card.connected    { border-color: #a7f3d0; background: var(--color-green-light); }
.platform-card.disconnected { opacity: .55; }

/* AI Analysis */
.ai-analysis-box {
  background: var(--color-primary);
  background-image: radial-gradient(ellipse at 30% 50%, rgba(37,99,235,.25) 0%, transparent 70%);
  border-radius: var(--radius-lg);
  padding: 18px;
  color: #fff;
  margin-bottom: 18px;
}
.ai-analysis-title { font-size: 13px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.ai-analysis-loading { font-size: 12px; opacity: .65; display: flex; align-items: center; gap: 8px; }
.ai-insight { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius-md); padding: 11px 14px; margin-bottom: 8px; font-size: 12px; line-height: 1.6; }
.ai-insight:last-child { margin-bottom: 0; }
.ai-insight-cat { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; opacity: .6; margin-bottom: 4px; }
.ai-regen-btn { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); color: #fff; border-radius: var(--radius); padding: 7px 16px; font-size: 11px; font-weight: 600; cursor: pointer; font-family: var(--font-body); transition: background .15s; }
.ai-regen-btn:hover { background: rgba(255,255,255,.22); }

/* Review breakdown */
.review-breakdown { display: grid; grid-template-columns: repeat(auto-fill,minmax(200px,1fr)); gap: 8px; margin-bottom: 16px; }
.breakdown-item {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius);
  padding: 10px 12px;
}
.breakdown-label { font-size: 11px; font-weight: 600; color: var(--color-primary); margin-bottom: 7px; }
.breakdown-bar-wrap { background: var(--color-border-light); border-radius: 4px; height: 6px; overflow: hidden; }
.breakdown-bar { height: 6px; border-radius: 4px; transition: width .4s ease; }
.breakdown-score { font-size: 12px; font-weight: 700; color: var(--color-primary); margin-top: 5px; }

/* Social content */
.content-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(300px,1fr)); gap: 12px; }
.content-card {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 16px;
}
.content-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.content-platform { font-size: 12px; font-weight: 700; color: var(--color-primary); display: flex; align-items: center; gap: 5px; }
.content-status  { font-size: 10px; }
.content-body    { font-size: 12px; color: var(--color-text); line-height: 1.6; background: var(--color-surface); border: 1px solid var(--color-border-light); border-radius: var(--radius); padding: 10px; margin-bottom: 10px; white-space: pre-wrap; }
.content-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.content-idea-btn { background: var(--color-surface); color: var(--color-primary); border: 1.5px solid var(--color-border); border-radius: var(--radius-pill); padding: 5px 14px; font-size: 11px; font-weight: 600; cursor: pointer; font-family: var(--font-body); transition: all .15s; white-space: nowrap; }
.content-idea-btn:hover { background: var(--color-surface-2); border-color: var(--color-border-strong); transform: translateY(-1px); }

/* Files */
.file-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(180px,1fr)); gap: 10px; }
.file-card {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: box-shadow .15s, border-color .15s;
}
.file-card:hover { box-shadow: var(--shadow-sm); border-color: var(--color-border); }
.file-card-icon   { font-size: 26px; text-align: center; }
.file-card-name   { font-size: 12px; font-weight: 600; color: var(--color-primary); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-card-meta   { font-size: 10px; color: var(--color-text-muted); text-align: center; }
.file-card-actions{ display: flex; gap: 4px; justify-content: center; margin-top: 2px; }
.file-drop-zone {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 13px;
  transition: all .15s;
  cursor: pointer;
  margin-bottom: 16px;
}
.file-drop-zone:hover,
.file-drop-zone.drag-over {
  border-color: var(--color-accent);
  background: var(--color-accent-light);
  color: var(--color-accent);
}

/* ============================================================
   SETTINGS
   ============================================================ */
.settings-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 500px;
  box-shadow: var(--shadow-xs);
}
/* Settings v8 — hero + sidebar con acento índigo */
#section-settings { padding: 18px 6px 40px; }
.settings-hero { margin-bottom: 20px; }
.settings-layout { border-color: var(--hairline); box-shadow: var(--shadow-raised-0); border-radius: var(--radius-xl); grid-template-columns: 232px 1fr; }
.settings-sidebar { border-right: 1px solid var(--hairline); padding: 16px 12px; background: linear-gradient(180deg, var(--c-indigo-soft), var(--color-surface-2)); }
.settings-nav-item .settings-nav-icon { display: inline-flex; }
.settings-nav-item .settings-nav-icon .ico { width: 17px; height: 17px; }
.settings-nav-item { font-size: 13px !important; padding: 10px 14px !important; margin-bottom: 3px; }
.settings-nav-item:hover  { background: var(--color-surface) !important; color: var(--c-indigo) !important; transform: translateX(2px); }
.settings-nav-item.active { background: var(--c-indigo) !important; color: #fff !important; font-weight: 700 !important; }
.settings-role { font-size: 10.5px; color: var(--color-text-muted); padding: 10px; margin-top: 10px; border-top: 1px solid var(--hairline); line-height: 1.5; }
.settings-content .settings-section-title { color: var(--c-indigo); }
.settings-content .settings-section-title::before { background: var(--c-indigo); }
.settings-sidebar-legacy { border-right: 1px solid var(--color-border); padding: 10px; background: var(--color-surface-2); }
.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-secondary);
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  transition: all .15s;
  margin-bottom: 3px;
  font-family: var(--font-body);
}
.settings-nav-item:hover  { background: var(--color-surface); color: var(--color-primary); box-shadow: var(--shadow-xs); }
.settings-nav-item.active { background: var(--color-primary); color: #fff; font-weight: 600; box-shadow: 0 4px 14px rgba(15,31,61,.15); }
.settings-nav-icon { font-size: 14px; flex-shrink: 0; }
.settings-content  { padding: 30px 32px; }
.settings-section  { margin-bottom: 34px; }
.settings-section-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--hairline);
  letter-spacing: -.01em;
  display: flex; align-items: center; gap: 10px;
}
.settings-section-title::before {
  content: ''; width: 4px; height: 17px; border-radius: 3px; background: var(--c-indigo); flex-shrink: 0;
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--color-border-light);
  gap: 12px;
}
.settings-row:last-child { border-bottom: none; }
.settings-row-label { font-size: 12px; font-weight: 600; color: var(--color-primary); }
.settings-row-desc  { font-size: 11px; color: var(--color-text-muted); margin-top: 2px; }
.settings-row-ctrl  { flex-shrink: 0; }

/* Toggle switch */
.toggle-wrap { position: relative; width: 38px; height: 22px; flex-shrink: 0; }
.toggle-wrap input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider {
  position: absolute; inset: 0;
  background: #cbd5e1;
  border-radius: 22px;
  cursor: pointer;
  transition: background .2s;
}
.toggle-slider::after {
  content: "";
  position: absolute;
  left: 3px; top: 3px;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
  box-shadow: var(--shadow-xs);
}
.toggle-wrap input:checked + .toggle-slider { background: var(--color-accent); }
.toggle-wrap input:checked + .toggle-slider::after { transform: translateX(16px); }

/* User manager */
.user-table-wrap { overflow-x: auto; }
.role-badge { display: inline-block; padding: 3px 10px; border-radius: var(--radius-pill); font-size: 10px; font-weight: 700; }
.role-admin    { background: #fce7f3; color: #9d174d; }
.role-staff    { background: var(--color-accent-light); color: #1e40af; }
.role-readonly { background: var(--color-surface-2); color: var(--color-text-secondary); }

/* Color swatches */
.color-swatch {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--color-border);
  cursor: pointer;
  transition: transform .1s;
  flex-shrink: 0;
}
.color-swatch:hover { transform: scale(1.15); }
.color-swatch.selected { box-shadow: 0 0 0 2px var(--color-accent); }

/* ============================================================
   ROOM MANAGEMENT
   ============================================================ */
.bed-edit-row { transition: background .1s; }
.bed-edit-row:hover { background: var(--color-accent-light) !important; }
.bed-edit-row .bed-label-input:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
  border-radius: 4px;
}

/* ====== Drag & Drop on bookings grid ====== */
.cell.dnd-target { outline: 1px dashed #66bb6a; outline-offset: -2px; background: #e8f5e9 !important; }
.cell.dnd-over { outline: 2px solid #2e7d32; outline-offset: -2px; background: #c8e6c9 !important; }

/* ====== CRM INBOX V2 — 3 col layout ====== */
.inbox-layout-3col {
  display: grid;
  grid-template-columns: 240px 320px 1fr;
  gap: 10px;
  height: calc(100vh - 220px);
  min-height: 460px;
}
.ib-side {
  overflow-y: auto;
  background: #fafcff;
  border: 1px solid var(--color-border-light);
  border-radius: 8px;
  padding: 6px;
}
.ib-side-section { margin-bottom: 10px; }
.ib-side-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding: 4px 8px;
}
.ib-acc-row, .ib-folder {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 11px;
}
.ib-acc-row:hover, .ib-folder:hover { background: #e8f4ff; }
.ib-acc-row.active, .ib-folder.active { background: #1565c0; color: #fff; }
.ib-folder.drop-on { background: #c8e6c9 !important; outline: 2px dashed #2e7d32; }

.ib-list {
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--color-border-light);
  border-radius: 8px;
}
.ib-detail {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--color-border-light);
  border-radius: 8px;
}
.msg-thread-scroll { flex: 1; overflow-y: auto; padding: 12px; background: #f8fbff; }
.msg-card {
  background: #fff;
  border: 1px solid var(--color-border-light);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.msg-card.out { background: #e8f5e9; border-color: #a5d6a7; }
.msg-card.ai { background: #f3e5f5; border-left: 3px solid #7b1fa2; }
.msg-card-meta { display: flex; justify-content: space-between; align-items: baseline; font-size: 11px; margin-bottom: 4px; color: var(--color-primary); }
.msg-card-subject { font-size: 12px; font-weight: 700; margin: 2px 0 6px; color: var(--color-primary); }
.msg-card-body { font-size: 12px; line-height: 1.5; word-break: break-word; }
.msg-card-body img { max-width: 100%; height: auto; }

.badge-purple { background: #e1bee7; color: #4a148c; }

@media (max-width: 1100px) {
  .inbox-layout-3col { grid-template-columns: 200px 280px 1fr; }
}
@media (max-width: 800px) {
  .inbox-layout-3col { grid-template-columns: 1fr; height: auto; }
  .ib-side, .ib-list, .ib-detail { max-height: 360px; }
}

/* ====== Weekend body cells (Sat/Sun) — subtle tint so weekends pop ====== */
.cell.wknd { background: var(--grid-weekend-bg); }
.cell.tod  { background: var(--color-cell-today); } /* defined after .wknd so today wins */
.cell.cell-covered.wknd { background: transparent; }

/* ====== Keep the date header always visible on small / short screens ====== */
/* Make the Reservas view a viewport-tall flex column so the grid scrolls
   INTERNALLY (its sticky header stays pinned) instead of the whole page
   scrolling the dates out of view. */
#section-reservas {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - 58px);
  /* sin min-height: en pantallas bajas la sección se achica y la grilla
     scrollea internamente, manteniendo las fechas siempre visibles */
}
#grid-view { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
#grid-view .grid-wrap {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;   /* override the fixed calc; flex now governs height */
}

/* refinement: vh fallback + today view scroll */
#section-reservas { height: calc(100vh - 62px); height: calc(100dvh - 62px); }
#today-view { min-height: 0; overflow-y: auto; }
#today-view[style*="block"], #today-view:not([style*="none"]) { flex: 1 1 auto; }

/* ==================================================================
   DESIGN SYSTEM v7 — CAPA DE MOVIMIENTO + COMPONENTES PREMIUM
   (se agrega al final para sobreescribir por orden de cascada; ver DESIGN.md)
   ================================================================== */

/* ---------- Keyframes ---------- */
@keyframes ar-shimmer   { 0%{background-position:-160% 0} 100%{background-position:160% 0} }
@keyframes ar-fade-up   { from{opacity:0; transform:translateY(16px)} to{opacity:1; transform:translateY(0)} }
@keyframes ar-pop-in    { 0%{opacity:0; transform:scale(.94)} 60%{opacity:1} 100%{opacity:1; transform:scale(1)} }
@keyframes ar-grad-pan  { 0%{background-position:0% 50%} 100%{background-position:200% 50%} }
@keyframes ar-pulse-ring{ 0%{box-shadow:0 0 0 0 rgba(37,99,235,.34)} 70%{box-shadow:0 0 0 10px rgba(37,99,235,0)} 100%{box-shadow:0 0 0 0 rgba(37,99,235,0)} }
@keyframes ar-float     { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-7px)} }

/* ---------- Scroll reveal (activa la clase .is-in vía IntersectionObserver) ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); will-change: opacity, transform; }
.reveal.is-in { opacity: 1; transform: none; }
.reveal-stagger > * { opacity: 0; transform: translateY(14px); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); }
.reveal-stagger.is-in > * { opacity: 1; transform: none; }
.reveal-stagger.is-in > *:nth-child(1){transition-delay:0ms}
.reveal-stagger.is-in > *:nth-child(2){transition-delay:60ms}
.reveal-stagger.is-in > *:nth-child(3){transition-delay:120ms}
.reveal-stagger.is-in > *:nth-child(4){transition-delay:180ms}
.reveal-stagger.is-in > *:nth-child(5){transition-delay:240ms}
.reveal-stagger.is-in > *:nth-child(6){transition-delay:300ms}
.reveal-stagger.is-in > *:nth-child(n+7){transition-delay:340ms}

/* ---------- Eyebrow (micro-label uppercase tracked) ---------- */
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-micro);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--color-accent);
  display: inline-flex; align-items: center; gap: 7px;
}
.eyebrow::before { content:''; width: 18px; height: 2px; border-radius: 2px; background: var(--grad-brand); }
.eyebrow.muted { color: var(--color-text-muted); }
.eyebrow.muted::before { background: var(--hairline-strong); }

/* ---------- Texto con degradé de marca + display ---------- */
.grad-text {
  background: var(--grad-brand);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.display-hero { font-family: var(--font-display); font-weight: 800; font-size: var(--text-hero); line-height: .98; letter-spacing: -.03em; }
.display-h1   { font-family: var(--font-display); font-weight: 700; font-size: var(--text-h1);  line-height: 1.04; letter-spacing: -.02em; }
.display-h2   { font-family: var(--font-display); font-weight: 700; font-size: var(--text-h2);  line-height: 1.1; letter-spacing: -.01em; }
/* Énfasis en headline: SOLO 2-4 palabras que llevan el significado */
.hl-em { color: var(--color-primary); font-weight: 800; }

/* ---------- Lista dividida por hairlines (en vez de cajas) ---------- */
.hairline-list { display: flex; flex-direction: column; }
.hairline-list > .hl-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 6px;
  border-bottom: 1px solid var(--hairline);
  transition: padding-left var(--dur-base) var(--ease-standard), background var(--dur-fast);
  cursor: pointer;
}
.hairline-list > .hl-item:hover { padding-left: 14px; background: linear-gradient(90deg, rgba(37,99,235,.05), transparent 70%); }
.hl-item .hl-arrow { margin-left: auto; transition: transform var(--dur-base) var(--ease-spring); color: var(--color-accent); }
.hl-item:hover .hl-arrow { transform: translateX(4px); }

/* ---------- Stat row (números grandes + label chico, count-up) ---------- */
.stat-row { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0; }
.stat { padding: 4px 22px; border-left: 1px solid var(--hairline); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat-num { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.7rem, 3vw, 2.6rem); line-height: 1; letter-spacing: -.02em; color: var(--color-primary); font-variant-numeric: tabular-nums; }
.stat-num.grad { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-label { margin-top: 7px; font-size: var(--text-small); color: var(--color-text-muted); font-weight: 500; }

/* ---------- Expandable (Cloudbeds pattern) ---------- */
.xpand { border-bottom: 1px solid var(--hairline); }
.xpand-head { display: flex; align-items: center; gap: 10px; padding: 13px 4px; cursor: pointer; font-weight: 600; color: var(--color-primary); transition: color var(--dur-fast); }
.xpand-head:hover { color: var(--color-accent); }
.xpand-head .chev { margin-left: auto; transition: transform var(--dur-base) var(--ease-spring); color: var(--color-text-muted); }
.xpand.open .xpand-head .chev { transform: rotate(90deg); color: var(--color-accent); }
.xpand-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--dur-base) var(--ease-standard); }
.xpand.open .xpand-body { grid-template-rows: 1fr; }
.xpand-body > div { overflow: hidden; }

/* ---------- Skeleton shimmer (nunca solo un spinner para tablas) ---------- */
.skeleton {
  background: linear-gradient(100deg, var(--color-surface-2) 30%, rgba(255,255,255,.75) 50%, var(--color-surface-2) 70%);
  background-size: 220% 100%;
  animation: ar-shimmer 1.4s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

/* ---------- Sección oscura (ritmo de página, momento de métrica clave) ---------- */
.dark-section {
  background: radial-gradient(900px 400px at 80% -20%, rgba(79,156,240,.22), transparent 60%), var(--bg-dark);
  color: var(--ink-inverse);
  border-radius: var(--radius-xl);
  padding: var(--space-8) var(--space-8);
}
.dark-section .eyebrow { color: var(--brand-sky); }
.dark-section .stat-num { color: #fff; }
.dark-section .stat { border-left-color: rgba(255,255,255,.14); }
.dark-section .stat-label { color: rgba(246,245,241,.66); }

/* ---------- Lift util (card plano → sombra al hover) ---------- */
.lift { transition: transform var(--dur-base) var(--ease-standard), box-shadow var(--dur-base) var(--ease-standard); }
.lift { box-shadow: var(--shadow-elevated-0); }
.lift:hover { transform: translateY(-3px); box-shadow: var(--shadow-elevated); }

/* ---------- Iconos SVG inline ---------- */
.ico { width: 1.05em; height: 1.05em; display: inline-block; vertical-align: -.15em; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.ico-lg { width: 20px; height: 20px; }

/* ==================================================================
   REFINAMIENTO DE CHROME COMPARTIDO (botones, tabs, inputs, paneles, modal)
   ================================================================== */

/* ---- Transiciones base en todo lo interactivo ---- */
button, a, .snav-btn, .nbtn, .mb, .atab, .ctab, .mtab, .tvb, input, select, textarea {
  transition: background var(--dur-base) var(--ease-standard),
              color var(--dur-fast) var(--ease-standard),
              border-color var(--dur-fast) var(--ease-standard),
              filter var(--dur-base) var(--ease-standard),
              box-shadow var(--dur-base) var(--ease-standard),
              transform var(--dur-base) var(--ease-out);
}
button:active, .nbtn:active, .mb:active { transform: scale(.97); }

/* ---- Botón primario: degradé de marca, hover SIN animar box-shadow ----
   NUNCA animar box-shadow hacia un token con distinta cantidad de capas: los
   navegadores no interpolan eso y se "trababa/saltaba" (el parpadeo reportado).
   Acá el shadow queda FIJO; el único cambio de hover es transform + overlay
   de opacidad (ver capa de movimiento más abajo) — eso sí interpola siempre. */
.nbtn {
  background: var(--grad-brand);
  border: 0;
  box-shadow: var(--shadow-sm);
  letter-spacing: .005em;
}
.nbtn:hover { transform: translateY(-1.5px); }
.nbtn:active { transform: translateY(0) scale(.985); }
.nbtn.green { background: linear-gradient(115deg, #0b7d53, #12b579); }
.nav-dates .nbtn { background: var(--color-surface); box-shadow: none; border: 1.5px solid var(--color-border); }
.nav-dates .nbtn.green { background: var(--grad-brand-soft); border-color: #bcd4fb; }

.mb.primary { background: var(--grad-brand); border: 0; box-shadow: var(--shadow-sm); }
.mb.primary:hover { transform: translateY(-1.5px); }
.mb.green { background: linear-gradient(115deg, #0b7d53, #12b579); border: 0; }

/* ---- Tabs (admin/crm/mkt): pill con deslizamiento suave ---- */
.atab, .ctab, .mtab { box-shadow: none; border-color: var(--hairline-strong); background: rgba(255,255,255,.6); backdrop-filter: blur(6px); }
.atab.active, .ctab.active, .mtab.active { background: var(--grad-brand); box-shadow: none; }

/* ---- Toggle grilla/hoy ---- */
.tvb { transition: color var(--dur-fast), background var(--dur-base); }

/* ---- Inputs: radio chico, focus con anillo de marca ---- */
.form-row input, .form-row select, .form-row textarea { border-radius: var(--radius-sm); background: var(--color-surface); border-color: var(--color-border-strong); }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(37,99,235,.14); }

/* ---- section-label: convertido en eyebrow ---- */
.section-label {
  font-size: var(--text-micro); font-weight: 700; letter-spacing: .12em;
  color: var(--color-accent); text-transform: uppercase;
  display: flex; align-items: center; gap: 8px; margin: 18px 0 8px;
}
.section-label::before { content:''; width: 16px; height: 2px; border-radius: 2px; background: var(--grad-brand); flex-shrink: 0; }

/* ---- Paneles: hairline-first, elevación al hover ---- */
.admin-panel { border-color: var(--hairline); box-shadow: var(--shadow-raised-0); border-radius: var(--radius-lg); transition: box-shadow var(--dur-base) var(--ease-standard), border-color var(--dur-base); }
.admin-panel:hover { box-shadow: var(--shadow-raised); border-color: var(--color-border); }

/* ---- Topbar: barra frost/glass ---- */
.topbar {
  background: rgba(255,255,255,.72);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-color: var(--hairline);
  box-shadow: 0 1px 0 var(--hairline), 0 8px 24px rgba(14,33,72,.05);
  min-height: 52px;   /* min, no fijo: si envuelve a varias filas tiene que poder crecer */
}
.logo { font-family: var(--font-display); font-weight: 800; font-size: clamp(14px, 1.3vw, 17px); letter-spacing: -.03em; }
.logo span { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; font-weight: 800; }

/* ---- Modal: vidrio + entrada con resorte ---- */
.modal-overlay { background: rgba(9,17,35,.5); backdrop-filter: blur(6px); }
.modal-box { border-color: var(--hairline); box-shadow: var(--shadow-lg); animation: ar-pop-in var(--dur-base) var(--ease-spring); }
.modal-box h3 { font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
/* Modal ancho de 2 columnas, sin scroll (para fichas densas como la reserva) */
.modal-box.modal-wide { max-width: 920px; }
.mheader-sticky { background: linear-gradient(180deg, var(--color-surface), rgba(255,255,255,.9)); backdrop-filter: blur(8px); }

/* ---- Scrollbars finos ---- */
* { scrollbar-width: thin; scrollbar-color: var(--color-border-strong) transparent; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: var(--color-border-strong); border-radius: 999px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--color-text-subtle); background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---- Loading: spinner de marca ---- */
.loading-overlay { background: rgba(9,17,35,.28); backdrop-filter: blur(3px); }
.loading-spinner { border-color: rgba(79,156,240,.25); border-top-color: var(--brand-azure); box-shadow: 0 8px 30px rgba(14,33,72,.18); }

/* ==================================================================
   DESIGN SYSTEM v7 — PROPAGACIÓN A BLOQUES COMPARTIDOS
   Refinar acá transforma TODAS las pantallas JS (admin, analytics,
   settings, crm, marketing) de una, porque todas usan estas clases.
   ================================================================== */

/* ---- Toolbar de reservas: frost como la topbar ---- */
.toolbar {
  background: rgba(246,245,241,.82);
  backdrop-filter: saturate(1.3) blur(12px);
  -webkit-backdrop-filter: saturate(1.3) blur(12px);
  padding: 8px 4px 8px;
  border-bottom: 1px solid var(--hairline);
}
.toggle-view { background: var(--color-surface); border-color: var(--hairline-strong); box-shadow: none; }
/* .tvb.active queda superado por la pastilla deslizante .toggle-view::before (ver v7.3) */

/* ---- Paneles: entrada suave al renderizar + título display ---- */
.admin-panel { animation: ar-fade-up var(--dur-base) var(--ease-out); }
.admin-panel-header { border-bottom-color: var(--hairline); }
.admin-panel-title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; letter-spacing: -.02em; }
.admin-panel-subtitle { font-size: var(--text-small); }

/* ---- Summary cards → stat cards premium (número display, label eyebrow, hover lift) ---- */
.summary-cards { gap: 12px; }
.scard {
  background: var(--color-surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  text-align: left;
  box-shadow: var(--shadow-elevated-0);
  transition: transform var(--dur-base) var(--ease-standard), box-shadow var(--dur-base) var(--ease-standard), border-color var(--dur-base);
  position: relative; overflow: hidden;
}
.scard::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--grad-brand); opacity: 0; transition: opacity var(--dur-base); }
.scard:hover { transform: translateY(-3px); box-shadow: var(--shadow-elevated); border-color: var(--color-border); }
.scard:hover::before { opacity: 1; }
.scard-label { font-size: var(--text-micro); letter-spacing: .1em; }
.scard-value { font-family: var(--font-display); font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.05; }
.scard.green { background: var(--color-surface); }
.scard.green .scard-value { color: var(--color-green); }
.scard.green::before { background: linear-gradient(180deg,#0b7d53,#12b579); }
.scard.red { background: var(--color-surface); }
.scard.red .scard-value { color: var(--color-danger); }
.scard.red::before { background: linear-gradient(180deg,#e0362f,#f0625c); }
.scard.blue { background: var(--color-surface); }
.scard.blue .scard-value { color: var(--color-accent); }

/* ---- Tablas premium: contenedor redondeado, hover con tinte de marca, header sticky ---- */
.data-table { font-variant-numeric: tabular-nums; }
.data-table th { background: var(--color-surface-2); color: var(--color-text-muted); border-bottom: 1px solid var(--hairline-strong); letter-spacing: .08em; position: sticky; top: 0; }
.data-table td { border-bottom: 1px solid var(--hairline); }
.data-table tbody tr { transition: background var(--dur-fast); }
.data-table tbody tr:hover td { background: linear-gradient(90deg, rgba(37,99,235,.06), rgba(37,99,235,.02)); }
.data-table .td-name { font-weight: 700; }
.data-table th.sortable { cursor: pointer; user-select: none; }
.data-table th.sortable::after { content: '↕'; margin-left: 5px; opacity: .4; display: inline-block; transition: transform var(--dur-base); }
.data-table th.sortable.asc::after { content: '↑'; opacity: 1; }
.data-table th.sortable.desc::after { content: '↓'; opacity: 1; }

/* ---- Empty state: icono en círculo suave ---- */
.empty-state { padding: 56px 20px; animation: ar-fade-up var(--dur-base) var(--ease-out); }
.empty-state-icon { width: 60px; height: 60px; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; font-size: 28px; border-radius: 50%; background: var(--grad-brand-soft); opacity: 1; }
.empty-state-title { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; }

/* ---- Badges: pills suaves con borde fino ---- */
.badge { border: 1px solid transparent; }
.badge-green  { background: var(--color-green-light); color: #0b6b47; border-color: rgba(15,157,104,.22); }
.badge-blue   { background: var(--color-accent-light); color: var(--color-accent); border-color: rgba(37,99,235,.2); }
.badge-orange { background: #fdf0dd; color: #a15a05; border-color: rgba(217,130,7,.22); }
.badge-red    { background: var(--color-danger-light); color: #b8281f; border-color: rgba(224,54,47,.2); }
.badge-gray   { background: var(--color-surface-2); color: var(--color-text-secondary); border-color: var(--hairline-strong); }

/* ---- Fila de sección con eyebrow + titular (helper para encabezados JS) ---- */
.sec-head { margin: 4px 0 16px; }
.sec-head .display-h2, .sec-head h2 { font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em; color: var(--color-primary); margin-top: 4px; }

/* ==================================================================
   DESIGN SYSTEM v7.2 — REDISEÑO PROFUNDO: transiciones, grilla, CRM, aire
   ================================================================== */

/* ---- Transición al cambiar de sección / vista / pestaña (motion, no snap) ---- */
@keyframes ar-section-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.ar-anim-in { animation: ar-section-in var(--dur-base) var(--ease-out); }

/* ---- Más aire: secciones y barras de pestañas respiran ---- */
.section-content { padding-top: 4px; }
#admin-content, #mkt-content, #crm-content, #settings-wrap, #analytics-content, #super-wrap { animation: ar-section-in var(--dur-base) var(--ease-out); }
.admin-tabs { gap: 6px; margin-bottom: 20px; padding: 4px 0; }
.atab, .ctab, .mtab { padding: 9px 18px; }

/* ================= GRILLA — lenguaje nuevo, claro y con vida ================= */
.grid-wrap { border-color: var(--hairline); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.grid-header {
  background: linear-gradient(180deg, #fbfaf7, #f1efe8);
  border-bottom: 1px solid var(--hairline-strong);
  box-shadow: 0 1px 0 var(--hairline);
}
.ghc {
  border-right: 1px solid var(--hairline);
  color: var(--color-text-secondary);
  padding: 8px 2px 5px;
  position: relative;
  transition: background var(--dur-fast);
}
.ghc-day { font-weight: 700; opacity: .55; color: var(--color-text-muted); }
.ghc-num { font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: -.02em; color: var(--color-primary); }
.ghc-mon { opacity: .5; }
/* Hoy: barra de acento arriba + tinte + número en azul de marca */
.ghc.tod { background: linear-gradient(180deg, var(--color-accent-light), #f1efe8); color: var(--color-accent); }
.ghc.tod::before { content: ''; position: absolute; top: 0; left: 6px; right: 6px; height: 3px; border-radius: 0 0 3px 3px; background: var(--grad-brand); }
.ghc.tod .ghc-num { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.ghc.wknd { background: linear-gradient(180deg, #f7f4ee, #efece4); }
/* Disponibilidad como pastilla suave */
.ghc-free { display: inline-block; padding: 1px 7px; border-radius: 999px; background: rgba(15,157,104,.12); }
.ghc-ampm { border-top: 1px dashed var(--hairline); opacity: .5; }

/* Columna congelada de habitaciones/camas: flota sobre el scroll */
.ghc-label, .rh-cell { box-shadow: 6px 0 12px -8px rgba(14,33,72,.18); }
.ghc-label { background: linear-gradient(180deg, #fbfaf7, #f1efe8); border-right: 1px solid var(--hairline-strong); font-family: var(--font-display); }
.rh-cell { background: var(--color-surface); border-right: 1px solid var(--hairline-strong); color: var(--color-primary); }
/* Encabezado de GRUPO: degradé de marca, texto claro */
.group-header-row .rh-cell { background: var(--grad-brand); color: #fff; }
.group-header-row .rh-cell .grp-badge { background: rgba(255,255,255,.22) !important; color: #fff !important; }
.group-header-row .rh-spacer { background: var(--color-accent-light); }

/* Celdas: líneas hairline + hover con tinte de marca */
.bed-row { border-bottom: 1px solid var(--hairline); }
.cell { border-right: 1px solid var(--hairline); transition: background var(--dur-fast); }
.bed-row:hover .cell { background: rgba(37,99,235,.03); }

/* Pastillas de reserva: sombra suave + transición fluida (ya coloreadas por canal)
   Acá había un "border-radius: 8px !important" que le ganaba al estilo inline y
   pisaba la forma que calcula el JS: por eso los extremos redondeados de las
   pastillas nunca se veían. Se saca para que la forma elegida en Ajustes de la
   grilla mande de verdad. */
.bkpill { box-shadow: 0 2px 6px rgba(14,33,72,.14); transition: transform var(--dur-base) var(--ease-spring), filter var(--dur-fast), box-shadow var(--dur-base) !important; }
.bkpill:hover { box-shadow: 0 6px 16px rgba(14,33,72,.22); z-index: 6 !important; }

/* ================= CRM — espacioso, suave, limpio (no “de hace 100 años”) ================= */
.crm-panel { animation: ar-section-in var(--dur-base) var(--ease-out); }
.inbox-layout-3col { gap: 16px; height: calc(100vh - 210px); }
.ib-side, .ib-list, .ib-detail { background: var(--color-surface); border: 1px solid var(--hairline); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.ib-side { padding: 12px 10px; }
.ib-side-section { margin-bottom: 18px; }
.ib-side-title { font-size: var(--text-micro); letter-spacing: .12em; color: var(--color-accent); padding: 4px 10px 8px; }
.ib-acc-row, .ib-folder {
  gap: 11px; padding: 10px 12px; margin-bottom: 3px; border-radius: 10px;
  font-size: 12.5px; font-weight: 500; color: var(--color-text-secondary);
  transition: background var(--dur-fast), color var(--dur-fast), transform var(--dur-base) var(--ease-spring);
}
.ib-acc-row:hover, .ib-folder:hover { background: var(--color-accent-light); color: var(--color-primary); transform: translateX(3px); }
.ib-acc-row.active, .ib-folder.active { background: var(--grad-brand); color: #fff; }

/* Filas de conversación: aireadas, separadas por hairline, hover con vida */
.inbox-msg-row {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 15px 16px; border-bottom: 1px solid var(--hairline);
  cursor: pointer; transition: background var(--dur-fast), box-shadow var(--dur-base);
  border-left: 3px solid transparent;
}
.inbox-msg-row:hover { background: linear-gradient(90deg, rgba(37,99,235,.05), transparent 80%); }
.inbox-msg-row.selected { background: var(--color-accent-light); border-left-color: var(--color-accent); }
.inbox-msg-row.unread .inbox-msg-from { font-weight: 800; color: var(--color-primary); }
.inbox-msg-ch { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--grad-brand-soft); color: var(--color-accent); font-size: 15px; flex-shrink: 0; }
.inbox-msg-body { min-width: 0; flex: 1; }
.inbox-msg-from { font-size: 13px; font-weight: 600; color: var(--color-primary); display: flex; align-items: center; gap: 6px; }
.inbox-msg-subject { font-size: 12.5px; font-weight: 600; color: var(--color-text-secondary); margin: 3px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-msg-preview { font-size: 12px; color: var(--color-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-msg-time { font-size: 10.5px; color: var(--color-text-subtle); white-space: nowrap; flex-shrink: 0; }
.inbox-no-select { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--color-text-muted); gap: 4px; }

/* Detalle / hilo de mensajes: burbujas suaves y espaciadas */
.msg-thread-scroll { padding: 18px; background: var(--bg-canvas); gap: 12px; }
.msg-card { border: 1px solid var(--hairline); border-radius: 14px; padding: 13px 15px; margin-bottom: 12px; box-shadow: var(--shadow-xs); }
.msg-card.out { background: var(--color-green-light); border-color: rgba(15,157,104,.2); }
.msg-card.ai { background: #f4eefb; border-left: 3px solid #7b1fa2; }
.msg-card-subject { font-family: var(--font-display); }

/* ==================================================================
   DESIGN SYSTEM v7.3 — MOVIMIENTO MANTECOSO (adiós "parpadeo") + placeholders
   El brillo por `filter` re-rasteriza el degradé y parpadea. Se reemplaza por
   una capa blanca que se desvanece por opacidad (siempre fluida).
   ================================================================== */

/* Anula el filter que parpadeaba en TODOS los botones de degradé */
.nbtn:hover, .mb.primary:hover, .mb.green:hover { filter: none !important; }
.nbtn, .mb.primary, .mb.green { position: relative; overflow: hidden; isolation: isolate; }
.nbtn::after, .mb.primary::after, .mb.green::after {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: #fff; opacity: 0;
  transition: opacity var(--dur-base) var(--ease-standard);
}
.nbtn:hover::after, .mb.primary:hover::after, .mb.green:hover::after { opacity: .14; }
.nbtn > *, .mb.primary > *, .mb.green > * { position: relative; z-index: 1; }
/* SIN cambio de box-shadow en hover — el shadow queda fijo (ver regla de arriba).
   translateY ya está declarado más arriba (línea ~2323/2332); no repetir acá con
   un box-shadow distinto o vuelve a romper la interpolación. */

/* REGLA DE ORO: box-shadow NUNCA se anima entre valores con distinta cantidad de
   capas (los navegadores no interpolan eso — "traba" a mitad de camino). Por eso
   ninguna transición de acá en adelante incluye box-shadow: todo el feedback de
   hover se resuelve con transform + opacity, que SIEMPRE interpolan sin saltos. */
button, a, .snav-btn, .nbtn, .mb, .atab, .ctab, .mtab, .tvb, .ib-folder, .ib-acc-row,
.scard, .fcard, .admin-panel, .inbox-msg-row, .settings-nav-item, input, select, textarea {
  transition: background var(--dur-base) var(--ease-standard),
              color var(--dur-base) var(--ease-standard),
              border-color var(--dur-base) var(--ease-standard),
              opacity var(--dur-base) var(--ease-standard),
              transform var(--dur-base) var(--ease-out) !important;
}

/* Cambio de sección/vista: deslizamiento lateral (sensación de conexión, no corte) */
@keyframes ar-section-in { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }

/* Toggle Grilla ↔ Hoy: pastilla que DESLIZA a la opción activa (sin box-shadow animado) */
.toggle-view { position: relative; display: flex; overflow: visible; }
.toggle-view .tvb { flex: 1 1 0; text-align: center; position: relative; z-index: 1; background: transparent !important; color: var(--color-text-muted); border-radius: var(--radius-pill); }
.toggle-view .tvb.active { background: transparent !important; color: #fff; margin: 0; }
.toggle-view::before {
  content: ''; position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px);
  border-radius: var(--radius-pill); background: var(--grad-brand);
  z-index: 0; transition: transform var(--dur-base) var(--ease-spring);
}
.toggle-view:has(#btn-today.active)::before { transform: translateX(calc(100% + 0px)); }

/* Placeholders modernos + inputs suaves en toda la app (no más "HTML plano") */
input::placeholder, textarea::placeholder { color: var(--color-text-subtle); opacity: 1; font-weight: 400; letter-spacing: .01em; }
input[type="text"], input[type="email"], input[type="password"], input[type="search"],
input[type="number"], input[type="date"], input[type="time"], select, textarea {
  border-radius: var(--radius-sm);
}
.form-row input, .form-row select, .form-row textarea { height: auto; padding: 9px 12px; }
.form-row input:hover, .form-row select:hover, .form-row textarea:hover { border-color: var(--color-border-strong); }

/* ---- Grilla v7.3: fechas más grandes/claras + pastillas legibles ---- */
.ghc { padding: 11px 3px 7px; }
.ghc-day { font-size: 9.5px; font-weight: 800; opacity: .6; }
.ghc-num { font-size: 22px; font-weight: 800; line-height: 1; }
.ghc-mon { font-size: 8px; margin-top: 1px; }
.ghc-free { font-size: 9.5px; margin-top: 2px; }
/* Pastillas de reserva: tipografía legible (Inter, más peso y tamaño) */
.bkpill {
  font-family: var(--font-body) !important;
  font-weight: 700 !important;
  font-size: calc(var(--grid-font, 10px) + 1.5px) !important;
  letter-spacing: .003em !important;
  padding: 0 10px !important;
}
.grp-badge { font-size: 10px !important; padding: 2px 9px; font-weight: 800; }
/* Habitación (fila): nombre más presente */
.bl-room .rm-name { font-size: calc(var(--grid-font, 10px) + 2px); font-weight: 800; }

/* ---- Pestañas admin/CRM/marketing → lista espaciada con subrayado animado ---- */
.admin-tabs { gap: clamp(14px, 2vw, 30px) !important; border-bottom: 1px solid var(--hairline); padding: 0 2px !important; margin-bottom: 24px !important; flex-wrap: wrap; }
.atab, .ctab, .mtab {
  background: transparent !important; border: 0 !important; box-shadow: none !important;
  backdrop-filter: none !important; border-radius: 0 !important;
  padding: 10px 2px !important; margin: 0 !important;
  color: var(--color-text-muted) !important; font-weight: 600 !important; font-size: 13.5px !important;
  position: relative; display: inline-flex; align-items: center; gap: 8px;
}
.atab .ico, .ctab .ico, .mtab .ico { width: 17px; height: 17px; opacity: .8; transition: transform var(--dur-base) var(--ease-spring); }
.atab::after, .ctab::after, .mtab::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2.5px; border-radius: 3px 3px 0 0;
  background: var(--grad-brand); transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur-base) var(--ease-out);
}
.atab:hover, .ctab:hover, .mtab:hover { color: var(--color-text-secondary) !important; transform: translateY(-1px); }
.atab:hover .ico, .ctab:hover .ico, .mtab:hover .ico { transform: translateY(-1px) scale(1.08); opacity: 1; }
.atab:hover::after, .ctab:hover::after, .mtab:hover::after { transform: scaleX(1); }
.atab.active, .ctab.active, .mtab.active { color: var(--color-primary) !important; font-weight: 800 !important; transform: none; }
.atab.active .ico, .ctab.active .ico, .mtab.active .ico { opacity: 1; color: var(--color-accent); }
.atab.active::after, .ctab.active::after, .mtab.active::after { transform: scaleX(1); }

/* ---- Ficha de reserva: modal ANCHO de 2 columnas (sin scroll vertical) ---- */
.modal-overlay:has(.bk-2col) .modal-box,
.modal-box:has(.bk-2col) { max-width: 900px; }
.bk-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: start; }
.bk-col { min-width: 0; }
.bk-col .section-label:first-child { margin-top: 4px; }
@media (max-width: 760px) {
  .bk-2col { grid-template-columns: 1fr; gap: 0; }
  .modal-box:has(.bk-2col) { max-width: 480px; }
}

/* ==================================================================
   CUENTAS (BANCO) — rediseño bespoke completo, ver DESIGN.md
   Hero oscuro con canvas ambiente reactivo al mouse + tarjetas bancarias
   reales con tilt 3D, en vez de .scard genéricas.
   ================================================================== */
.bank-hero {
  position: relative; overflow: hidden; border-radius: var(--radius-xl);
  background: radial-gradient(900px 420px at 82% -10%, rgba(79,156,240,.24), transparent 60%), var(--bg-dark);
  padding: 40px 36px 34px; margin-bottom: 22px; color: var(--ink-inverse);
}
.ambient-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: .8; }
.bank-hero-in { position: relative; z-index: 1; }
.bank-hero .eyebrow { color: var(--brand-sky); }
.bank-hero-total {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -.03em;
  font-size: clamp(2.4rem, 5vw, 3.6rem); margin-top: 10px; font-variant-numeric: tabular-nums;
}
.bank-hero-sub { color: rgba(246,245,241,.62); font-size: 13.5px; margin-top: 4px; }
.bank-hero-chips { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.bank-hero-chips .login-chip { background: rgba(255,255,255,.07); }
.bank-hero-chips .ico { width: 14px; height: 14px; margin-right: 5px; opacity: .8; }

.bank-cards-row {
  display: flex; gap: 16px; overflow-x: auto; padding: 6px 2px 14px;
  scroll-snap-type: x proximity;
}
.bank-cards-row::-webkit-scrollbar { height: 6px; }
.bank-card {
  scroll-snap-align: start; flex: 0 0 auto; width: 240px; height: 148px;
  border-radius: 18px; padding: 18px 20px; position: relative; overflow: hidden;
  color: #fff; cursor: pointer; transform-style: preserve-3d;
  box-shadow: 0 14px 30px rgba(14,33,72,.22), inset 0 1px 0 rgba(255,255,255,.14);
  transition: transform var(--dur-fast) linear, box-shadow var(--dur-base) var(--ease-standard) !important;
  display: flex; flex-direction: column; justify-content: space-between;
}
.bank-card:hover { box-shadow: 0 20px 40px rgba(14,33,72,.32), inset 0 1px 0 rgba(255,255,255,.18); }
.tilt-sheen { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: overlay; }
.bank-card-top { display: flex; align-items: center; justify-content: space-between; font-size: 11px; font-weight: 700; opacity: .88; text-transform: uppercase; letter-spacing: .06em; }
.bank-card-top .ico { width: 15px; height: 15px; margin-right: 6px; vertical-align: -3px; }
.bank-card-menu { opacity: .7; transition: opacity var(--dur-fast), transform var(--dur-base) var(--ease-spring); }
.bank-card-menu .ico { width: 15px; height: 15px; }
.bank-card:hover .bank-card-menu { opacity: 1; transform: translateX(3px); }
.bank-card-title { font-family: var(--font-display); font-weight: 800; font-size: 16px; letter-spacing: -.01em; max-width: 165px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bank-card-type-tag { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,.18); }
.bank-card-type-tag .ico { width: 12px; height: 12px; }
.bank-card-num { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; opacity: .7; }
.bank-card-bottom { display: flex; align-items: flex-end; justify-content: space-between; }
.bank-card-label { font-size: 9.5px; opacity: .68; text-transform: uppercase; letter-spacing: .08em; }
.bank-card-bal { font-family: var(--font-display); font-size: 22px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.bank-card-add {
  border: 1.5px dashed rgba(14,33,72,.22); background: transparent; color: var(--color-text-muted);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  font-size: 12px; font-weight: 600; box-shadow: none;
}
.bank-card-add:hover { border-color: var(--color-accent); color: var(--color-accent); background: var(--color-accent-light); box-shadow: none; }
.bank-card-add .ico { width: 24px; height: 24px; }

/* Bloque "cuenta por defecto por canal": 2 columnas (config + ilustración colorida) */
.bank-chacc {
  display: grid; grid-template-columns: 1fr 320px; gap: 28px; align-items: center;
  background: var(--color-surface); border: 1px solid var(--hairline); border-radius: var(--radius-lg);
  padding: 22px 26px; margin-bottom: 18px; overflow: hidden;
}
.bank-chacc-main { min-width: 0; }
.bank-chacc-main .section-label { color: var(--c-amber); }
.bank-chacc-main .section-label::before { background: var(--c-amber); }
.bank-chacc .hl-item.chacc-row { padding: 11px 4px; gap: 12px; cursor: default; flex-wrap: wrap; }
.bank-chacc .hl-item.chacc-row:hover { padding-left: 4px; background: none; }
.chacc-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 0%, transparent); }
.chacc-auto { font-size: 11.5px; display: flex; align-items: center; gap: 6px; cursor: pointer; color: var(--color-text-muted); }
.bank-chacc-art { display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, #f6f8ff, #fdeef4); border-radius: var(--radius-md); padding: 14px; align-self: stretch; }
.bank-art-svg { width: 100%; height: auto; max-height: 240px; }
.bank-art-wallet { animation: ar-float 5s var(--ease-standard) infinite; transform-origin: center; }
@media (max-width: 860px) { .bank-chacc { grid-template-columns: 1fr; } .bank-chacc-art { display: none; } }

.bank-tx-list { display: flex; flex-direction: column; }
.bank-tx-row {
  display: flex; align-items: center; gap: 14px; padding: 13px 4px;
  border-bottom: 1px solid var(--hairline); transition: background var(--dur-fast) !important;
}
.bank-tx-row:hover { background: linear-gradient(90deg, rgba(37,99,235,.05), transparent 80%); }
.bank-tx-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 0 3px rgba(0,0,0,.04); }
.bank-tx-main { flex: 1; min-width: 0; }
.bank-tx-desc { font-weight: 600; color: var(--color-primary); font-size: 13px; }
.bank-tx-meta { font-size: 11px; color: var(--color-text-muted); margin-top: 2px; }
.bank-tx-amt { font-family: var(--font-display); font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bank-tx-row .mb.danger { opacity: 0; transition: opacity var(--dur-fast) !important; }
.bank-tx-row:hover .mb.danger { opacity: 1; }

@media (max-width: 640px) {
  .bank-hero { padding: 28px 20px 24px; }
  .bank-card { width: 200px; height: 132px; }
}

/* ==================================================================
   PALETA AMPLIADA + COLOR POR SECCIÓN (basta de azul/verde en todo)
   Cada sección tiene su acento propio; se aplica a eyebrows, labels,
   pestañas activas e iconos. El degradé de marca queda para CTAs.
   ================================================================== */
:root {
  --c-violet:#7c3aed; --c-violet-soft:#f3edff;
  --c-teal:#0d9488;   --c-teal-soft:#e2f6f3;
  --c-amber:#d97706;  --c-amber-soft:#fdf3e2;
  --c-rose:#e11d64;   --c-rose-soft:#fdeaf1;
  --c-cyan:#0891b2;   --c-cyan-soft:#e0f4fa;
  --c-indigo:#4f46e5; --c-indigo-soft:#eeeefe;
  --c-lime:#4d7c0f;   --c-lime-soft:#eef7dd;
  --c-orange:#ea580c; --c-orange-soft:#fdece1;
}
.section-content { --sec-accent: var(--color-accent); --sec-accent-soft: var(--color-accent-light); }
#section-reservas  { --sec-accent:#1d4ed8; --sec-accent-soft:#eaf1ff; }
#section-crm       { --sec-accent:var(--c-violet); --sec-accent-soft:var(--c-violet-soft); }
#section-analytics { --sec-accent:var(--c-teal);   --sec-accent-soft:var(--c-teal-soft); }
#section-marketing { --sec-accent:var(--c-rose);   --sec-accent-soft:var(--c-rose-soft); }
#section-admin     { --sec-accent:var(--c-amber);  --sec-accent-soft:var(--c-amber-soft); }
#section-settings  { --sec-accent:var(--c-indigo); --sec-accent-soft:var(--c-indigo-soft); }
#section-super     { --sec-accent:var(--c-violet); --sec-accent-soft:var(--c-violet-soft); }
/* Aplicar el acento de sección al chrome interno */
.section-content .eyebrow { color: var(--sec-accent); }
.section-content .eyebrow::before,
.section-content .section-label::before { background: var(--sec-accent); }
.section-content .section-label { color: var(--sec-accent); }
.section-content .atab.active, .section-content .ctab.active, .section-content .mtab.active { color: var(--sec-accent) !important; }
.section-content .atab.active::after, .section-content .ctab.active::after, .section-content .mtab.active::after { background: var(--sec-accent); }
.section-content .atab.active .ico, .section-content .ctab.active .ico, .section-content .mtab.active .ico { color: var(--sec-accent); }
.section-content .scard:hover::before { background: var(--sec-accent); }
.section-content .admin-panel-title { color: var(--color-primary); }

/* ==================================================================
   DROPDOWN CUSTOM (.ar-select) — con nuestras fuentes y estilo, no HTML plano
   ================================================================== */
.arsel { position: relative; display: inline-block; min-width: 150px; vertical-align: middle; }
.arsel-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-family: var(--font-body); font-size: 13px; font-weight: 600; color: var(--color-primary);
  background: var(--color-surface); border: 1.5px solid var(--color-border-strong); border-radius: var(--radius-sm);
  padding: 9px 12px; cursor: pointer; text-align: left; line-height: 1.2;
}
.arsel-btn:hover { border-color: var(--sec-accent, var(--color-accent)); }
.arsel.open .arsel-btn { border-color: var(--sec-accent, var(--color-accent)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sec-accent, var(--color-accent)) 16%, transparent); }
.arsel-val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arsel-chev { width: 15px; height: 15px; color: var(--color-text-muted); transition: transform var(--dur-base) var(--ease-spring); flex-shrink: 0; }
.arsel.open .arsel-chev { transform: rotate(90deg); color: var(--sec-accent, var(--color-accent)); }
.arsel-menu {
  position: absolute; z-index: 200; top: calc(100% + 6px); left: 0; right: 0; min-width: 100%;
  background: var(--color-surface); border: 1px solid var(--hairline); border-radius: var(--radius-md);
  box-shadow: var(--shadow-elevated); padding: 6px; max-height: 280px; overflow-y: auto;
  opacity: 0; transform: translateY(-6px) scale(.98); pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.arsel.open .arsel-menu { opacity: 1; transform: none; pointer-events: auto; }
.arsel-opt {
  padding: 8px 11px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 500;
  color: var(--color-text-secondary); cursor: pointer; transition: background var(--dur-fast), color var(--dur-fast);
  white-space: nowrap;
}
.arsel-opt:hover { background: var(--sec-accent-soft, var(--color-accent-light)); color: var(--color-primary); }
.arsel-opt.sel { background: var(--sec-accent, var(--color-accent)); color: #fff; font-weight: 700; }
.arsel-opt.disabled { opacity: .5; cursor: not-allowed; }
.arsel.disabled .arsel-btn { opacity: .6; cursor: not-allowed; }

/* ==================================================================
   GRID: encabezado de GRUPO — suave, con color propio por grupo (no navy pesado)
   ================================================================== */
.group-header-row .rh-cell {
  background: var(--grp-soft, #f1efe8) !important; color: var(--color-primary) !important;
  border-left: 4px solid var(--grp-color, var(--color-accent));
}
.group-header-row .rh-cell .grp-badge { background: var(--grp-color, var(--color-accent)) !important; color: #fff !important; }
.group-header-row .rh-spacer { background: var(--grp-soft, #f7f5ef); }
.group-header-row.grp-drop-target .rh-cell { box-shadow: inset 0 3px 0 var(--sec-accent, var(--color-accent)); }
.grp-drag-handle { cursor: grab; opacity: .5; transition: opacity var(--dur-fast); }
.group-header-row:hover .grp-drag-handle { opacity: 1; }

/* ---- Aviso de tipo de cambio (siempre visible en el conversor) ---- */
.fx-advisor {
  display: flex; align-items: flex-start; gap: 9px; margin: 4px 0 12px;
  background: var(--c-amber-soft); border: 1px solid rgba(217,130,7,.28); border-radius: var(--radius-md);
  padding: 10px 13px; font-size: 11.5px; line-height: 1.45; color: #9a5a05;
}
.fx-advisor .ico { width: 17px; height: 17px; color: var(--c-amber); flex-shrink: 0; margin-top: 1px; }

/* ---- Date inputs con look propio (no HTML plano) ---- */
input[type="date"], input[type="time"] {
  font-family: var(--font-body); color: var(--color-primary); background: var(--color-surface);
  border: 1.5px solid var(--color-border-strong); border-radius: var(--radius-sm); padding: 8px 11px;
  font-weight: 600; font-size: 13px; cursor: pointer;
}
input[type="date"]:hover, input[type="time"]:hover { border-color: var(--sec-accent, var(--color-accent)); }
input[type="date"]:focus, input[type="time"]:focus { outline: none; border-color: var(--sec-accent, var(--color-accent)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sec-accent, var(--color-accent)) 15%, transparent); }
input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer; opacity: .6; filter: saturate(1.4);
  transition: opacity var(--dur-fast); border-radius: 4px;
}
input[type="date"]:hover::-webkit-calendar-picker-indicator { opacity: 1; }

/* ---- Analytics: KPI con explicación inline debajo del número ---- */
.an-kpi { display: flex; flex-direction: column; }
.an-kpi .scard-label { font-size: var(--text-micro); letter-spacing: .08em; text-transform: uppercase; color: var(--color-text-muted); }
.an-kpi-sub { font-size: 11.5px; line-height: 1.4; color: var(--color-text-muted); margin-top: 2px; border-top: 1px solid var(--hairline); padding-top: 7px; }
/* Gráficos con más aire entre secciones */
#analytics-content .admin-panel { padding: 18px 20px; }
#analytics-content > div > div[style*="grid-template-columns"] { margin-bottom: 8px; }

/* ==================================================================
   CALENDARIO CUSTOM (.ardate) — reemplaza el input[type=date] nativo
   ================================================================== */
.ardate { position: relative; display: inline-block; min-width: 150px; vertical-align: middle; }
.ardate-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-family: var(--font-body); font-size: 13px; font-weight: 600; color: var(--color-primary);
  background: var(--color-surface); border: 1.5px solid var(--color-border-strong); border-radius: var(--radius-sm);
  padding: 9px 12px; cursor: pointer; text-align: left; line-height: 1.2;
}
.ardate-btn:hover { border-color: var(--sec-accent, var(--color-accent)); }
.ardate.open .ardate-btn { border-color: var(--sec-accent, var(--color-accent)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sec-accent, var(--color-accent)) 16%, transparent); }
.ardate-val.ph { color: var(--color-text-subtle); font-weight: 400; }
.ardate-ico { width: 15px; height: 15px; color: var(--sec-accent, var(--color-accent)); flex-shrink: 0; }
.ardate-pop {
  position: absolute; z-index: 210; top: calc(100% + 6px); left: 0; width: 268px;
  background: var(--color-surface); border: 1px solid var(--hairline); border-radius: var(--radius-md);
  box-shadow: var(--shadow-elevated); padding: 12px;
  opacity: 0; transform: translateY(-6px) scale(.98); pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.ardate.open .ardate-pop { opacity: 1; transform: none; pointer-events: auto; }
/* El calendario mide 268 px fijos: en un campo angosto (o en teléfono) se
   salía por la derecha y estiraba la página a lo ancho aunque estuviera
   cerrado. Cerrado no ocupa lugar, y si no entra se ancla a la derecha. */
.ardate-pop { visibility: hidden; max-width: calc(100vw - 24px); }
.ardate.open .ardate-pop { visibility: visible; }
@media (max-width: 560px){
  /* En teléfono se ancla al viewport, no al campo: así entra siempre,
     esté el campo a la izquierda o a la derecha de la fila. */
  .ardate-pop {
    position: fixed; left: 50%; right: auto; top: auto; bottom: 14px;
    width: 268px; max-width: calc(100vw - 24px);
    transform: translateX(-50%) translateY(8px);
  }
  .ardate.open .ardate-pop { transform: translateX(-50%); }
}
.ardate-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.ardate-title { font-family: var(--font-display); font-weight: 700; font-size: 14px; color: var(--color-primary); }
.ardate-nav { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--hairline); background: var(--color-surface); cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--color-text-secondary); }
.ardate-nav:hover { background: var(--sec-accent-soft, var(--color-accent-light)); color: var(--sec-accent, var(--color-accent)); border-color: transparent; }
.ardate-nav .ico { width: 15px; height: 15px; }
.ardate-dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 4px; }
.ardate-dow span { text-align: center; font-size: 10px; font-weight: 700; color: var(--color-text-subtle); text-transform: uppercase; padding: 4px 0; }
.ardate-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.ardate-grid > span { height: 34px; }
.ardate-day {
  height: 34px; border: 0; background: transparent; border-radius: 8px; cursor: pointer;
  font-size: 12.5px; font-weight: 600; color: var(--color-text-secondary);
  transition: background var(--dur-fast), color var(--dur-fast), transform var(--dur-fast);
}
.ardate-day:hover { background: var(--sec-accent-soft, var(--color-accent-light)); color: var(--color-primary); transform: scale(1.06); }
.ardate-day.today { box-shadow: inset 0 0 0 1.5px var(--sec-accent, var(--color-accent)); color: var(--sec-accent, var(--color-accent)); }
.ardate-day.sel { background: var(--sec-accent, var(--color-accent)); color: #fff; font-weight: 800; }
.ardate-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--hairline); }
.ardate-today-btn, .ardate-clear { font-size: 12px; font-weight: 600; border: 0; background: transparent; cursor: pointer; padding: 5px 10px; border-radius: 6px; }
.ardate-today-btn { color: var(--sec-accent, var(--color-accent)); }
.ardate-today-btn:hover { background: var(--sec-accent-soft, var(--color-accent-light)); }
.ardate-clear { color: var(--color-danger); }
.ardate-clear:hover { background: var(--color-danger-light); }

/* ==================================================================
   FICHA DE RESERVA — botones con icono (no emojis), estilo unificado
   ================================================================== */
.mb { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.mb .ico { width: 15px; height: 15px; }
.mb.sec.is-on { background: var(--c-violet-soft); border-color: color-mix(in srgb, var(--c-violet) 40%, transparent); color: var(--c-violet); }
/* Botón mini de la ficha (convertir, cambiar fechas, vincular) */
.bk-mini {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-body);
  font-size: 11px; font-weight: 700; color: var(--color-accent);
  background: var(--color-accent-light); border: 1px solid color-mix(in srgb, var(--color-accent) 22%, transparent);
  border-radius: var(--radius-pill); padding: 4px 12px; cursor: pointer; white-space: nowrap;
}
.bk-mini:hover { background: color-mix(in srgb, var(--color-accent) 14%, var(--color-surface)); transform: translateY(-1px); }
.bk-mini .ico { width: 13px; height: 13px; }
/* Acciones de contacto (WhatsApp / Email / Archivos / Guardar) — coloreadas por tipo */
.bk-act {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-body);
  font-size: 11.5px; font-weight: 600; color: var(--color-text-secondary);
  background: var(--color-surface-2); border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-pill); padding: 5px 13px; cursor: pointer;
}
.bk-act .ico { width: 14px; height: 14px; }
.bk-act:hover { transform: translateY(-1px); }
.bk-act:disabled { opacity: .5; cursor: not-allowed; }
.bk-act-wa    { background: var(--c-teal-soft);   color: #0b7d53; border-color: color-mix(in srgb,#0f9d68 25%,transparent); }
.bk-act-mail  { background: var(--color-accent-light); color: var(--color-accent); border-color: color-mix(in srgb,var(--color-accent) 22%,transparent); }
.bk-act-files { background: var(--c-violet-soft); color: var(--c-violet); border-color: color-mix(in srgb,var(--c-violet) 25%,transparent); }
.bk-act-save  { background: var(--c-amber-soft);  color: #9a5a05; border-color: color-mix(in srgb,var(--c-amber) 28%,transparent); }
.bk-late-tag { display: inline-flex; align-items: center; gap: 4px; background: var(--c-violet-soft); color: var(--c-violet); border-radius: 6px; padding: 2px 8px; font-size: 10px; font-weight: 700; }
.bk-late-tag .ico { width: 12px; height: 12px; }

/* ==================================================================
   CRM v8 — buscador, avatares por canal (color), estado vacío
   ================================================================== */
.ib-search-wrap { position: relative; display: flex; align-items: center; }
.ib-search-wrap .ico { position: absolute; left: 11px; width: 15px; height: 15px; color: var(--color-text-muted); pointer-events: none; }
.ib-search { border: 1.5px solid var(--color-border-strong); border-radius: var(--radius-pill); padding: 8px 12px 8px 34px; font-size: 12.5px; font-family: var(--font-body); width: 210px; background: var(--color-surface); color: var(--color-primary); }
.ib-search:focus { outline: none; border-color: var(--c-violet); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-violet) 15%, transparent); }
.ib-search::placeholder { color: var(--color-text-subtle); }
/* Avatar de conversación coloreado por canal */
.inbox-msg-ch { position: relative; background: var(--c-violet-soft); color: var(--c-violet); }
.inbox-msg-ch.ch-email     { background: var(--color-accent-light); color: var(--color-accent); }
.inbox-msg-ch.ch-instagram { background: var(--c-rose-soft);   color: var(--c-rose); }
.inbox-msg-ch.ch-whatsapp  { background: var(--c-teal-soft);   color: #0b7d53; }
.inbox-msg-ch.ch-website   { background: var(--c-violet-soft); color: var(--c-violet); }
.inbox-msg-ch.ch-messenger { background: var(--c-cyan-soft);   color: var(--c-cyan); }
.inbox-msg-ch .ico { width: 16px; height: 16px; }
.ib-star { position: absolute; right: -3px; bottom: -3px; background: var(--c-amber); color: #fff; border-radius: 50%; width: 15px; height: 15px; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.ib-star .ico { width: 9px; height: 9px; }
.ib-new { display: inline-block; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #fff; background: var(--c-violet); border-radius: 999px; padding: 1px 7px; margin-left: 4px; vertical-align: middle; }
.ib-noselect-ico { width: 64px; height: 64px; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--c-violet-soft); color: var(--c-violet); }
.ib-noselect-ico .ico { width: 30px; height: 30px; }

/* ==================================================================
   CAJA DIARIA — hero financiero (ambiente + count-up) + bloques por cuenta
   ================================================================== */
.caja-hero {
  position: relative; overflow: hidden; border-radius: var(--radius-xl); color: var(--ink-inverse);
  background: radial-gradient(800px 380px at 82% -10%, rgba(217,130,7,.28), transparent 60%), var(--bg-dark);
  padding: 30px 32px; margin-bottom: 22px;
}
.caja-hero .ambient-canvas { opacity: .55; }
.caja-hero-in { position: relative; z-index: 1; }
.caja-hero .eyebrow { color: #ffd591; }
.caja-hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.caja-hero-date { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.5rem, 3vw, 2.2rem); letter-spacing: -.02em; margin-top: 8px; text-transform: capitalize; }
.caja-hero-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.caja-nav { width: 38px; height: 38px; border-radius: 10px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.caja-nav:hover { background: rgba(255,255,255,.16); }
.caja-nav .ico { width: 16px; height: 16px; }
.caja-today { padding: 0 16px; height: 38px; border-radius: 10px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: #fff; font-weight: 700; font-size: 13px; cursor: pointer; }
.caja-today:hover { background: rgba(255,255,255,.16); }
.caja-hero-nav .nbtn { height: 38px; }
.caja-hero-stats .stat-label { color: rgba(246,245,241,.66); }
.caja-hero-stats .stat { border-left-color: rgba(255,255,255,.14); }
.caja-blocks { display: flex; flex-direction: column; gap: 16px; }
.caja-acc { border: 1px solid var(--hairline); border-radius: var(--radius-lg); overflow: hidden; background: var(--color-surface); box-shadow: var(--shadow-raised-0); transition: box-shadow var(--dur-base); }
.caja-acc:hover { box-shadow: var(--shadow-raised); }
.caja-acc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 13px 18px; background: color-mix(in srgb, var(--acc) 8%, var(--color-surface)); border-bottom: 1px solid var(--hairline); border-left: 4px solid var(--acc); }
.caja-acc-name { font-family: var(--font-display); font-weight: 700; font-size: 14px; color: var(--color-primary); display: flex; align-items: center; gap: 8px; }
.caja-acc-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--acc); }
.caja-acc-net { font-size: 12px; color: var(--color-text-secondary); font-variant-numeric: tabular-nums; }

/* ==================================================================
   ADMIN + MARKETING — lift consistente de todos los sub-tabs
   (título display grande con barra de acento de sección + más aire)
   ================================================================== */
#section-admin .admin-panel, #section-marketing .admin-panel { padding: 26px 30px; }
#section-admin .admin-panel-header, #section-marketing .admin-panel-header {
  padding-bottom: 18px; margin-bottom: 24px; align-items: flex-start; border-bottom-color: var(--hairline);
}
#section-admin .admin-panel-title, #section-marketing .admin-panel-title { font-size: 1.55rem; position: relative; }
#section-admin .admin-panel-title::before {
  content: ''; display: block; width: 34px; height: 3px; border-radius: 3px; background: var(--c-amber); margin-bottom: 11px;
}
#section-marketing .admin-panel-title::before {
  content: ''; display: block; width: 34px; height: 3px; border-radius: 3px; background: var(--c-rose); margin-bottom: 11px;
}
#section-admin .admin-panel-subtitle, #section-marketing .admin-panel-subtitle { font-size: 13px; }
/* Botón "+ nuevo" de admin/marketing: usar el degradé de marca, no verde plano */
#section-admin .admin-panel-header .nbtn.green, #section-marketing .admin-panel-header .nbtn.green { background: var(--grad-brand); }

/* ==================================================================
   ADMIN HERO reutilizable (Proveedores/Costos/Consumos/Inventario/Tareas/Emergencias)
   ================================================================== */
.admin-hero {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  background: var(--color-surface); border: 1px solid var(--hairline); border-left: 5px solid var(--ah);
  border-radius: var(--radius-lg); padding: 22px 26px; margin-bottom: 20px; box-shadow: var(--shadow-raised-0);
}
.admin-hero-main { flex: 1; min-width: 220px; }
.admin-hero .eyebrow { color: var(--ah); }
.admin-hero-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.3rem); letter-spacing: -.02em; color: var(--color-primary); margin: 8px 0 6px; }
.admin-hero-sub { color: var(--color-text-muted); font-size: 13.5px; line-height: 1.5; max-width: 62ch; }
.ah-stats { display: flex; gap: 0; }
.ah-stat { padding: 0 22px; border-left: 1px solid var(--hairline); }
.ah-stat:first-child { border-left: 0; padding-left: 0; }
.ah-stat-num { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.5rem, 2.4vw, 2rem); letter-spacing: -.02em; color: var(--ah); font-variant-numeric: tabular-nums; line-height: 1; }
.ah-stat-lbl { margin-top: 6px; font-size: 11.5px; color: var(--color-text-muted); font-weight: 500; }
.admin-hero-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
@media (max-width: 720px){ .admin-hero { gap: 16px; } .ah-stats { width: 100%; } }
/* Chips de meta en tarjetas de tareas */
.task-meta-chip { display: inline-flex; align-items: center; gap: 4px; }
.task-meta-chip .ico { width: 12px; height: 12px; opacity: .7; }

/* ==================================================================
   PRIMITIVAS v9 — aurora 3D, anillos, estrellas, avatares
   ------------------------------------------------------------------
   Piezas compartidas que habilitan el "complemento visual en todos
   lados" pedido por DESIGN.md §5: si un bloque es solo texto, lleva
   una aurora en movimiento detrás en vez de quedar plano.
   ================================================================== */
@keyframes ar-dash     { from { stroke-dashoffset: var(--circ); } }
@keyframes ar-bar      { from { width: 0; } }
@keyframes ar-bar-x    { from { transform: scaleX(0); } }
@keyframes ar-au-a     { 0%,100%{ transform: translate3d(0,0,0) scale(1); }
                         33%    { transform: translate3d(14%,10%,0) scale(1.18); }
                         66%    { transform: translate3d(-8%,16%,0) scale(.92); } }
@keyframes ar-au-b     { 0%,100%{ transform: translate3d(0,0,0) scale(1.05); }
                         50%    { transform: translate3d(-16%,-12%,0) scale(.88); } }
@keyframes ar-orbit    { to { transform: rotate(360deg); } }
@keyframes ar-breathe  { 0%,100%{ transform: scale(1); opacity:.9 } 50%{ transform: scale(1.06); opacity:1 } }
@keyframes ar-ripple-out { 0%{ transform: scale(.6); opacity:.55 } 100%{ transform: scale(1.5); opacity:0 } }
@keyframes ar-draw     { from { stroke-dashoffset: 1200; } to { stroke-dashoffset: 0; } }

/* ---------- Aurora de fondo (3 capas + rotación cónica) ---------- */
.ar-aurora {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
  z-index: 0; border-radius: inherit; perspective: 900px;
  --au1: rgba(79,156,240,.55); --au2: rgba(37,99,235,.42); --au3: rgba(124,192,247,.34);
}
.ar-aurora[data-tone="rose"]   { --au1: rgba(225,29,100,.46); --au2: rgba(79,156,240,.40); --au3: rgba(251,113,133,.34); }
.ar-aurora[data-tone="violet"] { --au1: rgba(124,58,237,.34); --au2: rgba(79,156,240,.30); --au3: rgba(192,132,252,.28); }
.ar-aurora[data-tone="amber"]  { --au1: rgba(217,119,6,.40);  --au2: rgba(234,88,12,.32);  --au3: rgba(251,191,36,.30); }
.ar-aurora[data-tone="teal"]   { --au1: rgba(13,148,136,.34); --au2: rgba(8,145,178,.30);  --au3: rgba(94,234,212,.28); }
.ar-aurora > span { position: absolute; display: block; }
.ar-aurora-l1 {
  width: 58%; aspect-ratio: 1; left: -12%; top: -34%; border-radius: 50%;
  background: radial-gradient(circle at 34% 32%, var(--au1), transparent 68%);
  filter: blur(38px); animation: ar-au-a 24s var(--ease-standard) infinite;
}
.ar-aurora-l2 {
  width: 52%; aspect-ratio: 1; right: -14%; bottom: -36%; border-radius: 50%;
  background: radial-gradient(circle at 44% 44%, var(--au2), transparent 70%);
  filter: blur(44px); animation: ar-au-b 31s var(--ease-standard) infinite;
}
.ar-aurora-l3 {
  inset: -34%; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, var(--au3) 62deg, transparent 140deg,
              var(--au2) 216deg, transparent 292deg, var(--au3) 344deg, transparent 360deg);
  filter: blur(34px); opacity: .38; animation: ar-aurora 44s linear infinite;
}
.ar-aurora-grain {
  inset: 0; background: radial-gradient(120% 90% at 50% 0%, transparent 40%, rgba(14,33,72,.10) 100%);
  mix-blend-mode: multiply;
}
.ar-aurora.soft { opacity: .55; }
.ar-aurora.soft .ar-aurora-l1, .ar-aurora.soft .ar-aurora-l2 { filter: blur(56px); }

/* ---------- Anillo de progreso ---------- */
.ar-ring { transform: rotate(-90deg); overflow: visible; display: block; }
.ar-ring-track { fill: none; stroke: currentColor; opacity: .14; }
.ar-ring-bar   { fill: none; stroke-linecap: round; stroke-dashoffset: var(--dash);
                 animation: ar-dash 1.15s var(--ease-out) both; }

/* ---------- Estrellas parciales ---------- */
.ar-stars { width: 90px; height: 18px; display: block; }
.ar-stars-bg { fill: currentColor; opacity: .2; }
.ar-stars-fg { fill: #f59e0b; }

/* ---------- Avatar de iniciales ---------- */
.ar-avatar {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(140deg, var(--a1), var(--a2));
  color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 12px;
  letter-spacing: .02em; box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 2px 8px rgba(14,33,72,.14);
}

/* ---------- Texto degradé para fondos oscuros ---------- */
.grad-sky {
  background: linear-gradient(110deg,#7cc0f7 0%,#ffd6e6 26%,#4f9cf0 52%,#ffd6e6 78%,#7cc0f7 100%);
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: ar-pan-text 9s linear infinite;
}

/* ---------- Líneas de skeleton ---------- */
.sk-line { height: 11px; border-radius: 6px; margin-bottom: 8px; }
.sk-line.sm { width: 42%; height: 9px; }
.sk-line.xs { width: 62%; }
.sk-line:last-child { margin-bottom: 0; }

/* ==================================================================
   MARKETING v9 — rediseño profundo de las 4 pestañas
   Reseñas (hero oscuro) · Contenido (estudio claro) ·
   Archivos (biblioteca clara) · Plantillas (hero oscuro)
   El ritmo oscuro↔claro entre pestañas es intencional (DESIGN.md §1).
   ================================================================== */
#section-marketing .rv-wrap,
#section-marketing .ct-wrap,
#section-marketing .fl-wrap,
#section-marketing .tp-wrap { display: flex; flex-direction: column; gap: 26px; padding-bottom: 30px; }

/* Encabezados de bloque compartidos entre pestañas */
#section-marketing .rv-block-head,
#section-marketing .ct-block-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 16px;
}
#section-marketing .rv-block-title,
#section-marketing .ct-block-title {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -.02em;
  font-size: clamp(1.25rem, 2.2vw, 1.75rem); color: var(--color-primary); margin-top: 8px;
}
#section-marketing .rv-em { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* ------------------------------------------------------------------
   RESEÑAS — hero cinematográfico
   ------------------------------------------------------------------ */
.rv-hero {
  position: relative; overflow: hidden; border-radius: var(--radius-xl);
  background: radial-gradient(900px 420px at 78% -18%, rgba(225,29,100,.26), transparent 62%), var(--bg-dark);
  color: var(--ink-inverse); padding: 38px 36px 34px;
  box-shadow: 0 24px 60px rgba(14,33,72,.18);
}
.rv-hero-in {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.25fr auto 1fr; gap: 34px; align-items: center;
}
.rv-hero .eyebrow { color: #ffc2d6; }
.rv-hero .eyebrow::before { background: linear-gradient(90deg,#e11d64,#7cc0f7); }
.rv-hero-title {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -.035em;
  font-size: clamp(2rem, 3.6vw, 3.15rem); line-height: 1; margin: 14px 0 12px;
}
.rv-hero-sub { color: rgba(246,245,241,.66); font-size: 14px; line-height: 1.6; max-width: 42ch; }
.rv-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.rv-ghost-btn, .ct-ghost-btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font-family: var(--font-body); font-size: 12.5px; font-weight: 700;
  padding: 10px 18px; border-radius: var(--radius-pill);
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); color: #fff;
  transition: background var(--dur-base), transform var(--dur-base) var(--ease-standard), border-color var(--dur-base);
}
.rv-ghost-btn:hover { background: rgba(255,255,255,.16); transform: translateY(-2px); border-color: rgba(255,255,255,.32); }
.rv-ghost-btn .ico { width: 15px; height: 15px; }
.rv-hero-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.rv-chip {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  font-size: 11px; font-weight: 600; color: rgba(246,245,241,.86);
  padding: 6px 13px; border-radius: var(--radius-pill);
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(6px);
}
.rv-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--d); box-shadow: 0 0 10px var(--d); animation: ar-breathe 2.6s var(--ease-standard) infinite; }

/* Medidor central */
.rv-hero-gauge {
  position: relative; width: 180px; height: 180px; flex-shrink: 0;
  display: grid; place-items: center; border-radius: 50%; transform-style: preserve-3d;
  transition: transform var(--dur-fast) linear;
}
.rv-hero-gauge .tilt-sheen { border-radius: 50%; }
.rv-hero-gauge::before {
  content: ''; position: absolute; inset: 12px; border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, rgba(124,192,247,.22), rgba(13,21,38,.5) 70%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 16px 40px rgba(0,0,0,.35);
}
.rv-gauge-ring { position: absolute; inset: 0; color: rgba(255,255,255,.9); }
.rv-gauge-core { position: relative; z-index: 2; text-align: center; }
.rv-gauge-num { font-family: var(--font-display); font-weight: 800; font-size: 2.9rem; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.rv-gauge-num small { font-size: .9rem; font-weight: 600; opacity: .5; margin-left: 2px; }
.rv-gauge-stars { width: 84px; height: 16px; margin: 9px auto 0; color: #fff; }
.rv-gauge-lbl { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: rgba(246,245,241,.5); margin-top: 8px; }

/* Distribución + tendencia */
.rv-hero-dist { min-width: 0; }
.rv-mini-label { font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: rgba(246,245,241,.42); margin-bottom: 10px; }
.rv-hist { display: flex; flex-direction: column; gap: 7px; }
.rv-hist-row { display: grid; grid-template-columns: 34px 1fr 26px; align-items: center; gap: 10px; }
.rv-hist-star { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; color: rgba(246,245,241,.62); font-variant-numeric: tabular-nums; }
.rv-hist-ico { width: 11px; height: 11px; color: #f59e0b; fill: #f59e0b; }
.rv-hist-track { height: 7px; border-radius: 4px; background: rgba(255,255,255,.09); overflow: hidden; }
.rv-hist-bar {
  display: block; height: 100%; width: var(--w); border-radius: 4px;
  background: linear-gradient(90deg, rgba(124,192,247,.9), #e11d64);
  animation: ar-bar 800ms var(--ease-out) both; animation-delay: calc(var(--i) * 80ms);
}
.rv-hist-n { font-size: 11px; font-weight: 700; color: rgba(246,245,241,.72); text-align: right; font-variant-numeric: tabular-nums; }
.rv-trend { margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.1); }
.rv-spark { width: 100%; height: 46px; display: block; }
.rv-spark-line { fill: none; stroke: #7cc0f7; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1200; animation: ar-draw 1.6s var(--ease-out) both .2s; }
.rv-trend-foot { display: flex; align-items: center; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.rv-delta { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; padding: 3px 10px; border-radius: var(--radius-pill); }
.rv-delta .ico { width: 13px; height: 13px; }
.rv-delta.up   { color: #6ee7b7; background: rgba(16,185,129,.14); }
.rv-delta.down { color: #fda4af; background: rgba(225,29,100,.16); }
.rv-delta.down .ico { transform: scaleY(-1); }
.rv-trend-note { font-size: 11px; color: rgba(246,245,241,.5); }

/* ---- Rail de plataformas ---- */
.rv-rail-block { }
.rv-connect-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.rv-connect-btn {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font-family: var(--font-body); font-size: 11.5px; font-weight: 700; color: var(--color-text-secondary);
  padding: 8px 14px; border-radius: var(--radius-pill);
  background: var(--color-surface); border: 1px solid var(--hairline-strong);
  transition: color var(--dur-base), border-color var(--dur-base), transform var(--dur-base) var(--ease-standard), box-shadow var(--dur-base);
  box-shadow: var(--shadow-raised-0);
}
.rv-connect-btn:hover { color: var(--c-rose); border-color: var(--c-rose); transform: translateY(-2px); box-shadow: var(--shadow-raised); }
.rv-connect-btn .ico { width: 13px; height: 13px; }

.rv-rail { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.rv-plat {
  position: relative; overflow: hidden; cursor: pointer; text-align: left;
  display: flex; flex-direction: column; gap: 3px;
  padding: 18px 18px 20px; border-radius: var(--radius-lg);
  background: var(--color-surface); border: 1px solid var(--hairline);
  font-family: var(--font-body); box-shadow: var(--shadow-elevated-0);
  transition: transform var(--dur-base) var(--ease-standard), box-shadow var(--dur-base), border-color var(--dur-base);
}
.rv-plat::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; opacity: 0;
  background: radial-gradient(320px 140px at 12% -10%, color-mix(in srgb, var(--pc) 16%, transparent), transparent 70%);
  transition: opacity var(--dur-base);
}
.rv-plat:hover { transform: translateY(-4px); box-shadow: var(--shadow-elevated); border-color: color-mix(in srgb, var(--pc) 34%, var(--hairline)); }
.rv-plat:hover::before { opacity: 1; }
.rv-plat.on { border-color: var(--pc); box-shadow: 0 10px 30px color-mix(in srgb, var(--pc) 22%, transparent); }
.rv-plat.on::before { opacity: 1; }
.rv-plat.empty { opacity: .62; }
.rv-plat.empty:hover { opacity: 1; }
.rv-plat > * { position: relative; z-index: 1; }
.rv-plat-ico {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 8px;
  background: color-mix(in srgb, var(--pc) 12%, transparent); color: var(--pc);
  transition: transform var(--dur-base) var(--ease-spring);
}
.rv-plat-ico .ico { width: 19px; height: 19px; }
.rv-plat:hover .rv-plat-ico { transform: translateY(-2px) rotate(-6deg) scale(1.06); }
.rv-plat-name  { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; color: var(--color-text-muted); }
.rv-plat-score { font-family: var(--font-display); font-weight: 800; font-size: 2rem; line-height: 1.1; letter-spacing: -.03em; color: var(--color-primary); font-variant-numeric: tabular-nums; }
.rv-plat-count { font-size: 11.5px; color: var(--color-text-muted); }
.rv-plat-bar {
  position: absolute; left: 0; bottom: 0; height: 3px; width: var(--w); z-index: 1;
  background: linear-gradient(90deg, color-mix(in srgb, var(--pc) 40%, transparent), var(--pc));
  transform-origin: left; animation: ar-bar-x 900ms var(--ease-out) both .15s;
}
.rv-sync-note {
  display: flex; align-items: flex-start; gap: 10px; margin-top: 14px;
  font-size: 12px; line-height: 1.55; color: var(--color-text-muted);
  padding: 12px 16px; border-radius: var(--radius-md);
  background: linear-gradient(100deg, var(--c-rose-soft), transparent 70%);
  border: 1px solid var(--hairline);
}
.rv-sync-note b { color: var(--color-primary); }
.rv-sync-ico { color: var(--c-rose); display: inline-flex; }
.rv-sync-ico .ico { width: 15px; height: 15px; }

/* ---- Perfil por categoría: radar + ranking ---- */
.rv-cats {
  display: grid; grid-template-columns: 300px 1fr; gap: 34px; align-items: center;
  background: var(--color-surface); border: 1px solid var(--hairline);
  border-radius: var(--radius-lg); padding: 26px 30px; overflow: hidden;
}
.rv-cats-art { display: grid; place-items: center; background: linear-gradient(160deg,#fdf1f6,#eef4ff); border-radius: var(--radius-md); padding: 10px; align-self: stretch; }
.rv-radar { width: 100%; max-width: 260px; height: auto; }
.rv-radar-ring  { fill: none; stroke: rgba(14,33,72,.10); }
.rv-radar-spoke { stroke: rgba(14,33,72,.08); }
.rv-radar-shape { stroke: var(--c-rose); stroke-width: 1.8; transform-origin: 130px 130px; animation: ar-pop-in 900ms var(--ease-spring) both .2s; }
.rv-radar-dot   { fill: var(--c-rose); animation: ar-pop-in 500ms var(--ease-spring) both; animation-delay: calc(.35s + var(--i) * 70ms); }
.rv-radar-lbl   { font-family: var(--font-body); font-size: 9px; font-weight: 700; fill: var(--color-text-muted); text-transform: uppercase; letter-spacing: .06em; }
.rv-radar-fallback { display: grid; place-items: center; color: var(--c-rose); }
.rv-radar-fallback .ico { width: 64px; height: 64px; opacity: .35; }
.rv-cat-list { margin-top: 16px; }
.rv-cat-row { display: grid !important; grid-template-columns: 30px minmax(90px,1.1fr) 2fr 46px; align-items: center; gap: 14px; cursor: default; }
.rv-cat-row:hover { padding-left: 6px !important; }
.rv-cat-rank { font-family: var(--font-mono); font-size: 11px; color: var(--color-text-subtle); }
.rv-cat-name { font-size: 13px; font-weight: 600; color: var(--color-primary); text-transform: capitalize; }
.rv-cat-track { height: 8px; border-radius: 5px; background: var(--color-surface-2); overflow: hidden; }
.rv-cat-bar { display: block; height: 100%; width: var(--w); border-radius: 5px; animation: ar-bar 850ms var(--ease-out) both; animation-delay: calc(var(--i) * 55ms); }
.rv-cat-bar.high { background: linear-gradient(90deg,#34d399,#0f9d68); }
.rv-cat-bar.mid  { background: linear-gradient(90deg,#fbbf24,#d97706); }
.rv-cat-bar.low  { background: linear-gradient(90deg,#fb7185,#e0362f); }
.rv-cat-score { font-family: var(--font-display); font-weight: 800; font-size: 15px; text-align: right; font-variant-numeric: tabular-nums; }
.rv-cat-score.high { color: var(--color-green); }
.rv-cat-score.mid  { color: var(--color-warn); }
.rv-cat-score.low  { color: var(--color-danger); }

/* ---- Panel de IA ---- */
.rv-ai {
  position: relative; overflow: hidden; border-radius: var(--radius-xl); color: var(--ink-inverse);
  background: radial-gradient(760px 340px at 84% -20%, rgba(124,58,237,.30), transparent 62%), var(--bg-dark-2);
  padding: 30px 32px;
}
.rv-ai-in { position: relative; z-index: 2; }
.rv-ai .eyebrow { color: #c4b5fd; }
.rv-ai .eyebrow::before { background: linear-gradient(90deg,#7c3aed,#7cc0f7); }
.rv-ai-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.rv-ai-title { display: flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.3rem,2.4vw,1.9rem); letter-spacing: -.02em; margin: 10px 0 8px; }
.rv-ai-title-ico { width: 24px; height: 24px; color: #c4b5fd; }
.rv-ai-sub { font-size: 13px; color: rgba(246,245,241,.6); max-width: 56ch; line-height: 1.55; }
.rv-ai-btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; flex-shrink: 0;
  font-family: var(--font-body); font-size: 12.5px; font-weight: 700; color: #0d1526;
  padding: 11px 20px; border-radius: var(--radius-pill); border: 0;
  background: linear-gradient(115deg,#e9d5ff,#bfe0ff);
  box-shadow: 0 10px 26px rgba(124,58,237,.32);
  transition: transform var(--dur-base) var(--ease-standard), box-shadow var(--dur-base), filter var(--dur-base);
}
.rv-ai-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(124,58,237,.42); }
.rv-ai-btn:disabled { opacity: .6; cursor: progress; }
.rv-ai-btn .ico { width: 15px; height: 15px; }
.rv-ai-btn:disabled .ico { animation: ar-orbit 1.1s linear infinite; }
.rv-ai-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(250px,1fr)); gap: 14px; }
.rv-ai-card {
  position: relative; padding: 20px 20px 18px; border-radius: var(--radius-md);
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(8px); overflow: hidden;
  transition: transform var(--dur-base) var(--ease-standard), background var(--dur-base), border-color var(--dur-base);
}
.rv-ai-card:hover { transform: translateY(-3px); background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.22); }
.rv-ai-idx { position: absolute; right: 14px; top: 10px; font-family: var(--font-display); font-size: 2.2rem; font-weight: 800; color: rgba(255,255,255,.07); letter-spacing: -.04em; }
.rv-ai-cat { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: #c4b5fd; margin-bottom: 8px; }
.rv-ai-text { font-size: 13px; line-height: 1.65; color: rgba(246,245,241,.86); }
.rv-ai-card.loading .skeleton { background: linear-gradient(100deg, rgba(255,255,255,.06) 30%, rgba(255,255,255,.18) 50%, rgba(255,255,255,.06) 70%); background-size: 220% 100%; }
.rv-ai-idle { display: flex; align-items: center; gap: 18px; padding: 6px 0 2px; }
.rv-ai-idle p { font-size: 13px; color: rgba(246,245,241,.6); max-width: 60ch; line-height: 1.6; }
.rv-ai-orbit {
  position: relative; width: 56px; height: 56px; flex-shrink: 0; border-radius: 50%;
  display: grid; place-items: center; color: #e9d5ff;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.16);
}
.rv-ai-orbit .ico { width: 22px; height: 22px; animation: ar-breathe 3s var(--ease-standard) infinite; }
.rv-ai-orbit::after {
  content: ''; position: absolute; inset: -6px; border-radius: 50%;
  border: 1px dashed rgba(196,181,253,.4); animation: ar-orbit 12s linear infinite;
}

/* ---- Feed editorial de reseñas ---- */
.rv-feed-count { font-size: 12px; color: var(--color-text-muted); }
.rv-list { display: flex; flex-direction: column; border-top: 1px solid var(--hairline); }
.rv-item {
  position: relative; display: grid; grid-template-columns: 64px 1fr; gap: 20px;
  padding: 22px 8px 20px; border-bottom: 1px solid var(--hairline);
  transition: background var(--dur-base), padding-left var(--dur-base) var(--ease-standard);
}
.rv-item::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; border-radius: 2px;
  background: var(--grad-brand); transform: scaleY(0); transform-origin: top;
  transition: transform var(--dur-base) var(--ease-out);
}
.rv-item:hover { background: linear-gradient(96deg, rgba(225,29,100,.045), transparent 62%); padding-left: 16px; }
.rv-item:hover::before { transform: scaleY(1); }
.rv-item-score { position: relative; width: 54px; height: 54px; display: grid; place-items: center; color: var(--color-primary); }
.rv-item-ring { position: absolute; inset: 0; }
.rv-item-num { font-family: var(--font-display); font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; }
.rv-item-num.high { color: var(--color-green); }
.rv-item-num.mid  { color: var(--color-warn); }
.rv-item-num.low  { color: var(--color-danger); }
.rv-item-main { min-width: 0; }
.rv-item-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.rv-item-av { width: 34px; height: 34px; font-size: 12px; }
.rv-item-who { min-width: 0; margin-right: auto; }
.rv-item-author { display: block; font-family: var(--font-display); font-weight: 700; font-size: 14.5px; color: var(--color-primary); letter-spacing: -.01em; }
.rv-item-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11.5px; color: var(--color-text-muted); margin-top: 2px; }
.rv-item-plat { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; color: var(--pc); }
.rv-item-plat .ico { width: 13px; height: 13px; }
.rv-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--color-text-subtle); }
.rv-item-id { font-family: var(--font-mono); font-size: 10.5px; opacity: .7; }
.rv-item-stars { width: 78px; height: 15px; color: var(--color-primary); }
.rv-flag {
  display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .07em; color: var(--c-rose);
  padding: 5px 11px; border-radius: var(--radius-pill);
  background: var(--c-rose-soft); border: 1px solid color-mix(in srgb, var(--c-rose) 26%, transparent);
}
.rv-flag .ico { width: 12px; height: 12px; }
.rv-item-quote { position: relative; padding-left: 34px; }
.rv-quote-mark { position: absolute; left: 0; top: -2px; color: var(--c-rose); opacity: .26; }
.rv-quote-mark .ico { width: 22px; height: 22px; fill: currentColor; stroke: none; }
.rv-quote-text {
  font-size: 14px; line-height: 1.7; color: var(--color-text-secondary);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.rv-item.expanded .rv-quote-text { -webkit-line-clamp: unset; }
.rv-more {
  display: inline-flex; align-items: center; gap: 5px; margin: 8px 0 0 34px; cursor: pointer;
  background: none; border: 0; padding: 0; font-family: var(--font-body);
  font-size: 11.5px; font-weight: 700; color: var(--color-accent);
}
.rv-more:hover { color: var(--color-accent-hover); }
.rv-more-chev { width: 13px; height: 13px; transform: rotate(90deg); transition: transform var(--dur-base) var(--ease-spring); }
.rv-item.expanded .rv-more-chev { transform: rotate(-90deg); }
.rv-more-off { display: none; }
.rv-item.expanded .rv-more-on  { display: none; }
.rv-item.expanded .rv-more-off { display: inline; }
.rv-reply {
  display: flex; gap: 12px; margin: 14px 0 0 34px; padding: 13px 16px;
  background: var(--color-accent-light); border-radius: 4px var(--radius-md) var(--radius-md) 4px;
  border-left: 3px solid var(--color-accent);
}
.rv-reply-ico { color: var(--color-accent); flex-shrink: 0; }
.rv-reply-ico .ico { width: 15px; height: 15px; }
.rv-reply-lbl { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--color-accent); margin-bottom: 4px; }
.rv-reply p { font-size: 12.5px; line-height: 1.6; color: var(--color-text-secondary); }
.rv-item-actions {
  display: flex; gap: 8px; margin-top: 14px; margin-left: 34px;
  opacity: 0; transform: translateY(4px);
  transition: opacity var(--dur-base), transform var(--dur-base) var(--ease-out);
}
.rv-item:hover .rv-item-actions, .rv-item.expanded .rv-item-actions, .rv-item:focus-within .rv-item-actions { opacity: 1; transform: none; }
.rv-act, .ct-act, .fl-act, .tp-act {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font-family: var(--font-body); font-size: 11.5px; font-weight: 700; color: var(--color-text-secondary);
  padding: 7px 13px; border-radius: var(--radius-pill);
  background: var(--color-surface); border: 1px solid var(--hairline-strong);
  transition: color var(--dur-base), border-color var(--dur-base), background var(--dur-base), transform var(--dur-base) var(--ease-standard);
}
.rv-act:hover, .ct-act:hover, .fl-act:hover, .tp-act:hover { color: var(--color-accent); border-color: var(--color-accent); transform: translateY(-2px); }
.rv-act.danger:hover, .ct-act.danger:hover, .fl-act.danger:hover, .tp-act.danger:hover { color: var(--color-danger); border-color: var(--color-danger); background: var(--color-danger-light); }
.rv-act .ico, .ct-act .ico, .fl-act .ico, .tp-act .ico { width: 13px; height: 13px; }

/* ---- Estados vacíos (compartidos, cada uno con su ilustración) ---- */
.rv-empty, .ct-empty, .fl-empty, .tp-empty {
  position: relative; overflow: hidden; text-align: center;
  padding: 52px 30px 48px; border-radius: var(--radius-xl);
  background: var(--color-surface); border: 1px solid var(--hairline);
}
/* Ojo: la aurora queda fuera de esta regla — si se le pisa el `position:absolute`
   deja de cubrir el bloque y el fondo se ve plano. */
.rv-empty > *:not(.ar-aurora), .ct-empty > *:not(.ar-aurora),
.fl-empty > *:not(.ar-aurora), .tp-empty > *:not(.ar-aurora) { position: relative; z-index: 1; }
.rv-empty h3, .ct-empty h3, .fl-empty h3, .tp-empty h3 {
  font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; letter-spacing: -.02em;
  color: var(--color-primary); margin-bottom: 8px;
}
.rv-empty p, .ct-empty p, .fl-empty p, .tp-empty p { font-size: 13px; color: var(--color-text-muted); max-width: 52ch; margin: 0 auto 22px; line-height: 1.6; }
.rv-empty-art, .ct-empty-art, .fl-empty-art, .tp-empty-art { width: 190px; margin: 0 auto 18px; }
.rv-empty-art svg, .ct-empty-art svg, .fl-empty-art svg, .tp-empty-art svg { width: 100%; height: auto; overflow: visible; }
.ct-empty-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.ct-empty .ct-ghost-btn { background: var(--color-surface); border-color: var(--hairline-strong); color: var(--color-text-secondary); }
.ct-empty .ct-ghost-btn:hover { color: var(--color-accent); border-color: var(--color-accent); }
.rv-es-g { fill: none; stroke: var(--c-rose); stroke-width: 2; opacity: .5; }
.rv-es-star { animation: ar-float 4.6s var(--ease-standard) infinite; transform-origin: center; }
.rv-es-star.s2 { animation-delay: .5s; opacity: .7; }
.rv-es-star.s3 { animation-delay: 1s; opacity: .7; }
.ct-es-card { fill: none; stroke: var(--c-violet); stroke-width: 2; opacity: .3; }
.ct-es-card.front { fill: var(--c-violet-soft); opacity: .8; }
.ct-es-dot, .ct-es-line { fill: var(--c-violet); opacity: .45; }
.ct-es-g { animation: ar-float 5s var(--ease-standard) infinite; transform-origin: center; }
.fl-es-folder { fill: var(--c-teal-soft); stroke: var(--c-teal); stroke-width: 2; }
.fl-es-folder.front { fill: color-mix(in srgb, var(--c-teal) 18%, #fff); }
.fl-es-sheet { fill: #fff; stroke: var(--c-teal); stroke-width: 2; animation: ar-float 4s var(--ease-standard) infinite; transform-origin: center; }
.fl-es-line { fill: var(--c-teal); opacity: .5; }
.fl-es-g { transform-origin: center; }
.tp-es-page { fill: #fff; stroke: var(--c-amber); stroke-width: 2; }
.tp-es-page.back, .tp-es-page.mid { fill: var(--c-amber-soft); opacity: .8; }
.tp-es-line { fill: var(--c-amber); opacity: .4; }
.tp-es-var  { fill: var(--c-amber); opacity: .75; animation: ar-breathe 2.4s var(--ease-standard) infinite; transform-origin: center; }
.tp-es-g { animation: ar-float 5.4s var(--ease-standard) infinite; transform-origin: center; }

/* ------------------------------------------------------------------
   CONTENIDO SOCIAL — estudio + tablero de producción
   ------------------------------------------------------------------ */
.ct-hero {
  position: relative; overflow: hidden; border-radius: var(--radius-xl);
  display: grid; grid-template-columns: 1.15fr 340px; gap: 40px; align-items: center;
  background: linear-gradient(120deg, #fbfaf7 0%, #f2f0ff 55%, #fdf2f8 100%);
  border: 1px solid var(--hairline); padding: 40px 40px 38px;
  box-shadow: var(--shadow-sm);
}
.ct-hero-main { position: relative; z-index: 2; min-width: 0; }
.ct-hero .eyebrow { color: var(--c-violet); }
.ct-hero-title {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -.035em;
  font-size: clamp(1.9rem, 3.4vw, 3rem); line-height: 1.02; color: var(--color-primary); margin: 14px 0 12px;
}
.ct-hero-sub { font-size: 14px; line-height: 1.65; color: var(--color-text-muted); max-width: 48ch; }
.ct-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 24px 0 26px; }
.ct-ghost-btn { background: var(--color-surface); border-color: var(--hairline-strong); color: var(--color-text-secondary); }
.ct-ghost-btn:hover { background: var(--color-surface); color: var(--c-violet); border-color: var(--c-violet); }
.ct-stats { border-top: 1px solid var(--hairline); padding-top: 20px; }
.ct-stats .stat-num { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.ct-stats .stat { padding: 0 20px; }

/* Maqueta de teléfono con flotación 3D */
.ct-hero-art { position: relative; z-index: 2; display: grid; place-items: center; perspective: 1100px; }
.ct-phone {
  position: relative; width: 268px; border-radius: 34px; padding: 10px;
  background: linear-gradient(150deg,#1b2740,#0d1526 60%,#22314f);
  box-shadow: 0 30px 60px rgba(14,33,72,.30), inset 0 1px 0 rgba(255,255,255,.14);
  transform-style: preserve-3d; animation: ar-card3d 11s var(--ease-standard) infinite;
  transition: transform var(--dur-fast) linear, box-shadow var(--dur-base);
}
.ct-phone:hover { animation-play-state: paused; box-shadow: 0 40px 76px rgba(14,33,72,.36), inset 0 1px 0 rgba(255,255,255,.2); }
.ct-phone .tilt-sheen { border-radius: 34px; }
.ct-phone-notch { position: absolute; left: 50%; top: 15px; transform: translateX(-50%); width: 74px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.2); z-index: 3; }
.ct-phone-screen { position: relative; border-radius: 26px; overflow: hidden; background: var(--color-surface); padding: 26px 0 14px; }
.ct-phone-top { display: flex; align-items: center; gap: 9px; padding: 0 13px 11px; }
.ct-phone-av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, var(--pc), color-mix(in srgb, var(--pc) 45%, #4f9cf0)); }
.ct-phone-av .ico { width: 15px; height: 15px; }
.ct-phone-brand { font-size: 11.5px; font-weight: 800; color: var(--color-primary); }
.ct-phone-net { font-size: 9.5px; color: var(--color-text-muted); letter-spacing: .04em; }
.ct-phone-more { margin-left: auto; color: var(--color-text-subtle); }
.ct-phone-more .ico { width: 15px; height: 15px; }
.ct-phone-media {
  position: relative; overflow: hidden; height: 168px; display: grid; place-items: center;
  background: linear-gradient(150deg,#eef4ff,#fdeaf1);
}
.ct-phone-media-ico { position: relative; z-index: 2; color: var(--pc); opacity: .55; }
.ct-phone-media-ico .ico { width: 34px; height: 34px; animation: ar-float 5s var(--ease-standard) infinite; }
.ct-phone-acts { display: flex; align-items: center; gap: 13px; padding: 11px 13px 6px; color: var(--color-primary); }
.ct-phone-acts .ico { width: 17px; height: 17px; transition: transform var(--dur-base) var(--ease-spring); }
.ct-phone-acts .ico:first-child { color: var(--c-rose); }
.ct-phone:hover .ct-phone-acts .ico:first-child { transform: scale(1.22); fill: var(--c-rose); }
.ct-phone-spacer { flex: 1; }
.ct-phone-caption { font-size: 11px; line-height: 1.55; color: var(--color-text-secondary); padding: 0 13px; }
.ct-phone-tags { display: flex; gap: 5px; flex-wrap: wrap; padding: 8px 13px 0; }
.ct-phone-tags span { font-size: 10px; font-weight: 700; color: var(--color-accent); }
.ct-phone-shadow {
  position: absolute; bottom: -14px; left: 50%; transform: translateX(-50%);
  width: 190px; height: 26px; border-radius: 50%; filter: blur(16px);
  background: rgba(14,33,72,.22); animation: ar-breathe 11s var(--ease-standard) infinite;
}

/* Rail de ideas */
.ct-link-btn {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; background: none; border: 0;
  font-family: var(--font-body); font-size: 12px; font-weight: 700; color: var(--c-violet); padding: 4px 2px;
}
.ct-link-btn .ico { width: 14px; height: 14px; transition: transform var(--dur-base) var(--ease-spring); }
.ct-link-btn:hover .ico { transform: translateX(4px); }
.ct-idea-rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(228px, 1fr);
  gap: 12px; overflow-x: auto; padding: 4px 2px 12px; scroll-snap-type: x proximity;
}
.ct-idea-rail::-webkit-scrollbar { height: 6px; }
.ct-idea-rail::-webkit-scrollbar-thumb { background: var(--hairline-strong); border-radius: 3px; }
.ct-idea {
  scroll-snap-align: start; position: relative; overflow: hidden; cursor: pointer; text-align: left;
  display: flex; flex-direction: column; gap: 10px; min-height: 132px;
  padding: 17px 18px; border-radius: var(--radius-lg);
  background: var(--color-surface); border: 1px solid var(--hairline); font-family: var(--font-body);
  box-shadow: var(--shadow-elevated-0);
  transition: transform var(--dur-base) var(--ease-standard), box-shadow var(--dur-base), border-color var(--dur-base);
}
.ct-idea::after {
  content: ''; position: absolute; inset: auto -30% -60% -30%; height: 90px; border-radius: 50%;
  background: radial-gradient(circle, var(--c-violet-soft), transparent 70%); opacity: 0;
  transition: opacity var(--dur-base), transform var(--dur-slow) var(--ease-out); transform: translateY(20px);
}
.ct-idea:hover { transform: translateY(-5px); box-shadow: var(--shadow-elevated); border-color: color-mix(in srgb, var(--c-violet) 32%, var(--hairline)); }
.ct-idea:hover::after { opacity: 1; transform: translateY(0); }
.ct-idea > * { position: relative; z-index: 1; }
.ct-idea-ico {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--c-violet-soft); color: var(--c-violet);
  transition: transform var(--dur-base) var(--ease-spring);
}
.ct-idea-ico .ico { width: 17px; height: 17px; }
.ct-idea:hover .ct-idea-ico { transform: rotate(-8deg) scale(1.08); }
.ct-idea-txt { font-size: 12.5px; line-height: 1.5; color: var(--color-text-secondary); font-weight: 500; }
.ct-idea-go { margin-top: auto; color: var(--c-violet); opacity: 0; transform: translateX(-6px); transition: opacity var(--dur-base), transform var(--dur-base) var(--ease-spring); }
.ct-idea-go .ico { width: 15px; height: 15px; }
.ct-idea:hover .ct-idea-go { opacity: 1; transform: none; }

/* Segmentado de red social */
.ct-filter, .tp-filter { display: flex; gap: 8px; flex-wrap: wrap; }
.ct-seg, .tp-seg {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font-family: var(--font-body); font-size: 12.5px; font-weight: 700; color: var(--color-text-secondary);
  padding: 9px 17px; border-radius: var(--radius-pill);
  background: var(--color-surface); border: 1px solid var(--hairline-strong);
  transition: color var(--dur-base), border-color var(--dur-base), background var(--dur-base), transform var(--dur-base) var(--ease-standard), box-shadow var(--dur-base);
}
.ct-seg .ico, .tp-seg .ico { width: 15px; height: 15px; opacity: .75; transition: transform var(--dur-base) var(--ease-spring), opacity var(--dur-base); }
.ct-seg:hover, .tp-seg:hover { transform: translateY(-2px); color: var(--pc); border-color: color-mix(in srgb, var(--pc) 45%, transparent); }
.ct-seg:hover .ico, .tp-seg:hover .ico { opacity: 1; transform: scale(1.1); }
.ct-seg.on, .tp-seg.on {
  color: #fff; border-color: transparent; background: linear-gradient(120deg, var(--pc), color-mix(in srgb, var(--pc) 55%, #0e2148));
  box-shadow: 0 8px 22px color-mix(in srgb, var(--pc) 34%, transparent);
}
.ct-seg.on .ico, .tp-seg.on .ico { opacity: 1; }
.tp-seg-n { font-style: normal; font-size: 10.5px; font-weight: 800; padding: 1px 7px; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--color-primary) 8%, transparent); }
.tp-seg.on .tp-seg-n { background: rgba(255,255,255,.22); }

/* Tablero de producción */
.ct-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.ct-col {
  background: linear-gradient(180deg, color-mix(in srgb, var(--sc) 7%, var(--color-surface)) 0%, var(--color-surface) 120px);
  border: 1px solid var(--hairline); border-radius: var(--radius-lg); overflow: hidden;
}
.ct-col-head { display: flex; align-items: center; gap: 11px; padding: 15px 17px; border-bottom: 1px solid var(--hairline); }
.ct-col-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--sc) 14%, transparent); color: var(--sc); }
.ct-col-ico .ico { width: 16px; height: 16px; }
.ct-col-txt { display: flex; flex-direction: column; min-width: 0; }
.ct-col-name { font-family: var(--font-display); font-weight: 800; font-size: 14px; color: var(--color-primary); letter-spacing: -.01em; }
.ct-col-sub { font-size: 10.5px; color: var(--color-text-muted); }
.ct-col-n { margin-left: auto; font-family: var(--font-display); font-weight: 800; font-size: 15px; color: var(--sc); font-variant-numeric: tabular-nums; }
.ct-col-body { display: flex; flex-direction: column; gap: 11px; padding: 14px; min-height: 120px; }
.ct-col-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  padding: 26px 12px; border: 1.5px dashed var(--hairline-strong); border-radius: var(--radius-md);
  font-size: 11.5px; color: var(--color-text-subtle);
}
.ct-col-empty .ico { width: 17px; height: 17px; opacity: .6; }

.ct-card {
  position: relative; overflow: hidden; padding: 15px 16px 14px 18px;
  background: var(--color-surface); border: 1px solid var(--hairline); border-radius: var(--radius-md);
  box-shadow: var(--shadow-raised-0);
  transition: transform var(--dur-base) var(--ease-standard), box-shadow var(--dur-base), border-color var(--dur-base);
}
.ct-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-elevated); border-color: color-mix(in srgb, var(--pc) 30%, var(--hairline)); }
.ct-card-edge { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(180deg, var(--pc), color-mix(in srgb, var(--pc) 30%, transparent)); }
.ct-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.ct-card-plat { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--pc); }
.ct-card-plat .ico { width: 14px; height: 14px; }
.ct-card-ring { display: inline-flex; color: var(--color-text-subtle); }
.ct-card-ring.over { animation: ar-breathe 1.8s var(--ease-standard) infinite; }
.ct-card-body {
  font-size: 12.5px; line-height: 1.6; color: var(--color-text-secondary); white-space: pre-wrap;
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden;
}
.ct-card-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 10px; }
.ct-card-tags span {
  font-size: 10px; font-weight: 700; color: var(--color-accent);
  padding: 3px 8px; border-radius: var(--radius-pill); background: var(--color-accent-light);
}
.ct-card-tags .more { color: var(--color-text-muted); background: var(--color-surface-2); }
.ct-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--hairline); font-size: 10.5px; color: var(--color-text-muted); }
.ct-card-when { display: inline-flex; align-items: center; gap: 5px; }
.ct-card-when .ico { width: 12px; height: 12px; opacity: .7; }
.ct-card-chars { font-family: var(--font-mono); font-size: 10px; opacity: .8; }
.ct-card-actions {
  display: flex; gap: 6px; flex-wrap: wrap; margin-top: 11px;
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height var(--dur-base) var(--ease-standard), opacity var(--dur-base), margin-top var(--dur-base);
}
.ct-card:hover .ct-card-actions, .ct-card:focus-within .ct-card-actions { max-height: 60px; opacity: 1; }
.ct-act { padding: 6px 11px; font-size: 11px; }
.ct-act.go:hover { color: var(--color-green); border-color: var(--color-green); background: var(--color-green-light); }

/* ------------------------------------------------------------------
   ARCHIVOS — biblioteca del equipo
   ------------------------------------------------------------------ */
.fl-hero {
  position: relative; overflow: hidden; border-radius: var(--radius-xl);
  display: grid; grid-template-columns: 1.1fr 360px; gap: 38px; align-items: center;
  background: linear-gradient(120deg,#fbfaf7,#eef7f6 60%,#f3f7ff);
  border: 1px solid var(--hairline); padding: 38px 38px 36px; box-shadow: var(--shadow-sm);
}
.fl-hero-main { position: relative; z-index: 2; min-width: 0; }
.fl-hero .eyebrow { color: var(--c-teal); }
.fl-hero .eyebrow::before { background: linear-gradient(90deg,var(--c-teal),#4f9cf0); }
.fl-hero-title { font-family: var(--font-display); font-weight: 800; letter-spacing: -.035em; font-size: clamp(1.8rem,3.2vw,2.8rem); line-height: 1.03; color: var(--color-primary); margin: 14px 0 12px; }
.fl-hero-sub { font-size: 14px; line-height: 1.65; color: var(--color-text-muted); max-width: 50ch; }
.fl-hero-stats { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--hairline); }
.fl-hero-stats .stat { padding: 0 18px; }
.fl-hero-stats .stat-num { font-size: clamp(1.4rem,2.4vw,1.95rem); }

.fl-drop {
  position: relative; overflow: hidden; z-index: 2; cursor: pointer; text-align: center;
  border-radius: var(--radius-lg); padding: 34px 24px;
  background: var(--color-surface); border: 2px dashed color-mix(in srgb, var(--c-teal) 34%, var(--hairline-strong));
  transition: border-color var(--dur-base), transform var(--dur-base) var(--ease-standard), box-shadow var(--dur-base), background var(--dur-base);
}
.fl-drop:hover, .fl-drop.drag-over { border-color: var(--c-teal); transform: translateY(-3px); box-shadow: 0 18px 40px color-mix(in srgb, var(--c-teal) 20%, transparent); }
.fl-drop.drag-over { background: var(--c-teal-soft); border-style: solid; }
.fl-drop-in { position: relative; z-index: 2; }
.fl-drop-ico {
  position: relative; z-index: 2; display: grid; place-items: center; margin: 0 auto 14px;
  width: 54px; height: 54px; border-radius: 50%; color: #fff;
  background: linear-gradient(140deg, var(--c-teal), #4f9cf0);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--c-teal) 34%, transparent);
  animation: ar-float 4.4s var(--ease-standard) infinite;
}
.fl-drop-ico .ico { width: 23px; height: 23px; }
.fl-drop-rings { position: absolute; left: 50%; top: 27px; transform: translate(-50%,-50%); width: 54px; height: 54px; pointer-events: none; z-index: 1; }
.fl-drop-rings i { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--c-teal) 40%, transparent); animation: ar-ripple-out 3s var(--ease-out) infinite; }
.fl-drop-rings i:nth-child(2) { animation-delay: 1s; }
.fl-drop-rings i:nth-child(3) { animation-delay: 2s; }
.fl-drop-title { font-family: var(--font-display); font-weight: 800; font-size: 15px; color: var(--color-primary); letter-spacing: -.01em; }
.fl-drop-sub { font-size: 11.5px; color: var(--color-text-muted); margin-top: 6px; line-height: 1.5; }

.fl-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.fl-cats { display: flex; gap: 7px; flex-wrap: wrap; }
.fl-cat {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font-family: var(--font-body); font-size: 12px; font-weight: 600; color: var(--color-text-secondary);
  padding: 8px 15px; border-radius: var(--radius-pill);
  background: var(--color-surface); border: 1px solid var(--hairline);
  transition: color var(--dur-base), border-color var(--dur-base), background var(--dur-base), transform var(--dur-base) var(--ease-standard);
}
.fl-cat .ico { width: 14px; height: 14px; opacity: .7; }
.fl-cat:hover { transform: translateY(-2px); color: var(--c-teal); border-color: color-mix(in srgb, var(--c-teal) 45%, transparent); }
.fl-cat.on { background: var(--color-primary); color: #fff; border-color: transparent; font-weight: 700; box-shadow: 0 8px 20px rgba(14,33,72,.2); }
.fl-views { display: flex; align-items: center; gap: 8px; }
.fl-view {
  width: 38px; height: 38px; display: grid; place-items: center; cursor: pointer;
  border-radius: var(--radius-sm); background: var(--color-surface); border: 1px solid var(--hairline);
  color: var(--color-text-muted);
  transition: color var(--dur-base), border-color var(--dur-base), background var(--dur-base);
}
.fl-view:hover { color: var(--c-teal); border-color: var(--c-teal); }
.fl-view.on { background: var(--c-teal-soft); color: var(--c-teal); border-color: color-mix(in srgb, var(--c-teal) 40%, transparent); }
.fl-view .ico { width: 16px; height: 16px; }
.fl-upload .ico { width: 14px; height: 14px; }

/* Lista de archivos (hairlines, no cajas) */
.fl-list { display: flex; flex-direction: column; background: var(--color-surface); border: 1px solid var(--hairline); border-radius: var(--radius-lg); overflow: hidden; }
.fl-row {
  display: grid; grid-template-columns: 56px minmax(0,2.4fr) 150px 130px 170px 92px;
  align-items: center; gap: 14px; padding: 13px 18px;
  border-bottom: 1px solid var(--hairline); cursor: pointer;
  transition: background var(--dur-fast), padding-left var(--dur-base) var(--ease-standard);
}
.fl-row:last-child { border-bottom: 0; }
.fl-row:hover { background: linear-gradient(95deg, color-mix(in srgb, var(--fc,#4f46e5) 7%, transparent), transparent 70%); padding-left: 26px; }
.fl-head {
  background: var(--color-surface-2); cursor: default; padding-top: 11px; padding-bottom: 11px;
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--color-text-muted);
}
.fl-head:hover { background: var(--color-surface-2); padding-left: 18px; }
.fl-ico-tile {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--fc) 12%, transparent); color: var(--fc);
  transition: transform var(--dur-base) var(--ease-spring);
}
.fl-ico-tile .ico { width: 19px; height: 19px; }
.fl-row:hover .fl-ico-tile { transform: rotate(-6deg) scale(1.06); }
.fl-c-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fl-name { font-size: 13.5px; font-weight: 600; color: var(--color-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-sub { font-size: 11px; color: var(--color-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-pill {
  display: inline-block; font-size: 10.5px; font-weight: 700; color: var(--color-text-secondary);
  padding: 4px 11px; border-radius: var(--radius-pill); background: var(--color-surface-2); border: 1px solid var(--hairline);
}
.fl-c-size { display: flex; flex-direction: column; gap: 5px; }
.fl-size-n { font-family: var(--font-mono); font-size: 11.5px; color: var(--color-text-secondary); }
.fl-size-track { height: 4px; border-radius: 3px; background: var(--color-surface-2); overflow: hidden; }
.fl-size-track i { display: block; height: 100%; width: var(--w); border-radius: 3px; background: linear-gradient(90deg, color-mix(in srgb, var(--fc) 50%, transparent), var(--fc)); animation: ar-bar 700ms var(--ease-out) both; }
.fl-c-who { display: flex; align-items: center; gap: 9px; min-width: 0; }
.fl-av { width: 30px; height: 30px; font-size: 11px; }
.fl-who-txt { display: flex; flex-direction: column; min-width: 0; font-size: 12px; color: var(--color-text-secondary); }
.fl-who-txt > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-c-act { display: flex; gap: 6px; justify-content: flex-end; opacity: 0; transition: opacity var(--dur-base); }
.fl-row:hover .fl-c-act, .fl-row:focus-within .fl-c-act { opacity: 1; }
.fl-act { padding: 7px; border-radius: var(--radius-sm); }
.fl-act .ico { width: 14px; height: 14px; }

/* Mosaico de archivos */
.fl-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(216px,1fr)); gap: 16px; }
.fl-tile {
  position: relative; overflow: hidden; display: flex; flex-direction: column;
  background: var(--color-surface); border: 1px solid var(--hairline); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-elevated-0); transform-style: preserve-3d;
  transition: transform var(--dur-fast) linear, box-shadow var(--dur-base), border-color var(--dur-base);
}
.fl-tile:hover { box-shadow: var(--shadow-elevated); border-color: color-mix(in srgb, var(--fc) 34%, var(--hairline)); }
.fl-tile-thumb {
  position: relative; height: 108px; display: grid; place-items: center;
  background: linear-gradient(150deg, color-mix(in srgb, var(--fc) 13%, #fff), color-mix(in srgb, var(--fc) 4%, #fff));
  border-bottom: 1px solid var(--hairline);
}
.fl-tile-ico { color: var(--fc); }
.fl-tile-ico .ico { width: 34px; height: 34px; }
.fl-tile-kind {
  position: absolute; left: 12px; top: 12px; font-size: 9.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .09em; color: var(--fc);
  padding: 3px 9px; border-radius: var(--radius-pill); background: rgba(255,255,255,.8);
}
.fl-tile-body { padding: 14px 15px 10px; flex: 1; min-width: 0; }
.fl-tile-name { font-size: 13px; font-weight: 700; color: var(--color-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-tile-desc { font-size: 11px; color: var(--color-text-muted); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-tile-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; font-size: 11px; color: var(--color-text-muted); }
.fl-tile-foot { display: flex; align-items: center; gap: 9px; padding: 10px 15px 13px; border-top: 1px solid var(--hairline); }
.fl-tile-when { font-size: 11px; color: var(--color-text-muted); }
.fl-tile-acts { margin-left: auto; display: flex; gap: 5px; opacity: 0; transition: opacity var(--dur-base); }
.fl-tile:hover .fl-tile-acts { opacity: 1; }

/* ------------------------------------------------------------------
   PLANTILLAS — biblioteca de mensajes
   ------------------------------------------------------------------ */
.tp-hero {
  position: relative; overflow: hidden; border-radius: var(--radius-xl); color: var(--ink-inverse);
  background: radial-gradient(820px 380px at 80% -18%, rgba(217,119,6,.28), transparent 62%), var(--bg-dark);
  padding: 38px 36px 34px; box-shadow: 0 24px 60px rgba(14,33,72,.18);
}
.tp-hero-in { position: relative; z-index: 2; display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.tp-hero-main { min-width: 280px; flex: 1; }
.tp-hero .eyebrow { color: #ffd591; }
.tp-hero .eyebrow::before { background: linear-gradient(90deg,#d97706,#7cc0f7); }
.tp-hero-title { font-family: var(--font-display); font-weight: 800; letter-spacing: -.035em; font-size: clamp(1.9rem,3.4vw,3rem); line-height: 1; margin: 14px 0 12px; }
.tp-hero-sub { font-size: 14px; line-height: 1.6; color: rgba(246,245,241,.64); max-width: 52ch; }
.tp-hero-actions { margin-top: 22px; display: flex; gap: 10px; flex-wrap: wrap; }
.tp-hero-stats { display: flex; gap: 0; }
.tp-stat { padding: 0 24px; border-left: 1px solid rgba(255,255,255,.14); }
.tp-stat:first-child { border-left: 0; }
.tp-stat-num { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.6rem,2.6vw,2.3rem); line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: #ffd591; }
.tp-stat-lbl { margin-top: 7px; font-size: 11px; color: rgba(246,245,241,.56); font-weight: 500; }

.tp-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(300px,1fr)); gap: 16px; }
.tp-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column;
  padding: 20px 20px 14px; border-radius: var(--radius-lg);
  background: var(--color-surface); border: 1px solid var(--hairline);
  box-shadow: var(--shadow-elevated-0); transform-style: preserve-3d;
  transition: transform var(--dur-fast) linear, box-shadow var(--dur-base), border-color var(--dur-base);
}
.tp-card::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--tc), color-mix(in srgb, var(--tc) 26%, transparent));
}
.tp-card:hover { box-shadow: var(--shadow-elevated); border-color: color-mix(in srgb, var(--tc) 34%, var(--hairline)); }
.tp-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tp-card-ch { display: inline-flex; align-items: center; gap: 7px; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; color: var(--tc); }
.tp-card-ch .ico { width: 15px; height: 15px; }
.tp-card-vars { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; color: var(--color-text-muted); }
.tp-card-vars .ico { width: 13px; height: 13px; }
.tp-card-name { font-family: var(--font-display); font-weight: 800; font-size: 17px; letter-spacing: -.02em; color: var(--color-primary); margin: 12px 0 0; }
.tp-card-subject { display: flex; align-items: center; gap: 7px; margin-top: 7px; font-size: 11.5px; color: var(--color-text-muted); }
.tp-card-subject .ico { width: 13px; height: 13px; opacity: .7; flex-shrink: 0; }
.tp-card-subject span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-card-paper {
  position: relative; margin: 14px 0 0; padding: 14px 15px; border-radius: var(--radius-sm);
  background:
    repeating-linear-gradient(180deg, transparent 0 25px, var(--hairline) 25px 25.5px),
    var(--color-surface-2);
  border: 1px solid var(--hairline); flex: 1;
}
.tp-card-paper p {
  font-size: 12px; line-height: 25px; color: var(--color-text-secondary); white-space: pre-line;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.tp-card-chips { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 12px; }
.tp-chip {
  font-family: var(--font-mono); font-size: 10px; font-weight: 500; color: var(--c-indigo);
  padding: 3px 8px; border-radius: var(--radius-sm); background: var(--c-indigo-soft);
  border: 1px solid color-mix(in srgb, var(--c-indigo) 20%, transparent);
}
.tp-chip.more { color: var(--color-text-muted); background: var(--color-surface-2); border-color: var(--hairline); }
.tp-card-foot { display: flex; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--hairline); }
.tp-act { padding: 7px 12px; font-size: 11px; }
.tp-act:last-child { margin-left: auto; }
.tp-act.done { color: var(--color-green) !important; border-color: var(--color-green) !important; background: var(--color-green-light); }

/* ------------------------------------------------------------------
   MODALES DE MARKETING — encabezado con icono + notas
   ------------------------------------------------------------------ */
.mkt-modal-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
.mkt-modal-head h3 { margin: 0 0 4px; }
.mkt-modal-ico {
  width: 42px; height: 42px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--mc) 13%, transparent); color: var(--mc);
}
.mkt-modal-ico .ico { width: 20px; height: 20px; }
.mkt-modal-ico.ai { background: linear-gradient(140deg, var(--c-violet-soft), var(--color-accent-light)); }
.mkt-modal-sub { font-size: 12.5px; color: var(--color-text-muted); line-height: 1.5; max-width: 52ch; }
.mkt-modal-note {
  display: flex; align-items: flex-start; gap: 9px; margin: 4px 0 12px;
  font-size: 11.5px; line-height: 1.55; color: var(--color-text-muted);
  padding: 10px 13px; border-radius: var(--radius-sm); background: var(--color-surface-2); border: 1px solid var(--hairline);
}
.mkt-modal-note .ico { width: 14px; height: 14px; color: var(--color-accent); flex-shrink: 0; margin-top: 1px; }
.mkt-gen-out {
  background: var(--color-surface-2); border: 1px solid var(--hairline); border-radius: var(--radius-sm);
  padding: 14px; font-size: 12.5px; line-height: 1.75; white-space: pre-wrap; margin-bottom: 10px;
  max-height: 220px; overflow-y: auto; animation: ar-fade-up var(--dur-slow) var(--ease-out);
}
.mkt-file-input {
  width: 100%; border: 1.5px dashed var(--hairline-strong); border-radius: var(--radius-sm);
  padding: 12px; background: var(--color-surface-2); font-family: var(--font-body); font-size: 12.5px;
  transition: border-color var(--dur-base), background var(--dur-base);
}
.mkt-file-input:hover { border-color: var(--c-teal); background: var(--c-teal-soft); }
.mkt-var-help { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: -4px 0 14px; }
.mkt-var-help-lbl { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: var(--color-text-muted); margin-right: 4px; }
.mkt-var-help-lbl .ico { width: 13px; height: 13px; }
.mkt-idea-list { max-height: 52vh; overflow-y: auto; margin-bottom: 6px; }
.mkt-idea-row { gap: 12px; }
.mkt-idea-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--c-violet-soft); color: var(--c-violet); flex-shrink: 0; }
.mkt-idea-ico .ico { width: 15px; height: 15px; }
.mkt-idea-txt { font-size: 12.5px; color: var(--color-text-secondary); }
.mb.ai {
  background: linear-gradient(120deg, var(--c-violet-soft), var(--color-accent-light));
  border: 1px solid color-mix(in srgb, var(--c-violet) 26%, transparent); color: var(--c-violet);
  display: inline-flex; align-items: center; gap: 7px;
}
.mb.ai:hover { background: linear-gradient(120deg, #ede4ff, #dfeaff); }
.mb.ai .ico { width: 14px; height: 14px; }

/* ------------------------------------------------------------------
   RESPONSIVE
   ------------------------------------------------------------------ */
@media (max-width: 1180px) {
  .rv-hero-in { grid-template-columns: 1fr auto; grid-template-areas: 'lead gauge' 'dist dist'; row-gap: 28px; }
  .rv-hero-lead { grid-area: lead; }
  .rv-hero-gauge { grid-area: gauge; }
  .rv-hero-dist { grid-area: dist; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.1); }
  .rv-trend { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 18px; }
  .rv-trend .rv-mini-label { grid-column: 1 / -1; margin-bottom: 4px; }
  .ct-board { grid-template-columns: 1fr 1fr; }
  .ct-board .ct-col:last-child { grid-column: 1 / -1; }
}
@media (max-width: 1000px) {
  .ct-hero, .fl-hero { grid-template-columns: 1fr; gap: 30px; }
  .ct-hero-art { order: -1; }
  .rv-cats { grid-template-columns: 1fr; gap: 24px; }
  .rv-cats-art { max-width: 300px; margin: 0 auto; }
  .fl-row { grid-template-columns: 52px minmax(0,2fr) 120px 110px 88px; }
  .fl-c-who { display: none; }
}
@media (max-width: 780px) {
  .rv-hero, .tp-hero { padding: 28px 22px; }
  .ct-hero, .fl-hero { padding: 28px 22px; }
  .rv-hero-in { grid-template-columns: 1fr; grid-template-areas: 'lead' 'gauge' 'dist'; justify-items: start; }
  .rv-hero-gauge { justify-self: center; }
  .rv-item { grid-template-columns: 1fr; gap: 14px; }
  .rv-item-score { justify-self: start; }
  .rv-item-quote, .rv-reply, .rv-item-actions, .rv-more { margin-left: 0; }
  .rv-cat-row { grid-template-columns: 24px 1fr 52px; }
  .rv-cat-row .rv-cat-track { grid-column: 1 / -1; }
  .ct-board { grid-template-columns: 1fr; }
  .ct-board .ct-col:last-child { grid-column: auto; }
  .ct-stats, .fl-hero-stats { grid-auto-flow: row; grid-template-columns: 1fr 1fr; gap: 16px 0; }
  .ct-stats .stat, .fl-hero-stats .stat { padding: 0 16px; }
  .ct-stats .stat:nth-child(odd), .fl-hero-stats .stat:nth-child(odd) { border-left: 0; padding-left: 0; }
  .fl-row { grid-template-columns: 46px minmax(0,1fr) 80px; padding: 12px 14px; }
  .fl-c-cat { display: none; }
  .fl-head { display: none; }
  .fl-c-act { opacity: 1; }
  .tp-hero-stats { width: 100%; }
  .tp-stat { padding: 0 18px; }
}

/* Accesibilidad: sin movimiento ambiente si el sistema lo pide */
@media (prefers-reduced-motion: reduce) {
  .ar-aurora-l1, .ar-aurora-l2, .ar-aurora-l3, .ct-phone, .fl-drop-ico, .fl-drop-rings i,
  .rv-dot, .rv-ai-orbit::after, .rv-ai-orbit .ico, .ct-phone-shadow, .ct-phone-media-ico .ico,
  .rv-es-star, .ct-es-g, .fl-es-sheet, .tp-es-g, .tp-es-var, .grad-sky { animation: none !important; }
  .ar-ring-bar { stroke-dashoffset: var(--dash); }
  .rv-spark-line { stroke-dashoffset: 0; }
}

/* ==================================================================
   MARKETING v9.1 — segunda pasada: densidad, legibilidad y calma
   Ajustes tras revisar cada pestaña en navegador: menos saturación de
   aurora, métricas con hairline (no cajas), acciones sin huecos muertos.
   ================================================================== */

/* La fila de métricas del sistema NO es el chip legacy `.stat` de la
   barra de reservas: sin caja, dividida por hairlines (DESIGN.md §6). */
.stat-row > .stat {
  background: none; border: 0; border-left: 1px solid var(--hairline);
  border-radius: 0; text-align: left; font-size: inherit; color: inherit;
}
.stat-row > .stat:first-child { border-left: 0; }
.dark-section .stat-row > .stat, .caja-hero-stats .stat-row > .stat,
.tp-hero .stat-row > .stat { border-left-color: rgba(255,255,255,.14); }

/* Aurora: presencia, no protagonismo */
.rv-hero  > .ar-aurora { opacity: .62; }
.tp-hero  > .ar-aurora { opacity: .5; }
.rv-ai    > .ar-aurora { opacity: .55; }
.ct-hero  > .ar-aurora { opacity: .42; }
.fl-hero  > .ar-aurora { opacity: .38; }
.tp-hero { background: radial-gradient(760px 340px at 78% -20%, rgba(217,119,6,.22), transparent 58%), var(--bg-dark); }
.fl-hero { background: linear-gradient(120deg,#fbfaf7,#f2f7f6 62%,#f6f8ff); }
.ct-hero { background: linear-gradient(120deg,#fbfaf7 0%,#f5f3fc 58%,#fdf6f9 100%); }

/* --- Reseñas --- */
.rv-radar-shape { transform-origin: 180px 140px; }
.rv-radar { max-width: 300px; }
.rv-cat-row { grid-template-columns: 28px minmax(110px,200px) minmax(120px,1fr) 88px 50px; }
.rv-cat-n { font-size: 11px; color: var(--color-text-subtle); text-align: right; white-space: nowrap; }
@media (max-width: 900px){
  .rv-cat-n { display: none; }
  .rv-cat-row { grid-template-columns: 28px minmax(100px,180px) 1fr 50px; }
  .rv-cat-row .rv-cat-track { grid-column: auto; }
}
@media (max-width: 560px){
  .rv-cat-row { grid-template-columns: 24px 1fr 50px; }
  .rv-cat-row .rv-cat-track { grid-column: 1 / -1; }
}
.rv-quote-text { max-width: 84ch; }
/* Acciones siempre presentes (atenuadas) — nada de huecos vacíos que
   luego "saltan" al hacer hover. */
.rv-item-actions { opacity: .42; transform: none; margin-top: 12px; }
.rv-item:hover .rv-item-actions, .rv-item:focus-within .rv-item-actions,
.rv-item.expanded .rv-item-actions { opacity: 1; }
.rv-item { padding-bottom: 18px; }
/* El área bajo la curva se difumina en los bordes: sin "losa" rectangular */
.rv-spark {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.rv-hist-track { background: rgba(255,255,255,.12); }

/* Onda decorativa del panel de IA en reposo (nunca un bloque de texto solo) */
.rv-ai-idle { justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.rv-ai-wave { display: flex; align-items: center; gap: 3px; height: 46px; margin-left: auto; }
.rv-ai-wave i {
  display: block; width: 3px; border-radius: 2px; background: linear-gradient(180deg,#c4b5fd,#4f9cf0);
  height: 30%; opacity: .55; transform-origin: center;
  animation: ar-wave 1.9s var(--ease-standard) infinite;
  animation-delay: calc(var(--i) * -90ms);
}
@keyframes ar-wave { 0%,100% { height: 18%; opacity:.35 } 50% { height: 92%; opacity:.85 } }

/* --- Contenido --- */
.ct-phone-caption { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ct-idea-rail { scrollbar-width: thin; scrollbar-color: var(--hairline-strong) transparent; }
.ct-idea-rail::-webkit-scrollbar { height: 5px; }
.ct-idea-rail::-webkit-scrollbar-track { background: transparent; }
.ct-card-badge {
  display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono);
  font-size: 10px; color: var(--color-text-muted); padding: 2px 7px;
  border-radius: var(--radius-pill); background: var(--color-surface-2);
}
.ct-card-badge .ico { width: 11px; height: 11px; opacity: .7; }
.ct-card-meter { display: flex; align-items: center; gap: 9px; margin-top: 12px; }
.ct-card-meter-track { flex: 1; height: 4px; border-radius: 3px; background: var(--color-surface-2); overflow: hidden; }
/* El medidor mide ocupación del límite, no marca: escala azul → rosa
   siempre igual, así se compara de un vistazo entre redes distintas. */
.ct-card-meter-track i {
  display: block; height: 100%; width: var(--w); min-width: 3px; border-radius: 3px;
  background: linear-gradient(90deg,#7cc0f7,#1d4ed8 62%,var(--c-rose));
  background-size: 640px 100%;
  animation: ar-bar 750ms var(--ease-out) both;
}
.ct-card-meter.over .ct-card-meter-track i { background: linear-gradient(90deg,#fb7185,var(--color-danger)); }
.ct-card-chars { font-family: var(--font-mono); font-size: 10px; color: var(--color-text-secondary); white-space: nowrap; }
.ct-card-chars em { font-style: normal; color: var(--color-text-subtle); }
.ct-card-meter.over .ct-card-chars { color: var(--color-danger); font-weight: 600; }
.ct-card-over { display: inline-flex; align-items: center; gap: 5px; color: var(--color-danger); font-weight: 700; }
.ct-card-over .ico { width: 12px; height: 12px; }

/* --- Archivos --- */
.fl-drop { background: rgba(255,255,255,.72); backdrop-filter: blur(4px); }

/* --- Plantillas --- */
.tp-card-name { line-height: 1.25; }
.tp-hero-stats .tp-stat-num { color: #ffd591; }

/* Botones de marketing: icono y texto siempre con aire entre medio */
#section-marketing .nbtn, #section-marketing .mb {
  display: inline-flex; align-items: center; gap: 8px;
}
#section-marketing .nbtn { padding: 10px 20px; font-size: 12.5px; font-weight: 700; }
#section-marketing .nbtn .ico { width: 15px; height: 15px; }
#section-marketing .mb .ico { width: 14px; height: 14px; }

/* Cita de la reseña dentro del modal de respuesta */
.rv-modal-quote {
  position: relative; margin: -6px 0 16px; padding: 14px 16px;
  border-radius: 4px var(--radius-md) var(--radius-md) 4px;
  background: linear-gradient(100deg, var(--c-rose-soft), transparent 78%);
  border-left: 3px solid var(--c-rose);
}
.rv-modal-quote-top { display: flex; align-items: center; gap: 11px; margin-bottom: 10px; }
.rv-modal-author { font-family: var(--font-display); font-weight: 700; font-size: 14px; color: var(--color-primary); letter-spacing: -.01em; }
.rv-modal-stars { width: 76px; height: 14px; margin-top: 3px; color: var(--color-primary); }
.rv-modal-quote p { font-size: 12.5px; line-height: 1.65; color: var(--color-text-secondary); font-style: italic; }

/* Los estados vacíos son casi solo texto: la aurora de fondo tiene que verse */
.rv-empty > .ar-aurora, .ct-empty > .ar-aurora,
.fl-empty > .ar-aurora, .tp-empty > .ar-aurora { opacity: .5; }

/* ==================================================================
   ADMINISTRACIÓN v9 — "sala de máquinas"
   ------------------------------------------------------------------
   Dialecto propio dentro del mismo sistema: donde Marketing es
   editorial (auroras, mockups, feed), Administración es INSTRUMENTAL.
   Barra de comando compacta en vez de hero alto · fondo de plano
   técnico · números en DM Mono · medidores con ticks · libro mayor con
   saldo corrido · recibos con borde troquelado.
   ================================================================== */
@keyframes ops-sweep   { 0% { transform: translateX(-40%); opacity: 0 } 12%,60% { opacity: .55 } 100% { transform: translateX(140%); opacity: 0 } }
@keyframes ops-tick    { from { opacity: 0; transform: scale(.4) } }
@keyframes ops-rise    { from { transform: scaleY(0) } }
@keyframes ops-led     { 0%,100% { box-shadow: 0 0 0 0 currentColor, 0 0 6px currentColor } 55% { box-shadow: 0 0 0 5px transparent, 0 0 10px currentColor } }
@keyframes ops-dash    { to { stroke-dashoffset: -220 } }
@keyframes ops-ping    { 0% { transform: scale(.7); opacity: .5 } 100% { transform: scale(1.9); opacity: 0 } }

#section-admin { --ops-mono: var(--font-mono); }
#section-admin #admin-content { display: flex; flex-direction: column; gap: 22px; padding-bottom: 30px; }
/* El bloque alto vacío que no encajaba: la altura la manda el contenido */
#section-admin .admin-panel { min-height: 0; }

/* ---------- Fondo de plano técnico (ambiente propio de admin) ---------- */
.ops-grid {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0;
  border-radius: inherit; opacity: .5;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--ops, var(--c-amber)) 12%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--ops, var(--c-amber)) 12%, transparent) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(120% 100% at 100% 0%, #000 10%, transparent 72%);
  mask-image: radial-gradient(120% 100% at 100% 0%, #000 10%, transparent 72%);
}
.ops-grid.soft { opacity: .3; }
.ops-grid-sweep {
  position: absolute; top: 0; bottom: 0; width: 34%;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--ops, var(--c-amber)) 16%, transparent), transparent);
  animation: ops-sweep 9s var(--ease-standard) infinite;
}

/* ---------- Barra de comando de sección ---------- */
.ops-bar {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  background: var(--color-surface); border: 1px solid var(--hairline);
  box-shadow: var(--shadow-xs);
}
.ops-bar::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; z-index: 2;
  background: linear-gradient(90deg, var(--ops), color-mix(in srgb, var(--ops) 22%, transparent) 60%, transparent);
}
.ops-bar-in {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(240px, 1.1fr) auto auto;
  align-items: center; gap: 28px; padding: 20px 26px 22px;
}
.ops-lead { min-width: 0; }
.ops-eyebrow {
  font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ops); display: inline-flex; align-items: center; gap: 8px;
}
.ops-eyebrow::before { content: ''; width: 14px; height: 2px; border-radius: 2px; background: currentColor; }
.ops-eyebrow.light { color: #ffd591; }
.ops-title {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -.025em;
  font-size: clamp(1.35rem, 2.3vw, 1.95rem); color: var(--color-primary); margin: 8px 0 5px; line-height: 1.05;
}
.ops-sub { font-size: 12.5px; line-height: 1.5; color: var(--color-text-muted); max-width: 60ch; }
.ops-readouts { display: flex; gap: 0; }
.ops-readout {
  padding: 0 20px; border-left: 1px solid var(--hairline);
  animation: ar-fade-up var(--dur-slow) var(--ease-out) both; animation-delay: calc(var(--i) * 70ms);
}
.ops-readout:first-child { border-left: 0; padding-left: 0; }
.ops-readout-num {
  font-family: var(--font-mono); font-weight: 500; font-size: clamp(1.15rem, 1.9vw, 1.5rem);
  letter-spacing: -.02em; color: var(--ops); font-variant-numeric: tabular-nums; line-height: 1;
}
.ops-readout-lbl {
  margin-top: 7px; font-size: 10px; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--color-text-subtle);
}
.ops-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; justify-self: end; }

/* ---------- Botonera admin ---------- */
.ops-btn {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer; white-space: nowrap;
  font-family: var(--font-body); font-size: 12px; font-weight: 700; color: var(--color-text-secondary);
  padding: 9px 15px; border-radius: var(--radius-sm);
  background: var(--color-surface); border: 1px solid var(--hairline-strong);
  transition: color var(--dur-base), border-color var(--dur-base), background var(--dur-base), transform var(--dur-base) var(--ease-standard);
}
.ops-btn:hover { color: var(--sec-accent, var(--c-amber)); border-color: var(--sec-accent, var(--c-amber)); transform: translateY(-2px); }
.ops-btn .ico { width: 14px; height: 14px; }
.ops-btn.ghost { background: transparent; border-style: dashed; }
.ops-btn.light { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); color: #fff; }
.ops-btn.light:hover { background: rgba(255,255,255,.16); color: #fff; border-color: rgba(255,255,255,.34); }
.ops-icon-btn {
  width: 30px; height: 30px; flex-shrink: 0; display: grid; place-items: center; cursor: pointer;
  border-radius: 8px; background: transparent; border: 1px solid var(--hairline);
  color: var(--color-text-muted);
  transition: color var(--dur-base), border-color var(--dur-base), background var(--dur-base), transform var(--dur-base) var(--ease-spring);
}
.ops-icon-btn:hover { color: var(--color-accent); border-color: var(--color-accent); transform: translateY(-2px); }
.ops-icon-btn.danger:hover { color: var(--color-danger); border-color: var(--color-danger); background: var(--color-danger-light); }
.ops-icon-btn.light { border-color: rgba(255,255,255,.2); color: #fff; }
.ops-icon-btn.light:hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.34); color: #fff; }
.ops-icon-btn .ico { width: 14px; height: 14px; }

/* ---------- Encabezados, notas y utilidades ---------- */
.ops-block-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.ops-block-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ops-label {
  font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--sec-accent, var(--c-amber)); display: inline-flex; align-items: center; gap: 7px;
}
.ops-label::before { content: ''; width: 14px; height: 2px; border-radius: 2px; background: currentColor; }
.ops-block-title {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -.02em;
  font-size: clamp(1.15rem, 2vw, 1.5rem); color: var(--color-primary); margin-top: 7px;
}
.ops-mini-label { font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; color: var(--color-text-subtle); margin-bottom: 9px; }
.ops-para { font-size: 12.5px; line-height: 1.6; color: var(--color-text-muted); max-width: 66ch; margin-bottom: 14px; }
.ops-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--color-text-subtle); display: inline-block; flex-shrink: 0; }
.ops-dim { color: var(--color-text-subtle); font-style: italic; }
.ops-note {
  display: flex; align-items: flex-start; gap: 10px; font-size: 12px; line-height: 1.55;
  color: var(--color-text-muted); padding: 12px 15px; border-radius: var(--radius-md);
  background: var(--color-surface); border: 1px solid var(--hairline); border-left: 3px solid var(--color-accent);
}
.ops-note b { color: var(--color-primary); }
.ops-note .ico { width: 15px; height: 15px; color: var(--color-accent); flex-shrink: 0; margin-top: 1px; }
.ops-note.warn   { border-left-color: var(--c-amber);      background: linear-gradient(100deg, var(--c-amber-soft), transparent 72%); }
.ops-note.warn .ico { color: var(--c-amber); }
.ops-note.danger { border-left-color: var(--color-danger); background: linear-gradient(100deg, var(--color-danger-light), transparent 72%); }
.ops-note.danger .ico { color: var(--color-danger); }

/* ---------- Chips de filtro ---------- */
.ops-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.ops-chip {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  font-family: var(--font-body); font-size: 12px; font-weight: 600; color: var(--color-text-secondary);
  padding: 8px 14px; border-radius: var(--radius-sm);
  background: var(--color-surface); border: 1px solid var(--hairline);
  transition: color var(--dur-base), border-color var(--dur-base), background var(--dur-base), transform var(--dur-base) var(--ease-standard);
}
.ops-chip .ico { width: 14px; height: 14px; opacity: .7; }
.ops-chip i { font-style: normal; font-family: var(--font-mono); font-size: 10.5px; color: var(--color-text-subtle); }
.ops-chip:hover { transform: translateY(-2px); color: var(--pc); border-color: color-mix(in srgb, var(--pc) 45%, transparent); }
.ops-chip.on { background: color-mix(in srgb, var(--pc) 10%, var(--color-surface)); color: var(--pc); border-color: var(--pc); font-weight: 700; }
.ops-chip.on i { color: var(--pc); }

/* ---------- Toggle segmentado ---------- */
.ops-toggle { display: inline-flex; padding: 3px; gap: 3px; border-radius: var(--radius-sm); background: var(--color-surface-2); border: 1px solid var(--hairline); }
.ops-toggle button {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; border: 0; background: transparent;
  font-family: var(--font-body); font-size: 11.5px; font-weight: 700; color: var(--color-text-muted);
  padding: 7px 13px; border-radius: 6px; transition: background var(--dur-base), color var(--dur-base);
}
.ops-toggle button .ico { width: 13px; height: 13px; }
.ops-toggle button:hover { color: var(--color-primary); }
.ops-toggle button.on { background: var(--color-surface); color: var(--color-primary); box-shadow: var(--shadow-xs); }

/* ---------- Dial segmentado ---------- */
.ops-dial { display: block; overflow: visible; }
.ops-dial-tick {
  stroke: currentColor; stroke-width: 2; stroke-linecap: round; opacity: .14;
  color: var(--color-text-muted);
}
.ops-dial-tick.on {
  color: var(--sec-accent, var(--c-amber)); opacity: 1;
  animation: ops-tick 340ms var(--ease-out) both; animation-delay: calc(var(--i) * 14ms);
}
.ops-dial.light .ops-dial-tick { color: rgba(255,255,255,.9); }
.ops-dial.light .ops-dial-tick:not(.on) { opacity: .16; }

/* ---------- Sparkline de barras ---------- */
.ops-bars { display: block; width: 100%; }
.ops-bar-tick {
  fill: var(--color-green); transform-origin: bottom;
  animation: ops-rise 420ms var(--ease-out) both; animation-delay: calc(var(--i) * 12ms);
}
.ops-bar-tick.neg { fill: var(--color-danger); }
.ops-bars.on-dark .ops-bar-tick { fill: #6ee7b7; }
.ops-bars.on-dark .ops-bar-tick.neg { fill: #fda4af; }

/* ---------- Tira semanal ---------- */
.ops-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.ops-day {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; cursor: pointer;
  padding: 10px 6px 9px; border-radius: var(--radius-sm); font-family: var(--font-body);
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); color: rgba(246,245,241,.8);
  transition: background var(--dur-base), border-color var(--dur-base), transform var(--dur-base) var(--ease-standard);
  animation: ar-fade-up var(--dur-base) var(--ease-out) both; animation-delay: calc(var(--i) * 40ms);
}
.ops-day:hover { background: rgba(255,255,255,.12); transform: translateY(-2px); }
.ops-day.on { background: rgba(255,255,255,.94); border-color: transparent; color: var(--color-primary); box-shadow: 0 8px 22px rgba(0,0,0,.28); }
.ops-day.today::after { content: ''; position: absolute; top: 6px; right: 7px; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .7; }
.ops-day-dow { font-size: 9.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; opacity: .65; }
.ops-day-num { font-family: var(--font-display); font-weight: 800; font-size: 17px; line-height: 1; }
.ops-day-bar { display: block; width: 100%; height: 16px; display: flex; align-items: flex-end; justify-content: center; }
.ops-day-bar i { display: block; width: 60%; height: var(--h); min-height: 2px; border-radius: 2px; background: currentColor; opacity: .38; transform-origin: bottom; animation: ops-rise 500ms var(--ease-out) both; }
.ops-day.on .ops-day-bar i { opacity: .55; }
.ops-day-val { font-family: var(--font-mono); font-size: 9.5px; opacity: .7; white-space: nowrap; }
/* La tira también se usa sobre fondo claro (Consumos) */
.ops-daybar {
  position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: 14px 16px;
  background: radial-gradient(700px 200px at 84% -40%, color-mix(in srgb, var(--ops) 30%, transparent), transparent 60%), var(--bg-dark);
}

/* ---------- Estado vacío de administración ---------- */
.ops-empty {
  position: relative; overflow: hidden; text-align: center; padding: 46px 28px 44px;
  border-radius: var(--radius-lg); background: var(--color-surface); border: 1px solid var(--hairline);
}
.ops-empty > *:not(.ops-grid) { position: relative; z-index: 1; }
.ops-empty-art { width: 190px; margin: 0 auto 16px; }
.ops-empty-art svg { width: 100%; height: auto; overflow: visible; }
.ops-empty h3 { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em; color: var(--color-primary); margin-bottom: 8px; }
.ops-empty p { font-size: 12.5px; color: var(--color-text-muted); max-width: 56ch; margin: 0 auto 20px; line-height: 1.6; }
.ops-es { fill: none; stroke: var(--ops); stroke-width: 2; }
.ops-es-box { opacity: .45; }
.ops-es-line { opacity: .3; }
.ops-es-line.dim { opacity: .2; }
.ops-es-dot { fill: var(--ops); stroke: none; opacity: .5; }
.ops-es-pulse { stroke-dasharray: 220; stroke-dashoffset: 0; opacity: .55; animation: ops-dash 3.4s linear infinite; }

/* ==================================================================
   CUENTAS — bóveda + libro mayor
   ================================================================== */
.vault {
  position: relative; overflow: hidden; border-radius: var(--radius-xl); color: var(--ink-inverse);
  background: radial-gradient(880px 400px at 82% -18%, rgba(79,156,240,.26), transparent 62%), var(--bg-dark);
  padding: 32px 34px; box-shadow: 0 22px 56px rgba(14,33,72,.18); --ops: #4f9cf0;
}
.vault-in { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center; }
.vault-total {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -.035em;
  font-size: clamp(2.3rem, 4.6vw, 3.5rem); margin-top: 12px; font-variant-numeric: tabular-nums; line-height: 1;
}
.vault-sub { color: rgba(246,245,241,.6); font-size: 13px; margin-top: 6px; }
.vault-flow { display: flex; flex-direction: column; gap: 9px; margin-top: 22px; max-width: 460px; }
.vault-flow-row { display: grid; grid-template-columns: 170px 1fr auto; align-items: center; gap: 12px; }
.vault-flow-lbl { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; color: rgba(246,245,241,.66); }
.vault-flow-lbl .ico { width: 13px; height: 13px; }
.vault-flow-track { height: 7px; border-radius: 4px; background: rgba(255,255,255,.1); overflow: hidden; }
.vault-flow-track i { display: block; height: 100%; width: var(--w); border-radius: 4px; animation: ar-bar 800ms var(--ease-out) both .2s; }
.vault-flow-row.in  .vault-flow-track i { background: linear-gradient(90deg, rgba(110,231,183,.5), #34d399); }
.vault-flow-row.out .vault-flow-track i { background: linear-gradient(90deg, rgba(253,164,175,.5), #fb7185); }
.vault-flow-val { font-family: var(--font-mono); font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vault-flow-row.in  .vault-flow-val { color: #6ee7b7; }
.vault-flow-row.out .vault-flow-val { color: #fda4af; }
.vault-pulse { min-width: 300px; }
.vault-pulse .ops-mini-label { color: rgba(246,245,241,.42); }
.vault-pulse-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; font-size: 10px; color: rgba(246,245,241,.42); font-family: var(--font-mono); }
.vault-pulse-note { font-family: var(--font-body); }

.bank-card-chip {
  position: absolute; left: 20px; top: 52px; width: 30px; height: 22px; border-radius: 5px;
  background: linear-gradient(135deg, rgba(255,255,255,.5), rgba(255,255,255,.16));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.28); opacity: .55;
}
.bank-card { height: 168px; width: 258px; }
.bank-card-pulse { position: absolute; left: 0; right: 0; bottom: 54px; padding: 0 20px; opacity: .5; }
.bank-card:hover .bank-card-pulse { opacity: .85; }
.bank-card-label { font-size: 8.5px; }

/* Ruteo de cobros por canal */
.chacc {
  display: grid; grid-template-columns: 1fr 300px; gap: 30px; align-items: center;
  background: var(--color-surface); border: 1px solid var(--hairline);
  border-radius: var(--radius-lg); padding: 24px 28px; overflow: hidden;
}
.chacc-main { min-width: 0; }
.chacc-list { display: flex; flex-direction: column; }
.chacc-row {
  display: grid; grid-template-columns: 10px minmax(96px, 150px) minmax(140px, 220px) 1fr;
  align-items: center; gap: 14px; padding: 11px 4px; border-bottom: 1px solid var(--hairline);
  transition: background var(--dur-fast), padding-left var(--dur-base) var(--ease-standard);
}
.chacc-row:hover { background: linear-gradient(90deg, color-mix(in srgb, var(--cc) 7%, transparent), transparent 70%); padding-left: 10px; }
.chacc-row:last-child { border-bottom: 0; }
.chacc-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--cc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cc) 16%, transparent); }
.chacc-name { font-size: 13px; font-weight: 700; color: var(--color-primary); }
.chacc-sel { width: 100%; }
.chacc-auto { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--color-text-muted); cursor: pointer; user-select: none; }
.chacc-auto input { position: absolute; opacity: 0; width: 0; height: 0; }
.chacc-switch {
  width: 34px; height: 19px; border-radius: 999px; background: var(--color-surface-2);
  border: 1px solid var(--hairline-strong); position: relative; transition: background var(--dur-base), border-color var(--dur-base);
}
.chacc-switch::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%;
  background: var(--color-text-subtle); transition: transform var(--dur-base) var(--ease-spring), background var(--dur-base);
}
.chacc-auto input:checked + .chacc-switch { background: color-mix(in srgb, var(--cc) 22%, transparent); border-color: var(--cc); }
.chacc-auto input:checked + .chacc-switch::after { transform: translateX(15px); background: var(--cc); }
.chacc-auto input:focus-visible + .chacc-switch { box-shadow: 0 0 0 3px color-mix(in srgb, var(--cc) 24%, transparent); }
.chacc-hint { font-size: 10.5px; color: var(--color-text-subtle); font-style: italic; }
.chacc-save { margin-top: 18px; }
.chacc-art { display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg,#f6f8ff,#fdf1f6); border-radius: var(--radius-md); padding: 14px; align-self: stretch; }
.chacc-art .bank-art-svg { max-height: 230px; }

/* Libro mayor */
.ledger { }
.ledger-filters {
  display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
  padding: 13px 16px; border-radius: var(--radius-md);
  background: var(--color-surface-2); border: 1px solid var(--hairline);
}
.ledger-filter { display: flex; flex-direction: column; gap: 5px; }
.ledger-filter label { font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--color-text-subtle); }
.ledger-filter input[type="date"] { min-width: 150px; }
.ledger-balance { margin-left: auto; text-align: right; }
.ledger-balance-lbl { display: block; font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--color-text-subtle); }
.ledger-balance-val { font-family: var(--font-mono); font-size: 17px; font-variant-numeric: tabular-nums; }
.ledger-balance-val.pos { color: var(--color-green); }
.ledger-balance-val.neg { color: var(--color-danger); }

.ledger-split { display: flex; gap: 6px; margin-bottom: 16px; }
.ledger-split-seg {
  height: 34px; width: var(--w); min-width: 84px; border-radius: var(--radius-sm);
  display: flex; align-items: center; padding: 0 12px; overflow: hidden;
  font-size: 11px; font-weight: 700; color: #fff; white-space: nowrap;
  animation: ar-bar 700ms var(--ease-out) both;
}
.ledger-split-seg.in  { background: linear-gradient(100deg, #0f9d68, #34d399); }
.ledger-split-seg.out { background: linear-gradient(100deg, #e0362f, #fb7185); }

.ledger-list { display: flex; flex-direction: column; }
.ledger-day { margin-bottom: 6px; }
.ledger-day-head { display: flex; align-items: center; gap: 12px; padding: 12px 4px 8px; }
.ledger-day-date { font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: .04em; color: var(--color-text-muted); }
.ledger-day-line { flex: 1; height: 1px; background: var(--hairline); }
.ledger-day-net { font-family: var(--font-mono); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.ledger-day-net.pos { color: var(--color-green); }
.ledger-day-net.neg { color: var(--color-danger); }

.ledger-row {
  display: grid; grid-template-columns: 46px 26px minmax(0,1fr) 130px 120px 32px;
  align-items: center; gap: 12px; padding: 11px 6px;
  border-bottom: 1px solid var(--hairline);
  transition: background var(--dur-fast), padding-left var(--dur-base) var(--ease-standard);
}
.ledger-row:hover { background: linear-gradient(90deg, rgba(37,99,235,.05), transparent 76%); padding-left: 14px; }
.ledger-time { font-family: var(--font-mono); font-size: 11px; color: var(--color-text-subtle); }
.ledger-flow { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; }
.ledger-flow .ico { width: 13px; height: 13px; }
.ledger-row.in  .ledger-flow { background: var(--color-green-light); color: var(--color-green); }
.ledger-row.out .ledger-flow { background: var(--color-danger-light); color: var(--color-danger); }
.ledger-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ledger-desc { font-size: 13px; font-weight: 600; color: var(--color-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ledger-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 11px; color: var(--color-text-muted); }
.ledger-acc { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }
.ledger-acc i { width: 7px; height: 7px; border-radius: 50%; background: var(--ac); }
.ledger-guest { display: inline-flex; align-items: center; gap: 4px; }
.ledger-guest .ico { width: 12px; height: 12px; opacity: .7; }
.ledger-amt { font-family: var(--font-mono); font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.ledger-row.in  .ledger-amt { color: var(--color-green); }
.ledger-row.out .ledger-amt { color: var(--color-danger); }
.ledger-run { font-family: var(--font-mono); font-size: 11.5px; color: var(--color-text-subtle); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ledger-row .ops-icon-btn { opacity: 0; }
.ledger-row:hover .ops-icon-btn, .ledger-row:focus-within .ops-icon-btn { opacity: 1; }

/* ==================================================================
   CAJA — cierre del día
   ================================================================== */
.caja-desk {
  position: relative; overflow: hidden; border-radius: var(--radius-xl); color: var(--ink-inverse);
  background: radial-gradient(820px 380px at 80% -18%, rgba(217,119,6,.26), transparent 60%), var(--bg-dark);
  padding: 28px 32px 30px; box-shadow: 0 22px 56px rgba(14,33,72,.18); --ops: #d97706;
}
.caja-desk-in { position: relative; z-index: 1; }
.caja-desk-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 20px; }
.caja-date { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.5rem, 3vw, 2.2rem); letter-spacing: -.03em; margin-top: 9px; text-transform: capitalize; }
.caja-nav-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.caja-scale { display: grid; grid-template-columns: 1fr auto 1fr; gap: 26px; align-items: center; margin-top: 24px; }
.caja-scale-side { display: flex; flex-direction: column; gap: 7px; }
.caja-scale-side.out { align-items: flex-end; text-align: right; }
.caja-scale-lbl { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: rgba(246,245,241,.55); }
.caja-scale-lbl .ico { width: 13px; height: 13px; }
.caja-scale-val { font-family: var(--font-mono); font-size: clamp(1.2rem, 2.4vw, 1.7rem); font-variant-numeric: tabular-nums; }
.caja-scale-side.in  .caja-scale-val { color: #6ee7b7; }
.caja-scale-side.out .caja-scale-val { color: #fda4af; }
.caja-scale-track { width: 100%; height: 8px; border-radius: 5px; background: rgba(255,255,255,.1); overflow: hidden; }
.caja-scale-side.out .caja-scale-track { display: flex; justify-content: flex-end; }
.caja-scale-track i { display: block; height: 100%; width: var(--w); border-radius: 5px; animation: ar-bar 800ms var(--ease-out) both .15s; }
.caja-scale-side.in  .caja-scale-track i { background: linear-gradient(90deg, rgba(110,231,183,.45), #34d399); }
.caja-scale-side.out .caja-scale-track i { background: linear-gradient(270deg, rgba(253,164,175,.45), #fb7185); }
.caja-scale-mid { position: relative; display: grid; place-items: center; }
.caja-scale-core { position: absolute; text-align: center; }
.caja-scale-net { display: block; font-family: var(--font-mono); font-size: 15px; font-variant-numeric: tabular-nums; color: #fff; }
.caja-scale-net.neg { color: #fda4af; }
.caja-scale-net-lbl { font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: rgba(246,245,241,.5); }

.caja-timeline { margin-top: 26px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.1); }
.caja-timeline .ops-mini-label { color: rgba(246,245,241,.42); }
.tl-rail { position: relative; height: 44px; border-radius: var(--radius-sm); background: rgba(255,255,255,.06); }
.tl-hour { position: absolute; left: var(--x); top: 100%; transform: translateX(-50%); margin-top: 5px; font-family: var(--font-mono); font-size: 9.5px; color: rgba(246,245,241,.4); }
.tl-hour::before { content: ''; position: absolute; left: 50%; bottom: 100%; width: 1px; height: 44px; background: rgba(255,255,255,.1); }
.tl-mark {
  position: absolute; left: var(--x); top: 50%; width: 9px; height: 9px; border-radius: 50%;
  transform: translate(-50%,-50%); cursor: help;
  transition: transform var(--dur-base) var(--ease-spring), box-shadow var(--dur-base);
}
.tl-mark.in  { background: #34d399; box-shadow: 0 0 0 3px rgba(52,211,153,.2); }
.tl-mark.out { background: #fb7185; box-shadow: 0 0 0 3px rgba(251,113,133,.2); top: 32%; }
.tl-mark:hover { transform: translate(-50%,-50%) scale(1.5); box-shadow: 0 0 0 6px rgba(255,255,255,.14); }

/* Recibos por caja */
.till-row-wrap { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; align-items: start; }
.till {
  position: relative; padding: 18px 20px 26px; border-radius: var(--radius-md) var(--radius-md) 0 0;
  background:
    repeating-linear-gradient(180deg, transparent 0 27px, var(--hairline) 27px 27.5px),
    var(--color-surface);
  border: 1px solid var(--hairline); border-bottom: 0;
  box-shadow: var(--shadow-raised-0); transition: box-shadow var(--dur-base), transform var(--dur-base) var(--ease-standard);
}
.till:hover { box-shadow: var(--shadow-raised); transform: translateY(-2px); }
.till-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 2px dashed var(--hairline-strong); }
.till-name { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 800; font-size: 15px; color: var(--color-primary); }
.till-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 18%, transparent); }
.till-net { font-family: var(--font-mono); font-size: 15px; font-variant-numeric: tabular-nums; }
.till-net.pos { color: var(--color-green); }
.till-net.neg { color: var(--color-danger); }
.till-legs { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 0 4px; font-size: 11px; font-family: var(--font-mono); }
.till-leg { display: inline-flex; align-items: center; gap: 5px; }
.till-leg .ico { width: 12px; height: 12px; }
.till-leg.in  { color: var(--color-green); }
.till-leg.out { color: var(--color-danger); }
.till-count { margin-left: auto; color: var(--color-text-subtle); }
.till-rows { display: flex; flex-direction: column; }
.till-row { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: baseline; gap: 10px; padding: 6px 0; }
.till-time { font-family: var(--font-mono); font-size: 10.5px; color: var(--color-text-subtle); }
.till-desc { min-width: 0; font-size: 12.5px; color: var(--color-text-secondary); }
.till-meta { display: block; font-size: 10.5px; color: var(--color-text-subtle); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.till-amt { font-family: var(--font-mono); font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.till-row.in  .till-amt { color: var(--color-green); }
.till-row.out .till-amt { color: var(--color-danger); }
.till-tear {
  position: absolute; left: -1px; right: -1px; bottom: -9px; height: 10px;
  background:
    radial-gradient(circle at 6px 0, transparent 0 6px, var(--color-surface) 6px) repeat-x 0 0/12px 10px;
  filter: drop-shadow(0 1px 0 var(--hairline));
}

/* ==================================================================
   PROVEEDORES — directorio
   ================================================================== */
.prov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.prov-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 13px;
  padding: 20px 20px 14px; border-radius: var(--radius-lg);
  background: var(--color-surface); border: 1px solid var(--hairline);
  box-shadow: var(--shadow-elevated-0); transform-style: preserve-3d;
  transition: transform var(--dur-fast) linear, box-shadow var(--dur-base), border-color var(--dur-base);
}
.prov-card:hover { box-shadow: var(--shadow-elevated); border-color: color-mix(in srgb, var(--pc) 34%, var(--hairline)); }
.prov-tape {
  position: absolute; left: 50%; top: -12px; transform: translateX(-50%) rotate(-2deg);
  width: 82px; height: 22px; border-radius: 2px;
  background: color-mix(in srgb, var(--pc) 16%, #fff); border: 1px solid color-mix(in srgb, var(--pc) 22%, transparent);
  opacity: .8;
}
.prov-head { display: flex; align-items: center; gap: 12px; }
.prov-av { width: 42px; height: 42px; font-size: 14px; }
.prov-id { min-width: 0; }
.prov-name { font-family: var(--font-display); font-weight: 800; font-size: 15.5px; letter-spacing: -.015em; color: var(--color-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prov-cat { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--pc); }
.prov-cat .ico { width: 12px; height: 12px; }
.prov-contact { display: flex; flex-direction: column; }
.prov-line {
  display: flex; align-items: center; gap: 9px; padding: 8px 4px; text-decoration: none;
  border-bottom: 1px solid var(--hairline); font-size: 12.5px; color: var(--color-text-secondary);
  transition: color var(--dur-base), padding-left var(--dur-base) var(--ease-standard);
}
.prov-line:last-child { border-bottom: 0; }
.prov-line .ico { width: 14px; height: 14px; color: var(--pc); opacity: .8; }
.prov-line span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prov-line:hover { color: var(--pc); padding-left: 8px; }
.prov-line.empty { color: var(--color-text-subtle); font-style: italic; }
.prov-line.empty .ico { color: var(--color-text-subtle); }
.prov-go { margin-left: auto; opacity: 0; transform: translateX(-4px); transition: opacity var(--dur-base), transform var(--dur-base) var(--ease-spring); }
.prov-line:hover .prov-go { opacity: 1; transform: none; }
.prov-notes {
  font-size: 11.5px; line-height: 1.55; color: var(--color-text-muted);
  padding: 10px 12px; border-radius: var(--radius-sm); background: var(--color-surface-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.prov-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 11px; border-top: 1px solid var(--hairline); }
.prov-since { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--color-text-subtle); }
.prov-since .ico { width: 12px; height: 12px; }
.prov-acts { display: flex; gap: 6px; opacity: 0; transition: opacity var(--dur-base); }
.prov-card:hover .prov-acts, .prov-card:focus-within .prov-acts { opacity: 1; }

/* ==================================================================
   COSTOS — asignación del presupuesto
   ================================================================== */
.alloc { background: var(--color-surface); border: 1px solid var(--hairline); border-radius: var(--radius-lg); padding: 22px 26px; }
.alloc-total { font-family: var(--font-mono); font-size: 20px; color: var(--color-primary); font-variant-numeric: tabular-nums; }
.alloc-total small { font-size: 11px; color: var(--color-text-subtle); margin-left: 3px; }
.alloc-bar { display: flex; height: 46px; border-radius: var(--radius-sm); overflow: hidden; gap: 2px; }
.alloc-seg {
  width: var(--w); min-width: 3px; background: var(--ac); position: relative;
  display: flex; align-items: center; justify-content: center; cursor: default;
  transition: filter var(--dur-base), transform var(--dur-base) var(--ease-standard);
  animation: ar-bar 750ms var(--ease-out) both; animation-delay: calc(var(--i) * 60ms);
}
.alloc-seg b { font-size: 11px; font-weight: 800; color: #fff; opacity: 0; transition: opacity var(--dur-base); text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.alloc-seg:hover { filter: brightness(1.12); }
.alloc-seg:hover b { opacity: 1; }
.alloc-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; }
.alloc-key { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--color-text-muted); }
.alloc-key i { width: 9px; height: 9px; border-radius: 3px; background: var(--ac); }
.alloc .ops-note { margin-top: 14px; }

.cost-areas { display: grid; grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); gap: 16px; align-items: start; }
.cost-area {
  background: var(--color-surface); border: 1px solid var(--hairline); border-radius: var(--radius-lg);
  padding: 18px 20px; border-top: 3px solid var(--ac);
  box-shadow: var(--shadow-raised-0); transition: box-shadow var(--dur-base);
}
.cost-area:hover { box-shadow: var(--shadow-raised); }
.cost-area-head { display: flex; align-items: center; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--hairline); }
.cost-area-dial { position: relative; display: grid; place-items: center; color: var(--ac); }
.cost-area-dial .ops-dial-tick.on { color: var(--ac); }
.cost-area-dial b { position: absolute; font-family: var(--font-mono); font-size: 12px; color: var(--ac); }
.cost-area-id h3 { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 800; font-size: 15px; color: var(--color-primary); letter-spacing: -.01em; }
.cost-area-id h3 .ico { width: 15px; height: 15px; color: var(--ac); }
.cost-area-id span { font-size: 11.5px; color: var(--color-text-muted); }
.cost-list { display: flex; flex-direction: column; }
.cost-row {
  display: grid; grid-template-columns: minmax(0,1.2fr) minmax(70px,1fr) 110px 68px;
  align-items: center; gap: 12px; padding: 11px 2px; border-bottom: 1px solid var(--hairline);
  transition: background var(--dur-fast), padding-left var(--dur-base) var(--ease-standard);
}
.cost-row:last-child { border-bottom: 0; }
.cost-row:hover { background: linear-gradient(90deg, color-mix(in srgb, var(--ac) 7%, transparent), transparent 74%); padding-left: 8px; }
.cost-row-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cost-name { font-size: 13px; font-weight: 600; color: var(--color-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cost-desc { font-size: 11px; color: var(--color-text-subtle); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cost-track { height: 6px; border-radius: 4px; background: var(--color-surface-2); overflow: hidden; }
.cost-track i { display: block; height: 100%; width: var(--w); border-radius: 4px; background: linear-gradient(90deg, color-mix(in srgb, var(--ac) 42%, transparent), var(--ac)); animation: ar-bar 700ms var(--ease-out) both; animation-delay: calc(var(--i) * 50ms); }
.cost-amt { font-family: var(--font-mono); font-size: 12.5px; text-align: right; color: var(--color-primary); font-variant-numeric: tabular-nums; }
.cost-acts { display: flex; gap: 5px; justify-content: flex-end; opacity: 0; transition: opacity var(--dur-base); }
.cost-row:hover .cost-acts, .cost-row:focus-within .cost-acts { opacity: 1; }

/* ==================================================================
   CONSUMOS — cinta del día + ranking
   ================================================================== */
.cons-split { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: start; }
.tape {
  position: relative; padding: 6px 20px 24px; border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: var(--color-surface); border: 1px solid var(--hairline); border-bottom: 0;
}
.tape-row {
  display: grid; grid-template-columns: 44px 16px minmax(0,1fr) 110px 110px 70px;
  align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px dashed var(--hairline);
  transition: background var(--dur-fast);
}
.tape-row:hover { background: color-mix(in srgb, var(--c-cyan) 5%, transparent); }
.tape-time { font-family: var(--font-mono); font-size: 11px; color: var(--color-text-subtle); }
.tape-line { display: flex; justify-content: center; }
.tape-line i { width: 7px; height: 7px; border-radius: 50%; background: var(--c-cyan); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-cyan) 14%, transparent); }
.tape-main { min-width: 0; }
.tape-prod { display: block; font-size: 13px; font-weight: 600; color: var(--color-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tape-qty { font-family: var(--font-mono); font-size: 11px; color: var(--c-cyan); margin-left: 7px; }
.tape-who { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 2px; font-size: 10.5px; color: var(--color-text-muted); }
.tape-who .ico { width: 11px; height: 11px; opacity: .7; }
.tape-bed, .tape-guest { display: inline-flex; align-items: center; gap: 4px; }
.tape-amt { font-family: var(--font-mono); font-size: 13px; text-align: right; color: var(--color-primary); font-variant-numeric: tabular-nums; }
.tape-run { font-family: var(--font-mono); font-size: 11px; text-align: right; color: var(--color-text-subtle); font-variant-numeric: tabular-nums; }
.tape-acts { display: flex; gap: 5px; justify-content: flex-end; opacity: 0; transition: opacity var(--dur-base); }
.tape-row:hover .tape-acts, .tape-row:focus-within .tape-acts { opacity: 1; }
.tape-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 15px 0 4px; border-top: 2px solid var(--color-primary); margin-top: 6px; }
.tape-total span { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--color-text-muted); }
.tape-total b { font-family: var(--font-mono); font-size: 20px; color: var(--color-primary); font-variant-numeric: tabular-nums; }
.tape-tear {
  position: absolute; left: -1px; right: -1px; bottom: -9px; height: 10px;
  background: radial-gradient(circle at 6px 0, transparent 0 6px, var(--color-surface) 6px) repeat-x 0 0/12px 10px;
  filter: drop-shadow(0 1px 0 var(--hairline));
}
.cons-rank { background: var(--color-surface); border: 1px solid var(--hairline); border-radius: var(--radius-lg); padding: 18px 20px; }
.rank-list { display: flex; flex-direction: column; }
.rank-row { display: grid; grid-template-columns: 26px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--hairline); }
.rank-row:last-child { border-bottom: 0; }
.rank-pos { font-family: var(--font-mono); font-size: 11px; color: var(--color-text-subtle); }
.rank-main { min-width: 0; }
.rank-name { display: block; font-size: 12.5px; font-weight: 600; color: var(--color-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 6px; }
.rank-track { display: block; height: 6px; border-radius: 4px; background: var(--color-surface-2); overflow: hidden; }
.rank-track i { display: block; height: 100%; width: var(--w); border-radius: 4px; background: linear-gradient(90deg, rgba(8,145,178,.45), var(--c-cyan)); animation: ar-bar 700ms var(--ease-out) both; animation-delay: calc(var(--i) * 55ms); }
.rank-val { text-align: right; white-space: nowrap; }
.rank-val b { display: block; font-family: var(--font-mono); font-size: 12.5px; color: var(--color-primary); font-variant-numeric: tabular-nums; }
.rank-val span { font-size: 10.5px; color: var(--color-text-subtle); }

/* ==================================================================
   INVENTARIO — góndola
   ================================================================== */
.stock-health {
  display: flex; align-items: center; gap: 30px; flex-wrap: wrap;
  background: var(--color-surface); border: 1px solid var(--hairline);
  border-radius: var(--radius-lg); padding: 22px 26px;
}
.stock-health-dial { position: relative; display: grid; place-items: center; color: var(--c-violet); }
.stock-health-dial .ops-dial-tick.on { color: var(--c-violet); }
.stock-health-core { position: absolute; text-align: center; }
.stock-health-core b { display: block; font-family: var(--font-mono); font-size: 22px; color: var(--color-primary); line-height: 1; }
.stock-health-core b small { font-size: 11px; color: var(--color-text-subtle); }
.stock-health-core span { font-size: 9.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--color-text-subtle); }
.stock-health-legend { flex: 1; min-width: 260px; }
.stock-keys { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0 12px; }
.stock-key { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--color-text-muted); padding: 6px 12px; border-radius: var(--radius-pill); background: var(--color-surface-2); border: 1px solid var(--hairline); }
.stock-key .ico { width: 12px; height: 12px; }
.stock-key b { font-family: var(--font-mono); color: var(--color-primary); }
.stock-key.ok  .ico { color: var(--color-green); }
.stock-key.low .ico { color: var(--c-amber); }
.stock-key.out .ico { color: var(--color-danger); }
.stock-key.untracked .ico { color: var(--color-text-subtle); }
.stock-health .ops-para { margin-bottom: 0; }

.shelves { display: flex; flex-direction: column; gap: 22px; }
.shelf { position: relative; }
.shelf-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.shelf-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--c-violet-soft); color: var(--c-violet); }
.shelf-ico .ico { width: 15px; height: 15px; }
.shelf-head h3 { font-family: var(--font-display); font-weight: 800; font-size: 14.5px; color: var(--color-primary); letter-spacing: -.01em; }
.shelf-count { font-family: var(--font-mono); font-size: 11px; color: var(--color-text-subtle); }
.shelf-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); gap: 12px; }
.shelf-plank { display: block; height: 5px; margin-top: 12px; border-radius: 3px; background: linear-gradient(180deg, var(--hairline-strong), transparent); }

.stock-item {
  position: relative; display: flex; gap: 12px; cursor: pointer; overflow: hidden;
  padding: 14px 14px 14px 12px; border-radius: var(--radius-md);
  background: var(--color-surface); border: 1px solid var(--hairline);
  box-shadow: var(--shadow-raised-0);
  transition: transform var(--dur-base) var(--ease-standard), box-shadow var(--dur-base), border-color var(--dur-base);
}
.stock-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-elevated); border-color: color-mix(in srgb, var(--c-violet) 32%, var(--hairline)); }
.stock-gauge { position: relative; width: 9px; flex-shrink: 0; border-radius: 5px; background: var(--color-surface-2); overflow: hidden; }
.stock-gauge i { position: absolute; left: 0; right: 0; bottom: 0; height: var(--h); border-radius: 5px; background: linear-gradient(180deg, #a78bfa, var(--c-violet)); transform-origin: bottom; animation: ops-rise 600ms var(--ease-out) both; }
.stock-gauge u { position: absolute; left: -2px; right: -2px; bottom: var(--m); height: 2px; background: var(--c-amber); text-decoration: none; }
.stock-item.low .stock-gauge i { background: linear-gradient(180deg, #fbbf24, var(--c-amber)); animation: ops-rise 600ms var(--ease-out) both, ar-breathe 2.2s var(--ease-standard) 700ms infinite; }
.stock-item.out .stock-gauge i { background: var(--color-danger); }
.stock-item.untracked .stock-gauge { background: repeating-linear-gradient(135deg, var(--color-surface-2) 0 4px, transparent 4px 8px); }
.stock-body { min-width: 0; flex: 1; }
.stock-body h4 { font-size: 13px; font-weight: 700; color: var(--color-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stock-body p { font-size: 11px; color: var(--color-text-subtle); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stock-nums { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 9px; }
.stock-qty { font-family: var(--font-mono); font-size: 17px; color: var(--color-primary); font-variant-numeric: tabular-nums; }
.stock-qty small { font-size: 10px; color: var(--color-text-subtle); margin-left: 3px; }
.stock-price { font-family: var(--font-mono); font-size: 12px; color: var(--c-violet); }
.stock-flag { display: inline-flex; align-items: center; gap: 5px; margin-top: 9px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; padding: 3px 9px; border-radius: var(--radius-pill); }
.stock-flag .ico { width: 11px; height: 11px; }
.stock-flag.low { background: var(--c-amber-soft); color: var(--c-amber); }
.stock-flag.out { background: var(--color-danger-light); color: var(--color-danger); }
.stock-del { position: absolute; right: 10px; top: 10px; opacity: 0; transition: opacity var(--dur-base); }
.stock-item:hover .stock-del { opacity: 1; }

/* ==================================================================
   TAREAS — parte de trabajo
   ================================================================== */
.op-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.op-col { background: var(--color-surface); border: 1px solid var(--hairline); border-radius: var(--radius-lg); overflow: hidden; }
.op-col-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--hairline); background: linear-gradient(180deg, color-mix(in srgb, var(--sc) 8%, var(--color-surface)), var(--color-surface)); }
.op-col-dial { position: relative; display: grid; place-items: center; color: var(--sc); }
.op-col-dial .ops-dial-tick.on { color: var(--sc); }
.op-col-dial i { position: absolute; display: grid; place-items: center; color: var(--sc); }
.op-col-dial i .ico { width: 14px; height: 14px; }
.op-col-id { display: flex; flex-direction: column; min-width: 0; }
.op-col-name { font-family: var(--font-display); font-weight: 800; font-size: 14px; color: var(--color-primary); letter-spacing: -.01em; }
.op-col-sub { font-size: 10.5px; color: var(--color-text-subtle); }
.op-col-n { margin-left: auto; font-family: var(--font-mono); font-size: 16px; color: var(--sc); font-variant-numeric: tabular-nums; }
.op-col-body { display: flex; flex-direction: column; gap: 10px; padding: 13px; min-height: 110px; }
.op-col-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 24px 12px; border: 1.5px dashed var(--hairline-strong); border-radius: var(--radius-md); font-size: 11.5px; color: var(--color-text-subtle); }
.op-col-empty .ico { width: 16px; height: 16px; opacity: .55; }
.op-col-more { text-align: center; font-size: 10.5px; color: var(--color-text-subtle); padding: 4px; }

.op-task {
  position: relative; overflow: hidden; cursor: pointer; padding: 13px 14px 12px 18px;
  border-radius: var(--radius-md); background: var(--color-surface); border: 1px solid var(--hairline);
  box-shadow: var(--shadow-raised-0);
  transition: transform var(--dur-base) var(--ease-standard), box-shadow var(--dur-base), border-color var(--dur-base);
}
.op-task:hover { transform: translateY(-2px); box-shadow: var(--shadow-elevated); }
.op-task-spine { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.op-task.prio-alta  .op-task-spine { background: linear-gradient(180deg, var(--color-danger), #fb7185); }
.op-task.prio-media .op-task-spine { background: linear-gradient(180deg, var(--c-amber), #fbbf24); }
.op-task.prio-baja  .op-task-spine { background: linear-gradient(180deg, var(--color-green), #34d399); }
.op-task.done { opacity: .62; }
.op-task.done .op-task-title { text-decoration: line-through; text-decoration-color: var(--hairline-strong); }
.op-task.done:hover { opacity: 1; }
.op-task-top { display: flex; align-items: flex-start; gap: 10px; }
.op-task-title { font-size: 13px; font-weight: 700; color: var(--color-primary); line-height: 1.35; flex: 1; }
.op-task-next {
  width: 26px; height: 26px; flex-shrink: 0; display: grid; place-items: center; cursor: pointer;
  border-radius: 50%; border: 1px solid var(--hairline); background: var(--color-surface);
  color: var(--color-text-muted); opacity: 0;
  transition: opacity var(--dur-base), color var(--dur-base), border-color var(--dur-base), transform var(--dur-base) var(--ease-spring);
}
.op-task-next .ico { width: 13px; height: 13px; }
.op-task:hover .op-task-next { opacity: 1; }
.op-task-next:hover { color: var(--color-green); border-color: var(--color-green); transform: translateX(2px); }
.op-task-desc { font-size: 11.5px; color: var(--color-text-muted); line-height: 1.5; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.op-task-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 10px; }
.op-prio { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; padding: 3px 8px; border-radius: var(--radius-pill); }
.op-task.prio-alta  .op-prio { background: var(--color-danger-light); color: var(--color-danger); }
.op-task.prio-media .op-prio { background: var(--c-amber-soft); color: var(--c-amber); }
.op-task.prio-baja  .op-prio { background: var(--color-green-light); color: var(--color-green); }
.op-area { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--color-text-muted); }
.op-area .ico { width: 12px; height: 12px; opacity: .7; }
.op-due { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--color-text-muted); }
.op-due .ico { width: 12px; height: 12px; opacity: .7; }
.op-due.over { color: var(--color-danger); font-weight: 700; }
.op-due.today { color: var(--c-amber); font-weight: 700; }
.op-who { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; font-size: 10.5px; color: var(--color-text-muted); }
.op-who-av { width: 20px; height: 20px; font-size: 8.5px; }

/* ==================================================================
   EMERGENCIAS — panel de acceso rápido
   ================================================================== */
.emer-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; align-items: start; }
.emer-group { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--hairline); background: var(--color-surface); border-top: 3px solid var(--ec); }
.emer-group-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: color-mix(in srgb, var(--ec) 7%, var(--color-surface)); border-bottom: 1px solid var(--hairline); }
.emer-group-ico { position: relative; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--ec) 15%, transparent); color: var(--ec); }
.emer-group-ico .ico { width: 17px; height: 17px; position: relative; z-index: 1; }
.emer-ping { position: absolute; inset: 0; border-radius: 10px; border: 1.5px solid var(--ec); animation: ops-ping 2.6s var(--ease-out) infinite; }
.emer-group-head h3 { font-family: var(--font-display); font-weight: 800; font-size: 14.5px; color: var(--color-primary); letter-spacing: -.01em; }
.emer-group-n { margin-left: auto; font-family: var(--font-mono); font-size: 12px; color: var(--ec); }
.emer-cards { display: flex; flex-direction: column; }
.emer-card { display: flex; align-items: center; gap: 16px; padding: 15px 18px; border-bottom: 1px solid var(--hairline); transition: background var(--dur-fast); }
.emer-card:last-child { border-bottom: 0; }
.emer-card:hover { background: color-mix(in srgb, var(--ec) 5%, transparent); }
.emer-card-main { min-width: 0; flex: 1; }
.emer-card-main h4 { font-size: 13px; font-weight: 700; color: var(--color-primary); }
.emer-phone {
  display: inline-block; margin-top: 4px; font-family: var(--font-mono); font-size: 19px;
  letter-spacing: .01em; color: var(--ec); text-decoration: none; font-variant-numeric: tabular-nums;
  transition: opacity var(--dur-base);
}
.emer-phone:hover { opacity: .75; }
.emer-notes { font-size: 11px; color: var(--color-text-muted); margin-top: 5px; line-height: 1.45; }
.emer-card-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.emer-call {
  display: inline-flex; align-items: center; gap: 7px; text-decoration: none; white-space: nowrap;
  font-size: 12px; font-weight: 800; color: #fff; padding: 9px 16px; border-radius: var(--radius-pill);
  background: var(--ec); box-shadow: 0 6px 18px color-mix(in srgb, var(--ec) 32%, transparent);
  transition: transform var(--dur-base) var(--ease-standard), box-shadow var(--dur-base), filter var(--dur-base);
}
.emer-call:hover { transform: translateY(-2px); filter: brightness(1.08); box-shadow: 0 10px 24px color-mix(in srgb, var(--ec) 42%, transparent); }
.emer-call .ico { width: 14px; height: 14px; }
.emer-acts { display: flex; gap: 5px; opacity: 0; transition: opacity var(--dur-base); }
.emer-card:hover .emer-acts, .emer-card:focus-within .emer-acts { opacity: 1; }

/* ==================================================================
   CANALES — mapa de conexiones
   ================================================================== */
.ota-conflicts { border-radius: var(--radius-lg); border: 1px solid rgba(224,54,47,.3); border-left: 4px solid var(--color-danger); background: linear-gradient(100deg, var(--color-danger-light), var(--color-surface) 62%); padding: 18px 22px; }
.ota-conflicts-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.ota-conflicts-ico { width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; background: rgba(224,54,47,.14); color: var(--color-danger); }
.ota-conflicts-ico .ico { width: 18px; height: 18px; }
.ota-conflicts-head h3 { font-family: var(--font-display); font-weight: 800; font-size: 15px; color: var(--color-danger); }
.ota-conflicts-head p { font-size: 12px; color: var(--color-text-muted); margin-top: 4px; line-height: 1.5; max-width: 70ch; }
.ota-conflict-list { display: flex; flex-direction: column; gap: 8px; }
.ota-conflict { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--color-surface); border: 1px solid var(--hairline); }
.ota-conflict-main b { font-size: 13px; color: var(--color-primary); }
.ota-conflict-main span { display: block; font-size: 11px; color: var(--color-text-muted); margin-top: 2px; }
.ota-conflict-acts { display: flex; gap: 7px; }

.ota-flow { background: var(--color-surface); border: 1px solid var(--hairline); border-radius: var(--radius-lg); padding: 20px 24px; }
.ota-flow-sync { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--color-text-muted); }
.ota-flow-sync .ico { width: 13px; height: 13px; }
.flow-map { display: grid; grid-template-columns: minmax(120px,1fr) 90px auto 90px minmax(120px,1fr); align-items: center; gap: 6px; }
.flow-col { display: flex; flex-direction: column; gap: 8px; }
.flow-node {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--radius-sm);
  font-size: 11.5px; font-weight: 700; color: var(--color-text-secondary);
  background: var(--color-surface); border: 1px solid var(--hairline);
  animation: ar-fade-up var(--dur-slow) var(--ease-out) both; animation-delay: calc(var(--i) * 80ms);
}
.flow-node .ico { width: 14px; height: 14px; color: var(--fc); }
.flow-node.on { border-color: color-mix(in srgb, var(--fc) 40%, transparent); background: color-mix(in srgb, var(--fc) 6%, var(--color-surface)); }
.flow-node.err { border-color: rgba(224,54,47,.4); background: var(--color-danger-light); }
.flow-node span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flow-more { font-size: 10.5px; color: var(--color-text-subtle); padding-left: 12px; }
.flow-wires svg { width: 100%; height: 130px; }
.flow-wire { fill: none; stroke: var(--hairline-strong); stroke-width: 1.6; stroke-dasharray: 5 7; animation: ops-dash 6s linear infinite; }
.flow-wire.strong { stroke: var(--c-lime); stroke-width: 2.2; }
.flow-hub {
  display: flex; flex-direction: column; align-items: center; gap: 3px; position: relative;
  padding: 18px 22px; border-radius: var(--radius-md); color: #fff; text-align: center;
  background: linear-gradient(150deg, #0e2148, #1d4ed8);
  box-shadow: 0 12px 30px rgba(14,33,72,.26);
}
.flow-hub .ico { width: 20px; height: 20px; }
.flow-hub b { font-family: var(--font-display); font-size: 14px; letter-spacing: -.01em; }
.flow-hub span { font-size: 9.5px; text-transform: uppercase; letter-spacing: .09em; opacity: .65; }
.flow-hub-ring { position: absolute; inset: -6px; border-radius: calc(var(--radius-md) + 6px); border: 1px dashed rgba(124,192,247,.45); animation: ops-ping 3.2s var(--ease-out) infinite; }
.flow-pms {
  display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center;
  padding: 18px 16px; border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--c-lime) 8%, var(--color-surface)); border: 1px solid color-mix(in srgb, var(--c-lime) 30%, transparent);
}
.flow-pms .ico { width: 20px; height: 20px; color: var(--c-lime); }
.flow-pms b { font-family: var(--font-display); font-size: 14px; color: var(--color-primary); }
.flow-pms span { font-size: 10px; color: var(--color-text-muted); }

.ota-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; align-items: start; }
.ota-card {
  border-radius: var(--radius-lg); background: var(--color-surface); border: 1px solid var(--hairline);
  padding: 18px 20px 14px; box-shadow: var(--shadow-raised-0);
  transition: box-shadow var(--dur-base), transform var(--dur-base) var(--ease-standard), border-color var(--dur-base);
}
.ota-card:hover { box-shadow: var(--shadow-raised); transform: translateY(-2px); border-color: color-mix(in srgb, var(--oc) 30%, var(--hairline)); }
.ota-card-head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--hairline); }
.ota-logo { width: 38px; height: 38px; flex-shrink: 0; border-radius: 11px; display: grid; place-items: center; background: color-mix(in srgb, var(--oc) 12%, transparent); color: var(--oc); }
.ota-logo .ico { width: 19px; height: 19px; }
.ota-id { min-width: 0; flex: 1; }
.ota-id h3 { font-family: var(--font-display); font-weight: 800; font-size: 15px; color: var(--color-primary); letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ota-mode { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--color-text-muted); margin-top: 2px; }
.ota-mode .ico { width: 11px; height: 11px; color: var(--c-amber); }
.ota-led { display: inline-flex; align-items: center; gap: 7px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; white-space: nowrap; }
.ota-led i { width: 8px; height: 8px; border-radius: 50%; }
.ota-card.on   .ota-led { color: var(--color-green); }
.ota-card.on   .ota-led i { background: currentColor; color: var(--color-green); animation: ops-led 2.2s var(--ease-standard) infinite; }
.ota-card.err  .ota-led { color: var(--color-danger); }
.ota-card.err  .ota-led i { background: currentColor; color: var(--color-danger); animation: ops-led 1.2s var(--ease-standard) infinite; }
.ota-card.idle .ota-led { color: var(--color-text-subtle); }
.ota-card.idle .ota-led i { background: currentColor; }
.ota-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 14px 0; }
.ota-fact { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ota-fact-lbl { font-size: 9.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--color-text-subtle); }
.ota-fact-val { font-size: 12px; color: var(--color-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ota-fact-val.mono { font-family: var(--font-mono); font-size: 11px; }
.ota-fact-val.bad { color: var(--color-danger); font-weight: 700; }
.ota-acts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding-top: 12px; border-top: 1px solid var(--hairline); }
.ota-acts .ops-btn { padding: 7px 11px; font-size: 11px; }
.ota-acts .ops-icon-btn:last-child { margin-left: auto; }

.synclog { display: flex; flex-direction: column; }
.synclog-row { display: grid; grid-template-columns: 30px 62px minmax(0,1fr); align-items: flex-start; gap: 12px; padding: 12px 4px; }
.synclog-rail { position: relative; display: flex; justify-content: center; align-self: stretch; }
.synclog-rail::before { content: ''; position: absolute; top: 0; bottom: -12px; width: 1px; background: var(--hairline); }
.synclog-row:last-child .synclog-rail::before { display: none; }
.synclog-rail i { position: relative; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--lc) 13%, var(--color-surface)); color: var(--lc); border: 1px solid color-mix(in srgb, var(--lc) 28%, transparent); }
.synclog-rail i .ico { width: 12px; height: 12px; }
.synclog-when { display: flex; flex-direction: column; }
.synclog-when b { font-family: var(--font-mono); font-size: 12px; color: var(--color-primary); }
.synclog-when span { font-family: var(--font-mono); font-size: 10px; color: var(--color-text-subtle); }
.synclog-main { min-width: 0; }
.synclog-action { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--color-primary); }
.synclog-lvl { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--lc); padding: 2px 7px; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--lc) 12%, transparent); }
.synclog-msg { display: block; font-size: 11.5px; color: var(--color-text-muted); margin-top: 3px; line-height: 1.5; word-break: break-word; }

/* ==================================================================
   CONVERSOR — mesa de cambio
   ================================================================== */
.fx-desk { display: grid; grid-template-columns: minmax(300px, 420px) 1fr; gap: 20px; align-items: start; }
.fx-machine {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  background: var(--color-surface); border: 1px solid var(--hairline); padding: 22px 24px 24px;
  box-shadow: var(--shadow-sm); --ops: var(--c-cyan);
}
.fx-machine-in { position: relative; z-index: 1; }
.fx-side { margin-top: 14px; }
.fx-side.out { margin-top: 10px; }
.fx-side-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.fx-side-head > span { font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--color-text-subtle); }
.fx-cur { min-width: 96px; }
.fx-amount {
  width: 100%; border: 0; border-bottom: 2px solid var(--hairline-strong); background: transparent;
  font-family: var(--font-mono); font-size: clamp(1.5rem, 3.4vw, 2.1rem); color: var(--color-primary);
  padding: 6px 2px; outline: none; font-variant-numeric: tabular-nums;
  transition: border-color var(--dur-base);
}
.fx-amount:focus { border-bottom-color: var(--c-cyan); }
.fx-side.out .fx-amount { color: var(--c-cyan); border-bottom-style: dashed; }
.fx-swap {
  display: grid; place-items: center; width: 40px; height: 40px; margin: 14px auto 4px; cursor: pointer;
  border-radius: 50%; background: var(--color-surface); border: 1px solid var(--hairline-strong);
  color: var(--color-text-muted);
  transition: color var(--dur-base), border-color var(--dur-base), transform var(--dur-base) var(--ease-spring);
}
.fx-swap:hover { color: var(--c-cyan); border-color: var(--c-cyan); }
.fx-swap .ico { width: 17px; height: 17px; }
.fx-swap.spin .ico { animation: ar-orbit 500ms var(--ease-standard); }
.fx-detail { margin-top: 14px; font-size: 11px; color: var(--color-text-muted); font-family: var(--font-mono); min-height: 16px; }

.fx-rates { }
.fx-updated { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--color-text-muted); font-family: var(--font-mono); }
.fx-updated .ico { width: 13px; height: 13px; }
.fx-rate-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.fx-rate {
  position: relative; overflow: hidden; border-radius: var(--radius-md); padding: 15px 16px 12px;
  background: var(--color-surface); border: 1px solid var(--hairline);
  animation: ar-fade-up var(--dur-slow) var(--ease-out) both; animation-delay: calc(var(--i) * 70ms);
  transition: box-shadow var(--dur-base), transform var(--dur-base) var(--ease-standard);
}
.fx-rate:hover { box-shadow: var(--shadow-raised); transform: translateY(-2px); }
.fx-rate-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fx-rate-cur { font-family: var(--font-display); font-weight: 800; font-size: 17px; color: var(--fx); letter-spacing: .01em; }
.fx-rate-spread { font-family: var(--font-mono); font-size: 10.5px; color: var(--color-text-subtle); }
.fx-rate-legs { display: flex; gap: 16px; margin-top: 10px; }
.fx-leg { display: flex; flex-direction: column; gap: 2px; }
.fx-leg-lbl { font-size: 9.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--color-text-subtle); }
.fx-leg-val { font-family: var(--font-mono); font-size: 13px; color: var(--color-text-secondary); font-variant-numeric: tabular-nums; }
.fx-leg.strong .fx-leg-val { color: var(--color-primary); font-size: 15px; }
.fx-rate-bar { height: 3px; border-radius: 2px; background: var(--color-surface-2); margin-top: 12px; overflow: hidden; }
.fx-rate-bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, color-mix(in srgb, var(--fx) 30%, transparent), var(--fx)); transform-origin: left; animation: ar-bar-x 800ms var(--ease-out) both; }

/* ==================================================================
   MODALES DE ADMINISTRACIÓN (alias del encabezado con icono)
   ================================================================== */
.ar-modal-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
.ar-modal-head h3 { margin: 0 0 4px; }
.ar-modal-ico { width: 42px; height: 42px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--mc) 13%, transparent); color: var(--mc); }
.ar-modal-ico .ico { width: 20px; height: 20px; }
.ar-modal-sub { font-size: 12.5px; color: var(--color-text-muted); line-height: 1.5; max-width: 52ch; }
#section-admin .nbtn, #section-admin .mb { display: inline-flex; align-items: center; gap: 8px; }
#section-admin .nbtn { padding: 10px 20px; font-size: 12.5px; font-weight: 700; }
#section-admin .nbtn .ico { width: 15px; height: 15px; }

/* ==================================================================
   RESPONSIVE — administración
   ================================================================== */
@media (max-width: 1180px) {
  .ops-bar-in { grid-template-columns: 1fr auto; }
  .ops-actions { grid-column: 1 / -1; justify-self: start; }
  .fx-desk { grid-template-columns: 1fr; }
  .cons-split { grid-template-columns: 1fr; }
  .cost-areas { grid-template-columns: 1fr; }
  .vault-in { grid-template-columns: 1fr; gap: 26px; }
  .vault-pulse { min-width: 0; }
  .chacc { grid-template-columns: 1fr; }
  .chacc-art { display: none; }
  .flow-map { grid-template-columns: 1fr; gap: 14px; justify-items: center; }
  .flow-col { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .flow-wires svg { height: 44px; }
  .flow-wires { width: 100%; }
  .flow-wire { d: none; }
  .op-board { grid-template-columns: 1fr 1fr; }
  .op-board .op-col:last-child { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .ops-bar-in { grid-template-columns: 1fr; gap: 18px; padding: 18px 20px 20px; }
  .ops-readouts { flex-wrap: wrap; row-gap: 14px; }
  .ops-readout { padding: 0 16px; }
  .ops-readout:nth-child(3n+1) { border-left: 0; padding-left: 0; }
  .caja-scale { grid-template-columns: 1fr; gap: 18px; justify-items: center; text-align: center; }
  .caja-scale-side, .caja-scale-side.out { align-items: center; text-align: center; }
  .caja-scale-side.out .caja-scale-track { justify-content: flex-start; }
  .ledger-row { grid-template-columns: 44px 26px minmax(0,1fr) 110px 30px; }
  .ledger-run { display: none; }
  .op-board { grid-template-columns: 1fr; }
  .op-board .op-col:last-child { grid-column: auto; }
  .tape-row { grid-template-columns: 40px 14px minmax(0,1fr) 100px 60px; }
  .tape-run { display: none; }
  .cost-row { grid-template-columns: minmax(0,1fr) 100px 60px; }
  .cost-row .cost-track { display: none; }

  .vault, .caja-desk { padding: 24px 20px; }
  .ops-week { grid-template-columns: repeat(7, 1fr); gap: 5px; }
  .ops-day-val { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ops-grid-sweep, .ops-es-pulse, .flow-wire, .emer-ping, .flow-hub-ring,
  .ota-led i, .stock-item.low .stock-gauge i { animation: none !important; }
}

/* Tarjeta bancaria v9.1: el pulso va en el flujo, no encima del saldo */
.bank-card-pulse { position: static; padding: 0; margin: 2px 0 -2px; opacity: .5; }
.bank-card:hover .bank-card-pulse { opacity: .9; }
.bank-card-bottom { align-items: flex-end; gap: 10px; }
.bank-card-num { white-space: nowrap; font-size: 10px; letter-spacing: .1em; }
.bank-card-label { white-space: nowrap; }
/* Cinta del proveedor: pestaña dentro de la tarjeta, no un rectángulo flotante */
.prov-tape { top: 0; height: 7px; width: 64px; border-radius: 0 0 4px 4px; transform: translateX(-50%); border-top: 0; }

/* ==================================================================
   ADMINISTRACIÓN v9.1 — segunda pasada
   Ajustes tras revisar las 10 pestañas en navegador: menos truncado,
   bloques que llenan su ancho y números que nunca parten en dos.
   ================================================================== */

/* Costos: el nombre del centro manda; la barra cede ancho */
.cost-row { grid-template-columns: minmax(0,1.6fr) minmax(56px,.8fr) 108px 62px; }
@media (min-width: 1400px){ .cost-areas { grid-template-columns: repeat(auto-fill, minmax(460px, 1fr)); } }

/* Emergencias: el número nunca se parte y el botón no se empuja */
.emer-card { flex-wrap: wrap; row-gap: 10px; }
.emer-card-main { flex: 1 1 190px; }
.emer-phone { white-space: nowrap; font-size: clamp(15px, 1.4vw, 19px); }
.emer-card-side { flex: 0 0 auto; margin-left: auto; align-items: flex-end; }

/* Canales: conflictos en dos columnas y el destino no se estira de más */
@media (min-width: 1180px){ .ota-conflict-list { display: grid; grid-template-columns: 1fr 1fr; } }
.flow-pms { max-width: 260px; justify-self: center; width: 100%; }
.flow-map { justify-items: stretch; }

/* Conversor: las cotizaciones ocupan el ancho disponible */
.fx-rate-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* Caja: el dial del neto, más fino y menos "sol" */
.caja-scale-mid .ops-dial-tick { stroke-width: 1.5; }
.caja-scale-mid .ops-dial-tick:not(.on) { opacity: .1; }
/* Registro de sincronización: la hora en una sola línea, alineada al hito */
.synclog-row { grid-template-columns: 30px 56px minmax(0,1fr); }
.synclog-when b, .synclog-when span { white-space: nowrap; }
.synclog-rail i { margin-top: 1px; }

/* Ruteo por canal en pantallas chicas: apilar de verdad (el grid de 2
   columnas encimaba el switch sobre el select) */
@media (max-width: 820px){
  .chacc-row { display: flex; flex-flow: row wrap; align-items: center; gap: 9px 10px; padding: 14px 4px; }
  .chacc-row > .chacc-dot { width: 9px; height: 9px; flex: 0 0 auto; }
  .chacc-name { flex: 1 1 auto; }
  .chacc-sel { flex: 1 1 100%; }
  .chacc-sel .arsel { width: 100%; max-width: none; }
  .chacc-auto, .chacc-hint { flex: 1 1 100%; }
}

/* ==================================================================
   PESTAÑAS DE ADMINISTRACIÓN — siempre en una sola línea
   Son 10 (el resto de las secciones tienen 4): si sobra ancho entran
   todas, y si falta la tira se desplaza en horizontal en vez de
   partirse y dejar "Conversor" colgando en un segundo renglón.
   ================================================================== */
#section-admin .admin-tabs {
  gap: clamp(9px, 1.35vw, 26px) !important;
  flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain;
  scrollbar-width: none; -ms-overflow-style: none;
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 26px), transparent 100%);
  mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 26px), transparent 100%);
}
#section-admin .admin-tabs::-webkit-scrollbar { display: none; }
#section-admin .atab { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 1500px){ #section-admin .atab { font-size: 13px !important; } }
@media (max-width: 1320px){
  #section-admin .atab { font-size: 12.5px !important; gap: 6px; }
  #section-admin .atab .ico { width: 15px; height: 15px; }
}

/* ==================================================================
   ANALYTICS v10 — "EL ALMANAQUE"
   ------------------------------------------------------------------
   Cuarto dialecto (DESIGN.md §6.2) y deliberadamente el opuesto de
   Marketing: papel claro, márgenes anchos, filetes finos, números
   grandes y tipográficos. El elemento firma es el ALMANAQUE —una
   grilla de días teñida por intensidad— y cada pestaña trae su motivo
   ilustrado propio (plata, camas, gente, productos, cables).
   Regla de aire: nada se toca. El respiro es parte de la lectura.
   ================================================================== */
@keyframes an-cell-in  { from { opacity: 0; transform: scale(.72); } }
@keyframes an-grow-w   { from { width: 0; } }
@keyframes an-grow-h   { from { height: 0; } }
@keyframes an-rise     { from { opacity: 0; transform: translateY(12px); } }
@keyframes an-draw     { from { stroke-dashoffset: 340; } }
@keyframes an-float-y  { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes an-cal-pulse{ 0%,100% { opacity:.25 } 50% { opacity:1 } }

#section-analytics { --ac: var(--c-teal); }
#section-analytics #analytics-content { padding-bottom: 56px; }
.an-page { display: flex; flex-direction: column; gap: 46px; }

/* ---------- Pestañas: mismo chrome que Administración ---------- */
#section-analytics .admin-tabs { flex-wrap: wrap; }
.antab {
  background: transparent !important; border: 0 !important; box-shadow: none !important;
  border-radius: 0 !important; padding: 10px 2px !important; margin: 0 !important; cursor: pointer;
  color: var(--color-text-muted) !important; font-weight: 600 !important; font-size: 13.5px !important;
  font-family: var(--font-body); position: relative; display: inline-flex; align-items: center; gap: 8px;
  transition: color var(--dur-base), transform var(--dur-base) var(--ease-standard);
}
.antab .ico { width: 17px; height: 17px; opacity: .8; transition: transform var(--dur-base) var(--ease-spring); }
.antab::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2.5px; border-radius: 3px 3px 0 0;
  background: var(--c-teal); transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur-base) var(--ease-out);
}
.antab:hover { color: var(--color-text-secondary) !important; transform: translateY(-1px); }
.antab:hover .ico { transform: translateY(-1px) scale(1.08); opacity: 1; }
.antab:hover::after { transform: scaleX(1); }
.antab.active { color: var(--color-primary) !important; font-weight: 800 !important; }
.antab.active .ico { opacity: 1; color: var(--c-teal); }
.antab.active::after { transform: scaleX(1); }

/* ---------- Carga ---------- */
.an-loading { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 90px 20px; color: var(--color-text-muted); font-size: 13px; }
.an-loading-cal { display: grid; grid-template-columns: repeat(3, 14px); gap: 5px; }
.an-loading-cal i { display: block; width: 14px; height: 14px; border-radius: 4px; background: var(--c-teal); opacity: .25; animation: an-cal-pulse 1.4s var(--ease-standard) infinite; animation-delay: calc(var(--i) * 110ms); }

/* ---------- Barra de período — legible ---------- */
.an-period {
  display: flex; flex-wrap: wrap; align-items: center; gap: 18px 26px;
  padding: 20px 24px; border-radius: var(--radius-lg);
  background: var(--color-surface); border: 1px solid var(--hairline); box-shadow: var(--shadow-xs);
}
.an-period-main { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 26px; flex: 1; min-width: 0; }
.an-period-when { min-width: 210px; }
.an-period-range { display: block; font-family: var(--font-display); font-weight: 800; font-size: 17px; letter-spacing: -.02em; color: var(--color-primary); }
.an-period-days { display: block; font-size: 12px; color: var(--color-text-muted); margin-top: 4px; line-height: 1.5; }
.an-period-picks { display: flex; gap: 4px; flex-wrap: wrap; padding: 4px; border-radius: var(--radius-pill); background: var(--color-surface-2); }
.an-pick {
  border: 0; cursor: pointer; background: transparent; font-family: var(--font-body); white-space: nowrap;
  font-size: 12px; font-weight: 700; color: var(--color-text-muted); padding: 8px 14px; border-radius: var(--radius-pill);
  transition: background var(--dur-base), color var(--dur-base);
}
.an-pick:hover { color: var(--color-primary); }
.an-pick.on { background: var(--color-surface); color: var(--c-teal); box-shadow: var(--shadow-xs); }
.an-period-custom { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; width: 100%; padding-top: 4px; }
.an-period-custom label { display: flex; flex-direction: column; gap: 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--color-text-subtle); }
.an-period-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-left: auto; }
.an-btn {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer; white-space: nowrap;
  font-family: var(--font-body); font-size: 12px; font-weight: 700; color: var(--color-text-secondary);
  padding: 9px 14px; border-radius: var(--radius-sm); background: var(--color-surface); border: 1px solid var(--hairline-strong);
  transition: color var(--dur-base), border-color var(--dur-base), transform var(--dur-base) var(--ease-standard);
}
.an-btn:hover { color: var(--ac); border-color: var(--ac); transform: translateY(-2px); }
.an-btn .ico { width: 14px; height: 14px; }
.an-btn.solid { background: var(--grad-brand); color: #fff; border-color: transparent; }
.an-btn.solid:hover { color: #fff; }
.an-toggle { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 12px; font-weight: 600; color: var(--color-text-secondary); user-select: none; }
.an-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.an-toggle-track { width: 36px; height: 20px; border-radius: 999px; background: var(--color-surface-2); border: 1px solid var(--hairline-strong); position: relative; flex-shrink: 0; transition: background var(--dur-base), border-color var(--dur-base); }
.an-toggle-track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--color-text-subtle); transition: transform var(--dur-base) var(--ease-spring), background var(--dur-base); }
.an-toggle input:checked + .an-toggle-track { background: color-mix(in srgb, var(--ac) 20%, transparent); border-color: var(--ac); }
.an-toggle input:checked + .an-toggle-track::after { transform: translateX(16px); background: var(--ac); }

/* ---------- Encabezado con motivo ilustrado ---------- */
.an-head { display: flex; align-items: center; gap: 30px; padding-bottom: 8px; }
.an-head-motif { flex: 0 0 auto; width: 132px; }
.an-motif { width: 100%; height: auto; overflow: visible; }
.an-motif .mv-fill { fill: color-mix(in srgb, var(--mc) 20%, transparent); stroke: var(--mc); stroke-width: 2; }
.an-motif .mv-soft { fill: color-mix(in srgb, var(--mc) 9%, transparent); stroke: color-mix(in srgb, var(--mc) 40%, transparent); stroke-width: 2; }
.an-motif .mv-line { fill: none; stroke: var(--mc); stroke-width: 2; stroke-linecap: round; opacity: .75; }
.an-motif .mv-line.dash { stroke-dasharray: 5 6; opacity: .5; }
.an-motif .mv-coin { fill: var(--mc); opacity: .9; }
.an-motif .mv-dot  { fill: var(--mc); opacity: .5; }
.an-motif .mv-area { fill: color-mix(in srgb, var(--mc) 14%, transparent); }
.an-motif .mv-stack, .an-motif .mv-crowd, .an-motif .mv-cal { animation: an-float-y 6s var(--ease-standard) infinite; }
.an-motif .mv-person { animation: an-float-y 5s var(--ease-standard) infinite; animation-delay: calc(var(--i) * 400ms); }
.an-motif .mv-item   { animation: an-float-y 5.6s var(--ease-standard) infinite; animation-delay: calc(var(--i) * 320ms); }
.an-motif .mv-bed.on rect { fill: color-mix(in srgb, var(--mc) 45%, transparent); }
.an-motif .mv-day { fill: color-mix(in srgb, var(--mc) 12%, transparent); }
.an-motif .mv-day.on { fill: var(--mc); opacity: .8; }
.an-motif .mv-line.draw { stroke-dasharray: 340; animation: an-draw 1.6s var(--ease-out) both; }
.an-head-txt { min-width: 0; }
.an-head-eyebrow { font-size: 10.5px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--ac); }
.an-head-title { font-family: var(--font-display); font-weight: 800; letter-spacing: -.03em; font-size: clamp(1.7rem, 3.4vw, 2.7rem); line-height: 1.02; color: var(--color-primary); margin: 10px 0 10px; }
.an-head-sub { font-size: 14.5px; line-height: 1.65; color: var(--color-text-muted); max-width: 72ch; }

/* ---------- Números grandes: el número ES el gráfico ---------- */
.an-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.an-big { padding: 26px 28px; border-left: 1px solid var(--hairline); grid-column: span var(--span, 1); animation: an-rise var(--dur-slow) var(--ease-out) both; }
.an-big:first-child { border-left: 0; padding-left: 0; }
.an-big-lbl { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--color-text-subtle); }
.an-big-val { display: block; margin-top: 12px; font-family: var(--font-display); font-weight: 800; letter-spacing: -.035em; font-size: clamp(1.7rem, 3.1vw, 2.6rem); line-height: 1; color: var(--color-primary); font-variant-numeric: tabular-nums; }
.an-big-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.an-big-foot em { font-style: normal; font-size: 12px; color: var(--color-text-muted); line-height: 1.45; }
.an-big.tone-green  .an-big-val { color: var(--color-green); }
.an-big.tone-indigo .an-big-val { color: var(--c-indigo); }
.an-big.tone-violet .an-big-val { color: var(--c-violet); }
.an-big.tone-amber  .an-big-val { color: var(--c-amber); }
.an-big.tone-cyan   .an-big-val { color: var(--c-cyan); }
.an-big.tone-rose   .an-big-val { color: var(--c-rose); }
.an-delta { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: var(--radius-pill); white-space: nowrap; }
.an-delta.up   { color: var(--color-green);  background: var(--color-green-light); }
.an-delta.down { color: var(--color-danger); background: var(--color-danger-light); }
.an-delta.flat { color: var(--color-text-muted); background: var(--color-surface-2); }

/* ---------- Grilla de tarjetas — con aire ---------- */
.an-grid { display: grid; gap: 26px; align-items: start; }
.an-grid.two   { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); }
.an-grid.three { grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }
.an-card {
  background: var(--color-surface); border: 1px solid var(--hairline); border-radius: var(--radius-lg);
  padding: 26px 28px 24px; box-shadow: var(--shadow-elevated-0);
  transition: box-shadow var(--dur-base), border-color var(--dur-base);
}
.an-card:hover { box-shadow: var(--shadow-raised); }
.an-card.wide { grid-column: 1 / -1; }
.an-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.an-card-id { display: flex; align-items: flex-start; gap: 13px; min-width: 0; }
.an-card-ico { width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--ac) 12%, transparent); color: var(--ac); }
.an-card-ico .ico { width: 17px; height: 17px; }
.an-card-head h3 { font-family: var(--font-display); font-weight: 800; font-size: 16px; letter-spacing: -.02em; color: var(--color-primary); line-height: 1.25; }
.an-card-head p { font-size: 12.5px; line-height: 1.5; color: var(--color-text-muted); margin-top: 5px; max-width: 56ch; }
.an-card-body { min-width: 0; }
.an-card-body .an-stats { border: 0; }
.an-card-body .an-big { padding: 0 22px; }
.an-card-body .an-big:first-child { padding-left: 0; }
.an-card-body .an-big-val { font-size: clamp(1.4rem, 2.2vw, 1.8rem); }
.an-card-note { display: flex; align-items: flex-start; gap: 10px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--hairline); font-size: 13px; line-height: 1.6; color: var(--color-text-secondary); }
.an-card-note .ico { width: 15px; height: 15px; color: var(--ac); flex-shrink: 0; margin-top: 2px; }
.an-prose { font-size: 13.5px; line-height: 1.7; color: var(--color-text-secondary); }
.an-prose + .an-prose { margin-top: 12px; }
.an-void { font-size: 13px; color: var(--color-text-subtle); font-style: italic; padding: 18px 0; }
.an-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 40px 20px; color: var(--color-text-muted); }
.an-empty .ico { width: 26px; height: 26px; opacity: .4; margin-bottom: 4px; }
.an-empty b { font-family: var(--font-display); font-size: 15px; color: var(--color-primary); }
.an-empty span { font-size: 12.5px; max-width: 46ch; line-height: 1.55; }
.an-empty.big { padding: 90px 20px; }

/* ---------- EL ALMANAQUE ---------- */
.an-almanac { margin: 0; }
.an-almanac-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.an-almanac-title { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--color-text-subtle); }
.an-almanac-legend { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--color-text-subtle); }
.an-almanac-legend i { width: 13px; height: 13px; border-radius: 3px; background: color-mix(in srgb, var(--al) calc(var(--t) * 82%), var(--color-surface-2)); }
.an-almanac-dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 7px; }
.an-almanac-dow span { text-align: center; font-size: 10px; font-weight: 800; color: var(--color-text-subtle); }
.an-almanac-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.an-cell {
  position: relative; aspect-ratio: 1; border-radius: 7px; display: grid; place-items: center; cursor: help;
  background: color-mix(in srgb, var(--al) calc(var(--t) * 84%), var(--color-surface-2));
  animation: an-cell-in 380ms var(--ease-out) both; animation-delay: calc(var(--i) * 7ms);
  transition: transform var(--dur-base) var(--ease-spring), box-shadow var(--dur-base);
}
.an-cell b { font-size: 10.5px; font-weight: 700; color: color-mix(in srgb, var(--color-primary) calc(100% - var(--t) * 62%), #fff); font-variant-numeric: tabular-nums; }
.an-cell:hover { transform: scale(1.14); box-shadow: 0 6px 16px rgba(14,33,72,.18); z-index: 2; }
.an-cell.zero { background: var(--color-surface-2); box-shadow: inset 0 0 0 1px var(--hairline); }
.an-cell.empty { background: none; cursor: default; }
.an-almanac-months { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; font-size: 10.5px; font-weight: 700; color: var(--color-text-subtle); text-transform: uppercase; letter-spacing: .08em; }

/* ---------- Ranking ---------- */
.an-rank { display: flex; flex-direction: column; }
.an-rank-row {
  display: grid; grid-template-columns: 22px minmax(84px,1.1fr) minmax(70px,1.5fr) 108px 52px;
  align-items: center; gap: 14px; padding: 12px 2px; border-bottom: 1px solid var(--hairline);
  transition: background var(--dur-fast), padding-left var(--dur-base) var(--ease-standard);
}
.an-rank-row:last-child { border-bottom: 0; }
.an-rank-row:hover { background: linear-gradient(90deg, color-mix(in srgb, var(--rk) 8%, transparent), transparent 76%); padding-left: 8px; }
.an-rank-pos { font-family: var(--font-mono); font-size: 11px; color: var(--color-text-subtle); }
.an-rank-name { font-size: 13.5px; font-weight: 600; color: var(--color-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-rank-track { height: 9px; border-radius: 5px; background: var(--color-surface-2); overflow: hidden; }
.an-rank-track i { display: block; height: 100%; width: var(--w); min-width: 4px; border-radius: 5px; background: linear-gradient(90deg, color-mix(in srgb, var(--rk) 45%, transparent), var(--rk)); animation: an-grow-w 720ms var(--ease-out) both; animation-delay: calc(var(--i) * 55ms); }
.an-rank-val { font-family: var(--font-mono); font-size: 12.5px; text-align: right; color: var(--color-text-secondary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.an-rank-pct { font-family: var(--font-display); font-weight: 800; font-size: 13px; text-align: right; color: var(--rk); font-variant-numeric: tabular-nums; }

/* ---------- Barras por día de semana ---------- */
.an-weekbars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 104px; }
.an-wb { display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; cursor: help; }
.an-wb i { display: block; width: 100%; max-width: 38px; height: var(--h); min-height: 5px; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, color-mix(in srgb, var(--ac) 55%, transparent), var(--ac)); animation: an-grow-h 620ms var(--ease-out) both; animation-delay: calc(var(--i) * 45ms); transition: filter var(--dur-base); }
.an-wb.best i { background: linear-gradient(180deg, #34d399, var(--color-green)); }
.an-wb:hover i { filter: brightness(1.12); }
.an-wb u { text-decoration: none; font-size: 11px; font-weight: 700; color: var(--color-text-subtle); }
.an-wb.best u { color: var(--color-green); }

/* ---------- Split / versus / medidores ---------- */
.an-split-bar { display: flex; height: 40px; border-radius: var(--radius-sm); overflow: hidden; gap: 3px; }
.an-split-bar i { display: block; width: var(--w); min-width: 4px; animation: an-grow-w 720ms var(--ease-out) both; }
.an-split-bar i.a { background: linear-gradient(100deg, var(--color-green), #34d399); }
.an-split-bar i.b { background: linear-gradient(100deg, #cbd5e1, #94a3b8); }
.an-split-keys { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 14px; font-size: 12px; color: var(--color-text-muted); }
.an-split-keys b { display: block; font-family: var(--font-mono); font-size: 15px; color: var(--color-primary); }
.an-split-keys .a b { color: var(--color-green); }
.an-versus { display: flex; flex-direction: column; gap: 20px; }
.an-versus-side { display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; align-items: baseline; }
.an-versus-side span { font-size: 12px; font-weight: 700; color: var(--color-text-muted); }
.an-versus-side b { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; color: var(--color-primary); letter-spacing: -.02em; }
.an-versus-bar { grid-column: 1 / -1; display: block; height: 10px; width: var(--w); min-width: 6px; border-radius: 6px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 45%, transparent), var(--c)); animation: an-grow-w 760ms var(--ease-out) both; }
.an-duo-gauge { display: flex; flex-direction: column; gap: 20px; }
.an-gauge { display: grid; grid-template-columns: 1fr auto; gap: 7px 14px; align-items: center; }
.an-gauge-lbl { font-size: 12px; font-weight: 700; color: var(--color-text-muted); }
.an-gauge b { font-family: var(--font-mono); font-size: 14px; color: var(--color-primary); grid-row: span 2; font-variant-numeric: tabular-nums; }
.an-gauge-track { grid-column: 1; height: 11px; border-radius: 6px; background: var(--color-surface-2); overflow: hidden; }
.an-gauge-track i { display: block; height: 100%; width: var(--w); border-radius: 6px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 42%, transparent), var(--c)); animation: an-grow-w 800ms var(--ease-out) both; }

/* ---------- Ocupación por habitación / anticipación ---------- */
.an-roomocc, .an-lead { display: flex; flex-direction: column; }
.an-roomocc-row, .an-lead-row { display: grid; grid-template-columns: minmax(110px,1.2fr) minmax(80px,2fr) 56px; align-items: center; gap: 14px; padding: 12px 2px; border-bottom: 1px solid var(--hairline); }
.an-roomocc-row:last-child, .an-lead-row:last-child { border-bottom: 0; }
.an-roomocc-name { font-size: 13px; font-weight: 600; color: var(--color-primary); display: flex; flex-direction: column; gap: 2px; }
.an-roomocc-name em { font-style: normal; font-size: 10.5px; color: var(--color-text-subtle); }
.an-lead-lbl { font-size: 13px; color: var(--color-text-secondary); }
.an-roomocc-track, .an-lead-track { height: 9px; border-radius: 5px; background: var(--color-surface-2); overflow: hidden; }
.an-roomocc-track i, .an-lead-track i { display: block; height: 100%; width: var(--w); min-width: 4px; border-radius: 5px; background: linear-gradient(90deg, color-mix(in srgb, var(--ac) 42%, transparent), var(--ac)); animation: an-grow-w 700ms var(--ease-out) both; animation-delay: calc(var(--i) * 50ms); }
.an-roomocc-val, .an-lead-row b { font-family: var(--font-mono); font-size: 13px; text-align: right; color: var(--color-primary); font-variant-numeric: tabular-nums; }

/* ---------- Tabla ligera ---------- */
.an-tablet { display: flex; flex-direction: column; }
.an-tablet-head, .an-tablet-row { display: grid; grid-template-columns: minmax(0,1.6fr) repeat(3, minmax(64px,1fr)); gap: 12px; align-items: center; }
.an-tablet.wide .an-tablet-head, .an-tablet.wide .an-tablet-row { grid-template-columns: minmax(0,1.5fr) repeat(6, minmax(58px,1fr)); }
.an-tablet-head { padding: 0 2px 10px; border-bottom: 1px solid var(--hairline-strong); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--color-text-subtle); }
.an-tablet-head span:not(:first-child), .an-tablet-row span:not(.nm) { text-align: right; }
.an-tablet-row { padding: 12px 2px; border-bottom: 1px solid var(--hairline); font-size: 13px; color: var(--color-text-secondary); transition: background var(--dur-fast); }
.an-tablet-row:last-child { border-bottom: 0; }
.an-tablet-row:hover { background: color-mix(in srgb, var(--ac) 5%, transparent); }
.an-tablet-row .nm { font-weight: 600; color: var(--color-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 7px; }
.an-tablet-row .mono { font-family: var(--font-mono); font-size: 12px; font-variant-numeric: tabular-nums; }
.an-tablet-row .mono.strong { color: var(--color-primary); }
.an-tablet-row .mono.bad { color: var(--color-danger); font-weight: 600; }
.an-dot-direct { width: 7px; height: 7px; border-radius: 50%; background: var(--c-cyan); flex-shrink: 0; }

/* ---------- Anillo de penetración ---------- */
.an-donutish { display: grid; place-items: center; padding: 8px 0 4px; }
.an-donutish-ring {
  position: relative; width: 148px; height: 148px; border-radius: 50%; display: grid; place-items: center; text-align: center;
  background: conic-gradient(var(--ac) calc(var(--p) * 1%), var(--color-surface-2) 0);
}
.an-donutish-ring::after { content: ''; position: absolute; inset: 15px; border-radius: 50%; background: var(--color-surface); }
.an-donutish-ring b { position: relative; z-index: 1; font-family: var(--font-display); font-weight: 800; font-size: 1.7rem; color: var(--color-primary); letter-spacing: -.02em; }
.an-donutish-ring span { position: relative; z-index: 1; display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--color-text-subtle); margin-top: 2px; }

/* ---------- Gráficos ---------- */
.an-chart { margin: 0; cursor: pointer; }
.an-chart-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.an-chart-title { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--color-text-subtle); }
.an-chart-zoom { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; font-size: 11px; font-weight: 700; color: var(--ac); padding: 5px 11px; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--ac) 10%, transparent); transition: transform var(--dur-base) var(--ease-spring); }
.an-chart-zoom .ico { width: 13px; height: 13px; }
.an-chart:hover .an-chart-zoom { transform: translateY(-1px) scale(1.04); }
.an-chart-sub { font-size: 12px; color: var(--color-text-muted); margin: 8px 0 0; }
.an-chart-body { position: relative; height: 260px; margin-top: 16px; }
.an-chart.tall  .an-chart-body { height: 330px; }
.an-chart.short .an-chart-body { height: 210px; }

/* ---------- MI PANEL ---------- */
.an-mypanel-bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 16px 22px; border-radius: var(--radius-lg); background: linear-gradient(100deg, var(--color-accent-light), transparent 70%); border: 1px solid var(--hairline); font-size: 13px; color: var(--color-text-secondary); }
.an-mypanel-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.an-mypanel { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 26px; align-items: start; }
.an-my-slot { position: relative; animation: an-rise var(--dur-slow) var(--ease-out) both; animation-delay: calc(var(--i) * 55ms); }
.an-my-slot > .an-big { border: 1px solid var(--hairline); border-radius: var(--radius-lg); background: var(--color-surface); padding: 24px 26px; }
.an-my-tools { position: absolute; right: 12px; top: 12px; z-index: 3; display: flex; gap: 5px; opacity: 0; transition: opacity var(--dur-base); }
.an-my-slot:hover .an-my-tools, .an-my-slot:focus-within .an-my-tools { opacity: 1; }
.an-my-btn { width: 26px; height: 26px; display: grid; place-items: center; cursor: pointer; border-radius: 7px; background: var(--color-surface); border: 1px solid var(--hairline-strong); color: var(--color-text-muted); transition: color var(--dur-base), border-color var(--dur-base); }
.an-my-btn .ico { width: 12px; height: 12px; }
.an-my-btn:hover { color: var(--color-accent); border-color: var(--color-accent); }
.an-my-btn.danger:hover { color: var(--color-danger); border-color: var(--color-danger); }
.an-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px 26px; max-height: 56vh; overflow-y: auto; padding: 2px; }
.an-picker-title { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--c-teal); margin-bottom: 10px; }
.an-picker-item { display: flex; align-items: center; gap: 10px; padding: 8px 2px; cursor: pointer; font-size: 13px; color: var(--color-text-secondary); }
.an-picker-item input { position: absolute; opacity: 0; width: 0; height: 0; }
.an-picker-box { width: 19px; height: 19px; flex-shrink: 0; border-radius: 6px; border: 1.5px solid var(--hairline-strong); display: grid; place-items: center; color: transparent; transition: background var(--dur-base), border-color var(--dur-base), color var(--dur-base); }
.an-picker-box .ico { width: 12px; height: 12px; }
.an-picker-item input:checked + .an-picker-box { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }
.an-picker-item:hover { color: var(--color-primary); }

/* ---------- Zoom + anotación ---------- */
.modal-box:has(.an-zoom) { max-width: 1040px; }
.an-zoom-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.an-zoom-head h3 { flex: 1; font-family: var(--font-display); margin: 0; }
.an-zoom-tools { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; background: var(--color-surface-2); border-radius: 999px; padding: 6px 12px; }
.an-tool-label { font-size: 11px; font-weight: 700; color: var(--color-text-muted); }
.an-pen-color { width: 20px; height: 20px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; transition: transform var(--dur-base) var(--ease-spring); }
.an-pen-color:hover, .an-pen-color.sel { transform: scale(1.16); }
.an-pen-color.sel { border-color: var(--color-primary); }
.an-pen-erase { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; background: var(--color-surface); border: 1px solid var(--hairline-strong); color: var(--color-text-muted); }
.an-pen-erase.sel { border-color: var(--color-primary); color: var(--color-primary); }
.an-zoom-stage { position: relative; height: 470px; background: var(--color-surface-2); border-radius: var(--radius-md); padding: 14px; }
.an-zoom-stage > canvas { position: absolute; inset: 14px; }
.an-zoom-draw { z-index: 3; cursor: crosshair; touch-action: none; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1100px) {
  .an-head { flex-direction: column; align-items: flex-start; gap: 18px; }
  .an-head-motif { width: 108px; }
  .an-grid.two, .an-grid.three { grid-template-columns: 1fr; }
  .an-tablet.wide .an-tablet-head, .an-tablet.wide .an-tablet-row { grid-template-columns: minmax(0,1.4fr) repeat(3, minmax(56px,1fr)); }
  .an-tablet.wide span:nth-child(4), .an-tablet.wide span:nth-child(5), .an-tablet.wide span:nth-child(6) { display: none; }
}
@media (max-width: 820px) {
  .an-page { gap: 34px; }
  .an-stats { grid-template-columns: 1fr 1fr; }
  .an-big { padding: 20px 18px; grid-column: span 1; }
  .an-big:nth-child(odd) { border-left: 0; padding-left: 0; }
  .an-period-tools { margin-left: 0; width: 100%; }
  .an-card { padding: 22px 20px; }
  .an-rank-row { grid-template-columns: 20px minmax(0,1fr) 96px 46px; }
  .an-rank-track { display: none; }
  .an-chart-body { height: 220px; }
  .an-chart.tall .an-chart-body { height: 250px; }
  .an-mypanel { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .an-motif .mv-stack, .an-motif .mv-crowd, .an-motif .mv-cal, .an-motif .mv-person,
  .an-motif .mv-item, .an-loading-cal i { animation: none !important; }
}

/* ---------- Almanaque v10.1: tamaño de celda acotado ----------
   A ancho completo, `repeat(7,1fr)` con aspect-ratio 1 producía celdas
   de 200 px. El almanaque se lee mejor compacto, al lado de su lectura. */
.an-almanac { max-width: 520px; }
.an-almanac-grid { grid-template-columns: repeat(7, minmax(0, 62px)); }
.an-almanac-dow  { grid-template-columns: repeat(7, minmax(0, 62px)); }
.an-cell b { font-size: 11px; }
/* La tarjeta del almanaque se parte en dos: mapa a la izquierda, lectura a la derecha */
.an-card.split .an-card-body { display: grid; grid-template-columns: auto minmax(240px, 1fr); gap: 34px; align-items: start; }
.an-card.split .an-side { display: flex; flex-direction: column; gap: 18px; }
.an-side-row { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--hairline); }
.an-side-row:last-child { border-bottom: 0; padding-bottom: 0; }
.an-side-row span { font-size: 12.5px; color: var(--color-text-muted); }
.an-side-row b { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; color: var(--color-primary); letter-spacing: -.02em; white-space: nowrap; }
@media (max-width: 900px){
  .an-card.split .an-card-body { grid-template-columns: 1fr; gap: 24px; }
  .an-almanac { max-width: none; }
  .an-almanac-grid, .an-almanac-dow { grid-template-columns: repeat(7, 1fr); }
}
.an-side-when { font-style: normal; font-size: 11px; color: var(--color-text-subtle); }

/* Almanaque v10.2: celda más chica (se lee como calendario, no como grilla
   de botones) y número con contraste correcto en toda la escala de tinte. */
.an-almanac { max-width: 400px; }
.an-almanac-grid, .an-almanac-dow { grid-template-columns: repeat(7, minmax(0, 46px)); gap: 5px; }
.an-cell { border-radius: 6px; }
.an-cell b { font-size: 10px; color: color-mix(in srgb, #fff calc(var(--t) * 100%), var(--color-primary)); }
.an-cell.zero b { color: var(--color-text-subtle); }
.an-card.split .an-card-body { grid-template-columns: auto minmax(260px, 1fr); }

/* Selector de tarjetas: modal ancho y en columnas (23 opciones en una sola
   columna obligaba a scrollear de más) */
.modal-box:has(.an-picker) { max-width: 780px; }
.an-picker { grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); }
/* Rankings dentro de "Mi panel": columnas angostas, sin barra para no desbordar */
.an-mypanel .an-rank-row { grid-template-columns: 20px minmax(0,1fr) 92px 46px; }
.an-mypanel .an-rank-track { display: none; }
.an-mypanel .an-card-body .an-big { padding: 0; }

/* ==================================================================
   CRM v10 — "LA CENTRAL"
   ------------------------------------------------------------------
   Quinto dialecto (DESIGN.md §6.2). Nada en común con los otros: acá
   el sujeto son personas hablando, así que todo es conversación —
   globos con cola, presencia en vivo, avatares, formas redondeadas y
   cálidas. El elemento firma es la PILA 3D de mensajes que se abre en
   abanico. Violeta de sección, sin filetes técnicos ni cifras gigantes.
   ================================================================== */
@keyframes cx-breathe { 0%,100% { transform: scale(1); opacity:.55 } 50% { transform: scale(1.55); opacity:0 } }
@keyframes cx-pop     { from { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes cx-slide   { from { opacity: 0; transform: translateX(-12px); } }
@keyframes cx-bubble  { from { opacity: 0; transform: translateY(8px) scale(.96); } }
@keyframes cx-float   { 0%,100% { transform: translate3d(0,0,0) } 50% { transform: translate3d(0,-6px,0) } }
@keyframes cx-shine   { 0% { transform: translateX(-120%) skewX(-16deg) } 60%,100% { transform: translateX(240%) skewX(-16deg) } }

#section-crm { --cx: var(--c-violet); }
.cx-shell { display: flex; flex-direction: column; gap: 26px; padding-bottom: 46px; }
.cx-shell.tight { gap: 20px; }

/* ---------- Barra de la central ---------- */
.cx-board {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0,1.1fr) auto; gap: 20px 34px; align-items: start;
  padding: 26px 30px; border-radius: 26px;
  background:
    radial-gradient(900px 260px at 88% -40%, color-mix(in srgb, var(--cx) 14%, transparent), transparent 66%),
    var(--color-surface);
  border: 1px solid var(--hairline);
}
.cx-board-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 10.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--cx); }
.cx-board-eyebrow .ico { width: 14px; height: 14px; }
.cx-board-title { font-family: var(--font-display); font-weight: 800; letter-spacing: -.03em; font-size: clamp(1.5rem, 2.8vw, 2.2rem); line-height: 1.06; color: var(--color-primary); margin: 11px 0 9px; }
.cx-board-sub { font-size: 14px; line-height: 1.6; color: var(--color-text-muted); max-width: 62ch; }
.cx-board-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-self: end; padding-top: 4px; }
.cx-pulses { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; }
.cx-pulse {
  position: relative; display: inline-flex; align-items: center; gap: 11px;
  padding: 10px 16px 10px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--cc) 7%, var(--color-surface));
  border: 1px solid color-mix(in srgb, var(--cc) 22%, transparent);
}
.cx-pulse-ico { position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--cc) 16%, transparent); color: var(--cc); }
.cx-pulse-ico .ico { width: 14px; height: 14px; }
.cx-pulse-ring { position: absolute; left: 12px; top: 50%; width: 28px; height: 28px; margin-top: -14px; border-radius: 50%; background: var(--cc); opacity: 0; }
.cx-pulse.live .cx-pulse-ring { animation: cx-breathe 2.4s var(--ease-standard) infinite; }
.cx-pulse-txt { display: flex; flex-direction: column; line-height: 1.15; }
.cx-pulse-txt b { font-family: var(--font-display); font-weight: 800; font-size: 15px; color: var(--color-primary); }
.cx-pulse-txt em { font-style: normal; font-size: 10.5px; color: var(--color-text-muted); }

/* ---------- PILA 3D DE MENSAJES (firma) ---------- */
.cx-deck { position: relative; width: 268px; height: 152px; perspective: 900px; margin: 0 auto; }
.cx-deck.small { width: 224px; height: 132px; }
.cx-deck-card {
  position: absolute; left: 0; right: 0; display: flex; align-items: center; gap: 10px;
  padding: 13px 15px; border-radius: 16px; transform-style: preserve-3d;
  background: var(--color-surface); border: 1px solid var(--hairline);
  box-shadow: 0 10px 26px rgba(14,33,72,.10);
  top: calc(var(--i) * 22px);
  transform: translateZ(calc(var(--i) * -26px)) translateY(calc(var(--i) * -6px)) rotateX(9deg);
  transition: transform var(--dur-slow) var(--ease-spring), box-shadow var(--dur-base);
  animation: cx-float 6s var(--ease-standard) infinite; animation-delay: calc(var(--i) * 420ms);
}
.cx-deck-ico { width: 26px; height: 26px; flex-shrink: 0; border-radius: 8px; display: grid; place-items: center; background: color-mix(in srgb, var(--cc) 14%, transparent); color: var(--cc); }
.cx-deck-ico .ico { width: 13px; height: 13px; }
.cx-deck-txt { font-size: 11.5px; color: var(--color-text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-deck:hover .cx-deck-card { transform: translateZ(0) translateY(calc(var(--i) * 12px - 12px)) rotateX(0deg) rotateZ(calc((var(--i) - 1) * 3deg)); box-shadow: 0 16px 34px rgba(14,33,72,.16); }
.cx-deck-glow { position: absolute; left: 12%; right: 12%; bottom: -14px; height: 22px; border-radius: 50%; filter: blur(14px); background: color-mix(in srgb, var(--cx) 34%, transparent); opacity: .5; }

/* ---------- Botonera ---------- */
.cx-btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; white-space: nowrap;
  font-family: var(--font-body); font-size: 12.5px; font-weight: 700; color: var(--color-text-secondary);
  padding: 10px 17px; border-radius: 999px; background: var(--color-surface); border: 1px solid var(--hairline-strong);
  transition: color var(--dur-base), border-color var(--dur-base), transform var(--dur-base) var(--ease-standard), box-shadow var(--dur-base);
}
.cx-btn:hover { color: var(--cx); border-color: var(--cx); transform: translateY(-2px); box-shadow: 0 8px 20px color-mix(in srgb, var(--cx) 18%, transparent); }
.cx-btn .ico { width: 15px; height: 15px; }
.cx-btn.solid { background: linear-gradient(120deg, var(--cx), #a855f7); color: #fff; border-color: transparent; box-shadow: 0 8px 22px color-mix(in srgb, var(--cx) 30%, transparent); }
.cx-btn.solid:hover { color: #fff; filter: brightness(1.06); }
.cx-btn.ghost { background: transparent; border-style: dashed; }
.cx-btn.danger:hover { color: var(--color-danger); border-color: var(--color-danger); box-shadow: none; }
.cx-mini-btn {
  display: inline-flex; align-items: center; gap: 5px; cursor: pointer; font-family: var(--font-body);
  font-size: 11px; font-weight: 700; color: var(--color-text-muted); padding: 6px 11px; border-radius: 999px;
  background: var(--color-surface-2); border: 1px solid transparent;
  transition: color var(--dur-base), background var(--dur-base);
}
.cx-mini-btn .ico { width: 12px; height: 12px; }
.cx-mini-btn:hover { color: var(--cx); background: color-mix(in srgb, var(--cx) 10%, transparent); }
.cx-mini-btn.ghost { background: transparent; }
.cx-mini-btn.danger:hover { color: var(--color-danger); background: var(--color-danger-light); }
.cx-mini-btn.done { color: var(--color-green); background: var(--color-green-light); }
.cx-icon-btn { width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer; border-radius: 50%; background: var(--color-surface); border: 1px solid var(--hairline); color: var(--color-text-muted); transition: color var(--dur-base), border-color var(--dur-base), transform var(--dur-base) var(--ease-spring); }
.cx-icon-btn .ico { width: 15px; height: 15px; }
.cx-icon-btn:hover { color: var(--cx); border-color: var(--cx); transform: translateY(-2px); }
.cx-icon-btn.on { color: #d97706; border-color: #d97706; background: var(--c-amber-soft); }
.cx-icon-btn.danger:hover { color: var(--color-danger); border-color: var(--color-danger); }
.cx-search { display: flex; align-items: center; gap: 9px; padding: 0 16px; border-radius: 999px; background: var(--color-surface-2); border: 1px solid var(--hairline); min-width: 240px; }
.cx-search .ico { width: 15px; height: 15px; color: var(--color-text-subtle); flex-shrink: 0; }
.cx-search input { border: 0; background: none; outline: none; padding: 11px 0; font-family: var(--font-body); font-size: 13px; color: var(--color-primary); width: 100%; }

/* ---------- Escritorio de 3 columnas ---------- */
.cx-desk { display: grid; grid-template-columns: 230px minmax(300px, 380px) minmax(0, 1fr); gap: 18px; align-items: start; }
.cx-rail { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 12px; }
.cx-rail-accs, .cx-rail-folders { display: flex; flex-direction: column; gap: 2px; }
.cx-rail-block { display: flex; flex-direction: column; gap: 5px; }
.cx-rail-title { font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; color: var(--color-text-subtle); padding: 0 6px 6px; }
.cx-rail-void { font-size: 11.5px; color: var(--color-text-muted); line-height: 1.5; padding: 12px 14px; border-radius: 16px; background: var(--color-surface-2); border: 1px dashed var(--hairline-strong); }
.cx-rail-void .cx-mini-btn { margin-top: 8px; }
.cx-acc {
  position: relative; display: flex; align-items: center; gap: 10px; cursor: pointer; text-align: left; width: 100%;
  padding: 11px 13px; border-radius: 15px; background: transparent; border: 1px solid transparent; font-family: var(--font-body);
  transition: background var(--dur-base), border-color var(--dur-base), transform var(--dur-base) var(--ease-standard);
}
.cx-acc:hover { background: var(--color-surface); border-color: var(--hairline); transform: translateX(2px); }
.cx-acc.on { background: color-mix(in srgb, var(--cc) 9%, var(--color-surface)); border-color: color-mix(in srgb, var(--cc) 32%, transparent); }
.cx-acc-ico { width: 30px; height: 30px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--cc) 14%, transparent); color: var(--cc); }
.cx-acc-ico .ico { width: 15px; height: 15px; }
.cx-acc-id { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.cx-acc-id b { font-size: 12px; font-weight: 700; color: var(--color-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-acc-id em { font-style: normal; font-size: 10px; color: var(--color-text-subtle); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-acc-live { width: 7px; height: 7px; border-radius: 50%; background: var(--cc); opacity: 0; flex-shrink: 0; }
.cx-acc.on .cx-acc-live { opacity: 1; }
.cx-folder {
  display: flex; align-items: center; gap: 10px; cursor: pointer; text-align: left; width: 100%;
  padding: 9px 13px; border-radius: 12px; background: transparent; border: 1px solid transparent;
  font-family: var(--font-body); font-size: 12.5px; font-weight: 600; color: var(--color-text-muted);
  transition: background var(--dur-base), color var(--dur-base), padding-left var(--dur-base) var(--ease-standard);
}
.cx-folder .ico { width: 15px; height: 15px; opacity: .7; }
.cx-folder:hover { background: var(--color-surface); color: var(--color-primary); padding-left: 17px; }
.cx-folder.on { background: color-mix(in srgb, var(--cx) 11%, transparent); color: var(--cx); font-weight: 800; }
.cx-folder.on .ico { opacity: 1; }
.cx-folder.drop { background: color-mix(in srgb, var(--cx) 18%, transparent); border-color: var(--cx); border-style: dashed; }

/* ---------- Lista de conversaciones ---------- */
.cx-list { display: flex; flex-direction: column; gap: 6px; max-height: calc(100vh - 190px); overflow-y: auto; padding-right: 4px; scrollbar-width: thin; }
.cx-thread {
  position: relative; display: flex; align-items: flex-start; gap: 10px; cursor: pointer; overflow: hidden;
  /* La lista es flex column con alto tope: sin esto los items se comprimen por
     debajo de su alto natural y `overflow:hidden` recorta el avatar y el nombre. */
  flex-shrink: 0;
  padding: 10px 13px 10px 15px; border-radius: 14px;
  background: var(--color-surface); border: 1px solid var(--hairline);
  animation: cx-slide var(--dur-base) var(--ease-out) both; animation-delay: calc(var(--i) * 28ms);
  transition: transform var(--dur-base) var(--ease-standard), box-shadow var(--dur-base), border-color var(--dur-base);
}
.cx-thread:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(14,33,72,.10); border-color: color-mix(in srgb, var(--cc) 30%, var(--hairline)); }
.cx-thread.on { border-color: var(--cc); box-shadow: 0 10px 26px color-mix(in srgb, var(--cc) 20%, transparent); }
.cx-thread-edge { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--cc); opacity: 0; transition: opacity var(--dur-base); }
.cx-thread.on .cx-thread-edge, .cx-thread.unread .cx-thread-edge { opacity: 1; }
.cx-thread-main { min-width: 0; flex: 1; }
.cx-thread-top { display: flex; align-items: center; gap: 7px; }
.cx-thread-who { flex: 1; min-width: 0; font-size: 12.5px; font-weight: 700; color: var(--color-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-thread.unread .cx-thread-who { font-weight: 800; }
.cx-thread-when { font-size: 10.5px; color: var(--color-text-subtle); white-space: nowrap; flex-shrink: 0; }
.cx-thread-subject { font-size: 11.5px; font-weight: 600; color: var(--color-text-secondary); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-thread-snippet { font-size: 11.5px; color: var(--color-text-muted); margin-top: 2px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.cx-thread-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.cx-thread-dot { position: absolute; right: 11px; top: 12px; width: 7px; height: 7px; border-radius: 50%; background: var(--cc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cc) 20%, transparent); }
.cx-chip { display: inline-flex; align-items: center; flex-shrink: 0; gap: 4px; font-size: 10px; font-weight: 700; color: var(--cc); padding: 2px 7px; border-radius: 999px; background: color-mix(in srgb, var(--cc) 11%, transparent); white-space: nowrap; }
.cx-chip .ico { width: 11px; height: 11px; }
.cx-chip.star { --cc: #d97706; padding: 2px 5px; }
.cx-thread-top .cx-chip .ico { width: 10px; height: 10px; }
.cx-av { width: 32px; height: 32px; font-size: 11.5px; flex-shrink: 0; border-radius: 11px; }
.cx-av.sm { width: 30px; height: 30px; font-size: 10.5px; border-radius: 11px; }
.cx-av.lg { width: 48px; height: 48px; font-size: 15px; border-radius: 16px; }

/* ---------- Conversación en globos ---------- */
.cx-convo { background: var(--color-surface); border: 1px solid var(--hairline); border-radius: 22px; overflow: hidden; min-height: 480px; display: flex; flex-direction: column; }
.cx-convo-in { display: flex; flex-direction: column; height: 100%; }
.cx-convo-head { display: flex; align-items: center; gap: 14px; padding: 18px 22px; border-bottom: 1px solid var(--hairline); background: linear-gradient(180deg, color-mix(in srgb, var(--cc) 6%, var(--color-surface)), var(--color-surface)); flex-wrap: wrap; }
.cx-convo-id { min-width: 0; flex: 1; }
.cx-convo-id > b { display: block; font-family: var(--font-display); font-weight: 800; font-size: 16px; color: var(--color-primary); letter-spacing: -.015em; }
.cx-convo-meta { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-top: 5px; }
.cx-convo-subject { font-size: 12.5px; color: var(--color-text-muted); }
.cx-convo-tools { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.cx-move { min-width: 130px; }
.cx-booking-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; cursor: pointer; font-family: var(--font-body); font-size: 11px; font-weight: 700; color: var(--color-accent); padding: 5px 12px; border-radius: 999px; background: var(--color-accent-light); border: 1px solid color-mix(in srgb, var(--color-accent) 22%, transparent); }
.cx-booking-link .ico { width: 12px; height: 12px; }
.cx-booking-link:hover { background: color-mix(in srgb, var(--color-accent) 16%, transparent); }

.cx-stream { flex: 1; overflow-y: auto; padding: 24px 22px; display: flex; flex-direction: column; gap: 16px; background: radial-gradient(700px 300px at 50% 0%, color-mix(in srgb, var(--cx) 4%, transparent), transparent 70%); max-height: 460px; }
.cx-turn { display: flex; align-items: flex-end; gap: 10px; flex-shrink: 0; animation: cx-bubble var(--dur-base) var(--ease-out) both; }
.cx-turn.out { justify-content: flex-end; }
.cx-bubble { position: relative; max-width: 74%; padding: 13px 17px; border-radius: 20px; font-size: 13.5px; line-height: 1.6; }
.cx-turn.in  .cx-bubble { background: var(--color-surface-2); color: var(--color-text-secondary); border-bottom-left-radius: 6px; }
.cx-turn.out .cx-bubble { background: linear-gradient(135deg, var(--cx), #a855f7); color: #fff; border-bottom-right-radius: 6px; box-shadow: 0 8px 22px color-mix(in srgb, var(--cx) 26%, transparent); }
.cx-turn.in  .cx-bubble::after { content: ''; position: absolute; left: -5px; bottom: 0; width: 14px; height: 14px; background: var(--color-surface-2); clip-path: path('M14 14 C 6 14, 0 8, 0 0 L 14 0 Z'); }
.cx-turn.out .cx-bubble::after { content: ''; position: absolute; right: -5px; bottom: 0; width: 14px; height: 14px; background: #a855f7; clip-path: path('M0 14 C 8 14, 14 8, 14 0 L 0 0 Z'); }
.cx-turn.draft .cx-bubble { background: var(--c-violet-soft); color: var(--color-text-secondary); border: 1px dashed color-mix(in srgb, var(--cx) 40%, transparent); box-shadow: none; }
.cx-turn.draft .cx-bubble::after { display: none; }
.cx-bubble-flag { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--cx); margin-bottom: 7px; }
.cx-bubble-flag .ico { width: 12px; height: 12px; }
.cx-bubble-body { word-break: break-word; }
.cx-bubble-body pre { white-space: pre-wrap; font-family: inherit; margin: 0; }
.cx-bubble-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; font-size: 10.5px; opacity: .75; }
.cx-turn.draft .cx-bubble-foot { opacity: 1; margin-top: 12px; padding-top: 11px; border-top: 1px dashed color-mix(in srgb, var(--cx) 26%, transparent); }
.cx-turn.draft .cx-bubble-acts { margin-left: auto; }
.cx-turn.draft .cx-bubble-acts .cx-mini-btn:first-child { background: var(--cx); border-color: transparent; color: #fff; }
.cx-turn.draft .cx-bubble-acts .cx-mini-btn:first-child:hover { filter: brightness(1.08); }
.cx-turn.out .cx-bubble-foot { justify-content: flex-end; }
.cx-bubble-acts { display: flex; gap: 6px; }

.cx-composer { border-top: 1px solid var(--hairline); padding: 16px 20px 18px; background: var(--color-surface); }
.cx-composer textarea { width: 100%; min-height: 84px; resize: vertical; border: 1px solid var(--hairline-strong); border-radius: 16px; padding: 13px 15px; font-family: var(--font-body); font-size: 13.5px; line-height: 1.6; color: var(--color-primary); background: var(--color-surface-2); outline: none; transition: border-color var(--dur-base), background var(--dur-base); }
.cx-composer textarea:focus { border-color: var(--cx); background: var(--color-surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cx) 12%, transparent); }
.cx-composer-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.cx-composer-spacer { flex: 1; }

/* ---------- Estados vacíos ---------- */
.cx-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 54px 26px; color: var(--color-text-muted); flex: 1; }
.cx-empty .cx-deck { margin-bottom: 12px; }
.cx-empty-ico { width: 52px; height: 52px; border-radius: 18px; display: grid; place-items: center; background: var(--c-violet-soft); color: var(--cx); }
.cx-empty-ico .ico { width: 24px; height: 24px; }
.cx-empty b { font-family: var(--font-display); font-weight: 800; font-size: 16px; color: var(--color-primary); }
.cx-empty span { font-size: 13px; max-width: 46ch; line-height: 1.6; }

/* ---------- Fichas de huéspedes ---------- */
.cx-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 16px; }
.cx-person {
  position: relative; overflow: hidden; cursor: pointer; padding: 20px 20px 18px; border-radius: 22px;
  background: var(--color-surface); border: 1px solid var(--hairline);
  animation: cx-pop var(--dur-base) var(--ease-out) both; animation-delay: calc(var(--i) * 26ms);
  transition: transform var(--dur-base) var(--ease-standard), box-shadow var(--dur-base), border-color var(--dur-base);
}
.cx-person:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(14,33,72,.12); border-color: color-mix(in srgb, var(--cx) 26%, var(--hairline)); }
.cx-person.here { border-color: color-mix(in srgb, var(--color-green) 40%, transparent); }
.cx-person-top { display: flex; align-items: flex-start; gap: 12px; }
.cx-person-id { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.cx-person-id b { font-family: var(--font-display); font-weight: 800; font-size: 15px; line-height: 1.25; color: var(--color-primary); overflow-wrap: anywhere; }
.cx-person-id span { font-size: 11.5px; color: var(--color-text-subtle); }
.cx-here { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 800; color: var(--color-green); padding: 4px 9px; border-radius: 999px; background: var(--color-green-light); white-space: nowrap; }
.cx-here .ico { width: 11px; height: 11px; }
.cx-person-stats { display: flex; gap: 14px; margin-top: 16px; padding: 12px 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.cx-person-stats span { display: flex; flex-direction: column; font-size: 10.5px; color: var(--color-text-subtle); }
.cx-person-stats b { font-family: var(--font-display); font-weight: 800; font-size: 15px; color: var(--color-primary); }
.cx-person-links { display: flex; flex-direction: column; gap: 3px; margin-top: 13px; }
.cx-person-links a { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--color-text-muted); text-decoration: none; padding: 4px 0; transition: color var(--dur-base); }
.cx-person-links a:hover { color: var(--cx); }
.cx-person-links .ico { width: 13px; height: 13px; opacity: .7; }
.cx-person-links span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-person-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 12px; }
.cx-tag { font-size: 10px; font-weight: 700; color: var(--color-text-muted); padding: 3px 9px; border-radius: 999px; background: var(--color-surface-2); }
.cx-tag.off { color: var(--color-text-subtle); font-style: italic; }
.cx-tag.go { color: var(--color-green); background: var(--color-green-light); }
.cx-tag.mono { font-family: var(--font-mono); font-size: 9.5px; }
.cx-person-flags { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex-shrink: 0; }
.cx-person-badge { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: #fff; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.cx-person.tier-nuevo     .cx-person-badge { background: #94a3b8; }
.cx-person.tier-frecuente .cx-person-badge { background: var(--cx); }
.cx-person.tier-oro       .cx-person-badge { background: linear-gradient(120deg, #d97706, #fbbf24); }

/* ---------- Sub-pestañas + filtros ---------- */
.cx-subtabs { display: inline-flex; gap: 5px; padding: 5px; border-radius: 999px; background: var(--color-surface-2); border: 1px solid var(--hairline); }
.cx-subtab { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; border: 0; background: transparent; font-family: var(--font-body); font-size: 12.5px; font-weight: 700; color: var(--color-text-muted); padding: 9px 17px; border-radius: 999px; transition: background var(--dur-base), color var(--dur-base); }
.cx-subtab .ico { width: 15px; height: 15px; }
.cx-subtab:hover { color: var(--color-primary); }
.cx-subtab.on { background: var(--color-surface); color: var(--cx); box-shadow: var(--shadow-xs); }
.cx-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.cx-filter { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-family: var(--font-body); font-size: 12px; font-weight: 600; color: var(--color-text-secondary); padding: 8px 15px; border-radius: 999px; background: var(--color-surface); border: 1px solid var(--hairline); transition: color var(--dur-base), border-color var(--dur-base), transform var(--dur-base) var(--ease-standard); }
.cx-filter i { font-style: normal; font-family: var(--font-mono); font-size: 10.5px; color: var(--color-text-subtle); }
.cx-filter:hover { transform: translateY(-2px); color: var(--cx); border-color: color-mix(in srgb, var(--cx) 40%, transparent); }
.cx-filter.on { background: color-mix(in srgb, var(--cx) 10%, var(--color-surface)); color: var(--cx); border-color: var(--cx); font-weight: 700; }
.cx-filter.on i { color: var(--cx); }

/* ---------- Tarjetas (conocimientos / agentes / plantillas) ---------- */
.cx-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.cx-know, .cx-agent, .cx-snippet {
  position: relative; overflow: hidden; padding: 20px 22px 16px; border-radius: 22px;
  background: var(--color-surface); border: 1px solid var(--hairline);
  animation: cx-pop var(--dur-base) var(--ease-out) both; animation-delay: calc(var(--i) * 26ms);
  transition: transform var(--dur-base) var(--ease-standard), box-shadow var(--dur-base), border-color var(--dur-base);
}
.cx-know { cursor: pointer; }
.cx-know:hover, .cx-agent:hover, .cx-snippet:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(14,33,72,.12); }
.cx-know:hover { border-color: color-mix(in srgb, var(--cx) 28%, var(--hairline)); }
.cx-know.off, .cx-agent.off { opacity: .62; }
.cx-know.off:hover, .cx-agent.off:hover { opacity: 1; }
.cx-know-when { font-size: 10.5px; color: var(--color-text-subtle); font-style: italic; }
.cx-filter.empty { opacity: .5; }
.cx-filter.empty i { opacity: .7; }
.cx-know-spine { position: absolute; left: 0; top: 16px; bottom: 16px; width: 4px; border-radius: 0 4px 4px 0; background: var(--cx); opacity: .5; }
.cx-know-cat { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--cx); }
.cx-know-cat .ico { width: 12px; height: 12px; }
.cx-know h3 { font-family: var(--font-display); font-weight: 800; font-size: 15.5px; color: var(--color-primary); letter-spacing: -.015em; margin: 10px 0 8px; line-height: 1.3; }
.cx-know p { font-size: 12.5px; line-height: 1.6; color: var(--color-text-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cx-know footer, .cx-agent-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--hairline); }
.cx-know-go { margin-left: auto; color: var(--cx); opacity: 0; transform: translateX(-5px); transition: opacity var(--dur-base), transform var(--dur-base) var(--ease-spring); }
.cx-know-go .ico { width: 15px; height: 15px; }
.cx-know:hover .cx-know-go { opacity: 1; transform: none; }

.cx-agent { cursor: pointer; }
.cx-agent-head { display: flex; align-items: center; gap: 13px; }
.cx-agent-face { position: relative; width: 44px; height: 44px; flex-shrink: 0; border-radius: 15px; display: grid; place-items: center; background: color-mix(in srgb, var(--cc) 13%, transparent); color: var(--cc); }
.cx-agent-face .ico { width: 21px; height: 21px; }
.cx-agent-led { position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%; background: #94a3b8; border: 2.5px solid var(--color-surface); }
.cx-agent-led.on { background: var(--color-green); box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-green) 60%, transparent); animation: cx-breathe 2.6s var(--ease-standard) infinite; }
.cx-agent-id { min-width: 0; }
.cx-agent-id b { display: block; font-family: var(--font-display); font-weight: 800; font-size: 15px; color: var(--color-primary); letter-spacing: -.015em; }
.cx-agent-id span { font-size: 11.5px; color: var(--color-text-subtle); }
.cx-agent-prompt { font-size: 12.5px; line-height: 1.6; color: var(--color-text-muted); margin-top: 13px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.cx-snippet header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cx-snippet header b { font-family: var(--font-display); font-weight: 800; font-size: 14.5px; color: var(--color-primary); letter-spacing: -.015em; }
.cx-var { display: inline-block; padding: 0 5px; border-radius: 5px; font-family: var(--font-mono); font-size: .88em; font-weight: 700; color: var(--cx); background: color-mix(in srgb, var(--cx) 11%, transparent); }
.cx-snippet-body { position: relative; margin-top: 14px; padding: 14px 16px; border-radius: 16px 16px 16px 5px; background: var(--color-surface-2); font-size: 12.5px; line-height: 1.65; color: var(--color-text-secondary); white-space: pre-line; }
.cx-snippet footer { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.cx-snippet footer .cx-mini-btn:last-child { margin-left: auto; }

/* ---------- Cuentas: tarjetas de conexión ---------- */
.cx-block { display: flex; flex-direction: column; gap: 16px; }
.cx-block-head h2 { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; color: var(--color-primary); }
.cx-block-head h2 .ico { width: 18px; height: 18px; color: var(--cx); }
.cx-block-head p { font-size: 13px; color: var(--color-text-muted); margin-top: 6px; max-width: 66ch; line-height: 1.6; }
.cx-conn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.cx-conn {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 14px;
  padding: 22px 24px 20px; border-radius: 24px; background: var(--color-surface); border: 1px solid var(--hairline);
  animation: cx-pop var(--dur-base) var(--ease-out) both; animation-delay: calc(var(--i) * 70ms);
  transition: transform var(--dur-base) var(--ease-standard), box-shadow var(--dur-base), border-color var(--dur-base);
}
.cx-conn:hover { transform: translateY(-4px); box-shadow: 0 18px 38px rgba(14,33,72,.13); border-color: color-mix(in srgb, var(--cc) 34%, var(--hairline)); }
.cx-conn header { display: flex; align-items: center; gap: 13px; }
.cx-conn-logo { width: 46px; height: 46px; flex-shrink: 0; border-radius: 16px; display: grid; place-items: center; background: color-mix(in srgb, var(--cc) 13%, transparent); color: var(--cc); transition: transform var(--dur-base) var(--ease-spring); }
.cx-conn-logo .ico { width: 22px; height: 22px; }
.cx-conn:hover .cx-conn-logo { transform: rotate(-7deg) scale(1.06); }
.cx-conn-id { min-width: 0; flex: 1; }
.cx-conn-id b { display: block; font-family: var(--font-display); font-weight: 800; font-size: 14.5px; color: var(--color-primary); letter-spacing: -.015em; line-height: 1.3; word-break: normal; overflow-wrap: break-word; }
.cx-conn-id span { font-size: 11.5px; color: var(--color-text-subtle); }
.cx-conn-state { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 5px 11px; border-radius: 999px; white-space: nowrap; }
.cx-conn-state .ico { width: 12px; height: 12px; }
.cx-conn-state.ok { color: var(--color-green); background: var(--color-green-light); }
.cx-conn-facts { display: flex; gap: 22px; flex-wrap: wrap; padding: 14px 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.cx-conn-facts span { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cx-conn-facts em { font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--color-text-subtle); }
.cx-conn-facts b { font-size: 12.5px; color: var(--color-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-conn-facts b.mono { font-family: var(--font-mono); font-size: 11px; }
.cx-conn footer { display: flex; gap: 8px; flex-wrap: wrap; }
.cx-conn-blurb { font-size: 13px; line-height: 1.65; color: var(--color-text-muted); }
.cx-conn.offer { background: linear-gradient(160deg, color-mix(in srgb, var(--cc) 5%, var(--color-surface)), var(--color-surface) 60%); }
.cx-conn-shine { position: absolute; top: 0; bottom: 0; width: 60px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.5), transparent); opacity: 0; pointer-events: none; }
.cx-conn.offer:hover .cx-conn-shine { opacity: 1; animation: cx-shine 1.1s var(--ease-out); }

.cx-brain { display: grid; grid-template-columns: minmax(300px, 540px) minmax(0,1fr); gap: 30px; align-items: center; padding: 24px 26px; border-radius: 24px; background: var(--color-surface); border: 1px solid var(--hairline); }
.cx-brain-main { min-width: 0; }
.cx-brain-main .form-row { margin-bottom: 14px; }
.cx-brain-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
/* Estado real de la IA: reemplaza al campo donde antes se pegaba la clave.
   Verde cuando hay al menos un agente activo; gris cuando no hay ninguno. */
.cx-brain-state {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 0 0 16px; padding: 12px 14px;
  border: 1px solid var(--color-border); border-radius: 10px;
  background: var(--color-surface-alt, #f7f9fc);
  font-size: 12.5px; line-height: 1.55; color: var(--color-text-muted);
}
.cx-brain-state .ico { width: 15px; height: 15px; flex-shrink: 0; margin-top: 2px; color: var(--color-text-muted); }
.cx-brain-state b { color: var(--color-text); }
.cx-brain-state.on { background: color-mix(in srgb, var(--color-green, #0f9d68) 8%, transparent); border-color: color-mix(in srgb, var(--color-green, #0f9d68) 32%, transparent); }
.cx-brain-state.on .ico { color: var(--color-green, #0f9d68); }

.cx-brain-note { display: flex; align-items: flex-start; gap: 9px; margin-top: 16px; font-size: 11.5px; line-height: 1.55; color: var(--color-text-muted); }
.cx-brain-note .ico { width: 14px; height: 14px; color: var(--cx); flex-shrink: 0; margin-top: 1px; }
.cx-brain-note a { color: var(--cx); font-weight: 700; }
.cx-brain-art {
  display: grid; place-items: center; align-self: stretch; padding: 26px 14px;
  border-radius: 20px;
  background:
    radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--cx) 13%, transparent), transparent 70%),
    color-mix(in srgb, var(--cx) 4%, var(--color-bg));
  border: 1px solid color-mix(in srgb, var(--cx) 12%, transparent);
}
.cx-key-ok { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 800; color: var(--color-green); text-transform: uppercase; letter-spacing: .06em; margin-left: 8px; }
.cx-key-ok .ico { width: 11px; height: 11px; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1240px) {
  .cx-desk { grid-template-columns: 200px minmax(0,1fr); }
  .cx-convo { grid-column: 1 / -1; }
  .cx-list { max-height: 460px; }
  .cx-brain { grid-template-columns: 1fr; }
  .cx-brain-art { display: none; }
}
@media (max-width: 820px) {
  .cx-board { grid-template-columns: 1fr; padding: 22px 20px; }
  .cx-board-actions { justify-self: start; }
  .cx-search { min-width: 0; width: 100%; }
  .cx-desk { grid-template-columns: minmax(0,1fr); }
  .cx-rail { position: static; flex-direction: row; flex-wrap: wrap; gap: 10px; min-width: 0; }
  .cx-rail-block { flex: 1 1 220px; }
  .cx-bubble { max-width: 88%; }
  .cx-people, .cx-cards, .cx-conn-grid { grid-template-columns: 1fr; }
}
/* Teléfono: el rail deja de ser una columna alta y pasa a tiras que se
   desplazan en horizontal, así las conversaciones quedan a la vista. */
@media (max-width: 620px) {
  .cx-rail-block { flex: 1 1 100%; min-width: 0; max-width: 100%; }
  .cx-rail-block .cx-acc, .cx-rail-block .cx-folder { flex: 0 0 auto; white-space: nowrap; }
  .cx-rail-folders, .cx-rail-accs {
    display: flex; flex-direction: row; gap: 8px; overflow-x: auto; padding-bottom: 4px; min-width: 0; max-width: 100%;
    scrollbar-width: none; -ms-overflow-style: none;
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 22px), transparent 100%);
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 22px), transparent 100%);
  }
  .cx-rail-folders::-webkit-scrollbar, .cx-rail-accs::-webkit-scrollbar { display: none; }
  .cx-board-title { font-size: 1.45rem; }
  .cx-bubble { max-width: 92%; }
}
@media (prefers-reduced-motion: reduce) {
  .cx-deck-card, .cx-pulse-ring, .cx-agent-led.on, .cx-conn-shine { animation: none !important; }
}

/* ============================================================
   TELÉFONO — la barra se convierte en menú lateral
   Abajo de 900px no hay ancho para 6 secciones + buscador + acciones sin que
   quede todo ilegible. En vez de apretar o de partir la barra en dos filas,
   ese mismo bloque (.topbar-panels) se despega y entra como panel desde la
   izquierda. Arriba quedan sólo la hamburguesa y la marca.
   ============================================================ */
@media (max-width: 900px){
  .nav-toggle { display: inline-flex; }
  /* backdrop-filter tiene un efecto poco obvio: convierte a .topbar en el
     "containing block" de todo lo que tenga position:fixed adentro. Con el
     efecto puesto, el panel lateral no se posicionaba contra la pantalla sino
     contra la barra, y quedaba encerrado en sus 52px de alto en vez de ocupar
     todo el lado izquierdo. Se apaga el vidrio esmerilado sólo en teléfono
     (donde además cuesta rendimiento) y el panel vuelve a medirse contra la
     pantalla. */
  .topbar { padding: 0 12px; gap: 10px; backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--color-surface); }

  .topbar-panels {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: min(290px, 86vw);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 4px;
    padding: 16px 14px calc(16px + env(safe-area-inset-bottom, 0px));
    background: var(--color-surface);
    border-right: 1px solid var(--hairline);
    box-shadow: 12px 0 32px -12px rgba(14,33,72,.28);
    overflow-y: auto;
    z-index: 200;
    transform: translateX(-101%);   /* 101% para que la sombra tampoco asome */
    transition: transform .3s var(--ease-out, cubic-bezier(.4,0,.2,1));
    visibility: hidden;
  }
  body.nav-open .topbar-panels { transform: translateX(0); visibility: visible; }

  /* Las secciones pasan a ser una lista vertical, cómoda para el dedo */
  .topbar-panels .section-nav {
    flex-direction: column;
    align-items: stretch;
    border-bottom: 1px solid var(--hairline);
    padding-bottom: 10px;
    margin-bottom: 10px;
    flex-shrink: 0;
  }
  .topbar-panels .snav-btn {
    height: auto;
    padding: 11px 12px;
    font-size: 14px;
    border-radius: var(--radius);
    justify-content: flex-start;
  }
  .topbar-panels .snav-btn::after { display: none; }   /* el subrayado no aplica en vertical */
  .topbar-panels .snav-btn.active {
    background: color-mix(in srgb, var(--color-primary) 10%, transparent);
    font-weight: 700;
  }

  /* Acciones: en columna, cada una a lo ancho del panel */
  .topbar-panels .topbar-right {
    flex-direction: column;
    align-items: stretch;
    margin-left: 0;
    gap: 8px;
    flex-wrap: nowrap;
  }
  .topbar-panels .topbar-search,
  .topbar-panels .topbar-search > div { width: 100%; min-width: 0; }
  .topbar-panels .topbar-search input[type="search"] { width: 100% !important; }
  .topbar-panels #search-results { width: 100%; right: auto; left: 0; }
  /* En el panel sí entran los tres filtros: hay ancho de sobra en vertical */
  .topbar-panels #flt-past,
  .topbar-panels #flt-current,
  .topbar-panels #flt-future { display: inline-flex !important; }
  .topbar-panels #user-name { display: block !important; padding: 2px 2px 0; }
  .topbar-panels .notif-wrap,
  .topbar-panels .voice-btn,
  .topbar-panels #snav-settings { align-self: flex-start; }

  .nav-scrim {
    display: block;
    position: fixed; inset: 0;
    background: rgba(9,17,35,.42);
    backdrop-filter: blur(2px);
    opacity: 0; pointer-events: none;
    transition: opacity .3s;
    z-index: 199;
  }
  body.nav-open .nav-scrim { opacity: 1; pointer-events: auto; }
  body.nav-open { overflow: hidden; }   /* que no scrollee el fondo con el menú abierto */
}
@media (prefers-reduced-motion: reduce){
  .topbar-panels, .nav-scrim { transition: none !important; }
}

/* Ninguna tira de pestañas se parte en dos renglones en pantallas chicas:
   se desplaza en horizontal, igual que la de Administración. */
@media (max-width: 900px){
  .admin-tabs, #section-analytics .admin-tabs, #section-admin .admin-tabs {
    flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain;
    scrollbar-width: none; -ms-overflow-style: none;
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 24px), transparent 100%);
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 24px), transparent 100%);
  }
  .admin-tabs::-webkit-scrollbar { display: none; }
  .admin-tabs > button { flex: 0 0 auto; white-space: nowrap; }
}

/* ==================================================================
   ANALYTICS · EXPORTACIÓN E INFORMES
   ------------------------------------------------------------------
   La pestaña Informes tiene su propia metáfora dentro del dialecto
   almanaque: el EXPEDIENTE. Carpetas de cartulina con pestaña, y el
   informe generado como una HOJA real —márgenes, filete superior,
   tipografía de documento— que se imprime tal cual se ve.
   ================================================================== */

/* ---- Modal de exportar / configurar informe ---- */
.an-xp { display: flex; flex-direction: column; gap: 22px; }
.an-xp-head { display: flex; align-items: center; gap: 14px; }
.an-xp-ico {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex-shrink: 0;
  background: color-mix(in srgb, var(--c-teal) 12%, transparent); color: var(--c-teal);
}
.an-xp-ico .ico { width: 20px; height: 20px; }
.an-xp-head h3 { font-family: var(--font-display); font-weight: 800; font-size: 18px; letter-spacing: -.02em; color: var(--color-primary); margin: 0; }
.an-xp-head p { font-size: 12px; color: var(--color-text-muted); margin: 3px 0 0; }
.an-xp-sec { display: flex; flex-direction: column; gap: 10px; }
.an-xp-lbl { display: flex; align-items: baseline; gap: 8px; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--color-text-subtle); }
.an-xp-hint { font-style: normal; font-size: 10px; letter-spacing: 0; text-transform: none; font-weight: 600; color: var(--color-text-subtle); opacity: .85; }
.an-xp-input {
  width: 100%; font-family: inherit; font-size: 13px; color: var(--color-primary);
  padding: 10px 13px; border-radius: var(--radius-sm); background: var(--color-surface);
  border: 1px solid var(--hairline-strong); resize: vertical;
}
.an-xp-input:focus { outline: none; border-color: var(--c-teal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-teal) 14%, transparent); }

.an-xp-blocks { display: grid; gap: 8px; }
.an-xp-blocks.two { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.an-xp-block {
  display: flex; align-items: flex-start; gap: 11px; cursor: pointer; padding: 11px 13px;
  border-radius: 13px; background: var(--color-surface); border: 1px solid var(--hairline);
  transition: border-color var(--dur-base), background var(--dur-base);
}
.an-xp-block:hover { border-color: color-mix(in srgb, var(--c-teal) 34%, transparent); }
.an-xp-block input { position: absolute; opacity: 0; width: 0; height: 0; }
.an-xp-check {
  width: 19px; height: 19px; flex-shrink: 0; margin-top: 1px; border-radius: 6px;
  display: grid; place-items: center; background: var(--color-surface-2); border: 1px solid var(--hairline-strong);
  color: transparent; transition: background var(--dur-base), border-color var(--dur-base), color var(--dur-base);
}
.an-xp-check .ico { width: 12px; height: 12px; }
.an-xp-block input:checked ~ .an-xp-check { background: var(--c-teal); border-color: var(--c-teal); color: #fff; }
.an-xp-block-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.an-xp-block-txt b { font-size: 13px; font-weight: 700; color: var(--color-primary); }
.an-xp-block-txt em { font-style: normal; font-size: 11px; line-height: 1.5; color: var(--color-text-muted); }
.an-xp-block.void { opacity: .5; cursor: default; }

.an-xp-fmts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 9px; }
.an-xp-fmt { cursor: pointer; }
.an-xp-fmt input { position: absolute; opacity: 0; width: 0; height: 0; }
.an-xp-fmt-box {
  display: flex; flex-direction: column; gap: 5px; height: 100%; padding: 14px;
  border-radius: 15px; background: var(--color-surface); border: 1px solid var(--hairline);
  transition: border-color var(--dur-base), box-shadow var(--dur-base), transform var(--dur-base) var(--ease-standard);
}
.an-xp-fmt:hover .an-xp-fmt-box { transform: translateY(-2px); }
.an-xp-fmt input:checked + .an-xp-fmt-box {
  border-color: var(--c-teal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-teal) 12%, transparent);
}
.an-xp-fmt-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--c-teal) 10%, transparent); color: var(--c-teal); }
.an-xp-fmt-ico .ico { width: 15px; height: 15px; }
.an-xp-fmt-box b { font-family: var(--font-display); font-weight: 800; font-size: 13.5px; color: var(--color-primary); }
.an-xp-fmt-box em { font-style: normal; font-size: 11px; line-height: 1.5; color: var(--color-text-muted); }

/* ---- Carpetas de plantilla ---- */
.an-sec-lbl { font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--color-text-subtle); margin: 34px 0 14px; }
.an-head + .an-sec-lbl { margin-top: 18px; }
.an-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.an-file {
  position: relative; cursor: pointer; padding: 26px 22px 18px; border-radius: 4px 16px 16px 16px;
  background: var(--color-surface); border: 1px solid var(--hairline);
  box-shadow: var(--shadow-xs);
  animation: an-file-in var(--dur-base) var(--ease-out) both; animation-delay: calc(var(--i) * 45ms);
  transition: transform var(--dur-base) var(--ease-standard), box-shadow var(--dur-base), border-color var(--dur-base);
}
@keyframes an-file-in { from { opacity: 0; transform: translateY(12px) rotate(-.4deg); } }
.an-file::before {
  /* la hoja que asoma por atrás — da el volumen de carpeta */
  content: ''; position: absolute; inset: 8px 8px auto 14px; height: 60%;
  border-radius: 10px; background: var(--color-surface); border: 1px solid var(--hairline);
  z-index: -1; transform: rotate(-1.2deg); transform-origin: bottom left;
  transition: transform var(--dur-slow) var(--ease-spring);
}
.an-file:hover { transform: translateY(-5px); box-shadow: var(--shadow-raised); border-color: color-mix(in srgb, var(--fc) 40%, var(--hairline)); }
.an-file:hover::before { transform: rotate(-3.4deg) translateY(-3px); }
.an-file-tab {
  position: absolute; top: -1px; left: -1px; width: 92px; height: 15px;
  border-radius: 4px 12px 0 0; background: var(--fc); opacity: .9;
}
.an-file-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: color-mix(in srgb, var(--fc) 12%, transparent); color: var(--fc); margin-bottom: 12px; }
.an-file-ico .ico { width: 17px; height: 17px; }
.an-file h3 { font-family: var(--font-display); font-weight: 800; font-size: 16px; letter-spacing: -.02em; color: var(--color-primary); margin: 0 0 7px; }
.an-file p { font-size: 12.5px; line-height: 1.6; color: var(--color-text-muted); margin: 0 0 12px; }
.an-file-meta { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--color-text-subtle); }
.an-file-go {
  display: flex; align-items: center; gap: 7px; margin-top: 16px; padding-top: 13px;
  border-top: 1px dashed var(--hairline-strong);
  font-size: 12px; font-weight: 800; color: var(--fc);
}
.an-file-go .ico { width: 14px; height: 14px; transition: transform var(--dur-base) var(--ease-spring); }
.an-file:hover .an-file-go .ico { transform: translateX(4px); }

/* ---- Configuraciones guardadas ---- */
.an-saved { display: flex; flex-direction: column; gap: 8px; }
.an-saved-row {
  display: flex; align-items: center; gap: 13px; padding: 13px 16px; border-radius: 14px;
  background: var(--color-surface); border: 1px solid var(--hairline);
  animation: an-file-in var(--dur-base) var(--ease-out) both; animation-delay: calc(var(--i) * 40ms);
}
.an-saved-ico { width: 32px; height: 32px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; background: var(--color-surface-2); color: var(--color-accent); }
.an-saved-ico .ico { width: 15px; height: 15px; }
.an-saved-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.an-saved-id b { font-family: var(--font-display); font-weight: 800; font-size: 14px; color: var(--color-primary); }
.an-saved-id span { font-size: 11.5px; color: var(--color-text-muted); }
.an-btn.ghost { background: transparent; border-color: transparent; padding: 9px 10px; }
.an-btn.ghost:hover { color: var(--color-danger); border-color: color-mix(in srgb, var(--color-danger) 30%, transparent); }

/* ---- Barra de la hoja ---- */
.an-page.sheet-mode { display: flex; flex-direction: column; gap: 18px; }
.an-sheet-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 16px; border-radius: 16px;
  background: var(--color-surface); border: 1px solid var(--hairline); box-shadow: var(--shadow-xs);
  position: sticky; top: 60px; z-index: 20;
}
.an-btn .ico.flip { transform: scaleX(-1); }
.an-sheet-bar-id { font-family: var(--font-display); font-weight: 800; font-size: 14px; color: var(--color-primary); }
.an-sheet-bar-sp { flex: 1; }

/* ---- La hoja ---- */
.an-sheet {
  max-width: 940px; margin: 0 auto 60px; padding: 54px 60px 44px;
  background: #fff; border: 1px solid var(--hairline); border-radius: 6px;
  box-shadow: 0 22px 60px rgba(14,33,72,.10);
  color: #14161a;
}
.an-sheet-head { padding-bottom: 26px; border-bottom: 3px solid var(--ac); margin-bottom: 34px; }
.an-sheet-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 26px; }
.an-sheet-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--ac); flex-shrink: 0; }
.an-sheet-brand b { display: block; font-family: var(--font-display); font-weight: 800; font-size: 14.5px; letter-spacing: -.02em; color: #14161a; }
.an-sheet-brand span { font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #7a8496; }
.an-sheet-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.08; letter-spacing: -.035em; color: #14161a; margin: 0 0 14px; }
.an-sheet-when { display: flex; flex-direction: column; gap: 3px; margin: 0 0 6px; }
.an-sheet-when b { font-size: 15px; font-weight: 700; color: #2b3648; }
.an-sheet-when span { font-size: 12.5px; color: #7a8496; }
.an-sheet-stamp { font-size: 11px; color: #9aa3b2; margin: 0; }

.an-rsec { margin-bottom: 38px; break-inside: avoid; }
.an-rsec-title {
  font-family: var(--font-display); font-weight: 800; font-size: 17px; letter-spacing: -.02em; color: #14161a;
  margin: 0 0 5px; padding-left: 13px; border-left: 3px solid var(--ac);
}
.an-rsec-sub { font-size: 12.5px; line-height: 1.6; color: #7a8496; margin: 0 0 16px; padding-left: 16px; }

/* Conclusiones en texto — lo que convierte la planilla en informe */
.an-rfinds { display: flex; flex-direction: column; gap: 10px; }
.an-rfind { position: relative; padding: 14px 18px 14px 20px; border-radius: 4px 12px 12px 4px; background: #f7f8fa; border-left: 3px solid #c3cad6; }
.an-rfind.up   { border-left-color: #0f9d68; background: #f2faf6; }
.an-rfind.down { border-left-color: #e11d64; background: #fdf3f6; }
.an-rfind.flat { border-left-color: #94a3b8; }
.an-rfind.info { border-left-color: var(--ac); }
.an-rfind b { display: block; font-family: var(--font-display); font-weight: 800; font-size: 12.5px; letter-spacing: .02em; color: #14161a; margin-bottom: 4px; }
.an-rfind p { font-size: 13px; line-height: 1.68; color: #3c4658; margin: 0; }

/* Tablas de documento — hairlines, cifras alineadas a la derecha */
.an-rtable { width: 100%; border-collapse: collapse; margin-bottom: 14px; font-size: 12.5px; }
.an-rtable th {
  text-align: left; font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: #7a8496;
  padding: 0 10px 8px; border-bottom: 1.5px solid #d8dee8;
}
.an-rtable td { padding: 9px 10px; border-bottom: 1px solid #edf0f4; color: #2b3648; }
.an-rtable .num { text-align: right; font-variant-numeric: tabular-nums; }
.an-rtable tbody tr:last-child td { border-bottom: none; }
.an-rtable.compact td, .an-rtable.compact th { padding-top: 6px; padding-bottom: 6px; }
.an-rtag { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--ac); background: color-mix(in srgb, var(--ac) 12%, transparent); padding: 2px 7px; border-radius: 999px; }
.an-rdelta { font-weight: 800; font-size: 11.5px; }
.an-rdelta.up { color: #0f9d68; }
.an-rdelta.down { color: #e11d64; }
.an-rdelta.flat { color: #94a3b8; }
.an-rvoid { font-size: 12.5px; font-style: italic; color: #9aa3b2; padding: 10px 0; }
.an-rnotes { font-size: 13px; line-height: 1.75; color: #3c4658; margin: 0; padding: 14px 18px; background: #f7f8fa; border-radius: 12px; }
.an-rnotes.empty { font-style: italic; color: #9aa3b2; }

.an-rsplit { margin-top: 18px; }
.an-rsplit-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: #edf0f4; }
.an-rsplit-bar i { display: block; width: var(--w); }
.an-rsplit-bar .a { background: #0f9d68; }
.an-rsplit-bar .b { background: #e6b53d; }
.an-rsplit-keys { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 9px; font-size: 12px; color: #7a8496; }
.an-rsplit-keys span { display: flex; align-items: center; gap: 7px; }
.an-rsplit-keys i { width: 9px; height: 9px; border-radius: 3px; }
.an-rsplit-keys .a { background: #0f9d68; }
.an-rsplit-keys .b { background: #e6b53d; }
.an-rsplit-keys b { color: #14161a; font-weight: 700; }

.an-rbars { display: flex; align-items: flex-end; gap: 10px; height: 120px; margin-top: 20px; }
.an-rbar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.an-rbar i { display: block; width: 100%; max-width: 46px; height: var(--h); border-radius: 5px 5px 0 0; background: #d8dee8; }
.an-rbar.best i { background: var(--ac); }
.an-rbar u { text-decoration: none; font-size: 10.5px; font-weight: 700; color: #7a8496; }
.an-rbar em { font-style: normal; font-size: 10px; color: #9aa3b2; font-variant-numeric: tabular-nums; }
.an-ralman { margin-top: 6px; }

.an-sheet-foot {
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  margin-top: 44px; padding-top: 16px; border-top: 1px solid #e4e8ee;
  font-size: 10.5px; color: #9aa3b2;
}

@media (max-width: 820px) {
  .an-sheet { padding: 30px 22px 28px; }
  .an-sheet-bar { position: static; }
  .an-files { grid-template-columns: 1fr; }
  .an-saved-row { flex-wrap: wrap; }
}

/* ---- Impresión: sale la hoja sola, sin la app alrededor ---- */
@media print {
  body { background: #fff !important; }
  .topbar, .admin-tabs, .an-period, .an-sheet-bar, .no-print,
  #login-screen, .modal-overlay, .loading-overlay, .section-nav { display: none !important; }
  .app { padding: 0 !important; }
  .an-sheet {
    max-width: none; margin: 0; padding: 0 6mm; border: none; border-radius: 0; box-shadow: none;
  }
  .an-rsec { page-break-inside: avoid; }
  .an-sheet-head { page-break-after: avoid; }
  .an-rtable { font-size: 10.5pt; }
  @page { margin: 14mm 12mm; }
}

/* ==================================================================
   CONFIGURACIÓN v11 — "EL TALLER"
   ------------------------------------------------------------------
   Sexto dialecto (ver DESIGN.md §6.2). Acá no se mira: se ajusta. La
   gramática es la de un taller — fichas técnicas, interruptores con
   volumen que se hunden al encenderse, diagramas que muestran cómo
   encadena una cosa con la otra — sobre acero azulado.
   Ninguna otra sección usa este acento ni estas piezas.
   ================================================================== */

#section-settings { --st: #4a6b8a; --st-soft: #eef3f8; --sec-accent: var(--st); --sec-accent-soft: var(--st-soft); }

@keyframes st-in     { from { opacity: 0; transform: translateY(10px); } }
@keyframes st-spin   { to { transform: rotate(360deg); } }
@keyframes st-spin-r { to { transform: rotate(-360deg); } }
@keyframes st-slide  { 0%,100% { transform: translateX(0); } 50% { transform: translateX(22px); } }

.st-shell { display: flex; flex-direction: column; gap: 20px; padding-bottom: 50px; }

/* ---------- Encabezado con engranajes ---------- */
.st-hero {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0,1fr) 260px; gap: 26px; align-items: center;
  padding: 26px 30px; border-radius: 24px;
  background:
    radial-gradient(760px 240px at 88% -30%, color-mix(in srgb, var(--st) 15%, transparent), transparent 68%),
    var(--color-surface);
  border: 1px solid var(--hairline);
}
.st-hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 10.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--st); }
.st-hero-eyebrow .ico { width: 14px; height: 14px; }
.st-hero-title { font-family: var(--font-display); font-weight: 800; letter-spacing: -.035em; font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.06; color: var(--color-primary); margin: 11px 0 9px; }
.st-hero-sub { font-size: 14px; line-height: 1.65; color: var(--color-text-muted); max-width: 64ch; }
.st-hero-art { justify-self: end; }
.st-art { width: 240px; height: 150px; overflow: visible; }
.st-art path, .st-art circle { fill: none; stroke: var(--st); stroke-width: 2; stroke-linecap: round; }
.st-art .st-art-gear.big   { transform-origin: 86px 62px; animation: st-spin 26s linear infinite; opacity: .55; }
.st-art .st-art-gear.small { transform-origin: 146px 96px; animation: st-spin-r 17s linear infinite; opacity: .38; }
.st-art .hole { fill: color-mix(in srgb, var(--st) 14%, transparent); }
.st-art .plate { fill: color-mix(in srgb, var(--st) 7%, transparent); stroke-width: 1.6; opacity: .8; }
.st-art .knob { fill: var(--color-surface); stroke-width: 2.4; opacity: .6; }
.st-art .knob.on { fill: var(--st); stroke: var(--st); opacity: 1; }
.st-art .rail { stroke-width: 3; opacity: .3; }
.st-art .slider { fill: var(--st); stroke: none; animation: st-slide 5.5s var(--ease-standard) infinite; }

/* ---------- Layout ---------- */
.st-layout { display: grid; grid-template-columns: 250px minmax(0,1fr); gap: 20px; align-items: start; }

/* ---------- Rail agrupado ---------- */
.st-rail { position: sticky; top: 66px; display: flex; flex-direction: column; gap: 18px; }
.st-rail-group { display: flex; flex-direction: column; gap: 3px; }
.st-rail-title { font-size: 9.5px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; color: var(--color-text-subtle); padding: 0 12px 5px; }
.st-rail-item {
  display: flex; align-items: center; gap: 11px; width: 100%; cursor: pointer; text-align: left;
  padding: 10px 12px; border-radius: 13px; background: transparent; border: 1px solid transparent;
  font-family: inherit; color: var(--color-text-secondary);
  transition: background var(--dur-base), border-color var(--dur-base), transform var(--dur-base) var(--ease-standard);
}
.st-rail-item:hover { background: var(--color-surface); border-color: var(--hairline); transform: translateX(2px); }
.st-rail-ico { width: 30px; height: 30px; flex-shrink: 0; border-radius: 9px; display: grid; place-items: center; background: var(--color-surface-2); color: var(--st); transition: background var(--dur-base), color var(--dur-base); }
.st-rail-ico .ico { width: 15px; height: 15px; }
.st-rail-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.st-rail-txt b { font-size: 13px; font-weight: 700; color: var(--color-primary); }
.st-rail-txt em { font-style: normal; font-size: 10.5px; color: var(--color-text-subtle); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-rail-item.active { background: var(--color-surface); border-color: color-mix(in srgb, var(--st) 34%, transparent); box-shadow: var(--shadow-xs); }
.st-rail-item.active .st-rail-ico { background: var(--st); color: #fff; }
.st-rail-item.active .st-rail-txt b { color: var(--st); }
.st-rail-role {
  display: flex; align-items: flex-start; gap: 10px; margin-top: 4px; padding: 12px 13px; border-radius: 14px;
  background: color-mix(in srgb, var(--st) 6%, var(--color-surface)); border: 1px solid color-mix(in srgb, var(--st) 16%, transparent);
}
.st-rail-role-ic { width: 26px; height: 26px; flex-shrink: 0; border-radius: 8px; display: grid; place-items: center; background: color-mix(in srgb, var(--st) 14%, transparent); color: var(--st); }
.st-rail-role-ic .ico { width: 13px; height: 13px; }
.st-rail-role b { display: block; font-size: 12px; font-weight: 800; color: var(--color-primary); text-transform: capitalize; }
.st-rail-role span { font-size: 10.5px; line-height: 1.5; color: var(--color-text-muted); }

/* ---------- Contenido ---------- */
.st-content { display: flex; flex-direction: column; gap: 16px; min-width: 0; animation: st-in var(--dur-base) var(--ease-out); }

.st-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 2px; }
.st-head-id { display: flex; align-items: flex-start; gap: 13px; min-width: 0; }
.st-head-ico { width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--st) 11%, transparent); color: var(--st); }
.st-head-ico .ico { width: 19px; height: 19px; }
.st-head h2 { font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: -.025em; color: var(--color-primary); margin: 2px 0 0; }
.st-head p { font-size: 13px; line-height: 1.6; color: var(--color-text-muted); margin: 5px 0 0; max-width: 72ch; }
.st-head-acts { display: flex; gap: 8px; flex-wrap: wrap; }

.st-sec-lbl { display: flex; align-items: center; gap: 9px; font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--color-text-subtle); margin: 16px 0 2px; }
.st-sec-lbl .ico { width: 14px; height: 14px; color: var(--st); }
.st-sec-lbl em { font-style: normal; font-weight: 600; letter-spacing: 0; text-transform: none; font-size: 11px; opacity: .85; }

/* ---------- Ficha ---------- */
.st-card {
  padding: 20px 22px; border-radius: 18px;
  background: var(--color-surface); border: 1px solid var(--hairline);
  animation: st-in var(--dur-base) var(--ease-out) both;
}
.st-card.tone-info   { background: color-mix(in srgb, var(--st) 4%, var(--color-surface)); border-color: color-mix(in srgb, var(--st) 18%, transparent); }
.st-card.tone-accent { border-color: color-mix(in srgb, var(--st) 30%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--st) 7%, transparent); }
.st-card-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.st-card-ico { width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--st) 10%, transparent); color: var(--st); }
.st-card-ico .ico { width: 16px; height: 16px; }
.st-card-id { flex: 1; min-width: 0; }
.st-card-id h3 { font-family: var(--font-display); font-weight: 800; font-size: 15px; letter-spacing: -.015em; color: var(--color-primary); margin: 3px 0 0; }
.st-card-id p { font-size: 12.5px; line-height: 1.6; color: var(--color-text-muted); margin: 5px 0 0; max-width: 76ch; }
.st-card-note {
  display: flex; align-items: flex-start; gap: 9px; margin-top: 16px; padding-top: 13px;
  border-top: 1px dashed var(--hairline-strong); font-size: 11.5px; line-height: 1.6; color: var(--color-text-muted);
}
.st-card-note .ico { width: 14px; height: 14px; flex-shrink: 0; margin-top: 1px; color: var(--st); }

/* ---------- Campos ---------- */
.st-grid { display: grid; grid-template-columns: repeat(var(--cols,2), minmax(0,1fr)); gap: 14px 16px; }
.st-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.st-field.wide { grid-column: 1 / -1; }
.st-field > label { display: flex; align-items: baseline; gap: 7px; font-size: 11.5px; font-weight: 700; color: var(--color-text-secondary); }
.st-field > label em { font-style: normal; font-size: 10px; font-weight: 600; color: var(--color-text-subtle); }
.st-field input[type="text"], .st-field input[type="email"], .st-field input[type="url"],
.st-field input[type="password"], .st-field input[type="number"], .st-field input[type="date"],
.st-field input[type="time"], .st-field textarea, .st-field select {
  width: 100%; font-family: inherit; font-size: 13px; color: var(--color-primary);
  padding: 10px 12px; border-radius: 11px; background: var(--color-surface);
  border: 1px solid var(--hairline-strong); transition: border-color var(--dur-base), box-shadow var(--dur-base);
}
.st-field textarea { resize: vertical; line-height: 1.6; }
.st-field input:focus, .st-field textarea:focus, .st-field select:focus {
  outline: none; border-color: var(--st); box-shadow: 0 0 0 3px color-mix(in srgb, var(--st) 14%, transparent);
}
.st-hint { font-size: 11px; line-height: 1.55; color: var(--color-text-subtle); }
.st-hint code { font-family: var(--font-mono); font-size: 10.5px; background: var(--color-surface-2); padding: 1px 5px; border-radius: 4px; }
.st-hidden-select { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.st-unit { display: flex; align-items: center; gap: 8px; }
.st-unit input { width: 96px !important; }
.st-unit span { font-size: 11.5px; color: var(--color-text-subtle); }

/* ---------- Botones ---------- */
.st-btn {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer; white-space: nowrap;
  font-family: var(--font-body); font-size: 12px; font-weight: 700; color: var(--color-text-secondary); text-decoration: none;
  padding: 9px 14px; border-radius: 11px; background: var(--color-surface); border: 1px solid var(--hairline-strong);
  transition: color var(--dur-base), border-color var(--dur-base), transform var(--dur-base) var(--ease-standard), background var(--dur-base);
}
.st-btn:hover { color: var(--st); border-color: var(--st); transform: translateY(-2px); }
.st-btn .ico { width: 14px; height: 14px; }
.st-btn span { color: inherit; font: inherit; }
.st-btn.solid { background: var(--st); color: #fff; border-color: transparent; box-shadow: 0 6px 18px color-mix(in srgb, var(--st) 26%, transparent); }
.st-btn.solid:hover { color: #fff; filter: brightness(1.08); }
.st-btn.danger { color: var(--color-danger); border-color: color-mix(in srgb, var(--color-danger) 26%, transparent); }
.st-btn.danger:hover { background: var(--color-danger); color: #fff; border-color: transparent; }
.st-btn.on { background: color-mix(in srgb, var(--st) 12%, transparent); border-color: var(--st); color: var(--st); }
.st-btn.ok { color: var(--color-green); border-color: var(--color-green); }
.st-btn.ai { color: var(--c-violet); border-color: color-mix(in srgb, var(--c-violet) 30%, transparent); background: var(--c-violet-soft); }
.st-btn.ai:hover { border-color: var(--c-violet); }
.st-file { position: relative; overflow: hidden; }
.st-file input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.st-icon-btn {
  width: 32px; height: 32px; flex-shrink: 0; display: grid; place-items: center; cursor: pointer;
  border-radius: 10px; background: var(--color-surface); border: 1px solid var(--hairline); color: var(--color-text-muted);
  transition: color var(--dur-base), border-color var(--dur-base), transform var(--dur-base) var(--ease-standard);
}
.st-icon-btn:hover { color: var(--st); border-color: var(--st); transform: translateY(-2px); }
.st-icon-btn.danger:hover { color: var(--color-danger); border-color: var(--color-danger); }
.st-icon-btn .ico { width: 14px; height: 14px; }

.st-savebar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 8px; padding: 13px 16px; border-radius: 15px;
  background: color-mix(in srgb, var(--color-surface) 88%, transparent);
  backdrop-filter: blur(10px); border: 1px solid var(--hairline); box-shadow: var(--shadow-sm);
}
.st-savebar.tight { margin-top: 16px; padding: 0; background: none; border: none; box-shadow: none; backdrop-filter: none; }
.st-savebar-hint { font-size: 11.5px; color: var(--color-text-muted); }
.st-ok { display: none; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--color-green); }
.st-ok .ico { width: 14px; height: 14px; }

/* ---------- Interruptor con volumen (firma) ---------- */
.st-sw-row { display: flex; align-items: flex-start; gap: 13px; padding: 11px 0; }
.st-sw { position: relative; flex-shrink: 0; cursor: pointer; margin-top: 1px; }
.st-sw input { position: absolute; opacity: 0; width: 0; height: 0; }
.st-sw-body {
  display: block; width: 46px; height: 26px; border-radius: 999px; position: relative;
  background: var(--color-surface-2);
  box-shadow: inset 0 2px 5px rgba(14,33,72,.16), inset 0 -1px 0 rgba(255,255,255,.7);
  border: 1px solid var(--hairline-strong);
  transition: background var(--dur-base), border-color var(--dur-base);
}
.st-sw-body i {
  position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: linear-gradient(180deg, #fff, #e8edf4);
  box-shadow: 0 2px 6px rgba(14,33,72,.24), 0 0 0 1px rgba(14,33,72,.06);
  transition: transform var(--dur-base) var(--ease-spring), background var(--dur-base);
}
.st-sw input:checked + .st-sw-body { background: var(--st); border-color: transparent; box-shadow: inset 0 2px 6px color-mix(in srgb, #000 24%, transparent); }
.st-sw input:checked + .st-sw-body i { transform: translateX(20px); background: linear-gradient(180deg, #fff, #dbe6f2); }
.st-sw input:focus-visible + .st-sw-body { box-shadow: 0 0 0 3px color-mix(in srgb, var(--st) 24%, transparent); }
.st-sw-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.st-sw-txt b { font-size: 13px; font-weight: 700; color: var(--color-primary); }
.st-sw-txt span { font-size: 11.5px; line-height: 1.55; color: var(--color-text-muted); }

/* ---------- LED de estado ---------- */
.st-led {
  display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px;
}
.st-led .ico { width: 11px; height: 11px; }
.st-led.on  { color: var(--color-green); background: var(--color-green-light); }
.st-led.off { color: var(--color-text-subtle); background: var(--color-surface-2); }
.st-led.off::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .5; }

/* ---------- Diagrama de pasos ---------- */
.st-flow { display: flex; align-items: stretch; gap: 4px; flex-wrap: wrap; }
.st-flow-step {
  flex: 1 1 130px; min-width: 0; display: flex; flex-direction: column; gap: 4px;
  padding: 14px 15px; border-radius: 14px;
  background: color-mix(in srgb, var(--st) 5%, var(--color-surface)); border: 1px solid color-mix(in srgb, var(--st) 15%, transparent);
  animation: st-in var(--dur-base) var(--ease-out) both; animation-delay: calc(var(--i) * 70ms);
}
.st-flow-step.muted { background: var(--color-surface-2); border-style: dashed; }
.st-flow-step.final { background: var(--st); border-color: transparent; }
.st-flow-n { font-size: 9.5px; font-weight: 800; letter-spacing: .1em; color: var(--st); opacity: .7; }
.st-flow-step.final .st-flow-n { color: rgba(255,255,255,.75); }
.st-flow-ico { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: color-mix(in srgb, var(--st) 12%, transparent); color: var(--st); margin-bottom: 2px; }
.st-flow-step.final .st-flow-ico { background: rgba(255,255,255,.2); color: #fff; }
.st-flow-ico .ico { width: 13px; height: 13px; }
.st-flow-lbl { font-size: 12px; font-weight: 700; color: var(--color-primary); }
.st-flow-step.final .st-flow-lbl { color: #fff; }
.st-flow-val { font-family: var(--font-display); font-weight: 800; font-size: 16px; letter-spacing: -.02em; color: var(--st); font-variant-numeric: tabular-nums; }
.st-flow-step.final .st-flow-val { color: #fff; }
.st-flow-sub { font-size: 10.5px; line-height: 1.45; color: var(--color-text-subtle); }
.st-flow-step.final .st-flow-sub { color: rgba(255,255,255,.78); }
.st-flow-arrow { display: grid; place-items: center; flex: 0 0 22px; color: var(--color-text-subtle); }
.st-flow-arrow .ico { width: 15px; height: 15px; }

/* ---------- Piezas sueltas ---------- */
.st-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.st-stat {
  display: inline-flex; align-items: center; gap: 11px; padding: 11px 16px 11px 12px; border-radius: 14px;
  background: color-mix(in srgb, var(--sc) 6%, var(--color-surface)); border: 1px solid color-mix(in srgb, var(--sc) 20%, transparent);
}
.st-stat-ico { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--sc) 14%, transparent); color: var(--sc); }
.st-stat-ico .ico { width: 14px; height: 14px; }
.st-stat b { font-family: var(--font-display); font-weight: 800; font-size: 16px; letter-spacing: -.02em; color: var(--color-primary); }
.st-stat em { font-style: normal; font-size: 10.5px; color: var(--color-text-muted); display: block; }
.st-stat > b + em { margin-top: 1px; }
.st-stat > b { display: block; }

.st-note {
  display: flex; align-items: flex-start; gap: 11px; padding: 13px 16px; border-radius: 14px;
  font-size: 12.5px; line-height: 1.65; color: var(--color-text-secondary);
  background: color-mix(in srgb, var(--st) 6%, var(--color-surface)); border: 1px solid color-mix(in srgb, var(--st) 18%, transparent);
}
.st-note .ico { width: 15px; height: 15px; flex-shrink: 0; margin-top: 2px; color: var(--st); }
.st-note.warn { background: #fffaf0; border-color: #ffd591; color: #8a5a00; }
.st-note.warn .ico { color: #d97706; }
.st-note.info { background: var(--c-indigo-soft); border-color: color-mix(in srgb, var(--c-indigo) 26%, transparent); color: #2c2a86; }
.st-note.info .ico { color: var(--c-indigo); }
.st-note a { color: var(--st); font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

.st-void { font-size: 12.5px; line-height: 1.6; color: var(--color-text-muted); font-style: italic; margin: 0; }
.st-void.tight { font-size: 12px; margin: -2px 0 4px; }

.st-empty {
  display: flex; flex-direction: column; align-items: center; gap: 9px; text-align: center;
  padding: 44px 24px; border-radius: 18px;
  background: var(--color-surface); border: 1px dashed var(--hairline-strong);
}
.st-empty-ico { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: color-mix(in srgb, var(--st) 9%, transparent); color: var(--st); }
.st-empty-ico .ico { width: 20px; height: 20px; }
.st-empty b { font-family: var(--font-display); font-weight: 800; font-size: 15px; color: var(--color-primary); }
.st-empty > span { font-size: 12.5px; line-height: 1.65; color: var(--color-text-muted); max-width: 56ch; }
.st-empty .st-btn { margin-top: 6px; }

.st-copy { display: flex; flex-direction: column; gap: 6px; }
.st-copy-lbl { font-size: 11.5px; font-weight: 700; color: var(--color-text-secondary); }
.st-copy-row { display: flex; gap: 8px; align-items: center; }
.st-copy-row input {
  flex: 1; min-width: 0; font-family: var(--font-mono); font-size: 11px; color: var(--color-text-secondary);
  padding: 10px 12px; border-radius: 11px; background: var(--color-surface-2); border: 1px solid var(--hairline);
}
.st-details { margin-top: 12px; font-size: 12px; }
.st-details summary { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 700; color: var(--st); list-style: none; }
.st-details summary::-webkit-details-marker { display: none; }
.st-details summary .ico { width: 14px; height: 14px; }
.st-details p { margin: 9px 0 0; line-height: 1.65; color: var(--color-text-muted); }
.st-details code { font-family: var(--font-mono); font-size: 10.5px; background: var(--color-surface-2); padding: 2px 6px; border-radius: 5px; word-break: break-word; }

.st-kv { display: flex; gap: 34px; flex-wrap: wrap; }
.st-kv > div { display: flex; flex-direction: column; gap: 3px; }
.st-kv span { font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--color-text-subtle); }
.st-kv b { font-size: 13px; color: var(--color-primary); }

/* ---------- General: tipo de propiedad y relojes ---------- */
.st-ptypes { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 9px; margin-bottom: 16px; }
.st-ptype {
  display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; font-family: inherit;
  padding: 15px 10px; border-radius: 14px; background: var(--color-surface); border: 1px solid var(--hairline);
  transition: border-color var(--dur-base), transform var(--dur-base) var(--ease-standard), background var(--dur-base);
}
.st-ptype:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--st) 34%, transparent); }
.st-ptype-ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--color-surface-2); color: var(--color-text-muted); transition: background var(--dur-base), color var(--dur-base); }
.st-ptype-ico .ico { width: 16px; height: 16px; }
.st-ptype b { font-size: 12px; font-weight: 700; color: var(--color-text-secondary); }
.st-ptype.on { background: color-mix(in srgb, var(--st) 7%, var(--color-surface)); border-color: var(--st); box-shadow: 0 0 0 3px color-mix(in srgb, var(--st) 10%, transparent); }
.st-ptype.on .st-ptype-ico { background: var(--st); color: #fff; }
.st-ptype.on b { color: var(--st); }

.st-two-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.st-fact { display: flex; align-items: flex-start; gap: 11px; padding: 13px 15px; border-radius: 13px; background: var(--color-surface-2); }
.st-fact-ico { width: 28px; height: 28px; flex-shrink: 0; border-radius: 9px; display: grid; place-items: center; background: var(--color-surface); color: var(--st); }
.st-fact-ico .ico { width: 14px; height: 14px; }
.st-fact b { display: block; font-size: 12.5px; font-weight: 700; color: var(--color-primary); margin-bottom: 2px; }
.st-fact span { font-size: 11.5px; line-height: 1.55; color: var(--color-text-muted); }

.st-clocks { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.st-clock { flex: 1 1 180px; display: flex; flex-direction: column; gap: 8px; padding: 15px 17px; border-radius: 15px; background: var(--color-surface-2); border: 1px solid var(--hairline); }
.st-clock-lbl { display: flex; align-items: center; gap: 7px; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--color-text-subtle); }
.st-clock-lbl .ico { width: 13px; height: 13px; }
.st-clock.out .st-clock-lbl .ico { transform: scaleX(-1); }
.st-clock input {
  font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -.02em; color: var(--color-primary);
  padding: 6px 10px; border-radius: 10px; background: var(--color-surface); border: 1px solid var(--hairline-strong);
}
.st-clock input:focus { outline: none; border-color: var(--st); box-shadow: 0 0 0 3px color-mix(in srgb, var(--st) 14%, transparent); }
.st-clock.in  { border-left: 3px solid var(--color-green); }
.st-clock.out { border-left: 3px solid #d97706; }
.st-clock-arrow { display: flex; flex-direction: column; align-items: center; gap: 5px; color: var(--color-text-subtle); font-size: 10px; }
.st-clock-arrow .ico { width: 20px; height: 20px; opacity: .5; }

/* ---------- Apariencia ---------- */
.st-brand { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 16px; align-items: start; }
.st-brand-controls { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.st-swatches { display: grid; grid-template-columns: repeat(auto-fit, minmax(94px, 1fr)); gap: 9px; margin-bottom: 16px; }
/* Gana al `.color-swatch` global (círculo de 24 px) sin tocarlo: acá la
   muestra es una tarjeta con el nombre del color debajo. */
.color-swatch.st-swatch {
  display: flex; flex-direction: column; align-items: stretch; gap: 7px; cursor: pointer; font-family: inherit;
  width: auto; height: auto; flex-shrink: 1;
  padding: 11px 9px; border-radius: 13px; background: var(--color-surface); border: 1px solid var(--hairline);
  box-shadow: none;
  transition: transform var(--dur-base) var(--ease-standard), border-color var(--dur-base), box-shadow var(--dur-base);
}
.color-swatch.st-swatch:hover { transform: translateY(-3px); }
.st-swatch-chip { width: 100%; height: 30px; border-radius: 9px; background: var(--sw); box-shadow: inset 0 -2px 6px rgba(0,0,0,.18); }
.st-swatch em { font-style: normal; font-size: 10.5px; font-weight: 600; line-height: 1.3; color: var(--color-text-muted); text-align: center; }
.color-swatch.st-swatch.selected { border-color: var(--sw); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sw) 22%, transparent); }
.color-swatch.st-swatch.selected em { color: var(--color-primary); font-weight: 700; }
.st-colorpick { display: flex; align-items: center; gap: 11px; }
.st-colorpick input[type="color"] { width: 56px !important; height: 42px !important; padding: 3px !important; border-radius: 11px !important; border: 1px solid var(--hairline-strong) !important; cursor: pointer; flex-shrink: 0; }
.st-colorpick-hex { font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--color-text-secondary); }

.st-brand-preview { position: sticky; top: 66px; display: flex; flex-direction: column; gap: 10px; }
.st-preview-lbl { display: flex; align-items: center; gap: 7px; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--color-text-subtle); }
.st-preview-lbl .ico { width: 13px; height: 13px; color: var(--st); }
.st-mock {
  border-radius: 16px; overflow: hidden; background: var(--color-bg);
  border: 1px solid var(--hairline); box-shadow: var(--shadow-sm);
}
.st-mock-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--mc); }
.st-mock-logo { font-family: var(--font-display); font-weight: 800; font-size: 12px; color: #fff; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 120px; }
.st-mock-nav { display: flex; gap: 6px; margin-left: auto; }
.st-mock-nav i { width: 16px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.35); }
.st-mock-nav i.on { background: #fff; width: 22px; }
.st-mock-dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,.4); }
.st-mock-body { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.st-mock-card { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; background: var(--color-surface); border: 1px solid var(--hairline); }
.st-mock-line { height: 6px; border-radius: 3px; background: var(--color-surface-2); }
.st-mock-line.w60 { flex: 1; }
.st-mock-btn { width: 46px; height: 18px; border-radius: 6px; background: var(--mc); }
.st-mock-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.st-mock-grid i { height: 16px; border-radius: 4px; background: var(--color-surface); border: 1px solid var(--hairline); }
.st-mock-grid i.busy { background: var(--mc); border-color: transparent; opacity: .82; }
.st-logo-preview { display: flex; align-items: center; justify-content: center; min-height: 58px; padding: 10px; border-radius: 13px; background: var(--color-surface-2); border: 1px dashed var(--hairline-strong); }
.st-logo-preview img { max-height: 40px; max-width: 100%; border-radius: 6px; }
.st-logo-preview span { font-size: 11px; color: var(--color-text-subtle); }

/* ---------- Seguridad ---------- */
.st-sec { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.st-meter { display: flex; flex-direction: column; gap: 6px; margin: -4px 0 14px; }
.st-meter-bar { height: 6px; border-radius: 999px; background: var(--color-surface-2); overflow: hidden; }
.st-meter-bar i { display: block; height: 100%; width: var(--w); border-radius: 999px; background: var(--color-text-subtle); transition: width var(--dur-base) var(--ease-standard), background var(--dur-base); }
.st-meter-txt { font-size: 11px; color: var(--color-text-muted); }
.st-meter.weak   .st-meter-bar i { background: var(--color-danger); }
.st-meter.mid    .st-meter-bar i { background: #d97706; }
.st-meter.good   .st-meter-bar i { background: #0f9d68; }
.st-meter.strong .st-meter-bar i { background: var(--color-green); }
.st-session { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 12px 14px; align-items: center; }
.st-session-av { width: 46px; height: 46px; border-radius: 14px; overflow: hidden; }
.st-session-av .ar-avatar, .st-session-av > span { width: 46px; height: 46px; font-size: 16px; border-radius: 14px; }
.st-session-id { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.st-session-id b { font-size: 13.5px; color: var(--color-primary); overflow-wrap: anywhere; }
.st-role-chip { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; padding: 3px 9px; border-radius: 999px; background: var(--color-surface-2); color: var(--color-text-muted); }
.st-role-chip .ico { width: 11px; height: 11px; }
.st-role-chip.role-admin { background: var(--c-violet-soft); color: var(--c-violet); }
.st-role-chip.role-staff { background: var(--color-green-light); color: var(--color-green); }
.st-session-desc { grid-column: 1 / -1; font-size: 12px; line-height: 1.6; color: var(--color-text-muted); margin: 0; }
.st-session-acts { grid-column: 1 / -1; }

/* ---------- Habitaciones ---------- */
.st-folders { display: flex; gap: 10px; flex-wrap: wrap; }
.st-folder {
  position: relative; display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 15px 14px 12px; border-radius: 4px 13px 13px 13px; min-width: 190px;
  background: var(--color-surface); border: 1px solid var(--hairline);
  animation: st-in var(--dur-base) var(--ease-out) both; animation-delay: calc(var(--i) * 45ms);
  transition: transform var(--dur-base) var(--ease-standard), border-color var(--dur-base), box-shadow var(--dur-base);
}
.st-folder:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--st) 40%, transparent); box-shadow: var(--shadow-sm); }
.st-folder-tab { position: absolute; top: -1px; left: -1px; width: 68px; height: 12px; border-radius: 4px 10px 0 0; background: var(--st); opacity: .85; }
.st-folder-grip { color: var(--color-text-subtle); cursor: grab; }
.st-folder-grip .ico { width: 14px; height: 14px; }
.st-folder-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.st-folder-id b { font-size: 13px; font-weight: 700; color: var(--color-primary); }
.st-folder-id span { font-size: 10.5px; color: var(--color-text-muted); }
.st-folder-edit { color: var(--color-text-subtle); }
.st-folder-edit .ico { width: 14px; height: 14px; }
.st-folder:hover .st-folder-edit { color: var(--st); }

.st-rooms { display: flex; flex-direction: column; gap: 10px; }
.st-room {
  padding: 15px 17px; border-radius: 16px;
  background: var(--color-surface); border: 1px solid var(--hairline); border-left: 3px solid var(--rc);
  animation: st-in var(--dur-base) var(--ease-out) both; animation-delay: calc(var(--i) * 32ms);
  transition: box-shadow var(--dur-base), transform var(--dur-base) var(--ease-standard);
}
.st-room:hover { box-shadow: var(--shadow-sm); }
.st-room-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.st-room-grip { cursor: grab; color: var(--color-text-subtle); flex-shrink: 0; padding: 2px; }
.st-room-grip .ico { width: 15px; height: 15px; }
.st-room-id { flex: 1; min-width: 150px; }
.st-room-id b { font-family: var(--font-display); font-weight: 800; font-size: 15px; letter-spacing: -.02em; color: var(--color-primary); }
.st-room-meta { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-top: 3px; }
.st-room-kind { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--rc); background: color-mix(in srgb, var(--rc) 11%, transparent); padding: 3px 9px; border-radius: 999px; }
.st-room-kind .ico { width: 11px; height: 11px; }
.st-room-meta em { font-style: normal; font-size: 11px; color: var(--color-text-subtle); }
.st-room-grp { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--color-text-muted); }
.st-room-grp .ico { width: 12px; height: 12px; }
.st-room-price { text-align: right; flex-shrink: 0; }
.st-room-price b { display: block; font-family: var(--font-display); font-weight: 800; font-size: 16px; letter-spacing: -.02em; color: var(--color-primary); font-variant-numeric: tabular-nums; }
.st-room-price em { font-style: normal; font-size: 10px; color: var(--color-text-subtle); }
.st-room-price.none b { font-size: 12.5px; color: var(--color-danger); font-family: var(--font-body); font-weight: 700; }
.st-room-acts { display: flex; gap: 6px; flex-shrink: 0; }
.st-room-beds { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 13px; padding-top: 12px; border-top: 1px dashed var(--hairline-strong); }
.st-bedchip {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 8px; border-radius: 10px;
  background: var(--color-surface-2); border: 1px solid var(--hairline);
}
.st-bedchip.dbl { background: color-mix(in srgb, var(--st) 8%, var(--color-surface)); border-color: color-mix(in srgb, var(--st) 20%, transparent); }
.st-bedchip.alt { border-style: dashed; }
.st-bedchip-lbl { font-size: 11.5px; font-weight: 600; color: var(--color-text-secondary); }
.st-bedchip em { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--st); font-variant-numeric: tabular-nums; }
.st-bed { width: 22px; height: 15px; flex-shrink: 0; }
.st-bed .f { fill: color-mix(in srgb, var(--st) 12%, transparent); stroke: var(--st); stroke-width: 1.4; }
.st-bed .l { stroke: var(--st); stroke-width: 1.4; fill: none; stroke-linecap: round; }
.st-bed .p { fill: var(--st); opacity: .5; }
.st-bed-void { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; font-style: italic; color: var(--color-danger); }
.st-bed-void .ico { width: 13px; height: 13px; }
.st-room-notes { display: flex; align-items: flex-start; gap: 7px; margin: 10px 0 0; font-size: 11.5px; font-style: italic; color: var(--color-text-muted); }
.st-room-notes .ico { width: 12px; height: 12px; margin-top: 2px; opacity: .6; }

/* ---------- Plan tarifario ---------- */
.rp-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px 18px; margin-top: 16px; }
.rp-legend span { display: flex; align-items: flex-start; gap: 9px; font-size: 11.5px; line-height: 1.55; color: var(--color-text-muted); }
.rp-legend b { flex-shrink: 0; width: 19px; height: 19px; border-radius: 6px; display: grid; place-items: center; font-size: 10px; background: color-mix(in srgb, var(--st) 12%, transparent); color: var(--st); }
.rp-legend a { color: var(--st); font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

.rp-plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.rp-plan {
  position: relative; padding: 17px 19px 14px; border-radius: 14px 14px 14px 4px;
  background: var(--color-surface); border: 1px solid var(--hairline); border-top: 3px solid var(--pc);
  animation: st-in var(--dur-base) var(--ease-out) both; animation-delay: calc(var(--i) * 45ms);
  transition: transform var(--dur-base) var(--ease-standard), box-shadow var(--dur-base);
}
.rp-plan:hover { transform: translateY(-4px); box-shadow: var(--shadow-raised); }
.rp-plan-punch { position: absolute; left: 15px; top: 13px; width: 9px; height: 9px; border-radius: 50%; background: var(--color-bg); box-shadow: inset 0 1px 2px rgba(14,33,72,.24); }
.rp-plan header { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding-left: 18px; }
.rp-plan-ch { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--pc); }
.rp-plan-ch .ico { width: 12px; height: 12px; }
.rp-plan-refund { display: inline-flex; align-items: center; gap: 4px; font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 3px 8px; border-radius: 999px; }
.rp-plan-refund .ico { width: 10px; height: 10px; }
.rp-plan-refund.yes { color: var(--color-green); background: var(--color-green-light); }
.rp-plan-refund.no  { color: #d97706; background: #fdf3e2; }
.rp-plan h4 { font-family: var(--font-display); font-weight: 800; font-size: 15px; letter-spacing: -.02em; color: var(--color-primary); margin: 11px 0 9px; }
.rp-plan-formula { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; background: var(--color-surface-2); }
.rp-plan-formula .ico { width: 14px; height: 14px; color: var(--pc); }
.rp-plan-formula b { font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--color-primary); }
.rp-plan-facts { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.rp-plan-facts span { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--color-text-muted); }
.rp-plan-facts .ico { width: 12px; height: 12px; opacity: .7; }
.rp-plan-facts .muted { font-style: italic; color: var(--color-text-subtle); }
.rp-plan footer { display: flex; gap: 6px; justify-content: flex-end; margin-top: 13px; padding-top: 11px; border-top: 1px dashed var(--hairline-strong); }

.rp-matrix-wrap { overflow-x: auto; border-radius: 16px; border: 1px solid var(--hairline); background: var(--color-surface); }
.rp-matrix { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
.rp-matrix thead th { position: sticky; top: 0; z-index: 2; background: var(--color-surface-2); }
.rp-th-corner, .rp-th-base, .rp-th-plan { padding: 11px 13px; text-align: left; vertical-align: bottom; border-bottom: 1.5px solid var(--hairline-strong); }
.rp-th-corner { position: sticky; left: 0; z-index: 3 !important; font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--color-text-subtle); min-width: 190px; }
.rp-th-base { text-align: right; font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--color-text-subtle); }
.rp-th-plan { text-align: right; border-top: 3px solid var(--pc); }
.rp-th-nm { display: block; font-family: var(--font-display); font-weight: 800; font-size: 12.5px; color: var(--color-primary); }
.rp-th-plan em { font-style: normal; display: block; margin-top: 2px; font-family: var(--font-mono); font-size: 10px; color: var(--pc); }
.rp-row-room th, .rp-row-room td { border-top: 1px solid var(--hairline); }
.rp-row-bed  th, .rp-row-bed  td { background: var(--color-surface-2); border-top: 1px solid var(--hairline); }
.rp-th-room, .rp-th-bed { position: sticky; left: 0; z-index: 1; background: var(--color-surface); text-align: left; font-weight: 500; padding: 9px 13px; }
.rp-row-bed .rp-th-bed { background: var(--color-surface-2); padding-left: 28px; }
.rp-bed-in { display: flex; align-items: center; gap: 8px; }
.rp-th-bed span { font-size: 11.5px; color: var(--color-text-secondary); }
.rp-room-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--rc); margin-right: 8px; vertical-align: middle; }
.rp-room-nm { font-family: var(--font-display); font-weight: 700; font-size: 13px; color: var(--color-primary); }
.rp-th-room em { font-style: normal; display: block; margin-left: 15px; font-size: 10px; color: var(--color-text-subtle); }
.rp-td-base { text-align: right; padding: 9px 13px; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.rp-nobase { color: var(--color-danger); font-weight: 700; font-size: 11px; }
.rp-same { opacity: .55; font-size: 11px; font-style: italic; }
.rp-td { padding: 6px 10px; text-align: right; }
.rp-cellwrap { position: relative; display: inline-block; }
.rp-cell {
  width: 100px; text-align: right; font-family: inherit; font-size: 12px; font-variant-numeric: tabular-nums;
  padding: 7px 9px; border-radius: 9px; background: var(--color-surface); border: 1px solid var(--hairline);
  color: var(--color-primary); transition: border-color var(--dur-base), background var(--dur-base), box-shadow var(--dur-base);
}
.rp-cell::placeholder { color: var(--color-text-subtle); opacity: .8; }
.rp-cell:hover { border-color: var(--hairline-strong); }
.rp-cell:focus { outline: none; border-color: var(--st); box-shadow: 0 0 0 3px color-mix(in srgb, var(--st) 14%, transparent); }
.rp-td.fixed .rp-cell { background: color-mix(in srgb, var(--st) 9%, var(--color-surface)); border-color: color-mix(in srgb, var(--st) 40%, transparent); font-weight: 700; padding-right: 22px; }
.rp-pin { position: absolute; right: 6px; top: 50%; margin-top: -6px; color: var(--st); pointer-events: none; }
.rp-pin .ico { width: 11px; height: 11px; }

/* ---------- Reglas dinámicas ---------- */
.rr-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.rr-help { display: flex; flex-direction: column; gap: 11px; }
.rr-help-item { display: flex; align-items: flex-start; gap: 11px; font-size: 12.5px; line-height: 1.65; color: var(--color-text-secondary); }
.rr-help-item > span { flex-shrink: 0; width: 21px; height: 21px; border-radius: 7px; display: grid; place-items: center; font-size: 11px; font-weight: 800; background: color-mix(in srgb, var(--st) 13%, transparent); color: var(--st); }
.rr-help-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 11px; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--hairline-strong); }
.rr-help-tools > div { display: flex; flex-direction: column; gap: 5px; }
.rr-help-tools b { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--color-primary); }
.rr-help-tools .ico { width: 14px; height: 14px; color: var(--st); }
.rr-help-tools span { font-size: 11.5px; line-height: 1.6; color: var(--color-text-muted); }

.rr-rules { display: flex; flex-direction: column; gap: 10px; }
.rr-rule {
  display: flex; align-items: stretch; gap: 13px; padding: 14px 16px; border-radius: 16px;
  background: var(--color-surface); border: 1px solid var(--hairline);
  animation: st-in var(--dur-base) var(--ease-out) both; animation-delay: calc(var(--i) * 32ms);
  transition: box-shadow var(--dur-base), border-color var(--dur-base);
}
.rr-rule:hover { box-shadow: var(--shadow-sm); border-color: color-mix(in srgb, var(--st) 26%, var(--hairline)); }
.rr-rule.off { opacity: .58; }
.rr-prio {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  background: var(--color-surface-2); color: var(--color-text-muted); align-self: flex-start;
}
.rr-body { flex: 1; min-width: 0; }
.rr-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 11px; }
.rr-head b { font-family: var(--font-display); font-weight: 800; font-size: 14px; letter-spacing: -.015em; color: var(--color-primary); }
.rr-scope { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--color-text-muted); background: var(--color-surface-2); padding: 3px 9px; border-radius: 999px; }
.rr-scope .ico { width: 11px; height: 11px; }
.rr-paused { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #d97706; background: #fdf3e2; padding: 3px 8px; border-radius: 999px; }
.rr-logic { display: grid; grid-template-columns: minmax(0,1.4fr) 26px minmax(0,1fr); gap: 10px; align-items: center; }
.rr-tag { display: block; font-size: 9.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--color-text-subtle); margin-bottom: 6px; }
.rr-when ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.rr-when li { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; line-height: 1.5; color: var(--color-text-secondary); }
.rr-when .ico { width: 13px; height: 13px; flex-shrink: 0; margin-top: 2px; color: var(--st); opacity: .75; }
.rr-arrow { display: grid; place-items: center; color: var(--color-text-subtle); }
.rr-arrow .ico { width: 17px; height: 17px; }
.rr-then { padding: 11px 14px; border-radius: 12px; background: var(--color-surface-2); }
.rr-eff { display: block; font-family: var(--font-display); font-weight: 800; font-size: 21px; letter-spacing: -.03em; line-height: 1.05; }
.rr-eff.up  { color: var(--color-green); }
.rr-eff.down{ color: var(--color-danger); }
.rr-eff.fix { color: var(--st); }
.rr-then em { font-style: normal; display: block; margin-top: 3px; font-size: 10.5px; color: var(--color-text-muted); }
.rr-clamp { display: flex; align-items: center; gap: 6px; margin-top: 8px; padding-top: 7px; border-top: 1px dashed var(--hairline-strong); font-size: 10.5px; color: var(--color-text-muted); }
.rr-clamp .ico { width: 11px; height: 11px; }
.rr-acts { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }

.rr-comps { display: flex; gap: 7px; flex-wrap: wrap; }
.rr-comp { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--color-surface); border: 1px solid var(--hairline); font-size: 11.5px; }
.rr-comp b { color: var(--color-primary); font-weight: 700; }
.rr-comp em { font-style: normal; color: var(--color-text-muted); }
.rr-comp-price { font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--st); }
.rr-comp i { font-style: normal; font-size: 10px; color: var(--color-text-subtle); }
.rr-comp a { display: grid; place-items: center; cursor: pointer; color: var(--color-text-subtle); }
.rr-comp a:hover { color: var(--color-danger); }
.rr-comp a .ico { width: 12px; height: 12px; }

/* ---------- Google / conexiones ---------- */
.st-conns { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.st-conn {
  display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; border-radius: 16px;
  background: var(--color-surface); border: 1px solid var(--hairline);
  animation: st-in var(--dur-base) var(--ease-out) both; animation-delay: calc(var(--i) * 40ms);
  transition: border-color var(--dur-base), box-shadow var(--dur-base);
}
.st-conn.ok { border-color: color-mix(in srgb, var(--cc) 34%, transparent); }
.st-conn:hover { box-shadow: var(--shadow-sm); }
.st-conn header { display: flex; align-items: flex-start; gap: 11px; }
.st-conn-ico { width: 34px; height: 34px; flex-shrink: 0; border-radius: 11px; display: grid; place-items: center; background: color-mix(in srgb, var(--cc) 12%, transparent); color: var(--cc); }
.st-conn-ico .ico { width: 16px; height: 16px; }
.st-conn-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.st-conn-id b { font-size: 13px; font-weight: 700; color: var(--color-primary); line-height: 1.3; }
.st-conn-id .st-led { align-self: flex-start; }
.st-conn-go { display: grid; place-items: center; width: 28px; height: 28px; flex-shrink: 0; border-radius: 9px; color: var(--color-text-subtle); border: 1px solid var(--hairline); transition: color var(--dur-base), border-color var(--dur-base); }
.st-conn-go:hover { color: var(--cc); border-color: var(--cc); }
.st-conn-go .ico { width: 13px; height: 13px; }
.st-conn-what { font-size: 11.5px; line-height: 1.6; color: var(--color-text-muted); margin: 0; }
.st-conn input {
  width: 100%; font-family: var(--font-mono); font-size: 12px; color: var(--color-primary);
  padding: 9px 12px; border-radius: 10px; background: var(--color-surface-2); border: 1px solid var(--hairline-strong);
  transition: border-color var(--dur-base), box-shadow var(--dur-base), background var(--dur-base);
}
.st-conn input:focus { outline: none; background: var(--color-surface); border-color: var(--cc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cc) 13%, transparent); }
.st-conn-where { display: flex; align-items: flex-start; gap: 6px; font-size: 10.5px; line-height: 1.5; color: var(--color-text-subtle); }
.st-conn-where .ico { width: 11px; height: 11px; flex-shrink: 0; margin-top: 2px; }
.st-embed { border-radius: 14px; overflow: hidden; border: 1px solid var(--hairline); margin-top: 12px; }
.st-embed iframe { width: 100%; height: 460px; border: 0; display: block; }
.st-embed-void { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 12px; padding: 34px; border-radius: 14px; background: var(--color-surface-2); border: 1px dashed var(--hairline-strong); font-size: 12px; color: var(--color-text-subtle); }
.st-embed-void .ico { width: 18px; height: 18px; opacity: .5; }

/* ---------- Usuarios ---------- */
.st-roles-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.st-role-def { padding: 12px 15px; border-radius: 13px; background: var(--color-surface); border: 1px solid var(--hairline); border-left: 3px solid var(--rc); }
.st-role-def > span { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 800; color: var(--rc); margin-bottom: 4px; }
.st-role-def .ico { width: 13px; height: 13px; }
.st-role-def em { font-style: normal; font-size: 11.5px; line-height: 1.55; color: var(--color-text-muted); }
.st-people { display: flex; flex-direction: column; gap: 9px; }
.st-person {
  display: flex; align-items: center; gap: 14px; padding: 13px 16px; border-radius: 15px;
  background: var(--color-surface); border: 1px solid var(--hairline);
  animation: st-in var(--dur-base) var(--ease-out) both; animation-delay: calc(var(--i) * 35ms);
}
.st-person.off { opacity: .55; }
.st-person-av { width: 42px; height: 42px; flex-shrink: 0; border-radius: 13px; overflow: hidden; }
.st-person-av .ar-avatar { width: 42px; height: 42px; border-radius: 13px; font-size: 15px; }
.st-person-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.st-person-id b { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--color-primary); overflow-wrap: anywhere; }
.st-person-me { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--st); background: color-mix(in srgb, var(--st) 12%, transparent); padding: 2px 7px; border-radius: 999px; }
.st-person-id span { font-size: 11.5px; color: var(--color-text-muted); overflow-wrap: anywhere; }
.st-person-role { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; width: 210px; }
.st-person-role select { font-family: inherit; font-size: 12px; padding: 7px 10px; border-radius: 10px; background: var(--color-surface); border: 1px solid var(--hairline-strong); color: var(--color-primary); }
.st-person-role em { font-style: normal; font-size: 10.5px; line-height: 1.4; color: var(--color-text-subtle); }
.st-person-state { flex-shrink: 0; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 4px 10px; border-radius: 999px; }
.st-person-state.on { color: var(--color-green); background: var(--color-green-light); }
.st-person-state.off { color: var(--color-text-subtle); background: var(--color-surface-2); }

/* ---------- Sitio y automatizaciones ---------- */
.wb-journey { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 10px; padding-top: 6px; }
.wb-journey-line { position: absolute; left: 6%; right: 6%; top: 26px; height: 2px; border-radius: 2px; background: repeating-linear-gradient(90deg, var(--hairline-strong) 0 6px, transparent 6px 12px); }
.wb-stop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center; animation: st-in var(--dur-base) var(--ease-out) both; animation-delay: calc(var(--i) * 60ms); }
.wb-stop-dot {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; z-index: 1;
  background: var(--color-surface); border: 2px solid var(--hairline-strong); color: var(--color-text-subtle);
  transition: background var(--dur-base), border-color var(--dur-base), color var(--dur-base);
}
.wb-stop-dot .ico { width: 17px; height: 17px; }
.wb-stop.on .wb-stop-dot { background: color-mix(in srgb, var(--color-green) 12%, var(--color-surface)); border-color: var(--color-green); color: var(--color-green); }
.wb-stop b { font-size: 12px; font-weight: 700; color: var(--color-primary); margin-top: 3px; }
.wb-stop-d { font-size: 10.5px; line-height: 1.45; color: var(--color-text-muted); }
.wb-stop em { font-style: normal; font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--color-text-subtle); }
.wb-stop.off b, .wb-stop.off .wb-stop-d { opacity: .62; }

.wb-items, .wb-promos { display: flex; flex-direction: column; gap: 8px; }
.wb-item, .wb-promo {
  display: flex; align-items: center; gap: 12px; padding: 12px 15px; border-radius: 14px;
  background: var(--color-surface); border: 1px solid var(--hairline);
  animation: st-in var(--dur-base) var(--ease-out) both; animation-delay: calc(var(--i) * 32ms);
}
.wb-item.off, .wb-promo.off { opacity: .6; }
.wb-item-ico { width: 32px; height: 32px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--st) 10%, transparent); color: var(--st); }
.wb-item-ico .ico { width: 15px; height: 15px; }
.wb-item-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wb-item-id b { font-size: 13px; font-weight: 700; color: var(--color-primary); }
.wb-item-id span { font-size: 11.5px; color: var(--color-text-muted); }
.wb-item-id .muted { font-style: italic; color: var(--color-text-subtle); }
.wb-item-price { flex-shrink: 0; text-align: right; font-family: var(--font-display); font-weight: 800; font-size: 15px; color: var(--color-primary); font-variant-numeric: tabular-nums; }
.wb-item-price em { display: block; font-style: normal; font-family: var(--font-body); font-weight: 600; font-size: 10px; color: var(--color-text-subtle); }
.wb-item-acts { display: flex; gap: 6px; flex-shrink: 0; }
.wb-off { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #d97706; background: #fdf3e2; padding: 3px 8px; border-radius: 999px; flex-shrink: 0; }
.wb-promo-code { flex-shrink: 0; font-family: var(--font-mono); font-size: 12.5px; font-weight: 700; letter-spacing: .04em; color: var(--st); background: color-mix(in srgb, var(--st) 9%, transparent); padding: 6px 12px; border-radius: 8px; border: 1px dashed color-mix(in srgb, var(--st) 34%, transparent); }
.wb-promo-off { flex-shrink: 0; font-family: var(--font-display); font-weight: 800; font-size: 16px; color: var(--color-green); }
.wb-promo-meta { flex: 1; min-width: 0; display: flex; gap: 14px; flex-wrap: wrap; }
.wb-promo-meta span { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--color-text-muted); }
.wb-promo-meta .ico { width: 12px; height: 12px; opacity: .7; }
.wb-promo-bar { flex-shrink: 0; width: 64px; height: 5px; border-radius: 999px; background: var(--color-surface-2); overflow: hidden; }
.wb-promo-bar i { display: block; height: 100%; width: var(--w); background: var(--st); border-radius: 999px; }

.wb-dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; align-items: end; margin-bottom: 12px; }
.wb-dl .st-btn { height: 40px; justify-content: center; }
.wb-holds { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-top: 10px; transition: opacity var(--dur-base); }
.wb-holds.dim { opacity: .42; pointer-events: none; }

.wb-mails { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.wb-mail { padding: 16px 18px; border-radius: 15px; background: var(--color-surface-2); border: 1px solid var(--hairline); transition: background var(--dur-base), border-color var(--dur-base); }
.wb-mail.on { background: color-mix(in srgb, var(--color-green) 5%, var(--color-surface)); border-color: color-mix(in srgb, var(--color-green) 26%, transparent); }
.wb-mail-when { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.wb-mail-when span { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--color-surface); color: var(--st); }
.wb-mail-when .ico { width: 13px; height: 13px; }
.wb-mail-when b { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--color-text-subtle); }
.wb-mail-form { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--hairline-strong); }
.wb-vars { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; padding: 12px 15px; border-radius: 13px; background: var(--color-surface-2); }
.wb-vars-lbl { display: inline-flex; align-items: center; gap: 7px; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--color-text-subtle); }
.wb-vars-lbl .ico { width: 13px; height: 13px; color: var(--st); }
.wb-vars code { font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--st); background: var(--color-surface); padding: 3px 8px; border-radius: 6px; border: 1px solid var(--hairline); }
.wb-vars em { font-style: normal; font-size: 11px; color: var(--color-text-subtle); }

/* ---------- Datos ---------- */
.st-exports { display: flex; flex-direction: column; gap: 9px; }
.st-export {
  display: flex; align-items: center; gap: 13px; padding: 13px 16px; border-radius: 14px;
  background: var(--color-surface); border: 1px solid var(--hairline);
  animation: st-in var(--dur-base) var(--ease-out) both; animation-delay: calc(var(--i) * 35ms);
}
.st-export-ico { width: 32px; height: 32px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; background: var(--color-surface-2); color: var(--st); }
.st-export-ico .ico { width: 15px; height: 15px; }
.st-export-id { flex: 1; min-width: 0; }
.st-export-id b { display: block; font-size: 13px; font-weight: 700; color: var(--color-primary); }
.st-export-id span { font-size: 11.5px; line-height: 1.5; color: var(--color-text-muted); }
.st-dl { display: flex; gap: 6px; flex-shrink: 0; }
.st-import { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.st-import-step { display: flex; align-items: center; gap: 13px; padding: 14px 16px; border-radius: 14px; background: var(--color-surface-2); border: 1px solid var(--hairline); }
.st-import-step.main { background: color-mix(in srgb, var(--st) 6%, var(--color-surface)); border-color: color-mix(in srgb, var(--st) 26%, transparent); }
.st-import-n { width: 26px; height: 26px; flex-shrink: 0; border-radius: 9px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 12px; background: var(--st); color: #fff; }
.st-import-step > div { flex: 1; min-width: 0; }
.st-import-step > div b { display: block; font-size: 13px; font-weight: 700; color: var(--color-primary); margin-bottom: 2px; }
.st-import-step > div span { font-size: 11.5px; line-height: 1.55; color: var(--color-text-muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .st-brand { grid-template-columns: 1fr; }
  .st-brand-preview { position: static; max-width: 420px; }
  .wb-journey { grid-template-columns: repeat(3, minmax(0,1fr)); row-gap: 22px; }
  .wb-journey-line { display: none; }
}
@media (max-width: 980px) {
  .st-layout { grid-template-columns: 1fr; }
  .st-rail { position: static; flex-direction: row; flex-wrap: wrap; gap: 10px; }
  .st-rail-group { flex: 1 1 240px; }
  .st-rail-role { flex-basis: 100%; }
  .st-hero { grid-template-columns: 1fr; }
  .st-hero-art { display: none; }
}
@media (max-width: 720px) {
  /* En teléfono el rail vertical empujaba todo el contenido fuera de la
     primera pantalla: pasa a ser una tira de fichas que se desplaza. */
  .st-rail {
    flex-direction: row; flex-wrap: nowrap; gap: 8px; overflow-x: auto; padding-bottom: 4px;
    scrollbar-width: none; -ms-overflow-style: none;
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 22px), transparent 100%);
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 22px), transparent 100%);
  }
  .st-rail::-webkit-scrollbar { display: none; }
  .st-rail-group { flex: 0 0 auto; flex-direction: row; gap: 8px; }
  .st-rail-title { display: none; }
  .st-rail-item { width: auto; white-space: nowrap; padding: 8px 13px 8px 9px; background: var(--color-surface); border-color: var(--hairline); }
  .st-rail-ico { width: 26px; height: 26px; }
  .st-rail-txt em { display: none; }
  .st-rail-role { display: none; }
  .st-grid { grid-template-columns: 1fr; }
  .st-flow { flex-direction: column; }
  .st-flow-arrow { transform: rotate(90deg); flex-basis: auto; height: 18px; }
  .rr-logic { grid-template-columns: 1fr; }
  .rr-arrow { transform: rotate(90deg); justify-self: start; }
  .st-person { flex-wrap: wrap; }
  .st-person-role { width: 100%; }
  .wb-journey { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .st-export, .st-import-step { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .st-art .st-art-gear, .st-art .slider { animation: none !important; }
}

/* ==================================================================
   RESERVAS v12 — "EL TABLERO"
   ------------------------------------------------------------------
   El corazón del PMS. Acá no hay metáfora ni lenguaje propio: manda la
   claridad. Palabras de siempre, formas conocidas y todo el ancho para
   los datos. Lo que se agrega es precisión — jerarquía tipográfica,
   estados legibles de un vistazo y movimiento que ayuda a seguir la
   fila que estás mirando.
   ================================================================== */

#section-reservas { --gd: #1d4ed8; }

@keyframes bkp-in   { from { opacity: 0; transform: translateY(-3px) scaleX(.97); } }
@keyframes tod-beat { 0%,100% { opacity: .55; } 50% { opacity: 1; } }

/* ---------- Contenedor ---------- */
.grid-wrap { border-radius: var(--radius-md); border-color: var(--hairline); box-shadow: var(--shadow-sm); }

/* ---------- Encabezado de días ---------- */
.grid-header { border-bottom: 1px solid var(--hairline-strong); }
.ghc {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  gap: 1px; padding: 7px 2px 5px; border-right: 1px solid var(--grid-line);
  background: var(--grid-header-bg); color: var(--color-text-muted);
  transition: background var(--dur-base);
}
.ghc-dow { font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .65; line-height: 1; }
.ghc-num { font-family: var(--font-display); font-size: 17px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; color: var(--color-primary); }
.ghc-mon { font-size: 8px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--gd); opacity: .8; line-height: 1; }
.ghc.wknd { background: var(--grid-weekend-bg); }
.ghc.wknd .ghc-dow { opacity: .9; color: var(--gd); }

/* Hoy: columna marcada de punta a punta, no solo un fondo celeste */
.ghc.tod { background: color-mix(in srgb, var(--gd) 11%, var(--color-surface)); }
.ghc.tod .ghc-num { color: var(--gd); }
.ghc.tod::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--gd);
}
.ghc.tod-wide::after {
  content: 'HOY'; position: absolute; top: 5px; right: 5px;
  font-size: 7px; font-weight: 800; letter-spacing: .09em; color: var(--gd); opacity: .8;
}
.ghc.tod:not(.tod-wide) .ghc-dow { color: var(--gd); opacity: 1; font-weight: 800; }

/* Ocupación de la noche: barra + texto, en vez de "12 · 30%" suelto */
.ghc-occ { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 100%; margin-top: 2px; padding: 0 4px; }
.ghc-occ i {
  display: block; width: 100%; height: 3px; border-radius: 999px; background: var(--hairline-strong);
  position: relative; overflow: hidden;
}
.ghc-occ i::after { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--p); border-radius: 999px; background: currentColor; }
/* Camas libres y % ocupado, como estaba antes, pero con la barra al lado */
.ghc-occ b { display: flex; align-items: baseline; gap: 4px; font-size: 8px; font-weight: 700; letter-spacing: .01em; white-space: nowrap; }
.ghc-occ em { font-style: normal; font-weight: 600; opacity: .72; }
.ghc-occ.lvl-ok   { color: #0f9d68; }
.ghc-occ.lvl-low  { color: #d97706; }
.ghc-occ.lvl-full { color: var(--color-danger); }

/* ---------- Columna de habitaciones ---------- */
.ghc-label {
  flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px;
  padding: 6px 12px; background: var(--grid-header-bg);
  border-right: 1px solid var(--hairline-strong);
}
.ghc-label-t { font-size: 11px; font-weight: 800; letter-spacing: .01em; color: var(--color-primary); }
.ghc-label-s { font-size: 9.5px; color: var(--color-text-subtle); }

.rh-cell {
  gap: 9px; padding: 6px 11px;
  background: var(--grid-room-bg);
  border-right: 1px solid var(--hairline-strong);
  overflow: visible;
}
.rh-ic, .bl-ic {
  width: 22px; height: 22px; flex-shrink: 0; border-radius: 7px; display: grid; place-items: center;
  background: var(--color-surface); color: var(--color-text-muted);
}
.rh-ic .ico, .bl-ic .ico { width: 12px; height: 12px; }
.rh-ic.kind-shared,  .bl-ic.kind-shared  { color: #0f9d68; }
.rh-ic.kind-private, .bl-ic.kind-private { color: #d97706; }
.rh-ic.kind-dorm,    .bl-ic.kind-dorm    { color: var(--c-violet); }
.rh-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.rh-txt b { font-size: 11.5px; font-weight: 800; letter-spacing: -.01em; color: var(--color-primary); overflow: hidden; text-overflow: ellipsis; }
.rh-txt em { font-style: normal; font-size: 9.5px; color: var(--color-text-subtle); }
.sel-btn { margin-left: auto; font-size: 9.5px; padding: 3px 9px; background: var(--gd); }
.sel-btn:hover { background: var(--gd); filter: brightness(1.12); }

/* Encabezado de grupo: plegable, con la flecha que gira */
.rh-group { cursor: pointer; gap: 8px; }
.rh-chev { display: grid; place-items: center; color: var(--grp-color, var(--gd)); transition: transform var(--dur-base) var(--ease-spring); transform: rotate(90deg); }
.rh-group.is-collapsed .rh-chev { transform: rotate(0deg); }
.rh-chev .ico { width: 13px; height: 13px; }
.group-header-row .rh-cell { background: var(--grp-soft, #dbeafe); }
.group-header-row .rh-txt b { color: var(--grp-color, #0d3b66); }
.group-header-row .rh-spacer { background: color-mix(in srgb, var(--grp-soft, #eef6ff) 55%, var(--color-surface)); }
.grp-badge { margin-left: auto; background: var(--color-surface); color: var(--grp-color, var(--gd)); font-size: 9.5px; }

/* Fila de habitación privada colapsada */
.bl.bl-room { flex-direction: row; align-items: center; gap: 9px; background: var(--grid-room-bg); }
.bl-room .bl-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; flex: 1; }
.bl-room .rm-name { font-weight: 800; font-size: calc(var(--grid-font, 10px) + 1.5px); color: var(--color-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-room .rm-beds { font-size: calc(var(--grid-font, 10px) - .5px); color: var(--color-text-subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-tag {
  flex-shrink: 0; background: var(--color-surface); color: var(--gd); border: 1px solid color-mix(in srgb, var(--gd) 24%, transparent);
  border-radius: 6px; padding: 2px 6px; font-size: 8.5px; font-weight: 800; letter-spacing: .05em;
}

/* Filas de cama */
.bl { gap: 8px; border-right: 1px solid var(--hairline-strong); }
.bl-bed { display: grid; place-items: center; flex-shrink: 0; opacity: .85; }
.bl-bed .st-bed { width: 21px; height: 14px; }
.bl-bed .st-bed .f { fill: color-mix(in srgb, var(--gd) 10%, transparent); stroke: var(--gd); }
.bl-bed .st-bed .l { stroke: var(--gd); }
.bl-bed .st-bed .p { fill: var(--gd); opacity: .45; }
.bl-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--color-text-secondary); }
.bl .atag, .bl .dtag {
  display: inline-flex; flex-shrink: 0; font-family: var(--font-body); font-size: 8.5px; font-weight: 800;
  padding: 2px 6px; border-radius: 5px; letter-spacing: .02em;
}
.bl .dtag { color: #92400e; background: #fef3c7; }
.bl .atag { color: #5b21b6; background: #ede9fe; }
.bed-row-mate { opacity: .78; }
.bl-mate { padding-left: 26px; }
.bl-mate .bl-name { font-style: italic; font-weight: 500; color: var(--color-text-subtle); }
.bl-mate .bl-bed { opacity: .55; }

/* La columna fija se despega con una sombra cuando hay scroll lateral */
.bl, .rh-cell, .ghc-label { box-shadow: 3px 0 8px -6px rgba(14,33,72,.25); }

/* ---------- Celdas ---------- */
.cell { background: var(--color-surface); }
.cell.tod { background: color-mix(in srgb, var(--gd) 5%, var(--color-surface)); }
.cell.wknd { background: var(--grid-weekend-bg); }
.cell-free::after { background: var(--hairline); opacity: .8; }
.seg-am:hover, .seg-pm:hover { background: color-mix(in srgb, var(--gd) 9%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gd) 22%, transparent); }
.seg-late { position: absolute; right: 0; top: 0; bottom: 0; cursor: pointer; z-index: 2; }
.bed-row:hover { background: color-mix(in srgb, var(--gd) 3%, var(--color-surface)); }
.bed-row:hover .bl { background: color-mix(in srgb, var(--gd) 3%, var(--color-surface)); }
.bed-row.hilite, .bed-row.hilite .bl { background: #fffbeb; }

/* ---------- LA PASTILLA ---------- */
.bkpill {
  position: absolute; top: 3px; bottom: 3px; z-index: 3; box-sizing: border-box;
  display: flex; align-items: center; gap: 5px; padding: 0 8px 0 10px;
  overflow: hidden; white-space: nowrap; cursor: pointer;
  font-family: var(--font-body); font-size: var(--grid-font, 10px); font-weight: 600;
  background: var(--bg); color: var(--tx);
  border: 1px solid color-mix(in srgb, var(--bd) 72%, transparent);
  box-shadow: 0 1px 2px rgba(14,33,72,.12), 0 3px 8px -4px rgba(14,33,72,.28);
  animation: bkp-in var(--dur-base) var(--ease-out) both;
  transition: transform var(--dur-base) var(--ease-standard), box-shadow var(--dur-base), filter var(--dur-base);
}
.bkpill:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(14,33,72,.16), 0 8px 18px -6px rgba(14,33,72,.4);
  filter: saturate(1.12);
  z-index: 9;
}
.bkpill:active { transform: translateY(0) scale(.995); }
/* Filo de color del estado: la señal principal, siempre visible aunque la pastilla sea mínima */
.bkp-edge { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--bd); }
.bkpill.has-in  .bkp-edge { border-radius: 999px 0 0 999px; }
.bkpill:not(.has-in) .bkp-edge { border-radius: 2px 0 0 2px; }
.bkp-flag { flex-shrink: 0; font-size: calc(var(--grid-font, 10px) + 1px); line-height: 1; }
.bkp-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.005em; }
.bkp-meta { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.bkp-pax {
  display: inline-flex; align-items: center; justify-content: center; min-width: 15px; height: 14px; padding: 0 4px;
  border-radius: 5px; background: color-mix(in srgb, var(--tx) 14%, transparent); color: var(--tx);
  font-size: 9px; font-weight: 800; line-height: 1;
}
.bkp-chan {
  display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; flex-shrink: 0;
  border-radius: 4px; background: var(--cc); color: #fff; font-size: 8.5px; font-weight: 800; line-height: 1;
}
.bkp-chan.is-emoji { background: none; font-size: 11px; }
/* Cobro: franja en el filo DERECHO de la pastilla, no un puntito.
   Un punto de 8px se perdía entre los otros iconos justo cuando más importa
   (una reserva que llega sin pagar). Una franja de lado a lado se ve de reojo,
   sin leer nada, incluso en la pastilla más chica.
   Sólo se pinta lo que requiere acción: al día no lleva marca — si todo lo
   cobrado también se pintara, la grilla sería un semáforo entero y volvería a
   no decir nada. */
.bkp-payedge {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: 10px; background: var(--pc);
  box-shadow: inset 1px 0 0 rgba(255,255,255,.45);
  pointer-events: none;
}
.bkpill.has-out .bkp-payedge { border-radius: 0 999px 999px 0; }
.bkp-ic { display: inline-flex; flex-shrink: 0; opacity: .8; }
.bkp-ic .ico { width: 11px; height: 11px; }
.bkp-warn { display: inline-flex; flex-shrink: 0; color: #fff; background: var(--color-danger); border-radius: 4px; padding: 1px 3px; }
.bkp-warn .ico { width: 10px; height: 10px; }
.bkpill.is-tiny { padding: 0 4px 0 7px; gap: 3px; justify-content: center; }
/* En una pastilla mínima el nombre manda: la bandera y el resto sobran */
.bkpill.is-tiny .bkp-name { font-weight: 800; letter-spacing: .02em; text-align: center; }
.bkpill.is-tiny .bkp-flag, .bkpill.is-tiny .bkp-chan, .bkpill.is-tiny .bkp-pax { display: none; }
.bkpill.is-ghost { opacity: .68; font-style: italic; box-shadow: none; cursor: pointer; }
.bkpill.is-ghost .bkp-edge { opacity: .5; }
.bkpill.is-out { opacity: .92; }
.bkpill.is-out .bkp-name { font-weight: 500; }
.bkpill[draggable="true"] { cursor: grab; }
.bkpill[draggable="true"]:active { cursor: grabbing; }

/* Pre-reserva vencida: imposible de pasar por alto */
@keyframes pillExpiredPulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(224,54,47,.2), 0 1px 2px rgba(14,33,72,.12); }
  50%      { box-shadow: 0 0 0 3px rgba(224,54,47,.55), 0 1px 2px rgba(14,33,72,.12); }
}
.bkpill.is-expired { border-color: var(--color-danger); }

@media (prefers-reduced-motion: reduce) {
  .bkpill { animation: none !important; }
  .pill-expired-pulse { animation: none !important; outline: 2px solid var(--color-danger); }
}

/* ---------- VISTA DE HOY ----------
   Es la pantalla que se mira de parada, con el mate en la mano: pocas
   cosas, grandes, y cada fila abre la reserva de un clic. */
.tv { display: flex; flex-direction: column; gap: 16px; padding-bottom: 40px; }

.tv-head {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 22px 26px; border-radius: 20px;
  background: radial-gradient(700px 220px at 92% -30%, color-mix(in srgb, var(--gd) 13%, transparent), transparent 68%), var(--color-surface);
  border: 1px solid var(--hairline);
}
.tv-eyebrow { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--gd); }
.tv-head h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.4rem, 2.6vw, 2rem); letter-spacing: -.03em; color: var(--color-primary); margin: 8px 0 6px; }
.tv-head p { font-size: 13px; line-height: 1.6; color: var(--color-text-muted); margin: 0; max-width: 60ch; }

.tv-occ { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.tv-ring { width: 84px; height: 84px; transform: rotate(-90deg); }
.tv-ring circle { fill: none; stroke-width: 9; stroke-linecap: round; }
.tv-ring-bg { stroke: var(--color-surface-2); }
.tv-ring-fg { stroke: var(--gd); transition: stroke-dashoffset 1s var(--ease-out); }
.tv-occ-txt { display: flex; flex-direction: column; line-height: 1.2; }
.tv-occ-txt b { font-family: var(--font-display); font-weight: 800; font-size: 28px; letter-spacing: -.035em; color: var(--color-primary); }
.tv-occ-txt em { font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--gd); }
.tv-occ-txt span { font-size: 11px; color: var(--color-text-muted); margin-top: 2px; }

.tv-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.tv-stat {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 1px 11px; align-items: center;
  padding: 13px 16px; border-radius: 15px; background: var(--color-surface); border: 1px solid var(--hairline);
  border-left: 3px solid var(--sc, var(--gd));
}
.tv-stat-ic { grid-row: 1 / -1; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--sc, var(--gd)) 12%, transparent); color: var(--sc, var(--gd)); }
.tv-stat-ic .ico { width: 15px; height: 15px; }
.tv-stat b { font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: -.03em; color: var(--color-primary); line-height: 1.05; }
.tv-stat em { font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--sc, var(--gd)); }
.tv-stat span { grid-column: 2; font-size: 10.5px; color: var(--color-text-subtle); }
.tv-stat b, .tv-stat em { grid-column: 2; }
.tv-stat.in   { --sc: #0f9d68; }
.tv-stat.out  { --sc: #d97706; }
.tv-stat.stay { --sc: var(--gd); }
.tv-stat.free { --sc: var(--c-violet); }
.tv-stat.owe  { --sc: var(--color-danger); }
.tv-stat.paid { --sc: #0f9d68; }
.tv-stat.out .tv-stat-ic .ico { transform: scaleX(-1); }

.tv-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; align-items: start; }
.tv-col, .tv-beds { border-radius: 18px; background: var(--color-surface); border: 1px solid var(--hairline); overflow: hidden; }
.tv-col-head { display: flex; align-items: center; gap: 11px; padding: 14px 16px; border-bottom: 1px solid var(--hairline); }
.tv-col-ic { width: 30px; height: 30px; flex-shrink: 0; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--tc, var(--gd)) 12%, transparent); color: var(--tc, var(--gd)); }
.tv-col-ic .ico { width: 14px; height: 14px; }
.tv-col-head > div { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.tv-col-head b { font-family: var(--font-display); font-weight: 800; font-size: 14px; letter-spacing: -.015em; color: var(--color-primary); }
.tv-col-head em { font-style: normal; font-size: 11px; color: var(--color-text-muted); }
.tv-col-n {
  flex-shrink: 0; min-width: 28px; height: 26px; padding: 0 9px; border-radius: 999px; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 13px;
  background: color-mix(in srgb, var(--tc, var(--gd)) 12%, transparent); color: var(--tc, var(--gd));
}
.tv-col.in   { --tc: #0f9d68; }
.tv-col.out  { --tc: #d97706; }
.tv-col.stay { --tc: var(--gd); }
.tv-col.out .tv-col-ic .ico { transform: scaleX(-1); }
.tv-col-body { display: flex; flex-direction: column; padding: 6px; max-height: 340px; overflow-y: auto; }

.tv-row {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; cursor: pointer;
  flex-shrink: 0;
  padding: 10px 11px; border-radius: 12px; background: transparent; border: 1px solid transparent;
  font-family: inherit; position: relative;
  transition: background var(--dur-base), border-color var(--dur-base), transform var(--dur-base) var(--ease-standard);
}
.tv-row:hover { background: var(--color-surface-2); border-color: var(--hairline); transform: translateX(2px); }
.tv-row-bar { position: absolute; left: 0; top: 12%; bottom: 12%; width: 3px; border-radius: 999px; background: var(--sc); }
.tv-row-who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding-left: 7px; }
.tv-row-who b { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--color-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-flag { font-size: 13px; flex-shrink: 0; }
.tv-row-who em { font-style: normal; font-size: 11px; color: var(--color-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-row-meta { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; justify-content: flex-end; flex-shrink: 0; }
.tv-chip { font-size: 10px; font-weight: 700; color: var(--color-text-muted); background: var(--color-surface-2); padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.tv-row:hover .tv-chip { background: var(--color-surface); }
.tv-chip.owe { color: var(--color-danger); background: var(--color-danger-light); }
.tv-chip.ok  { color: var(--color-green); background: var(--color-green-light); }
.tv-row-go { flex-shrink: 0; color: var(--color-text-subtle); opacity: 0; transition: opacity var(--dur-base), transform var(--dur-base); }
.tv-row-go .ico { width: 14px; height: 14px; }
.tv-row:hover .tv-row-go { opacity: 1; transform: translateX(2px); }
.tv-void { font-size: 12.5px; font-style: italic; color: var(--color-text-subtle); padding: 18px 12px; margin: 0; text-align: center; }

.tv-beds { --tc: var(--c-violet); }
.tv-bedgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; padding: 14px 16px; }
.tv-bed {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px;
  background: var(--color-surface-2); border: 1px solid var(--hairline);
  transition: transform var(--dur-base) var(--ease-standard), border-color var(--dur-base);
}
.tv-bed:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--c-violet) 32%, transparent); }
.tv-bed .st-bed { width: 24px; height: 16px; flex-shrink: 0; }
.tv-bed .st-bed .f { fill: color-mix(in srgb, var(--c-violet) 12%, transparent); stroke: var(--c-violet); }
.tv-bed .st-bed .l { stroke: var(--c-violet); }
.tv-bed .st-bed .p { fill: var(--c-violet); opacity: .5; }
.tv-bed > span { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.tv-bed b { font-size: 12px; font-weight: 700; color: var(--color-primary); }
.tv-bed em { font-style: normal; font-size: 10.5px; color: var(--color-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 720px) {
  .tv-head { flex-direction: column; align-items: flex-start; }
  .tv-row { flex-wrap: wrap; }
  .tv-row-meta { justify-content: flex-start; padding-left: 7px; }
}

/* ---------- Ajustes de la grilla ---------- */
.gs { display: flex; flex-direction: column; gap: 16px; }
.gs-head { display: flex; align-items: center; gap: 13px; }
.gs-head-ic { width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--gd) 11%, transparent); color: var(--gd); }
.gs-head-ic .ico { width: 19px; height: 19px; }
.gs-head h3 { font-family: var(--font-display); font-weight: 800; font-size: 18px; letter-spacing: -.02em; color: var(--color-primary); margin: 0; }
.gs-head p { font-size: 12px; color: var(--color-text-muted); margin: 3px 0 0; }
.gs-tabs { display: flex; gap: 6px; padding: 4px; border-radius: 13px; background: var(--color-surface-2); }
.gs-tab {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer;
  padding: 9px 10px; border-radius: 10px; border: none; background: transparent;
  font-family: inherit; font-size: 12px; font-weight: 700; color: var(--color-text-muted);
  transition: background var(--dur-base), color var(--dur-base);
}
.gs-tab .ico { width: 14px; height: 14px; }
.gs-tab:hover { color: var(--color-text-secondary); }
.gs-tab.on { background: var(--color-surface); color: var(--gd); box-shadow: var(--shadow-xs); }
.gs-lead { font-size: 12.5px; line-height: 1.6; color: var(--color-text-muted); margin: 0 0 4px; }
.gs-body { display: flex; flex-direction: column; }

.gs-row { display: flex; align-items: center; gap: 13px; padding: 11px 0; border-bottom: 1px solid var(--hairline); }
.gs-row:last-child { border-bottom: none; }
/* Muestra real de la pastilla, no un cuadradito de color suelto */
.gs-sample {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; width: 96px; height: 24px;
  padding: 0 8px 0 3px; border-radius: 999px 6px 6px 999px;
  background: var(--bg); border: 1px solid var(--bd); color: var(--tx);
  font-size: 10px; font-weight: 700; overflow: hidden;
}
.gs-sample i { width: 3px; align-self: stretch; margin: 2px 0; border-radius: 999px; background: var(--bd); flex-shrink: 0; }
.gs-swatch { width: 40px; height: 24px; flex-shrink: 0; border-radius: 7px; background: var(--sw); border: 1px solid var(--hairline-strong); }
.gs-chan {
  width: 26px; height: 26px; flex-shrink: 0; border-radius: 7px; display: grid; place-items: center;
  background: var(--cc); color: #fff; font-size: 12px; font-weight: 800;
}
.gs-row-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gs-row-txt.wide { flex: 1 1 240px; }
.gs-row-txt b { font-size: 12.5px; font-weight: 700; color: var(--color-primary); }
.gs-row-txt span { font-size: 11px; line-height: 1.5; color: var(--color-text-muted); }
.gs-pickers { display: flex; gap: 10px; flex-shrink: 0; }
.gs-pickers label { display: flex; flex-direction: column; gap: 3px; font-size: 9.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--color-text-subtle); }
.gs-pickers input[type="color"] { width: 42px; height: 28px; padding: 2px; border: 1px solid var(--hairline-strong); border-radius: 8px; cursor: pointer; background: var(--color-surface); }
.gs-slider { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.gs-slider input[type="range"] { width: 148px; cursor: pointer; accent-color: var(--gd); }
.gs-slider output { font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--color-text-secondary); width: 46px; text-align: right; }
.gs-extra { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; padding-top: 13px; border-top: 1px dashed var(--hairline-strong); }
.gs-extra span { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--color-text-muted); }
.gs-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--pc); flex-shrink: 0; }
/* Muestra de la franja de cobro en la leyenda: misma proporción que en la grilla */
.gs-bar { width: 10px; height: 15px; border-radius: 2px; background: var(--pc); flex-shrink: 0; }

/* ---------- Asistente de nueva reserva ---------- */
.wz { display: flex; flex-direction: column; }
.wz-head h3 { font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: -.02em; color: var(--color-primary); margin: 0; }
.wz-head p { font-size: 12px; color: var(--color-text-muted); margin: 4px 0 0; }

.wz-steps { display: flex; gap: 8px; list-style: none; margin: 16px 0 10px; padding: 0; }
.wz-step {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; cursor: pointer;
  padding: 10px 12px 11px 38px; border-radius: 13px; position: relative;
  background: var(--color-surface-2); border: 1px solid transparent;
  transition: background var(--dur-base), border-color var(--dur-base);
}
.wz-step:hover { border-color: var(--hairline-strong); }
.wz-step > span {
  position: absolute; left: 11px; top: 11px;
  width: 20px; height: 20px; border-radius: 999px; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 11px; font-weight: 800;
  background: var(--color-surface); color: var(--color-text-subtle);
  border: 1px solid var(--hairline-strong);
  transition: background var(--dur-base), color var(--dur-base), border-color var(--dur-base);
}
.wz-step b { font-size: 12.5px; font-weight: 700; color: var(--color-text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wz-step em { font-style: normal; font-size: 10.5px; line-height: 1.3; color: var(--color-text-subtle); }
.wz-step.on { background: color-mix(in srgb, var(--color-accent) 9%, var(--color-surface)); border-color: color-mix(in srgb, var(--color-accent) 34%, transparent); }
.wz-step.on > span { background: var(--color-accent); color: #fff; border-color: transparent; }
.wz-step.on b { color: var(--color-accent); }
.wz-step.done > span { background: var(--color-green); color: #fff; border-color: transparent; }
.wz-step.done b { color: var(--color-text-secondary); }

.wz-bar { height: 3px; border-radius: 999px; background: var(--color-surface-2); overflow: hidden; margin-bottom: 16px; }
.wz-bar i { display: block; height: 100%; width: var(--w); border-radius: 999px; background: var(--color-accent); transition: width var(--dur-slow) var(--ease-out); }

.wz-pane { animation: st-in var(--dur-base) var(--ease-out); }
.wz-pane[hidden] { display: none; }

.wz-warn {
  display: none; align-items: center; gap: 8px; margin: 10px 0 0; padding: 10px 14px; border-radius: 11px;
  font-size: 12.5px; font-weight: 600; color: #8a5a00; background: #fffaf0; border: 1px solid #ffd591;
}
.wz-warn.show { display: flex; animation: st-in var(--dur-base) var(--ease-out); }

.wz-actions { display: flex; align-items: center; gap: 9px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--hairline); }
.wz-sp { flex: 1; }
.wz-miss { border-color: var(--color-danger) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-danger) 16%, transparent) !important; }

@media (max-width: 620px) {
  .wz-steps { flex-direction: column; gap: 6px; }
  .wz-step { padding: 9px 12px 9px 38px; }
}

/* ---------- Reseñas: cuentas conectadas ---------- */
.rv-accs { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 16px; }
.rv-acc, .rv-acc-connect {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 11px 14px; border-radius: 14px; background: var(--color-surface); border: 1px solid var(--hairline);
  font-family: inherit;
}
.rv-acc-connect { cursor: pointer; border-style: dashed; transition: border-color var(--dur-base), transform var(--dur-base) var(--ease-standard); }
.rv-acc-connect:hover { border-color: var(--c-rose); transform: translateY(-2px); }
.rv-acc-ic { width: 32px; height: 32px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; background: var(--color-surface-2); color: var(--c-rose); }
.rv-acc-ic .ico { width: 16px; height: 16px; }
.rv-acc-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rv-acc-id b { font-size: 13px; font-weight: 700; color: var(--color-primary); }
.rv-acc-id span { font-size: 11.5px; line-height: 1.5; color: var(--color-text-muted); }
.rv-acc-manual { font-size: 10.5px; font-weight: 700; color: var(--color-text-subtle); background: var(--color-surface-2); padding: 4px 10px; border-radius: 999px; }
.rv-acc-connect > .ico { width: 15px; height: 15px; color: var(--c-rose); flex-shrink: 0; }
.rv-connect-btn.ghost { background: none; border-color: transparent; padding: 6px 8px; }
.rv-connect-btn.ghost:hover { color: var(--color-danger); }

/* ==================================================================
   COMANDO POR VOZ
   El botón vive en la topbar (dialecto del Tablero: palabras y formas
   de siempre). El panel explica qué entendió y qué va a hacer ANTES de
   hacerlo — por eso el plan tiene más peso visual que el dictado.
   ================================================================== */
.voice-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 30px; flex-shrink: 0; cursor: pointer;
  background: none; border: 1px solid var(--color-border); border-radius: var(--radius);
  color: var(--color-primary); padding: 0;
  transition: background var(--dur-base), border-color var(--dur-base), transform var(--dur-base) var(--ease-standard);
}
.voice-btn svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.voice-btn:hover { background: color-mix(in srgb, var(--c-violet) 10%, transparent); border-color: color-mix(in srgb, var(--c-violet) 40%, var(--color-border)); transform: translateY(-1px); }
.voice-btn.listening { background: color-mix(in srgb, var(--c-violet) 16%, transparent); border-color: var(--c-violet); color: var(--c-violet); }

.vz-head { display: flex; align-items: center; gap: 13px; margin-bottom: 16px; }
.vz-head h3 { margin: 0; font-size: 16px; }
.vz-sub { margin: 2px 0 0; font-size: 12px; color: var(--color-text-muted); }

/* Tres barras que respiran mientras el micrófono está abierto */
.vz-pulse { display: inline-flex; align-items: center; justify-content: center; gap: 3px; width: 42px; height: 42px; flex-shrink: 0; border-radius: 14px; background: color-mix(in srgb, var(--c-violet) 12%, transparent); }
.vz-pulse i { width: 3px; height: 10px; border-radius: 999px; background: var(--c-violet); opacity: .45; }
.vz-pulse.on i { animation: vz-bar .9s var(--ease-standard) infinite; }
.vz-pulse.on i:nth-child(2) { animation-delay: .15s; }
.vz-pulse.on i:nth-child(3) { animation-delay: .3s; }
@keyframes vz-bar { 0%,100% { height: 8px; opacity: .45 } 50% { height: 20px; opacity: 1 } }

.vz-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 7px; padding: 26px 18px; }
.vz-state-ico { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--color-surface-2); color: var(--color-text-muted); }
.vz-state-ico .ico { width: 20px; height: 20px; }
.vz-state b { font-size: 14px; color: var(--color-primary); }
.vz-state > span { font-size: 12.5px; color: var(--color-text-muted); max-width: 380px; line-height: 1.5; }
.vz-state.error .vz-state-ico { background: var(--color-danger-light); color: var(--color-danger); }
.vz-state.thinking .vz-state-ico { background: color-mix(in srgb, var(--c-violet) 12%, transparent); color: var(--c-violet); }
.vz-live { margin: 8px 0 0; font-size: 14px; font-weight: 600; color: var(--color-primary); min-height: 20px; }

.vz-heard-box { background: var(--color-surface-2); border-radius: var(--radius-md); padding: 11px 14px; margin-bottom: 12px; }
.vz-heard-lbl { display: block; font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--color-text-subtle); margin-bottom: 3px; }
.vz-heard-box p { margin: 0; font-size: 13px; color: var(--color-text-secondary); font-style: italic; }

/* El plan: lo que de verdad importa mirar antes de confirmar */
.vz-plan { border: 1px solid color-mix(in srgb, var(--c-violet) 28%, var(--hairline)); border-radius: var(--radius-md); overflow: hidden; }
.vz-plan-head { display: flex; align-items: center; gap: 12px; padding: 13px 15px; background: color-mix(in srgb, var(--c-violet) 7%, transparent); }
.vz-plan-ico { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex-shrink: 0; border-radius: 11px; background: var(--c-violet); color: #fff; }
.vz-plan-ico .ico { width: 17px; height: 17px; }
.vz-plan-head b { display: block; font-size: 14px; color: var(--color-primary); line-height: 1.35; }
.vz-plan-head > div > span { font-size: 11px; color: var(--color-text-muted); }
.vz-rows { padding: 4px 15px 10px; }
.vz-row { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 7px 0; border-bottom: 1px solid var(--hairline); }
.vz-row:last-child { border-bottom: 0; }
.vz-row span { font-size: 11.5px; color: var(--color-text-muted); }
.vz-row b { font-size: 12.5px; color: var(--color-primary); text-align: right; }
.vz-missing { display: flex; align-items: flex-start; gap: 8px; padding: 10px 15px; background: var(--color-warn-light, #fff8e1); border-top: 1px solid var(--hairline); font-size: 11.5px; color: #8a5a00; }
.vz-missing .ico { width: 14px; height: 14px; flex-shrink: 0; margin-top: 1px; }

.vz-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.vz-acts .ico { width: 14px; height: 14px; margin-right: 5px; }

@media (prefers-reduced-motion: reduce) {
  .vz-pulse.on i { animation: none; }
}

/* ==================================================================
   CONFIGURACIÓN · COMANDO POR VOZ (fichas del Taller)
   ================================================================== */
.vz-quota {
  display: flex; align-items: flex-start; gap: 10px; margin: 12px 0 4px;
  padding: 12px 14px; border-radius: var(--radius-md);
  background: #fff8e1; border: 1px solid #f0d68a;
}
.vz-quota .ico { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; color: #b7791f; }
.vz-quota b { display: block; font-size: 12.5px; color: #7c5800; margin-bottom: 2px; }
.vz-quota span { font-size: 11.5px; color: #8a6400; line-height: 1.55; }

.vz-cmds { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 9px; }
.vz-cmd { display: flex; align-items: flex-start; gap: 10px; padding: 11px 13px; border-radius: var(--radius-md); background: var(--color-surface-2); }
.vz-cmd-ic { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; flex-shrink: 0; border-radius: 9px; background: var(--color-surface); color: var(--st, #4a6b8a); }
.vz-cmd-ic .ico { width: 14px; height: 14px; }
.vz-cmd b { display: block; font-size: 12.5px; color: var(--color-primary); }
.vz-cmd em { font-style: normal; font-size: 11.5px; color: var(--color-text-muted); }

/* ---- Ficha de huésped: historial de estadías ----
   La ficha dejó de ser un formulario de contacto y pasa a abrir con lo que
   de verdad se quiere ver: cuántas veces vino y cuánto dejó. */
.gu-hist { margin: 0 0 16px; padding: 14px 16px; border-radius: var(--radius-md); background: var(--color-surface-2); border: 1px solid var(--hairline); }
.gu-hist-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.gu-hist-kpis { display: flex; gap: 16px; flex-wrap: wrap; }
.gu-hist-kpis span { font-size: 11.5px; color: var(--color-text-muted); }
.gu-hist-kpis b { font-family: var(--font-mono); font-size: 13px; color: var(--color-primary); margin-right: 3px; }
.gu-hist-list { display: flex; flex-direction: column; max-height: 210px; overflow-y: auto; }
.gu-hist-row {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; cursor: pointer;
  flex-shrink: 0; padding: 8px 6px; background: transparent; border: 0;
  border-bottom: 1px solid var(--hairline); font-family: inherit;
  transition: background var(--dur-base), padding-left var(--dur-base) var(--ease-standard);
}
.gu-hist-row:last-child { border-bottom: 0; }
.gu-hist-row:hover { background: var(--color-surface); padding-left: 10px; }
.gu-hist-when { flex: 1; min-width: 0; font-size: 12px; color: var(--color-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gu-hist-n { flex-shrink: 0; font-family: var(--font-mono); font-size: 11px; color: var(--color-text-muted); }
.gu-hist-st { flex-shrink: 0; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--color-surface); color: var(--color-text-muted); white-space: nowrap; }
.gu-hist-st.st-checkin  { background: var(--color-green-light); color: var(--color-green); }
.gu-hist-st.st-checkout { background: var(--color-surface); color: var(--color-text-subtle); }
.gu-hist-st.st-cancelled{ background: var(--color-danger-light); color: var(--color-danger); }
.gu-hist-amt { flex-shrink: 0; font-family: var(--font-mono); font-size: 11.5px; color: var(--color-primary); min-width: 68px; text-align: right; }
.gu-hist-void { margin: 0; font-size: 12px; color: var(--color-text-muted); }

/* Condicion del plan, al lado del selector en el alta de reserva */
.f-plan-cond { display:block; margin-top:5px; font-size:11px; color: var(--color-text-muted); }
.f-plan-cond.warn { color:#b45309; font-weight:600; }

/* ---- Agente IA: interruptor directo en la tarjeta ----
   Encender y apagar es lo que más se toca, así que no puede vivir adentro de
   un modal. El resto de la tarjeta sigue abriendo la ficha completa. */
.cx-agent-head { position: relative; cursor: pointer; }
.cx-toggle { margin-left: auto; flex-shrink: 0; display: inline-flex; align-items: center; cursor: pointer; }
.cx-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.cx-toggle-track {
  display: block; width: 38px; height: 21px; border-radius: 999px; position: relative;
  background: var(--color-border); transition: background var(--dur-base) var(--ease-standard);
}
.cx-toggle-track i {
  position: absolute; top: 2.5px; left: 2.5px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(14,33,72,.28);
  transition: transform var(--dur-base) var(--ease-spring);
}
.cx-toggle input:checked + .cx-toggle-track { background: #0f9d68; }
.cx-toggle input:checked + .cx-toggle-track i { transform: translateX(17px); }
.cx-toggle input:focus-visible + .cx-toggle-track { outline: 2px solid var(--cx, var(--c-violet)); outline-offset: 2px; }

/* ---- Agresividad comercial: segmentado de 4 pasos ---- */
.cx-agent-sell { padding: 10px 0 2px; border-top: 1px solid var(--hairline); margin-top: 10px; }
.cx-agent-sell-lbl {
  display: block; font-size: 10px; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; color: var(--color-text-subtle); margin-bottom: 6px;
}
.cx-sell-seg { display: flex; gap: 3px; padding: 3px; border-radius: 999px; background: var(--color-surface-2); }
.cx-sell-op {
  flex: 1; min-width: 0; cursor: pointer; border: 0; background: transparent;
  padding: 5px 6px; border-radius: 999px; font-family: inherit; font-size: 10.5px;
  font-weight: 600; color: var(--color-text-muted); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  transition: background var(--dur-base), color var(--dur-base);
}
.cx-sell-op:hover { color: var(--color-primary); }
.cx-sell-op.on { background: var(--cc, var(--c-violet)); color: #fff; font-weight: 700; }
.cx-agent-sell-d { display: block; margin-top: 6px; font-style: normal; font-size: 11px; color: var(--color-text-muted); line-height: 1.45; }

/* ==================================================================
   ACADEMIA — sección propia, dialecto "La Biblioteca"
   Cada módulo tiene SU color (--mc) y lo propaga a toda su rama: el
   lomo en la portada, el índice y la página de la lección. Es la
   sección con más variedad cromática del sistema, a propósito: es un
   catálogo, no un tablero.
   ================================================================== */
#section-academia { --ac: var(--c-violet); }
/* Es un manual: se lee como un documento, con ancho acotado y centrado,
   no estirado al ancho de la ventana como el resto de las pantallas. */
#academia-content { max-width: 1180px; margin: 0 auto; }
.academia-btn:hover { background: color-mix(in srgb, var(--c-violet) 12%, transparent); border-color: color-mix(in srgb, var(--c-violet) 42%, var(--color-border)); }

/* ---- Portada ---- */
.ac-hero {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  padding: 42px 40px 34px; margin-bottom: 26px;
  background: var(--bg-dark, #0d1526); color: #fff; isolation: isolate;
}
.ac-hero > *:not(.ar-aurora) { position: relative; z-index: 1; }
.ac-hero-in { max-width: 720px; }
.ac-hero-eyebrow { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: color-mix(in srgb, var(--c-violet) 70%, #fff); margin-bottom: 12px; }
.ac-hero-eyebrow .ico { width: 15px; height: 15px; }
.ac-hero-title { font-family: var(--font-display); font-size: clamp(28px, 4vw, 44px); line-height: 1.05; margin: 0 0 10px; color: #fff; }
.ac-hero-sub { font-size: 15px; line-height: 1.6; color: rgba(255,255,255,.72); margin: 0 0 22px; max-width: 560px; }
.ac-searchbar { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: var(--radius-pill); background: var(--color-surface-2); border: 1px solid var(--hairline); max-width: 520px; transition: border-color var(--dur-base), background var(--dur-base), box-shadow var(--dur-base); }
.ac-searchbar:focus-within { background: var(--color-surface); border-color: color-mix(in srgb, var(--c-violet) 55%, var(--hairline)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-violet) 12%, transparent); }
.ac-searchbar .ico { width: 17px; height: 17px; color: var(--color-text-subtle); flex-shrink: 0; }
.ac-searchbar input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--color-primary); font-family: inherit; font-size: 14px; }
.ac-searchbar input::placeholder { color: var(--color-text-subtle); }
.ac-searchbar input::-webkit-search-cancel-button, .ac-searchbar input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.ac-searchbar-x { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; flex-shrink: 0; cursor: pointer; padding: 0; border-radius: 50%; background: var(--hairline); border: 0; color: var(--color-text-muted); }
.ac-searchbar-x .ico { width: 11px; height: 11px; color: inherit; }
.ac-searchbar-x:hover { background: color-mix(in srgb, var(--c-violet) 20%, var(--hairline)); color: var(--c-violet); }
.ac-page > .ac-searchbar { margin: 0 0 22px; }

/* Dentro del hero (fondo oscuro) el buscador es translúcido sobre la aurora */
.ac-hero-in .ac-searchbar { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.17); }
.ac-hero-in .ac-searchbar:focus-within { background: rgba(255,255,255,.15); border-color: color-mix(in srgb, var(--c-violet) 60%, transparent); box-shadow: 0 0 0 3px rgba(255,255,255,.08); }
.ac-hero-in .ac-searchbar .ico { color: rgba(255,255,255,.6); }
.ac-hero-in .ac-searchbar input { color: #fff; }
.ac-hero-in .ac-searchbar input::placeholder { color: rgba(255,255,255,.45); }
.ac-hero-in .ac-searchbar-x { background: rgba(255,255,255,.16); color: rgba(255,255,255,.75); }
.ac-hero-in .ac-searchbar-x:hover { background: rgba(255,255,255,.28); color: #fff; }
.ac-hero-stats { display: flex; gap: 26px; flex-wrap: wrap; margin: 22px 0 10px; }
.ac-hero-stats span { font-size: 12px; color: rgba(255,255,255,.6); }
.ac-hero-stats b { display: block; font-family: var(--font-display); font-size: 21px; color: #fff; }
.ac-hero-bar { height: 3px; border-radius: 999px; background: rgba(255,255,255,.14); overflow: hidden; max-width: 520px; }
.ac-hero-bar i { display: block; height: 100%; width: var(--w,0%); border-radius: 999px; background: linear-gradient(90deg, var(--c-violet), var(--c-cyan)); transition: width var(--dur-slow) var(--ease-out); }

/* ---- Estantería: un lomo por módulo ---- */
.ac-start { margin-bottom: 30px; }
.ac-start-title { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: 15px; color: var(--color-text-muted); margin: 0 0 12px; }
.ac-start-title .ico { width: 15px; height: 15px; color: var(--c-violet); }
.ac-start-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.ac-start-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; cursor: pointer; padding: 16px 18px; border-radius: var(--radius-lg); background: color-mix(in srgb, var(--mc) 6%, var(--color-surface)); border: 1px solid color-mix(in srgb, var(--mc) 20%, var(--hairline)); font-family: inherit; transition: transform var(--dur-base) var(--ease-standard), border-color var(--dur-base); }
.ac-start-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--mc) 45%, var(--hairline)); }
.ac-start-ic { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 10px; background: color-mix(in srgb, var(--mc) 15%, transparent); color: var(--mc); margin-bottom: 2px; }
.ac-start-ic .ico { width: 15px; height: 15px; }
.ac-start-card b { font-size: 13.5px; color: var(--color-primary); }
.ac-start-card em { font-style: normal; font-size: 12px; line-height: 1.5; color: var(--color-text-muted); }

.ac-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; margin-bottom: 30px; }
.ac-spine {
  position: relative; cursor: pointer; overflow: hidden;
  padding: 22px 22px 18px 26px; border-radius: var(--radius-lg);
  background: var(--color-surface); border: 1px solid var(--hairline);
  animation: ac-in var(--dur-base) var(--ease-out) both; animation-delay: calc(var(--i) * 45ms);
  transition: transform var(--dur-base) var(--ease-standard), border-color var(--dur-base);
}
@keyframes ac-in { from { opacity: 0; transform: translateY(10px); } }
.ac-spine::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--mc); }
.ac-spine:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--mc) 45%, var(--hairline)); }
.ac-spine-ic { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 13px; background: color-mix(in srgb, var(--mc) 13%, transparent); color: var(--mc); margin-bottom: 12px; }
.ac-spine-ic .ico { width: 19px; height: 19px; }
.ac-spine-eyebrow { display: block; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--mc); margin-bottom: 4px; }
.ac-spine h2 { font-family: var(--font-display); font-size: 19px; margin: 0 0 6px; color: var(--color-primary); }
.ac-spine p { font-size: 12.5px; line-height: 1.55; color: var(--color-text-muted); margin: 0 0 14px; }
.ac-spine footer { display: flex; align-items: center; gap: 12px; }
.ac-spine-n { font-size: 11px; font-family: var(--font-mono); color: var(--color-text-subtle); }
.ac-spine-done { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: var(--color-green); }
.ac-spine-done .ico { width: 12px; height: 12px; }
.ac-spine-go { margin-left: auto; color: var(--mc); opacity: 0; transition: opacity var(--dur-base), transform var(--dur-base); }
.ac-spine-go .ico { width: 15px; height: 15px; }
.ac-spine:hover .ac-spine-go { opacity: 1; transform: translateX(3px); }
.ac-spine-bar { position: absolute; left: 5px; right: 0; bottom: 0; height: 3px; background: var(--hairline); }
.ac-spine-bar i { display: block; height: 100%; width: var(--w,0%); background: var(--mc); transition: width var(--dur-slow) var(--ease-out); }

/* ---- Páginas internas ---- */
.ac-page { max-width: 900px; margin: 0 auto; animation: ac-page-in var(--dur-slow) var(--ease-out); }
.ac-page.ac-read { max-width: 760px; }
@keyframes ac-page-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.ac-mod-head-tight { margin-bottom: 18px; }
.ac-mod-head-tight h1 { font-size: 21px; }
.ac-back { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; margin-bottom: 20px; padding: 7px 15px; border-radius: var(--radius-pill); background: var(--color-surface); border: 1px solid var(--hairline); font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--color-text-secondary); transition: transform var(--dur-base) var(--ease-standard); }
.ac-back:hover { transform: translateX(-3px); }
.ac-back .ico { width: 14px; height: 14px; }

.ac-mod-head { display: flex; align-items: flex-start; gap: 17px; margin-bottom: 24px; }
.ac-mod-ic { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; flex-shrink: 0; border-radius: 16px; background: var(--mc, var(--c-violet)); color: #fff; }
.ac-mod-ic .ico { width: 24px; height: 24px; }
.ac-mod-eyebrow { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--mc, var(--c-violet)); margin-bottom: 3px; }
.ac-mod-head h1 { font-family: var(--font-display); font-size: 27px; margin: 0 0 6px; color: var(--color-primary); }
.ac-mod-head p { font-size: 13.5px; line-height: 1.6; color: var(--color-text-muted); margin: 0; max-width: 620px; }

.ac-lessons { display: flex; flex-direction: column; }
.ac-row { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; cursor: pointer; flex-shrink: 0; padding: 15px 6px; background: transparent; border: 0; border-bottom: 1px solid var(--hairline); font-family: inherit; transition: padding-left var(--dur-base) var(--ease-standard); }
.ac-row:last-child { border-bottom: 0; }
.ac-row:hover { padding-left: 10px; }
.ac-row-ic { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex-shrink: 0; border-radius: 11px; background: color-mix(in srgb, var(--mc, var(--c-violet)) 11%, transparent); color: var(--mc, var(--c-violet)); }
.ac-row-ic .ico { width: 16px; height: 16px; }
.ac-row.done .ac-row-ic { background: var(--color-green-light); color: var(--color-green); }
.ac-row-txt { flex: 1; min-width: 0; }
.ac-row-txt b { display: block; font-size: 14px; color: var(--color-primary); margin-bottom: 2px; }
.ac-row.done .ac-row-txt b { color: var(--color-text-muted); }
.ac-row-txt em { font-style: normal; display: block; font-size: 12px; color: var(--color-text-muted); line-height: 1.45; }
.ac-row-min { flex-shrink: 0; font-size: 10.5px; font-family: var(--font-mono); color: var(--color-text-subtle); }
.ac-row-go { flex-shrink: 0; color: var(--color-text-subtle); opacity: 0; transition: opacity var(--dur-base), transform var(--dur-base); }
.ac-row-go .ico { width: 14px; height: 14px; }
.ac-row:hover .ac-row-go { opacity: 1; transform: translateX(3px); }
.ac-void { font-size: 13px; color: var(--color-text-muted); padding: 20px 0; }

/* ---- Lección: se lee como una página ---- */
.ac-les-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.ac-les-ic { display: inline-flex; align-items: center; justify-content: center; width: 50px; height: 50px; flex-shrink: 0; border-radius: 16px; background: var(--mc); color: #fff; }
.ac-les-ic .ico { width: 23px; height: 23px; }
.ac-les-eyebrow { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--mc); margin-bottom: 3px; }
.ac-les-head h1 { font-family: var(--font-display); font-size: clamp(23px, 3.4vw, 31px); line-height: 1.12; margin: 0; color: var(--color-primary); }
.ac-where { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--mc); background: color-mix(in srgb, var(--mc) 9%, transparent); padding: 6px 13px; border-radius: var(--radius-pill); margin: 0 0 14px; }
.ac-where .ico { width: 13px; height: 13px; }
.ac-why { font-size: 15px; line-height: 1.65; color: var(--color-text-secondary); margin: 0 0 24px; padding-left: 16px; border-left: 3px solid color-mix(in srgb, var(--mc) 45%, transparent); }

.ac-h2 { display: flex; align-items: center; gap: 9px; font-family: var(--font-display); font-size: 16.5px; color: var(--color-primary); margin: 30px 0 12px; }
.ac-h2 .ico { width: 17px; height: 17px; color: var(--mc); }

.ac-ui { margin: 0; }
.ac-ui-row { display: grid; grid-template-columns: minmax(0,190px) minmax(0,1fr); gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--hairline); }
.ac-ui-row:last-child { border-bottom: 0; }
.ac-ui dt { font-size: 13px; font-weight: 700; color: var(--color-primary); }
.ac-ui dd { margin: 0; font-size: 13px; line-height: 1.55; color: var(--color-text-secondary); }

.ac-steps { margin: 0; padding: 0; list-style: none; counter-reset: acs; }
.ac-steps li { position: relative; counter-increment: acs; padding: 12px 0 12px 42px; border-bottom: 1px solid var(--hairline); font-size: 13.5px; line-height: 1.6; color: var(--color-text-secondary); }
.ac-steps li:last-child { border-bottom: 0; }
.ac-steps li::before { content: counter(acs); position: absolute; left: 0; top: 12px; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: color-mix(in srgb, var(--mc) 12%, transparent); color: var(--mc); font-family: var(--font-mono); font-size: 11.5px; font-weight: 700; }

.ac-rules { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 7px; }
.ac-rules li { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; line-height: 1.55; color: var(--color-text-secondary); }
.ac-rules li .ico { width: 13px; height: 13px; flex-shrink: 0; margin-top: 4px; color: var(--mc); }

.ac-errs { display: flex; flex-direction: column; gap: 9px; }
.ac-err { padding: 12px 15px; border-radius: var(--radius-md); background: #fff8f5; border: 1px solid #f3d9cd; }
.ac-err b { display: block; font-size: 13px; color: #9a3412; margin-bottom: 3px; }
.ac-err span { font-size: 12.5px; line-height: 1.55; color: #7c2d12; }

.ac-faq { display: flex; flex-direction: column; gap: 7px; }
.ac-faq-i { border-radius: var(--radius-md); background: var(--color-surface-2); border: 1px solid var(--hairline); overflow: hidden; }
.ac-faq-i summary { cursor: pointer; padding: 12px 15px; font-size: 13px; font-weight: 600; color: var(--color-primary); list-style: none; }
.ac-faq-i summary::-webkit-details-marker { display: none; }
.ac-faq-i summary::after { content: '+'; float: right; color: var(--mc); font-weight: 700; }
.ac-faq-i[open] summary::after { content: '\2212'; }
.ac-faq-i p { margin: 0; padding: 0 15px 13px; font-size: 12.5px; line-height: 1.6; color: var(--color-text-secondary); }

.ac-les-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--hairline); flex-wrap: wrap; }
.ac-nav { display: flex; gap: 8px; }
.ac-btn { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; padding: 8px 16px; border-radius: var(--radius-pill); background: var(--color-surface); border: 1px solid var(--hairline); font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--color-text-secondary); transition: transform var(--dur-base) var(--ease-standard), background var(--dur-base); }
.ac-btn:hover { transform: translateY(-1.5px); }
.ac-btn.solid { background: var(--mc, var(--c-violet)); border-color: transparent; color: #fff; }
.ac-btn .ico { width: 14px; height: 14px; }

/* ---- Asistente ---- */
.ac-ask { margin-top: 34px; padding: 22px 24px; border-radius: var(--radius-lg); background: var(--color-surface); border: 1px solid var(--hairline); }
.ac-ask-head { display: flex; align-items: center; gap: 13px; margin-bottom: 14px; }
.ac-ask-ic { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex-shrink: 0; border-radius: 12px; background: linear-gradient(135deg, var(--c-violet), var(--c-cyan)); color: #fff; }
.ac-ask-ic .ico { width: 18px; height: 18px; }
.ac-ask-head b { display: block; font-size: 14px; color: var(--color-primary); }
.ac-ask-head span { font-size: 12px; color: var(--color-text-muted); }
.ac-ask-log { display: flex; flex-direction: column; gap: 10px; max-height: 340px; overflow-y: auto; margin-bottom: 12px; }
.ac-ask-log:empty { display: none; }
.ac-b { flex-shrink: 0; max-width: 88%; padding: 11px 15px; border-radius: 15px; font-size: 13px; line-height: 1.6; animation: ac-in var(--dur-base) var(--ease-out) both; }
.ac-b.user { align-self: flex-end; background: var(--c-violet); color: #fff; border-bottom-right-radius: 5px; }
.ac-b.bot { align-self: flex-start; background: var(--color-surface-2); color: var(--color-text-secondary); border-bottom-left-radius: 5px; }
.ac-b-load { color: var(--color-text-muted); }
.ac-b-refs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ac-b-refs button { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; padding: 4px 11px; border-radius: 999px; background: var(--color-surface); border: 1px solid var(--hairline); font-family: inherit; font-size: 11px; font-weight: 600; color: var(--c-violet); }
.ac-b-refs button:hover { background: color-mix(in srgb, var(--c-violet) 9%, transparent); }
.ac-b-refs .ico { width: 11px; height: 11px; }
.ac-ask-row { display: flex; gap: 9px; }
.ac-ask-row input { flex: 1; min-width: 0; padding: 10px 15px; border-radius: var(--radius-pill); border: 1px solid var(--color-border); background: var(--color-surface-2); font-family: inherit; font-size: 13px; color: var(--color-primary); }
.ac-ask-row input:focus { outline: 0; border-color: var(--c-violet); background: var(--color-surface); }
.ac-ask-tips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.ac-ask-tips button { cursor: pointer; padding: 5px 12px; border-radius: 999px; background: var(--color-surface-2); border: 1px solid var(--hairline); font-family: inherit; font-size: 11.5px; color: var(--color-text-muted); transition: color var(--dur-base), border-color var(--dur-base); }
.ac-ask-tips button:hover { color: var(--c-violet); border-color: color-mix(in srgb, var(--c-violet) 38%, var(--hairline)); }
.ac-ask-clear { margin-top: 10px; cursor: pointer; background: none; border: 0; font-family: inherit; font-size: 11.5px; color: var(--color-text-subtle); text-decoration: underline; }

.ac-video { position: relative; padding-top: 56.25%; margin: 0 0 24px; border-radius: var(--radius-lg); overflow: hidden; background: var(--bg-dark, #0d1526); }
.ac-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

@media (max-width: 700px) {
  .ac-hero { padding: 30px 22px 26px; }
  .ac-ui-row { grid-template-columns: 1fr; gap: 4px; }
  .ac-les-foot { flex-direction: column; align-items: stretch; }
  .ac-hero-stats { gap: 16px; }
}

.ac-hero-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.ac-btn.ghost { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: #fff; }
.ac-btn.ghost:hover { background: rgba(255,255,255,.18); }

/* Reseñas en vivo: la cuenta ya recibe avisos de Google al instante */
.rv-acc-live { display:inline-flex; align-items:center; gap:5px; flex-shrink:0; font-size:11px; font-weight:700; color:#0f9d68; background:var(--color-green-light); padding:5px 11px; border-radius:999px; }
.rv-acc-live .ico { width:12px; height:12px; }

/* ==================================================================
   Popovers que no se tapan
   Un ancestro con transform/filter/opacity crea un contexto de apilamiento y
   encierra al menu: la tarjeta de abajo, que es hermana, le pasa por encima.
   Al abrir un desplegable o un calendario, el JS marca esos ancestros con
   .ar-pop-host; esto los eleva y les saca el recorte MIENTRAS esta abierto.
   Se limpia al cerrar, asi que no afecta el resto del tiempo.
   ================================================================== */
.ar-pop-host { position: relative; z-index: 500; }
.ar-pop-host { overflow: visible !important; }
/* El realce no debe romper la animacion de entrada de la tarjeta */
.st-card.ar-pop-host, .an-card.ar-pop-host, .admin-panel.ar-pop-host { animation: none; opacity: 1; transform: none; }

/* ==================================================================
   AVISOS — campanita del topbar
   Antes esto era un email al alojamiento por cada reserva web. Ahora
   el aviso vive adentro del PMS: se ve, no llena la casilla y queda
   a un clic de la reserva de la que habla.
   ================================================================== */
.notif-wrap { position: relative; display: flex; }

.notif-badge {
  position: absolute; top: -5px; right: -5px;
  min-width: 16px; height: 16px; padding: 0 4px;
  display: flex; align-items: center; justify-content: center;
  background: var(--c-rose, #e5484d); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 1;
  border-radius: 999px; border: 2px solid var(--color-surface, #fff);
}
/* Ambar cuando hay algo que requiere accion: distingue "enterate" de "hace algo" */
#notif-btn.has-action { border-color: color-mix(in srgb, var(--c-amber, #e08c1a) 55%, var(--color-border)); color: var(--c-amber, #e08c1a); }
#notif-btn.has-action:hover { background: color-mix(in srgb, var(--c-amber, #e08c1a) 12%, transparent); }

.notif-panel {
  position: absolute; top: 38px; right: 0; width: 340px;
  max-height: 420px; overflow: auto;
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,.16);
  z-index: 600;
}
.nt-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 11px 13px; border-bottom: 1px solid var(--color-border-light, var(--color-border));
  position: sticky; top: 0; background: inherit; border-radius: 12px 12px 0 0;
}
.nt-head b { font-size: 13px; color: var(--color-primary); }
.nt-head-acts { display: flex; align-items: center; gap: 10px; }
.nt-clear {
  background: none; border: none; cursor: pointer; padding: 0;
  font-family: inherit; font-size: 11px; color: var(--color-text-muted);
  text-decoration: underline; text-underline-offset: 2px;
}
.nt-clear:hover { color: var(--color-primary); }
.nt-viewall {
  background: none; border: none; cursor: pointer; padding: 0;
  font-family: inherit; font-size: 11px; font-weight: 600; color: var(--color-primary);
  white-space: nowrap;
}
.nt-viewall:hover { text-decoration: underline; text-underline-offset: 2px; }
.nt-more {
  display: block; width: 100%; text-align: center;
  padding: 9px; background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 11px; font-weight: 600; color: var(--color-primary);
  border-top: 1px solid var(--color-border-light, var(--color-border));
}
.nt-more:hover { background: color-mix(in srgb, var(--color-primary) 5%, transparent); }

.nt-list { display: flex; flex-direction: column; }
.nt-item {
  display: flex; gap: 10px; align-items: flex-start; text-align: left;
  padding: 11px 13px; background: none; border: none; cursor: pointer;
  border-bottom: 1px solid var(--color-border-light, var(--color-border));
  font-family: inherit; width: 100%;
}
.nt-item:last-child { border-bottom: none; }
.nt-item:hover { background: color-mix(in srgb, var(--color-primary) 5%, transparent); }
/* Barra lateral solo en lo no leido: la bandeja "ya vista" queda tranquila */
.nt-item.unread { box-shadow: inset 3px 0 0 var(--color-primary); }
.nt-item.unread.lv-action { box-shadow: inset 3px 0 0 var(--c-amber, #e08c1a); }
.nt-item.unread.lv-urgent { box-shadow: inset 3px 0 0 var(--c-rose, #e5484d); }

.nt-ic { flex-shrink: 0; margin-top: 1px; color: var(--color-text-muted); }
.nt-ic .ico { width: 16px; height: 16px; }
.nt-item.unread.lv-action .nt-ic { color: var(--c-amber, #e08c1a); }

.nt-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nt-body b { font-size: 12.5px; color: var(--color-text); font-weight: 600; line-height: 1.3; }
.nt-body span { font-size: 11.5px; color: var(--color-text-muted); line-height: 1.4; }
.nt-body em { font-size: 10.5px; color: var(--color-text-muted); font-style: normal; opacity: .8; margin-top: 2px; }
.nt-item.unread .nt-body b { font-weight: 700; }

.nt-void { padding: 22px 16px; text-align: center; font-size: 12px; color: var(--color-text-muted); line-height: 1.5; }

/* ---- Modal grande de avisos ("Ver todas") ---- */
.modal-overlay:has(.nt-modal) .modal-box, .modal-box:has(.nt-modal) { max-width: 560px; padding: 0; overflow: hidden; }
.nt-modal { display: flex; flex-direction: column; max-height: 78vh; }

/* ---- Modal de imagen adjunta (ej. comprobante de seña) en grande ---- */
.modal-overlay:has(.img-zoom) .modal-box, .modal-box:has(.img-zoom) { max-width: 720px; padding: 0; overflow: hidden; }
.nt-modal-head {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px;
  padding: 18px 22px 14px; border-bottom: 1px solid var(--color-border-light, var(--color-border));
}
.nt-modal-head h3 { margin: 0; flex-shrink: 0; }
.nt-modal-filters { display: flex; gap: 6px; }
.nt-filter {
  font-family: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
  padding: 5px 11px; border-radius: 999px; border: 1px solid var(--color-border);
  background: var(--color-surface, #fff); color: var(--color-text-muted);
}
.nt-filter em { font-style: normal; opacity: .7; margin-left: 3px; }
.nt-filter.on { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.nt-filter.on em { opacity: .85; }
.nt-modal-head .nt-clear { margin-left: auto; font-size: 12px; }

.nt-modal-list { overflow-y: auto; flex: 1; }
.nt-modal-item {
  display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%;
  padding: 14px 22px; background: none; border: none; cursor: pointer;
  border-bottom: 1px solid var(--color-border-light, var(--color-border));
  font-family: inherit;
}
.nt-modal-item:hover { background: color-mix(in srgb, var(--color-primary) 5%, transparent); }
.nt-modal-item.unread { box-shadow: inset 3px 0 0 var(--color-primary); }
.nt-modal-item.unread.lv-action { box-shadow: inset 3px 0 0 var(--c-amber, #e08c1a); }
.nt-modal-item.unread.lv-urgent { box-shadow: inset 3px 0 0 var(--c-rose, #e5484d); }
.nt-modal-item .nt-ic { margin-top: 2px; }
.nt-modal-item.unread.lv-action .nt-ic { color: var(--c-amber, #e08c1a); }
.nt-modal-item .nt-body b { font-size: 13.5px; }
.nt-modal-item .nt-body span { font-size: 12.5px; }
.nt-modal-item .nt-body em { font-size: 11px; }
.nt-dot {
  flex-shrink: 0; width: 8px; height: 8px; border-radius: 999px;
  background: var(--color-primary); margin-top: 5px;
}
.nt-modal-item.lv-action .nt-dot { background: var(--c-amber, #e08c1a); }
.nt-modal-item.lv-urgent .nt-dot { background: var(--c-rose, #e5484d); }
.nt-modal .nt-void { padding: 40px 22px; }

/* ==================================================================
   IMPORTAR RESERVAS — vista previa
   Antes el archivo se insertaba de una. Esta tabla es el paso que
   faltaba: se ve qué se entendió de cada fila y dónde va a caer cada
   reserva ANTES de escribir nada.
   ================================================================== */
.modal-overlay:has(.imp-prev) .modal-box, .modal-box:has(.imp-prev) { max-width: 1040px; }
.imp-prev { display: flex; flex-direction: column; max-height: 82vh; }
.imp-prev-head h3 { margin: 0 0 4px; }
.imp-prev-head p { margin: 0 0 14px; font-size: 12.5px; color: var(--color-text-muted); line-height: 1.5; }

.imp-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.imp-stat {
  flex: 1 1 120px; padding: 10px 13px; border-radius: 10px;
  border: 1px solid var(--color-border); background: var(--color-surface-alt, #f7f9fc);
}
.imp-stat b { display: block; font-size: 20px; font-weight: 700; color: var(--color-text); line-height: 1.1; }
.imp-stat em { font-style: normal; font-size: 11px; color: var(--color-text-muted); }
.imp-stat.ok { background: color-mix(in srgb, var(--color-green, #0f9d68) 9%, transparent); border-color: color-mix(in srgb, var(--color-green, #0f9d68) 32%, transparent); }
.imp-stat.ok b { color: var(--color-green, #0f9d68); }
.imp-stat.warn { background: #fffaf0; border-color: #ffd591; }
.imp-stat.warn b { color: #d97706; }

/* Qué columnas se reconocieron: si esto está mal, todo lo de abajo está mal */
.imp-cols { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 12px; font-size: 11.5px; line-height: 1.5; }
.imp-cols-ok { color: var(--color-green, #0f9d68); font-weight: 600; }
.imp-cols-no { color: var(--color-text-muted); }

.imp-table-wrap { overflow: auto; flex: 1; border: 1px solid var(--color-border); border-radius: 10px; }
.imp-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.imp-table thead th {
  position: sticky; top: 0; z-index: 1;
  background: var(--color-surface-alt, #f2f6fb); text-align: left;
  padding: 9px 10px; font-size: 11px; font-weight: 700; color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border); white-space: nowrap;
}
.imp-table td { padding: 8px 10px; border-bottom: 1px solid var(--color-border-light, var(--color-border)); vertical-align: middle; }
.imp-table tbody tr:hover { background: color-mix(in srgb, var(--color-primary) 4%, transparent); }
.imp-table tr.off td { opacity: .45; }
.imp-table tr.has-problem td { background: color-mix(in srgb, #d97706 6%, transparent); }
.imp-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.imp-dates { white-space: nowrap; font-variant-numeric: tabular-nums; }
.imp-dates em { font-style: normal; color: var(--color-text-muted); margin-left: 6px; font-size: 11px; }
.imp-none { color: var(--color-text-muted); font-style: italic; }

.imp-sel { max-width: 230px; font-size: 11.5px; padding: 4px 6px; }
/* Rojo cuando no hay dónde ponerla: es la fila que hay que mirar */
.imp-sel.bad { border-color: var(--c-rose, #e5484d); color: var(--c-rose, #e5484d); }
.imp-beds, .imp-tag {
  display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 999px;
  font-size: 10px; font-weight: 700; background: var(--color-surface-alt, #eef3f9); color: var(--color-text-muted);
}
.imp-st { padding: 2px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 700; white-space: nowrap; }
.imp-st.st-confirmada { background: color-mix(in srgb, var(--color-green, #0f9d68) 15%, transparent); color: var(--color-green, #0f9d68); }
.imp-st.st-prereserva { background: #fff4e0; color: #b45309; }
.imp-st.st-cancelled  { background: #fde8e8; color: #b91c1c; }

.imp-problem-row td { padding: 4px 10px 8px; font-size: 11px; color: #b45309; background: color-mix(in srgb, #d97706 6%, transparent); }

/* ---------- FORMAS DE LA PASTILLA (Ajustes de la grilla → Tamaños y formas) ----------
   El border-radius lo escribe el JS inline, según la forma elegida y según si
   ese extremo es el principio/fin real de la reserva. Estas dos formas no se
   pueden hacer con border-radius: hay que recortar la silueta. */
.bkpill.pshape-para,   .gs-shape-demo.pshape-para   { clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%); }
.bkpill.pshape-ribbon, .gs-shape-demo.pshape-ribbon { clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 50%, calc(100% - 7px) 100%, 0 100%); }

/* Selector de forma dentro del modal de ajustes */
.gs-shapes { display: flex; flex-wrap: wrap; gap: 8px; }
.gs-shape {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 9px 10px 7px; min-width: 84px; cursor: pointer;
  background: var(--color-surface, #fff); border: 1.5px solid var(--color-border-light, #d8e2ee);
  border-radius: 10px; transition: border-color var(--dur-fast), background var(--dur-fast), transform var(--dur-fast);
}
.gs-shape:hover { transform: translateY(-1px); border-color: var(--color-primary); }
.gs-shape.on { border-color: var(--color-primary); background: color-mix(in srgb, var(--color-primary) 8%, transparent); }
.gs-shape em { font-style: normal; font-size: 10.5px; font-weight: 600; color: var(--color-text-muted); text-align: center; line-height: 1.2; }
.gs-shape.on em { color: var(--color-primary); }
.gs-shape-demo {
  display: block; width: 62px; height: 17px;
  background: #a5d6a7; border: 1px solid #66bb6a;
}
