/* ==========================================================================
   Cierres24 · Tema del home y el backoffice: nocturno (por defecto) y diurno
   Se carga después de Bootstrap y de app.css: redefine sus variables.
   Todos los colores salen de las variables --c24-*; cada modo define las suyas.
   ========================================================================== */

/* --- Modo nocturno (el de siempre y el predeterminado) ------------------ */
:root,
[data-bs-theme="dark"] {
  --c24-fondo: #03120f;
  --c24-fondo-luz-1: rgba(0, 180, 116, .12);
  --c24-fondo-luz-2: rgba(0, 160, 105, .08);
  --c24-panel: #071f19;
  --c24-panel-2: #0c2b23;
  --c24-verde: #39efb0;
  --c24-verde-2: #14b982;
  --c24-verde-hover: #6af5c4;
  --c24-boton: #39efb0;
  --c24-sobre-verde: #03120f;
  --c24-texto: #f3fff9;
  --c24-enfasis: #ffffff;
  --c24-suave: #a6c0b6;
  --c24-suave-2: #c2d4cc;
  --c24-tenue: #8aa89c;
  --c24-linea: rgba(92, 255, 195, .18);
  --c24-linea-fuerte: rgba(92, 255, 195, .32);
  --c24-ambar: #f5b544;
  --c24-tinte: rgba(57, 239, 176, .12);
  --c24-tinte-fuerte: rgba(57, 239, 176, .14);
  --c24-tinte-suave: rgba(57, 239, 176, .06);
  --c24-sidebar: #051915;
  --c24-sidebar-texto: #c9ddd5;
  --c24-topbar: rgba(3, 18, 15, .82);
  --c24-vidrio: rgba(5, 31, 23, .78);
  --c24-composer: rgba(2, 17, 13, .76);
  --c24-composer-borde: rgba(115, 255, 207, .24);
  --c24-boton-suave: rgba(4, 22, 16, .52);
  --c24-paso: rgba(7, 31, 25, .7);
  --c24-eyebrow: #79dcb5;
  --c24-fila: rgba(243, 255, 249, .16);
  --c24-num-borde: #5d7d72;
  --c24-esfera: 108, 255, 208;
  --c24-brillo: #00f7a8;
  --c24-brillo-opacidad: .12;
  --c24-sombra-modal: rgba(0, 0, 0, .55);
  --c24-hero-fondo: linear-gradient(135deg, #0c2b23, #051915);
  --c24-icono-fondo: linear-gradient(145deg, rgba(20, 132, 88, .3), rgba(3, 27, 19, .7));
  --crm-sombra: 0 0 0 1px rgba(92, 255, 195, .06), 0 12px 32px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

/* --- Modo diurno ------------------------------------------------------------- */
[data-bs-theme="light"] {
  --c24-fondo: #f3f7f5;
  --c24-fondo-luz-1: rgba(20, 185, 130, .10);
  --c24-fondo-luz-2: rgba(20, 185, 130, .06);
  --c24-panel: #ffffff;
  --c24-panel-2: #eaf2ee;
  --c24-verde: #0a8a5d;
  --c24-verde-2: #14b982;
  --c24-verde-hover: #08734d;
  --c24-boton: #0a8a5d;
  --c24-sobre-verde: #ffffff;
  --c24-texto: #10221c;
  --c24-enfasis: #000000;
  --c24-suave: #4d665d;
  --c24-suave-2: #3d544b;
  --c24-tenue: #6f857c;
  --c24-linea: rgba(10, 90, 62, .13);
  --c24-linea-fuerte: rgba(10, 90, 62, .24);
  --c24-ambar: #a8650a;
  --c24-tinte: rgba(10, 138, 93, .10);
  --c24-tinte-fuerte: rgba(10, 138, 93, .12);
  --c24-tinte-suave: rgba(10, 138, 93, .05);
  --c24-sidebar: #ffffff;
  --c24-sidebar-texto: #2f463d;
  --c24-topbar: rgba(255, 255, 255, .86);
  --c24-vidrio: rgba(255, 255, 255, .88);
  --c24-composer: #ffffff;
  --c24-composer-borde: rgba(10, 90, 62, .2);
  --c24-boton-suave: #ffffff;
  --c24-paso: #ffffff;
  --c24-eyebrow: #0a8a5d;
  --c24-fila: rgba(16, 34, 28, .10);
  --c24-num-borde: #9fb3ab;
  --c24-esfera: 10, 138, 93;
  --c24-brillo: #14b982;
  --c24-brillo-opacidad: .14;
  --c24-sombra-modal: rgba(16, 34, 28, .2);
  --c24-hero-fondo: linear-gradient(135deg, #dff2ea, #ffffff);
  --c24-icono-fondo: linear-gradient(145deg, rgba(20, 185, 130, .18), rgba(20, 185, 130, .04));
  --crm-sombra: 0 1px 2px rgba(16, 34, 28, .06), 0 10px 28px rgba(16, 34, 28, .06);
  /* En claro el verde de marca se oscurece para leerse bien sobre blanco. */
  --crm-primario: #0a8a5d;
  --bs-primary: #0a8a5d;
  --bs-primary-rgb: 10, 138, 93;
  --bs-link-color-rgb: 10, 138, 93;
  color-scheme: light;
}

/* --- Bootstrap toma los colores del modo activo ------------------------------ */
:root,
[data-bs-theme="dark"],
[data-bs-theme="light"] {
  --bs-body-bg: var(--c24-fondo);
  --bs-body-color: var(--c24-texto);
  --bs-emphasis-color: var(--c24-enfasis);
  --bs-secondary-color: var(--c24-suave);
  --bs-secondary-bg: var(--c24-panel);
  --bs-tertiary-bg: var(--c24-panel-2);
  --bs-border-color: var(--c24-linea);
  --bs-border-color-translucent: var(--c24-linea);
  --bs-heading-color: var(--c24-texto);
  --bs-link-color: var(--c24-verde);
  --bs-link-hover-color: var(--c24-verde-hover);
  --bs-primary-text-emphasis: var(--c24-verde);
  --bs-primary-bg-subtle: var(--c24-tinte);
  --bs-primary-border-subtle: var(--c24-linea-fuerte);
  --crm-fondo: var(--c24-fondo);
}

body {
  background:
    radial-gradient(ellipse at 70% -10%, var(--c24-fondo-luz-1), transparent 45%),
    radial-gradient(ellipse at 10% 110%, var(--c24-fondo-luz-2), transparent 40%),
    var(--c24-fondo);
  background-attachment: fixed;
  color: var(--c24-texto);
}

/* Cambio de modo suave (sin animar al cargar la página) */
html.c24-transicion body, html.c24-transicion .crm-sidebar, html.c24-transicion .crm-topbar,
html.c24-transicion .card, html.c24-transicion .c24-panel {
  transition: background-color .35s ease, color .35s ease, border-color .35s ease;
}

/* --- Botones, formularios y tarjetas ------------------------------------ */
.btn-primary {
  --bs-btn-color: var(--c24-sobre-verde); --bs-btn-bg: var(--c24-boton); --bs-btn-border-color: var(--c24-boton);
  --bs-btn-hover-color: var(--c24-sobre-verde); --bs-btn-hover-bg: var(--c24-verde-hover); --bs-btn-hover-border-color: var(--c24-verde-hover);
  --bs-btn-active-color: var(--c24-sobre-verde); --bs-btn-active-bg: var(--c24-verde-2); --bs-btn-active-border-color: var(--c24-verde-2);
  --bs-btn-disabled-color: var(--c24-sobre-verde); --bs-btn-disabled-bg: var(--c24-boton); --bs-btn-disabled-border-color: var(--c24-boton);
  font-weight: 700;
}
.btn-outline-primary {
  --bs-btn-color: var(--c24-verde); --bs-btn-border-color: var(--c24-linea-fuerte);
  --bs-btn-hover-color: var(--c24-sobre-verde); --bs-btn-hover-bg: var(--c24-boton); --bs-btn-hover-border-color: var(--c24-boton);
  --bs-btn-active-color: var(--c24-sobre-verde); --bs-btn-active-bg: var(--c24-boton);
}
.btn-outline-secondary { --bs-btn-color: var(--c24-texto); --bs-btn-border-color: var(--c24-linea-fuerte); --bs-btn-hover-bg: var(--c24-tinte); --bs-btn-hover-border-color: var(--c24-verde); --bs-btn-hover-color: var(--c24-enfasis); }
.btn-success { --bs-btn-color: var(--c24-sobre-verde); --bs-btn-hover-color: var(--c24-sobre-verde); }
.btn-warning { --bs-btn-bg: #f5b544; --bs-btn-border-color: #f5b544; }
.btn-light { --bs-btn-bg: #f3fff9; --bs-btn-border-color: #f3fff9; --bs-btn-color: #03120f; }
[data-bs-theme="light"] .btn-light { --bs-btn-bg: #ffffff; --bs-btn-border-color: var(--c24-linea-fuerte); --bs-btn-hover-bg: #f3f7f5; --bs-btn-hover-border-color: var(--c24-verde); }
.btn-google, .btn-google-top { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; }
.btn-google-top .icono-google { background: #fff; border-radius: 50%; padding: 2px; width: 22px; height: 22px; }
@media (max-width: 575.98px) { .btn-google-top span { display: none; } }

.card { background: var(--c24-panel); border-color: var(--c24-linea); }
.card-header { border-color: var(--c24-linea); }
.list-group { --bs-list-group-bg: transparent; --bs-list-group-border-color: var(--c24-linea); --bs-list-group-action-hover-bg: var(--c24-tinte-suave); }
.form-control, .form-select { background-color: var(--c24-fondo); border-color: var(--c24-linea-fuerte); color: var(--c24-texto); }
[data-bs-theme="light"] .form-control, [data-bs-theme="light"] .form-select { background-color: #ffffff; }
.form-control::placeholder { color: var(--c24-tenue); }
.form-control:focus, .form-select:focus { background-color: var(--c24-fondo); color: var(--c24-texto); }
[data-bs-theme="light"] .form-control:focus, [data-bs-theme="light"] .form-select:focus { background-color: #ffffff; }
.form-control-color { padding: .25rem; min-height: 38px; }
.table { --bs-table-bg: transparent; --bs-table-color: var(--c24-texto); --bs-table-border-color: var(--c24-linea); --bs-table-hover-bg: var(--c24-tinte-suave); }
.dropdown-menu { --bs-dropdown-bg: var(--c24-panel-2); --bs-dropdown-link-hover-bg: var(--c24-tinte); --bs-dropdown-border-color: var(--c24-linea); --bs-dropdown-link-color: var(--c24-texto); }
[data-bs-theme="light"] .dropdown-menu { --bs-dropdown-bg: #ffffff; box-shadow: 0 12px 32px rgba(16, 34, 28, .12) !important; }
.modal-content, .offcanvas { background: var(--c24-panel); }
.alert-info { --bs-alert-bg: var(--c24-tinte-suave); --bs-alert-border-color: var(--c24-linea-fuerte); --bs-alert-color: var(--c24-texto); }
.badge.text-bg-primary { color: var(--c24-sobre-verde) !important; }
.text-bg-success { color: #03120f !important; }
.text-primary { color: var(--c24-verde) !important; }
.c24-fuerte { color: var(--c24-enfasis); }
a { text-underline-offset: 3px; }

/* --- Menú lateral y barra superior ------------------------------------- */
.crm-sidebar { background: var(--c24-sidebar); color: var(--c24-sidebar-texto); border-right: 1px solid var(--c24-linea); }
.crm-sidebar .marca { font-size: 1.2rem; letter-spacing: -.5px; color: var(--c24-enfasis); }
/* Logo de Cierres24 (app/static/c24/marca): una versión por tema */
.crm-sidebar .marca img.c24-logo { height: 30px; width: auto; max-width: 170px; }
.c24-logo-claro { display: none !important; }
[data-bs-theme="light"] .c24-logo-oscuro { display: none !important; }
[data-bs-theme="light"] .c24-logo-claro { display: block !important; }
.crm-sidebar .nav-link { color: var(--c24-sidebar-texto); }
.crm-sidebar .nav-link:hover { background: var(--c24-tinte-suave); color: var(--c24-enfasis); }
.crm-sidebar .nav-link.active { background: var(--c24-tinte-fuerte); color: var(--c24-verde); box-shadow: inset 3px 0 0 var(--c24-verde); }
.crm-sidebar .nav-link.bloqueado { color: var(--c24-tenue); }
.crm-sidebar .nav-link.bloqueado.active { color: var(--c24-verde); }
.crm-sidebar .nav-link .candado { font-size: .75rem; opacity: .7; }
.crm-sidebar .pie { border-color: var(--c24-linea); }
/* Pestañas de la empresa (ejemplo o la del cliente) colgando de su ítem */
.c24-submenu { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 8px 2.1rem; padding-left: .55rem; border-left: 1px solid var(--c24-linea); }
.crm-sidebar .c24-submenu .nav-link { padding: .42rem .8rem; font-size: .9rem; border-radius: 8px; color: var(--c24-verde); }
.crm-sidebar .c24-submenu .nav-link:hover { color: var(--c24-enfasis); }
.crm-sidebar .c24-submenu .nav-link.active { background: var(--c24-boton); color: var(--c24-sobre-verde); box-shadow: none; font-weight: 600; }
.crm-sidebar .c24-submenu .nav-link.bloqueado:not(.active) { color: var(--c24-tenue); }

/* --- IA flotante (con sesión) ------------------------------------------- */
.c24-burbuja-boton {
  position: fixed; right: 20px; bottom: 20px; z-index: 1045; width: 60px; height: 60px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid #6fffd0; cursor: pointer;
  background: radial-gradient(circle at 35% 25%, #26dca0, #08784e);
  box-shadow: 0 0 0 5px rgba(57, 239, 176, .1), 0 10px 30px rgba(0, 0, 0, .35);
  transition: transform .15s ease, box-shadow .15s ease;
}
.c24-burbuja-boton:hover { transform: translateY(-2px); box-shadow: 0 0 0 6px rgba(57, 239, 176, .16), 0 14px 34px rgba(0, 0, 0, .4); }
.c24-burbuja-boton:focus-visible { outline: 2px solid var(--c24-verde); outline-offset: 4px; }
body:has(.c24-burbuja-boton) .crm-footer { padding-right: 96px; }
.c24-burbuja-boton .barras { display: flex; align-items: center; gap: 4px; height: 26px; }
.c24-burbuja-boton .barras i { width: 3px; height: 10px; border-radius: 2px; background: #fff; animation: c24-barra 1s infinite ease-in-out; }
.c24-burbuja-boton .barras i:nth-child(1) { animation-delay: .1s; animation-duration: .8s; }
.c24-burbuja-boton .barras i:nth-child(2) { animation-delay: .2s; animation-duration: 1.1s; }
.c24-burbuja-boton .barras i:nth-child(3) { animation-delay: .05s; animation-duration: .95s; }
.c24-burbuja-boton .barras i:nth-child(4) { animation-delay: .15s; animation-duration: 1.05s; }
.c24-burbuja-boton.hablando .barras i { animation-duration: .45s; }
@keyframes c24-barra { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(2.3); } }

.c24-burbuja-panel {
  position: fixed; right: 20px; bottom: 92px; z-index: 1045; width: min(410px, calc(100vw - 24px)); height: min(660px, calc(100vh - 116px));
  display: none; flex-direction: column; overflow: hidden; border-radius: 18px;
  background: radial-gradient(900px 600px at 50% -10%, var(--c24-panel-2), var(--c24-panel) 60%);
  border: 1px solid var(--c24-linea-fuerte); box-shadow: 0 18px 50px var(--c24-sombra-modal);
  transform-origin: bottom right;
}
.c24-burbuja-panel.abierta { display: flex; animation: c24-burbuja-entra .18s ease-out; }
@keyframes c24-burbuja-entra { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.c24-burbuja-cabecera { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 16px; border-bottom: 1px solid var(--c24-linea); background: var(--c24-vidrio); backdrop-filter: blur(8px); }
.c24-burbuja-cabecera .punto { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 10px; background: var(--c24-verde); box-shadow: 0 0 0 4px var(--c24-tinte); }
.c24-burbuja-cabecera .cerrar { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--c24-linea); border-radius: 10px; color: var(--c24-texto); }
.c24-burbuja-panel .orb-stage.compacta { flex: 0 0 auto; height: 190px; width: 100%; margin: 0; }
.c24-burbuja-panel .orb-stage.compacta .orb-glow { width: 150px; height: 150px; filter: blur(50px); }
.c24-burbuja-panel #orbCanvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.c24-burbuja-panel .c24-hilo { flex: 1 1 auto; max-height: none; width: 100%; padding: .25rem 14px .5rem; }
.c24-burbuja-panel .c24-hilo:empty { display: flex; }
.c24-burbuja-panel .composer { width: auto; margin: .5rem 12px 0; padding: 6px; gap: 6px; border-radius: 20px; }
.c24-burbuja-panel .composer .mic { flex-basis: 42px; width: 42px; height: 42px; }
.c24-burbuja-panel .composer .mic svg { width: 20px; height: 20px; }
.c24-burbuja-panel .composer .accion { flex-basis: 36px; width: 36px; height: 36px; border-radius: 10px; }
.c24-burbuja-panel .c24-nota { margin: .35rem 12px .6rem; }
@media (max-width: 575.98px) {
  .c24-burbuja-boton { right: 14px; bottom: 14px; width: 54px; height: 54px; }
  .c24-burbuja-panel { right: 8px; left: 8px; bottom: 78px; width: auto; height: calc(100dvh - 94px); }
  .c24-burbuja-panel .orb-stage.compacta { height: 150px; }
}
@media (prefers-reduced-motion: reduce) {
  .c24-burbuja-boton .barras i, .c24-burbuja-panel.abierta { animation: none; }
}
.crm-topbar { background: var(--c24-topbar); border-color: var(--c24-linea); }
.btn-menu { width: 42px; height: 42px; display: grid; place-items: center; padding: 0; }

/* Menú lateral cerrado (solo escritorio; en móvil se despliega encima) */
@media (min-width: 992px) {
  .crm-sidebar, .crm-contenido { transition: transform .25s ease, margin-left .25s ease; }
  body.menu-cerrado .crm-sidebar { transform: translateX(-100%); }
  body.menu-cerrado .crm-contenido { margin-left: 0; }
}

/* --- Interruptor de modo nocturno / diurno ----------------------------- */
.c24-tema { border: 0; background: none; padding: 0; border-radius: 999px; cursor: pointer; line-height: 0; }
.c24-tema:focus-visible { outline: 2px solid var(--c24-verde); outline-offset: 3px; }
.c24-tema .pista {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  width: 68px; height: 36px; padding: 0 10px; border-radius: 999px;
  background: var(--c24-panel-2); border: 1px solid var(--c24-linea-fuerte);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .18);
}
.c24-tema .pista i { position: relative; z-index: 1; font-size: .95rem; color: var(--c24-tenue); transition: color .3s ease, transform .4s ease; }
.c24-tema .perilla {
  position: absolute; top: 3px; left: 3px; width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(145deg, #ffd27a, #f5a623);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25), 0 0 14px rgba(245, 181, 68, .45);
  transition: transform .35s cubic-bezier(.4, 1.4, .5, 1), background .35s ease, box-shadow .35s ease;
}
/* Nocturno: la perilla se va a la luna y se vuelve verde Cierres24 */
[data-bs-theme="dark"] .c24-tema .perilla {
  transform: translateX(32px);
  background: linear-gradient(145deg, #6af5c4, #14b982);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .35), 0 0 16px rgba(57, 239, 176, .45);
}
[data-bs-theme="dark"] .c24-tema .luna,
[data-bs-theme="light"] .c24-tema .sol { color: #03120f; }
[data-bs-theme="dark"] .c24-tema .luna { transform: rotate(-12deg); }
[data-bs-theme="light"] .c24-tema .sol { transform: rotate(45deg); }
.c24-tema:hover .pista { border-color: var(--c24-verde); }

/* --- Marca, avatar y pantallas de acceso -------------------------------- */
.c24-marca { height: 24px; display: inline-flex; align-items: flex-end; gap: 3px; }
.c24-marca i { display: block; width: 6px; border-radius: 3px 3px 1px 1px; background: var(--c24-verde); box-shadow: 0 0 12px rgba(57, 239, 176, .35); }
.c24-marca i:nth-child(1) { height: 9px; } .c24-marca i:nth-child(2) { height: 16px; } .c24-marca i:nth-child(3) { height: 24px; }

.avatar { background: var(--c24-tinte-fuerte); color: var(--c24-verde); }
.hero-home { background: radial-gradient(circle at 85% 20%, var(--c24-tinte), transparent 45%), var(--c24-hero-fondo); border: 1px solid var(--c24-linea); color: var(--c24-texto); }
.auth-arte { background: radial-gradient(ellipse at 50% 40%, rgba(0,180,116,.2), transparent 50%), linear-gradient(160deg, #051915, #03120f); }
.auth-panel { background: var(--c24-fondo); }

/* --- Elementos comunes de Cierres24 ------------------------------------ */
.c24-eyebrow { font-size: .72rem; letter-spacing: .3em; text-transform: uppercase; color: var(--c24-eyebrow); font-weight: 700; }
.c24-titulo { font-weight: 800; letter-spacing: -.03em; line-height: 1.08; }
.c24-titulo span, .text-verde { color: var(--c24-verde); }
.c24-panel { background: var(--c24-panel); border: 1px solid var(--c24-linea); border-radius: 1.1rem; }
[data-bs-theme="light"] .c24-panel, [data-bs-theme="light"] .card { box-shadow: var(--crm-sombra); }
.c24-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .7rem; border-radius: 2rem; font-size: .78rem; background: var(--c24-tinte); color: var(--c24-verde); }
.c24-chip.ambar { background: rgba(245,181,68,.14); color: var(--c24-ambar); }
.c24-chip.gris { background: rgba(127,154,143,.14); color: var(--c24-suave); }
.c24-seccion { margin-top: 4.5rem; }
.c24-seccion > .encabezado { text-align: center; max-width: 760px; margin: 0 auto 2rem; }
.c24-seccion h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; letter-spacing: -.02em; }

/* Modal de acceso con Google */
.c24-acceso { position: relative; border: 1px solid var(--c24-linea-fuerte); border-radius: 1.4rem; background: radial-gradient(ellipse at 50% 0%, var(--c24-tinte-fuerte), transparent 60%), var(--c24-panel); box-shadow: 0 30px 80px var(--c24-sombra-modal); }
.c24-acceso .modal-body { padding: 2.6rem 2rem 2rem; }
.c24-acceso .btn-close { position: absolute; top: 1rem; right: 1rem; z-index: 1; }
[data-bs-theme="dark"] .c24-acceso .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }
.c24-acceso .btn-google { font-weight: 700; min-height: 54px; }
.c24-marca-grande { height: 44px; gap: 5px; }
.c24-marca-grande i { width: 11px; }
.c24-marca-grande i:nth-child(1) { height: 16px; } .c24-marca-grande i:nth-child(2) { height: 29px; } .c24-marca-grande i:nth-child(3) { height: 44px; }
/* Al volver a Identidad se salta a la tarjeta del logo nuevo: que no quede bajo la barra superior. */
[id^="logo-"] { scroll-margin-top: 96px; }

/* --- Elegir el estilo de la web: miniatura de escritorio de cada estilo -- */
.c24-estilo-vista { position: relative; height: 380px; overflow: hidden; background: #fff; border-bottom: 1px solid var(--c24-linea); }
.c24-estilo-vista iframe { position: absolute; top: 0; left: 0; width: 1280px; height: 1200px; border: 0; transform-origin: 0 0; pointer-events: none; }
.c24-estilo.actual { border-color: var(--c24-verde); box-shadow: 0 0 0 2px var(--c24-tinte-fuerte); }

/* --- Aviso del plan gratis: logos y ediciones con IA que le quedan -------- */
.c24-cupo { padding: 1rem 1.15rem; border: 1px solid var(--c24-linea-fuerte); border-radius: 1rem;
  background: linear-gradient(135deg, var(--c24-tinte), transparent 70%), var(--c24-panel); }
.c24-cupo .icono { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; border-radius: 12px;
  background: var(--c24-tinte-fuerte); color: var(--c24-verde); font-size: 1.2rem; }
.c24-cupo .contador { display: inline-flex; align-items: baseline; gap: .3rem; padding: .35rem .75rem; border-radius: 999px;
  border: 1px solid var(--c24-linea-fuerte); background: var(--c24-panel); font-size: .85rem; color: var(--c24-suave); white-space: nowrap; }
.c24-cupo .contador strong { font-size: 1.05rem; color: var(--c24-verde); }
.c24-cupo .contador.agotado strong { color: var(--c24-ambar); }

/* --- Tarjeta "otro logo": crearlo con IA o subir el propio ---------------- */
.c24-nuevo-logo .separador { display: flex; align-items: center; gap: .75rem; margin: .9rem 0; color: var(--c24-tenue); font-size: .8rem; }
.c24-nuevo-logo .separador::before, .c24-nuevo-logo .separador::after { content: ""; flex: 1; border-top: 1px solid var(--c24-linea); }
.c24-nuevo-logo label.btn { cursor: pointer; }
.c24-nuevo-logo input[type=file]:focus-visible + label { outline: 2px solid var(--c24-verde); outline-offset: 2px; }

/* --- Confirmación estándar (parciales/confirmar.html) ------------------- */
.c24-confirmar .modal-dialog { max-width: 420px; }
.c24-confirmar .modal-content {
  position: relative; overflow: hidden; border: 1px solid var(--c24-linea-fuerte); border-radius: 1.25rem;
  background: radial-gradient(ellipse at 50% 0%, var(--c24-tinte-suave), transparent 65%), var(--c24-panel);
  box-shadow: 0 30px 80px var(--c24-sombra-modal);
}
.c24-confirmar .agarre { display: none; }
.c24-confirmar .cuerpo { padding: 2rem 1.75rem 1.25rem; text-align: center; }
.c24-confirmar .icono {
  display: inline-grid; place-items: center; width: 64px; height: 64px; margin-bottom: 1rem; border-radius: 50%;
  font-size: 1.65rem; color: #f0626a; background: rgba(240, 98, 106, .12); box-shadow: 0 0 0 8px rgba(240, 98, 106, .06);
}
.c24-confirmar.aviso .icono { color: var(--c24-verde); background: var(--c24-tinte); box-shadow: 0 0 0 8px var(--c24-tinte-suave); }
.c24-confirmar .titulo { font-size: 1.25rem; font-weight: 700; color: var(--c24-enfasis); margin: 0 0 .5rem; letter-spacing: -.2px; }
.c24-confirmar .mensaje { margin: 0; color: var(--c24-suave); line-height: 1.5; }
.c24-confirmar .mensaje strong { color: var(--c24-texto); }
.c24-confirmar .acciones { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; padding: .5rem 1.75rem 1.75rem; }
.c24-confirmar .acciones .btn { border-radius: .85rem; font-weight: 600; font-size: 1rem; padding: .7rem 1rem; }
.c24-confirmar .btn-danger { background: #e5484d; border-color: #e5484d; color: #fff; }
.c24-confirmar .btn-danger:hover, .c24-confirmar .btn-danger:focus-visible { background: #d23c41; border-color: #d23c41; }
/* Celular: hoja que sube desde abajo, botones grandes al alcance del pulgar (el principal arriba). */
@media (max-width: 575.98px) {
  .c24-confirmar .modal-dialog { margin: 0; max-width: none; min-height: 100%; align-items: flex-end; }
  .c24-confirmar.fade .modal-dialog { transform: translateY(100%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); }
  .c24-confirmar.show .modal-dialog { transform: none; }
  .c24-confirmar .modal-content { border-radius: 1.4rem 1.4rem 0 0; border-bottom: 0; padding-bottom: env(safe-area-inset-bottom); }
  .c24-confirmar .agarre { display: block; width: 42px; height: 5px; margin: .7rem auto 0; border-radius: 3px; background: var(--c24-linea-fuerte); }
  .c24-confirmar .cuerpo { padding: 1.25rem 1.5rem 1rem; }
  .c24-confirmar .acciones { grid-template-columns: 1fr; padding: .5rem 1.25rem 1.25rem; }
  .c24-confirmar .acciones .btn { padding: .85rem 1rem; }
  .c24-confirmar .acciones .btn-outline-secondary { order: 2; }
}
@media (prefers-reduced-motion: reduce) {
  .c24-confirmar.fade .modal-dialog { transition: none; }
}
.modal-backdrop.show { opacity: .7; }
[data-bs-theme="light"] .modal-backdrop.show { opacity: .45; }

/* Banda de la empresa de ejemplo */
.c24-banda-ejemplo { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; padding: .85rem 1.1rem; border-radius: 1rem; background: #f5b544; color: #1a1606; margin-bottom: 1.5rem; }
.c24-banda-ejemplo strong { font-size: 1rem; }
.c24-banda-ejemplo .btn { background: #1a1606; color: #f5b544; border: 0; font-weight: 700; }
.c24-banda-ejemplo .btn:hover { background: #000; color: #ffd27a; }

/* Progreso del embudo */
.c24-progreso { list-style: none; margin: 0 0 1.75rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; }
.c24-progreso li { display: flex; align-items: center; gap: .6rem; padding: .7rem .9rem; border-radius: .9rem; border: 1px solid var(--c24-linea); color: var(--c24-suave); font-size: .9rem; }
.c24-progreso li .num { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; font-weight: 800; border: 1px solid var(--c24-num-borde); }
.c24-progreso li.hecho { background: var(--c24-tinte-suave); border-color: var(--c24-linea-fuerte); color: var(--c24-texto); }
.c24-progreso li.hecho .num { background: var(--c24-boton); border-color: var(--c24-boton); color: var(--c24-sobre-verde); }
.c24-progreso li.actual { border: 2px solid var(--c24-verde); color: var(--c24-texto); font-weight: 600; background: var(--c24-panel-2); }
.c24-progreso li.actual .num { border: 2px solid var(--c24-verde); color: var(--c24-verde); }
.c24-progreso li.pago { border-style: dashed; border-color: rgba(245,181,68,.5); color: var(--c24-ambar); }

/* ==========================================================================
   Home: esfera + chat con la IA + video
   ========================================================================== */
.c24-home .crm-main { padding-top: 1rem; }
.c24-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 2rem; align-items: start; }
.c24-hero-ia { text-align: center; min-width: 0; }
.c24-hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.9rem); margin: .8rem 0 .5rem; text-shadow: 0 0 35px rgba(57, 239, 176, .12); }
[data-bs-theme="light"] .c24-hero h1 { text-shadow: none; }
.c24-hero .tagline { font-size: clamp(1rem, 1.6vw, 1.3rem); color: var(--c24-suave-2); margin: 0 auto; max-width: 640px; }

.orb-stage { height: clamp(220px, 26vw, 330px); position: relative; display: grid; place-items: center; margin: .25rem auto 0; max-width: 760px; }
#orbCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.orb-glow { position: absolute; width: min(34vw, 260px); height: min(34vw, 260px); border-radius: 50%; background: var(--c24-brillo); filter: blur(75px); opacity: var(--c24-brillo-opacidad); pointer-events: none; transition: opacity .4s; }
.orb-stage.hablando .orb-glow { opacity: .3; }
.orb-ring { position: absolute; width: clamp(180px, 22vw, 260px); aspect-ratio: 1; border: 1px solid rgba(var(--c24-esfera), .15); border-radius: 50%; box-shadow: 0 0 45px rgba(var(--c24-esfera), .06), inset 0 0 40px rgba(var(--c24-esfera), .04); pointer-events: none; }
.orb-ring::before, .orb-ring::after { content: ""; position: absolute; inset: 10%; border: 1px solid rgba(var(--c24-esfera), .11); border-radius: 50%; transform: rotateX(65deg) rotate(25deg); }
.orb-ring::after { transform: rotateY(65deg) rotate(-25deg); }
.speech-chip { position: absolute; z-index: 2; left: 4%; top: 42%; display: flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid var(--c24-linea); background: var(--c24-vidrio); backdrop-filter: blur(12px); border-radius: 14px; color: var(--c24-texto); font-size: .82rem; cursor: pointer; }
[data-bs-theme="light"] .speech-chip { box-shadow: 0 6px 20px rgba(16, 34, 28, .08); }
.speech-chip svg { width: 18px; height: 18px; stroke: var(--c24-verde); fill: none; stroke-width: 1.8; }
.speech-chip.estado { left: auto; right: 4%; top: 58%; cursor: default; }

/* Hilo de la conversación */
.c24-hilo { max-width: 760px; margin: 0 auto; max-height: 380px; overflow-y: auto; display: flex; flex-direction: column; gap: .7rem; padding: .25rem .25rem .5rem; text-align: left; scroll-behavior: smooth; }
.c24-hilo:empty { display: none; }
/* "Ver mensajes anteriores": discreto, arriba del hilo (los mensajes nunca se borran) */
.c24-anteriores { align-self: center; flex: 0 0 auto; border: 1px solid var(--c24-linea); border-radius: 999px; padding: .4rem 1rem;
  background: var(--c24-boton-suave); color: var(--c24-suave-2); font-size: .8rem; cursor: pointer; }
.c24-anteriores:hover:not(:disabled) { border-color: var(--c24-verde); color: var(--c24-enfasis); }
.c24-anteriores:disabled { opacity: .7; cursor: default; }
.c24-burbuja { max-width: 86%; padding: .75rem .95rem; border-radius: 4px 16px 16px 16px; background: var(--c24-panel-2); line-height: 1.5; font-size: .95rem; overflow-wrap: anywhere; }
.c24-burbuja.usuario { align-self: flex-end; border-radius: 16px 4px 16px 16px; background: var(--c24-boton); color: var(--c24-sobre-verde); }
.c24-logo-chat { display: block; width: 160px; height: 160px; object-fit: contain; border-radius: .8rem; background: #fff; padding: 8px; margin-top: .6rem; }
.c24-imagen-chat { display: block; max-width: 180px; max-height: 140px; object-fit: contain; border-radius: .6rem; background: #fff; padding: 6px; margin-bottom: .3rem; }
.c24-burbuja.usuario .nota { font-size: .75rem; opacity: .7; display: block; margin-bottom: .15rem; }
.c24-burbuja.error { background: rgba(240, 98, 106, .15); border: 1px solid rgba(240, 98, 106, .4); }
.c24-burbuja .acciones { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .65rem; }
.c24-burbuja .acciones .btn { border-radius: 2rem; }
.c24-burbuja .oir { background: none; border: 0; color: var(--c24-suave); padding: 0 0 0 .4rem; vertical-align: middle; }
.c24-burbuja .oir:hover { color: var(--c24-verde); }
.c24-escribiendo { display: inline-flex; gap: 4px; }
.c24-escribiendo i { width: 7px; height: 7px; border-radius: 50%; background: var(--c24-verde); animation: c24-punto 1s infinite; }
.c24-escribiendo i:nth-child(2) { animation-delay: .15s; } .c24-escribiendo i:nth-child(3) { animation-delay: .3s; }
@keyframes c24-punto { 50% { opacity: .25; transform: translateY(-3px); } }

.composer { width: min(760px, 100%); margin: .9rem auto 0; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--c24-composer-borde); border-radius: 25px; background: var(--c24-composer); box-shadow: 0 0 40px rgba(0,255,158,.035); backdrop-filter: blur(12px); }
[data-bs-theme="light"] .composer { box-shadow: 0 10px 30px rgba(16, 34, 28, .08); }
.composer .mic { flex: 0 0 50px; width: 50px; height: 50px; border-radius: 50%; border: 1px solid #6fffd0; background: radial-gradient(circle at 35% 25%, #26dca0, #08784e); box-shadow: 0 0 0 5px rgba(57,239,176,.08), 0 0 27px rgba(57,239,176,.25); display: grid; place-items: center; cursor: pointer; }
.composer .mic svg { width: 23px; height: 23px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.composer .mic.grabando { background: radial-gradient(circle at 35% 25%, #ff7a83, #b0303a); border-color: #ff9aa1; animation: c24-pulso 1.1s infinite; }
@keyframes c24-pulso { 50% { box-shadow: 0 0 0 10px rgba(240,98,106,.12), 0 0 36px rgba(240,98,106,.45); } }
.composer input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--c24-texto); font-size: .95rem; padding: 10px 2px; }
.composer input::placeholder { color: var(--c24-tenue); }
.composer .accion { flex: 0 0 44px; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--c24-linea); border-radius: 12px; background: var(--c24-tinte-suave); color: var(--c24-texto); cursor: pointer; }
.composer .accion.activo { color: var(--c24-verde); border-color: var(--c24-linea-fuerte); }
.composer .accion.enviar { border: 0; border-radius: 50%; background: var(--c24-boton); color: var(--c24-sobre-verde); }
.composer .accion:disabled { opacity: .5; }
.quick-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: .8rem auto 0; }
.quick-actions button { border: 1px solid var(--c24-linea); border-radius: 30px; padding: 9px 16px; background: var(--c24-boton-suave); font-size: .82rem; color: var(--c24-suave-2); cursor: pointer; min-height: 40px; }
.quick-actions button:hover { border-color: var(--c24-verde); color: var(--c24-enfasis); background: var(--c24-tinte); }
.c24-nota { min-height: 1.2rem; text-align: center; color: var(--c24-tenue); font-size: .78rem; margin: .5rem auto 0; }

/* Video */
.c24-video { position: sticky; top: 84px; }
.c24-video .marco { position: relative; aspect-ratio: 16 / 9; border-radius: 1.1rem; overflow: hidden; background: var(--c24-panel-2); border: 1px solid var(--c24-linea-fuerte); box-shadow: 0 0 60px rgba(57, 239, 176, .08); }
.c24-video video, .c24-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.c24-video .pendiente { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 1.5rem; background: radial-gradient(circle at 50% 40%, var(--c24-tinte-fuerte), transparent 60%); }
.c24-video .play { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto .8rem; background: var(--c24-boton); color: var(--c24-sobre-verde); font-size: 2rem; box-shadow: 0 0 0 10px var(--c24-tinte); }
.c24-pasos-video { display: grid; gap: .6rem; margin-top: 1rem; }
.c24-pasos-video .paso { display: flex; gap: .8rem; align-items: flex-start; padding: .75rem .9rem; border-radius: .9rem; background: var(--c24-paso); border: 1px solid var(--c24-linea); }
.c24-pasos-video .paso .n { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--c24-tinte-fuerte); color: var(--c24-verde); font-weight: 800; }

/* Tarjetas de servicios y vista previa de la empresa de ejemplo */
.c24-servicio { height: 100%; padding: 1.4rem; }
.c24-servicio .icono { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; color: var(--c24-verde); background: var(--c24-icono-fondo); border: 1px solid var(--c24-linea-fuerte); margin-bottom: 1rem; }
.c24-preview { display: block; height: 100%; padding: 1.2rem; color: inherit; text-decoration: none; transition: border-color .2s, transform .2s; }
.c24-preview:hover { border-color: var(--c24-verde); transform: translateY(-2px); color: inherit; }
.c24-preview .mini { height: 96px; border-radius: .7rem; background: var(--c24-panel-2); padding: .8rem; margin: .8rem 0; display: flex; gap: 6px; align-items: flex-end; overflow: hidden; }
.c24-preview .mini .barra { flex: 1; border-radius: 4px 4px 0 0; background: rgba(var(--c24-esfera), .55); }
.c24-preview .mini.lista { flex-direction: column; align-items: stretch; justify-content: center; }
.c24-preview .mini .fila { height: 10px; border-radius: 5px; background: var(--c24-fila); }

/* Historia */
.c24-historia { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 2.2rem; align-items: center; padding: clamp(1.25rem, 3vw, 2.5rem); }
.c24-historia .foto { width: 200px; height: 200px; border-radius: 50%; object-fit: cover; border: 3px solid var(--c24-verde); box-shadow: 0 0 0 8px var(--c24-tinte); display: block; margin: 0 auto; }
.c24-historia .cifras { display: flex; flex-wrap: wrap; gap: 2rem; }
.c24-historia .cifras strong { display: block; font-size: 2.1rem; color: var(--c24-verde); line-height: 1; }

/* Plan */
.c24-plan { max-width: 560px; margin: 0 auto; padding: 2rem; border: 2px solid var(--c24-verde); text-align: center; }
.c24-plan .precio { font-size: 3.6rem; font-weight: 800; line-height: 1; }
.c24-plan ul { list-style: none; padding: 0; margin: 1.5rem 0; text-align: left; display: grid; gap: .6rem; }
.c24-plan li { display: flex; gap: .6rem; }
.c24-plan li i { color: var(--c24-verde); }

/* Preguntas frecuentes */
.c24-faq { display: grid; gap: .6rem; } /* mismo ancho que «Mi historia» */
.c24-faq details { background: var(--c24-panel); border: 1px solid var(--c24-linea); border-radius: .9rem; padding: 1rem 1.2rem; }
.c24-faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.c24-faq summary::after { content: "+"; color: var(--c24-verde); font-size: 1.3rem; line-height: 1; }
.c24-faq details[open] summary::after { content: "–"; }
.c24-faq p { margin: .7rem 0 0; color: var(--c24-suave); }

/* KPIs de la empresa de ejemplo */
.c24-kpi { padding: 1.1rem 1.2rem; height: 100%; }
.c24-kpi .valor { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; }
.c24-barras { height: 220px; display: flex; align-items: flex-end; gap: 1rem; border-bottom: 1px solid var(--c24-linea); padding: 0 .3rem; }
.c24-barras .col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: .35rem; }
.c24-barras .barra { width: 100%; border-radius: 8px 8px 0 0; background: linear-gradient(180deg, var(--c24-verde), rgba(var(--c24-esfera), .35)); }
.temperatura-caliente { background: var(--c24-tinte); color: var(--c24-verde); }
.temperatura-tibio { background: rgba(245,181,68,.15); color: var(--c24-ambar); }

/* Vista previa de una web dentro del panel */
.c24-navegador { border: 1px solid var(--c24-linea-fuerte); border-radius: 1rem; overflow: hidden; background: var(--c24-panel-2); }
.c24-navegador .barra { display: flex; align-items: center; gap: .6rem; padding: .55rem .8rem; }
.c24-navegador .barra .url { flex: 1; min-width: 0; background: var(--c24-fondo); border-radius: .5rem; padding: .3rem .7rem; font-size: .8rem; color: var(--c24-suave); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c24-navegador iframe { width: 100%; height: 620px; border: 0; background: #fff; display: block; }

.c24-hero > * { min-width: 0; }
@media (max-width: 1199.98px) {
  .c24-hero { grid-template-columns: minmax(0, 1fr); }
  .c24-video { position: static; max-width: 760px; margin: 0 auto; width: 100%; }
}
@media (max-width: 767.98px) {
  .c24-historia { grid-template-columns: 1fr; text-align: center; }
  .c24-historia .cifras { justify-content: center; }
  .speech-chip { left: 0; font-size: .72rem; padding: 7px 9px; }
  .speech-chip.estado { right: 0; }
  .composer { padding: 6px; gap: 6px; border-radius: 20px; }
  .composer .mic { width: 44px; height: 44px; flex-basis: 44px; }
  .composer .accion { width: 40px; height: 40px; flex-basis: 40px; }
  .c24-seccion { margin-top: 3rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition: none !important; }
}

/* ---------------- Automatizaciones IA ---------------- */
/* Barra de la identidad (sin ella lista no se crean automatizaciones) */
.c24-identidad-barra { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; padding: .7rem 1rem; margin-bottom: 1rem;
  border-radius: 1rem; border: 1px solid var(--c24-linea); background: var(--c24-panel); }
.c24-identidad-barra.pendiente { border-color: rgba(245,181,68,.5); background: color-mix(in srgb, var(--c24-ambar) 8%, var(--c24-panel)); }
.c24-identidad-barra .logo { width: 36px; height: 36px; border-radius: .6rem; object-fit: contain; background: #fff; padding: 2px; flex: none; }
/* Pestañas (una por automatización): con muchas, se desplazan de lado en vez de ocupar varias filas */
.c24-pestanas-auto { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; max-width: 100%; }
.c24-pestanas-auto .nav-link { white-space: nowrap; }
/* Tipos de automatización (al crear una) */
.c24-tipos { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .75rem; }
.c24-tipo { position: relative; display: flex; flex-direction: column; gap: .35rem; padding: 1rem; border-radius: 1rem; cursor: pointer;
  border: 1px solid var(--c24-linea); background: var(--c24-panel); height: 100%; }
.c24-tipo:hover { border-color: var(--c24-verde); }
.c24-tipo input { position: absolute; opacity: 0; pointer-events: none; }
.c24-tipo:has(input:checked) { border-color: var(--c24-verde); background: var(--c24-tinte); box-shadow: inset 0 0 0 1px var(--c24-verde); }
.c24-tipo:has(input:focus-visible) { outline: 2px solid var(--c24-verde); outline-offset: 2px; }
.c24-tipo .icono { width: 40px; height: 40px; border-radius: .8rem; display: grid; place-items: center; font-size: 1.25rem;
  background: var(--c24-tinte-fuerte); color: var(--c24-verde); }
fieldset:disabled .c24-tipo { cursor: not-allowed; opacity: .6; }
/* WhatsApp: el código QR */
.c24-qr { width: 264px; max-width: 100%; aspect-ratio: 1; border-radius: 1rem; background: #fff; padding: 12px; display: grid; place-items: center;
  border: 1px solid var(--c24-linea); }
.c24-qr img { width: 100%; height: 100%; image-rendering: pixelated; }
.c24-pasos-lista { counter-reset: paso; list-style: none; padding: 0; margin: 0; }
.c24-pasos-lista li { counter-increment: paso; display: flex; gap: .75rem; align-items: flex-start; padding: .45rem 0; }
.c24-pasos-lista li::before { content: counter(paso); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none;
  font-weight: 800; font-size: .8rem; background: var(--c24-tinte-fuerte); color: var(--c24-verde); }

/* ---------------- CRM › Atender: tablero por etapas ---------------- */
.c24-etapa { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; }
.c24-etapa::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: var(--etapa); }
.c24-tablero { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: .75rem; overflow-x: auto; padding-bottom: .5rem;
  align-items: start; }
.c24-columna { border-radius: 1rem; background: var(--c24-tinte-suave); border: 1px solid var(--c24-linea); display: flex; flex-direction: column;
  max-height: calc(100vh - 290px); min-height: 220px; }
.c24-columna > header { display: flex; align-items: center; gap: .5rem; padding: .7rem .85rem; border-bottom: 3px solid var(--etapa); }
.c24-columna .tarjetas { flex: 1; overflow-y: auto; padding: .6rem; display: flex; flex-direction: column; gap: .5rem; min-height: 80px; }
.c24-columna.encima { background: var(--c24-tinte-fuerte); border-color: var(--etapa); }
.c24-tarjeta { background: var(--c24-panel); border: 1px solid var(--c24-linea); border-radius: .8rem; padding: .65rem .75rem; font-size: .9rem; }
.c24-tarjeta[draggable="true"] { cursor: grab; }
.c24-tarjeta.arrastrando { opacity: .45; }
.c24-tarjeta:focus-visible { outline: 2px solid var(--c24-verde); outline-offset: 2px; }
[data-bs-theme="light"] .c24-tarjeta { box-shadow: 0 1px 2px rgba(16,34,28,.06); }
@media (max-width: 575.98px) { .c24-tablero { grid-auto-columns: 85%; } }
/* Columna fija «Ventas» del CRM y engranaje de las etapas */
.c24-columna.fija { border-style: dashed; background: color-mix(in srgb, var(--etapa) 8%, transparent); }
.c24-engranaje:hover, .c24-engranaje:focus-visible { color: var(--c24-verde) !important; }
.c24-engranaje i { transition: transform .3s; }
.c24-engranaje:hover i { transform: rotate(60deg); }
.c24-fila-etapa.eliminada { opacity: .5; }
.c24-fila-etapa.eliminada [name=nombre] { text-decoration: line-through; }
.c24-fila-etapa.eliminada [data-eliminar] { background: var(--bs-danger); color: #fff; }
/* Post Venta: prioridad de cada caso */
.c24-prioridad { display: inline-flex; align-items: center; gap: .3rem; font-size: .75rem; font-weight: 600; padding: .1rem .5rem;
  border-radius: 2rem; color: var(--prioridad); background: color-mix(in srgb, var(--prioridad) 14%, transparent); }
.c24-comentario { border-left: 3px solid var(--c24-linea-fuerte); padding: .25rem 0 .25rem .85rem; }
.c24-comentario.evento { border-left-color: transparent; color: var(--c24-suave); font-size: .875rem; }

/* ---------------- Estados de los usuarios (Inicio) ---------------- */
.c24-estado-punto { display: inline-block; width: .65rem; height: .65rem; border-radius: 50%; margin-right: .4rem; background: var(--estado); box-shadow: 0 0 0 3px color-mix(in srgb, var(--estado) 25%, transparent); vertical-align: middle; }
.c24-estado-boton { border: 1px solid var(--bs-border-color); color: var(--bs-body-color); background: transparent; }
.c24-estado-boton i { color: var(--estado); }
.c24-estado-boton:hover { border-color: var(--estado); }
.c24-estado-boton.activo { border-color: var(--estado); background: color-mix(in srgb, var(--estado) 16%, transparent); font-weight: 600; }
.c24-estado-muestra { display: inline-block; width: 2.25rem; height: 1.25rem; border-radius: .4rem; background: var(--estado); border: 1px solid color-mix(in srgb, var(--estado) 60%, #000); }
/* Círculo de estado junto a la foto del usuario en la barra superior */
.c24-avatar-estado { position: relative; display: inline-flex; }
.c24-avatar-estado .c24-estado-punto { position: absolute; right: -3px; bottom: -3px; width: .75rem; height: .75rem; margin: 0; box-shadow: 0 0 0 2px var(--bs-body-bg); }
.c24-nav-rol { font-size: .72rem; }
/* Estado en el menú de la foto (arriba a la derecha) */
.c24-menu-usuario { min-width: 250px; }
.c24-estado-opcion { gap: .6rem; }
.c24-estado-opcion .c24-estado-punto { margin-right: 0; }
.c24-estado-opcion .c24-estado-check { visibility: hidden; color: var(--estado); }
.c24-estado-opcion.activo { font-weight: 600; }
.c24-estado-opcion.activo .c24-estado-check { visibility: visible; }
.c24-estado-nota { font-size: .72rem; }
