/* ============================================================
   SIGEC · Hoja de estilos principal (identidad visual 2026)
   Los colores y medidas salen de sigec-tokens.css (se carga antes).
   ============================================================ */

*{ box-sizing:border-box; }
body{
  margin:0;
  font-family:var(--sg-fuente-texto);
  font-size:14px;
  background:var(--sg-fondo);
  color:var(--sg-pizarra);
  -webkit-font-smoothing:antialiased;
}
input,select,textarea,button{ font-family:inherit; }
h1,h2,h3,h4,h5,.page-header h2,.kpi-value,.panel h5,.modal-title{ font-family:var(--sg-fuente-titulos); color:var(--sg-titulo); }
.kpi-value,.table td,.monto,.cifra{ font-variant-numeric:tabular-nums; }
a{ color:var(--sg-azul); }
a:hover{ color:var(--sg-azul-700); }

/* ---------- Conexión con Bootstrap ---------- */
.btn{ border-radius:var(--sg-radio); font-weight:600; font-size:14px; display:inline-flex; align-items:center; justify-content:center; gap:8px; white-space:nowrap; }
.btn-sm{ border-radius:var(--sg-radio-sm); font-size:13px; }
.btn-primary{ --bs-btn-bg:#1565FF; --bs-btn-border-color:#1565FF; --bs-btn-hover-bg:#0F4FD1; --bs-btn-hover-border-color:#0F4FD1;
  --bs-btn-active-bg:#0F4FD1; --bs-btn-active-border-color:#0F4FD1; --bs-btn-disabled-bg:#1565FF; --bs-btn-disabled-border-color:#1565FF; }
.btn-outline-primary{ --bs-btn-color:#1565FF; --bs-btn-border-color:#1565FF; --bs-btn-hover-bg:#1565FF; --bs-btn-hover-border-color:#1565FF;
  --bs-btn-active-bg:#0F4FD1; --bs-btn-active-border-color:#0F4FD1; }
.btn-outline-secondary,.btn-light{ --bs-btn-color:#1B2A4A; --bs-btn-bg:var(--sg-superficie); --bs-btn-border-color:#CBD6EA;
  --bs-btn-hover-color:#1565FF; --bs-btn-hover-bg:var(--sg-superficie); --bs-btn-hover-border-color:#1565FF;
  --bs-btn-active-color:#1565FF; --bs-btn-active-bg:var(--sg-niebla); --bs-btn-active-border-color:#1565FF; }
.btn-outline-danger{ --bs-btn-color:#B42318; --bs-btn-border-color:#F2C4BF; --bs-btn-hover-bg:#FDECEA; --bs-btn-hover-color:#B42318; --bs-btn-hover-border-color:#F2C4BF;
  --bs-btn-active-bg:#FDECEA; --bs-btn-active-color:#B42318; --bs-btn-active-border-color:#F2C4BF; }
.btn-outline-success{ --bs-btn-color:#0B6E58; --bs-btn-border-color:#BFE8DC; --bs-btn-hover-bg:#E3F7F1; --bs-btn-hover-color:#0B6E58; --bs-btn-hover-border-color:#BFE8DC;
  --bs-btn-active-bg:#E3F7F1; --bs-btn-active-color:#0B6E58; --bs-btn-active-border-color:#BFE8DC; }
.btn-success{ --bs-btn-bg:#0B6E58; --bs-btn-border-color:#0B6E58; --bs-btn-hover-bg:#095A48; --bs-btn-hover-border-color:#095A48;
  --bs-btn-active-bg:#095A48; --bs-btn-active-border-color:#095A48; --bs-btn-disabled-bg:#0B6E58; --bs-btn-disabled-border-color:#0B6E58; }
.btn-danger{ --bs-btn-bg:#B42318; --bs-btn-border-color:#B42318; --bs-btn-hover-bg:#9A1D14; --bs-btn-hover-border-color:#9A1D14;
  --bs-btn-active-bg:#9A1D14; --bs-btn-active-border-color:#9A1D14; --bs-btn-disabled-bg:#B42318; --bs-btn-disabled-border-color:#B42318; }
.btn-warning{ --bs-btn-bg:#FFB347; --bs-btn-border-color:#FFB347; --bs-btn-color:#0A1F4D; --bs-btn-hover-bg:#FFC56E; --bs-btn-hover-border-color:#FFC56E; --bs-btn-hover-color:#0A1F4D;
  --bs-btn-active-bg:#FFC56E; --bs-btn-active-border-color:#FFC56E; --bs-btn-active-color:#0A1F4D; }
.btn-accion{ background:var(--sg-ambar); color:var(--sg-medianoche); border:0; }   /* CTA de recuperación (máx. 1 por pantalla) */
.btn-accion:hover{ background:var(--sg-ambar-hover); color:var(--sg-medianoche); }
.btn:focus-visible{ outline:2px solid var(--sg-azul); outline-offset:2px; box-shadow:none; }
.text-primary{ color:var(--sg-azul) !important; }
.bg-primary{ background-color:var(--sg-azul) !important; }
.border-primary{ border-color:var(--sg-azul) !important; }
/* .text-muted va PRIMERO: así .text-danger / .text-warning / .text-success la superan cuando coinciden en un mismo elemento (p. ej. fechas vencidas) */
.text-muted{ color:var(--sg-texto-sec) !important; }
.text-success{ color:var(--sg-menta-texto) !important; }
.text-danger{ color:var(--sg-alerta-texto) !important; }
.text-warning{ color:var(--sg-ambar-texto) !important; }
.bg-success{ background-color:var(--sg-menta-texto) !important; }
.bg-danger{ background-color:var(--sg-alerta-texto) !important; }
.bg-warning{ background-color:var(--sg-ambar) !important; color:var(--sg-medianoche) !important; }
.badge.bg-secondary{ background-color:var(--sg-tinte-gris) !important; color:var(--sg-gris-texto) !important; }
.badge.bg-warning, .badge.text-bg-warning{ background-color:var(--sg-tinte-ambar) !important; color:var(--sg-ambar-texto) !important; }
.badge.bg-success, .badge.text-bg-success{ background-color:var(--sg-tinte-menta) !important; color:var(--sg-menta-texto) !important; }
.badge.bg-danger, .badge.text-bg-danger{ background-color:var(--sg-tinte-rojo) !important; color:var(--sg-alerta-texto) !important; }
.badge.bg-primary, .badge.text-bg-primary, .badge.bg-info, .badge.text-bg-info{ background-color:var(--sg-tinte-azul) !important; color:var(--sg-azul-700) !important; }
.pagination .page-item.active .page-link{ background-color:var(--sg-azul); border-color:var(--sg-azul); color:#fff; }
.pagination .page-link{ color:var(--sg-azul-700); }
.dropdown-item.active, .dropdown-item:active{ background-color:var(--sg-azul); }
.spinner-border.text-primary{ color:var(--sg-azul) !important; }
progress, .progress-bar{ background-color:var(--sg-azul); }
.progress{ background-color:var(--sg-niebla); border-radius:4px; }

/* ---------- Tipografía de página ---------- */
.page-header{ display:flex; align-items:center; justify-content:space-between; margin-bottom:20px; flex-wrap:wrap; gap:12px; }
.page-header h2{ font-size:28px; font-weight:700; line-height:1.2; margin:0; }
.page-header p{ font-size:14px; color:var(--sg-texto-sec); margin:4px 0 0; }

/* ---------- Logotipo ---------- */
.sg-isotipo{ position:relative; display:inline-flex; align-items:center; justify-content:center; flex-shrink:0;
  background:linear-gradient(150deg,#3A82FF 0%,#1565FF 55%,#0F4FD1 100%); }
.sg-isotipo-s{ font-family:var(--sg-fuente-titulos); font-weight:800; color:#fff; line-height:1; margin-top:-1px; }
.sg-isotipo-punto{ position:absolute; border-radius:50%; background:var(--sg-ambar); box-shadow:0 0 0 1.5px var(--sg-azul); }
.sg-logo-texto{ font-family:var(--sg-fuente-titulos); font-weight:800; letter-spacing:.04em; line-height:1; margin-top:-1px; }
.sg-logo-imagen{ max-height:36px; max-width:160px; object-fit:contain; }

/* ---------- Empresa cliente (cuadro con iniciales o logo) ---------- */
.sg-empresa-caja{ display:flex; align-items:center; justify-content:center; flex-shrink:0; overflow:hidden;
  background:#fff; color:var(--sg-medianoche); font-family:var(--sg-fuente-titulos); font-weight:700; letter-spacing:.02em; }
.sg-empresa-caja img{ width:100%; height:100%; object-fit:contain; }
.sg-empresa-caja.oscura{ background:var(--sg-medianoche); color:#fff; }

/* ============================================================
   BARRA SUPERIOR + MEGA MENÚ
   ============================================================ */
.app-shell{ display:flex; flex-direction:column; min-height:100vh; }
.sg-topbar{ position:sticky; top:0; z-index:1030; height:64px; background:var(--sg-medianoche);
  display:flex; align-items:center; gap:18px; padding:0 22px; }
.sg-marca{ display:flex; align-items:center; text-decoration:none; flex-shrink:0; }
.sg-empresa{ display:flex; align-items:center; gap:10px; padding-left:16px; border-left:1px solid rgba(255,255,255,.16); height:34px; flex-shrink:0; }
.sg-empresa .sg-empresa-caja{ width:30px; height:30px; border-radius:8px; font-size:12px; }
.sg-empresa-textos{ display:flex; flex-direction:column; line-height:1.2; }
.sg-empresa-etq{ font-size:10.5px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; color:#8D9CC0; }
.sg-empresa-nombre{ font-size:13.5px; font-weight:600; color:#fff; white-space:nowrap; max-width:170px; overflow:hidden; text-overflow:ellipsis; }
.sg-topnav{ display:flex; align-items:center; gap:2px; flex:1; min-width:0; }
.sg-topnav-item{ display:flex; align-items:center; gap:6px; height:40px; padding:0 12px; border:0; border-radius:8px;
  background:transparent; color:#C3CDE3; font-size:14.5px; font-weight:500; white-space:nowrap; flex-shrink:0;
  text-decoration:none; transition:background .15s,color .15s; cursor:pointer; }
.sg-topnav-item:hover{ color:#fff; background:rgba(255,255,255,.08); }
.sg-topnav-item.activo{ color:#fff; box-shadow:inset 0 -3px 0 var(--sg-ambar); }
.sg-topnav-item.abierto{ color:#fff; background:var(--sg-azul); box-shadow:none; }
.sg-topnav-item .bi-chevron-down{ font-size:11px; transition:transform .2s; }
.sg-topnav-item.abierto .bi-chevron-down{ transform:rotate(180deg); }
.sg-topnav-item[hidden]{ display:none; }
.sg-topnav-item:focus-visible, .sg-topbar-icono:focus-visible{ outline:2px solid var(--sg-ambar); outline-offset:2px; }
.sg-contador{ background:var(--sg-ambar); color:var(--sg-medianoche); font-size:11px; font-weight:700;
  border-radius:9px; padding:0 6px; line-height:17px; }
.sg-topbar-acciones{ display:flex; align-items:center; gap:6px; flex-shrink:0; }
.sg-topbar-icono{ width:38px; height:38px; border:0; border-radius:8px; background:transparent; color:#C3CDE3; font-size:17px; position:relative;
  display:inline-flex; align-items:center; justify-content:center; text-decoration:none; cursor:pointer; padding:0; }
.sg-topbar-icono:hover, .sg-topbar-icono.abierto{ background:rgba(255,255,255,.08); color:#fff; }
.sg-topbar-icono .sg-punto{ position:absolute; top:9px; right:9px; width:8px; height:8px; border-radius:50%;
  background:var(--sg-ambar); box-shadow:0 0 0 2px var(--sg-medianoche); }
.sg-topbar-icono .sg-contador{ position:absolute; top:2px; right:0; min-width:16px; height:16px; line-height:16px; padding:0 4px; text-align:center; }
.sg-avatar{ width:36px; height:36px; border-radius:50%; background:var(--sg-azul); color:#fff; border:0; cursor:pointer;
  font-family:var(--sg-fuente-titulos); font-weight:700; font-size:13px; display:flex; align-items:center; justify-content:center; margin-left:4px; padding:0; }
.sg-avatar:hover{ background:var(--sg-azul-700); }
.sg-hamburguesa{ display:none; }

/* Menú de usuario */
.sg-menu-usuario{ width:270px; padding:16px; border:0; border-radius:var(--sg-radio-md); box-shadow:0 18px 44px rgba(10,31,77,.25); background:var(--sg-superficie); }
.sg-menu-usuario-cab{ display:flex; gap:12px; align-items:center; margin-bottom:12px; }
.sg-menu-usuario-cab .sg-avatar{ width:40px; height:40px; font-size:14px; margin:0; cursor:default; flex-shrink:0; }
.sg-menu-usuario-nombre{ font-weight:600; color:var(--sg-titulo); line-height:1.3; }
.sg-menu-usuario-rol{ font-size:13px; color:var(--sg-texto-sec); }
.sg-menu-usuario-empresa{ background:var(--sg-fondo); border-radius:8px; padding:10px 12px; display:flex; gap:10px; align-items:center; margin-bottom:12px; }
.sg-menu-usuario-empresa .sg-empresa-caja{ width:30px; height:30px; border-radius:8px; font-size:12px; }
.sg-menu-usuario-empresa small{ display:block; font-size:11px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; color:var(--sg-texto-sec); }
.sg-menu-usuario-empresa b{ display:block; font-size:14px; font-weight:600; color:var(--sg-titulo); }
.sg-menu-usuario-enlace{ display:flex; justify-content:space-between; align-items:center; height:38px; padding:0 12px; margin-bottom:8px;
  border:1px solid var(--sg-borde-campo); border-radius:8px; background:var(--sg-superficie); color:var(--sg-pizarra); font-weight:600; font-size:14px; text-decoration:none; }
.sg-menu-usuario-enlace:last-child{ margin-bottom:0; }
.sg-menu-usuario-enlace:hover{ border-color:var(--sg-azul); color:var(--sg-azul); }

/* Franja de búsqueda */
.sg-buscador{ position:sticky; top:64px; z-index:1025; background:var(--sg-superficie); border-bottom:1px solid var(--sg-linea); padding:12px 24px; display:flex; justify-content:center; }
.sg-buscador[hidden]{ display:none; }
.topbar-search{ width:100%; max-width:640px; display:flex; align-items:center; gap:10px; background:var(--sg-fondo);
  border:1.5px solid var(--sg-azul); border-radius:10px; padding:0 14px; height:44px; color:var(--sg-texto-sec); position:relative; }
.topbar-search input{ border:0; background:transparent; outline:0; flex:1; min-width:0; font-size:15px; color:var(--sg-pizarra); box-shadow:none; }
.topbar-search kbd{ font-family:inherit; font-size:12px; border:1px solid var(--sg-borde-campo); border-radius:5px; padding:1px 6px; background:transparent; color:var(--sg-texto-sec); }
.search-results{
  position:absolute; top:calc(100% + 6px); left:0; right:0;
  background:var(--sg-superficie); border:1px solid var(--sg-linea); border-radius:var(--sg-radio-md); box-shadow:var(--sg-sombra-panel);
  max-height:340px; overflow-y:auto; z-index:50; display:none;
}
.search-results.show{ display:block; }
.search-results a{ display:block; padding:10px 14px; text-decoration:none; color:var(--sg-pizarra); border-bottom:1px solid var(--sg-linea-suave); font-size:13.5px; }
.search-results a:hover{ background:var(--sg-fondo); }
.search-results .empty{ padding:14px; color:var(--sg-texto-sec); font-size:13px; }

/* Panel del mega menú */
.sg-mega-fondo{ position:fixed; inset:64px 0 0 0; background:rgba(10,31,77,.32); z-index:1020; }
.sg-mega-fondo[hidden], .sg-mega[hidden]{ display:none; }
.sg-mega{ position:fixed; top:72px; left:50%; transform:translateX(-50%); width:calc(100% - 48px); max-width:1240px;
  max-height:calc(100vh - 96px); overflow-y:auto; z-index:1025; background:var(--sg-superficie); border-radius:var(--sg-radio-xl);
  box-shadow:var(--sg-sombra-panel); padding:24px 28px 28px; display:flex; flex-direction:column; gap:18px; animation:sgMegaIn .18s ease; }
@keyframes sgMegaIn{ from{opacity:0;transform:translate(-50%,-6px)} to{opacity:1;transform:translate(-50%,0)} }
.sg-mega-cabecera{ display:flex; justify-content:space-between; align-items:center; gap:16px; }
.sg-mega-cabecera-izq{ display:flex; align-items:center; gap:14px; flex:1; min-width:0; }
.sg-mega-icono{ width:44px; height:44px; border-radius:11px; background:var(--sg-medianoche); color:#fff;
  display:flex; align-items:center; justify-content:center; font-size:19px; flex-shrink:0; }
.sg-mega-titulo{ font-family:var(--sg-fuente-titulos); font-weight:700; font-size:22px; color:var(--sg-titulo); }
.sg-mega-sub{ font-size:13.5px; color:var(--sg-texto-sec); }
.sg-mega-conteo{ font-size:13px; font-weight:600; color:var(--sg-azul-700); background:var(--sg-niebla); border-radius:6px; padding:4px 10px; white-space:nowrap; }
.sg-mega-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:10px; }
.sg-mega-card{ display:grid; grid-template-columns:42px minmax(0,1fr); gap:14px; align-items:center; padding:14px 16px;
  border:1px solid var(--sg-linea); border-radius:12px; background:var(--sg-superficie); text-decoration:none; color:inherit; }
.sg-mega-card:hover{ border-color:var(--sg-azul); background:var(--sg-hover-fila); color:inherit; }
.sg-mega-card.activo{ border-color:var(--sg-azul); background:var(--sg-fondo); }
.sg-mega-card.deshabilitado{ opacity:.55; cursor:default; }
.sg-mega-card.deshabilitado:hover{ border-color:var(--sg-linea); background:var(--sg-superficie); }
.sg-mega-card-icono{ width:42px; height:42px; border-radius:10px; background:var(--sg-niebla); color:var(--sg-azul);
  display:flex; align-items:center; justify-content:center; font-size:18px; }
.sg-mega-card.activo .sg-mega-card-icono{ background:var(--sg-azul); color:#fff; }
.sg-mega-card-titulo{ font-weight:600; font-size:14.5px; color:var(--sg-titulo); display:flex; gap:8px; align-items:center; }
.sg-mega-card-desc{ font-size:13px; color:var(--sg-texto-sec); display:block; }
.sg-mega-secciones{ display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:20px 28px; }
.sg-mega-seccion{ display:flex; flex-direction:column; gap:4px; }
.sg-mega-seccion-titulo{ font-size:11.5px; font-weight:600; letter-spacing:.08em; text-transform:uppercase;
  color:var(--sg-texto-sec); padding:0 10px 6px; border-bottom:1px solid var(--sg-linea-suave); margin-bottom:4px; }
.sg-mega-link{ width:100%; display:flex; align-items:center; gap:11px; padding:8px 10px; border-radius:8px; text-decoration:none; }
.sg-mega-link:hover{ background:var(--sg-fondo); }
.sg-mega-link.activo{ background:var(--sg-niebla); }
.sg-mega-link-icono{ width:30px; height:30px; border-radius:8px; background:var(--sg-niebla); color:var(--sg-azul);
  display:flex; align-items:center; justify-content:center; font-size:14px; flex-shrink:0; }
.sg-mega-link-texto{ flex:1; min-width:0; font-size:14px; font-weight:500; color:var(--sg-pizarra); line-height:1.35; }

/* ---------- Menú lateral (solo móvil, < 992px) ---------- */
.sidebar{ display:none; }
.sidebar-brand{ display:flex; align-items:center; gap:10px; padding:0 8px 18px; }
.sidebar-nav{ display:flex; flex-direction:column; gap:2px; }
.nav-link{
  display:flex; align-items:center; gap:10px;
  color:#C3CDE3; text-decoration:none;
  padding:10px 12px; border-radius:10px; font-size:14px; font-weight:500;
  transition:.15s;
}
.nav-link i{ font-size:1.05rem; width:20px; text-align:center; }
.nav-link:hover{ background:rgba(255,255,255,.08); color:#fff; }
.nav-link.active{ background:var(--sg-azul); color:#fff; }
.nav-link-disabled{ cursor:default; opacity:.45; }
.nav-link-disabled:hover{ background:transparent; color:#C3CDE3; }
.nav-group-toggle{
  display:flex; align-items:center; gap:10px; width:100%; border:none; background:transparent;
  color:#C3CDE3; padding:10px 12px; border-radius:10px; font-size:14px; font-weight:500;
  transition:.15s; cursor:pointer; text-align:left;
}
.nav-group-toggle i:first-child{ font-size:1.05rem; width:20px; text-align:center; }
.nav-group-toggle:hover{ background:rgba(255,255,255,.08); color:#fff; }
.nav-group-chevron{ margin-left:auto; font-size:.75rem; transition:transform .2s; }
.nav-group-toggle[aria-expanded="true"] .nav-group-chevron{ transform:rotate(180deg); }
.nav-group-items{ display:flex; flex-direction:column; gap:2px; padding-left:16px; margin:2px 0 4px 14px; border-left:1px solid rgba(255,255,255,.12); }
.nav-group-items .nav-link{ font-size:13.5px; padding:8px 10px; }
.nav-subgroup-label{ font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:rgba(255,255,255,.4); padding:10px 10px 2px; }
.nav-subgroup-label:first-child{ padding-top:2px; }
.sidebar .sg-contador{ margin-left:4px; }

@media (max-width: 991.98px){
  .sg-topbar{ gap:10px; padding:0 12px; }
  .sg-topnav, .sg-empresa{ display:none; }
  .sg-topbar-acciones{ margin-left:auto; }
  .sg-hamburguesa{ display:inline-flex; }
  .sg-mega, .sg-mega-fondo{ display:none !important; }
  .sidebar{
    display:flex; flex-direction:column; width:280px; background:var(--sg-medianoche); color:#C3CDE3; padding:18px 14px;
    position:fixed; left:-300px; top:0; bottom:0; z-index:1100; transition:left .2s; overflow-y:auto;
  }
  .sidebar.open{ left:0; box-shadow:0 0 0 100vmax rgba(10,31,77,.45); }
  .sg-topbar-icono{ width:44px; height:44px; }
  .sg-buscador{ padding:10px 12px; }
}

/* ============================================================
   CONTENIDO
   ============================================================ */
.app-content{ flex:1; display:flex; flex-direction:column; min-width:0; }
.app-main{ padding:28px 24px 64px; max-width:1440px; width:100%; margin:0 auto; flex:1; }
@media (max-width: 575.98px){ .app-main{ padding:20px 16px 56px; } }

/* ---------- Tarjetas, paneles y KPI ---------- */
.panel,.kpi-card{ background:var(--sg-superficie); border:1px solid var(--sg-linea); border-radius:var(--sg-radio-md); box-shadow:none; padding:20px 22px; }
.panel h5{ font-size:15px; font-weight:600; margin-bottom:12px; }
.kpi-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:16px; }
.kpi-card{ display:flex; flex-direction:column; align-items:flex-start; gap:10px; padding:18px; }
.kpi-card > div:not(.kpi-icon){ display:flex; flex-direction:column; gap:8px; width:100%; }
.kpi-icon{ display:none; }
.kpi-label{ order:-1; display:flex; align-items:center; gap:8px; font-size:13px; color:var(--sg-texto-sec); margin:0; }
.kpi-label::before{ content:""; width:8px; height:8px; border-radius:50%; background:var(--sg-azul); flex-shrink:0; }
.kpi-green .kpi-label::before{ background:var(--sg-menta); }
.kpi-orange .kpi-label::before{ background:var(--sg-ambar); }
.kpi-purple .kpi-label::before{ background:var(--sg-azul); }
.kpi-value{ font-size:26px; font-weight:700; line-height:1.1; color:var(--sg-titulo); }

/* ---------- Tablas ---------- */
.table-modern{ margin-bottom:0; }
.table-modern thead th{ background:var(--sg-fondo); font-size:11.5px; font-weight:600; letter-spacing:.06em; text-transform:uppercase;
  color:var(--sg-texto-sec); border-bottom:1px solid var(--sg-linea); padding:10px 12px; white-space:nowrap; }
.table-modern td{ font-size:13.5px; border-bottom:1px solid var(--sg-linea-suave); padding:11px 12px; vertical-align:middle; }
.table-hover>tbody>tr:hover>*{ background:var(--sg-hover-fila); }
.table > :not(caption) > * > *{ border-bottom-color:var(--sg-linea-suave); }

/* ---------- Badges de estado ---------- */
.badge-pill{ padding:2px 8px; border-radius:var(--sg-radio-sm); font-size:12px; font-weight:600; white-space:nowrap; display:inline-block; }
.badge-green{ background:var(--sg-tinte-menta); color:var(--sg-menta-texto); }
.badge-orange{ background:var(--sg-tinte-ambar); color:var(--sg-ambar-texto); }
.badge-red{ background:var(--sg-tinte-rojo); color:var(--sg-alerta-texto); }
.badge-blue{ background:var(--sg-tinte-azul); color:var(--sg-azul-700); }
.badge-gray{ background:var(--sg-tinte-gris); color:var(--sg-gris-texto); }
.badge-purple{ background:var(--sg-tinte-azul); color:var(--sg-azul-700); } /* compatibilidad: el morado se eliminó */
.text-purple{ color:var(--sg-azul-700); }

/* ---------- Formularios ---------- */
.form-label{ font-size:12px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; color:var(--sg-texto-sec); }
.form-control,.form-select{ border:1.5px solid var(--sg-borde-campo); border-radius:var(--sg-radio); min-height:40px; font-size:14px; color:var(--sg-pizarra); background-color:var(--sg-superficie); }
.form-control-sm,.form-select-sm{ min-height:32px; border-radius:var(--sg-radio-sm); font-size:13px; }
.form-control:focus,.form-select:focus{ border-color:var(--sg-azul); box-shadow:0 0 0 4px rgba(21,101,255,.15); }
.form-check-input:checked{ background-color:var(--sg-azul); border-color:var(--sg-azul); }
.form-check-input:focus{ border-color:var(--sg-azul); box-shadow:0 0 0 4px rgba(21,101,255,.15); }

/* Bloques condicionales dentro de formularios (compromiso, pago, recordatorio) */
.sg-bloque{ border:1px solid var(--sg-linea); background:var(--sg-fondo); border-radius:10px; padding:14px; }
.sg-bloque-titulo{ font-size:14px; font-weight:600; display:flex; align-items:center; gap:8px; margin-bottom:10px; }
.sg-bloque-compromiso{ background:#FFF8EC; border-color:#F5DDB2; }
.sg-bloque-compromiso .sg-bloque-titulo{ color:var(--sg-ambar-texto); }
.sg-bloque-pago{ background:#F0FBF7; border-color:#BFE8DC; }
.sg-bloque-pago .sg-bloque-titulo{ color:var(--sg-menta-texto); }

/* ---------- Pestañas ---------- */
.nav-tabs{ border-bottom:1px solid var(--sg-linea); gap:2px; flex-wrap:nowrap; overflow-x:auto; overflow-y:hidden; }
.nav-tabs .nav-link{ border:0; background:transparent; color:var(--sg-texto-sec); font-weight:600; font-size:14px; padding:14px 10px; white-space:nowrap; border-radius:0; display:block; }
.nav-tabs .nav-link:hover{ color:var(--sg-azul); background:transparent; }
.nav-tabs .nav-link.active{ color:var(--sg-azul); background:transparent; box-shadow:inset 0 -2px 0 var(--sg-azul); border:0; }
.nav-tabs .nav-link.disabled{ color:var(--sg-gris-punto); }
.nav-pills .nav-link{ color:var(--sg-texto-sec); background:transparent; font-weight:600; border-radius:var(--sg-radio); }
.nav-pills .nav-link:hover{ color:var(--sg-azul); background:transparent; }
.nav-pills .nav-link.active, .nav-pills .show > .nav-link{ background:var(--sg-azul); color:#fff; }

/* ---------- Modales ---------- */
.modal-content{ border:0; border-radius:var(--sg-radio-lg); box-shadow:0 24px 60px rgba(10,31,77,.3); background:var(--sg-superficie); }
.modal-title{ font-size:20px; font-weight:700; }
.modal-title > i:first-child{ color:var(--sg-azul); margin-right:6px; }
.modal-subtitulo{ font-size:13.5px; color:var(--sg-texto-sec); margin-top:2px; }
.modal-header, .modal-footer{ border-color:var(--sg-linea); }
.modal-backdrop{ --bs-backdrop-bg:#0A1F4D; --bs-backdrop-opacity:.45; }

/* ---------- Alertas ---------- */
.alert{ border-radius:10px; border:0; }
.alert-danger{ background:var(--sg-tinte-rojo); color:#8F1D14; }
.alert-info{ background:var(--sg-niebla); color:var(--sg-azul-700); }
.alert-warning{ background:var(--sg-tinte-ambar); color:var(--sg-ambar-texto); }
.alert-success{ background:var(--sg-tinte-menta); color:var(--sg-menta-texto); }
.dropdown-menu{ border:1px solid var(--sg-linea); border-radius:var(--sg-radio-md); box-shadow:var(--sg-sombra-panel); background:var(--sg-superficie); }
.dropdown-item{ font-size:14px; }
.dropdown-item:hover{ background:var(--sg-fondo); }

/* ---------- Notificaciones (campana) ---------- */
.notif-dropdown{ width:320px; padding:0; overflow:hidden; }
.notif-header{ padding:12px 16px; font-weight:600; font-size:13px; border-bottom:1px solid var(--sg-linea); font-family:var(--sg-fuente-titulos); color:var(--sg-titulo); }
.notif-list{ max-height:320px; overflow-y:auto; }
.notif-item{ display:block; padding:10px 16px; text-decoration:none; color:var(--sg-pizarra); border-bottom:1px solid var(--sg-linea-suave); }
.notif-item:hover{ background:var(--sg-fondo); }

/* Indicadores de punto y contadores heredados */
.badge-dot{ position:absolute; top:9px; right:9px; width:8px; height:8px; background:var(--sg-ambar); border-radius:50%; box-shadow:0 0 0 2px var(--sg-medianoche); }
.badge-dot-nav{ display:inline-block; margin-left:6px; padding:0 6px; font-size:11px; line-height:17px; font-weight:700; background:var(--sg-ambar); color:var(--sg-medianoche); border-radius:9px; }
.badge-contador-topbar{ position:absolute; top:2px; right:0; min-width:16px; height:16px; padding:0 4px; font-size:11px; line-height:16px; font-weight:700; text-align:center; background:var(--sg-ambar); color:var(--sg-medianoche); border-radius:9px; }

/* ---------- Dialer flotante ---------- */
#dialerFlotante{ position:fixed; bottom:24px; right:24px; z-index:1050; }
#btnAbrirDialer{
  width:56px; height:56px; border-radius:50%; border:none;
  background:var(--sg-azul); color:#fff; font-size:1.4rem;
  box-shadow:0 6px 20px rgba(10,31,77,.28); cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  transition:transform .15s, background .15s;
}
#btnAbrirDialer:hover{ background:var(--sg-azul-700); transform:scale(1.06); }
#panelDialer{
  position:absolute; bottom:68px; right:0; width:260px;
  background:var(--sg-superficie); border-radius:var(--sg-radio-lg); box-shadow:var(--sg-sombra-panel);
  overflow:hidden;
}
.dialer-header{
  background:var(--sg-medianoche); color:#fff; padding:10px 14px;
  display:flex; align-items:center; justify-content:space-between; font-size:14px; font-weight:600;
}
.dialer-header button{ background:transparent; border:none; color:#fff; opacity:.8; cursor:pointer; }
.dialer-header button:hover{ opacity:1; }
.dialer-body{ padding:14px; }
.dialer-input-wrap{ display:flex; gap:6px; margin-bottom:10px; }
#dialerNumero{
  flex:1; border:1.5px solid var(--sg-borde-campo); border-radius:var(--sg-radio); padding:8px 10px;
  font-size:1.1rem; text-align:center; letter-spacing:.5px; background:var(--sg-superficie); color:var(--sg-pizarra);
}
#btnBorrarDialer{
  border:1px solid var(--sg-borde-campo); background:var(--sg-fondo); border-radius:var(--sg-radio); width:38px; color:var(--sg-texto-sec); cursor:pointer;
}
#btnBorrarDialer:hover{ background:var(--sg-niebla); }
.dialer-teclado{ display:grid; grid-template-columns:repeat(3, 1fr); gap:8px; margin-bottom:12px; }
.dialer-tecla{
  border:1px solid var(--sg-linea); background:var(--sg-fondo); border-radius:10px; padding:10px 0;
  font-size:1.15rem; font-weight:600; color:var(--sg-pizarra); cursor:pointer; line-height:1.1;
}
.dialer-tecla span{ display:block; font-size:.6rem; font-weight:400; color:var(--sg-gris-punto); letter-spacing:.5px; }
.dialer-tecla:hover{ background:var(--sg-niebla); }
.dialer-tecla:active{ background:var(--sg-azul); color:#fff; }
.dialer-tecla:active span{ color:#fff; }
@media (max-width: 576px){
  #dialerFlotante{ bottom:16px; right:16px; }
  #panelDialer{ width:calc(100vw - 32px); right:-8px; }
}

/* ---------- Aviso de estado de llamada ---------- */
#toastLlamada{
  position:fixed; top:20px; left:50%; transform:translateX(-50%); z-index:1100;
  background:var(--sg-medianoche); color:#fff; border-radius:10px; box-shadow:var(--sg-sombra-panel);
  padding:12px 16px; display:flex; align-items:center; gap:12px; min-width:280px; max-width:90vw;
}
#toastLlamada::before{ content:""; width:8px; height:8px; border-radius:50%; background:var(--sg-gris-punto); flex-shrink:0; }
#toastLlamada.estado-llamando::before{ background:var(--sg-ambar); }
#toastLlamada.estado-exito::before{ background:var(--sg-menta); }
#toastLlamada.estado-error::before{ background:var(--sg-alerta); }
.toast-llamada-icono{ font-size:1.3rem; color:#C3CDE3; flex-shrink:0; }
#toastLlamada.estado-llamando .toast-llamada-icono{ color:var(--sg-ambar); animation:pulso-llamada 1s infinite; }
#toastLlamada.estado-exito .toast-llamada-icono{ color:var(--sg-menta); }
#toastLlamada.estado-error .toast-llamada-icono{ color:#FF8F86; }
@keyframes pulso-llamada{ 0%,100%{ opacity:1; } 50%{ opacity:.4; } }
.toast-llamada-texto{ flex:1; }
.toast-llamada-titulo{ font-weight:600; font-size:14px; }
.toast-llamada-detalle{ font-size:13px; color:#C3CDE3; margin-top:1px; }
#btnCerrarToastLlamada{ background:transparent; border:none; color:#C3CDE3; cursor:pointer; flex-shrink:0; }
#btnCerrarToastLlamada:hover{ color:#fff; }

/* ---------- Esqueleto de carga (skeleton) ---------- */
.skeleton-bar{
  display:inline-block; height:14px; border-radius:6px; background:var(--sg-linea-suave);
  background-image:linear-gradient(90deg, var(--sg-linea-suave) 0px, var(--sg-fondo) 40px, var(--sg-linea-suave) 80px);
  background-size:600px 100%; animation:skeleton-shimmer 1.4s ease-in-out infinite;
}
@keyframes skeleton-shimmer{ 0%{ background-position:-300px 0; } 100%{ background-position:300px 0; } }

/* ---------- Barra de sub-secciones compartida (Llamadas, Envíos masivos, Estrategias, DATA) ---------- */
.sg-subnav{ display:flex; gap:2px; flex-wrap:nowrap; overflow-x:auto; border-bottom:1px solid var(--sg-linea); margin-bottom:20px; }
.sg-subnav a{ padding:12px 12px; font-weight:600; font-size:14px; color:var(--sg-texto-sec); text-decoration:none; white-space:nowrap; }
.sg-subnav a:hover{ color:var(--sg-azul); }
.sg-subnav a.active, .sg-subnav a.activo{ color:var(--sg-azul); box-shadow:inset 0 -2px 0 var(--sg-azul); }

/* ---------- Barras de progreso de campañas ---------- */
.sg-progreso{ height:6px; border-radius:3px; background:var(--sg-niebla); overflow:hidden; min-width:90px; }
.sg-progreso > span{ display:block; height:100%; background:var(--sg-azul); border-radius:3px; }
.sg-progreso.completado > span{ background:var(--sg-menta); }
.sg-progreso.error > span{ background:var(--sg-alerta); }

/* ---------- Conmutadores de canal (botones de alternancia) ---------- */
.sg-toggle-canal{ border:1.5px solid var(--sg-borde-campo); background:var(--sg-superficie); color:var(--sg-gris-texto); border-radius:var(--sg-radio); padding:6px 12px; font-weight:600; font-size:13px; cursor:pointer; }
.sg-toggle-canal.activo{ border-color:var(--sg-azul); color:var(--sg-azul-700); background:var(--sg-niebla); }

/* ---------- Impresión ---------- */
@media print{
  .sg-topbar, .sg-buscador, .sg-mega, .sg-mega-fondo, .sidebar, #dialerFlotante, #toastLlamada{ display:none !important; }
  .app-main{ padding:0; max-width:none; }
}

/* ============================================================
   INICIO · «Centro de trabajo» (partials/centro_trabajo.php)
   ============================================================ */
.ct-inicio{ display:flex; flex-direction:column; gap:22px; margin-bottom:32px; animation:sgIn .25s ease; }
@keyframes sgIn{ from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:none} }
.ct-cabecera{ display:flex; justify-content:space-between; align-items:flex-end; gap:16px; flex-wrap:wrap; }
.ct-saludo{ display:flex; flex-direction:column; gap:6px; }
.ct-fecha{ font-size:13.5px; color:var(--sg-texto-sec); }
.ct-saludo h1{ font-family:var(--sg-fuente-titulos); font-weight:700; font-size:30px; line-height:1.2; margin:0; color:var(--sg-titulo); }
.ct-pregunta{ font-size:15px; color:var(--sg-texto-sec); }
.ct-meta{ background:var(--sg-superficie); border:1px solid var(--sg-linea); border-radius:var(--sg-radio-lg); display:flex; align-items:center; gap:16px; padding:12px 18px; min-width:300px; }
.ct-meta-cuerpo{ display:flex; flex-direction:column; gap:6px; flex:1; }
.ct-meta-fila{ display:flex; justify-content:space-between; gap:10px; font-size:13.5px; }
.ct-meta-etq{ color:var(--sg-texto-sec); }
.ct-meta-txt{ font-weight:600; font-variant-numeric:tabular-nums; white-space:nowrap; }
.ct-meta-barra{ height:8px; border-radius:4px; background:var(--sg-niebla); overflow:hidden; }
.ct-meta-barra > div{ height:100%; background:var(--sg-azul); border-radius:4px; transition:width .4s; }
.ct-meta-pct{ font-family:var(--sg-fuente-titulos); font-weight:700; font-size:24px; color:var(--sg-titulo); }
.ct-cuadricula{ display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr)); gap:20px; align-items:start; }
.ct-columna{ display:flex; flex-direction:column; gap:12px; min-width:0; }
.ct-columna-doble{ grid-column:span 2; }
.ct-subtitulo{ font-family:var(--sg-fuente-titulos); font-weight:600; font-size:17px; color:var(--sg-titulo); margin:0; }
.ct-modulos{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.ct-principal{ grid-column:span 2; grid-row:span 2; text-align:left; background:var(--sg-medianoche); border:0; border-radius:var(--sg-radio-lg); padding:24px; cursor:pointer;
  display:flex; flex-direction:column; justify-content:space-between; gap:24px; min-height:260px; position:relative; overflow:hidden; color:#fff; transition:background .15s; }
.ct-principal:hover{ background:var(--sg-medianoche-700); }
.ct-principal > *{ position:relative; z-index:1; }
.ct-principal-sup{ display:flex; justify-content:space-between; align-items:flex-start; }
.ct-principal-icono{ width:48px; height:48px; border-radius:12px; background:var(--sg-azul); color:#fff; display:flex; align-items:center; justify-content:center; font-size:21px; }
.ct-etiqueta-usado{ font-size:12px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; background:var(--sg-ambar); color:var(--sg-medianoche); border-radius:6px; padding:3px 9px; white-space:nowrap; flex-shrink:0; }
.ct-principal-medio{ display:flex; flex-direction:column; gap:8px; }
.ct-principal-titulo{ font-family:var(--sg-fuente-titulos); font-weight:700; font-size:24px; color:#fff; }
.ct-principal-desc{ font-size:14.5px; color:#C3CDE3; line-height:1.5; max-width:420px; }
.ct-principal-inf{ display:flex; justify-content:space-between; align-items:flex-end; gap:12px; border-top:1px solid rgba(255,255,255,.12); padding-top:16px; }
.ct-principal-dato{ display:flex; flex-direction:column; }
.ct-principal-dato b{ font-family:var(--sg-fuente-titulos); font-weight:700; font-size:26px; color:#fff; font-variant-numeric:tabular-nums; }
.ct-principal-dato span{ font-size:13px; color:#C3CDE3; }
.ct-principal-ver{ color:#fff; font-weight:600; font-size:14px; display:flex; gap:8px; align-items:center; white-space:nowrap; }
.ct-principal-anillo{ position:absolute !important; right:-70px; top:-70px; width:240px; height:240px; border-radius:50%; border:40px solid rgba(21,101,255,.16); z-index:0 !important; pointer-events:none; }
.ct-modulo{ text-align:left; background:var(--sg-superficie); border:1px solid var(--sg-linea); border-radius:var(--sg-radio-lg); padding:18px; cursor:pointer;
  display:flex; flex-direction:column; gap:14px; justify-content:space-between; min-height:123px; transition:border-color .15s, box-shadow .15s; color:inherit; }
.ct-modulo:hover{ border-color:var(--sg-azul); box-shadow:var(--sg-sombra-hover); }
.ct-modulo-sup{ display:flex; justify-content:space-between; align-items:flex-start; }
.ct-modulo-icono{ width:38px; height:38px; border-radius:10px; background:var(--sg-niebla); color:var(--sg-azul); display:flex; align-items:center; justify-content:center; font-size:17px; }
.ct-modulo-flecha{ color:var(--sg-gris-punto); font-size:13px; }
.ct-modulo-inf{ display:flex; flex-direction:column; gap:3px; }
.ct-modulo-titulo{ font-family:var(--sg-fuente-titulos); font-weight:600; font-size:15px; color:var(--sg-titulo); }
.ct-modulo-dato{ font-size:13px; color:var(--sg-texto-sec); }
.ct-tarjeta{ background:var(--sg-superficie); border:1px solid var(--sg-linea); border-radius:var(--sg-radio-lg); padding:6px 18px; }
.ct-lista-item{ display:flex; align-items:center; gap:12px; padding:12px 0; border-bottom:1px solid var(--sg-linea-suave); text-decoration:none; color:inherit; }
.ct-lista-item:last-child{ border-bottom:0; }
.ct-lista-item:hover .ct-lista-cliente{ color:var(--sg-azul); }
.ct-lista-textos{ display:flex; flex-direction:column; gap:2px; flex:1; min-width:0; }
.ct-lista-cliente{ font-weight:600; font-size:14px; color:var(--sg-titulo); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ct-lista-sub{ font-size:12.5px; color:var(--sg-texto-sec); font-variant-numeric:tabular-nums; }
.ct-lista-vacia{ padding:14px 0; font-size:13.5px; color:var(--sg-texto-sec); }
.ct-lista-ver{ color:var(--sg-azul); font-weight:600; font-size:14px; text-decoration:none; display:flex; justify-content:space-between; align-items:center; padding:2px 4px; }
.ct-lista-ver:hover{ color:var(--sg-azul-700); }
.ct-accesos{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.ct-acceso{ background:var(--sg-superficie); border:1px solid var(--sg-linea); border-radius:12px; padding:14px; display:flex; flex-direction:column; gap:8px; text-decoration:none; color:var(--sg-titulo); font-weight:600; font-size:13.5px; position:relative; }
.ct-acceso:hover{ border-color:var(--sg-azul); color:var(--sg-azul); }
.ct-acceso i{ color:var(--sg-azul); font-size:18px; }
.ct-acceso .sg-contador{ position:absolute; top:12px; right:12px; }
@media (max-width: 991.98px){
  .ct-columna-doble{ grid-column:auto; }
  .ct-modulos{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ct-principal{ grid-column:span 2; grid-row:auto; min-height:220px; }
  .ct-meta{ min-width:0; width:100%; }
  .ct-saludo h1{ font-size:24px; }
}
@media (max-width: 575.98px){ .ct-modulos{ grid-template-columns:1fr; } .ct-principal{ grid-column:auto; } }

/* Ícono de tarjeta (pantallas de entrada tipo menú, ej. Reportes) */
.sg-icono-tarjeta{ width:42px; height:42px; border-radius:10px; background:var(--sg-niebla); color:var(--sg-azul); display:flex; align-items:center; justify-content:center; font-size:18px; }
a.text-decoration-none > .panel{ transition:border-color .15s, box-shadow .15s; }
a.text-decoration-none:hover > .panel{ border-color:var(--sg-azul); box-shadow:var(--sg-sombra-hover); }

/* ---------- Detalle de operación ---------- */
#tituloOperacion{ font-size:26px; }
.sg-form-tarjeta{ background:var(--sg-superficie); border:1px solid var(--sg-linea); border-radius:10px; padding:16px; }
#datosCliente .btn-link{ font-size:13px; text-decoration:none; color:var(--sg-azul); line-height:1; }
#datosCliente .btn-link:hover{ color:var(--sg-azul-700); }
#datosCliente > div:first-child strong{ font-size:14.5px; color:var(--sg-titulo); }
#resumenFinanciero .fw-bold{ color:var(--sg-titulo); }

/* ---------- Informe DATA (assets/js/data-reporte.js) ---------- */
.data-cabecera{ background:linear-gradient(180deg,#EAF1FF,#F4F7FD); border:1px solid #D6E3FA; border-radius:12px; padding:18px 20px; }
.data-cabecera-antetitulo{ font-size:11px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; color:var(--sg-azul); }
.data-cabecera-nombre{ font-family:var(--sg-fuente-titulos); font-size:20px; font-weight:700; text-transform:uppercase; color:var(--sg-medianoche); line-height:1.25; margin:2px 0; }
.data-cabecera-sub{ font-size:13px; color:var(--sg-texto-sec); }
.data-calificacion{ display:inline-flex; align-items:center; justify-content:center; min-width:24px; height:22px; border-radius:11px; font-weight:700; font-size:12px; padding:0 6px; }
.data-seccion{ border-radius:12px; padding:16px 18px; }
.data-seccion-titulo{ font-family:var(--sg-fuente-titulos); font-size:14.5px; font-weight:600; color:var(--sg-titulo); margin-bottom:14px; }
.data-seccion-titulo i{ color:var(--sg-azul); margin-right:4px; }
.data-pares{ display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:10px 28px; }
.data-par-etiqueta{ font-size:11.5px; color:var(--sg-texto-sec); }
.data-par-valor{ font-size:13.5px; font-weight:600; color:var(--sg-titulo); text-transform:uppercase; }
.data-contacto{ display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:14px 28px; }
.data-telefonos{ display:grid; grid-template-columns:repeat(auto-fill,minmax(110px,1fr)); gap:4px 10px; }
.data-telefono{ font-size:13.5px; font-weight:600; color:var(--sg-azul); text-decoration:none; }
a.data-telefono:hover{ color:var(--sg-azul-700); text-decoration:underline; }
.data-recuadro{ border:1px solid var(--sg-linea); border-radius:10px; padding:14px 16px; margin-bottom:8px; }
.data-seccion .table-modern thead th{ background:transparent; font-size:11px; }
.data-seccion .table-modern td{ font-size:13px; }
.data-link-consulta{ display:inline-flex; align-items:center; gap:6px; padding:2px 8px; border-radius:var(--sg-radio-sm); background:var(--sg-niebla); color:var(--sg-azul-700); text-decoration:none; font-size:12.5px; font-weight:600; }
.data-link-consulta:hover{ color:var(--sg-azul); background:var(--sg-tinte-azul); }

/* ---------- Bandeja de mensajes ---------- */
.sg-conv{ display:flex; align-items:center; gap:10px; padding:10px 14px; border-bottom:1px solid var(--sg-linea-suave); text-decoration:none; color:var(--sg-pizarra); }
.sg-conv:hover{ background:var(--sg-hover-fila); color:var(--sg-pizarra); }
.sg-conv.activa{ background:var(--sg-fondo); box-shadow:inset 3px 0 0 var(--sg-azul); }
.sg-conv-avatar{ width:36px; height:36px; border-radius:50%; background:var(--sg-niebla); color:var(--sg-azul-700); font-weight:600; font-size:13px; display:flex; align-items:center; justify-content:center; flex-shrink:0; font-family:var(--sg-fuente-titulos); }
.sg-conv-cuerpo{ min-width:0; flex:1; }
.sg-conv-nombre{ font-weight:600; font-size:14px; color:var(--sg-titulo); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sg-conv-previa{ font-size:12.5px; color:var(--sg-texto-sec); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sg-conv-meta{ display:flex; flex-direction:column; align-items:flex-end; gap:4px; font-size:12px; color:var(--sg-texto-sec); flex-shrink:0; }

/* Controles segmentados (filtros de canal y estado): se generan a partir de un <select data-sg-segmentado> */
.sg-segmentado{ display:flex; gap:2px; background:var(--sg-fondo); border-radius:var(--sg-radio); padding:3px; }
.sg-segmentado button{ flex:1; border:0; background:transparent; color:var(--sg-texto-sec); font-size:12.5px; font-weight:600; padding:5px 8px; border-radius:6px; cursor:pointer; white-space:nowrap; }
.sg-segmentado button:hover{ color:var(--sg-azul); }
.sg-segmentado button.activo{ background:var(--sg-superficie); color:var(--sg-azul-700); box-shadow:0 1px 3px rgba(10,31,77,.12); }

/* Canales habilitados por cartera (Estrategias): botones de alternancia */
.sg-canal-toggle .btn-check + .btn{ border:1.5px solid var(--sg-borde-campo); background:var(--sg-superficie); color:var(--sg-gris-texto); }
.sg-canal-toggle .btn-check:checked + .btn{ border-color:var(--sg-azul); background:var(--sg-niebla); color:var(--sg-azul-700); }
.sg-canal-toggle .btn-check:focus-visible + .btn{ outline:2px solid var(--sg-azul); outline-offset:2px; }

/* En celulares estrechos la barra superior deja solo lo esencial (buscar, bandeja, notificaciones y usuario) */
@media (max-width: 575.98px){
  .sg-topbar-acciones #indicadorEstadoDataTopbar, .sg-topbar-acciones a[href="ayuda"]{ display:none; }
}

/* Enlace de fin de fila en los listados clicables («Gestionar ›») */
.sg-link-gestionar{ color:var(--sg-azul); font-weight:600; text-decoration:none; margin-right:6px; white-space:nowrap; }
.sg-link-gestionar:hover{ color:var(--sg-azul-700); text-decoration:underline; }
.btn-outline-info{ --bs-btn-color:#0F4FD1; --bs-btn-border-color:#CBD6EA; --bs-btn-hover-bg:#EAF1FF; --bs-btn-hover-color:#0F4FD1; --bs-btn-hover-border-color:#1565FF; --bs-btn-active-bg:#EAF1FF; --bs-btn-active-color:#0F4FD1; }
