:root {
    --primary-color: #1A237E;
    --secondary-color: #6c757d;
    --navbar-light-bg: #f8f9fa;
    --navbar-light-text: #333;
    --footer-light-bg: #f1f1f1;
    --footer-light-text: #333;
    --dark-bg: #121212;
    --dark-text: #fff;
}


/* === 1. Fondo General === */
body {
    background-color: #f5f5f9; /* Color de fondo similar a Sneat */
    font-family: 'Poppins', sans-serif; /* Fuente moderna */
    color: #5a5a5a; /* Color de texto */
}

/* === Ajustar el Espaciado del Contenedor Principal === */
.container {
    margin-top: 10px !important; /* Reduce el espacio entre el breadcrumb y el contenido */
    padding-top: 0px;
}

.container-wide {
    max-width: 85%;
    width: 85%;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0;
    padding-right: 0;
}

/* Navbar */
.navbar {
    transition: all 0.3s ease-in-out;
}

.navbar .nav-item .nav-link {
    color: #333; /* Color oscuro por defecto */
    background: transparent;
    padding: 8px 15px;
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
}

.navbar .nav-item .nav-link:hover, 
.navbar .nav-item .nav-link:focus {
    background: rgba(0, 0, 0, 0.1); /* Efecto hover */
}

[data-bs-theme="dark"] .navbar .nav-item .nav-link {
    color: #fff; /* Texto blanco en modo oscuro */
}

[data-bs-theme="dark"] .navbar .nav-item .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Light Mode */
[data-bs-theme="light"] .navbar {
    background-color: var(--navbar-light-bg);
    color: var(--navbar-light-text);
}
[data-bs-theme="light"] .navbar .nav-link {
    color: var(--navbar-light-text);
}
[data-bs-theme="light"] .navbar-brand img {
    content: url('/images/logo-light.png');
    width: 110px; /* 🔹 Establece el ancho */
    height: auto; /* 🔹 Mantiene la proporción */
}

/* Dark Mode */
[data-bs-theme="dark"] .navbar {
    background-color: var(--dark-bg);
    color: var(--dark-text);
}
[data-bs-theme="dark"] .navbar .nav-link {
    color: var(--dark-text);
}
[data-bs-theme="dark"] .navbar-brand img {
    content: url('/images/logo-dark.png');
    width: 110px; /* 🔹 Establece el ancho */
    height: auto; /* 🔹 Mantiene la proporción */
}

/* Footer */
footer {
    transition: all 0.3s ease-in-out;
    padding: 15px 0;
    text-align: center;
}

/* Light Mode Footer */
[data-bs-theme="light"] footer {
    background: var(--footer-light-bg);
    color: var(--footer-light-text);
}

/* Dark Mode Footer */
[data-bs-theme="dark"] footer {
    background: var(--dark-bg);
    color: var(--dark-text);
}

/* Evita que la tabla se salga del container */
.table-responsive {
    max-width: 100%;
    overflow-x: auto;
}

/* Asegura que la tabla ocupe el ancho correcto */
.table {
    width: 100%;
    table-layout: auto; /* Permite que las columnas se ajusten dinámicamente */
}

/* Ajuste para pantallas pequeñas */
@media (max-width: 768px) {
    .table {
        font-size: 0.8rem;
    }
    .table th, .table td {
        padding: 4px 6px;
    }
}

/* Reducir el tamaño de fuente en la tabla */
.table {
    font-size: 0.85rem; /* Reduce el tamaño general de la tabla */
}

/* Ajustar el padding para hacer la tabla más compacta */
.table th, .table td {
    padding: 6px 8px; /* Reduce el espacio interno de las celdas */
    white-space: nowrap; /* Evita saltos de línea */
    text-overflow: ellipsis; /* Muestra "..." si el contenido es muy largo */
    overflow: hidden;
}

/* Permitir que la tabla sea responsive y se pueda deslizar en pantallas pequeñas */
.table-responsive {
    overflow-x: auto;
}


.table {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
}

.table th {
    background-color: #6c7c90;
    color: white;
    text-align: center;
}

/* Mantener el estilo original de los encabezados */
.table th a {
    color: inherit; /* Usa el color original del encabezado */
    text-decoration: none; /* Evita subrayados */
    font-weight: bold; /* Mantiene la fuerza del texto */
}

