/* Sistema de diseño del panel Comodín Growth (15/11/2026).
   Extiende las variables de index.html (--ink --graphite --paper --mist --line --mute --soft --dmute --dline), no las reemplaza.
   Marca: negro, blanco y grises. El color funcional (verde, rojo, ámbar) solo marca estados y siempre va con texto o ícono.
   Los componentes nuevos llevan el prefijo ds- para no tocar las pantallas existentes. Memoria de diseño: docs/DISENO_PANEL.md */

/* ---------- Tokens ---------- */
:root {
  /* espaciado 4/8/12/16/24/32 */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px;
  /* radios */
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 22px; --r-pill: 999px;
  /* sombras suaves */
  --sh-1: 0 1px 2px rgba(17, 17, 17, .06);
  --sh-2: 0 4px 16px rgba(17, 17, 17, .08);
  --sh-3: 0 16px 40px rgba(17, 17, 17, .18);
  /* tipografía (Manrope, la que ya carga el panel) */
  --fs-xs: 12px; --fs-sm: 13px; --fs-md: 15px; --fs-lg: 17px; --fs-xl: 22px; --fs-2xl: 30px;
  /* grises extra */
  --hover: #EDEDED; --faint: #FAFAFA; --line-2: #CFCFCF;
  /* estados funcionales: solo para estados, siempre con texto o ícono */
  --ok: #17603C; --ok-bg: #E7F3EC;
  --err: #A3261D; --err-bg: #FBEAE8;
  --warn: #1F1F1F; --warn-bg: #ECECEC;   /* «atención» en gris de marca: sin amarillo ni dorado */
  /* movimiento */
  --t-fast: 150ms; --t-med: 200ms;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --anillo: 0 0 0 3px rgba(17, 17, 17, .18);
}

