.ix-panel {
	max-width: 1000px;
	margin: 40px auto;
	padding: 0 20px;
}

.ix-crumbs {
	font-size: 13px;
	/* El breadcrumb toma los colores de la compañía (antes era gris fijo y
	   se perdía sobre fondos oscuros). */
	color: var(--ix-breadcrumb-text, #666);
	margin-bottom: 20px;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 4px;
}
.ix-crumbs a {
	color: var(--ix-breadcrumb-text, #666);
	text-decoration: none;
}
.ix-crumbs a:hover {
	color: var(--ix-breadcrumb-link, var(--ix-main-accent, #2563eb));
	text-decoration: underline;
}
.ix-crumb-sep {
	color: var(--ix-breadcrumb-text, #999);
	opacity: 0.6;
}
.ix-crumb-current {
	/* BUG FIX: antes .ix-crumbs no tenía NINGÚN estilo (el CSS existente
	   apuntaba a la clase vieja .ix-breadcrumb, que el HTML real ya no
	   usa), así que todo el breadcrumb, incluido el item activo, caía al
	   azul de link por defecto del navegador. El item activo ahora usa el
	   mismo "active text" que el resto de grids/tabs. */
	color: var(--ix-breadcrumb-active-text, var(--ix-main-active-text, var(--ix-main-text, #111)));
	font-weight: 600;
}

/* BUG FIX: varias plantillas (clients.php, contract-detail.php,
   billing-detail.php, playbooks.php, requests.php, users-management.php,
   module-content.php, module-menu.php) NO usan .ix-crumbs — tienen su
   propio breadcrumb con clases de Tailwind hardcodeadas directo en el PHP
   (text-blue-600 hover:text-blue-800, text-gray-900 font-medium). Esas
   clases nunca tomaban el color de la compañía. Se renombraron a
   ix-crumb-link / ix-crumbs-legacy / ix-crumb-current-legacy en el HTML;
   acá van sus estilos. El !important es necesario porque estas plantillas
   cargan Tailwind por CDN, que puede pisar reglas normales según el orden
   de carga en el <head>. */
.ix-crumbs-legacy,
.ix-crumbs-legacy .mx-2 {
	color: var(--ix-breadcrumb-text, #666) !important;
}
.ix-crumb-link {
	color: var(--ix-breadcrumb-text, #666) !important;
	text-decoration: none;
}
.ix-crumb-link:hover {
	color: var(--ix-breadcrumb-link, var(--ix-main-accent, #2563eb)) !important;
	text-decoration: underline;
}
.ix-crumb-current-legacy {
	color: var(--ix-breadcrumb-active-text, var(--ix-main-active-text, var(--ix-main-text, #111))) !important;
}

.ix-company-grid,
.ix-module-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 16px;
	margin-top: 20px;
}

.ix-company-card,
.ix-module-card {
	display: block;
	padding: 20px;
	border: 1px solid #e2e2e2;
	border-radius: 10px;
	text-decoration: none;
	color: #1d1d1f;
	background: #fff;
	transition: box-shadow .15s ease, transform .15s ease;
}

.ix-company-card:hover,
.ix-module-card:hover {
	box-shadow: 0 4px 14px rgba(0,0,0,.08);
	transform: translateY(-1px);
}

.ix-company-name {
	display: block;
	font-weight: 600;
	font-size: 16px;
	margin-bottom: 6px;
}

.ix-company-meta {
	display: block;
	font-size: 12px;
	color: #777;
	text-transform: uppercase;
	letter-spacing: .03em;
}

.ix-submodule-list {
	margin: 8px 0 0 4px;
	padding: 0;
	list-style: none;
}

.ix-submodule-list li a {
	display: block;
	padding: 6px 8px;
	font-size: 13px;
	color: #444;
	text-decoration: none;
	border-left: 2px solid #ddd;
	padding-left: 12px;
}

.ix-submodule-list li a:hover {
	border-left-color: #333;
	color: #000;
}

.ix-login-wrap {
	max-width: 380px;
	margin: 60px auto;
	padding: 32px;
	border: 1px solid #e2e2e2;
	border-radius: 12px;
	background: #fff;
}

.ix-login-form label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin: 14px 0 6px;
}

.ix-login-form input[type="text"],
.ix-login-form input[type="password"] {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #ccc;
	border-radius: 6px;
	box-sizing: border-box;
}

.ix-login-form .ix-remember {
	display: flex;
	align-items: center;
	gap: 6px;
	font-weight: 400;
}

.ix-login-form button {
	width: 100%;
	margin-top: 18px;
	padding: 11px;
	border: 0;
	border-radius: 6px;
	background: #1d1d1f;
	color: #fff;
	font-weight: 600;
	cursor: pointer;
}

.ix-login-error {
	background: #fdecea;
	color: #a00;
	padding: 10px 12px;
	border-radius: 6px;
	font-size: 13px;
	margin-bottom: 10px;
}

.ix-forgot-link {
	display: block;
	margin-top: 14px;
	font-size: 12px;
	text-align: center;
	color: #666;
}

/* ===================== SHELL: HEADER + SIDEBAR ===================== */

* { box-sizing: border-box; }

body.ix-app-body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	background: #f5f6f8;
	color: #1d1d1f;
}

.ix-header-bar {
	position: sticky;
	top: 0;
	z-index: 100;
	height: 56px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 16px;
	background: var(--ix-header-bg, #16181d);
	color: #fff;
}

.ix-header-left { display: flex; align-items: center; gap: 14px; }

/*
 * Toggle del sidebar: control de navegación del panel, pero pintado con la
 * marca de la compañía (fondo hover, borde e ícono), igual que el resto de
 * los íconos del header. El intercambio hamburguesa/X lo controla JS
 * (ver el <script> al final de sidebar.php).
 */
.ix-sidebar-toggle {
	display: inline-flex; align-items: center; justify-content: center;
	width: 44px; height: 44px; flex-shrink: 0; cursor: pointer;
	font-size: 22px; line-height: 1; font-weight: 700;
	border-radius: var(--ix-header-control-radius, 11px);
	border: 1px solid var(--ix-header-border, #e2e8f0);
	background: var(--ix-header-hover-bg, #f8fafc);
	color: var(--ix-header-icon, var(--ix-header-text, #64748b));
	transition: color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.ix-sidebar-toggle > span { color: inherit; }

.ix-header-brand { display: flex; align-items: center; gap: 9px; color: #fff; text-decoration: none; font-weight: 700; font-size: 15px; }
.ix-header-logo { height: 26px; width: auto; max-width: 130px; object-fit: contain; display: block; }
.ix-header-logo-initial { font-size: 22px; font-weight: 700; text-transform: uppercase; line-height: 1; }

.ix-header-right { display: flex; align-items: center; gap: 14px; }

.ix-header-icon { display: flex; }

.ix-header-user { display: flex; align-items: center; gap: 8px; }
.ix-user-avatar {
	width: 28px; height: 28px; border-radius: 50%;
	background: #4b5563; color: #fff; font-size: 12px; font-weight: 700;
	display: flex; align-items: center; justify-content: center;
}
.ix-user-name { font-size: 13px; color: #eee; }

.ix-header-logout {
	font-size: 12px;
	color: var(--ix-header-button-text, #fff);
	text-decoration: none;
	background: var(--ix-header-button, #333a44);
	padding: 7px 14px;
	border-radius: 6px;
	border: 1px solid transparent;
}
.ix-header-logout:hover {
	background: var(--ix-header-button-hover, var(--ix-header-button, #454e5a));
	color: var(--ix-header-button-text-hover, var(--ix-header-button-text, #fff));
}

.ix-app-shell {
	display: flex;
	min-height: calc(100vh - 56px);
}

.ix-sidebar {
	width: 250px;
	flex-shrink: 0;
	background: var(--ix-sidebar-bg, #1d2026);
	color: var(--ix-sidebar-text, #cfd3da);
	padding: 18px 0;
	transition: margin-left .2s ease;
}

body.ix-sidebar-collapsed .ix-sidebar { margin-left: -250px; }

.ix-sidebar-company {
	padding: 0 18px 16px;
	/* Tono fijo a propósito, NO ligado al selector "Hover del sidebar":
	   antes ese campo controlaba a la vez el hover de los links, el fondo
	   de las pestañas cerradas del tabbar Y esta línea — un solo color
	   haciendo tres cosas distintas es confuso y difícil de calibrar bien.
	   Ahora "Hover del sidebar" SOLO controla el hover de los links. */
	border-bottom: 1px solid rgba(255,255,255,.1);
	margin-bottom: 12px;
}
.ix-sidebar-logo { max-width: 100%; max-height: 40px; margin-bottom: 8px; }
.ix-sidebar-company-name { display: block; font-weight: 700; color: var(--ix-sidebar-active-text, #fff); font-size: 14px; margin-bottom: 8px; }
.ix-sidebar-switch {
	display: inline-block;
	font-size: 12px;
	font-weight: 600;
	color: var(--ix-button2-text, var(--ix-sidebar-text, #0369a1));
	background: var(--ix-button2-bg, var(--ix-sidebar-button, #f0f9ff));
	text-decoration: none;
	margin-top: 6px;
	padding: 6px 11px;
	border-radius: 20px;
	border: var(--ix-border-width, 1px) solid var(--ix-sidebar-border, #bae6fd);
}
.ix-sidebar-switch:hover {
	color: var(--ix-button2-hover-text, var(--ix-button2-text, #075985));
	background: var(--ix-button2-hover-bg, var(--ix-sidebar-hover-bg, #e0f2fe));
	transform: translateY(calc(-1 * var(--ix-hover-lift, 1px)));
}

.ix-sidebar-nav { padding: 0 10px; }
.ix-sidebar-group { margin-bottom: 2px; }
.ix-sidebar-link {
	display: block;
	padding: 10px 12px;
	font-size: 13px;
	font-weight: 600;
	color: var(--ix-sidebar-text, #cfd3da);
	text-decoration: none;
	border-radius: 8px;
	border-left: 3px solid transparent;
}

/* HOVER: pasar el mouse por un link, sea o no el activo. Es un efecto
   pasajero — usa su propio color ("Hover del sidebar" en el formulario). */
.ix-sidebar-link:hover {
	background: var(--ix-sidebar-hover-bg, #2c303a);
	color: var(--ix-sidebar-active-text, #fff);
}

/* ACTIVO: el módulo que está realmente abierto en este momento, se esté
   o no pasando el mouse por encima. Usa su PROPIO color de fondo/texto
   ("Fondo del ítem activo" / "Texto activo" en el formulario) — antes
   compartía la misma regla que el hover, así que un módulo activo se
   veía exactamente igual que cualquier otro al pasarle el mouse por
   encima, y no había forma de distinguir cuál era el que estaba
   realmente seleccionado.
   Un módulo con submenú nunca lleva .is-active en sí mismo (el activo
   es el sublink de adentro) — pero si está "abierto" porque uno de sus
   hijos es el módulo actual, el padre se resalta igual, si no parece
   que ningún módulo estuviera seleccionado. */
.ix-sidebar-link.is-active,
.ix-sidebar-group.is-open > .ix-sidebar-link {
	background: var(--ix-sidebar-active-bg, #2c303a);
	color: var(--ix-sidebar-active-text, #fff);
	border-left-color: var(--ix-sidebar-active-accent, #6c8cff);
}
/* Si además le pasás el mouse por encima al que ya está activo, gana el
   color de activo (no queremos que "parpadee" al color de hover). */
.ix-sidebar-link.is-active:hover,
.ix-sidebar-group.is-open > .ix-sidebar-link:hover {
	background: var(--ix-sidebar-active-bg, #2c303a);
}

.ix-sidebar-submenu {
	padding-left: 14px;
	background: var(--ix-sidebar-submenu-bg, transparent);
	border-radius: 8px;
	max-height: 0;
	opacity: 0;
	overflow: hidden;
	pointer-events: none;
	transition: max-height var(--ix-animation-ms, 250ms) ease, opacity var(--ix-animation-ms, 250ms) ease;
}
.ix-sidebar-group:hover > .ix-sidebar-submenu,
.ix-sidebar-group.is-open > .ix-sidebar-submenu {
	max-height: 600px;
	opacity: 1;
	pointer-events: auto;
}
.ix-sidebar-sublink {
	display: block;
	padding: 8px 12px;
	font-size: 12.5px;
	color: var(--ix-sidebar-text, #9aa1ac);
	text-decoration: none;
	border-left: 2px solid rgba(255,255,255,.12);
	margin-left: 6px;
}
.ix-sidebar-sublink:hover {
	background: var(--ix-sidebar-hover-bg, #2c303a);
	color: var(--ix-sidebar-active-text, #fff);
}
.ix-sidebar-sublink.is-active {
	color: var(--ix-sidebar-active-text, #fff);
	border-left-color: var(--ix-sidebar-active-accent, #6c8cff);
}
.ix-sidebar-sublink.is-active:hover { background: transparent; }

.ix-main {
	flex: 1;
	min-width: 0;
	padding: 30px;
}

/* ===================== 2.2.2 MODERN PORTAL POLISH ===================== */
.ix-header-bar {
	height: 64px;
	padding: 0 22px;
	background: var(--ix-header-bg, #ffffff);
	color: var(--ix-header-text, #0f172a);
	border-bottom: var(--ix-border-width, 1px) solid var(--ix-header-border, #e2e8f0);
	box-shadow: 0 1px 3px color-mix(in srgb, var(--ix-header-shadow, #0f172a) 9%, transparent), 0 8px 28px color-mix(in srgb, var(--ix-header-shadow, #0f172a) 5%, transparent);
	backdrop-filter: blur(12px);
	animation: ixHeaderEnter var(--ix-header-animation-ms, 350ms) ease-out both;
}
.ix-sidebar-toggle:hover {
	background: var(--ix-header-hover-bg, #e0f2fe);
	color: var(--ix-header-hover-text, var(--ix-header-icon, #0369a1));
	border-color: var(--ix-header-border, #bae6fd);
	transform: translateY(calc(-1 * var(--ix-header-hover-lift, 1px)));
	box-shadow: 0 var(--ix-header-shadow-y, 5px) var(--ix-header-shadow-blur, 14px) color-mix(in srgb, var(--ix-header-shadow, #0ea5e9) var(--ix-header-shadow-opacity, 14%), transparent);
}
.ix-header-brand { color: var(--ix-header-text, #0f172a); font-size: 17px; gap: 12px; }
.ix-header-brand:hover { color: var(--ix-header-hover-text, var(--ix-header-text, #0369a1)); }
.ix-header-logo-badge {
	width: 42px; height: 42px; border-radius: var(--ix-header-control-radius, 11px); overflow: hidden;
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--ix-header-logo-bg, var(--ix-header-button, #0284c7));
	color: var(--ix-header-text, #fff); box-shadow: 0 var(--ix-shadow-y, 7px) var(--ix-shadow-blur, 18px) color-mix(in srgb, var(--ix-shadow-color, #0284c7) var(--ix-shadow-opacity, 24%), transparent);
	transition: transform .2s ease, box-shadow .2s ease;
}
.ix-header-brand:hover .ix-header-logo-badge { transform: translateY(calc(-1 * var(--ix-header-hover-lift, 1px))) scale(1.03); }
.ix-header-logo-badge svg { width: 25px; height: 25px; stroke: currentColor; }
.ix-header-logo { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: contain; /*background: #fff;*/ padding: 4px; }
.ix-header-right { gap: 9px; }
.ix-header-icon {
	position: relative; color: var(--ix-header-icon, var(--ix-header-text, #64748b)); width: 40px; height: 40px;
	align-items: center; justify-content: center; border-radius: var(--ix-header-control-radius, 11px);
	transition: color .18s ease, background .18s ease, transform .18s ease;
}
/* Los SVG del header son de trazo: sin esto el theme activo de WP puede
   forzar su propio stroke/fill y los íconos ignoran el color de la marca. */
.ix-header-icon svg { stroke: currentColor; fill: none; }
.ix-header-icon:hover { color: var(--ix-header-hover-text, var(--ix-header-icon, #0284c7)); background: var(--ix-header-hover-bg, #f0f9ff); transform: translateY(calc(-1 * var(--ix-header-hover-lift, 1px))); }
.ix-header-notifications::after {
	content: ''; position: absolute; width: 8px; height: 8px; right: 8px; top: 7px;
	border-radius: 999px;
	background: var(--ix-accent-2, var(--ix-accent, #ef4444));
	border: 2px solid var(--ix-header-bg, #fff);
}
.ix-header-user { padding: 5px 8px; border-radius: 12px; transition: background .18s ease; }
.ix-header-user:hover { background: var(--ix-header-hover-bg, #f8fafc); }
.ix-user-avatar { width: 34px; height: 34px; background: var(--ix-header-button, #0284c7); box-shadow: 0 var(--ix-shadow-y, 5px) var(--ix-shadow-blur, 13px) color-mix(in srgb, var(--ix-shadow-color, #0284c7) var(--ix-shadow-opacity, 20%), transparent); }
.ix-user-name { color: var(--ix-header-text, #334155); font-weight: 600; }
.ix-header-logout { color: var(--ix-btn1-text, #fff); background: var(--ix-btn1-bg, var(--ix-header-button, #0284c7)); padding: 9px 16px; border-radius: var(--ix-header-control-radius, 10px); box-shadow: 0 var(--ix-header-shadow-y, 5px) var(--ix-header-shadow-blur, 14px) color-mix(in srgb, var(--ix-header-shadow, #0284c7) var(--ix-header-shadow-opacity, 20%), transparent); transition: transform var(--ix-header-animation-ms, 180ms) ease, box-shadow var(--ix-header-animation-ms, 180ms) ease; }
.ix-header-logout:hover { color: var(--ix-btn1-hover-text, var(--ix-btn1-text, #fff)); background: var(--ix-btn1-hover-bg, var(--ix-btn1-bg, #0369a1)); transform: translateY(calc(-1 * var(--ix-header-hover-lift, 1px))); }

.ix-app-shell { min-height: calc(100vh - 64px); background: var(--ix-main-bg, #f8fafc); }
.ix-sidebar {
	width: 264px; padding: 18px 12px; background: var(--ix-sidebar-bg, #ffffff); color: var(--ix-sidebar-text, #475569);
	border-right: var(--ix-border-width, 1px) solid var(--ix-sidebar-border, #e2e8f0); box-shadow: 5px 0 var(--ix-shadow-blur, 24px) color-mix(in srgb, var(--ix-shadow-color, #0f172a) var(--ix-shadow-opacity, 4%), transparent);
	transition: margin-left .24s cubic-bezier(.4,0,.2,1), box-shadow .2s ease;
}
body.ix-sidebar-collapsed .ix-sidebar { margin-left: -264px; }
.ix-sidebar-company { padding: 4px 8px 17px; border-bottom: var(--ix-border-width, 1px) solid var(--ix-sidebar-border, #e2e8f0); }
.ix-sidebar-logo { max-height: 48px; border-radius: var(--ix-control-radius, 10px); background: var(--ix-sidebar-logo-bg, var(--ix-main-surface, #fff)); padding: 3px; box-shadow: 0 var(--ix-shadow-y, 3px) var(--ix-shadow-blur, 10px) color-mix(in srgb, var(--ix-shadow-color, #0f172a) var(--ix-shadow-opacity, 8%), transparent); }
.ix-sidebar-company-name { color: var(--ix-sidebar-text, #0f172a); font-size: 15px; }
.ix-sidebar-switch { color: var(--ix-btn2-text, var(--ix-sidebar-text, #0369a1)); background: var(--ix-btn2-bg, var(--ix-sidebar-button, #f0f9ff)); border: var(--ix-border-width, 1px) solid var(--ix-sidebar-border, #bae6fd); }
.ix-sidebar-switch:hover { color: var(--ix-btn2-hover-text, var(--ix-btn2-text, #075985)); background: var(--ix-btn2-hover-bg, var(--ix-sidebar-hover-bg, #e0f2fe)); transform: translateY(calc(-1 * var(--ix-hover-lift, 1px))); }
.ix-sidebar-nav { padding: 2px 0; }
.ix-sidebar-group { margin-bottom: 5px; animation: ixMenuEnter var(--ix-animation-ms, 320ms) ease-out both; }
.ix-sidebar-link {
	display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 12px;
	font-size: 14px; color: var(--ix-sidebar-text, #475569); border: 0; border-radius: var(--ix-control-radius, 11px);
	transition: color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.ix-sidebar-link:hover { color: var(--ix-sidebar-hover-text, var(--ix-sidebar-active-text, #0369a1)); background: var(--ix-sidebar-hover-bg, #f0f9ff); transform: translateX(var(--ix-hover-lift, 2px)); }
.ix-sidebar-link.is-active,
.ix-sidebar-group.is-open > .ix-sidebar-link { color: var(--ix-sidebar-active-text, #0369a1); background: var(--ix-sidebar-active-bg, #e0f2fe); box-shadow: inset var(--ix-bevel-width, 0) var(--ix-bevel-width, 0) 0 var(--ix-bevel-color, transparent); }
.ix-sidebar-link.is-active:hover,
.ix-sidebar-group.is-open > .ix-sidebar-link:hover { background: var(--ix-sidebar-active-bg, #e0f2fe); }
.ix-sidebar-link-icon { width: 22px; height: 22px; flex: 0 0 22px; display: inline-flex; align-items: center; justify-content: center; color: var(--ix-sidebar-icon, var(--ix-sidebar-text, #64748b)); }
/* stroke/fill explícitos: los SVG del menú heredan el color de la marca y
   no el que pueda imponer el theme de WordPress. */
.ix-sidebar-link-icon svg { width: 21px; height: 21px; stroke: currentColor; fill: none; }
.ix-sidebar-link-icon svg * { stroke: currentColor; }
/* Transición propia para que el ícono acompañe el cambio de color del link. */
.ix-sidebar-link-icon { transition: color .18s ease; }
.ix-sidebar-link:hover .ix-sidebar-link-icon { color: var(--ix-sidebar-icon-hover, var(--ix-sidebar-hover-text, #0284c7)); }
.ix-sidebar-link.is-active .ix-sidebar-link-icon,
.ix-sidebar-group.is-open > .ix-sidebar-link .ix-sidebar-link-icon { color: var(--ix-sidebar-active-icon, var(--ix-sidebar-active-text, #0284c7)); }
.ix-sidebar-sublink { color: var(--ix-sidebar-text, #64748b); border-left-color: var(--ix-sidebar-border, #dbeafe); border-radius: 0 var(--ix-control-radius, 8px) var(--ix-control-radius, 8px) 0; }
.ix-sidebar-sublink:hover { color: var(--ix-sidebar-hover-text, #0369a1); background: var(--ix-sidebar-hover-bg, #f8fafc); }
.ix-sidebar-sublink.is-active { color: var(--ix-sidebar-active-text, #0369a1); border-left-color: var(--ix-sidebar-active-accent, #0ea5e9); font-weight: 600; }
.ix-main { padding: 32px; color: var(--ix-main-text, #0f172a); background: var(--ix-main-bg, #f8fafc); animation: ixContentEnter var(--ix-animation-ms, 340ms) ease-out both; }
.ix-panel, .ix-playbook-card, .ix-process-block { color: var(--ix-main-text, #0f172a); background: var(--ix-main-surface, #fff); border: var(--ix-border-width, 1px) solid var(--ix-main-border, #e2e8f0); border-radius: var(--ix-card-radius, 14px); box-shadow: 0 var(--ix-shadow-y, 12px) var(--ix-shadow-blur, 30px) color-mix(in srgb, var(--ix-shadow-color, #0f172a) var(--ix-shadow-opacity, 8%), transparent), inset 0 0 0 var(--ix-bevel-width, 0) var(--ix-bevel-color, transparent); }
.ix-panel { padding: var(--ix-card-padding, 20px); }
.ix-playbook-card { transition: transform var(--ix-animation-ms, 200ms) ease, box-shadow var(--ix-animation-ms, 200ms) ease, border-color var(--ix-animation-ms, 200ms) ease; }
.ix-playbook-card:hover { transform: translateY(calc(-1 * var(--ix-hover-lift, 3px))); border-color: var(--ix-main-hover-border, var(--ix-main-accent, #0ea5e9)); background: var(--ix-main-hover-bg, var(--ix-main-surface, #fff)); }

/* Re-theme Tailwind utility markup inside module templates. */
.ix-main .bg-white, .ix-main .bg-gray-50 { background-color: var(--ix-main-surface, #fff) !important; }
.ix-main .text-gray-900, .ix-main .text-gray-800, .ix-main .text-gray-700 { color: var(--ix-main-text, #0f172a) !important; }
.ix-main .text-gray-600, .ix-main .text-gray-500, .ix-main .text-gray-400 { color: var(--ix-main-muted, #64748b) !important; }
.ix-main .border-gray-100, .ix-main .border-gray-200, .ix-main .border-gray-300 { border-color: var(--ix-main-border, #e2e8f0) !important; }
.ix-main .bg-blue-600, .ix-main .bg-primary-600, .ix-main .button-primary, .ix-main button[type="submit"] { background: var(--ix-main-button-bg, #0284c7) !important; color: var(--ix-main-button-text, #fff) !important; border-radius: var(--ix-control-radius, 10px) !important; }
.ix-main .bg-blue-600:hover, .ix-main .bg-primary-600:hover, .ix-main .button-primary:hover, .ix-main button[type="submit"]:hover { background: var(--ix-main-button-hover-bg, var(--ix-main-button-bg, #0369a1)) !important; color: var(--ix-main-button-hover-text, var(--ix-main-button-text, #fff)) !important; transform: translateY(calc(-1 * var(--ix-hover-lift, 1px))); }
.ix-main input:focus, .ix-main select:focus, .ix-main textarea:focus { border-color: var(--ix-main-accent, #0ea5e9) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--ix-main-accent, #0ea5e9) 20%, transparent) !important; }
.ix-main .is-active, .ix-main [aria-selected="true"] { background: var(--ix-main-active-bg, #e0f2fe) !important; color: var(--ix-main-active-text, #0369a1) !important; }
.ix-main table tbody tr:hover { background: var(--ix-main-hover-bg, #f8fafc) !important; }
.ix-main .ix-playbook-actions a { border-radius: var(--ix-control-radius, 10px); border-color: var(--ix-main-border, #e2e8f0); }
.ix-main .ix-playbook-actions a:hover { border-color: var(--ix-main-hover-border, var(--ix-main-accent, #0ea5e9)); transform: translateY(calc(-1 * var(--ix-hover-lift, 1px))); }
.ix-panel-tab-favicon { width: 18px; height: 18px; border-radius: calc(var(--ix-control-radius, 8px) / 2); object-fit: contain; }
.ix-tab-icon svg { width: 18px; height: 18px; }

@keyframes ixHeaderEnter { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes ixMenuEnter { from { opacity: 0; transform: translateX(-7px); } to { opacity: 1; transform: none; } }
@keyframes ixContentEnter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
	.ix-header-bar, .ix-sidebar-group, .ix-main { animation: none; }
	.ix-sidebar-link, .ix-playbook-card, .ix-header-icon, .ix-header-logo-badge { transition: none; }
}

@media (max-width: 782px) {
	.ix-sidebar { position: fixed; top: 64px; bottom: 0; left: 0; z-index: 90; margin-left: -264px; }
	body:not(.ix-sidebar-collapsed) .ix-sidebar { margin-left: 0; box-shadow: 2px 0 12px rgba(0,0,0,.2); }
	.ix-main { padding: 18px; }
}

/* ===================== PLAYBOOKS ===================== */

.ix-playbook-view-switch {
	display: flex;
	gap: 6px;
	margin-bottom: 18px;
	border-bottom: var(--ix-border-width, 1px) solid var(--ix-main-border, #e2e2e2);
	padding-bottom: 12px;
}
.ix-playbook-view-switch a {
	padding: 7px 16px;
	border-radius: var(--ix-control-radius, 8px);
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	color: var(--ix-main-muted, #555);
	transition: background var(--ix-animation-ms, 200ms) ease, color var(--ix-animation-ms, 200ms) ease;
}
/* BUG FIX: antes .ix-playbook-view-switch a no tenía :hover/:focus/:visited
   propios, así que en esos estados el link caía al estilo genérico del
   tema de WordPress (azul de link de sistema) en vez de usar la paleta
   de la compañía. Ahora todos los estados usan las variables del tema. */
.ix-playbook-view-switch a:visited {
	color: var(--ix-main-muted, #555);
}
.ix-playbook-view-switch a:hover,
.ix-playbook-view-switch a:focus-visible {
	color: var(--ix-main-text, var(--ix-main-accent, #1d1d1f));
	background: var(--ix-main-hover-bg, #f0f1f3);
}
.ix-playbook-view-switch a:active {
	background: var(--ix-main-active-bg, var(--ix-main-hover-bg, #e8e9eb));
	color: var(--ix-main-active-text, var(--ix-main-text, #1d1d1f));
}
.ix-playbook-view-switch a.is-active {
	background: var(--ix-main-active-bg, var(--ix-button1-bg, #1d1d1f));
	color: var(--ix-main-active-text, var(--ix-button1-text, #fff));
}
.ix-playbook-view-switch a.is-active:visited {
	color: var(--ix-main-active-text, var(--ix-button1-text, #fff));
}
.ix-playbook-view-switch a.is-active:hover,
.ix-playbook-view-switch a.is-active:focus-visible {
	background: var(--ix-button1-bg-hover, var(--ix-main-active-bg, var(--ix-button1-bg, #1d1d1f)));
	color: var(--ix-button1-text-hover, var(--ix-main-active-text, var(--ix-button1-text, #fff)));
}
.ix-playbook-view-switch a.is-active:active {
	background: var(--ix-button1-bg-hover, var(--ix-button1-bg, #1d1d1f));
	color: var(--ix-button1-text-hover, var(--ix-button1-text, #fff));
}
.ix-playbook-view-switch a:focus-visible {
	outline: 2px solid var(--ix-main-accent, var(--ix-button1-bg, #0284c7));
	outline-offset: 2px;
}

.ix-process-block {
	margin-bottom: 32px;
	/* Más padding por defecto: antes el fallback era 0 y el bloque de
	   proceso quedaba pegado al borde cuando la compañía no configuraba
	   --ix-process-padding a mano. */
	padding: var(--ix-process-padding, 20px);
	box-shadow: 0 var(--ix-process-shadow-y, 12px) var(--ix-process-shadow-blur, 30px) color-mix(in srgb, var(--ix-shadow-color, #0f172a) var(--ix-process-shadow-opacity, 8%), transparent), inset 0 0 0 var(--ix-bevel-width, 0) var(--ix-bevel-color, transparent);
}
.ix-process-title {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 16px;
	margin-bottom: 12px;
	padding-bottom: 8px;
	border-bottom: max(2px, var(--ix-border-width, 1px)) solid var(--ix-main-accent, var(--ix-button1-bg, #1d1d1f));
}
.ix-process-count {
	font-size: 11.5px;
	font-weight: 600;
	color: var(--ix-main-muted, #888);
	background: var(--ix-main-hover-bg, #f0f1f3);
	padding: 3px 10px;
	border-radius: 999px;
}

.ix-playbook-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 20px;
}
.ix-playbook-filters a {
	padding: 6px 14px;
	border-radius: 999px;
	background: var(--ix-main-surface, #fff);
	border: var(--ix-border-width, 1px) solid var(--ix-main-border, #ddd);
	font-size: 12.5px;
	text-decoration: none;
	color: var(--ix-main-text, #444);
}
.ix-playbook-filters a.is-active {
	background: var(--ix-main-active-bg, var(--ix-button1-bg, #1d1d1f));
	color: var(--ix-main-active-text, var(--ix-button1-text, #fff));
	border-color: var(--ix-main-accent, var(--ix-button1-bg, #1d1d1f));
}
.ix-playbook-filters a.is-active:hover {
	background: var(--ix-button1-bg-hover, var(--ix-button1-bg, #1d1d1f));
	color: var(--ix-button1-text-hover, var(--ix-button1-text, #fff));
	border-color: var(--ix-button1-bg-hover, var(--ix-button1-bg, #1d1d1f));
}

.ix-playbook-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 16px;
}
.ix-playbook-card {
	background: var(--ix-main-surface, #fff);
	border: var(--ix-border-width, 1px) solid var(--ix-main-border, #e2e2e2);
	border-radius: var(--ix-card-radius, 10px);
	/* Más padding por defecto (antes 12px, se sentía apretado). */
	padding: var(--ix-playbook-padding, 20px);
	box-shadow: 0 var(--ix-playbook-shadow-y, 8px) var(--ix-playbook-shadow-blur, 22px) color-mix(in srgb, var(--ix-shadow-color, #0f172a) var(--ix-playbook-shadow-opacity, 10%), transparent), inset 0 0 0 var(--ix-bevel-width, 0) var(--ix-bevel-color, transparent);
}
.ix-playbook-card h3 { margin: 0 0 8px; font-size: 15px; }
.ix-playbook-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.ix-playbook-tags span {
	font-size: 11px;
	padding: 3px 8px;
	background: var(--ix-main-hover-bg, #f0f1f3);
	border-radius: 999px;
	color: var(--ix-main-muted, #555);
}
.ix-playbook-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ix-playbook-actions a {
	font-size: 12.5px;
	padding: 8px 14px;
	border-radius: var(--ix-control-radius, 6px);
	text-decoration: none;
}
.ix-playbook-actions a:not(.button-primary) {
	background: var(--ix-button2-bg, #fff);
	color: var(--ix-button2-text, #333);
	border: 1px solid var(--ix-button2-bg, #ccc);
}
.ix-playbook-actions a:not(.button-primary):hover {
	background: var(--ix-button2-bg-hover, var(--ix-button2-bg, #f0f1f3));
	color: var(--ix-button2-text-hover, var(--ix-button2-text, #1d1d1f));
	border-color: var(--ix-button2-bg-hover, var(--ix-button2-bg, #ccc));
}
.ix-playbook-actions a.button-primary {
	background: var(--ix-button1-bg, #1d1d1f);
	color: var(--ix-button1-text, #fff);
	border: 1px solid var(--ix-button1-bg, #1d1d1f);
}
.ix-playbook-actions a.button-primary:hover {
	background: var(--ix-button1-bg-hover, var(--ix-button1-bg, #1d1d1f));
	color: var(--ix-button1-text-hover, var(--ix-button1-text, #fff));
	border-color: var(--ix-button1-bg-hover, var(--ix-button1-bg, #1d1d1f));
}

/* ===================== LOGIN MODAL ===================== */

.ix-login-modal-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.5);
	z-index: 1000;
	align-items: center;
	justify-content: center;
}
.ix-login-modal-overlay.is-open { display: flex; }
.ix-login-modal-box {
	position: relative;
	max-width: 380px;
	width: 92%;
}
.ix-login-modal-box .ix-login-wrap { margin: 0; }
.ix-login-modal-close {
	position: absolute;
	top: -14px;
	right: -14px;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: #fff;
	border: 1px solid #ddd;
	cursor: pointer;
	font-size: 16px;
	line-height: 1;
}
.ix-login-trigger {
	padding: 10px 18px;
	border-radius: 6px;
	background: #1d1d1f;
	color: #fff;
	border: 0;
	cursor: pointer;
	font-weight: 600;
	text-decoration: none;
	display: inline-block;
}

/* Página bare de login para popup externo (window.open) */
body.ix-popup-body {
	margin: 0;
	background: #f5f6f8;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
}
.ix-popup-brand { text-align: center; margin-bottom: 18px; }
.ix-popup-brand img,
.ix-popup-logo {
	display: block;
	margin: 0 auto;
	max-height: 80px;
	max-width: 220px;
	border-radius: var(--ix-control-radius, 12px);
}
.ix-popup-brand span { display: block; font-weight: 700; font-size: 16px; margin-top: 8px; }

/* ===================== PESTAÑAS ANCLADAS (IXDesktop) ===================== */

.ix-tabbar {
	position: sticky;
	top: 56px; /* justo debajo del header, que también es sticky */
	z-index: 90;
	display: flex;
	align-items: flex-end;
	gap: 2px;
	padding: 8px 12px 0;
	background: var(--ix-tabbar-bg, var(--ix-sidebar-bg, #e7e9ed));
	border-bottom: none;
	overflow-x: auto;
	scrollbar-width: thin;
}

.ix-tab {
	display: flex;
	align-items: center;
	gap: 7px;
	max-width: none;
	padding: 9px 12px;
	/* Tono fijo, NO ligado a "Hover del sidebar" (ver nota en
	   .ix-sidebar-company más arriba: ese campo ahora es solo para el
	   hover de los links del sidebar). El tabbar en sí ya toma el color
	   del sidebar arriba; cada pestaña individual usa un tono neutro para
	   no depender de un campo que en teoría es para otra cosa. */
	background: #d9dce1;
	color: #4b4f58;
	border: 1px solid #c9cdd4;
	border-bottom: none;
	border-radius: 8px 8px 0 0;
	font-size: 12.5px;
	font-weight: 600;
	cursor: pointer;
	flex-shrink: 0;
	transition: background .12s ease, color .12s ease;
}
/* El hover de las tabs (cerradas, sin seleccionar) toma el Botón 1 —
   mismo acento que el resto de "acciones principales" del panel. */
.ix-tab:not(.is-active):hover {
	background: var(--ix-button1-bg-hover, var(--ix-button1-bg, #6c8cff));
	color: var(--ix-button1-text-hover, var(--ix-button1-text, #fff));
}

/* La pestaña ACTIVA (abierta, siendo leída) y el fondo del contenido
   quedan a propósito FUERA del theming: este tono claro específico es
   el que mejor funciona para lectura prolongada, así que no cambia
   aunque la marca tenga un esquema de colores oscuro/de otro tono. */
.ix-tab.is-active {
	background: #f5f6f8;
	color: #1d1d1f;
	border-color: #d2d5db;
	position: relative;
}

/* La pestaña "Panel" (la de inicio, siempre presente) es la excepción:
   cuando está activa, toma los mismos colores que el ítem activo del
   sidebar — visualmente "combina" con el menú en vez de quedar con el
   tono neutro de lectura que usan las pestañas de playbooks. */
#ix-tab-btn-panel.is-active {
	background: var(--ix-panel-tab-bg, var(--ix-sidebar-active-bg, #2c303a));
	color: var(--ix-panel-tab-text, var(--ix-sidebar-active-text, #ffffff));
	border-color: transparent;
}

.ix-tab-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}
.ix-tab-icon svg { display: block; width: 18px; height: 18px; }
.ix-panel-tab-favicon { width: 18px; height: 18px; border-radius: calc(var(--ix-control-radius, 8px) / 2); object-fit: contain; }

.ix-tab-label {
	white-space: nowrap;
	overflow: visible;
	text-overflow: clip;
}

.ix-tab-close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	border-radius: 4px;
	font-size: 13px;
	line-height: 1;
	color: #80838c;
	flex-shrink: 0;
}
.ix-tab-close:hover { background: rgba(0,0,0,.08); color: #1d1d1f; }
#ix-tab-btn-panel .ix-tab-close { display: none; } /* la pestaña Panel no se cierra */

.ix-tab-content { background: #f5f6f8; }

.ix-tab-pane { display: none; }
.ix-tab-pane.is-active { display: block; }

/* Los panes de playbooks (no el de "Panel") ocupan toda la altura visible
   y muestran el HTML/PDF en un iframe a pantalla completa dentro del pane. */
.ix-tab-pane:not(#ix-tab-pane-panel) {
	height: calc(100vh - 56px - 45px); /* header + tabbar */
	position: relative;
}
.ix-tab-pane:not(#ix-tab-pane-panel) iframe {
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}
.ix-tab-loading {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12.5px;
	color: #888;
	background: #fff;
}

/* Company-aware tab theme. Defaults are resolved by IX_Branding. */
.ix-tabbar {
	top: 64px;
	/* Menos aire vertical: las pestañas quedaban muy separadas del header. */
	padding: 4px 12px 0;
	background: var(--ix-tabbar-bg, var(--ix-header-bg, #e7e9ed));
	color: var(--ix-tabbar-text, var(--ix-header-text, #ffffff));
}
/* Pestaña INACTIVA: fondo propio + opacidad, para que se distinga de la
   activa incluso cuando la compañía usa un solo tono en el tab bar. */
.ix-tab {
	padding: 7px 11px;
	background: var(--ix-tab-inactive-bg, var(--ix-main-hover-bg, #eef2f7));
	color: var(--ix-tab-inactive-text, var(--ix-main-text, #4b4f58));
	border: var(--ix-border-width, 1px) solid var(--ix-tabbar-border, var(--ix-main-border, #c9cdd4));
	border-bottom: none;
	border-radius: var(--ix-control-radius, 8px) var(--ix-control-radius, 8px) 0 0;
	opacity: .72;
}
.ix-tab:not(.is-active):hover { opacity: 1; }
/* Pestaña ACTIVA: mismo fondo que el contenido, sin transparencia, y con un
   filo superior de acento — se lee claramente como "la que estoy viendo". */
.ix-tab.is-active {
	background: var(--ix-tab-active-bg, var(--ix-main-surface, #f5f6f8));
	color: var(--ix-tab-active-text, var(--ix-main-text, #1d1d1f));
	border-color: var(--ix-main-border, #d2d5db);
	box-shadow: inset 0 2px 0 0 var(--ix-accent, var(--ix-button1-bg, transparent));
	opacity: 1;
}
#ix-tab-btn-panel.is-active {
	background: var(--ix-panel-tab-bg, var(--ix-sidebar-active-bg, #2c303a));
	color: var(--ix-panel-tab-text, var(--ix-sidebar-active-text, #ffffff));
}
.ix-tab-close { color: currentColor; opacity: .65; }
.ix-tab-close:hover {
	background: var(--ix-main-hover-bg, rgba(0,0,0,.08));
	color: currentColor;
	opacity: 1;
}
.ix-tab-content { background: var(--ix-main-bg, #f5f6f8); }
.ix-tab-pane:not(#ix-tab-pane-panel) { height: calc(100vh - 64px - 45px); }

@media (max-width: 782px) {
	.ix-tabbar { top: 56px; padding: 6px 8px 0; }
	.ix-tab { max-width: 150px; padding: 8px 9px; }
	.ix-tab-pane:not(#ix-tab-pane-panel) { height: calc(100vh - 56px - 41px); }
}


/* ===================== VISTA PROTEGIDA DE DOCUMENTOS ===================== */
/* Facturas y contratos se muestran embebidos con la barra nativa del visor
   de PDF oculta (#toolbar=0), así que no hay botón de descarga del navegador.
   Esta barra propia deja solo Imprimir. */
.ix-tab-pane--doc { display: none; }
.ix-tab-pane--doc.is-active { display: flex; flex-direction: column; }

.ix-doc-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-shrink: 0;
	padding: 6px 12px;
	background: var(--ix-main-surface, #fff);
	border-bottom: var(--ix-border-width, 1px) solid var(--ix-main-border, #e3e6ec);
	color: var(--ix-main-text, #1d1d1f);
}
.ix-doc-toolbar-label {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .02em;
	color: var(--ix-main-muted, #7b8090);
	text-transform: uppercase;
}
.ix-doc-print {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	font-size: 12.5px;
	font-weight: 600;
	cursor: pointer;
	border: var(--ix-border-width, 1px) solid transparent;
	border-radius: var(--ix-control-radius, 8px);
	background: var(--ix-button1-bg, #2563eb);
	color: var(--ix-button1-text, #fff);
}
.ix-doc-print:hover {
	background: var(--ix-button1-bg-hover, var(--ix-button1-bg, #1d4ed8));
	color: var(--ix-button1-text-hover, var(--ix-button1-text, #fff));
}
.ix-doc-print svg { width: 15px; height: 15px; }
.ix-tab-pane--doc iframe { flex: 1 1 auto; min-height: 0; }

/* ===================== WIDGET DE AYUDA / BOT ===================== */
#ix-help-button {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 9999;
	width: 56px;
	height: 56px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	background: var(--ix-button1-bg, #0284c7);
	color: var(--ix-button1-text, #fff);
	box-shadow: 0 6px 20px color-mix(in srgb, var(--ix-button1-bg, #0284c7) 45%, transparent), 0 2px 8px rgba(0,0,0,.12);
	transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
#ix-help-button:hover {
	transform: translateY(-2px) scale(1.05);
	box-shadow: 0 10px 26px color-mix(in srgb, var(--ix-button1-bg, #0284c7) 55%, transparent), 0 4px 12px rgba(0,0,0,.15);
	background: var(--ix-button1-bg-hover, var(--ix-button1-bg, #0284c7));
}
#ix-help-button svg { width: 26px; height: 26px; }

#ix-help-chat {
	position: fixed;
	bottom: 92px;
	right: 24px;
	z-index: 9999;
	display: flex;
	flex-direction: column;
	width: 384px;
	max-width: calc(100vw - 3rem);
	overflow: hidden;
	background: var(--ix-main-surface, #fff);
	border: var(--ix-border-width, 1px) solid var(--ix-main-border, #e2e8f0);
	border-radius: var(--ix-card-radius, 18px);
	box-shadow: 0 20px 50px color-mix(in srgb, var(--ix-shadow-color, #0f172a) 22%, transparent), 0 6px 18px color-mix(in srgb, var(--ix-shadow-color, #0f172a) 10%, transparent);
	transform-origin: bottom right;
	transition: opacity .25s ease, transform .25s cubic-bezier(.4,0,.2,1), visibility .25s ease;
}
#ix-help-chat:not(.hidden) {
	opacity: 1;
	transform: scale(1);
	visibility: visible;
}
#ix-help-chat.hidden {
	opacity: 0;
	transform: scale(.96);
	visibility: hidden;
	pointer-events: none;
}

#ix-help-chat .bg-primary-600,
#ix-help-chat-header {
	background: var(--ix-button1-bg, #0284c7);
	color: var(--ix-button1-text, #fff);
}
#ix-help-chat-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 18px;
}
#ix-help-chat-header h3 { margin: 0; font-size: 15px; font-weight: 600; }
#ix-help-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	background: transparent;
	border: none;
	color: inherit;
	cursor: pointer;
	border-radius: 8px;
	transition: background .15s ease;
}
#ix-help-close:hover { background: rgba(255,255,255,.18); }
#ix-help-close svg { width: 18px; height: 18px; }

#ix-help-messages {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-height: 320px;
	max-height: 320px;
	padding: 16px;
	overflow-y: auto;
	background: var(--ix-main-bg, #f8fafc);
}
#ix-help-messages > div { display: flex; align-items: flex-start; width: 100%; }
#ix-help-messages > div.justify-end { justify-content: flex-end; }
#ix-help-messages > div > div:first-child {
	flex-shrink: 0;
	width: 34px;
	height: 34px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	overflow: hidden;
	background-color: #e0f2fe;
	color: #0284c7;
}
#ix-help-messages > div.justify-end > div:first-child {
	background-color: #0284c7;
	color: #fff;
}
#ix-help-messages > div > div:nth-child(2) {
	max-width: 78%;
	padding: 10px 14px;
	font-size: 14px;
	line-height: 1.45;
	border-radius: 16px;
	box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
#ix-help-messages > div:not(.justify-end) > div:nth-child(2) {
	margin-left: 10px;
	background: var(--ix-main-surface, #fff);
	color: var(--ix-main-text, #0f172a);
	border-bottom-left-radius: 4px;
}
#ix-help-messages > div.justify-end > div:nth-child(2) {
	margin-right: 10px;
	background: var(--ix-button1-bg, #0284c7);
	color: var(--ix-button1-text, #fff);
	border-bottom-right-radius: 4px;
}

#ix-help-messages > div > div:first-child svg { width: 20px; height: 20px; }

#ix-help-quick-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 12px 16px;
	background: var(--ix-main-surface, #fff);
	border-top: var(--ix-border-width, 1px) solid var(--ix-main-border, #e2e8f0);
}
#ix-help-quick-actions button {
	padding: 6px 12px;
	font-size: 12.5px;
	font-weight: 500;
	line-height: 1.3;
	cursor: pointer;
	border: var(--ix-border-width, 1px) solid #e2e8f0;
	border-radius: 999px;
	background: #f0f9ff;
	color: #0369a1;
	transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
#ix-help-quick-actions button:hover {
	background: #0284c7;
	color: #fff;
	border-color: #0284c7;
	transform: translateY(-1px);
}

#ix-help-chat .border-t {
	border-color: var(--ix-main-border, #e2e8f0);
}
#ix-help-chat .border-t > .flex {
	display: flex;
	gap: 10px;
	padding: 14px 16px;
	background: var(--ix-main-surface, #fff);
}
#ix-help-input {
	flex: 1 1 auto;
	padding: 10px 14px;
	font-size: 14px;
	border: var(--ix-border-width, 1px) solid var(--ix-main-border, #e2e8f0);
	border-radius: var(--ix-control-radius, 12px);
	background: var(--ix-main-bg, #f8fafc);
	color: var(--ix-main-text, #0f172a);
	outline: none;
	transition: border-color .15s ease, box-shadow .15s ease;
}
#ix-help-input:focus {
	border-color: var(--ix-button1-bg, #0284c7);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--ix-button1-bg, #0284c7) 20%, transparent);
}
#ix-help-send {
	padding: 10px 18px;
	font-size: 14px;
	font-weight: 600;
	border: none;
	border-radius: var(--ix-control-radius, 12px);
	background: var(--ix-button1-bg, #0284c7);
	color: var(--ix-button1-text, #fff);
	cursor: pointer;
	transition: background .15s ease, transform .15s ease;
}
#ix-help-send:hover {
	background: var(--ix-button1-bg-hover, var(--ix-button1-bg, #0369a1));
	transform: translateY(-1px);
}

@media (max-width: 640px) {
	#ix-help-chat {
		right: 12px;
		left: 12px;
		bottom: 84px;
		width: auto;
		max-width: none;
	}
	#ix-help-button {
		bottom: 16px;
		right: 16px;
	}
}