.table td {
    text-align: center;
    vertical-align: middle;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.pagination .page-item .page-link {
    color: #007bff;
    transition: background 0.3s ease-in-out;
}

.pagination .page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

.pagination .page-item .page-link:hover {
    background-color: #0056b3;
    color: white;
}

.progress {
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    font-weight: bold;
}

.nav-tabs .nav-link {
    color: #007bff;
    transition: background 0.3s ease-in-out;
}

.nav-tabs .nav-link.active {
    background-color: #007bff;
    color: white;
}

.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.breadcrumb {
    background-color: #f8f9fa;
    border-radius: 5px;
    margin-top: 15px;
}

.breadcrumb-item a {
    text-decoration: none;
    color: #007bff;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}


/* === 2. Estilos para Cards (Sombras y Bordes) === */
.card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Efecto sutil de sombra */
    padding: 20px;
    border: none;
    transition: all 0.3s ease-in-out;
}

.card:hover {
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15); /* Aumenta la sombra al pasar el mouse */
}

/* === 3. Ajuste de Breadcrumbs === */
.breadcrumb {
    background-color: #fff;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.breadcrumb-item a {
    color: #696cff; /* Color similar a Sneat */
    font-weight: 500;
}

.breadcrumb-item.active {
    color: #5a5a5a;
}

/* === 5. Botones === */
.btn-primary {
    background-color: #1A237E;
    border-color: #1A237E;
}

.btn-primary:hover {
    background-color: #42488a;
    border-color: #42488a;
}

.btn-secondary {
    background-color: #2bd2a8;
    border-color: #2bd2a8;
}

.btn-secondary:hover {
    background-color: #1DE9B6;
    border-color: #1DE9B6;
}

.btn-danger {
    background-color: #ff4d4f;
    border-color: #ff4d4f;
}

.btn-danger:hover {
    background-color: #d9363e;
    border-color: #d9363e;
}

/* === 6. Formularios === */
.form-control {
    border-radius: 6px;
    border: 1px solid #ccc;
    transition: all 0.3s ease-in-out;
}

.form-control:focus {
    border-color: #696cff;
    box-shadow: 0 0 5px rgba(105, 108, 255, 0.3);
}

/* === Dropdown de Login como Card === */
.dropdown-menu {
    background: #fff;
    border-radius: 10px; /* Bordes redondeados */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Sombra sutil */
    border: 1px solid #ddd; /* Borde ligero */
    padding: 20px;
    min-width: 260px; /* Asegura un tamaño adecuado */
}

.dropdown-menu form .form-control {
    border-radius: 6px;
    border: 1px solid #ccc;
    transition: all 0.3s ease-in-out;
}

.dropdown-menu form .form-control:focus {
    border-color: #696cff;
    box-shadow: 0 0 5px rgba(105, 108, 255, 0.3);
}


/* === Timeline (Historial de Estados) en una Sola Línea === */
.timeline {
    position: relative;
    padding-left: 30px;
    max-width: 600px; /* 🔹 Mantiene un ancho fijo */
}

.timeline::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 0;
    height: 100%;
    width: 3px;
    background: #ddd;
}

.timeline-item {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    margin-bottom: 10px; /* 🔹 Espaciado mejorado */
}

.timeline-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
}

.timeline-content {
    background: #fff;
    padding: 10px 15px;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    flex-grow: 1;
    min-width: 300px; /* 🔹 Mantiene un ancho uniforme */
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.badge {
    font-size: 13px;
    padding: 5px 10px;
}

.text-muted {
    font-size: 14px;
}

.flight-path {
    position: relative;
    width: 200px;
    height: 50px;
    margin: 0 auto;
    overflow: hidden;
}

#airplane-icon {
    font-size: 2rem;
    color: #007bff;
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    animation: flyPlane 2s linear infinite;
}

@keyframes flyPlane {
    0% {
        left: -30px;
        transform: rotate(-10deg) translateY(-50%);
    }
    50% {
        left: 50%;
        transform: rotate(0deg) translateY(-50%);
    }
    100% {
        left: 100%;
        transform: rotate(10deg) translateY(-50%);
    }
}

/* Mantener la altura igual de ambas tarjetas */
.h-100 {
    height: 100%;
}

/* Alinear mejor el contenido */
.d-flex {
    display: flex;
}

