/* Captador con el aspecto de GoHighLevel (16/11/2026): menú lateral azul pizarra que se pliega a iconos, contenido gris
   muy claro, tarjetas blancas con sombra fina, azul #155EEF y los grises de su sistema de diseño. Un solo tema. */
:root, :root[data-theme="light"], :root[data-theme="dark"] {
  --bg: #F8FAFC;          /* fondo del contenido (tablero) */
  --panel: #FFFFFF;       /* tarjetas, cabecera, modales */
  --panel-2: #F2F4F7;     /* rellenos suaves, hover */
  --panel-3: #F9FAFB;     /* cabeceras de tabla, zonas tenues */
  --line: #EAECF0;        /* bordes de tarjetas y separadores */
  --line-2: #D0D5DD;      /* bordes de campos y botones */
  --text: #101828;
  --text-2: #344054;
  --muted: #475467;
  --faint: #667085;
  --accent: #155EEF;
  --accent-h: #004EEB;
  --accent-50: #EFF4FF;
  --accent-100: #D1E0FF;
  --accent-ink: #FFFFFF;
  --danger: #D92D20;
  --warn: #DC6803;
  --ok: #079455;
  --info: #1570EF;
  --radius: 8px;
  --side: #2E3748;
  --side-activo: #1A202C;
  --side-caja: rgb(255 255 255 / .14);
  --side-txt: #E4E7EC;
  --side-icono: #CDD5DF;
  --side-sep: rgb(255 255 255 / .22);
  --verde-plegar: #2FD097;
  --sombra-xs: 0 1px 2px rgb(16 24 40 / .05);
  --sombra: 0 1px 3px rgb(16 24 40 / .10), 0 1px 2px rgb(16 24 40 / .06);
  --sombra-md: 0 4px 8px -2px rgb(16 24 40 / .10), 0 2px 4px -2px rgb(16 24 40 / .06);
  --sombra-lg: 0 12px 16px -4px rgb(16 24 40 / .08), 0 4px 6px -2px rgb(16 24 40 / .03);
  --sombra-xl: 0 20px 24px -4px rgb(16 24 40 / .08), 0 8px 8px -4px rgb(16 24 40 / .03);
  --anillo: 0 0 0 4px rgb(21 94 239 / .14);
  --ancho-menu: 220px;
  --ancho-menu-plegado: 64px;
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23667085' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 Inter, system-ui, -apple-system, Segoe UI, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
/* Todo se sigue pudiendo desplazar, pero sin barras a la vista (salvo el tablero, que lleva la fina de GHL) */
* { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { display: none; }
svg.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------- estructura: menú + (cabecera + contenido) ---------------- */
.app { display: grid; grid-template-columns: var(--ancho-menu) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .22s cubic-bezier(.4, 0, .2, 1); }
.app.plegado { grid-template-columns: var(--ancho-menu-plegado) minmax(0, 1fr); }

.side { background: var(--side); color: var(--side-txt); padding: 14px 10px 12px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; z-index: 30; }
.side-logo { display: grid; place-items: center; height: 46px; margin-bottom: 8px; color: #7CA7F7; }
.side-logo svg { width: 28px; height: 28px; }
/* Caja de la cuenta (como el selector de subcuenta de GHL) */
.side-cuenta { display: flex; align-items: center; gap: 9px; width: 100%; background: var(--side-caja); border: 0; border-radius: 8px; padding: 7px 8px; color: #fff; text-align: left; cursor: default; min-height: 44px; transition: background .15s; }
button.side-cuenta { cursor: pointer; }
button.side-cuenta:hover { background: rgb(255 255 255 / .2); }
.side-cuenta .ic-c { width: 28px; height: 28px; border-radius: 99px; display: grid; place-items: center; background: rgb(255 255 255 / .12); flex: none; }
.side-cuenta .ic-c svg { width: 16px; height: 16px; }
.side-cuenta .txt { display: grid; min-width: 0; line-height: 1.2; flex: 1; }
.side-cuenta b { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-cuenta small { font-size: 11.5px; color: #C2C9D4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-cuenta .flechas { width: 14px; height: 14px; color: #C2C9D4; }
.side-menu-cuenta { position: fixed; z-index: 80; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--sombra-lg); padding: 6px; min-width: 230px; display: grid; gap: 2px; animation: gh-cae .14s ease-out; }
.side-menu-cuenta .t { font-size: 11.5px; color: var(--faint); padding: 6px 10px 4px; font-weight: 500; }
.side-menu-cuenta button { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 7px 10px; border-radius: 6px; cursor: pointer; text-align: left; color: var(--text-2); font-size: 13.5px; }
.side-menu-cuenta button:hover { background: var(--panel-3); color: var(--text); }

.nav { display: grid; gap: 2px; flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; align-content: start; margin-top: 12px; }
.nav a, .side-pie a { position: relative; display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 6px; text-decoration: none; color: var(--side-txt); font-size: 14px; font-weight: 500; white-space: nowrap; transition: background .12s, color .12s; }
.nav a svg.ic, .side-pie a svg.ic { color: var(--side-icono); }
.nav a:hover, .side-pie a:hover { background: rgb(255 255 255 / .07); color: #fff; }
.nav a.activo, .side-pie a.activo { background: var(--side-activo); color: #fff; font-weight: 600; }
.nav a.activo svg.ic, .side-pie a.activo svg.ic { color: #fff; }
.nav .txt, .side-pie .txt { flex: 1; overflow: hidden; text-overflow: ellipsis; transition: opacity .15s; }
.nav-sep { height: 1px; background: var(--side-sep); margin: 10px 8px; flex: none; }
/* Burbujas de contador: azules como las de las tarjetas de GHL */
.nav .num, .side-pie .num, .tb-ic .num, .burbuja-n { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.nav .num { animation: gh-pop .3s cubic-bezier(.34, 1.56, .64, 1); }
.nav.mas-abajo { -webkit-mask-image: linear-gradient(to bottom, black calc(100% - 36px), transparent); mask-image: linear-gradient(to bottom, black calc(100% - 36px), transparent); }
.nav.mas-arriba { -webkit-mask-image: linear-gradient(to top, black calc(100% - 28px), transparent); mask-image: linear-gradient(to top, black calc(100% - 28px), transparent); }
.nav.mas-abajo.mas-arriba { -webkit-mask-image: linear-gradient(to bottom, transparent, black 28px, black calc(100% - 36px), transparent); mask-image: linear-gradient(to bottom, transparent, black 28px, black calc(100% - 36px), transparent); }
.side-pie { flex: none; display: grid; gap: 2px; padding-top: 8px; }
/* Botón verde redondo del borde para plegar el menú */
.side-plegar { position: absolute; right: -11px; bottom: 22px; width: 22px; height: 22px; border-radius: 99px; border: 0; background: var(--verde-plegar); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 1px 3px rgb(16 24 40 / .25); z-index: 2; transition: transform .2s, background .15s; }
.side-plegar:hover { background: #1FBF86; transform: scale(1.08); }
.side-plegar svg { width: 13px; height: 13px; stroke-width: 2.6; transition: transform .22s; }
.app.plegado .side-plegar svg { transform: rotate(180deg); }
/* Plegado: solo iconos; las burbujas pasan a la esquina del icono */
.app.plegado .side { padding-left: 8px; padding-right: 8px; }
.app.plegado .nav a, .app.plegado .side-pie a { justify-content: center; padding: 9px 0; gap: 0; }
.app.plegado .nav .txt, .app.plegado .side-pie .txt, .app.plegado .side-cuenta .txt, .app.plegado .side-cuenta .flechas { display: none; }
.app.plegado .side-cuenta { justify-content: center; padding: 8px 0; }
.app.plegado .nav .num { position: absolute; top: 2px; right: 6px; min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; box-shadow: 0 0 0 2px var(--side); }
.app.plegado .nav-sep { margin: 10px 6px; }
.gh-tip { position: fixed; z-index: 90; background: #101828; color: #fff; font-size: 12.5px; font-weight: 500; padding: 6px 10px; border-radius: 6px; pointer-events: none; white-space: nowrap; box-shadow: var(--sombra-lg); animation: gh-tip .12s ease-out; }
.gh-tip::before { content: ''; position: absolute; left: -4px; top: 50%; width: 8px; height: 8px; background: #101828; transform: translateY(-50%) rotate(45deg); }

/* Columna del contenido: franja de "Entrar como", cabecera blanca y la pantalla */
.contenido { min-width: 0; display: flex; flex-direction: column; }
.franja-suplantacion { position: sticky; top: 0; z-index: 50; display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px; padding: 8px 16px;
  background: #FFFAEB; color: #93370D; border-bottom: 1px solid #FEDF89; font-size: 13px; font-weight: 500; }
.franja-suplantacion button { background: none; border: 0; padding: 0; color: #93370D; font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.topbar { position: sticky; top: 0; z-index: 25; height: 56px; flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 20px 0 24px; background: var(--panel); border-bottom: 1px solid var(--line); }
.franja-suplantacion + .topbar { top: 37px; }
.tb-izq, .tb-der { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tb-titulo { font-size: 18px; font-weight: 600; letter-spacing: -.01em; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-hamburguesa { display: none; border: 0; background: none; padding: 6px; border-radius: 6px; cursor: pointer; color: var(--text-2); }
.tb-ic { position: relative; width: 34px; height: 34px; border-radius: 99px; display: grid; place-items: center; text-decoration: none; color: #fff; border: 0; cursor: pointer; transition: transform .15s, box-shadow .15s, filter .15s; }
.tb-ic svg.ic { width: 17px; height: 17px; stroke-width: 2; }
.tb-ic:hover { transform: translateY(-1px); box-shadow: var(--sombra-md); filter: brightness(1.05); }
.tb-ic.rojo { background: #F04438; }
.tb-ic.naranja { background: #F79009; }
.tb-ic .num { position: absolute; top: -4px; right: -5px; box-shadow: 0 0 0 2px var(--panel); background: #F04438; min-width: 17px; height: 17px; font-size: 10.5px; }
.tb-avatar { border: 0; padding: 0; background: none; cursor: pointer; border-radius: 99px; display: grid; transition: box-shadow .15s; }
.tb-avatar:hover, .tb-avatar[aria-expanded="true"] { box-shadow: var(--anillo); }
.tb-menu { position: fixed; z-index: 80; top: 52px; right: 16px; width: 248px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--sombra-lg); padding: 6px; display: grid; gap: 2px; animation: gh-cae .14s ease-out; }
.tb-menu .quien { display: flex; gap: 10px; align-items: center; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.tb-menu .quien b { display: block; font-size: 13.5px; }
.tb-menu .quien small { color: var(--faint); font-size: 12px; }
.tb-menu a, .tb-menu button { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 8px 10px; border-radius: 6px; cursor: pointer; text-align: left; color: var(--text-2); font-size: 13.5px; text-decoration: none; }
.tb-menu a:hover, .tb-menu button:hover { background: var(--panel-3); color: var(--text); }
.tb-menu svg.ic { width: 16px; height: 16px; color: var(--faint); }
#modo-envio:empty { display: none; }

.avatar { border-radius: 50%; object-fit: cover; flex: none; background: var(--accent-50); border: 1px solid var(--accent-100); }
.avatar.ini { display: inline-grid; place-items: center; font-weight: 500; color: #3538CD; background: #E0EAFF; border-color: #C7D7FE; }

main { padding: 24px 28px 80px; max-width: 1600px; width: 100%; min-width: 0; animation: gh-entra .22s ease-out; }
/* La pantalla de llamada usa todo el ancho */
main:has(#eq-ll) { max-width: none; padding-top: 18px; }
h1 { font-size: 22px; font-weight: 600; margin: 0 0 4px; letter-spacing: -0.015em; line-height: 1.3; color: var(--text); }
h2 { font-size: 15px; font-weight: 600; margin: 0 0 12px; letter-spacing: -0.005em; color: var(--text); }
h3 { font-size: 13px; font-weight: 600; margin: 0 0 6px; color: var(--text-2); text-transform: none; }
.sub { color: var(--faint); margin: 0 0 22px; font-size: 14px; }
.cab { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.cab .sub { margin: 0; }

/* Tarjetas blancas con borde fino y sombra pequeña */
.tarjeta { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--sombra-xs); }
.rejilla { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi { transition: box-shadow .15s, border-color .15s, transform .15s; }
a.kpi:hover { box-shadow: var(--sombra-md); border-color: var(--line-2); }
.kpi .v { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--text); }
.kpi .e { color: var(--faint); font-size: 12.5px; }
.fila { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.entre { justify-content: space-between; }
.pila { display: grid; gap: 10px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); font-size: 12px; }
.mt { margin-top: 14px; }
.mb { margin-bottom: 14px; }

/* Botones: secundario blanco con borde, principal azul */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line-2); background: var(--panel); color: var(--text-2); padding: 8px 14px; border-radius: 8px; cursor: pointer; white-space: nowrap; font-weight: 500; font-size: 14px; line-height: 20px; box-shadow: var(--sombra-xs); text-decoration: none;
  transition: background .12s, border-color .12s, color .12s, box-shadow .12s, transform .08s; }
.btn:hover { background: var(--panel-3); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn.pri { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }
.btn.pri:hover { background: var(--accent-h); border-color: var(--accent-h); color: #fff; }
.btn.peligro { color: var(--danger); border-color: #FDA29B; }
.btn.peligro:hover { background: #FEF3F2; color: #B42318; }
.btn.peq { padding: 5px 10px; font-size: 13px; line-height: 18px; border-radius: 6px; }
.btn.grande { padding: 10px 18px; font-size: 15px; }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

input, select, textarea { background-color: var(--panel); border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 12px; width: 100%; outline: none; color: var(--text); box-shadow: var(--sombra-xs); transition: border-color .12s, box-shadow .12s; }
input::placeholder, textarea::placeholder { color: #98A2B3; }
input:hover, select:hover, textarea:hover { border-color: #98A2B3; }
input:focus, select:focus, textarea:focus { border-color: #84ADFF; box-shadow: var(--sombra-xs), var(--anillo); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }
select { appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer; text-overflow: ellipsis;
  background-image: var(--chevron); background-repeat: no-repeat; background-position: right 12px center; background-size: 12px; }
select:disabled, input:disabled { opacity: .6; cursor: default; background-color: var(--panel-3); }
select option { background: var(--panel); color: var(--text); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 16px; height: 16px; cursor: pointer; box-shadow: none; }
textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
label { display: grid; gap: 6px; color: var(--text-2); font-size: 13.5px; font-weight: 500; }
label > span { color: var(--text-2); }
.check { display: flex; gap: 8px; align-items: center; color: var(--text-2); font-size: 13.5px; cursor: pointer; font-weight: 400; }
.check input { width: 16px; }

/* Tablas como las listas de GHL */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--panel-3); white-space: nowrap; }
td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--text-2); }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--panel-3); }
td .t1 { font-weight: 500; color: var(--text); }
td .t2 { color: var(--faint); font-size: 12px; max-width: 420px; }
.tabla { overflow-x: auto; }

/* Etiquetas (badges) de color suave */
.chip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid #EAECF0; background: var(--panel-3); border-radius: 99px; padding: 1px 8px; font-size: 12px; font-weight: 500; color: var(--text-2); white-space: nowrap; line-height: 18px; }
.chip.ok { color: #067647; background: #ECFDF3; border-color: #ABEFC6; }
.chip.warn { color: #B54708; background: #FFFAEB; border-color: #FEDF89; }
.chip.mal { color: #B42318; background: #FEF3F2; border-color: #FECDCA; }
.chip.info { color: #175CD3; background: #EFF8FF; border-color: #B2DDFF; }
.chip.act { color: #004EEB; background: var(--accent-50); border-color: var(--accent-100); }
.nota { display: inline-block; min-width: 34px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; border-radius: 6px; padding: 1px 6px; background: var(--panel-2); font-size: 12.5px; }
.nota.alta { color: #067647; background: #ECFDF3; }
.nota.media { color: #B54708; background: #FFFAEB; }
.nota.baja { color: var(--faint); }

/* Pestañas subrayadas en azul */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 20px; flex-wrap: wrap; }
.tabs button { background: none; border: 0; padding: 9px 6px 10px; margin: 0 6px -1px 0; color: var(--faint); cursor: pointer; border-bottom: 2px solid transparent; font-weight: 500; transition: color .12s, border-color .12s; }
.tabs button:hover { color: var(--text-2); }
.tabs button.activo { color: var(--accent); border-color: var(--accent); font-weight: 600; }

.aviso { border: 1px solid #FEDF89; background: #FFFCF5; color: var(--text-2); padding: 10px 12px; border-radius: 8px; font-size: 13px; }
.aviso.mal { border-color: #FECDCA; background: #FFFBFA; color: #B42318; }
.aviso.ok { border-color: #ABEFC6; background: #F6FEF9; color: #067647; }

.correo { background: var(--panel-3); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; white-space: pre-wrap; line-height: 1.55; }
.correo .asunto { font-weight: 600; margin-bottom: 8px; white-space: normal; }
.burbuja { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; white-space: pre-wrap; background: var(--panel); }
.burbuja.salida { background: var(--accent-50); border-color: var(--accent-100); margin-left: 40px; border-top-right-radius: 4px; }
.burbuja.entrada { background: var(--panel-2); border-color: var(--line); margin-right: 40px; border-top-left-radius: 4px; }
.burbuja .meta { color: var(--faint); font-size: 11.5px; margin-bottom: 4px; white-space: normal; }

/* "Cajón": ahora es el modal centrado de GHL (Edit opportunity) */
.cajon-fondo { position: fixed; inset: 0; background: rgb(16 24 40 / .42); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); z-index: 100; animation: gh-fondo .18s ease-out; }
.cajon { position: fixed; z-index: 101; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(980px, calc(100vw - 32px)); max-height: calc(100vh - 64px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--panel); border-radius: 12px; box-shadow: var(--sombra-xl); padding: 24px 28px 28px; animation: gh-modal .2s cubic-bezier(.2, .8, .2, 1); }
.cajon > .cerrar, .gh-x { position: absolute; top: 18px; right: 18px; width: 34px; height: 34px; padding: 0; border-radius: 99px; border: 0; background: var(--panel-2); color: var(--muted); display: grid; place-items: center; cursor: pointer; box-shadow: none; font-size: 0; z-index: 3; transition: background .12s, color .12s; }
.cajon > .cerrar:hover, .gh-x:hover { background: #E4E7EC; color: var(--text); }
/* La X sale aunque el botón solo lleve el texto "Cerrar" (lo pintan así varios módulos) */
.cajon > .cerrar::before, .gh-x::before { content: ''; width: 16px; height: 16px; background: currentColor;
  -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%3Cpath d='M18 6 6 18M6 6l12 12'/%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%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E") center / contain no-repeat; }
/* Modal con secciones: menú a la izquierda y contenido que se desplaza (lo monta cap.seccionesModal) */
.cajon.gh-secc { padding: 0; overflow: hidden; display: flex; flex-direction: column; height: min(760px, calc(100vh - 64px)); }
.gh-modal-cab { padding: 22px 64px 16px 26px; border-bottom: 1px solid var(--line); flex: none; }
.gh-modal-cab h2 { font-size: 18px; margin: 0; }
.gh-modal-cab p { margin: 4px 0 0; color: var(--faint); font-size: 13.5px; }
.gh-modal-cuerpo { display: grid; grid-template-columns: 196px minmax(0, 1fr); flex: 1 1 auto; min-height: 0; }
.gh-modal-nav { padding: 14px 10px 14px 18px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.gh-modal-nav button { text-align: left; border: 0; background: none; padding: 7px 10px; border-radius: 6px; color: var(--muted); font-size: 13px; cursor: pointer; transition: background .12s, color .12s; }
.gh-modal-nav button:hover { color: var(--text); background: var(--panel-3); }
.gh-modal-nav button.on { background: var(--accent-50); color: #004EEB; font-weight: 600; }
.gh-modal-scroll { overflow-y: auto; overscroll-behavior: contain; padding: 18px 26px 26px; scroll-behavior: smooth; }
.gh-modal-pie { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 26px; border-top: 1px solid var(--line); background: var(--panel); }
.gh-modal-pie .faint { line-height: 1.5; }
.gh-sec { padding: 4px 0 20px; }
.gh-sec + .gh-sec { border-top: 1px solid var(--line); padding-top: 18px; }
.gh-sec > h3 { font-size: 15px; color: var(--text); margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.gh-sec > .aviso, .gh-sec > .eq-preguntar { margin: 0 0 12px; }
.gh-chips { margin-bottom: 14px; gap: 6px; }
.gh-sub { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--text); margin: 26px 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.gh-sub:first-of-type { margin-top: 0; }
.gh-sub svg.ic { width: 16px; height: 16px; color: var(--faint); }
.gh-campos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.gh-campo { display: grid; gap: 6px; min-width: 0; }
.gh-campo.ancho { grid-column: 1 / -1; }
.gh-etq { font-size: 13.5px; font-weight: 500; color: var(--text-2); }
.gh-valor { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel); color: var(--text); box-shadow: var(--sombra-xs); overflow: hidden; text-overflow: ellipsis; }
.gh-valor.sin-dato { color: #98A2B3; }
.gh-valor a { color: var(--accent); text-decoration: none; font-weight: 500; }
.gh-valor a:hover { text-decoration: underline; }
.gh-valor .gh-tel { color: var(--text); font-variant-numeric: tabular-nums; font-weight: 600; }
.gh-mini { margin-left: auto; border: 0; background: none; color: var(--faint); padding: 4px; border-radius: 6px; cursor: pointer; display: grid; }
.gh-mini:hover { background: var(--panel-2); color: var(--text); }
.gh-mini svg.ic { width: 15px; height: 15px; }
@media (max-width: 700px) { .gh-campos { grid-template-columns: minmax(0, 1fr); } }

/* Avisos (toasts) arriba, en tarjeta blanca con icono, como los de GHL */
.toast { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); background: var(--panel); color: var(--text); padding: 10px 16px 10px 12px; border-radius: 8px; z-index: 150; font-weight: 500; font-size: 13.5px;
  border: 1px solid var(--line); box-shadow: var(--sombra-lg); display: flex; align-items: center; gap: 10px; max-width: min(560px, calc(100vw - 32px)); animation: gh-toast .22s cubic-bezier(.2, .8, .2, 1); transition: top .2s; }
.toast::before { content: ''; width: 20px; height: 20px; flex: none; border-radius: 99px; background: #ECFDF3 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23079455' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat; }
.toast.mal { background: var(--panel); color: #B42318; }
.toast.mal::before { background: #FEF3F2 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D92D20' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 7v6M12 17h.01'/%3E%3C/svg%3E") center / 14px no-repeat; }

.barra { display: flex; align-items: flex-end; gap: 4px; height: 70px; }
.barra div { flex: 1; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 2px; opacity: .85; }
.embudo { display: grid; gap: 6px; }
.embudo .f { display: grid; grid-template-columns: 120px 1fr 40px; gap: 10px; align-items: center; font-size: 13px; }
.embudo .b { height: 8px; background: var(--panel-2); border-radius: 99px; overflow: hidden; }
.embudo .b i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }

.login { min-height: 100vh; display: grid; place-items: center; background: var(--bg); }
.login .tarjeta { width: min(380px, 92vw); display: grid; gap: 12px; padding: 28px; box-shadow: var(--sombra-lg); }
.login .marca { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; }
.login .marca svg { width: 28px; height: 28px; color: var(--accent); }
.login .marca small { color: var(--faint); font-weight: 400; font-size: 12.5px; }
.vacio { color: var(--faint); padding: 24px; text-align: center; border: 1px dashed var(--line-2); border-radius: var(--radius); background: var(--panel); }
.cargando { color: var(--faint); padding: 20px 0; }
.cargando::before { content: ''; display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px; border: 2px solid var(--accent-100); border-top-color: var(--accent); border-radius: 99px; animation: gh-gira .7s linear infinite; }
.paso { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: var(--panel); display: grid; gap: 10px; }
.paso .num { width: 24px; height: 24px; border-radius: 99px; background: var(--accent-50); color: var(--accent); display: grid; place-items: center; font-weight: 600; font-size: 12px; }
.post { white-space: pre-wrap; }
details summary { cursor: pointer; color: var(--muted); }

/* Animaciones (las de GHL son cortas y suaves) */
@keyframes gh-entra { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes gh-modal { from { opacity: 0; transform: translate(-50%, calc(-50% + 10px)) scale(.98); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes gh-fondo { from { opacity: 0; } to { opacity: 1; } }
@keyframes gh-toast { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes gh-cae { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes gh-tip { from { opacity: 0; transform: translateX(-3px); } to { opacity: 1; transform: none; } }
@keyframes gh-pop { 0% { transform: scale(.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes gh-gira { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

@media (max-width: 900px) {
  /* Móvil: el menú sale por la izquierda con la hamburguesa de la cabecera */
  .app, .app.plegado { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; transform: translateX(-100%); transition: transform .22s cubic-bezier(.4, 0, .2, 1); box-shadow: var(--sombra-xl); }
  .app.menu-abierto .side { transform: none; }
  .app.menu-abierto::after { content: ''; position: fixed; inset: 0; background: rgb(16 24 40 / .4); z-index: 29; }
  .side-plegar { display: none; }
  .app.plegado .nav .txt, .app.plegado .side-pie .txt, .app.plegado .side-cuenta .txt { display: block; }
  .app.plegado .nav a, .app.plegado .side-pie a { justify-content: flex-start; padding: 8px 10px; gap: 11px; }
  .app.plegado .nav .num { position: static; box-shadow: none; }
  .tb-hamburguesa { display: grid; }
  .topbar { padding: 0 12px; }
  main { padding: 18px 14px 80px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .burbuja.salida { margin-left: 12px; } .burbuja.entrada { margin-right: 12px; }
  .cajon { width: 100vw; max-height: 100vh; height: 100vh; border-radius: 0; padding: 20px 16px 28px; }
  .cajon.gh-secc { height: 100vh; }
  .gh-modal-cuerpo { grid-template-columns: minmax(0, 1fr); }
  .gh-modal-nav { display: none; }
  .gh-modal-scroll { padding: 14px 16px 24px; }
}

/* 22/11/2026 · Producto: logo de la empresa (imagen o iniciales en su color) en el menú y en la pantalla de entrar */
.side-logo .logo-empresa { max-width: 150px; max-height: 34px; object-fit: contain; background: #fff; border-radius: 6px; padding: 3px 6px; }
.app.plegado .side-logo .logo-empresa { max-width: 40px; padding: 2px; }
.logo-ini { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: #fff; font-weight: 700; font-size: 13px; letter-spacing: .02em; flex: none; }
.login .marca .logo-empresa { max-height: 32px; max-width: 140px; object-fit: contain; }

/* 29/11/2026 · Producto: el logo de Asueto como marca del producto. Pantalla de entrar: arriba y centrado, cobalto sobre claro
   y papel sobre oscuro (sigue al modo del sistema), con el nombre del producto debajo y la empresa en pequeño. Menú: la versión
   clara (el menú es oscuro), la empresa debajo como dato secundario; plegado, solo el ojo. En Asueto nada de esto se usa. */
.login.producto .tarjeta { width: min(400px, calc(100vw - 32px)); padding: 36px 30px 30px; gap: 12px; }
.login.producto .lp-marca { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 0 0 14px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.login.producto .lp-logo { display: block; width: 168px; height: 56px; }
.login.producto .lp-logo img { width: 168px; height: auto; display: block; }
.login.producto .lp-osc { display: none !important; }
.login.producto .lp-prod { font-size: 21px; font-weight: 600; letter-spacing: -.01em; color: var(--text); line-height: 1.2; }
.login.producto .lp-emp { display: inline-flex; align-items: center; gap: 6px; color: var(--faint); font-size: 12.5px; font-weight: 400; }
.login.producto .lp-emp-logo { max-height: 22px; max-width: 120px; object-fit: contain; }
.login.producto > form > p.muted { text-align: center; }
.login.producto .lp-marca { animation: gh-entra .35s ease-out both; }
.login.producto.cargando .lp-marca { visibility: hidden; animation: none; }
@media (prefers-color-scheme: dark) {
  .login.producto { --bg: #0F141C; --panel: #171E29; --panel-2: #1F2733; --line: #2A3340; --line-2: #3A4554; --text: #F1ECE2; --text-2: #D5D9E0; --muted: #AEB6C2; --faint: #8C96A4;
    --accent: #2F6FF0; --accent-h: #4A82F2; --accent-ink: #FFFFFF; --anillo: 0 0 0 4px rgb(47 111 240 / .28); color-scheme: dark; background: var(--bg); color: var(--text); }
  .login.producto .tarjeta { background: var(--panel); border-color: var(--line); box-shadow: 0 20px 40px -12px rgb(0 0 0 / .5); }
  .login.producto input { background: var(--panel-2); border-color: var(--line-2); color: var(--text); }
  .login.producto input::placeholder { color: var(--faint); }
  .login.producto .lp-cla { display: none !important; }
  .login.producto .lp-osc { display: block !important; }
  .login.producto .lp-emp-logo { background: #fff; border-radius: 5px; padding: 2px 5px; }
}
.side-logo.sl-prod { height: auto; display: grid; justify-items: center; gap: 8px; padding: 4px 0 8px; margin-bottom: 6px; }
.side-logo.sl-prod .sl-asueto { width: 112px; height: auto; display: block; }
.side-logo.sl-prod .sl-ojo { display: none; color: #F1ECE2; }
.side-logo.sl-prod .sl-ojo svg { width: 28px; height: 28px; }
.side-logo.sl-prod .sl-emp { display: flex; justify-content: center; max-width: 100%; }
.side-logo.sl-prod .sl-emp-logo { max-width: 120px; max-height: 22px; object-fit: contain; background: #fff; border-radius: 5px; padding: 2px 6px; }
.side-logo.sl-prod .sl-emp-n { font-size: 11.5px; color: var(--side-icono); opacity: .78; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: .01em; }
.app.plegado .side-logo.sl-prod .sl-asueto, .app.plegado .side-logo.sl-prod .sl-emp { display: none; }
.app.plegado .side-logo.sl-prod .sl-ojo { display: block; }
@media (max-width: 900px) { .app.plegado .side-logo.sl-prod .sl-asueto { display: block; } .app.plegado .side-logo.sl-prod .sl-emp { display: flex; } .app.plegado .side-logo.sl-prod .sl-ojo { display: none; } }
