/*
 * AI Assistant — el panel alrededor de cada página del área de cliente (tienda, carrito, pago, facturas, tickets,
 * base de conocimiento…): la barra de arriba, el menú lateral plegable del cliente y el asistente a la derecha. Va
 * sobre cualquier plantilla: esconde su cabecera, su menú y su pie (twenty-one, six, ClientX…) y deja la página en el
 * centro. El diseño es el de Google Stitch que eligió Jorge (2026-10-29), con los colores del módulo.
 * html.aia-shell-on, aia-side-on, aia-side-min y aia-chat-open las pone boot.js antes de pintar.
 */
@font-face { font-family: "AIA Sans"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("chat.php?asset=font-sans.woff2&v=1") format("woff2"); }
@font-face { font-family: "AIA Mono"; font-style: normal; font-weight: 100 800; font-display: swap; src: url("chat.php?asset=font-mono.woff2&v=1") format("woff2"); }
@font-face { font-family: "AIA Icons"; font-style: normal; font-weight: 400; font-display: block; src: url("chat.php?asset=font-icons.woff2&v=1") format("woff2"); }
:root {
  /* Los colores de la marca (el módulo los cambia desde Acceso → «Colores del diseño»): principal, secundario,
     compras (botones de comprar y pagar) y detalles. Todo lo demás sale de estos cuatro. */
  --aia-p: #006688;
  --aia-p2: #5dc5f6;
  --aia-hot: #fd6b2b;
  --aia-sun: #ffc531;
}
:root {
  --aia-font: "AIA Sans", "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --aia-mono: "AIA Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --aia-sh-top: 64px;
  --aia-sh-side: 0px;
  --aia-sh-chat: 400px;
  --aia-sh-accent: var(--aia-p);
  --aia-sh-on-p2: color-mix(in srgb, var(--aia-p) 78%, #000);
  --aia-sh-grad: linear-gradient(135deg, var(--aia-p) 0%, var(--aia-p2) 100%);
  --aia-sh-bg: color-mix(in srgb, var(--aia-p) 2%, #faf9ff);
  --aia-sh-surface: #ffffff;
  --aia-sh-low: color-mix(in srgb, var(--aia-p) 4%, #f3f3ff);
  --aia-sh-cont: color-mix(in srgb, var(--aia-p) 6%, #ebedff);
  --aia-sh-high: color-mix(in srgb, var(--aia-p) 8%, #e2e6ff);
  --aia-sh-text: #131b2e;
  --aia-sh-muted: #3e484e;
  --aia-sh-outline: #6e787f;
  --aia-sh-line: rgba(190, 200, 207, .45);
  --aia-sh-soft: var(--aia-sh-low);
  --aia-sh-pfix: color-mix(in srgb, var(--aia-p2) 38%, #fff);
  --aia-sh-hfix: color-mix(in srgb, var(--aia-hot) 22%, #fff);
  --aia-sh-shadow: 0 1px 8px rgba(0, 0, 0, .04);
  --aia-sh-pop: 0 18px 40px -16px rgba(16, 24, 40, .28);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-aia-theme="light"]) {
    --aia-sh-accent: color-mix(in srgb, var(--aia-p2) 82%, #fff); --aia-sh-on-p2: #04202c; --aia-sh-bg: #0d131d; --aia-sh-surface: #151c28;
    --aia-sh-low: #1a2230; --aia-sh-cont: #202a3a; --aia-sh-high: #273244; --aia-sh-text: #e6e9f2; --aia-sh-muted: #aab4c0; --aia-sh-outline: #8b96a2;
    --aia-sh-line: rgba(190, 200, 207, .14); --aia-sh-pfix: color-mix(in srgb, var(--aia-p2) 26%, #151c28); --aia-sh-hfix: color-mix(in srgb, var(--aia-hot) 24%, #151c28);
    --aia-sh-shadow: 0 1px 8px rgba(0, 0, 0, .35); --aia-sh-pop: 0 18px 40px -16px rgba(0, 0, 0, .7);
  }
}
:root[data-aia-theme="dark"] {
  --aia-sh-accent: color-mix(in srgb, var(--aia-p2) 82%, #fff); --aia-sh-on-p2: #04202c; --aia-sh-bg: #0d131d; --aia-sh-surface: #151c28;
  --aia-sh-low: #1a2230; --aia-sh-cont: #202a3a; --aia-sh-high: #273244; --aia-sh-text: #e6e9f2; --aia-sh-muted: #aab4c0; --aia-sh-outline: #8b96a2;
  --aia-sh-line: rgba(190, 200, 207, .14); --aia-sh-pfix: color-mix(in srgb, var(--aia-p2) 26%, #151c28); --aia-sh-hfix: color-mix(in srgb, var(--aia-hot) 24%, #151c28);
  --aia-sh-shadow: 0 1px 8px rgba(0, 0, 0, .35); --aia-sh-pop: 0 18px 40px -16px rgba(0, 0, 0, .7);
}
html.aia-side-on { --aia-sh-side: 256px; }
html.aia-side-on.aia-side-min { --aia-sh-side: 76px; }

/* Los iconos: Material Symbols, por su nombre (ligaduras). */
.aia-mi {
  font-family: "AIA Icons"; font-weight: normal; font-style: normal; font-size: 20px; line-height: 1; letter-spacing: normal; text-transform: none;
  display: inline-block; white-space: nowrap; word-wrap: normal; direction: ltr; flex: none; width: 1em; height: 1em; overflow: hidden;
  font-feature-settings: "liga"; -webkit-font-feature-settings: "liga"; -webkit-font-smoothing: antialiased; user-select: none; vertical-align: middle;
}

/* ---- lo de la plantilla que el panel sustituye ---- */
html.aia-shell-on #header, html.aia-shell-on body > header.header, html.aia-shell-on body > header.navbar,
html.aia-shell-on #footer, html.aia-shell-on footer.footer, html.aia-shell-on section#main-menu, html.aia-shell-on section#home-banner,
html.aia-shell-on nav#sidebar.wgssidebaraddon, html.aia-shell-on .aia-dock { display: none !important; }

/* La columna lateral de WHMCS (col-lg-4 col-xl-3: «Su información», «Contactos», «Accesos directos»…), fuera en
   todas las páginas; el contenido, a todo el ancho. Solo la columna que va junto al contenido (col-lg-8 col-xl-9). */
html.aia-shell-on .row:has(> .col-lg-8.col-xl-9) > .col-lg-4.col-xl-3, html.aia-shell-on .row > .col-lg-4.col-xl-3:has(> .sidebar) { display: none !important; }
html.aia-shell-on .row:has(> .col-lg-4.col-xl-3) > .col-lg-8.col-xl-9 { flex: 0 0 100% !important; max-width: 100% !important; }

/* ---- la página de WHMCS, en el hueco del centro ---- */
html.aia-shell-on body {
  padding: var(--aia-sh-top) 0 0 var(--aia-sh-side) !important; margin: 0 !important; font-family: var(--aia-font) !important;
  background: var(--aia-sh-bg) !important; transition: padding .2s ease; -webkit-font-smoothing: antialiased;
}
html.aia-shell-on.aia-chat-open body { padding-right: var(--aia-sh-chat) !important; }
html.aia-shell-on #main-body, html.aia-shell-on #main-body #content, html.aia-shell-on #main-body > .wrapper {
  margin-left: 0 !important; margin-right: 0 !important; width: auto !important; max-width: none !important;
  position: static !important; left: auto !important; right: auto !important; top: auto !important;
}
html.aia-shell-on #main-body { padding-top: 18px; min-height: calc(100vh - var(--aia-sh-top)); }
html.aia-shell-on #main-body > .container, html.aia-shell-on .master-breadcrumb > .container { width: 95% !important; max-width: none !important; }
html.aia-shell-on .master-breadcrumb { background: transparent !important; border: 0 !important; padding-top: 12px; }
/* El recuadro blanco de ClientX alrededor del contenido: fuera; el contenido sobre el fondo del panel, centrado. */
html.aia-shell-on #main-body, html.aia-shell-on #main-body > .wrapper, html.aia-shell-on #main-body #content, html.aia-shell-on .theme-main-inner-page-section { background: transparent !important; box-shadow: none !important; border: 0 !important; }
html.aia-shell-on .theme-main-inner-page-section { width: 95% !important; max-width: none !important; margin: 0 auto !important; padding: 8px 24px 48px !important; }
@media (max-width: 760px) { html.aia-shell-on .theme-main-inner-page-section { width: 100% !important; padding: 4px 12px 32px !important; } html.aia-shell-on #main-body > .container { width: 100% !important; } }

/* ---- barra de arriba ---- */
.aia-shell { font: 14px/1.43 var(--aia-font); color: var(--aia-sh-text); }
.aia-shell *, .aia-shell *::before, .aia-shell *::after { box-sizing: border-box; }
.aia-shell a { text-decoration: none; }
.aia-sh-top {
  position: fixed; top: 0; left: 0; right: 0; height: var(--aia-sh-top); z-index: 1040; display: flex; align-items: center; gap: 20px;
  padding: 0 20px; background: color-mix(in srgb, var(--aia-sh-surface) 90%, transparent); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--aia-sh-shadow);
}
.aia-sh-brand { display: flex; align-items: center; gap: 8px; min-width: 0; flex: none; color: var(--aia-sh-accent) !important; font-weight: 650; font-size: 18px; letter-spacing: -.01em; }
.aia-sh-company { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.aia-sh-logo {
  display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 12px; background: var(--aia-p2);
  color: var(--aia-sh-on-p2); box-shadow: 0 2px 8px color-mix(in srgb, var(--aia-p2) 30%, transparent);
}
.aia-sh-logo .aia-mi { font-size: 22px; }
.aia-sh-version { color: var(--aia-sh-outline); font: 500 11px/1 var(--aia-mono); background: var(--aia-sh-low); padding: 4px 7px; border-radius: 999px; }
.aia-sh-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: none; }
.aia-sh-icon {
  position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--aia-sh-low);
  color: var(--aia-sh-muted) !important; cursor: pointer; font-size: 17px; padding: 0; transition: background-color .15s, color .15s;
}
.aia-sh-icon:hover { background: var(--aia-sh-cont); color: var(--aia-sh-text) !important; }
.aia-sh-badge { position: absolute; top: 5px; right: 5px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--aia-hot); color: #fff; font: 700 10px/16px var(--aia-font); }
.aia-sh-menu { display: none; }
.aia-sh-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 12px; border: 1px solid transparent;
  background: var(--aia-p); color: #fff !important; font: 600 14px/1 var(--aia-font); cursor: pointer; white-space: nowrap;
  box-shadow: 0 4px 12px -4px color-mix(in srgb, var(--aia-p) 45%, transparent); transition: filter .15s, transform .1s;
}
.aia-sh-btn:hover { filter: brightness(1.08); }
.aia-sh-btn:active { transform: scale(.97); }
.aia-sh-btn.ghost { background: var(--aia-sh-low); color: var(--aia-sh-text) !important; box-shadow: none; }
.aia-sh-btn.ghost:hover { background: var(--aia-sh-cont); filter: none; }
.aia-sh-chatbtn .aia-sh-logo { width: 26px; height: 26px; border-radius: 8px; background: rgba(255, 255, 255, .2); color: #fff; box-shadow: none; }
.aia-sh-chatbtn .aia-sh-logo .aia-mi { font-size: 17px; }
html.aia-chat-open .aia-sh-chatbtn { background: var(--aia-sh-pfix); color: var(--aia-sh-on-p2) !important; box-shadow: none; }
html.aia-chat-open .aia-sh-chatbtn .aia-sh-logo { background: var(--aia-p); }
.aia-sh-drop .aia-sh-themerow {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 12px; margin: 1px 0; border: 0; border-radius: 12px; background: transparent;
  color: var(--aia-sh-muted); font: 500 14px var(--aia-font); text-align: left; cursor: pointer;
}
.aia-sh-drop .aia-sh-themerow .aia-mi { color: var(--aia-sh-outline); }
.aia-sh-drop .aia-sh-themerow:hover { background: var(--aia-sh-high); color: var(--aia-sh-text); }
/* El latido de los puntos de estado (lo usa la portada) */
@keyframes aia-ping { 75%, 100% { transform: scale(2.2); opacity: 0; } }
/* El buscador del cliente */
.aia-sh-search { position: relative; flex: 1 1 260px; max-width: 448px; min-width: 160px; display: flex; align-items: center; }
.aia-sh-search > .aia-mi { position: absolute; left: 11px; font-size: 18px; color: var(--aia-sh-outline); pointer-events: none; }
.aia-sh-search input {
  width: 100%; height: 40px; padding: 0 14px 0 36px; border: 0; border-radius: 12px; background: var(--aia-sh-low); color: var(--aia-sh-text);
  font: 14px var(--aia-font); outline: none; transition: background-color .15s, box-shadow .15s;
}
.aia-sh-search input::placeholder { color: var(--aia-sh-outline); }
.aia-sh-search input:focus { background: var(--aia-sh-surface); box-shadow: 0 0 0 2px var(--aia-p2); }
.aia-sh-img { display: block; height: 36px; width: auto; max-width: 180px; object-fit: contain; }
/* El logo de noche (Design::logoImg): el propio si lo hay; si no, el de día invertido (el texto oscuro pasa a claro,
   los colores se mantienen) y con su fondo blanco fundido con la barra. */
.aia-logo-dk { display: none !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-aia-theme="light"]) .aia-logo-lt { display: none !important; }
  :root:not([data-aia-theme="light"]) .aia-logo-dk { display: block !important; }
  :root:not([data-aia-theme="light"]) .aia-logo-auto { filter: invert(1) hue-rotate(180deg) brightness(1.6) saturate(1.3); mix-blend-mode: screen; }
}
:root[data-aia-theme="dark"] .aia-logo-lt { display: none !important; }
:root[data-aia-theme="dark"] .aia-logo-dk { display: block !important; }
:root[data-aia-theme="dark"] .aia-logo-auto { filter: invert(1) hue-rotate(180deg) brightness(1.6) saturate(1.3); mix-blend-mode: screen; }
/* El cliente, arriba a la derecha */
.aia-sh-name { display: flex; flex-direction: column; text-align: left; line-height: 1.2; min-width: 0; }
.aia-sh-name b { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; color: var(--aia-sh-text); }
.aia-sh-name small { font: 500 11px/1.3 var(--aia-mono); color: var(--aia-sh-outline); }
.aia-sh-avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--aia-p); color: #fff; font-weight: 700; font-size: 12px; box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }

/* ---- el menú, junto al logo ---- */
.aia-sh-nav { display: flex; align-items: center; gap: 20px; min-width: 0; height: 100%; flex: 0 1 auto; }
.aia-sh-nav .aia-sh-link[hidden], .aia-sh-drop a[hidden] { display: none !important; }
.aia-sh-more .aia-sh-drop { max-height: calc(100vh - var(--aia-sh-top) - 30px); overflow-y: auto; }
.aia-sh-group { position: relative; }
.aia-sh-nav > .aia-sh-group { height: 100%; display: flex; align-items: center; }
.aia-sh-link {
  display: inline-flex; align-items: center; gap: 8px; height: 100%; white-space: nowrap; border-bottom: 2px solid transparent; padding-top: 2px;
  color: var(--aia-sh-muted) !important; font-weight: 500; transition: color .15s, border-color .15s;
}
.aia-sh-link:hover { color: var(--aia-sh-text) !important; }
.aia-sh-link.on { color: var(--aia-sh-accent) !important; font-weight: 650; border-bottom-color: var(--aia-sh-accent); }
.aia-sh-top.aia-sh-tight .aia-sh-version, .aia-sh-top.aia-sh-tight .aia-sh-user .aia-sh-name { display: none; }
/* Como último recurso: el menú de la cuenta ya está en el menú lateral; las categorías, solo su icono. */
.aia-sh-nav.aia-sh-compact { gap: 12px; }
.aia-sh-nav.aia-sh-compact .aia-sh-link:not([data-cat]) { display: none; }
.aia-sh-nav.aia-sh-compact .aia-sh-link > span:not(.aia-sh-cico) { display: none; }
/* El icono de cada categoría de la tienda: un cuadradito de color */
.aia-sh-cico { display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 9px; background: var(--aia-sh-pfix); color: var(--aia-sh-accent); }
.aia-sh-cico.alt { background: color-mix(in srgb, var(--aia-p2) 22%, var(--aia-sh-surface)); color: color-mix(in srgb, var(--aia-p2) 45%, var(--aia-sh-text)); }
.aia-sh-cico.hot { background: var(--aia-sh-hfix); color: var(--aia-hot); }
.aia-sh-cico .aia-mi { font-size: 18px; }
.aia-sh-link .aia-sh-cico { width: 28px; height: 28px; border-radius: 8px; }
/* El cliente: su cuenta se despliega debajo, alineada a la derecha */
.aia-sh-user { padding-left: 10px; border-left: 1px solid var(--aia-sh-line); }
.aia-sh-user .aia-sh-gtitle { gap: 10px; padding: 0 4px; height: 44px; border-radius: 12px; }
.aia-sh-group.aia-sh-user.on .aia-sh-gtitle { background: var(--aia-sh-low); }
.aia-sh-user .aia-sh-drop, .aia-sh-bell .aia-sh-drop { left: auto; right: 0; }
.aia-sh-bell .aia-sh-gtitle { width: 40px; padding: 0; justify-content: center; }
.aia-sh-bell .aia-sh-gtitle .aia-sh-badge { top: 4px; right: 4px; }
.aia-sh-none { margin: 4px 12px 10px; color: var(--aia-sh-outline); font-size: 13px; }
.aia-sh-locale .aia-sh-drop { left: auto; right: 0; min-width: 210px; max-height: calc(100vh - var(--aia-sh-top) - 30px); overflow-y: auto; }
.aia-sh-locale .aia-sh-gtitle { padding: 0 12px; height: 40px; background: var(--aia-hot) !important; color: #fff !important; font-weight: 600; box-shadow: 0 4px 12px color-mix(in srgb, var(--aia-hot) 25%, transparent); }
.aia-sh-locale .aia-sh-gtitle .aia-mi { color: #fff; }
.aia-sh-right .aia-sh-locale .aia-sh-gtitle:hover, .aia-sh-right .aia-sh-locale.open .aia-sh-gtitle { background: color-mix(in srgb, var(--aia-hot) 88%, #000) !important; }
.aia-sh-locale .aia-sh-gtitle .aia-sh-chev { display: none; }
.aia-sh-dhead { display: block; padding: 8px 12px 4px; color: var(--aia-sh-outline); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.aia-sh-locale .aia-sh-drop a { padding: 7px 12px; }
.aia-sh-gtitle {
  display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 0 2px; border: 0; border-radius: 12px; background: transparent;
  color: var(--aia-sh-muted); font: 500 14px var(--aia-font); cursor: pointer; white-space: nowrap; transition: color .15s, background-color .15s;
}
.aia-sh-gtitle .aia-sh-chev { font-size: 18px; color: var(--aia-sh-outline); transition: transform .15s; }
.aia-sh-gtitle:hover, .aia-sh-group.open .aia-sh-gtitle { color: var(--aia-sh-text); }
.aia-sh-right .aia-sh-gtitle:hover, .aia-sh-right .aia-sh-group.open .aia-sh-gtitle { background: var(--aia-sh-cont); }
.aia-sh-nav .aia-sh-group.on > .aia-sh-gtitle { color: var(--aia-sh-accent); font-weight: 650; }
.aia-sh-group.open .aia-sh-gtitle .aia-sh-chev { transform: rotate(180deg); }
.aia-sh-drop {
  display: none; position: absolute; top: calc(100% + 6px); left: 0; min-width: 250px; padding: 8px; z-index: 1050;
  background: var(--aia-sh-surface); border: 1px solid var(--aia-sh-line); border-radius: 16px; box-shadow: var(--aia-sh-pop);
}
.aia-sh-nav > .aia-sh-group > .aia-sh-drop { top: calc(100% - 6px); }
.aia-sh-group.open .aia-sh-drop { display: block; }
.aia-sh-drop a, .aia-sh-drop .aia-sh-soon {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; margin: 1px 0; border-radius: 12px;
  color: var(--aia-sh-muted) !important; font-weight: 500; white-space: nowrap; transition: background-color .15s, color .15s;
}
.aia-sh-drop a > .aia-mi { color: var(--aia-sh-outline); }
.aia-sh-drop a:hover { background: var(--aia-sh-high); color: var(--aia-sh-text) !important; }
.aia-sh-drop a:hover > .aia-mi { color: var(--aia-sh-accent); }
.aia-sh-drop a.on { background: var(--aia-p2); color: var(--aia-sh-on-p2) !important; font-weight: 650; }
.aia-sh-drop a.on > .aia-mi { color: inherit; }
.aia-sh-drop a.on .aia-sh-cico { background: rgba(255, 255, 255, .35); color: inherit; }
.aia-sh-drop a.aia-sh-foot { margin-top: 6px; padding-top: 11px; border-top: 1px solid var(--aia-sh-line); border-radius: 0 0 12px 12px; color: var(--aia-sh-outline) !important; font-size: 13px; }

/* ---- el menú lateral del cliente, plegable ---- */
.aia-sd {
  position: fixed; left: 0; top: var(--aia-sh-top); bottom: 0; width: var(--aia-sh-side); z-index: 1036; display: none; flex-direction: column;
  padding: 22px 0 12px; background: var(--aia-sh-surface); box-shadow: 0 1px 8px rgba(0, 0, 0, .03); transition: width .2s ease; overflow: hidden;
}
html.aia-side-on .aia-sd { display: flex; }
.aia-sd-nav { flex: 1 1 auto; display: flex; flex-direction: column; gap: 4px; padding: 0 12px; overflow-y: auto; overflow-x: hidden; }
.aia-sd-head { display: block; padding: 0 12px 8px; color: var(--aia-sh-outline); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.aia-sd-head + .aia-sd-link { margin-top: 2px; }
.aia-sd-link + .aia-sd-head { padding-top: 18px; }
.aia-sd-link {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--aia-sh-muted) !important; white-space: nowrap;
  font-weight: 500; transition: background-color .15s, color .15s;
}
.aia-sd-link:hover { background: var(--aia-sh-high); color: var(--aia-sh-text) !important; }
.aia-sd-link.on { background: var(--aia-p2); color: var(--aia-sh-on-p2) !important; font-weight: 650; }
.aia-sd-plan {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 12px 16px 0; padding: 12px; border-radius: 12px;
  background: var(--aia-sh-low); color: var(--aia-sh-text) !important; position: relative;
}
.aia-sd-plan::before { content: ""; position: absolute; left: -4px; right: -4px; top: -13px; border-top: 1px solid var(--aia-sh-line); }
.aia-sd-plan-txt { display: flex; flex-direction: column; min-width: 0; }
.aia-sd-plan small { color: var(--aia-sh-outline); font-size: 12px; }
.aia-sd-plan b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aia-sd-pill { flex: none; padding: 2px 8px; border-radius: 999px; background: var(--aia-sh-pfix); color: var(--aia-sh-on-p2); font: 500 11px/1.4 var(--aia-mono); }
.aia-sd-toggle {
  align-self: flex-end; margin: 10px 16px 0; width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: var(--aia-sh-outline);
  cursor: pointer; display: inline-grid; place-items: center;
}
.aia-sd-toggle:hover { background: var(--aia-sh-low); color: var(--aia-sh-text); }
html.aia-side-min .aia-sd-nav { padding: 0 14px; }
html.aia-side-min .aia-sd-link { justify-content: center; padding: 10px 0; }
html.aia-side-min .aia-sd-link span:not(.aia-mi), html.aia-side-min .aia-sd-head, html.aia-side-min .aia-sd-plan { display: none; }
html.aia-side-min .aia-sd-link + .aia-sd-head { display: block; height: 1px; padding: 0; margin: 12px 6px; background: var(--aia-sh-line); font-size: 0; }
html.aia-side-min .aia-sd-toggle { align-self: center; margin: 10px 0 0; transform: scaleX(-1); }

/* ---- el asistente, a la derecha ---- */
.aia-sh-chat {
  position: fixed; top: var(--aia-sh-top); right: 0; bottom: 0; width: var(--aia-sh-chat); z-index: 1035; display: none;
  background: var(--aia-sh-surface); border-left: 1px solid var(--aia-sh-line); box-shadow: -10px 0 30px -20px rgba(16, 24, 40, .35);
}
html.aia-chat-open .aia-sh-chat { display: block; }
.aia-sh-chat iframe { display: block; width: 100%; height: 100%; border: 0; }
.aia-sh-veil { display: none; }

/* ---- pantallas medianas: sin menú lateral; el menú se abre con ☰, debajo de la barra ---- */
@media (max-width: 1100px) {
  /* Sin el desenfoque: con backdrop-filter, el menú ☰ (position: fixed) quedaba encerrado en la barra (24 px, sin verse). */
  .aia-sh-top { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--aia-sh-surface); }
  html.aia-side-on { --aia-sh-side: 0px; }
  html.aia-side-on .aia-sd { display: none; }
  .aia-sh-menu { display: inline-grid; }
  .aia-sh-nav {
    display: none; position: fixed; top: var(--aia-sh-top); left: 0; width: min(320px, 100%); bottom: 0; height: auto; margin: 0; z-index: 1046;
    flex-direction: column; align-items: stretch; gap: 0; overflow-y: auto; padding: 12px; background: var(--aia-sh-surface); box-shadow: var(--aia-sh-pop);
  }
  html.aia-nav-open .aia-sh-nav { display: flex; }
  .aia-sh-nav > .aia-sh-group { height: auto; display: block; }
  .aia-sh-nav .aia-sh-gtitle { width: 100%; height: auto; padding: 12px 12px 4px; color: var(--aia-sh-outline) !important; background: transparent !important;
    font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; cursor: default; }
  .aia-sh-nav .aia-sh-gtitle .aia-sh-chev { display: none; }
  .aia-sh-nav .aia-sh-drop { display: block; position: static; min-width: 0; padding: 0 0 6px; border: 0; box-shadow: none; background: transparent; }
  .aia-sh-nav .aia-sh-link { height: auto; padding: 10px 12px; border: 0; border-radius: 12px; }
  .aia-sh-nav .aia-sh-link[data-cat] { display: none !important; }
  .aia-sh-more .aia-sh-drop { max-height: none; }
  .aia-sh-nav .aia-sh-link.on { background: var(--aia-p2); color: var(--aia-sh-on-p2) !important; }
  html.aia-nav-open .aia-sh-veil { display: block; position: fixed; inset: var(--aia-sh-top) 0 0 0; z-index: 1045; background: rgba(15, 19, 26, .35); }
  .aia-sh-hide, .aia-sh-name, .aia-sh-version { display: none; }
  .aia-sh-top { gap: 12px; }
}
/* ---- móvil: el asistente ocupa la pantalla ---- */
@media (max-width: 760px) {
  html.aia-shell-on.aia-chat-open body { padding-right: 0 !important; }
  .aia-sh-chat { width: 100%; z-index: 1045; }
  .aia-sh-img { height: 28px; max-width: 110px; }
  .aia-sh-company { display: none; }
  .aia-sh-search { display: none; }
  .aia-sh-user { padding-left: 0; border: 0; }
  .aia-sh-user .aia-sh-drop, .aia-sh-bell .aia-sh-drop { position: fixed; top: var(--aia-sh-top); right: 8px; left: 8px; min-width: 0; }
  .aia-sh-top { gap: 6px; padding: 0 8px; }
  .aia-sh-right { gap: 6px; }
  .aia-sh-icon { width: 36px; height: 36px; }
}
@media (max-width: 760px) {
  .aia-sh-user .aia-sh-chev { display: none; }
  .aia-sh-user .aia-sh-gtitle { padding: 0; }
  .aia-sh-chatbtn { padding: 0 7px; }
  .aia-sh-right > .aia-sh-icon[href] { display: none; }
}
@media (max-width: 420px) { .aia-sh-right > .aia-sh-theme { display: none; } .aia-sh-btn.ghost span:not(.aia-mi) { display: none; } }
@media (prefers-reduced-motion: reduce) { html.aia-shell-on body, .aia-sh-gtitle .aia-sh-chev, .aia-sd { transition: none; } }
@media print { .aia-shell { display: none !important; } html.aia-shell-on body { padding: 0 !important; } }

/* Al pasar de una página a otra del área de cliente, la barra, el menú lateral y el asistente se quedan quietos y
   solo cambia el centro, con un fundido corto (transiciones entre páginas del navegador: Chrome, Edge y Safari; los
   demás, como siempre). El chat de la página nueva se pinta al instante con lo que se veía (chat.js). */
@view-transition { navigation: auto; }
html.aia-shell-on .aia-sh-top { view-transition-name: aia-top; }
html.aia-shell-on .aia-sd { view-transition-name: aia-side; }
html.aia-shell-on .aia-sh-chat { view-transition-name: aia-chat; }
::view-transition-old(aia-top), ::view-transition-new(aia-top), ::view-transition-old(aia-side), ::view-transition-new(aia-side), ::view-transition-old(aia-chat) { animation: none; }
::view-transition-new(aia-chat) { animation: none; opacity: 0; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

/* Las plantillas (ClientX, twenty-one…) dan márgenes y estilos a todo form e input: en el buscador de la barra, fuera. */
.aia-shell form.aia-sh-search { margin: 0 !important; padding: 0 !important; }
.aia-shell .aia-sh-search input[type="search"] { margin: 0 !important; height: 40px !important; min-height: 0 !important; border: 0 !important; line-height: 40px !important; box-sizing: border-box !important; }

/* El menú propio de la empresa: sus enlaces no se esconden aunque falte sitio (no están en el menú lateral). */
.aia-sh-nav.aia-sh-own.aia-sh-compact .aia-sh-link { display: inline-flex; }
.aia-sh-nav.aia-sh-own.aia-sh-compact .aia-sh-link > span { display: inline; }
.aia-sh-nav.aia-sh-own { gap: 18px; }

/* Las páginas que pinta el módulo enteras (la base de conocimiento): la de la plantilla, escondida. */
html.aia-own body > *:not(.aia-shell):not(.aia-ownpage):not(script):not(style):not(link):not(.aia-diag) { display: none !important; }

/* El menú propio con desplegables como el de la web de la empresa: icono, nombre con su etiqueta y descripción. */
.aia-sh-mega .aia-sh-drop { min-width: 320px; }
.aia-sh-mega.wide .aia-sh-drop { width: min(680px, calc(100vw - 32px)); display: none; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 6px; }
.aia-sh-mega.wide.open .aia-sh-drop { display: grid; }
.aia-sh-mega .aia-sh-drop a, .aia-sh-mega .aia-sh-drop .aia-sh-soon { align-items: flex-start; white-space: normal; }
.aia-sh-mega .aia-sh-drop a .aia-sh-cico, .aia-sh-mega .aia-sh-drop .aia-sh-soon .aia-sh-cico { margin-top: 2px; }
/* Una entrada que aún no tiene página («Coming soon»): se ve, pero no es un enlace. */
.aia-sh-drop .aia-sh-soon { cursor: default; }
.aia-sh-drop .aia-sh-soon .aia-sh-badge2 { background: var(--aia-sh-outline); }
.aia-sh-mtxt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.aia-sh-mtxt b { display: flex; align-items: center; gap: 6px; color: var(--aia-sh-text); font-weight: 600; }
.aia-sh-mtxt small { color: var(--aia-sh-outline); font-size: 12px; line-height: 1.35; }
.aia-sh-badge2 { white-space: nowrap; padding: 1px 7px; border-radius: 999px; background: var(--aia-hot); color: #fff; font: 700 10px/16px var(--aia-font); font-style: normal; letter-spacing: .04em; text-transform: uppercase; }
@media (max-width: 1100px) { .aia-sh-mega.wide .aia-sh-drop, .aia-sh-mega.wide.open .aia-sh-drop { display: block; width: auto; } .aia-sh-mtxt small { display: none; } }
/* El desplegable por secciones (como el de la web de la empresa): una columna por sección y el recuadro destacado. */
.aia-sh-mega.cols2 .aia-sh-drop, .aia-sh-mega.cols3 .aia-sh-drop, .aia-sh-mega.cols4 .aia-sh-drop { display: none; gap: 4px 12px; width: min(var(--aia-sh-mw, 760px), calc(100vw - 32px)); }
.aia-sh-mega.cols2 .aia-sh-drop { --aia-sh-mw: 560px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.aia-sh-mega.cols3 .aia-sh-drop { --aia-sh-mw: 820px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.aia-sh-mega.cols4 .aia-sh-drop { --aia-sh-mw: 980px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.aia-sh-mega.cols2.open .aia-sh-drop, .aia-sh-mega.cols3.open .aia-sh-drop, .aia-sh-mega.cols4.open .aia-sh-drop { display: grid; }
.aia-sh-nav > .aia-sh-mega:not(:first-child) .aia-sh-drop { left: 50%; transform: translateX(-35%); }
.aia-sh-mcol { display: flex; flex-direction: column; min-width: 0; }
.aia-sh-promo { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 16px; border-radius: 14px; background: linear-gradient(135deg, color-mix(in srgb, var(--aia-p2) 22%, var(--aia-sh-surface)), color-mix(in srgb, var(--aia-hot) 14%, var(--aia-sh-surface))); }
.aia-sh-promo b { font-size: 16px; line-height: 1.3; color: var(--aia-sh-text); }
.aia-sh-promo > span { color: var(--aia-sh-muted); font-size: 13px; }
.aia-sh-drop a.aia-sh-promo-btn { margin-top: auto; justify-content: center; gap: 6px; padding: 9px 12px; background: var(--aia-hot); color: #fff !important; font-weight: 700; }
.aia-sh-drop a.aia-sh-promo-btn:hover { background: color-mix(in srgb, var(--aia-hot) 88%, #000); color: #fff !important; }
.aia-sh-drop a.aia-sh-promo-btn .aia-mi { color: #fff; font-size: 18px; }
@media (max-width: 1100px) {
  .aia-sh-mega.cols2 .aia-sh-drop, .aia-sh-mega.cols3 .aia-sh-drop, .aia-sh-mega.cols4 .aia-sh-drop { display: block !important; width: auto; transform: none; }
  .aia-sh-nav > .aia-sh-mega:not(:first-child) .aia-sh-drop { transform: none; }
  .aia-sh-promo { margin: 6px 0; }
}