/* Centramos verticalmente */
.align-items-center {
    align-items: center;
}

/* Ajuste para las tarjetas */
.card {
    border-radius: 8px;
}

/* Mejor visualización de los totales */
.fs-5 {
    font-size: 1.25rem;
}

.fw-bold {
    font-weight: bold;
}



  /* Colores institucionales (ajustá a tus HEX exactos) */
  :root{
    --brand-blue: #132a74;
    --brand-mint: #1FE0C1;
    --bg-off:   #e8ecf6;
  }

  /* ====== Layout y jerarquía visual de preferencias ====== */
  .pref-group{
    padding: .5rem 0 1.25rem;
  }
  .pref-group + .pref-group{
    border-top: 1px solid #eef2f7;
    margin-top: 1.25rem;
    padding-top: 1.5rem;
  }
  .pref-group__head{
    display:flex; align-items:center; justify-content:space-between;
    margin-bottom: .75rem;
  }

  .pref-cat{
    padding: .75rem 0 1rem;
  }
  .pref-cat + .pref-cat{
    border-top: 1px dashed #e6ebf3;
    margin-top: .75rem;
    padding-top: 1rem;
  }
  .pref-cat__head{
    margin-bottom: .5rem;
  }

  .chip{
    display:inline-block;
    font-size: .85rem;
    font-weight: 600;
    color: #29407a;
    background: #f3f7ff;
    border: 1px solid #e2e9ff;
    border-radius: 999px;
    padding: .3rem .65rem;
  }

  .pref-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: .8rem 1rem;
  }
  .pref-item{
    display:flex; align-items:center; justify-content:space-between;
    gap: .75rem;
    padding: .7rem .95rem;
    border: 1px solid #eef2f7;
    border-radius: .75rem;
    background: #fff;
    transition: box-shadow .15s ease, border-color .15s ease, background .15s ease;
  }
  .pref-item:hover{
    box-shadow: 0 .25rem .75rem rgba(0,0,0,.05);
    border-color: #e3e9f3;
  }
  .pref-label{
    margin:0;
    font-weight:500;
    line-height:1.25;
    cursor:pointer;
    user-select:none;
  }

  /* ====== Check en “V” institucional (base) ====== */
  .brand-check{ display:inline-block; position:relative; }
  .brand-check input{ position:absolute; opacity:0; pointer-events:none; }

  .check-label{
    --size: 34px;
    width: var(--size); height: var(--size);
    display:grid; place-items:center;
    background: var(--bg-off);
    border-radius: 10px;
    cursor:pointer; position:relative;
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
    box-shadow: inset 0 0 0 2px rgba(0,0,0,.06);
  }
  .check-label:hover{ transform: translateY(-1px); }

  .tick{ width:72%; height:72%; overflow:visible; }
  .trazo{
    fill:none; stroke-linecap:round; stroke-linejoin:round;
    stroke-width:3.2; stroke-dasharray:18; stroke-dashoffset:18;
  }
  .trazo.left{  stroke: var(--brand-mint); }
  .trazo.right{ stroke: var(--brand-blue); }

  .brand-check input:checked + .check-label{
    background:#fff;
    box-shadow: 0 6px 18px rgba(0,0,0,.12), inset 0 0 0 2px var(--brand-mint);
    animation: pop .28s ease;
  }
  .brand-check input:checked + .check-label .trazo.left{  animation: draw .34s ease forwards; }
  .brand-check input:checked + .check-label .trazo.right{ animation: draw .38s ease .05s forwards; }

  /* Variante compacta para preferencias */
  .brand-check--sm .check-label{
    --size: 28px;
    border-radius: 8px;
  }
  .brand-check--sm .tick{ width:68%; height:68%; }
  .brand-check--sm .trazo{ stroke-width:3; stroke-dasharray:16; stroke-dashoffset:16; }

  /* Festejo sutil */
  .check-label::after{
    content:""; position:absolute; inset:0; margin:auto;
    width:6px; height:6px; border-radius:50%;
    opacity:0; transform: scale(.5); pointer-events:none;
    box-shadow:
      0 -18px var(--brand-mint),
      13px -13px var(--brand-blue),
      18px 0 var(--brand-mint),
      13px 13px var(--brand-blue),
      0 18px var(--brand-mint),
      -13px 13px var(--brand-blue),
      -18px 0 var(--brand-mint),
      -13px -13px var(--brand-blue);
  }
  .brand-check input:checked + .check-label::after{ animation: burst .5s ease forwards; }

  /* Focus accesible */
  .brand-check input:focus-visible + .check-label{
    outline: 2px solid color-mix(in oklab, var(--brand-mint), white 30%);
    outline-offset: 2px;
  }

  /* Animaciones */
  @keyframes draw{ 0%{stroke-dashoffset:18} 100%{stroke-dashoffset:0} }
  @keyframes pop{ 0%{transform:scale(1)} 50%{transform:scale(1.07)} 100%{transform:scale(1)} }
  @keyframes burst{
    0%{opacity:1; transform:scale(.6) rotate(0deg)}
    70%{opacity:1; transform:scale(1.2) rotate(12deg)}
    100%{opacity:0; transform:scale(1.55) rotate(18deg)}
  }

  /* Ajustes móviles */
  @media (max-width: 576px){
    .pref-grid{ gap: .65rem .8rem; }
    .pref-item{ padding: .65rem .85rem; }
    .brand-check--sm .check-label{ --size: 26px; }
  }


    /* ====== Imagen responsive ====== */
  .hero-media{
    display:flex;
    justify-content:center;
    align-items:center;
    margin: 1rem 0 1.5rem;
    padding: 0 .75rem;
  }
  .hero-img{
    width: 100%;
    max-width: 640px;
    height: auto;
    border-radius: 12px;
    display:block;
    object-fit: cover;
    object-position: center;
  }
  @media (max-width: 576px){
    .hero-img{
      aspect-ratio: 16/9; /* recorte suave en móvil */
    }
  }