/* ---------- Base accesible ---------- */
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.side :focus-visible { outline-color: var(--ink); }
.side :is(nav a, .proj, .foot a, #so):focus-visible { outline-color: var(--ink); outline-offset: -2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ======================================================================
   NAVEGACIÓN: barra lateral clara y compacta (escritorio) y barra inferior (celular)
   ====================================================================== */
.app { grid-template-columns: 232px minmax(0, 1fr); background: var(--faint); }
.side {
  background: var(--paper); color: var(--ink); border-right: 1px solid var(--line);
  padding: var(--sp-4) var(--sp-3); gap: var(--sp-4);
}
.logo { color: var(--ink); font-size: var(--fs-lg); padding: 0 var(--sp-2); }
.logo img { filter: invert(1); border-radius: var(--r-sm); } /* el ícono del panel es blanco: se invierte sobre fondo claro */
.proj { background: var(--mist); border: 1px solid var(--line); color: var(--ink); transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.proj:hover { background: var(--hover); border-color: var(--line-2); }
.proj small { color: var(--mute); }
.proj .chev { color: var(--mute); }
.proj .av, .av { background: var(--ink); color: var(--paper); }
.menu { border: 1px solid var(--line); box-shadow: var(--sh-3); }
.menu .av { background: var(--ink); color: var(--paper); }
.side nav { gap: var(--sp-1); }
.side nav a {
  color: #2A2A2A; font-weight: 600; font-size: var(--fs-md); padding: 9px 12px; border-radius: var(--r-md);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.side nav a::before {
  content: ""; width: 18px; height: 18px; flex: none; background: currentColor; opacity: .85;
  -webkit-mask: var(--ico-pt, none) center / contain no-repeat; mask: var(--ico-pt, none) center / contain no-repeat;
}
.side nav a:hover { background: var(--mist); color: var(--ink); }
.side nav a[aria-current=page] { background: var(--ink); color: var(--paper); }
.side nav a[aria-current=page]::before { opacity: 1; }
.side nav a .n { background: var(--ink); color: var(--paper); }
.side nav a[aria-current=page] .n { background: var(--paper); color: var(--ink); }
.side .foot { color: var(--mute); border-top: 1px solid var(--line); }
.side .foot a { color: var(--ink); text-decoration: none; font-weight: 600; }
.side .foot a:hover { text-decoration: underline; }
.side .foot #so { color: var(--mute) !important; }
.ok { background: var(--ok); }

/* íconos de cada sección (se eligen por el enlace, sin tocar el JS) */
.side nav a[href="#conoce-diagnostico"], .side nav a[href="#s-diagnostico"], .side nav a[href="#diagnostico"]  { --ico-pt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 12h-4l-3 9L9 3l-3 9H2'/%3E%3C/svg%3E"); }
.side nav a[href="#conoce-cerebro"], .side nav a[href="#s-cerebro"], .side nav a[href="#inicio"]       { --ico-pt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 22h4M12 2a7 7 0 0 0-4 12.7V17h8v-2.3A7 7 0 0 0 12 2z'/%3E%3C/svg%3E"); }
.side nav a[href="#conoce-contenidos"], .side nav a[href="#s-contenidos"], .side nav a[href="#producir"]     { --ico-pt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M23 7l-7 5 7 5V7zM1 5h15v14H1z'/%3E%3C/svg%3E"); }
.side nav a[href="#conoce-conexiones"], .side nav a[href="#s-conexiones"], .side nav a[href="#prospeccion"]  { --ico-pt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8M23 21v-2a4 4 0 0 0-3-3.9M16 3.1a4 4 0 0 1 0 7.8'/%3E%3C/svg%3E"); }
.side nav a[href="#conoce-anuncios"], .side nav a[href="#s-anuncios"], .side nav a[href="#anuncios"]     { --ico-pt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11v2a1 1 0 0 0 1 1h2l5 4V6L6 10H4a1 1 0 0 0-1 1zM15.5 8.5a5 5 0 0 1 0 7'/%3E%3C/svg%3E"); }
.side nav a[href="#comercial"]    { --ico-pt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 7H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2zM16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16'/%3E%3C/svg%3E"); }
.side nav a[href="#conoce-finanzas"], .side nav a[href="#s-finanzas"], .side nav a[href="#finanzas"]     { --ico-pt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M23 6l-9.5 9.5-5-5L1 18M17 6h6v6'/%3E%3C/svg%3E"); }
.side nav a[href="#admin"]        { --ico-pt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 21v-7M4 10V3M12 21v-9M12 8V3M20 21v-5M20 12V3M1 14h6M9 8h6M17 16h6'/%3E%3C/svg%3E"); }
.side nav a[href="#conoce-crm"], .side nav a[href="#s-crm"], .side nav a[href="#crm"], .side nav a[href^="#crm-"] { --ico-pt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 11.5a8.4 8.4 0 0 1-9 8.4 8.5 8.5 0 0 1-3.8-.9L3 21l1.9-5.7A8.4 8.4 0 0 1 3.9 11.5 8.5 8.5 0 0 1 12.4 3a8.4 8.4 0 0 1 8.6 8.5z'/%3E%3C/svg%3E"); }

/* ---------- Celular: barra superior compacta + barra de navegación abajo ---------- */
@media (max-width: 899px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side {
    flex-direction: row; align-items: center; gap: var(--sp-3); padding: var(--sp-2) var(--sp-4);
    position: sticky; top: 0; z-index: 30; border-right: 0; border-bottom: 1px solid var(--line); background: var(--paper);
  }
  .side .logo { font-size: 0; padding: 0; gap: 0; }
  .projwrap { flex: 1; min-width: 0; }
  .proj { padding: 6px 10px; }
  .proj b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
  .proj .av { width: 30px; height: 30px; }
  .side .foot { margin: 0; padding: 0; border: 0; }
  .side .foot a, .side .foot span { display: none; }
  .side .foot { flex: none; }
  .side .foot > span:last-child { display: flex !important; }   /* 30/11: el bloque de botones tiene estilo en línea; en celular solo queda «Salir» y no se monta sobre la subcuenta */
  .side .foot #cc { display: none; }
  .side .foot #so { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--sp-2); font-weight: 700; font-size: var(--fs-sm); text-decoration: none !important; color: var(--ink) !important; }
  .side nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--paper); border-top: 1px solid var(--line);
    flex-direction: row; gap: 2px; overflow-x: auto; scrollbar-width: none;
    padding: var(--sp-1) var(--sp-2) calc(var(--sp-1) + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -4px 16px rgba(17, 17, 17, .06);
  }
  .side nav::-webkit-scrollbar { display: none; }
  .side nav a {
    flex: 0 0 auto; min-width: 72px; min-height: 52px; flex-direction: column; justify-content: center; align-items: center; gap: 3px;
    padding: 6px 8px; font-size: 11px; font-weight: 700; text-align: center; border-radius: var(--r-md); white-space: nowrap;
  }
  .side nav a::before { width: 22px; height: 22px; }
  .side nav a .n { position: absolute; margin: -4px 0 0 20px; padding: 0 6px; font-size: 10px; }
  main { padding-bottom: 104px; }
}

/* ======================================================================
   COMPONENTES (prefijo ds-)
   ====================================================================== */

/* Botón: ds-btn + variante (ds-btn--sec, --ghost, --danger) + tamaño (--sm, --lg). Estados: hover, active, foco, disabled, cargando */
.ds-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2); min-height: 44px; padding: 0 var(--sp-4);
  border-radius: var(--r-md); font-weight: 700; font-size: var(--fs-md); line-height: 1; text-decoration: none; cursor: pointer;
  background: var(--ink); color: var(--paper); border: 1px solid var(--ink); position: relative;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.ds-btn:hover { background: #2B2B2B; box-shadow: var(--sh-2); }
.ds-btn:active { transform: translateY(1px); box-shadow: none; }
.ds-btn--sec { background: var(--paper); color: var(--ink); border-color: var(--line-2); }
.ds-btn--sec:hover { background: var(--mist); box-shadow: var(--sh-1); }
.ds-btn--ghost { background: transparent; color: var(--ink); border-color: transparent; }
.ds-btn--ghost:hover { background: var(--hover); box-shadow: none; }
.ds-btn--danger { background: var(--paper); color: var(--err); border-color: var(--err); }
.ds-btn--danger:hover { background: var(--err-bg); box-shadow: none; }
.ds-btn--sm { min-height: 36px; padding: 0 var(--sp-3); font-size: var(--fs-sm); border-radius: var(--r-sm); }
.ds-btn--lg { min-height: 52px; padding: 0 var(--sp-5); font-size: var(--fs-lg); }
.ds-btn--icon { width: 44px; padding: 0; }
.ds-btn--icon.ds-btn--sm { width: 36px; }
.ds-btn:disabled, .ds-btn[aria-disabled=true] { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; }
.ds-btn.is-loading { color: transparent !important; pointer-events: none; }
.ds-btn.is-loading::after {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent;
  color: var(--paper); animation: ds-giro .7s linear infinite;
}
.ds-btn--sec.is-loading::after, .ds-btn--ghost.is-loading::after { color: var(--ink); }
@keyframes ds-giro { to { transform: rotate(360deg); } }
@media (max-width: 899px) { .ds-btn--sm { min-height: 44px; } }

/* Campo: ds-field > label + control + ayuda/error */
.ds-field { display: grid; gap: var(--sp-1); min-width: 0; }
.ds-field > label, .ds-label { font-size: var(--fs-sm); font-weight: 700; color: #2A2A2A; }
.ds-input, .ds-select, .ds-textarea {
  width: 100%; min-height: 44px; padding: 10px var(--sp-3); border: 1px solid var(--line-2); border-radius: var(--r-md);
  background: var(--paper); color: var(--ink); font: inherit; font-size: var(--fs-md);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.ds-textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
.ds-input::placeholder, .ds-textarea::placeholder { color: #767676; }
.ds-input:hover, .ds-select:hover, .ds-textarea:hover { border-color: var(--soft); }
.ds-input:focus, .ds-select:focus, .ds-textarea:focus { outline: none; border-color: var(--ink); box-shadow: var(--anillo); }
.ds-input:disabled, .ds-select:disabled, .ds-textarea:disabled { background: var(--mist); color: var(--mute); cursor: not-allowed; }
.ds-field.is-error .ds-input, .ds-field.is-error .ds-select, .ds-field.is-error .ds-textarea { border-color: var(--err); }
.ds-help { font-size: var(--fs-xs); color: var(--mute); }
.ds-error { font-size: var(--fs-xs); color: var(--err); font-weight: 700; display: flex; gap: var(--sp-1); align-items: center; }
.ds-error::before { content: "✕"; font-weight: 800; }
.ds-search { position: relative; }
.ds-search .ds-input { padding-left: 38px; }
.ds-search::before {
  content: ""; position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); background: var(--mute); pointer-events: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ds-check { display: flex; gap: var(--sp-2); align-items: center; min-height: 44px; font-size: var(--fs-md); cursor: pointer; }
.ds-check input { width: 20px; height: 20px; accent-color: var(--ink); flex: none; }

/* Interruptor */
.ds-switch { position: relative; display: inline-flex; align-items: center; gap: var(--sp-2); min-height: 44px; cursor: pointer; font-weight: 600; }
.ds-switch input { position: absolute; opacity: 0; width: 44px; height: 26px; margin: 0; cursor: pointer; }
.ds-switch i { width: 44px; height: 26px; border-radius: var(--r-pill); background: var(--line-2); position: relative; flex: none; transition: background var(--t-med) var(--ease); }
.ds-switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--paper); box-shadow: var(--sh-1); transition: transform var(--t-med) var(--ease); }
.ds-switch input:checked + i { background: var(--ink); }
.ds-switch input:checked + i::after { transform: translateX(18px); }
.ds-switch input:focus-visible + i { outline: 3px solid var(--ink); outline-offset: 2px; }

/* Etiquetas y chips de estado (el color nunca va solo: lleva ícono y texto) */
.ds-tag { display: inline-flex; align-items: center; gap: 5px; min-height: 24px; padding: 0 10px; border-radius: var(--r-pill); background: var(--mist); border: 1px solid var(--line); color: #2A2A2A; font-size: var(--fs-xs); font-weight: 700; white-space: nowrap; }
.ds-tag--solid { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.ds-tag--line { background: transparent; }
.ds-status { display: inline-flex; align-items: center; gap: 5px; min-height: 24px; padding: 0 10px; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 800; white-space: nowrap; background: var(--mist); color: #2A2A2A; border: 1px solid var(--line); }
.ds-status::before { content: "•"; font-weight: 900; }
.ds-status--ok { background: var(--ok-bg); color: var(--ok); border-color: #BBD9C8; } .ds-status--ok::before { content: "✓"; }
.ds-status--err { background: var(--err-bg); color: var(--err); border-color: #EBC2BE; } .ds-status--err::before { content: "✕"; }
.ds-status--warn { background: var(--warn-bg); color: var(--warn); border-color: #C9C9C9; } .ds-status--warn::before { content: "!"; }
.ds-status--off { color: var(--mute); border-style: dashed; } .ds-status--off::before { content: "–"; }

/* Avatar */
.ds-av { width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--paper); display: inline-grid; place-items: center; font-weight: 800; font-size: var(--fs-sm); flex: none; position: relative; text-transform: uppercase; }
.ds-av--sm { width: 28px; height: 28px; font-size: 11px; }
.ds-av--lg { width: 56px; height: 56px; font-size: var(--fs-lg); }
.ds-av--soft { background: var(--hover); color: var(--ink); }
.ds-av .ds-canal { position: absolute; right: -3px; bottom: -3px; width: 16px; height: 16px; border-radius: 50%; background: var(--paper); border: 1px solid var(--line-2); display: grid; place-items: center; font-size: 9px; color: var(--ink); font-weight: 900; }

/* Tarjeta */
.ds-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--sp-4); box-shadow: var(--sh-1); min-width: 0; }
.ds-card--flat { box-shadow: none; }
.ds-card--dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ds-card.is-interactive { cursor: pointer; transition: box-shadow var(--t-med) var(--ease), border-color var(--t-med) var(--ease), transform var(--t-med) var(--ease); }
.ds-card.is-interactive:hover { box-shadow: var(--sh-2); border-color: var(--line-2); transform: translateY(-1px); }
.ds-card h3 { margin: 0; font-size: var(--fs-lg); font-weight: 800; letter-spacing: -.01em; }
.ds-stat { display: grid; gap: var(--sp-1); }
.ds-stat .valor { font-size: var(--fs-2xl); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.ds-stat .nombre { font-size: var(--fs-sm); color: var(--mute); font-weight: 600; }
.ds-stat .pista { font-size: var(--fs-xs); color: var(--mute); }
.ds-card--dark .nombre, .ds-card--dark .pista { color: var(--dmute); }

/* Encabezado de página */
.ds-page { display: flex; gap: var(--sp-4); align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-bottom: var(--sp-5); }
.ds-page h1 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; letter-spacing: -.03em; margin: 0; }
.ds-page p { color: var(--mute); margin: var(--sp-1) 0 0; }
.ds-acciones { display: flex; gap: var(--sp-2); flex-wrap: wrap; align-items: center; }

/* Pestañas (role=tablist) y control segmentado */
.ds-tabs { display: flex; flex-direction: row; gap: var(--sp-1); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; margin-bottom: var(--sp-4); }
.ds-tabs::-webkit-scrollbar { display: none; }
.ds-tabs a, .ds-tabs button {
  display: inline-flex; align-items: center; gap: var(--sp-2); min-height: 44px; padding: 0 var(--sp-4); border: 0; background: none; color: var(--mute);
  font-weight: 700; font-size: var(--fs-md); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; cursor: pointer;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.ds-tabs a:hover, .ds-tabs button:hover { color: var(--ink); }
.ds-tabs [aria-selected=true], .ds-tabs [aria-current=page] { color: var(--ink); border-bottom-color: var(--ink); }
.ds-tabs .n { background: var(--ink); color: var(--paper); border-radius: var(--r-pill); padding: 1px 8px; font-size: var(--fs-xs); font-weight: 800; }
.ds-seg { display: inline-flex; padding: 3px; background: var(--mist); border: 1px solid var(--line); border-radius: var(--r-md); gap: 2px; }
.ds-seg button { min-height: 38px; padding: 0 var(--sp-3); border-radius: var(--r-sm); font-weight: 700; font-size: var(--fs-sm); color: var(--mute); transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.ds-seg button[aria-pressed=true] { background: var(--paper); color: var(--ink); box-shadow: var(--sh-1); }
@media (max-width: 899px) { .ds-seg button { min-height: 44px; } }

/* Tabla */
.ds-tablewrap { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--paper); overflow: auto; max-width: 100%; }
.ds-table { width: 100%; border-collapse: collapse; font-size: var(--fs-md); }
.ds-table th { position: sticky; top: 0; background: var(--faint); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; color: var(--mute); padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--line); text-align: left; font-weight: 800; white-space: nowrap; }
.ds-table td { padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--line); vertical-align: middle; }
.ds-table tr:last-child td { border-bottom: 0; }
@media (max-width: 599px) { .ds-table td { min-width: 7.5em; padding: var(--sp-2) var(--sp-3); } .ds-table th { padding: var(--sp-2) var(--sp-3); } }   /* 30/11: en celular la celda no queda de una palabra por renglón; la tabla se desplaza de costado en su caja */
.ds-table tbody tr { transition: background var(--t-fast) var(--ease); }
.ds-table tbody tr:hover { background: var(--faint); }
.ds-table tbody tr[tabindex] { cursor: pointer; }
.ds-table tbody tr[aria-selected=true] { background: var(--mist); }

/* Lista con avatar */
.ds-list { list-style: none; margin: 0; padding: 0; display: grid; }
.ds-row { display: flex; gap: var(--sp-3); align-items: center; padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--line); min-height: 64px; min-width: 0; background: var(--paper); text-align: left; width: 100%; transition: background var(--t-fast) var(--ease); }
.ds-row:hover { background: var(--faint); }
.ds-row[aria-selected=true], .ds-row.is-active { background: var(--mist); box-shadow: inset 3px 0 0 var(--ink); }
.ds-row .cuerpo { min-width: 0; flex: 1; display: grid; gap: 2px; }
.ds-row .titulo { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-row .sub { font-size: var(--fs-sm); color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-row .lado { display: grid; justify-items: end; gap: var(--sp-1); font-size: var(--fs-xs); color: var(--mute); flex: none; }
.ds-dot { min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill); background: var(--ink); color: var(--paper); font-size: 11px; font-weight: 800; display: inline-grid; place-items: center; }

/* Modal (usa <dialog>) y panel lateral */
.ds-modal { border: 0; border-radius: var(--r-xl); padding: 0; width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); box-shadow: var(--sh-3); background: var(--paper); color: var(--ink); }
.ds-modal::backdrop { background: rgba(17, 17, 17, .5); animation: ds-fade var(--t-med) var(--ease); }
.ds-modal[open] { animation: ds-sube var(--t-med) var(--ease); display: flex; flex-direction: column; }
.ds-modal header { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3); padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--line); }
.ds-modal header h2 { margin: 0; font-size: var(--fs-xl); letter-spacing: -.02em; }
.ds-modal .ds-cuerpo { padding: var(--sp-5); overflow: auto; display: grid; gap: var(--sp-4); }
.ds-modal footer { padding: var(--sp-4) var(--sp-5); border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: var(--sp-2); flex-wrap: wrap; }
.ds-sheet { position: fixed; inset: 0 0 0 auto; width: min(440px, 100vw); background: var(--paper); box-shadow: var(--sh-3); z-index: 60; display: flex; flex-direction: column; animation: ds-entra var(--t-med) var(--ease); }
@keyframes ds-fade { from { opacity: 0; } }
@keyframes ds-sube { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes ds-entra { from { transform: translateX(24px); opacity: 0; } }

/* Avisos y banners */
.ds-banner { display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); border: 1px solid var(--line); background: var(--mist); font-size: var(--fs-sm); }
.ds-banner::before { content: "i"; flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-weight: 800; font-size: 12px; font-style: italic; }
.ds-banner--info { background: var(--mist); border-color: var(--line); color: var(--ink); } /* informativo, sin color funcional: negro y gris */
.ds-banner--ok { background: var(--ok-bg); border-color: #BBD9C8; color: var(--ok); } .ds-banner--ok::before { content: "✓"; background: var(--ok); font-style: normal; }
.ds-banner--warn { background: var(--warn-bg); border-color: #C9C9C9; color: var(--warn); } .ds-banner--warn::before { content: "!"; background: var(--warn); font-style: normal; }
.ds-banner--err { background: var(--err-bg); border-color: #EBC2BE; color: var(--err); } .ds-banner--err::before { content: "✕"; background: var(--err); font-style: normal; }
.ds-banner b { display: block; }
.ds-toasts { position: fixed; right: var(--sp-4); bottom: var(--sp-4); z-index: 80; display: grid; gap: var(--sp-2); width: min(380px, calc(100vw - 32px)); }
.ds-toast { display: flex; gap: var(--sp-3); align-items: center; padding: var(--sp-3) var(--sp-4); background: var(--ink); color: var(--paper); border-radius: var(--r-md); box-shadow: var(--sh-3); font-weight: 600; font-size: var(--fs-sm); animation: ds-sube var(--t-med) var(--ease); }
@media (max-width: 899px) { .ds-toasts { bottom: 92px; } }

/* Carga (esqueleto), vacío, error */
.ds-skel { background: linear-gradient(90deg, var(--mist) 25%, #F9F9F9 50%, var(--mist) 75%); background-size: 200% 100%; border-radius: var(--r-sm); min-height: 14px; animation: ds-brillo 1.3s linear infinite; }
@keyframes ds-brillo { to { background-position: -200% 0; } }
.ds-empty { border: 2px dashed var(--line-2); border-radius: var(--r-lg); padding: var(--sp-6) var(--sp-5); text-align: center; display: grid; gap: var(--sp-2); justify-items: center; background: var(--paper); }
.ds-empty .ico { width: 48px; height: 48px; border-radius: 50%; background: var(--mist); display: grid; place-items: center; font-size: 22px; }
.ds-empty h3 { margin: 0; font-size: var(--fs-lg); }
.ds-empty p { color: var(--mute); max-width: 44ch; margin: 0; }
.ds-meter { height: 8px; border-radius: var(--r-pill); background: var(--line); overflow: hidden; }
.ds-meter > i { display: block; height: 100%; background: var(--ink); border-radius: inherit; transition: width var(--t-med) var(--ease); }
.ds-kbd { display: inline-block; min-width: 22px; padding: 1px 6px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; font-size: 11px; font-weight: 800; background: var(--paper); text-align: center; }
.ds-hr { border: 0; border-top: 1px solid var(--line); margin: var(--sp-4) 0; }
.ds-grid { display: grid; gap: var(--sp-4); }
.ds-grid--auto { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.ds-stack { display: grid; gap: var(--sp-3); }
.ds-inline { display: flex; gap: var(--sp-2); flex-wrap: wrap; align-items: center; }
.ds-muted { color: var(--mute); }
.ds-sec { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .12em; font-weight: 800; color: var(--mute); margin: var(--sp-5) 0 var(--sp-3); }

/* Los enlaces dentro de <main> heredan color y subrayado de index.html (main a:not(.btn)): los componentes ds- los anulan. */
main a.ds-btn { text-decoration: none; color: var(--paper); }
main a.ds-btn--sec, main a.ds-btn--ghost, main a.ds-btn--danger { color: var(--ink); }
main a.ds-btn--danger { color: var(--err); }
main .ds-tabs a { text-decoration: none; color: var(--mute); }
main .ds-tabs a:hover, main .ds-tabs a[aria-current=page] { color: var(--ink); }
main a.ds-row, main .ds-row a { text-decoration: none; }

/* Recorrido de alta (Primeros pasos) */
.rc { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--paper); padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-4); }
.rc[hidden] { display: none; }
.rc-cab { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: var(--sp-2); }
.rc-pasos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-2); }
.rc-pasos a { display: flex; gap: var(--sp-2); align-items: center; padding: var(--sp-2) var(--sp-3); border-radius: var(--r-md); border: 1px solid var(--line); text-decoration: none; color: var(--ink); min-height: 52px; }
.rc-pasos a small { display: block; color: var(--mute); font-size: var(--fs-xs, 12px); }
.rc-pasos .es-sig a { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.rc-pasos .es-hecho a { background: var(--mist); }
.rc-pasos a[aria-current="step"] { outline: 2px solid var(--ink); outline-offset: 1px; }
.rc-n { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-weight: 800; flex: none; font-size: 13px; }
.rc-pasos .es-hecho .rc-n { background: var(--ink); }
@media (max-width: 900px) { .rc-pasos { grid-template-columns: minmax(0, 1fr); } }

/* Cerebro y directores */
.cd-decide { display: grid; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.cd-cab { display: flex; gap: var(--sp-3); justify-content: space-between; align-items: flex-start; flex-wrap: wrap; }
.cd-cab h3 { margin: 0; font-size: var(--fs-md); }
.cd-areas { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--sp-4); margin-bottom: var(--sp-4); }
.cd-area { display: grid; gap: var(--sp-3); align-content: start; }
.cd-lista { display: grid; gap: var(--sp-2); }
.cd-tarea, .cd-rep { display: grid; gap: 2px; padding: var(--sp-2) 0; border-top: 1px solid var(--line); }
.cd-t1 { display: flex; gap: var(--sp-2); justify-content: space-between; align-items: center; flex-wrap: wrap; }
.cd-dos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-5, 24px); }
.cd-mas { margin-top: var(--sp-4); }
.cd-mas > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.cd-boton { position: fixed; right: 16px; bottom: 16px; z-index: 40; box-shadow: var(--sh-3, 0 8px 24px rgba(0,0,0,.25)); border-radius: var(--r-pill, 999px); }
.cd-panel { position: fixed; right: 16px; bottom: 72px; z-index: 41; width: min(420px, calc(100vw - 32px)); max-height: min(600px, 75vh); display: grid; grid-template-rows: auto minmax(120px, 1fr) auto; gap: var(--sp-3); padding: var(--sp-4); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg, 16px); box-shadow: var(--sh-3, 0 12px 32px rgba(0,0,0,.28)); }
.cd-panel[hidden] { display: none; }
.cd-ph { display: flex; justify-content: space-between; gap: var(--sp-3); align-items: flex-start; }
.cd-ph > div { display: grid; min-width: 0; }
.cd-log { max-height: none; min-height: 0; }
.cd-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--sp-2); align-items: end; }
@media (max-width: 900px) { .cd-dos { grid-template-columns: minmax(0, 1fr); } .cd-boton { bottom: 76px; } .cd-panel { right: 8px; left: 8px; width: auto; bottom: 128px; max-height: 60vh; } }

/* Plantillas de video (vista previa estilo Captions AI) */
.pl-filtros { flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.pl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: var(--sp-4); }
.pl-card { display: grid; gap: var(--sp-2); align-content: start; }
.pl-card.es-espera { opacity: .85; }
.pl-marco { position: relative; aspect-ratio: 9 / 16; border-radius: var(--r-lg, 16px); overflow: hidden; background: var(--ink); border: 1px solid var(--line); cursor: pointer; display: grid; place-items: center; }
.pl-marco:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.pl-marco--grande { max-width: 280px; margin-inline: auto; }
.pl-video, .pl-poster { width: 100%; height: 100%; object-fit: cover; display: block; }
.pl-marco video.pl-video { position: absolute; inset: 0; }
.pl-play { position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px; border-radius: 50%; background: rgba(0,0,0,.65); color: #fff; display: grid; place-items: center; font-size: 12px; pointer-events: none; transition: opacity .15s; }
.pl-card.es-jugando .pl-play { opacity: 0; }
.pl-tipo { width: 100%; height: 100%; display: grid; place-items: center; overflow: hidden; }
.pl-vacia { display: grid; gap: 4px; padding: var(--sp-3); text-align: center; color: var(--paper); }
.pl-vacia .ds-muted { color: #C4C4C4; }
.pl-estado { position: absolute; left: 8px; top: 8px; padding: 2px 10px; border-radius: var(--r-pill, 999px); background: var(--paper); color: var(--ink); font-size: 12px; font-weight: 700; }
.pl-estado--err { background: var(--err-bg); color: var(--err); }
.pl-info { display: grid; gap: 4px; }
.pl-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.pl-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pl-detalle { display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: var(--sp-4); align-items: start; }
.cd-botones { display: grid; gap: var(--sp-2); }
@media (max-width: 700px) { .pl-detalle { grid-template-columns: minmax(0, 1fr); } .pl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Admin: topes y billetera */
.at-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); align-items: start; margin-bottom: var(--sp-4); }
.at-card { display: grid; gap: var(--sp-3); align-content: start; margin-bottom: var(--sp-4); }
.at-grid .at-card { margin-bottom: 0; }
.at-dos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
.at-med { display: grid; gap: 4px; margin-top: 4px; }
@media (max-width: 900px) { .at-grid, .at-dos { grid-template-columns: minmax(0, 1fr); } }

/* Íconos de las entradas nuevas del menú */
.side nav a[href="#conoce-negocio"], .side nav a[href="#s-negocio"], .side nav a[href="#negocio"] { --ico-pt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 21V7l8-4 8 4v14M9 21v-6h6v6M9 10h.01M15 10h.01'/%3E%3C/svg%3E"); }
.side nav a[href="#paginas-web"] { --ico-pt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3a14 14 0 0 1 0 18M12 3a14 14 0 0 0 0 18'/%3E%3C/svg%3E"); }
.side nav a[href="#conoce-seo"], .side nav a[href="#s-seo"], .side nav a[href="#seo"] { --ico-pt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.3-4.3M8 11h6M11 8v6'/%3E%3C/svg%3E"); }
.side nav a[href="#conoce-cuentas"], .side nav a[href="#cuentas-conectadas"] { --ico-pt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7 0l3-3a5 5 0 0 0-7-7l-1 1M14 11a5 5 0 0 0-7 0l-3 3a5 5 0 0 0 7 7l1-1'/%3E%3C/svg%3E"); }

/* Cuentas conectadas: catálogo de integraciones */
.int-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: var(--sp-4); }
.int-card { display: grid; gap: var(--sp-3); align-content: start; }
.int-card .lista-v3 { margin: 0; }
.int-cab { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: var(--sp-3); align-items: start; }
.int-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-weight: 800; font-size: 20px; }
.int-t { display: grid; gap: 2px; min-width: 0; }
.int-t h2 { margin: 0; font-size: var(--fs-md, 16px); }
.int-desc { color: var(--mute, #6B6B6B); font-size: var(--fs-sm, 14px); }
.int-acc { display: flex; gap: var(--sp-2); flex-wrap: wrap; align-items: center; }
/* Cuentas conectadas por temas (25/11, Ulises: «que no se maree»): resumen arriba, temas plegables cerrados al entrar, «Avanzado» al final */
/* 28/11: reconectar Meta en UN botón grande (rediseño: visual, fácil) */
.cx-meta { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 28px 20px 22px; margin: 0 0 18px; border-radius: 24px; background: #0b0b0c; color: #fff; box-shadow: 0 30px 60px -34px rgba(0,0,0,.6); }
.cx-meta h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; color: #fff; }
.cx-meta-logos { display: flex; gap: 10px; }
.cx-meta-logos span { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: #1f1f22; font-weight: 800; font-size: 20px; color: #fff; }
.cx-meta-estado { margin: 0; color: #d4d4d8; font-size: 15px; }
.cx-meta-btn { font: inherit; font-weight: 800; font-size: 17px; border: 0; border-radius: 999px; background: #fff; color: #0b0b0c; padding: 16px 28px; min-height: 56px; width: min(100%, 460px); cursor: pointer; transition: transform .15s, box-shadow .2s; box-shadow: 0 0 0 0 rgba(255,255,255,.5); animation: cx-pulso 2.4s ease-out infinite; }
.cx-meta-btn:hover { transform: translateY(-1px); } .cx-meta-btn:active { transform: scale(.98); } .cx-meta-btn:disabled { opacity: .6; animation: none; }
.cx-meta.is-ok .cx-meta-btn { background: transparent; color: #fff; border: 1.5px solid #52525b; animation: none; font-size: 15px; min-height: 48px; padding: 12px 22px; width: auto; }
.cx-meta-nota { margin: 0; color: #8a8a8f; font-size: 12.5px; max-width: 46ch; }
@keyframes cx-pulso { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.45); } 70% { box-shadow: 0 0 0 14px rgba(255,255,255,0); } 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); } }
@media (prefers-reduced-motion: reduce) { .cx-meta-btn { animation: none; } }
@media (max-width: 640px) { .cx-grupo .cx-lema { display: none; } }   /* en el celular, solo el título de cada tema: menos texto */
/* 28/11: Inicio (rediseño: visual, menos texto) */
.in-hola h1 { margin: 4px 0 14px; font-size: clamp(30px, 6vw, 44px); letter-spacing: -.03em; }
.in-hoy { margin: 6px 0 18px; }
.in-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.in-num { display: grid; gap: 4px; align-content: start; padding: 18px; border-radius: 22px; background: #0b0b0c; color: #fff; text-decoration: none; min-height: 118px; transition: transform .2s; }
.in-num:hover { transform: translateY(-2px); }
.in-num b { font-size: 40px; line-height: 1; letter-spacing: -.03em; }
.in-num span { font-weight: 700; font-size: 14px; color: #d4d4d8; }
.in-num small { color: #8a8a8f; font-size: 12px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.in-nums .in-num:nth-child(n+2) { background: #f4f4f5; color: #0b0b0c; } .in-nums .in-num:nth-child(n+2) span { color: #52525b; }
.in-fecha { margin: 8px 2px 0; }
main a.in-num, main a.in-num:hover, main a.in-atajo, main a.in-atajo:hover { text-decoration: none; }
main a.in-num { color: #0b0b0c; } main a.in-num b { color: inherit; } main a.in-num:first-child, main a.in-num:first-child b { color: #fff; }
main a.in-atajo { color: #0b0b0c; }
.in-atajos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 18px; }
.in-atajo { display: grid; justify-items: center; gap: 8px; padding: 16px 8px; border: 1px solid var(--line); border-radius: 20px; background: #fff; color: #0b0b0c; text-decoration: none; font-weight: 700; font-size: 14px; text-align: center; transition: transform .2s, box-shadow .2s; }
.in-atajo:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -22px rgba(0,0,0,.45); }
.in-atajo span { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; background: #0b0b0c; color: #fff; font-size: 20px; }
@media (min-width: 900px) { .in-atajos { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 400px) { .in-nums { grid-template-columns: 1fr 1fr; } .in-num b { font-size: 32px; } }
.in-mas > summary .small { margin-left: 6px; }
.cx-resumen { display: grid; gap: var(--sp-3); padding: var(--sp-4); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--faint); margin: 0 0 var(--sp-4); }
.cx-res-cab { display: flex; gap: var(--sp-3); align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cx-res-cab h2 { margin: 0 0 2px; font-size: var(--fs-lg); }
.cx-res-cab .btn { min-height: 44px; }
.cx-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.cx-chips li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r-pill); border: 1px dashed var(--line-2); color: var(--mute); font-size: var(--fs-sm); font-weight: 600; }
.cx-chips li.es-ok { border: 1px solid var(--ink); background: var(--ink); color: var(--paper); }
.cx-grupos { display: grid; gap: var(--sp-3); }
.cx-grupo { display: block; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--paper); box-shadow: var(--sh-1); }
.cx-grupo[hidden] { display: none; }
.cx-grupo > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto 20px; gap: var(--sp-3); align-items: center; padding: var(--sp-4); min-height: 72px; border-radius: var(--r-lg); }
.cx-grupo > summary::-webkit-details-marker { display: none; }
.cx-grupo > summary:hover { background: var(--faint); }
.cx-grupo[open] > summary { border-bottom: 1px solid var(--line); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.cx-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-weight: 800; font-size: 20px; }
.cx-tt { display: grid; gap: 2px; min-width: 0; }
.cx-tt b { font-size: var(--fs-lg); }
.cx-lema { color: var(--mute); font-size: var(--fs-sm); }
.cx-cuenta { font-size: var(--fs-sm); font-weight: 700; color: var(--mute); white-space: nowrap; padding: 4px 10px; border-radius: var(--r-pill); background: var(--mist); }
.cx-cuenta--ok { background: var(--ink); color: var(--paper); }
.cx-cuenta--mal { background: var(--err-bg); color: var(--err); }
.cx-flecha { width: 10px; height: 10px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); justify-self: center; transition: transform var(--t-fast) var(--ease); margin-top: -4px; }
.cx-grupo[open] > summary .cx-flecha { transform: rotate(225deg); margin-top: 4px; }
.cx-cuerpo { padding: var(--sp-4); display: grid; gap: var(--sp-4); }
.cx-cuerpo > :empty { display: none; }
.cx-cuerpo .ds-sec:first-child { margin-top: 0 !important; }
.cx-cuerpo #conexiones-navegador > h2.ds-sec:first-child { display: none; }   /* «Paso 1 · Instalá la extensión…» ya lo dice el título del tema */
.cx-nota { margin: 0; }
.cx-link { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; cursor: pointer; }
.cx-det > summary { cursor: pointer; min-height: 36px; display: flex; align-items: center; font-size: var(--fs-sm); color: var(--mute); }
.cx-avanzado { background: var(--faint); box-shadow: none; }
.cx-avanzado .cx-ico { background: var(--mist); color: var(--ink); }
#cx-avanzado { overflow-x: auto; }
#cx-avanzado table { min-width: 640px; }
#cx-avanzado code { font-size: var(--fs-xs); word-break: break-all; }
#cx-avanzado h3 { margin: var(--sp-3) 0 var(--sp-1); font-size: var(--fs-md); }
.int-card.cx-marca { animation: cx-marca 1.6s var(--ease); }
@keyframes cx-marca { 0%, 60% { box-shadow: 0 0 0 4px var(--ink); } 100% { box-shadow: var(--sh-1); } }
@media (max-width: 640px) {
  .cx-grupo > summary { grid-template-columns: 40px minmax(0, 1fr) 16px; padding: var(--sp-3); gap: var(--sp-2) var(--sp-3); }
  .cx-ico { width: 40px; height: 40px; font-size: 18px; }
  .cx-cuenta { grid-column: 2; grid-row: 2; justify-self: start; }
  .cx-flecha { grid-column: 3; grid-row: 1; }
  .cx-cuerpo { padding: var(--sp-3); }
  .cx-res-cab .btn { width: 100%; }
}
/* Correo › ¿Tus correos llegan bien? (D-83): resumen simple arriba, detalle técnico plegado */
.entrega-v3 { display: grid; gap: var(--sp-2); width: 100%; border-top: 1px solid var(--line, #E5E5E5); padding-top: var(--sp-3); }
.entrega-v3 h3 { margin: 0; font-size: var(--fs-md); }
.entrega-v3 h4 { margin: var(--sp-2) 0 0; font-size: var(--fs-sm); }
.entrega-titulo { margin: 0; display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; }
.entrega-faltan { margin: 0; padding-left: 20px; display: grid; gap: var(--sp-1); }
.entrega-bien, .entrega-lista { margin: 0; padding-left: 18px; display: grid; gap: var(--sp-1); }
.entrega-lista { list-style: none; padding-left: 0; }
.entrega-tec .tabla-v3 { display: block; overflow-x: auto; }
@media (max-width: 520px) { .int-cab { grid-template-columns: 44px minmax(0, 1fr); } .int-cab .ds-status { grid-column: 2; justify-self: start; } }
.side nav a[href="#resumen"] { --ico-pt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3v18h18'/%3E%3Cpath d='M7 15v3M12 9v9M17 5v13'/%3E%3C/svg%3E"); }
/* Diagnóstico › Brechas y oportunidades: lo descartado por orden de Ulises va en gris y tachado; el detalle técnico queda plegado */
.diag-desc { color: var(--mute, #6B6B6B); }
.diag-desc > b { text-decoration: line-through; }
.diag-tec { margin-top: var(--sp-4, 16px); border-top: 1px solid var(--line, #E5E5E5); padding-top: var(--sp-3, 12px); }
.diag-tec > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 8px; }

/* Admin › Topes por tipo */
.at-tipos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: var(--sp-3, 12px); }
.at-tipo { display: grid; gap: var(--sp-2, 8px); align-content: start; }
.at-tipo-cab { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }

/* CRM › guía de arranque */
.gu-pasos { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-3, 12px); }
.gu-paso { border: 1px solid var(--line, #E5E5E5); border-radius: var(--r-md, 10px); padding: var(--sp-3, 12px); }
.gu-paso.es-sig { border-color: var(--ink, #000); box-shadow: inset 0 0 0 1px var(--ink, #000); }
.gu-paso.es-hecho, .gu-paso.es-omitido { background: var(--mist, #F5F5F5); }
.gu-cab { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.gu-n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ink, #000); color: var(--paper, #fff); font-size: 13px; font-weight: 700; }
.gu-como { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 4px; }

/* Chat con el director EN EL CUERPO de cada pantalla (arriba, como Claude o ChatGPT) */
.cd-cuerpo { display: grid; gap: var(--sp-3, 12px); margin: 0 0 var(--sp-4, 16px); }
.cd-cuerpo-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--sp-3, 12px); flex-wrap: wrap; }
.cd-cuerpo-cab h2 { margin: 0; font-size: 1rem; }
.cd-cuerpo-cab > div { display: grid; min-width: 0; }
.cd-cont { display: grid; gap: var(--sp-3, 12px); }
.cd-cuerpo .cd-log { max-height: 320px; overflow: auto; }
.cd-cuerpo .cd-log:empty { display: none; }
.cd-cuerpo .cd-form .ds-textarea { min-height: 52px; }
@media (max-width: 900px) { .cd-cuerpo .cd-log { max-height: 240px; } .cd-cuerpo .cd-botones .ds-btn { min-height: 44px; } }
.cd-cuerpo .cd-log small { display: block; margin-top: 4px; }

.cd-cuerpo .cd-cap { font-size: var(--fs-sm, 13px); }
.cd-cuerpo .cd-acu { display: grid; gap: 4px; }
.cd-regla { display: block; margin-top: 4px; }
#cd-adjs:empty { display: none; }

/* Portada de cada sección: el chat con el director ES la pantalla; las herramientas, botones arriba */
.sec-cab { display: grid; gap: var(--sp-3, 12px); max-width: 880px; margin: 0 auto var(--sp-3, 12px); }
.sec-cab h1 { margin: 0; font-size: clamp(24px, 3vw, 32px); font-weight: 800; letter-spacing: -.03em; }
.sec-cab .sec-tools { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: var(--sp-2, 8px); padding: 0; border: 0; }
.sec-tools-t { font-size: var(--fs-sm, 13px); color: var(--mute, #6b6b6b); margin-right: var(--sp-1, 4px); }
.sec-tool { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; }
.sec-volver { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: var(--sp-2, 8px); font-weight: 600; color: var(--ink, #000); }
.cd-cuerpo.cd-grande { max-width: 880px; width: 100%; margin: 0 auto; min-height: calc(100vh - 220px); grid-template-rows: auto minmax(0, 1fr); }
.cd-grande .cd-cont { grid-template-rows: auto minmax(280px, 1fr) auto auto; min-height: 0; }
.cd-cuerpo.cd-grande .cd-log { max-height: calc(100vh - 430px); min-height: 280px; background: transparent; border: 0; padding: var(--sp-2, 8px) 0; }
.cd-cuerpo.cd-grande .cd-log:empty { display: block; }
.cd-grande .cd-form { position: sticky; bottom: 0; background: var(--paper, #fff); padding-top: var(--sp-2, 8px); }
.cd-grande .cd-form .ds-textarea { min-height: 76px; font-size: 16px; }
.cd-vacio { display: grid; gap: var(--sp-2, 8px); justify-items: center; text-align: center; padding: var(--sp-5, 24px) var(--sp-2, 8px); }
.cd-vacio h3 { margin: 0; font-size: clamp(20px, 2.6vw, 26px); letter-spacing: -.02em; }
.cd-vacio p { margin: 0; max-width: 520px; }
.cd-pistas { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-2, 8px); margin-top: var(--sp-2, 8px); }
.cd-pista { min-height: 44px; white-space: normal; text-align: left; }
.cd-grande .cd-botones { display: flex; flex-direction: row; align-items: center; gap: var(--sp-2, 8px); }
@media (max-width: 900px) {
  .cd-grande .cd-form { grid-template-columns: minmax(0, 1fr); bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  .cd-grande .cd-botones .ds-btn:last-child { flex: 1 1 auto; }
  .sec-cab .sec-tools { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .sec-cab .sec-tools::-webkit-scrollbar { display: none; }
  .sec-tool { flex: 0 0 auto; white-space: nowrap; }
  .sec-tools-t { display: none; }
  .cd-grande .cd-cuerpo-cab .ds-muted { display: none; }
  .cd-grande .cd-vacio { padding: var(--sp-3, 12px) 0; }
  .cd-grande .cd-vacio .ds-muted { display: none; }
  .cd-cuerpo.cd-grande { min-height: calc(100vh - 260px); }
  .cd-cuerpo.cd-grande .cd-log { max-height: calc(100vh - 470px); min-height: 220px; }
  .cd-pistas { flex-direction: column; align-items: stretch; }
}

/* Circuito en vivo (Resumen y Cerebro) */
.ci-caja { display: grid; gap: var(--sp-3, 12px); margin-bottom: var(--sp-4, 16px); }
.ci-tit { margin: 0; font-size: 1.1rem; }
.ci-ahora { margin: 0; font-weight: 600; }
.ci-linea { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--sp-2, 8px); }
.ci-e { display: grid; align-content: start; gap: var(--sp-1, 4px); padding: var(--sp-2, 8px); border: 1px solid var(--line, #ddd); border-radius: var(--r-md, 10px); background: var(--paper, #fff); min-width: 0; }
.ci-in { display: flex; gap: var(--sp-2, 8px); align-items: flex-start; text-decoration: none; color: inherit; min-height: 44px; }
.ci-i { flex: 0 0 auto; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--ink, #000); font-size: 14px; line-height: 1; }
.ci-e--listo .ci-i { background: var(--ink, #000); color: var(--paper, #fff); }
.ci-e--trabado { border-color: var(--ink, #000); border-width: 2px; }
.ci-e--esperando .ci-i { border-style: dashed; }
.ci-n { display: grid; min-width: 0; font-size: var(--fs-sm, 13px); }
.ci-n b { overflow-wrap: anywhere; }
.ci-s { color: var(--mute, #6b6b6b); }
.ci-d { display: grid; gap: 4px; font-size: var(--fs-sm, 13px); overflow-wrap: anywhere; }
.ci-m { color: var(--mute, #555); }
.ci-act { margin: 0; }
.ci-linea--chica .ci-e { padding: 4px 6px; }
@media (max-width: 900px) { .ci-linea { grid-template-columns: minmax(0, 1fr); } .ci-linea--chica { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Diagnóstico › Fichas por competidor */
.fi-card { margin: 0 0 var(--sp-3, 12px); padding: 0; }
.fi-sum { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2, 8px); min-height: 44px; padding: var(--sp-3, 12px) var(--sp-4, 16px); cursor: pointer; }
.fi-cuerpo { display: grid; gap: var(--sp-2, 8px); padding: 0 var(--sp-4, 16px) var(--sp-4, 16px); }
.fi-l { margin: 0; }
.fi-concl, .fi-apr { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 4px; }
.fi-cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: var(--sp-2, 8px); margin: var(--sp-3, 12px) 0; }
.fi-fotos { display: grid; gap: var(--sp-2, 8px); }
.fi-foto { margin: 0; } .fi-foto img { max-width: 100%; height: auto; border: 1px solid var(--line, #ddd); border-radius: var(--r-md, 10px); }

/* Contenido automático › En vivo: recorrido de cada pieza */
.fl-recorrido { list-style: none; margin: var(--sp-2, 8px) 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--sp-2, 8px); }
.fl-p { display: grid; gap: 4px; align-content: start; padding: var(--sp-2, 8px); border: 1px solid var(--line, #ddd); border-radius: var(--r-md, 10px); font-size: var(--fs-sm, 13px); min-width: 0; }
.fl-i { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--ink, #000); line-height: 1; }
.fl-pn { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.fl-p.es-hecho .fl-i { background: var(--ink, #000); color: var(--paper, #fff); }
.fl-p.es-error { border: 2px solid var(--ink, #000); }
.fl-p.es-espera .fl-i, .fl-p.es-pend .fl-i, .fl-p.es-omitido .fl-i { border-style: dashed; }
.fl-p.es-pend, .fl-p.es-omitido { opacity: .65; }
.pl-card.es-elegida { outline: 3px solid var(--ink, #000); outline-offset: 2px; }
@media (max-width: 900px) { .fl-recorrido { grid-template-columns: minmax(0, 1fr); } .fl-p { grid-template-columns: auto 1fr; align-items: start; } }

/* Cerebro conversacional: mensajes que él inicia y preferencias al costado */
.cb-dos { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--sp-4, 16px); align-items: start; max-width: 1240px; margin: 0 auto; }
.cb-dos .cd-cuerpo.cd-grande { max-width: none; margin: 0; }
.cb-prefs { display: grid; gap: var(--sp-3, 12px); position: sticky; top: var(--sp-4, 16px); max-height: calc(100vh - 32px); overflow: auto; }
.cd-ini { border-left: 3px solid var(--ink, #000); }
.cd-ini--espera { background: var(--mist, #f4f4f4); }
.cd-datos { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 2px; font-size: var(--fs-sm, 13px); }
.cd-espera { display: block; margin-top: 6px; }
.side nav a .cb-nl { margin-left: auto; }
@media (max-width: 900px) { .cb-dos { grid-template-columns: minmax(0, 1fr); } .cb-prefs { position: static; max-height: none; } }

.cd-prop { display: grid; gap: 4px; margin-top: 8px; }
.cd-choca { font-size: var(--fs-sm, 13px); border-left: 3px solid var(--ink, #000); padding-left: 8px; }
.side nav a[href="#conoce-webs"], .side nav a[href="#s-paginas-web"] { --ico-pt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3a14 14 0 0 1 0 18M12 3a14 14 0 0 0 0 18'/%3E%3C/svg%3E"); }
.fl-p .fl-pn { overflow-wrap: break-word; word-break: normal; hyphens: auto; }
@media (max-width: 1280px) and (min-width: 901px) { .fl-recorrido { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Plan y piloto: la semana como tarjetas */
.pl-nav { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3, 12px); flex-wrap: wrap; margin-bottom: var(--sp-3, 12px); }
.pl-flechas { display: flex; align-items: center; gap: var(--sp-2, 8px); }
.pl-flechas .btn { min-height: 44px; min-width: 44px; font-size: 20px; }
.pl-gen { display: flex; align-items: center; gap: var(--sp-3, 12px); flex-wrap: wrap; }
.pl-gen .btn { min-height: 44px; }
.pl-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--sp-3, 12px); }
.pl-pz { display: grid; gap: var(--sp-2, 8px); align-content: start; }
.pl-pz h3 { margin: 0; font-size: 1rem; }
.cd-vivo { margin: 0; font-size: var(--fs-sm, 13px); } .cd-vivo a { font-weight: 700; }
/* Avatar y piezas hechas: videos verticales, 3 o 4 por fila */
.av-videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: var(--sp-3, 12px); }
.av-v, .av-videos .pt-pieza { display: grid; gap: var(--sp-2, 8px); align-content: start; }
.av-videos video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: var(--r-md, 10px); background: var(--mist, #eee); }
.av-videos img { width: 100%; height: auto; border-radius: var(--r-md, 10px); }
.fl-hist > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 700; }
.cd-guis { display: grid; gap: var(--sp-3, 12px); margin-bottom: var(--sp-3, 12px); }
.cd-guion { display: grid; gap: var(--sp-2, 8px); border-left: 3px solid var(--ink, #000); }
.cd-guion-t { margin: 0; white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.cd-gform { display: grid; gap: var(--sp-2, 8px); }
/* Looks de un avatar (18/11): tarjetas con vista previa vertical */
.av-looks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: var(--sp-3, 12px); }
.av-look { display: grid; gap: var(--sp-2, 8px); align-content: start; }
.av-look-img { aspect-ratio: 9 / 16; border-radius: var(--r-md, 10px); background: var(--mist, #eee); overflow: hidden; display: grid; place-items: center; }
.av-look-img img { width: 100%; height: 100%; object-fit: cover; }
.av-cons-txt { margin: var(--sp-2, 8px) 0; padding: var(--sp-3, 12px) var(--sp-4, 16px); border-left: 3px solid var(--ink, #111); background: var(--mist, #f2f2f2); border-radius: var(--r-md, 10px); font-size: 1.05rem; line-height: 1.5; }
.av-look-vacio { padding: var(--sp-3, 12px); text-align: center; }

/* ======================================================================
   19/11 (Ulises desde el celular): íconos que faltaban, selector de subcuentas que no se corta y chat con los directores como Claude
   ====================================================================== */
.side nav a[href="#conoce-oportunidades"], .side nav a[href="#s-oportunidades"], .side nav a[href="#oportunidades"] { --ico-pt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Ccircle cx='12' cy='12' r='5'/%3E%3Ccircle cx='12' cy='12' r='1'/%3E%3C/svg%3E"); }
.side nav a[href="#conoce-marketplaces"], .side nav a[href="#s-marketplaces"], .side nav a[href="#marketplaces"] { --ico-pt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4zM3 6h18M16 10a4 4 0 0 1-8 0'/%3E%3C/svg%3E"); }
.side nav a[href="#facturacion"] { --ico-pt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 2v20l3-2 3 2 3-2 3 2 3-2 1 1V2l-1 1-3-2-3 2-3-2-3 2-3-2zM8 8h8M8 12h8M8 16h5'/%3E%3C/svg%3E"); }

/* Selector de subcuentas en el celular: la lista se abre como una hoja completa debajo de la barra (antes quedaba cortada adentro) */
.menu button { min-height: 48px; }
.menu .pm-tipo { display: block; font-size: 12px; font-weight: 500; color: var(--mute); }
.menu button[aria-current="true"] { background: var(--mist); }
@media (max-width: 899px) {
  .side { overflow: visible; }
  .projwrap { position: static; }
  .menu {
    position: fixed; top: 64px; left: 12px; right: 12px; z-index: 60; max-height: calc(100vh - 170px); overflow-y: auto;
    padding: 8px; border-radius: 16px; display: grid; gap: 2px;
  }
  .menu[hidden] { display: none; }
  .menu button { padding: 10px 12px; font-size: 15px; }
  .menu .av { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%; font-size: 14px; }
  .proj b { max-width: 52vw; }
}

/* Chat con los directores, como Claude: una columna limpia, el director escribe como texto (sin globo), lo tuyo va en un globo gris a la derecha
   y el cuadro para escribir queda abajo, redondeado, con los botones adentro. Sin tarjetas ni marcos alrededor. */
.cd-cuerpo.cd-grande { background: transparent; border: 0; box-shadow: none; padding: 0; gap: var(--sp-2); }
.cd-grande .cd-cuerpo-cab { align-items: center; padding: 0 2px; }
.cd-grande .cd-cuerpo-cab h2 { font-size: 15px; font-weight: 700; color: var(--mute); }
.cd-grande #cd-nuevo { min-height: 36px; padding: 0 12px; font-size: 13px; border: 1px solid var(--line); border-radius: 999px; }
.cd-cuerpo.cd-grande .cd-log { display: flex; flex-direction: column; gap: 18px; padding: 8px 2px 16px; }
.cd-grande .ag-m { max-width: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; white-space: normal; line-height: 1.55; font-size: 15.5px; color: var(--ink); }
.cd-grande .ag-m--agente .ag-quien { display: none; }
.cd-grande .ag-m--cliente { align-self: flex-end; max-width: 85%; padding: 10px 14px; border-radius: 18px; background: var(--mist); color: var(--ink); border: 0; white-space: pre-wrap; }
.cd-grande .ag-m--cliente .ag-quien { display: none; }
.cd-md p { margin: 0 0 10px; }
.cd-md p:last-child { margin-bottom: 0; }
.cd-md ul, .cd-md ol { margin: 0 0 10px; padding-left: 20px; display: grid; gap: 4px; }
.cd-md b { font-weight: 700; }
.cd-grande .cd-form {
  grid-template-columns: minmax(0, 1fr); gap: 0; padding: 8px 10px 8px 14px; border: 1px solid var(--line-2); border-radius: 22px; background: var(--paper);
  box-shadow: 0 4px 18px rgba(17, 17, 17, .08);
}
.cd-grande .cd-form .ds-textarea { border: 0; box-shadow: none; padding: 6px 0; min-height: 44px; max-height: 160px; resize: none; background: transparent; font-size: 16px; outline: none; }
.cd-grande .cd-form .ds-textarea:focus { box-shadow: none; }
.cd-grande .cd-botones { display: flex; flex-direction: row; align-items: center; gap: 6px; }
.cd-grande .cd-botones .ds-btn--sec { min-height: 38px !important; width: 38px; padding: 0; border-radius: 50%; border-color: var(--line); }
.cd-grande #cd-enviar { margin-left: auto; min-height: 38px; height: 38px; padding: 0 16px; border-radius: 999px; flex: 0 0 auto !important; }
.cd-grande .cd-vacio h3 { font-size: 22px; }
@media (max-width: 900px) {
  .cd-cuerpo.cd-grande { min-height: calc(100vh - 230px); }
  .cd-cuerpo.cd-grande .cd-log { max-height: none; min-height: 120px; }
  .cd-grande .cd-form { position: sticky; bottom: calc(72px + env(safe-area-inset-bottom, 0px)); margin: 0 -4px; }
  .cd-grande .cd-botones .ds-btn:last-child { flex: 0 0 auto; }
}

/* Conexiones: la extensión de Chrome arriba de las cuentas */
.cu-ext { display: grid; gap: var(--sp-2, 8px); margin-bottom: var(--sp-4, 16px); }
.cu-ext-red { font-size: var(--fs-sm, 13px); }

/* Historial de conversaciones con los directores (19/11) */
.cd-cuerpo-cab > .cd-cab-bt { display: flex; flex-direction: row; gap: 6px; }
.cd-grande .cd-cab-bt .ds-btn { min-height: 36px; padding: 0 12px; font-size: 13px; border: 1px solid var(--line); border-radius: 999px; }
.cd-hist-l { border: 1px solid var(--line); border-radius: 14px; padding: 6px; background: var(--paper); box-shadow: 0 8px 24px rgba(17, 17, 17, .08); max-height: 50vh; overflow-y: auto; }
.cd-hist-l[hidden] { display: none; }
.cd-hist-ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.cd-hist-it { display: grid; gap: 2px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 10px; background: transparent; border: 0; cursor: pointer; min-height: 48px; color: var(--ink); }
.cd-hist-it:hover, .cd-hist-it.es-actual { background: var(--mist); }
.cd-hist-it b { font-weight: 700; font-size: 14px; }
.cd-hist-it .ds-muted { font-size: 12px; }

/* Vista de agencia (19/11) */
.menu .pm-sep { height: 1px; background: var(--line); margin: 4px 6px; }
.ag-subs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: var(--sp-3, 12px); }
.ag-sub { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.ag-sub .av { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; }
.ag-sub b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side nav a[href="#agencia"] { --ico-pt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7'/%3E%3Crect x='14' y='3' width='7' height='7'/%3E%3Crect x='3' y='14' width='7' height='7'/%3E%3Crect x='14' y='14' width='7' height='7'/%3E%3C/svg%3E"); }
.side nav a[href="#admin-centro"] { --ico-pt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 3'/%3E%3C/svg%3E"); }
.side nav a[href="#admin-topes"] { --ico-pt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='6' width='20' height='13' rx='2'/%3E%3Cpath d='M16 12h2M2 10h20'/%3E%3C/svg%3E"); }
.side nav a[href="#admin-facturacion"] { --ico-pt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 2v20l3-2 3 2 3-2 3 2 3-2 1 1V2l-1 1-3-2-3 2-3-2-3 2-3-2zM8 8h8M8 12h8M8 16h5'/%3E%3C/svg%3E"); }
.side nav a[href="#admin-acceso"] { --ico-pt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E"); }

.ag-sub-acc { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.side nav a[href="#equipo"] { --ico-pt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8M23 21v-2a4 4 0 0 0-3-3.9M16 3.1a4 4 0 0 1 0 7.8'/%3E%3C/svg%3E"); }

/* Elegir contraseña (19/11) */
.modal-nc { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; background: rgba(17, 17, 17, .55); }
.modal-nc .box { width: min(420px, 100%); background: var(--paper, #fff); border-radius: 18px; padding: 24px; box-shadow: 0 20px 50px rgba(0, 0, 0, .3); }
.modal-nc input { min-height: 46px; padding: 0 14px; border: 1px solid var(--line-2, #ccc); border-radius: 12px; font-size: 16px; }

/* Agencia › Proveedores */
.pv-grilla { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--sp-3); margin-top: var(--sp-3); }
.pv-prov { display: flex; flex-direction: column; gap: var(--sp-2); }
.pv-lista { margin: 0; padding-left: 1.1em; display: grid; gap: var(--sp-1); }
.pv-fila { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--sp-2); }
.pv-anotar summary { cursor: pointer; }
.pv-sin-saldo { margin-bottom: var(--sp-3); }
.pv-sin-saldo li { margin: var(--sp-1) 0; }

/* Agencia › Saldos y gastos: vista simple (21/11) */
.sg-card { display: flex; flex-direction: column; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.sg-lista { list-style: none; margin: 0; padding: 0; }
.sg-fila { display: grid; grid-template-columns: minmax(0, 1fr) 260px 130px; gap: var(--sp-2) var(--sp-3); align-items: center; padding: var(--sp-2) 0; border-bottom: 1px solid var(--line); }
.sg-fila--dos { grid-template-columns: minmax(0, 1fr) 130px; }
.sg-cab { color: var(--mute); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding-top: 0; }
.sg-cab span:last-child, .sg-usd { text-align: right; font-variant-numeric: tabular-nums; }
.sg-nom { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sg-est { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.sg-saldo { font-variant-numeric: tabular-nums; }
.sg-k { display: none; }
.sg-acc { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; margin-top: 2px; }
.sg-fila.is-sin { background: var(--err-bg); padding-left: var(--sp-2); padding-right: var(--sp-2); border-radius: var(--r-md); }
.sg-tot { border-bottom: 0; }
.sg-detalle { margin-top: var(--sp-2); }
.sg-detalle > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
@media (max-width: 560px) {
  .sg-cab { display: none; }
  .sg-fila { grid-template-columns: minmax(0, 1fr) auto; }
  .sg-fila .sg-nom { grid-column: 1 / -1; }
  .sg-fila--dos .sg-nom { grid-column: auto; }
  .sg-fila .sg-usd { display: flex; flex-direction: column; align-items: flex-end; }
  .sg-fila--dos .sg-usd { display: block; }
  .sg-k { display: block; font-size: 11px; color: var(--mute); }
}

/* Agencia › Funciones y consumo (21/11) */
.af-sub { display: flex; flex-direction: column; gap: var(--sp-2); }
.af-sub details summary { cursor: pointer; }
.af-grilla { display: grid; gap: var(--sp-2); margin-top: var(--sp-2); }
.af-dos { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--sp-3); }
.af-consumo { list-style: none; padding-left: 0; }
.af-consumo li { display: flex; justify-content: space-between; gap: var(--sp-2); border-bottom: 1px solid var(--line); padding: 2px 0; }

/* Selector de subcuentas con buscador y páginas (26/11) */
.menu .pm-buscar { width: calc(100% - 12px); margin: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 15px; background: #fff; color: #111; }
.menu .pm-buscar:focus { outline: 2px solid #111; outline-offset: 0; }
.menu .pm-vacio { margin: 10px 12px; color: #6b6b6b; font-size: 14px; }
.menu .pm-pag { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px; border-top: 1px solid var(--line); }
.menu .pm-pag:empty { display: none; }
.menu .pm-pag button { min-height: 34px; min-width: 34px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: #111; font-size: 14px; justify-content: center; }
.menu .pm-pag button[aria-current="true"] { background: #111; color: #fff; border-color: #111; }
.menu .pm-pag button:disabled { opacity: .35; }
.menu .pm-pag .pm-total { margin-left: auto; font-size: 12px; color: #6b6b6b; }
