/* =============================================================================
   Soporte Técnico · Bio. Plataforma
   Estilo limpio y compacto · menú lateral en escritorio · barra inferior en móvil
   Requiere static/css/bio_base.css (tokens de marca).
   ============================================================================= */

:root {
  --sidebar-w: 248px;
  --topbar-h: 60px;
  --bottom-nav-h: 60px;
  --serie-atendidos: #2a78d6;
  --serie-creados: #eb6834;

  --bs-body-font-family: var(--bio-font);
  --bs-body-font-size: .875rem;
  --bs-body-line-height: 1.5;
  --bs-body-color: var(--bio-text);
  --bs-body-bg: var(--bio-page);
  --bs-border-color: var(--bio-border);
  --bs-secondary-color: var(--bio-text-2);
  --bs-primary: var(--bio-orange-dark);
  --bs-primary-rgb: 204, 72, 0;
  --bs-link-color: var(--bio-brown);
  --bs-link-color-rgb: 168, 59, 0;
  --bs-link-hover-color: #7f2d00;
  --bs-link-hover-color-rgb: 127, 45, 0;
  --bs-border-radius: var(--bio-radius);
  --bs-border-radius-sm: var(--bio-radius-sm);
  --bs-border-radius-lg: var(--bio-radius-lg);
  --bs-focus-ring-color: rgba(255, 90, 0, .25);
}

html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--bio-font);
  font-size: .875rem;
  background: var(--bio-page);
  color: var(--bio-text);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 { color: var(--bio-text); letter-spacing: -.011em; }
a { text-decoration: none; }
a:hover { text-decoration: underline; }
.text-muted, .text-secondary { color: var(--bio-text-3) !important; }
.small, small { font-size: .8125rem; }
.tabular { font-variant-numeric: tabular-nums; }
::selection { background: var(--bio-orange-100); }

/* ── Botones ───────────────────────────────────────────────────────────────── */
.btn {
  --bs-btn-font-size: .875rem;
  --bs-btn-font-weight: 500;
  --bs-btn-padding-y: .45rem;
  --bs-btn-padding-x: .9rem;
  --bs-btn-border-radius: var(--bio-radius);
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-sm { --bs-btn-padding-y: .3rem; --bs-btn-padding-x: .65rem; --bs-btn-font-size: .8125rem; gap: .35rem; }
.btn-lg { --bs-btn-padding-y: .65rem; --bs-btn-font-size: .95rem; }
.btn-primary {
  --bs-btn-bg: var(--bio-orange-dark); --bs-btn-border-color: var(--bio-orange-dark);
  --bs-btn-hover-bg: var(--bio-brown); --bs-btn-hover-border-color: var(--bio-brown);
  --bs-btn-active-bg: #8f3200; --bs-btn-active-border-color: #8f3200;
  --bs-btn-disabled-bg: var(--bio-orange-dark); --bs-btn-disabled-border-color: var(--bio-orange-dark);
  --bs-btn-focus-shadow-rgb: 255, 90, 0;
  box-shadow: 0 1px 2px rgba(168, 59, 0, .25);
}
.btn-light, .btn-outline-secondary {
  --bs-btn-color: var(--bio-text); --bs-btn-bg: var(--bio-surface); --bs-btn-border-color: var(--bio-border-strong);
  --bs-btn-hover-color: var(--bio-text); --bs-btn-hover-bg: var(--bio-subtle); --bs-btn-hover-border-color: #c4c0ba;
  --bs-btn-active-color: var(--bio-text); --bs-btn-active-bg: #f0efec; --bs-btn-active-border-color: #c4c0ba;
  box-shadow: var(--bio-shadow-sm);
}
.btn-outline-primary {
  --bs-btn-color: var(--bio-brown); --bs-btn-border-color: var(--bio-orange-200);
  --bs-btn-hover-color: var(--bio-brown); --bs-btn-hover-bg: var(--bio-orange-50); --bs-btn-hover-border-color: var(--bio-orange-dark);
  --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--bio-orange-dark); --bs-btn-active-border-color: var(--bio-orange-dark);
}
.btn-ghost {
  --bs-btn-color: var(--bio-text-2); --bs-btn-bg: transparent; --bs-btn-border-color: transparent;
  --bs-btn-hover-color: var(--bio-text); --bs-btn-hover-bg: #efeeeb; --bs-btn-active-bg: #e7e5e1;
}
.btn-danger-soft {
  --bs-btn-color: var(--bio-danger); --bs-btn-bg: var(--bio-surface); --bs-btn-border-color: #f3c7c7;
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--bio-danger); --bs-btn-hover-border-color: var(--bio-danger);
}
.btn-icon { width: 36px; height: 36px; padding: 0; }