/* === Chat history === */
.chat-history__panel {
  height: 70vh;
  display: flex;
  flex-direction: column;
}

.chat-history__panel .card-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 0;
}

.chat-history__recent-container {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.chat-history__recent-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: 0.75rem;
  padding-right: 0.25rem;
}

.chat-history__recent-list .chat-history__recent-item {
  width: 100%;
  text-align: left;
  white-space: normal;
  word-break: break-word;
  line-height: 1.2;
  border: 1px solid transparent;
  border-radius: 0.75rem;
  margin-bottom: 0.5rem;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}

.chat-history__recent-list .chat-history__recent-item:last-child {
  margin-bottom: 0;
}

.chat-history__recent-list .chat-history__recent-item:hover {
  background-color: rgba(26, 35, 126, 0.08);
}

.chat-history__recent-list .chat-history__recent-item.active {
  border-color: rgba(26, 35, 126, 0.35);
  background-color: rgba(26, 35, 126, 0.12);
  color: inherit;
}

.chat-history__placeholder {
  padding: 0.5rem 0;
}

.chat-history__messages {
  display: flex;
  flex-direction: column;
  background-color: #f1f5f9;
  border-radius: 0.75rem;
  padding: 1rem;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}

@media (max-width: 991.98px) {
  .chat-history__panel {
    height: auto;
  }

  .chat-history__messages {
    max-height: 60vh;
  }
}

.message-bubble {
  max-width: 70%;
  border-radius: 1rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  background: #ffffff;
  box-shadow: 0 0.25rem 0.75rem rgba(15, 23, 42, 0.08);
}

.message-bubble--incoming {
  align-self: flex-start;
  background: #ffffff;
}

.message-bubble--outgoing {
  align-self: flex-end;
  background: #1a237e;
  color: #fff;
}

.message-bubble--outgoing a {
  color: #d0d8ff;
}

.message-bubble--transfer {
  align-self: center;
  background: #e2e8f0;
  color: #1f2937;
  max-width: 60%;
  padding: 0.5rem 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.6);
  font-size: 0.85rem;
}

.message-bubble--transfer a {
  color: #0f172a;
  text-decoration: underline;
}

.message-bubble__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  margin-bottom: 0.25rem;
  opacity: 0.8;
}

.message-bubble__meta--transfer {
  justify-content: center;
  color: #475569;
  opacity: 1;
}

.message-bubble--outgoing .message-bubble__meta {
  color: rgba(255, 255, 255, 0.78);
  opacity: 1;
}

.message-bubble--outgoing .message-bubble__meta span {
  color: inherit;
}

.message-bubble--outgoing .message-bubble__status {
  color: rgba(255, 255, 255, 0.9);
}