/* ── Formularios ──────────────────────────────────────────────────────────── */
.form-label { font-size: .8125rem; font-weight: 500; color: var(--bio-text-2); margin-bottom: .3rem; }
.form-label .req { color: var(--bio-orange-dark); margin-left: 2px; }
.form-control, .form-select {
  font-size: .875rem; padding: .45rem .7rem; min-height: 38px;
  border-color: var(--bio-border-strong); border-radius: var(--bio-radius);
  background-color: var(--bio-surface); color: var(--bio-text);
  box-shadow: var(--bio-shadow-sm);
}
.form-select { padding-right: 2rem; background-position: right .6rem center; }
.form-control::placeholder { color: #aaa49d; }
.form-control:focus, .form-select:focus {
  border-color: var(--bio-orange); box-shadow: 0 0 0 3px rgba(255, 90, 0, .15);
}
textarea.form-control { min-height: 84px; line-height: 1.5; }
.form-text { font-size: .75rem; color: var(--bio-text-3); margin-top: .3rem; }
.form-check-input { width: 1.05em; height: 1.05em; margin-top: .2em; border-color: var(--bio-border-strong); }
.form-check-input:checked { background-color: var(--bio-orange-dark); border-color: var(--bio-orange-dark); }
.form-check-input:focus { border-color: var(--bio-orange); box-shadow: 0 0 0 3px rgba(255, 90, 0, .15); }
.form-check-label { font-size: .8125rem; color: var(--bio-text-2); }
.campo { margin-bottom: .9rem; }
.campo:last-child { margin-bottom: 0; }
.campo.con-error .form-control, .campo.con-error .form-select { border-color: #e0a3a3; }
.errorlist { list-style: none; padding: 0; margin: .3rem 0 0; color: var(--bio-danger); font-size: .75rem; }
.campo-oculto { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.grid-form { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 1rem; }
.grid-form > * { grid-column: span 12; }
@media (min-width: 768px) {
  .grid-form > .c-6 { grid-column: span 6; }
  .grid-form > .c-4 { grid-column: span 4; }
  .grid-form > .c-8 { grid-column: span 8; }
}

/* Selector segmentado (radios) */
.segmentos { display: flex; flex-wrap: wrap; gap: .4rem; }
.segmentos .opcion { position: relative; }
.segmentos input { position: absolute; opacity: 0; pointer-events: none; }
.segmentos label {
  display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; user-select: none;
  padding: .4rem .75rem; min-height: 36px; border-radius: 999px; font-size: .8125rem; font-weight: 500;
  border: 1px solid var(--bio-border-strong); background: var(--bio-surface); color: var(--bio-text-2);
  transition: background-color .12s, border-color .12s, color .12s;
}
.segmentos label:hover { border-color: #c4c0ba; color: var(--bio-text); }
.segmentos input:checked + label { background: var(--bio-orange-50); border-color: var(--bio-orange-dark); color: var(--bio-brown); }
.segmentos input:focus-visible + label { box-shadow: 0 0 0 3px rgba(255, 90, 0, .2); }
.segmentos label i { font-size: .8rem; opacity: .8; }

/* Zona de archivos */
.zona-archivos {
  display: flex; align-items: center; gap: .75rem; padding: .7rem .8rem; cursor: pointer;
  border: 1px dashed var(--bio-border-strong); border-radius: var(--bio-radius); background: var(--bio-subtle);
  color: var(--bio-text-2); font-size: .8125rem; transition: border-color .12s, background-color .12s;
}
.zona-archivos:hover { border-color: var(--bio-orange); background: var(--bio-orange-50); }
.zona-archivos .icono {
  width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; flex: none;
  background: var(--bio-surface); border: 1px solid var(--bio-border); color: var(--bio-orange-dark);
}
.zona-archivos strong { color: var(--bio-text); font-weight: 600; }
.zona-archivos input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.zona-archivos .seleccion { color: var(--bio-brown); font-weight: 500; }

/* ── Layout de la aplicación ──────────────────────────────────────────────── */
.app-sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 1040;
  background: var(--bio-sidebar); color: #d6d3d1; display: none; flex-direction: column;
}
.app-main { min-height: 100vh; display: flex; flex-direction: column; }
@media (min-width: 992px) {
  .app-sidebar { display: flex; }
  .app-main { margin-left: var(--sidebar-w); }
}
.sidebar-marca {
  height: var(--topbar-h); display: flex; align-items: center; gap: .6rem; padding: 0 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, .06); color: #fff;
}
.sidebar-marca:hover { text-decoration: none; color: #fff; }
.sidebar-marca img { width: 30px; height: 30px; border-radius: 50%; }
.sidebar-marca .nombre { font-weight: 700; font-size: 1.05rem; letter-spacing: -.02em; line-height: 1.1; }
.sidebar-marca .nombre small { display: block; font-weight: 500; font-size: .7rem; color: #a8a29e; letter-spacing: .02em; }
.sidebar-nav { padding: .9rem .7rem; overflow-y: auto; flex: 1; }
.sidebar-seccion {
  font-size: .6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em;
  color: #78716c; padding: .9rem .6rem .35rem;
}
.sidebar-seccion:first-child { padding-top: .2rem; }
.sidebar-link {
  position: relative; display: flex; align-items: center; gap: .7rem; padding: .5rem .6rem; margin-bottom: 2px;
  border-radius: var(--bio-radius); color: #d6d3d1; font-weight: 500; font-size: .875rem;
}
.sidebar-link i { width: 18px; text-align: center; color: #8a847d; font-size: .9rem; }
.sidebar-link:hover { background: var(--bio-sidebar-2); color: #fff; text-decoration: none; }
.sidebar-link:hover i { color: #d6d3d1; }
.sidebar-link.activo { background: rgba(255, 90, 0, .14); color: #fff; }
.sidebar-link.activo i { color: var(--bio-orange); }
.sidebar-link.activo::before {
  content: ""; position: absolute; left: -.7rem; top: 8px; bottom: 8px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--bio-orange);
}
.sidebar-link .badge-nav {
  margin-left: auto; min-width: 22px; padding: 0 .4rem; height: 20px; line-height: 20px; text-align: center;
  border-radius: 999px; font-size: .7rem; font-weight: 600; background: #3a3634; color: #e7e5e4;
}
.sidebar-link.activo .badge-nav, .badge-nav.alerta { background: var(--bio-orange); color: #fff; }
.sidebar-accion { margin: 0 .1rem .9rem; }
.sidebar-accion .btn { width: 100%; }
.sidebar-usuario {
  display: flex; align-items: center; gap: .6rem; padding: .8rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, .06);
}
.sidebar-usuario .datos { min-width: 0; flex: 1; line-height: 1.2; }
.sidebar-usuario .datos strong { display: block; color: #fff; font-size: .8125rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-usuario .datos span { font-size: .72rem; color: #a8a29e; }
.sidebar-usuario .btn-ghost { --bs-btn-color: #a8a29e; --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--bio-sidebar-2); }

.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none; display: inline-grid; place-items: center;
  font-size: .72rem; font-weight: 600; color: #fff; background: var(--bio-orange-dark); letter-spacing: .02em;
}
.avatar.sm { width: 26px; height: 26px; font-size: .64rem; }
.avatar.gris { background: #78716c; }
.avatar.azul { background: #2a78d6; }

.app-topbar {
  position: sticky; top: 0; z-index: 1030; height: var(--topbar-h);
  display: flex; align-items: center; gap: .75rem; padding: 0 1rem;
  background: rgba(255, 255, 255, .92); backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--bio-border);
}
@media (min-width: 992px) { .app-topbar { padding: 0 1.5rem; } }
.topbar-marca { display: flex; align-items: center; gap: .5rem; color: var(--bio-text); font-weight: 700; letter-spacing: -.02em; }
.topbar-marca:hover { text-decoration: none; color: var(--bio-text); }
.topbar-marca img { width: 28px; height: 28px; border-radius: 50%; }
.topbar-marca span small { color: var(--bio-text-3); font-weight: 500; margin-left: .15rem; }
.topbar-busqueda { position: relative; flex: 1; max-width: 420px; }
.topbar-busqueda i { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: var(--bio-text-3); font-size: .8rem; }
.topbar-busqueda .form-control { padding-left: 2rem; background: var(--bio-subtle); box-shadow: none; min-height: 36px; }
.topbar-busqueda .form-control:focus { background: #fff; }
.dropdown-menu {
  --bs-dropdown-font-size: .875rem; --bs-dropdown-border-color: var(--bio-border);
  --bs-dropdown-border-radius: var(--bio-radius-lg); --bs-dropdown-link-active-bg: var(--bio-orange-dark);
  --bs-dropdown-item-padding-y: .45rem; box-shadow: var(--bio-shadow-lg); padding: .35rem;
}
.dropdown-item { border-radius: var(--bio-radius-sm); display: flex; align-items: center; gap: .55rem; }
.dropdown-item i { width: 16px; text-align: center; color: var(--bio-text-3); }
.dropdown-item:hover { text-decoration: none; }

.app-content { flex: 1; width: 100%; max-width: 1320px; margin: 0 auto; padding: 1.1rem 1rem 1.5rem; }
@media (min-width: 992px) { .app-content { padding: 1.5rem 1.75rem 2rem; } }
body.panel { padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)); }
body.panel.con-barra-accion { padding-bottom: calc(var(--bottom-nav-h) + 68px + env(safe-area-inset-bottom)); }
@media (min-width: 992px) {
  body.panel, body.panel.con-barra-accion { padding-bottom: 0; }
}

/* Encabezado de página */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.page-head h1 { font-size: 1.25rem; font-weight: 650; margin: 0; }
.page-head .sub { color: var(--bio-text-3); font-size: .8125rem; margin-top: .15rem; }
.page-head .acciones { display: flex; gap: .5rem; flex-wrap: wrap; }
.volver { display: inline-flex; align-items: center; gap: .35rem; color: var(--bio-text-3); font-size: .8125rem; margin-bottom: .35rem; }
.volver:hover { color: var(--bio-text); text-decoration: none; }

/* Navegación inferior (móvil) */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
  height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255, 255, 255, .97); backdrop-filter: blur(8px); border-top: 1px solid var(--bio-border);
  display: flex; justify-content: space-around;
}
@media (min-width: 992px) { .bottom-nav { display: none; } }
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--bio-text-3); font-size: .6875rem; font-weight: 500; position: relative;
}
.bottom-nav a:hover { text-decoration: none; }
.bottom-nav a i { font-size: 1.1rem; }
.bottom-nav a.activo { color: var(--bio-brown); }
.bottom-nav a.activo i { color: var(--bio-orange); }
.bottom-nav a.nuevo i {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 1rem;
  background: var(--bio-orange-dark); color: #fff; box-shadow: 0 4px 10px rgba(204, 72, 0, .35);
}
.bottom-nav a.nuevo { gap: 1px; }
.bottom-nav .contador {
  position: absolute; top: 5px; left: calc(50% + 5px); min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: var(--bio-orange); color: #fff; font-size: .625rem; font-weight: 700;
  line-height: 17px; text-align: center; box-shadow: 0 0 0 2px #fff;
}

/* Mensajes */
.alert { font-size: .8125rem; border-radius: var(--bio-radius); padding: .6rem .85rem; display: flex; gap: .55rem; align-items: flex-start; }
.alert .btn-close { padding: .85rem; font-size: .6rem; }
.alert-success { --bs-alert-bg: #edf7ee; --bs-alert-border-color: #c6e3c8; --bs-alert-color: #1e5b22; }
.alert-danger { --bs-alert-bg: #fdf0f0; --bs-alert-border-color: #f1c7c7; --bs-alert-color: #8e1f1f; }
.alert-info { --bs-alert-bg: #eef5fd; --bs-alert-border-color: #cfe0f5; --bs-alert-color: #1d4f8f; }
.alert-warning { --bs-alert-bg: #fff8e6; --bs-alert-border-color: #f3dea5; --bs-alert-color: #7a5200; }
.alert-secondary { --bs-alert-bg: #f3f2ef; --bs-alert-border-color: var(--bio-border); --bs-alert-color: var(--bio-text-2); }

/* ── Tarjetas ─────────────────────────────────────────────────────────────── */
.tarjeta {
  background: var(--bio-surface); border: 1px solid var(--bio-border); border-radius: var(--bio-radius-lg);
  box-shadow: var(--bio-shadow-sm);
}
.tarjeta + .tarjeta { margin-top: 1rem; }
.tarjeta-head {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .8rem 1rem; border-bottom: 1px solid var(--bio-border);
}
.tarjeta-head h2 { font-size: .9375rem; font-weight: 600; margin: 0; display: flex; align-items: center; gap: .5rem; }
.tarjeta-head h2 i { color: var(--bio-text-3); font-size: .85rem; }
.tarjeta-head .sub { font-size: .75rem; color: var(--bio-text-3); margin-top: 1px; }
.tarjeta-head a { font-size: .8125rem; font-weight: 500; }
.tarjeta-body { padding: 1rem; }
.tarjeta-foot { padding: .75rem 1rem; border-top: 1px solid var(--bio-border); background: var(--bio-subtle); border-radius: 0 0 var(--bio-radius-lg) var(--bio-radius-lg); }
.tarjeta.sin-borde-head .tarjeta-head { border-bottom: 0; padding-bottom: 0; }

/* Pills */
.pill {
  display: inline-flex; align-items: center; gap: .3rem; padding: 1px 8px; border-radius: 999px;
  font-size: .72rem; font-weight: 600; white-space: nowrap; line-height: 1.55;
}
.pill i { font-size: .65rem; }
.pill.punto::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ── Dashboard ────────────────────────────────────────────────────────────── */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; }
@media (min-width: 1200px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; } }
.kpi {
  display: flex; flex-direction: column; gap: .15rem; padding: .9rem 1rem; color: inherit;
  background: var(--bio-surface); border: 1px solid var(--bio-border); border-radius: var(--bio-radius-lg);
  box-shadow: var(--bio-shadow-sm); transition: border-color .12s, box-shadow .12s;
}
.kpi:hover { color: inherit; text-decoration: none; border-color: var(--bio-orange-200); box-shadow: var(--bio-shadow); }
.kpi .kpi-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.kpi .etiqueta { font-size: .8125rem; color: var(--bio-text-2); font-weight: 500; }
.kpi .icono {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-size: .8rem;
  background: var(--bio-orange-50); color: var(--bio-orange-dark);
}
.kpi .valor { font-size: 1.75rem; font-weight: 650; letter-spacing: -.02em; line-height: 1.15; margin-top: .25rem; }
.kpi .detalle { font-size: .75rem; color: var(--bio-text-3); }
.kpi .detalle strong { color: var(--bio-text-2); font-weight: 600; }
.kpi-sla .valores { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 1rem; margin-top: .25rem; }
@media (max-width: 575.98px) {
  .kpi { padding: .8rem .85rem; }
  .kpi .valor { font-size: 1.5rem; }
  .kpi .icono { width: 26px; height: 26px; font-size: .72rem; }
  .kpi-sla .valores { flex-direction: column; gap: 0; }
  .tarjeta-head { flex-wrap: wrap; }
  .page-head .sub .opcional { display: none; }
}
.kpi-sla .valores > span { display: inline-flex; align-items: baseline; gap: .35rem; }
.kpi-sla .valores .valor { margin: 0; }
.kpi-sla .valores small { font-size: .75rem; color: var(--bio-text-3); display: inline-flex; align-items: center; gap: .25rem; }
.i-rojo { color: #d03b3b; }
.i-amarillo { color: #c98500; }
.i-verde { color: #2e7d32; }

.segmentado { display: inline-flex; background: #ecebe8; border-radius: var(--bio-radius); padding: 3px; }
.segmentado a {
  padding: .28rem .75rem; border-radius: 6px; font-size: .8125rem; font-weight: 500; color: var(--bio-text-2);
  min-height: 30px; display: inline-flex; align-items: center;
}
.segmentado a:hover { text-decoration: none; color: var(--bio-text); }
.segmentado a.activo { background: #fff; color: var(--bio-text); box-shadow: var(--bio-shadow-sm); }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
@media (min-width: 1200px) {
  .dash-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
  .dash-grid .span-2 { grid-column: span 2; }
}
.dash-grid .tarjeta + .tarjeta { margin-top: 0; }

.leyenda { display: flex; gap: .9rem; font-size: .75rem; color: var(--bio-text-2); flex-wrap: wrap; }
.leyenda .clave { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: .35rem; }
.grafico { position: relative; }
.grafico svg { width: 100%; height: auto; display: block; overflow: visible; }
.grafico .grid { stroke: #ecebe7; stroke-width: 1; }
.grafico .base { stroke: var(--bio-border-strong); stroke-width: 1; }
.grafico .tick { fill: var(--bio-text-3); font-size: 11px; font-family: var(--bio-font); font-variant-numeric: tabular-nums; }
.grafico .serie { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.grafico .serie.atendidos { stroke: var(--serie-atendidos); }
.grafico .serie.creados { stroke: var(--serie-creados); }
.grafico .area-atendidos { fill: var(--serie-atendidos); opacity: .08; }
.grafico .punto { stroke: #fff; stroke-width: 2; }
.grafico .punto.atendidos { fill: var(--serie-atendidos); }
.grafico .punto.creados { fill: var(--serie-creados); }
.grafico .etiqueta-fin { fill: var(--bio-text); font-size: 12px; font-weight: 600; font-family: var(--bio-font); }
.grafico .banda { fill: transparent; cursor: crosshair; outline: none; }
.grafico .cursor { stroke: var(--bio-border-strong); stroke-width: 1; }
.grafico .tooltip-grafico {
  position: absolute; pointer-events: none; background: #fff; border: 1px solid var(--bio-border);
  border-radius: var(--bio-radius); padding: .45rem .65rem; font-size: .75rem; box-shadow: var(--bio-shadow-lg);
  white-space: nowrap; transform: translate(-50%, -110%); z-index: 2; line-height: 1.6;
}
.tooltip-grafico .clave { display: inline-block; width: 10px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: .35rem; }
.tabla-datos summary { cursor: pointer; font-size: .75rem; color: var(--bio-text-3); margin-top: .5rem; }

.barra-h { height: 6px; background: #efeeeb; border-radius: 3px; overflow: hidden; }
.barra-h > span { display: block; height: 100%; background: var(--serie-atendidos); border-radius: 0 3px 3px 0; }
.lista-simple { list-style: none; padding: 0; margin: 0; }
.lista-simple li { padding: .6rem 0; border-top: 1px solid #f1f0ed; }
.lista-simple li:first-child { border-top: 0; padding-top: 0; }
.lista-simple li:last-child { padding-bottom: 0; }

.tabla {
  width: 100%; font-size: .8125rem; border-collapse: separate; border-spacing: 0;
}
.tabla th {
  font-size: .72rem; font-weight: 600; color: var(--bio-text-3); text-transform: uppercase; letter-spacing: .04em;
  padding: .55rem .75rem; border-bottom: 1px solid var(--bio-border); background: var(--bio-subtle); white-space: nowrap;
}
.tabla td { padding: .6rem .75rem; border-bottom: 1px solid #f1f0ed; vertical-align: middle; }
.tabla tr:last-child td { border-bottom: 0; }
.tabla .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabla-compacta td, .tabla-compacta th { padding: .45rem .6rem; }

/* ── Listas de tiquetes ───────────────────────────────────────────────────── */
.lista-tickets { background: var(--bio-surface); border: 1px solid var(--bio-border); border-radius: var(--bio-radius-lg); box-shadow: var(--bio-shadow-sm); overflow: hidden; }
.lista-tickets .encabezado { display: none; }
.fila-ticket {
  position: relative; display: grid; gap: .3rem .75rem; padding: .8rem 1rem .8rem 1.1rem;
  grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "cod accion" "asunto asunto" "meta meta";
  border-top: 1px solid #f1f0ed; color: inherit;
}
.fila-ticket:first-child, .encabezado + .fila-ticket { border-top: 0; }
.fila-ticket:hover { background: #fcfbfa; text-decoration: none; color: inherit; }
.fila-ticket::before {
  content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0;
  background: var(--color-prioridad, #d6d3ce);
}
.fila-ticket .f-cod { grid-area: cod; display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; min-width: 0; }
.fila-ticket .codigo { font-size: .75rem; color: var(--bio-text-3); font-weight: 600; font-variant-numeric: tabular-nums; }
.fila-ticket .f-asunto { grid-area: asunto; min-width: 0; }
.fila-ticket .asunto { font-weight: 600; color: var(--bio-text); line-height: 1.35; display: block; }
.fila-ticket a.asunto:hover { color: var(--bio-brown); text-decoration: none; }
.fila-ticket .solicitante { font-size: .75rem; color: var(--bio-text-3); }
.fila-ticket .f-meta { grid-area: meta; display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .8rem; font-size: .75rem; color: var(--bio-text-2); }
.fila-ticket .f-meta i { color: var(--bio-text-3); margin-right: .2rem; }
.fila-ticket .f-estado, .fila-ticket .f-sla, .fila-ticket .f-tecnico, .fila-ticket .f-fecha { display: none; }
.fila-ticket .f-accion { grid-area: accion; align-self: start; }
.fila-ticket .punto-revision {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--bio-orange);
  box-shadow: 0 0 0 3px var(--bio-orange-100); flex: none;
}
.enlace-fila { position: absolute; inset: 0; z-index: 0; }
.fila-ticket > *:not(.enlace-fila) { position: relative; z-index: 1; pointer-events: none; }
.fila-ticket .f-accion, .fila-ticket .f-accion * { pointer-events: auto; }

/* Orden en móvil: los encabezados no se ven, se usan chips */
.orden-movil {
  display: flex; align-items: center; gap: .35rem; overflow-x: auto; padding: 0 0 .6rem;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.orden-movil::-webkit-scrollbar { display: none; }
.orden-movil .etiqueta { font-size: .75rem; color: var(--bio-text-3); flex: none; }
.chip-orden {
  flex: none; font-size: .75rem; padding: .25rem .6rem; border-radius: 999px; white-space: nowrap;
  border: 1px solid var(--bio-border); background: var(--bio-surface); color: var(--bio-text-2); text-decoration: none;
}
.chip-orden i { font-size: .65rem; opacity: .5; }
.chip-orden.activo { background: var(--bio-orange-100); border-color: var(--bio-orange); color: var(--bio-brown); }
.chip-orden.activo i { opacity: 1; }
.chip-orden:hover { text-decoration: none; color: var(--bio-brown); }

@media (min-width: 992px) {
  .orden-movil { display: none; }
  .lista-tickets .encabezado, .fila-ticket {
    display: grid; align-items: center; gap: 0 1rem;
    grid-template-columns: 92px minmax(0, 1fr) 168px 176px 150px 100px var(--col-accion, 0px);
    grid-template-areas: "cod asunto estado sla tecnico fecha accion";
  }
  .lista-tickets .encabezado .th {
    display: flex; align-items: center; gap: .3rem; color: inherit; text-decoration: none; min-width: 0;
  }
  .lista-tickets .encabezado .th.fin { justify-content: flex-end; }
  .lista-tickets .encabezado .th i { font-size: .7rem; opacity: .45; }
  .lista-tickets .encabezado .th:hover { color: var(--bio-brown); text-decoration: none; }
  .lista-tickets .encabezado .th.activo { color: var(--bio-brown); }
  .lista-tickets .encabezado .th.activo i { opacity: 1; }
  .lista-tickets .encabezado {
    padding: .5rem 1rem .5rem 1.1rem; background: var(--bio-subtle); border-bottom: 1px solid var(--bio-border);
    font-size: .6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--bio-text-3);
  }
  .fila-ticket { padding: .7rem 1rem .7rem 1.1rem; }
  .fila-ticket .f-meta { display: none; }
  .fila-ticket .f-estado, .fila-ticket .f-sla, .fila-ticket .f-tecnico, .fila-ticket .f-fecha { display: flex; align-items: center; gap: .4rem; min-width: 0; }
  .fila-ticket .f-estado { grid-area: estado; }
  .fila-ticket .f-sla { grid-area: sla; }
  .fila-ticket .f-tecnico { grid-area: tecnico; font-size: .8125rem; color: var(--bio-text-2); }
  .fila-ticket .f-tecnico span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .fila-ticket .f-fecha {
    grid-area: fecha; font-size: .75rem; color: var(--bio-text-2); flex-direction: column; gap: 0;
    align-items: flex-end; line-height: 1.3; font-variant-numeric: tabular-nums;
  }
  .fila-ticket .f-fecha .hora { color: var(--bio-text-3); }
  .fila-ticket .f-cod .pill { display: none; }
  .lista-tickets.con-accion { --col-accion: 84px; }
  .fila-ticket .f-accion { align-self: center; justify-self: end; }
  .lista-tickets.compacta .encabezado, .lista-tickets.compacta .fila-ticket {
    grid-template-columns: 92px minmax(0, 1fr) 176px; grid-template-areas: "cod asunto sla";
  }
  .lista-tickets.compacta .f-estado, .lista-tickets.compacta .f-tecnico, .lista-tickets.compacta .f-fecha { display: none; }
  .lista-tickets.compacta.con-accion .fila-ticket {
    grid-template-columns: 92px minmax(0, 1fr) 176px var(--col-accion); grid-template-areas: "cod asunto sla accion";
  }
}
.lista-tickets.compacta { border: 0; box-shadow: none; border-radius: 0; }

.vacio { text-align: center; color: var(--bio-text-3); padding: 2.5rem 1rem; font-size: .8125rem; }
.vacio .icono {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin: 0 auto .6rem;
  background: #efeeeb; color: var(--bio-text-3); font-size: 1.1rem;
}
.vacio strong { display: block; color: var(--bio-text-2); font-size: .875rem; margin-bottom: .15rem; }

.paginacion { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-top: .9rem; font-size: .8125rem; color: var(--bio-text-3); }

.barra-filtros { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .9rem; }
.barra-filtros .busqueda { position: relative; flex: 1 1 240px; }
.barra-filtros .busqueda i { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: var(--bio-text-3); font-size: .8rem; }
.barra-filtros .busqueda .form-control { padding-left: 2rem; }
.barra-filtros .form-select { flex: 0 1 160px; }
@media (max-width: 767.98px) { .barra-filtros .form-select { flex: 1 1 calc(50% - .5rem); } }

/* ── Detalle ──────────────────────────────────────────────────────────────── */
.detalle-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (min-width: 992px) { .detalle-grid { grid-template-columns: minmax(0, 1fr) 340px; grid-template-rows: auto 1fr; gap: 1.25rem; } }
@media (min-width: 992px) {
  .detalle-grid > .d-titulo { grid-column: 1; grid-row: 1; }
  .detalle-grid > .d-principal { grid-column: 1; grid-row: 2; }
  .detalle-grid > .detalle-lateral { grid-column: 2; grid-row: 1 / span 2; position: sticky; top: calc(var(--topbar-h) + 1.25rem); }
}
.detalle-lateral .tarjeta + .tarjeta, .d-principal .tarjeta + .tarjeta { margin-top: 1rem; }
@media (max-width: 991.98px) { .detalle-lateral > .tarjeta.d-none + .tarjeta { margin-top: 0; } }
.solicitante-linea { display: flex; align-items: center; gap: .55rem; margin-top: .75rem; font-size: .8125rem; color: var(--bio-text-2); flex-wrap: wrap; }
.solicitante-linea strong { color: var(--bio-text); font-weight: 600; }
.detalle-titulo h1 { font-size: 1.25rem; font-weight: 650; margin: .35rem 0 0; line-height: 1.3; }
.detalle-titulo .etiquetas { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.detalle-titulo .codigo { font-weight: 600; color: var(--bio-text-3); font-size: .8125rem; font-variant-numeric: tabular-nums; }

.propiedades { margin: 0; }
.propiedades > div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: .75rem; padding: .45rem 0; border-top: 1px solid #f1f0ed; font-size: .8125rem; }
.propiedades > div:first-child { border-top: 0; padding-top: 0; }
.propiedades dt { font-weight: 500; color: var(--bio-text-3); }
.propiedades dd { margin: 0; color: var(--bio-text); overflow-wrap: anywhere; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.propiedades dd .sin-dato { color: #b0aaa3; }

.progreso-sla { margin-top: .2rem; }
.progreso-sla .barra { height: 6px; border-radius: 3px; background: #efeeeb; overflow: hidden; }
.progreso-sla .barra span { display: block; height: 100%; border-radius: 3px; }
.progreso-sla .pie { display: flex; justify-content: space-between; font-size: .72rem; color: var(--bio-text-3); margin-top: .3rem; }

.acciones-lista { display: grid; gap: .4rem; }
.acciones-lista form { margin: 0; }
.acciones-lista .btn { width: 100%; justify-content: flex-start; }
.acciones-lista .btn-primary { justify-content: center; }

/* Conversación */
.conversacion { list-style: none; margin: 0; padding: 0; }
.conversacion > li { display: flex; gap: .7rem; padding: .9rem 0; border-top: 1px solid #f1f0ed; }
.conversacion > li:first-child { border-top: 0; padding-top: 0; }
.conversacion .cuerpo { min-width: 0; flex: 1; }
.conversacion .cabecera { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.conversacion .autor { font-weight: 600; font-size: .8125rem; }
.conversacion .hora { font-size: .75rem; color: var(--bio-text-3); }
.conversacion .texto { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: .3rem; font-size: .875rem; color: #2c2825; }
.conversacion li.interno .texto { background: #fffbeb; border: 1px solid #f5e3a8; border-radius: var(--bio-radius); padding: .55rem .7rem; }
.conversacion li.solucion .texto { background: #f0f8f1; border: 1px solid #cfe7d1; border-radius: var(--bio-radius); padding: .55rem .7rem; }
.conversacion li.evento { padding: .45rem 0; align-items: center; }
.conversacion li.evento .icono-evento {
  width: 32px; flex: none; display: grid; place-items: center; color: var(--bio-text-3); font-size: .7rem;
}
.conversacion li.evento .icono-evento span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #f1f0ed; }
.conversacion li.evento .texto-evento { font-size: .75rem; color: var(--bio-text-3); }
.conversacion li.evento .texto-evento strong { color: var(--bio-text-2); font-weight: 600; }
.conversacion li.evento + li.evento { border-top: 0; }

.adjuntos { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .5rem; }
.adjuntos a.miniatura {
  width: 76px; height: 76px; border-radius: var(--bio-radius); overflow: hidden; border: 1px solid var(--bio-border);
  display: block; background: var(--bio-subtle);
}
.adjuntos a.miniatura img { width: 100%; height: 100%; object-fit: cover; }
.adjuntos a.archivo {
  display: inline-flex; align-items: center; gap: .45rem; font-size: .75rem; padding: .35rem .6rem; max-width: 100%;
  border: 1px solid var(--bio-border); border-radius: var(--bio-radius); background: var(--bio-surface); color: var(--bio-text);
}
.adjuntos a.archivo:hover { border-color: var(--bio-orange-200); text-decoration: none; }
.adjuntos a.archivo i { color: var(--bio-orange-dark); }
.adjuntos a.archivo span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.adjuntos a.archivo small { color: var(--bio-text-3); }

.compositor { border: 1px solid var(--bio-border-strong); border-radius: var(--bio-radius-lg); background: #fff; box-shadow: var(--bio-shadow-sm); }
.compositor:focus-within { border-color: var(--bio-orange); box-shadow: 0 0 0 3px rgba(255, 90, 0, .12); }
.compositor textarea { border: 0; box-shadow: none; resize: vertical; min-height: 76px; border-radius: var(--bio-radius-lg) var(--bio-radius-lg) 0 0; }
.compositor textarea:focus { box-shadow: none; }
.compositor .barra { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding: .5rem .6rem; border-top: 1px solid #f1f0ed; background: var(--bio-subtle); border-radius: 0 0 var(--bio-radius-lg) var(--bio-radius-lg); }
.compositor .interno-toggle { display: inline-flex; align-items: center; gap: .4rem; font-size: .8125rem; color: var(--bio-text-2); margin: 0 .25rem; cursor: pointer; }
.compositor .n { font-size: .75rem; color: var(--bio-brown); font-weight: 500; }

.barra-accion {
  position: fixed; left: 0; right: 0; bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)); z-index: 1029;
  background: rgba(255, 255, 255, .97); backdrop-filter: blur(8px); border-top: 1px solid var(--bio-border); padding: .55rem 1rem;
  display: flex; gap: .5rem;
}
.barra-accion .principal { flex: 1; }
@media (min-width: 992px) { .barra-accion { display: none; } }
.pie-formulario { display: none; }
@media (min-width: 992px) {
  .pie-formulario { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1rem; }
}

.modal-content { border: 0; border-radius: var(--bio-radius-lg); box-shadow: var(--bio-shadow-lg); }
.modal-header { border-bottom: 1px solid var(--bio-border); padding: .9rem 1rem; }
.modal-title { font-size: 1rem; font-weight: 600; }
.modal-body { padding: 1rem; }
.modal-footer { border-top: 1px solid var(--bio-border); padding: .7rem 1rem; background: var(--bio-subtle); border-radius: 0 0 var(--bio-radius-lg) var(--bio-radius-lg); }
@media (max-width: 575.98px) { .modal-footer { border-radius: 0; } }

/* ── Público ──────────────────────────────────────────────────────────────── */
body.publico { background: var(--bio-page); }
.publico-header { background: #fff; border-bottom: 1px solid var(--bio-border); }
.publico-header .contenedor { height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.publico-hero { position: relative; overflow: hidden; background: var(--bio-sidebar); color: #fff; padding: 2rem 0 4.5rem; }
.publico-hero::after {
  content: ""; position: absolute; right: -120px; top: -160px; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 90, 0, .55), rgba(255, 90, 0, 0) 70%);
}
.publico-hero::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: linear-gradient(90deg, var(--bio-brown), var(--bio-orange));
}
.publico-hero .contenedor { position: relative; z-index: 1; }
.publico-hero .eyebrow { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #ffb48a; }
.publico-hero h1 { color: #fff; font-size: 1.6rem; font-weight: 700; margin: .35rem 0 .35rem; letter-spacing: -.02em; }
.publico-hero p { color: #d6d3d1; margin: 0; max-width: 560px; }
@media (min-width: 768px) { .publico-hero { padding: 2.75rem 0 5rem; } .publico-hero h1 { font-size: 2rem; } }
.contenedor { width: 100%; max-width: 820px; margin: 0 auto; padding: 0 1rem; }
.contenedor.ancho { max-width: 1080px; }
.publico-cuerpo { margin-top: -3rem; position: relative; z-index: 2; padding-bottom: 2.5rem; }
.publico-pie { text-align: center; font-size: .75rem; color: var(--bio-text-3); padding: 1.5rem 1rem 2rem; }
.seccion-form { padding: 1.1rem 1.1rem 1.2rem; }
.seccion-form + .seccion-form { border-top: 1px solid var(--bio-border); }
.seccion-form .titulo { display: flex; gap: .7rem; align-items: flex-start; margin-bottom: 1rem; }
.seccion-form .titulo .num {
  width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: .75rem;
  font-weight: 700; background: var(--bio-orange-50); color: var(--bio-orange-dark); border: 1px solid var(--bio-orange-100);
}
.seccion-form .titulo h2 { font-size: .9375rem; font-weight: 600; margin: 0; }
.seccion-form .titulo p { font-size: .75rem; color: var(--bio-text-3); margin: .1rem 0 0; }
@media (min-width: 768px) { .seccion-form { padding: 1.4rem 1.6rem 1.5rem; } }

.pasos-estado { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: relative; margin: .25rem 0; }
.pasos-estado::before { content: ""; position: absolute; top: 12px; left: 12.5%; right: 12.5%; height: 2px; background: var(--bio-border); }
.pasos-estado .paso { position: relative; text-align: center; font-size: .72rem; color: var(--bio-text-3); }
.pasos-estado .paso .circulo {
  width: 26px; height: 26px; border-radius: 50%; margin: 0 auto .35rem; background: #fff; border: 2px solid var(--bio-border);
  display: grid; place-items: center; font-size: .6rem; color: var(--bio-text-3);
}
.pasos-estado .paso.hecho { color: var(--bio-text); font-weight: 600; }
.pasos-estado .paso.hecho .circulo { background: var(--bio-orange-dark); border-color: var(--bio-orange-dark); color: #fff; }

.exito-icono {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 1rem;
  background: #e8f5e9; color: var(--bio-success); font-size: 1.4rem; box-shadow: 0 0 0 8px #f3faf3;
}
.codigo-grande {
  display: inline-block; font-size: 1.75rem; font-weight: 700; letter-spacing: .02em; color: var(--bio-brown);
  background: var(--bio-orange-50); border: 1px dashed var(--bio-orange-200); border-radius: var(--bio-radius); padding: .2rem 1rem;
  font-variant-numeric: tabular-nums;
}

/* Login: solo la marca y el formulario, centrados. */
body.login { min-height: 100vh; display: grid; place-items: center; background: var(--bio-subtle); padding: 1.5rem; }
.login-caja {
  width: 100%; max-width: 360px; background: #fff; border: 1px solid var(--bio-border);
  border-radius: var(--bio-radius-lg, 16px); padding: 2rem 1.75rem;
}
.login-marca {
  display: flex; align-items: center; justify-content: center; gap: .55rem; margin-bottom: 1.75rem;
  color: var(--bio-text); font-weight: 700; font-size: 1.15rem; letter-spacing: -.02em;
}
.login-marca:hover { text-decoration: none; color: var(--bio-text); }
.login-marca img { width: 34px; height: 34px; border-radius: 50%; }
.login-marca small { color: var(--bio-text-3); font-weight: 500; margin-left: .15rem; }
.login-pie { margin: 1.5rem 0 0; font-size: .8125rem; color: var(--bio-text-3); text-align: center; }

/* ── Encuesta de satisfacción (página pública) ───────────────────────────── */
.encuesta { max-width: 560px; }
.caritas { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .5rem; margin: 1.5rem 0 .75rem; }
.carita {
  appearance: none; font: inherit; color: var(--bio-text-2); cursor: pointer; min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: .35rem;
  padding: .75rem .15rem .6rem; border: 1px solid var(--bio-border); border-radius: 14px; background: var(--bio-surface);
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.carita .emoji { font-size: 2.25rem; line-height: 1; transition: transform .15s ease, filter .15s ease, opacity .15s ease; }
.carita .texto { font-size: .6875rem; line-height: 1.2; text-align: center; }
.carita:hover { border-color: var(--borde-carita); }
.carita:hover .emoji { transform: scale(1.1); }
.carita:focus-visible { outline: 2px solid var(--borde-carita); outline-offset: 2px; }
.caritas.elegido .carita:not(.activa) .emoji { filter: grayscale(1); opacity: .5; }
.carita.activa {
  border-color: var(--borde-carita); box-shadow: inset 0 0 0 1px var(--borde-carita); color: var(--bio-text); font-weight: 600;
  background: color-mix(in srgb, var(--color-carita) 9%, var(--bio-surface));
}
.carita.activa .emoji { transform: scale(1.15); }
.encuesta-estado { min-height: 1.5rem; text-align: center; font-size: .8125rem; color: var(--bio-text-2); }
.encuesta-estado .fa-check-circle { color: #2e7d32; }
.encuesta-estado.error { color: #c62828; }
.caritas-extremos { display: none; justify-content: space-between; font-size: .6875rem; color: var(--bio-text-3); margin: -.35rem .15rem .6rem; }
/* En celular las etiquetas no entran sin partir palabras: se muestran los extremos de la escala. */
@media (max-width: 480px) { .carita .texto { display: none; } .carita .emoji { font-size: 2rem; } .caritas-extremos { display: flex; } }
@media (prefers-reduced-motion: reduce) {
  .carita, .carita .emoji { transition: none; }
  .carita:hover .emoji, .carita.activa .emoji { transform: none; }
}

/* ── Satisfacción en el panel (barra divergente centrada en «Neutral») ───── */
.satis-resumen { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem 1.25rem; margin-bottom: .9rem; }
.satis-tile { display: flex; flex-direction: column; min-width: 0; }
.satis-tile .etiqueta { font-size: .75rem; color: var(--bio-text-2); }
.satis-tile .valor { font-size: 1.5rem; font-weight: 650; line-height: 1.25; letter-spacing: -.02em; color: var(--bio-text); }
.satis-tile .detalle { font-size: .75rem; color: var(--bio-text-3); }
.satis-barras { display: grid; gap: .35rem; }
.fila-divergente { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: .75rem; align-items: center; }
.fila-divergente .nombre { font-size: .75rem; color: var(--bio-text-2); }
.riel-div { position: relative; height: 14px; margin: 6px 0; }
.riel-div .seg { position: absolute; top: 0; bottom: 0; }
.riel-div .seg + .seg { border-left: 2px solid var(--bio-surface); }
.riel-div .seg.primero { border-radius: 4px 0 0 4px; }
.riel-div .seg.ultimo { border-radius: 0 4px 4px 0; }
.riel-div .seg.primero.ultimo { border-radius: 4px; }
.riel-div .seg::before { content: ""; position: absolute; inset: -5px 0; }
.riel-div .seg:hover, .riel-div .seg:focus-visible { outline: none; filter: brightness(.9); z-index: 3; }
.riel-div .seg:hover::after, .riel-div .seg:focus-visible::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: #1c1917; color: #fff; font-size: .75rem; line-height: 1.3; padding: .3rem .55rem; border-radius: 6px;
  white-space: nowrap; pointer-events: none; z-index: 10;
}
.riel-div .centro { position: absolute; top: -4px; bottom: -4px; width: 1px; background: #c3c2b7; z-index: 2; pointer-events: none; }
.leyenda-satis { display: flex; flex-wrap: wrap; gap: .3rem 1rem; list-style: none; padding: 0; margin: .6rem 0 0; font-size: .75rem; color: var(--bio-text-2); }
.leyenda-satis .clave { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: .35rem; vertical-align: -1px; }
/* El borde de la carita elegida se oscurece: el gris «Neutral» solo no se distinguiría del resto. */
.carita { --borde-carita: color-mix(in srgb, var(--color-carita) 62%, #44403c); }
/* Comentario de la encuesta: confirmación junto al formulario */
.comentario-guardado { border: 1px solid #cfe7d1; background: #f3faf4; border-radius: var(--bio-radius); padding: .65rem .75rem; }
.comentario-guardado .fa-check-circle { color: #2e7d32; }
.comentario-guardado .texto { font-size: .875rem; color: var(--bio-text); white-space: pre-wrap; overflow-wrap: anywhere; }
.comentario-guardado .min-w-0 { min-width: 0; }
.estado-comentario { font-size: .8125rem; color: var(--bio-text-2); margin-right: auto; }
.estado-comentario.error { color: #c62828; }

/* ── Autocompletar solicitante (Nuevo tiquete) ──────────────────────────────── */
.con-sugerencias { position: relative; }
.sugerencias {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px);
  max-height: 290px; overflow-y: auto; margin: 0; padding: .25rem; list-style: none;
  background: var(--bio-surface); border: 1px solid var(--bio-border-strong); border-radius: var(--bio-radius);
  box-shadow: 0 8px 24px rgba(28, 25, 23, .12);
}
.sugerencias li { display: flex; flex-direction: column; gap: .05rem; padding: .45rem .6rem; border-radius: 6px; cursor: pointer; min-width: 0; }
.sugerencias li .nombre { font-size: .875rem; font-weight: 500; color: var(--bio-text); }
.sugerencias li .detalle { font-size: .75rem; color: var(--bio-text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sugerencias li:hover, .sugerencias li.activa { background: var(--bio-orange-50); }

/* ── Agente clasificador ────────────────────────────────────────────────────── */
.chip-agente { display: inline-block; margin-left: .4rem; font-size: .72rem; color: var(--bio-text-2); vertical-align: middle; }
.chip-agente i { margin-right: .25rem; }
.chip-agente.aplicado { background: #eef4fc; color: #1f5fa8; border-radius: 999px; padding: .05rem .5rem; white-space: nowrap; }
details.chip-agente { display: block; margin: .25rem 0 0; }
details.chip-agente summary {
  display: inline-block; cursor: pointer; list-style: none; max-width: 100%; overflow-wrap: anywhere;
  background: #fff7ed; color: #9a4a0b; border: 1px dashed #f0c292; border-radius: 999px; padding: .05rem .55rem;
}
details.chip-agente summary::-webkit-details-marker { display: none; }
details.chip-agente ul { margin: .35rem 0 .15rem; padding-left: 1.1rem; color: var(--bio-text-2); }
details.chip-agente .fuente { color: var(--bio-text-3); }
.agente-sugiere {
  display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1rem; padding: .65rem .75rem;
  border: 1px solid #d6e4f5; background: #f5f9fe; border-radius: var(--bio-radius);
}
.agente-sugiere .fa-robot { color: #1f5fa8; }
.agente-sugiere .min-w-0 { min-width: 0; }
.lista-sugerencias { display: flex; flex-wrap: wrap; gap: .15rem 1rem; list-style: none; padding: 0; margin: .2rem 0 0; font-size: .85rem; }
.lista-sugerencias .campo, .lista-sugerencias .pct { color: var(--bio-text-3); }
.lista-sugerencias .pct { font-variant-numeric: tabular-nums; }
.tag-agente { font-size: .7rem; color: #1f5fa8; background: #eef4fc; border-radius: 999px; padding: 0 .45rem; white-space: nowrap; }
.tag-agente i { margin-right: .2rem; }


/* ═══ Dentro de la consola ═══
   El menú ya está en la consola, a la izquierda: la pantalla no repite su barra lateral. */
.enmarcado .app-sidebar { display: none !important; }
.enmarcado .app-main { margin-left: 0 !important; }
.enmarcado .topbar-marca { display: none !important; }