.message-bubble__datetime {
  font-weight: 600;
}

.message-bubble__status {
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.message-bubble__error {
  font-weight: 600;
}

.message-bubble--transfer .message-bubble__status,
.message-bubble--transfer .message-bubble__error {
  color: inherit;
}

.message-bubble__text {
  white-space: pre-wrap;
  margin-bottom: 0.5rem;
}

.message-bubble__media {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.message-bubble__media img {
  max-height: 320px;
  object-fit: contain;
}

.message-bubble__transfer-link {
  text-align: center;
  margin: 0.35rem 0;
  font-weight: 600;
}

.message-bubble__transfer-link a {
  color: #0f172a;
  text-decoration: underline;
}

.message-bubble__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.75rem;
}

.message-bubble__footer--transfer {
  justify-content: center;
  color: #475569;
}

.message-bubble__footer--transfer small {
  color: inherit;
}

.message-bubble__footer--outgoing {
  color: rgba(255, 255, 255, 0.9);
}

.message-bubble__footer--outgoing small {
  color: inherit;
}

@media (max-width: 768px) {
  .message-bubble {
    max-width: 100%;
  }

  .message-bubble--transfer {
    max-width: 80%;
  }
}




    :root {
      /* Paleta moderna azul oscuro profundo */
      --cb-bg: #0b1b2b;            /* fondo panel */
      --cb-bg-2: #0f2438;          /* fondo más claro */
      --cb-accent: #2f6fed;        /* acento */
      --cb-accent-2: #4a86ff;      /* acento hover */
      --cb-text: #ecf1fb;          /* texto principal */
      --cb-text-dim: #c3cbe0;      /* texto tenue */
      --cb-border: #24344a;        /* bordes suaves */
      --cb-error: #ff6b6b;
      --cb-shadow: 0 10px 30px rgba(7, 16, 28, 0.5);
      --cb-radius: 18px;
    }

    /* ========= Bubble flotante ========= */
    .cb-bubble {
      position: fixed;
      right: 22px; bottom: 22px;
      width: 58px; height: 58px;
      border-radius: 50%;
      background: linear-gradient(135deg, var(--cb-accent), #1b49d4);
      box-shadow: var(--cb-shadow);
      display: grid; place-items: center;
      color: white; cursor: pointer;
      user-select: none; -webkit-user-select: none;
      transition: transform .12s ease, box-shadow .2s ease;
      z-index: 2147483000;
    }
    .cb-bubble svg .cb-orbit {
      transform-origin: 32px 32px;
      animation: cbSpin 9s linear infinite;
    }
    .cb-bubble svg .o2 {
      animation-duration: 13s;
      animation-direction: reverse;
    }
    .cb-bubble svg .o3 {
      animation-duration: 7s;
    }
    @keyframes cbSpin {
      to { transform: rotate(360deg); }
    }

    .cb-bubble:hover { transform: translateY(-2px); }
    .cb-bubble:active { transform: translateY(0); }
    .cb-badge {
      position: absolute; top: -4px; right: -4px;
      min-width: 18px; height: 18px; padding: 0 5px;
      border-radius: 999px; background: #ff3b3b; color: #fff;
      font-size: 11px; line-height: 18px; text-align: center;
      box-shadow: 0 2px 8px rgba(0,0,0,.35);
      display: none;
    }

    /* ========= Ventana de chat ========= */
    .cb-window {
      position: fixed; right: 22px; bottom: 90px;
      width: 360px; max-width: calc(100vw - 28px);
      height: 520px; max-height: calc(100vh - 110px);
      display: none; flex-direction: column;
      border-radius: var(--cb-radius);
      background: linear-gradient(180deg, var(--cb-bg), var(--cb-bg-2));
      color: var(--cb-text);
      border: 1px solid var(--cb-border);
      box-shadow: var(--cb-shadow);
      overflow: hidden;
      z-index: 2147483001;
    }
    .cb-window .cb-input {
  border-top: 1px solid var(--cb-border);
  padding: 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  background: var(--cb-bg-2) !important; /* fuerza fondo oscuro */
}

.cb-window .cb-textarea {
  resize: none;
  height: 46px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--cb-border);
  outline: none;
  background: var(--cb-bg) !important; /* fondo oscuro consistente */
  color: var(--cb-text);
  font-size: 14px;
  line-height: 1.3;
  transition: border-color .12s ease, box-shadow .12s ease;
}

.cb-window .cb-textarea:focus {
  border-color: var(--cb-accent);
  box-shadow: 0 0 0 3px rgba(47,111,237,.16);
}

.cb-window .cb-send {
  height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--cb-accent);
  background: linear-gradient(135deg, var(--cb-accent), var(--cb-accent-2));
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .2s ease;
}

    .cb-window.cb-open { display: flex; }

    .cb-header {
      display: flex; align-items: center; gap: 10px;
      padding: 12px 14px; background: rgba(255,255,255,0.02);
      border-bottom: 1px solid var(--cb-border);
    }
    .cb-avatar {
      width: 34px; height: 34px; border-radius: 50%;
      background: linear-gradient(135deg, var(--cb-accent), var(--cb-accent-2));
      display: grid; place-items: center; font-weight: 700;
      box-shadow: 0 4px 14px rgba(47,111,237,.35);
    }
    .cb-title { font-size: 14px; font-weight: 700; }
    .cb-subtitle { font-size: 12px; color: var(--cb-text-dim); }
    .cb-spacer { flex: 1; }
    .cb-icon-btn {
      width: 34px; height: 34px; display: grid; place-items: center;
      border-radius: 10px; border: 1px solid transparent; cursor: pointer;
      background: rgba(255,255,255,0.04);
      transition: background .15s ease, border-color .15s ease;
    }
    .cb-icon-btn:hover { background: rgba(255,255,255,0.08); border-color: var(--cb-border); }

    .cb-messages { flex: 1; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }

    .cb-msg {
      max-width: 85%; padding: 10px 12px; border-radius: 14px;
      border: 1px solid var(--cb-border); line-height: 1.35;
      white-space: pre-wrap; word-wrap: break-word; font-size: 14px;
      box-shadow: 0 4px 10px rgba(0,0,0,.18);
    }
    .cb-msg-user { align-self: flex-end; background: rgba(47,111,237,.12); border-color: rgba(47,111,237,.35); }
    .cb-msg-bot  { align-self: flex-start; background: rgba(255,255,255,0.03); }

    .cb-typing {
      align-self: flex-start; display: inline-flex; align-items: center; gap: 6px;
      color: var(--cb-text-dim); font-size: 12px; padding: 2px 0 0 2px;
    }
    .cb-dots { display: inline-flex; gap: 3px; }
    .cb-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--cb-text-dim); opacity: .5; animation: cbBlink 1.2s infinite; }
    .cb-dots span:nth-child(2) { animation-delay: .2s; }
    .cb-dots span:nth-child(3) { animation-delay: .4s; }
    @keyframes cbBlink { 0%, 80%, 100% { opacity: .25 } 40% { opacity: 1 } }

    .cb-input {
      border-top: 1px solid var(--cb-border);
      padding: 10px; display: grid; grid-template-columns: 1fr auto; gap: 8px;
      background: rgba(255,255,255,0.02);
    }
    .cb-textarea {
      resize: none; height: 46px; padding: 10px 12px; border-radius: 12px;
      border: 1px solid var(--cb-border); outline: none; background: #0a1a2a;
      color: var(--cb-text); font-size: 14px; line-height: 1.3;
      transition: border-color .12s ease, box-shadow .12s ease;
    }
    .cb-textarea:focus { border-color: var(--cb-accent); box-shadow: 0 0 0 3px rgba(47,111,237,.16); }
    .cb-send {
      height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--cb-accent);
      background: linear-gradient(135deg, var(--cb-accent), var(--cb-accent-2)); color: #fff; font-weight: 600;
      cursor: pointer; transition: transform .12s ease, box-shadow .2s ease;
    }
    .cb-send:hover { box-shadow: 0 6px 18px rgba(47,111,237,.35); }
    .cb-send:disabled { opacity: .7; cursor: not-allowed; }

    .cb-toast { position: fixed; right: 22px; bottom: 90px; background: #102133; color: #fff; border: 1px solid var(--cb-border); padding: 10px 12px; border-radius: 12px; display: none; z-index: 2147483002; box-shadow: var(--cb-shadow); font-size: 13px; }

    /* A11y oculto solo para lectores */
    .cb-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

    @media (max-height: 640px) {
      .cb-window { height: 70vh; }
    }
