/* ───────────────────────────────────────────────────────────────────────────
   GCan — estilo visual FROST (portado de ClasCon: header + navbar + botones).
   GCan es siempre "frost", así que las reglas se aplican directas a las clases.
   Filas IGUAL que ClasCon: principal min-height 64 + navegación height 52. ClasCon/GRP usan
   Tailwind (reset global box-sizing:border-box) → el padding va DENTRO → alto total = 116px.
   GCan replica ese box model SOLO en el header (.tc-platform-header *) para calcar los 116px.
   Los paneles usan --tc-header-h (medida en runtime) para quedar a ras.
   ─────────────────────────────────────────────────────────────────────────── */
:root {
  --tc-brand-blue: rgb(0 87 184);
  --frost-header-blur: 20px;
  --frost-bg-warmth: 1;     /* multiplicador de la calidez del fondo (0 = neutro) */
  --frost-bg-image: none;   /* imagen de fondo opcional (data URL) */
  --frost-bg-blur: 0px;     /* desenfoque de la imagen de fondo */
  --frost-bg-tint: 0;       /* opacidad del velo de color sobre la imagen (0-1) */
  --frost-bg-tint-rgb: 238 242 248; /* color del velo de la imagen */
  --frost-bg-veil: 0.9;     /* opacidad del velo blanco base de body::after (0 cuando hay imagen de fondo) */
  --frost-card-opacity: 0.72; /* opacidad del cristal de tarjetas/tablas/fichas (intensidad, ajustable) */
  --frost-surface-blur: 16px; /* desenfoque del cristal de superficies */
  --frost-modal-blur: 20px;   /* desenfoque del cristal de ventanas/modales/popovers */
  --frost-icon-opacity: 0.92; /* opacidad de los iconos (canónico, compartido) */
  --tc-header-h: 116px;     /* altura REAL del header (se mide en runtime; 116 = main 64 + nav 52 con box-sizing:border-box, IGUAL que ClasCon/GRP que usan Tailwind); paneles y contenido la usan para quedar a ras */
  --font-display: 'Space Grotesk', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* Fondo cálido FROST tras el contenido (capa fija) para que el cristal "lea". */
body { background-color: #eef2f8; }

/* Cristal FROST reutilizable: añadir className "tc-frost-surface" / "tc-frost-modal" a superficies
   con fondo opaco inline (tablas, KPIs, mapas, desplegables, fichas, modales). El !important vence
   al background:"white" inline sin tener que tocarlo en cada componente. */
.tc-frost-surface { background: rgba(255,255,255, var(--frost-card-opacity, 0.72)) !important; backdrop-filter: blur(var(--frost-surface-blur, 16px)) saturate(1.2); -webkit-backdrop-filter: blur(var(--frost-surface-blur, 16px)) saturate(1.2); }
.tc-frost-modal { background: rgba(255,255,255, calc(var(--frost-card-opacity, 0.72) + 0.20)) !important; backdrop-filter: blur(var(--frost-modal-blur, 20px)) saturate(1.2); -webkit-backdrop-filter: blur(var(--frost-modal-blur, 20px)) saturate(1.2); }
/* Capa 1 (debajo): imagen de fondo opcional. */
body::before {
  content: ""; position: fixed; inset: -40px; z-index: -2; pointer-events: none;
  /* Velo de color (configurable) sobre la imagen de fondo, para que el cristal lea bien. */
  background-image:
    linear-gradient(0deg, rgb(var(--frost-bg-tint-rgb, 238 242 248) / var(--frost-bg-tint, 0)), rgb(var(--frost-bg-tint-rgb, 238 242 248) / var(--frost-bg-tint, 0))),
    var(--frost-bg-image, none);
  background-size: cover; background-position: center; background-repeat: no-repeat;
  filter: saturate(1.05) blur(var(--frost-bg-blur, 0px));
}
/* Capa 2 (encima de la imagen, debajo del contenido): gradiente cálido (calidez ajustable). */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(circle at 12% 0%, rgb(0 87 184 / 0.06), transparent 38%),
    radial-gradient(circle at 92% 4%, rgb(6 182 212 / 0.06), transparent 34%),
    linear-gradient(135deg,
      rgb(255 138 101 / calc(0.07 * var(--frost-bg-warmth, 1))) 0%,
      rgb(255 196 140 / calc(0.06 * var(--frost-bg-warmth, 1))) 30%,
      rgb(255 247 235 / calc(0.09 * var(--frost-bg-warmth, 1))) 55%,
      rgb(186 230 253 / calc(0.10 * var(--frost-bg-warmth, 1))) 85%,
      rgb(221 214 254 / calc(0.10 * var(--frost-bg-warmth, 1))) 100%),
    linear-gradient(180deg, rgb(248 250 252 / var(--frost-bg-veil, 0.9)), rgb(238 242 248 / var(--frost-bg-veil, 0.9)));
}

/* ── Header (cristal blanco translúcido) ── */
.tc-platform-header {
  position: fixed; inset: 0 0 auto 0; z-index: 500;
  color: #1e293b;
  font-family: var(--font-display);
  /* Sin border-bottom (el filo se da por box-shadow). main 64 + nav 52 con box-sizing:border-box
     = 116px total, IGUAL que ClasCon/GRP (Tailwind border-box); paneles usan --tc-header-h (runtime). */
  background:
    radial-gradient(circle at 12% 18%, rgb(0 87 184 / 0.10), transparent 36%),
    radial-gradient(circle at 90% 8%, rgb(6 182 212 / 0.10), transparent 32%),
    linear-gradient(180deg, rgb(255 255 255 / 0.66), rgb(255 255 255 / 0.50));
  box-shadow: 0 14px 32px rgb(15 23 42 / 0.10), inset 0 -1px 1px rgb(255 255 255 / 0.62);
  backdrop-filter: blur(var(--frost-header-blur)) saturate(1.28);
  -webkit-backdrop-filter: blur(var(--frost-header-blur)) saturate(1.28);
}
/* Como ClasCon/GRP (Tailwind preflight): padding DENTRO → header total = 116px (no 142). */
.tc-platform-header, .tc-platform-header * { box-sizing: border-box; }
.tc-platform-header-main {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 64px; padding: 0.45rem 1.5rem 0.2rem; overflow: visible;
}
.tc-platform-brand { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.tc-platform-logo { height: 46px; width: auto; object-fit: contain; flex-shrink: 0; margin-right: 0.55rem; }
.tc-platform-titleblock { display: flex; flex-direction: column; min-width: 0; line-height: 1.05; }
.tc-platform-eyebrow { font-size: 0.62rem; font-weight: 600; letter-spacing: 0.18em; color: #64748b; text-transform: uppercase; line-height: 1; margin-bottom: 0.18rem; }
.tc-platform-appname { color: #0f172a; font-size: 1.05rem; font-weight: 700; letter-spacing: -0.012em; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: clamp(9rem, 28vw, 34rem); }

.tc-platform-pill, .tc-platform-status {
  border-radius: 999px; padding: 0.18rem 0.55rem; font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap;
  background: rgb(255 255 255 / 0.62); color: #475569; border: 1px solid rgb(255 255 255 / 0.86);
  backdrop-filter: blur(8px);
}
.tc-platform-status { display: inline-flex; align-items: center; gap: 0.38rem; }
.tc-status-dot { width: 0.38rem; height: 0.38rem; border-radius: 999px; background: #94a3b8; flex-shrink: 0; }
.tc-status-ok .tc-status-dot { background: #34d399; }
.tc-status-error .tc-status-dot { background: #fb7185; }
.tc-status-sync .tc-status-dot { background: #facc15; animation: tc-frost-pulse 1.4s infinite; }
@keyframes tc-frost-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.tc-platform-actions { display: flex; align-items: center; gap: 0.45rem; flex-shrink: 0; }
.tc-header-icon-button {
  width: 2.4rem; height: 2.4rem; padding: 0; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  background: rgb(255 255 255 / 0.56); color: #334155; border: 1px solid rgb(255 255 255 / 0.80);
  box-shadow: inset 0 1px 1px rgb(255 255 255 / 0.62), 0 4px 10px rgb(15 23 42 / 0.06);
  backdrop-filter: blur(12px) saturate(1.18); cursor: pointer;
  transition: background-color 160ms ease, transform 160ms ease, box-shadow 160ms ease, color 160ms ease;
}
.tc-header-icon-button:hover:not(:disabled) {
  background: rgb(255 255 255 / 0.9); color: #0057b8;
  box-shadow: inset 0 1px 1px rgb(255 255 255 / 0.8), 0 8px 18px rgb(0 87 184 / 0.18); transform: translateY(-1px);
}
.tc-header-icon-button:disabled { opacity: 0.5; cursor: not-allowed; }
/* Opacidad de los iconos (ajuste frost compartido --frost-icon-opacity). */
.tc-platform-header .tc-header-icon-button svg, .tc-platform-header .tc-platform-nav-link svg, .tc-platform-header .tc-header-logout-button svg { opacity: var(--frost-icon-opacity, 1); }
/* Ayuda: igual que ClasCon frost = botón de cristal (NO amarillo) con "?" de texto. */
.tc-header-help-mark { display: inline-flex; align-items: center; justify-content: center; font-size: 1.05rem; font-weight: 900; line-height: 1; }
.tc-header-alert-button {
  display: inline-flex; align-items: center; gap: 0.3rem; height: 2.3rem; padding: 0 0.75rem;
  font-size: 0.72rem; font-weight: 800; background: #ea580c; color: #fff;
  border: 1px solid rgb(255 255 255 / 0.55); border-radius: 999px; cursor: pointer;
  box-shadow: 0 4px 12px rgb(234 88 12 / 0.28);
}

.tc-user-chip { display: flex; align-items: center; gap: 0.62rem; height: 2.6rem; background: transparent; border: none; padding: 0; color: #0f172a; }
.tc-user-avatar {
  width: 2.4rem; height: 2.4rem; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; color: #0057b8; flex-shrink: 0;
  background: radial-gradient(circle at 24% 24%, rgb(255 255 255 / 0.78), transparent 56%), rgb(255 255 255 / 0.66);
  border: 1px solid rgb(255 255 255 / 0.82); box-shadow: inset 0 1px 1px rgb(255 255 255 / 0.78), 0 4px 10px rgb(15 23 42 / 0.06);
}
.tc-user-copy { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.tc-user-copy strong { color: #0f172a; font-weight: 500; font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-user-copy > span { color: #64748b; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.62rem; }

/* ── Fila de navegación ── */
.tc-platform-navigation-row { position: relative; display: flex; align-items: center; justify-content: center; height: 52px; padding: 0.35rem 1.5rem 0.6rem; }
.tc-platform-nav { display: flex; align-items: center; max-width: 100%; overflow: visible; }
.tc-platform-nav-pill { display: flex; align-items: center; gap: 0.62rem; }
.tc-platform-nav-link {
  display: inline-flex; align-items: center; gap: 0.35rem; min-height: 2.4rem; border-radius: 999px; padding: 0 1rem;
  color: #64748b; font-family: var(--font-display); font-size: 0.76rem; font-weight: 600; white-space: nowrap;
  border: none; background: transparent; cursor: pointer; transition: color 160ms ease, background-color 160ms ease;
}
.tc-platform-nav-link:hover { color: #0284c7; }
.tc-platform-nav-link.is-icons-only { width: 2.4rem; height: 2.4rem; min-height: 2.4rem; padding: 0; justify-content: center; aspect-ratio: 1 / 1; flex: 0 0 auto; }
.tc-platform-nav-link-active, .tc-platform-nav-link-active:hover {
  color: #fff;
  background: radial-gradient(circle at 22% 22%, rgb(255 255 255 / 0.36), transparent 56%), linear-gradient(135deg, #0057b8 0%, #0284c7 56%, #06b6d4 100%);
  box-shadow: inset 0 1px 1px rgb(255 255 255 / 0.38);
}

.tc-header-undo-group { position: absolute; right: 1.5rem; top: 50%; transform: translateY(-50%); display: flex; background: rgb(255 255 255 / 0.5); border-radius: 999px; overflow: hidden; border: 1px solid rgb(255 255 255 / 0.72); }
.tc-header-undo-group button { padding: 4px 11px; border: none; background: transparent; cursor: pointer; color: #0057b8; font-size: 14px; line-height: 1; }
.tc-header-undo-group button:disabled { color: #cbd5e1; cursor: default; }

@media (max-width: 820px) {
  .tc-platform-pill { display: none; }
  .tc-user-copy { display: none; }
  .tc-platform-nav-link { padding: 0; font-size: 0.72rem; }
  .tc-header-undo-group { display: none; }
}

/* ── Tooltip tematizado (oscuro) para elementos con data-tooltip (nav icon-only, etc.) ── */
[data-tooltip] { position: relative; }
[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute; left: 50%; top: calc(100% + 9px); transform: translateX(-50%);
  background: rgb(255 255 255 / 0.92); color: #0f3f79; font-family: var(--font-display);
  font-size: 11px; font-weight: 700; letter-spacing: 0.01em;
  padding: 5px 9px; border-radius: 8px; white-space: nowrap; z-index: 2000; pointer-events: none;
  border: 1px solid rgb(255 255 255 / 0.8);
  backdrop-filter: blur(var(--frost-surface-blur, 16px)) saturate(1.2);
  -webkit-backdrop-filter: blur(var(--frost-surface-blur, 16px)) saturate(1.2);
  box-shadow: 0 10px 24px rgb(15 23 42 / 0.18);
}
[data-tooltip]:hover::before {
  content: ""; position: absolute; left: 50%; top: calc(100% + 4px); transform: translateX(-50%);
  border: 5px solid transparent; border-bottom-color: rgb(255 255 255 / 0.92); z-index: 2000; pointer-events: none;
}

/* ── GridBoard (Fase E): asas de mover/redimensionar ocultas hasta hover o interacción ── */
.tc-grid-handle { opacity: 0; transition: opacity 0.12s ease; }
.tc-grid-tile:hover .tc-grid-handle,
.tc-grid-tile.is-active .tc-grid-handle { opacity: 1; }
.tc-grid-tile.is-active { cursor: grabbing; }
.tc-grid-handle:active { cursor: grabbing; }
/* Anillo de trabajos en segundo plano (inyectado en el slot «nav» del header) + su popover (pila). */
.jr-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0; cursor: pointer; padding: 2px; border-radius: 999px; line-height: 0;
}
.jr-btn:hover { background: rgba(0, 87, 184, 0.09); }
.jr-ring { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.jr-ring.is-spin { animation: jr-pulse 1.4s ease-in-out infinite; }
@keyframes jr-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.62; } }
.jr-ring-txt {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 0.62rem; font-weight: 800; color: #0057b8; line-height: 1; font-variant-numeric: tabular-nums;
}
.jr-badge {
  position: absolute; top: -3px; right: -3px; min-width: 15px; height: 15px; padding: 0 3px;
  border-radius: 999px; background: #e11d8f; color: #fff; font-size: 0.62rem; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px rgba(255,255,255,0.9);
}

.jr-pop {
  width: min(360px, calc(100vw - 24px)); z-index: 4000;
  background: rgba(255, 255, 255, 0.86); backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.7); border-radius: 14px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22); overflow: hidden;
}
.jr-pop-h { padding: 10px 14px; font-weight: 800; font-size: 0.82rem; color: #1e293b; border-bottom: 1px solid rgba(0,0,0,0.06); }
.jr-pop-list { max-height: min(60vh, 440px); overflow-y: auto; padding: 6px; }
.jr-item { padding: 8px 10px; border-radius: 10px; }
.jr-item + .jr-item { margin-top: 2px; }
.jr-item.is-corriendo { background: rgba(0, 87, 184, 0.06); }
.jr-item.is-error { background: rgba(220, 38, 38, 0.06); }
.jr-item-top { font-size: 0.84rem; color: #1e293b; }
.jr-sub { color: #64748b; font-weight: 500; }
.jr-item-bar { height: 5px; border-radius: 999px; background: rgba(0,87,184,0.12); margin: 6px 0 5px; overflow: hidden; }
.jr-item-fill { display: block; height: 100%; background: linear-gradient(90deg, #0057b8, #06b6d4); border-radius: 999px; transition: width 0.4s ease; }
.jr-item.is-ok .jr-item-fill { background: #16a34a; }
.jr-item.is-error .jr-item-fill { background: #dc2626; }
.jr-item-det { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 0.76rem; color: #475569; }
.jr-ok { color: #15803d; font-weight: 700; }
.jr-err { color: #b91c1c; }
.jr-item-actions { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; }
.jr-link { background: none; border: 0; color: #0057b8; font-weight: 700; font-size: 0.76rem; cursor: pointer; padding: 0; }
.jr-link:hover { text-decoration: underline; }
.jr-x { background: none; border: 0; color: #94a3b8; font-size: 1rem; line-height: 1; cursor: pointer; padding: 0 2px; }
.jr-x:hover { color: #64748b; }

/* FROST claro determinista: sin variante dark. */
/* Estilos globales de Compliance (base + kit ligero de clases frost para las vistas). */

/* Barra de scroll discreta — misma técnica que GCon/GRP/GCan. */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
@supports (-moz-appearance: none) {
  * { scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }
}
html { scrollbar-gutter: stable; }

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: #0f172a;
  font-size: 14px;
}

:root {
  --gp-space-1: 4px; --gp-space-2: 8px; --gp-space-3: 12px; --gp-space-4: 16px; --gp-space-5: 24px;
  --gp-radius-sm: 10px; --gp-radius-md: 14px; --gp-radius-lg: 18px;
  --gp-focus: #0369a1; --gp-danger: #b91c1c; --gp-success: #15803d; --gp-warning: #b45309;
  --gp-text: #0f172a; --gp-text-muted: #64748b;
}

:where(button, a, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--gp-focus); outline-offset: 3px;
}
.gp-cases-layout { display: grid; grid-template-columns: minmax(300px, 4fr) minmax(460px, 8fr); gap: 16px; align-items: start; }
.gp-section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.gp-section-head .gp-card-title { margin-bottom: 3px; }
.gp-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.gp-actions-end { display: flex; justify-content: flex-end; }
.gp-inline-form { margin: 14px 0; padding: 14px; border-radius: var(--gp-radius-md); background: rgb(241 245 249 / 0.65); border: 1px solid rgb(203 213 225 / 0.7); }
.gp-error-text { color: var(--gp-danger); font-size: 0.82rem; }
.gp-history { margin-top: 14px; border-top: 1px solid rgb(203 213 225 / 0.7); padding-top: 10px; }
.gp-history summary { cursor: pointer; font-weight: 700; color: #334155; }
.gp-history ol { margin: 10px 0 0; padding-left: 20px; color: var(--gp-text-muted); font-size: 0.8rem; }
.gp-legal-timeline { list-style: none; margin: 0; padding: 0; }
.gp-legal-timeline li { display: grid; grid-template-columns: 100px 14px 1fr; gap: 10px; padding: 10px 0; position: relative; }
.gp-legal-timeline li:not(:last-child)::after { content: ''; position: absolute; left: 116px; top: 25px; bottom: -11px; width: 2px; background: rgb(2 132 199 / 0.22); }
.gp-legal-timeline time { color: var(--gp-text-muted); font-size: 0.75rem; text-align: right; padding-top: 2px; }
.gp-legal-dot { width: 10px; height: 10px; margin-top: 4px; border-radius: 50%; background: #0284c7; box-shadow: 0 0 0 4px rgb(2 132 199 / 0.14); z-index: 1; }
.gp-legal-title { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.gp-legal-timeline p { margin: 5px 0; line-height: 1.5; }
.gp-legal-timeline a { display: inline-block; margin-left: 8px; }
.rv-page { display: grid; gap: var(--gp-space-4); }
.rv-desk { display: grid; grid-template-columns: minmax(220px, 0.8fr) minmax(0, 2fr); gap: var(--gp-space-4); margin-top: var(--gp-space-4); }
.rv-list { display: grid; gap: 7px; align-content: start; max-height: 720px; overflow-y: auto; }
.rv-list button { text-align: left; border: 1px solid rgb(203 213 225 / 0.8); border-radius: var(--gp-radius-md); background: rgb(255 255 255 / 0.55); padding: 10px; cursor: pointer; color: inherit; }
.rv-list button.is-active { border-color: #0284c7; background: rgb(224 242 254 / 0.7); box-shadow: 0 6px 18px rgb(2 132 199 / 0.12); }
.rv-list button span, .rv-list button small { display: block; margin-top: 3px; }
.rv-list button span { line-height: 1.35; }
.rv-list button small { color: var(--gp-text-muted); }
.rv-detail { min-width: 0; border-left: 1px solid rgb(203 213 225 / 0.7); padding-left: var(--gp-space-4); }
.rv-title { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.rv-title-actions { display: inline-flex; gap: 8px; align-items: center; flex: 0 0 auto; }
.rv-title h3 { margin: 0; font-size: 1.05rem; }
.rv-dimensions { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; margin: 14px 0; }
.rv-dimensions span { padding: 9px; border-radius: var(--gp-radius-sm); background: rgb(241 245 249 / 0.8); }
.rv-dimensions small, .rv-dimensions strong { display: block; }
.rv-dimensions small { color: var(--gp-text-muted); font-size: 0.66rem; text-transform: uppercase; }
.rv-dimensions strong { margin-top: 2px; overflow-wrap: anywhere; }
.rv-central { line-height: 1.55; padding: 10px 12px; border-left: 3px solid #0284c7; background: rgb(224 242 254 / 0.45); }
.rv-warning, .rv-issues { padding: 10px 12px; border-radius: var(--gp-radius-sm); background: rgb(254 243 199 / 0.65); color: #854d0e; }
.rv-quotes { list-style: none; padding: 0; display: grid; gap: 7px; }
.rv-quotes li { display: flex; gap: 8px; justify-content: space-between; align-items: flex-start; padding: 9px 11px; border-radius: var(--gp-radius-sm); background: rgb(240 253 244 / 0.7); border: 1px solid rgb(187 247 208 / 0.8); }
.rv-quotes.is-counter li { background: rgb(255 251 235 / 0.8); border-color: rgb(253 230 138 / 0.8); }
.rv-actions { display: flex; justify-content: flex-end; gap: 8px; }
.rv-toggle { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.rv-kpis { display: grid; grid-template-columns: repeat(4, minmax(120px,1fr)); gap: 8px; margin: 14px 0; }
.rv-kpis span { padding: 10px 12px; border-radius: var(--gp-radius-sm); background: rgb(241 245 249 / 0.75); }
.rv-kpis strong { font-size: 1.35rem; margin-right: 4px; }
.rv-kpis .is-alert { color: var(--gp-danger); background: rgb(254 226 226 / 0.7); }
.rv-table-wrap { overflow-x: auto; }

@media (max-width: 900px) {
  .gp-main { padding-left: 12px; padding-right: 12px; }
  .gp-cases-layout { grid-template-columns: 1fr; }
  .rv-desk { grid-template-columns: 1fr; }
  .rv-detail { border-left: 0; border-top: 1px solid rgb(203 213 225 / 0.7); padding: 14px 0 0; }
  .rv-dimensions { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 620px) {
  .gp-form-grid { grid-template-columns: 1fr; }
  .gp-card { border-radius: var(--gp-radius-md); padding: 14px; }
  .gp-modal-backdrop { padding: 8px; }
  .gp-modal { max-height: calc(100dvh - 16px); border-radius: var(--gp-radius-md); }
  .gp-modal-title { position: relative; flex-direction: column; padding-right: 58px; }
  .gp-modal-title-actions { width: 100%; }
  .gp-modal-close { position: absolute; top: 11px; right: 12px; }
  .gp-review-attribution { min-height: 36px; }
  .gp-modal-footer { flex-wrap: wrap; }
  .gp-modal-footer .gp-btn { flex: 1 1 auto; }
  .gp-legal-timeline li { grid-template-columns: 72px 12px 1fr; gap: 8px; }
  .gp-legal-timeline li:not(:last-child)::after { left: 85px; }
  .rv-kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* Contenido bajo la cabecera fija (altura --tc-header-h medida por el header compartido). */
.gp-main { padding: calc(var(--tc-header-h, 116px) + 18px) 22px 48px; max-width: 1340px; margin: 0 auto; }

.gp-display { font-family: var(--font-display, 'Space Grotesk', 'Inter', sans-serif); }

/* Tarjeta de cristal frost (mismas variables que el resto del grupo). */
.gp-card {
  background: rgba(255, 255, 255, var(--frost-card-opacity, 0.72));
  backdrop-filter: blur(var(--frost-surface-blur, 16px)) saturate(1.2);
  -webkit-backdrop-filter: blur(var(--frost-surface-blur, 16px)) saturate(1.2);
  border: 1px solid rgb(255 255 255 / 0.78);
  border-radius: 18px;
  box-shadow: 0 12px 30px rgb(15 23 42 / 0.08);
  padding: 18px;
}
.gp-card-title { margin: 0 0 12px; font-family: var(--font-display); font-size: 0.95rem; font-weight: 700; color: #0f172a; display: flex; align-items: center; gap: 8px; }

/* Botones */
.gp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 0.48rem 0.95rem; border-radius: 999px; border: 1px solid rgb(255 255 255 / 0.82);
  background: rgb(255 255 255 / 0.6); color: #0f172a; font: inherit; font-size: 0.8rem; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  backdrop-filter: blur(10px) saturate(1.15); -webkit-backdrop-filter: blur(10px) saturate(1.15);
  box-shadow: inset 0 1px 1px rgb(255 255 255 / 0.6), 0 4px 10px rgb(15 23 42 / 0.06);
  transition: background-color 150ms ease, transform 150ms ease, box-shadow 150ms ease, color 150ms ease;
}
.gp-btn:hover:not(:disabled) { background: rgb(255 255 255 / 0.92); color: #0057b8; transform: translateY(-1px); box-shadow: 0 8px 18px rgb(0 87 184 / 0.16); }
.gp-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.gp-btn.is-primary {
  border: none; color: #fff;
  background: radial-gradient(circle at 22% 22%, rgb(255 255 255 / 0.32), transparent 56%), linear-gradient(135deg, #0057b8 0%, #0284c7 56%, #06b6d4 100%);
}
.gp-btn.is-primary:hover:not(:disabled) {
  color: #fff; /* fondo azul EXPLÍCITO en hover: si no, hereda el blanco del hover genérico → texto blanco ilegible */
  background: radial-gradient(circle at 22% 22%, rgb(255 255 255 / 0.40), transparent 56%), linear-gradient(135deg, #0064d1 0%, #0290d8 56%, #12c3e0 100%);
  box-shadow: 0 10px 22px rgb(0 87 184 / 0.30);
}
.gp-btn.is-danger:hover:not(:disabled) { color: #b91c1c; box-shadow: 0 8px 18px rgb(185 28 28 / 0.14); }
.gp-btn.is-small { padding: 0.3rem 0.7rem; font-size: 0.74rem; }

/* Campos */
.gp-label { display: block; font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #64748b; margin: 0 0 4px; }
.gp-input, .gp-select, .gp-textarea {
  width: 100%; padding: 0.5rem 0.7rem; border-radius: 12px; border: 1px solid rgb(203 213 225 / 0.9);
  background: rgb(255 255 255 / 0.78); font: inherit; font-size: 0.85rem; color: #0f172a;
}
.gp-input:focus, .gp-select:focus, .gp-textarea:focus { outline: 2px solid rgb(2 132 199 / 0.4); outline-offset: 0; border-color: #7dd3fc; }
.gp-textarea { min-height: 96px; resize: vertical; }

/* Tabla */
.gp-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.gp-table th { text-align: left; padding: 0.45rem 0.6rem; font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.08em; color: #64748b; border-bottom: 1px solid rgb(203 213 225 / 0.7); }
.gp-table td { padding: 0.55rem 0.6rem; border-top: 1px solid rgb(226 232 240 / 0.7); vertical-align: top; }
.gp-table tbody tr:hover { background: rgb(255 255 255 / 0.5); }

/* Chips / badges */
.gp-badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 0.14rem 0.5rem; border-radius: 999px;
  font-size: 0.64rem; font-weight: 700; letter-spacing: 0.03em; white-space: nowrap;
  background: rgb(241 245 249 / 0.9); color: #475569; border: 1px solid rgb(226 232 240 / 0.9);
}
.gp-badge.is-blue { background: rgb(219 234 254 / 0.9); color: #1d4ed8; border-color: rgb(191 219 254 / 0.9); }
.gp-badge.is-green { background: rgb(220 252 231 / 0.9); color: #15803d; border-color: rgb(187 247 208 / 0.9); }
.gp-badge.is-amber { background: rgb(254 243 199 / 0.9); color: #b45309; border-color: rgb(253 230 138 / 0.9); }
.gp-badge.is-red { background: rgb(254 226 226 / 0.9); color: #b91c1c; border-color: rgb(254 202 202 / 0.9); }

/* Enlaces */
.gp-link { color: #0057b8; text-decoration: none; font-weight: 600; }
.gp-link:hover { text-decoration: underline; }
.gp-muted { color: #64748b; }

/* Modal frost */
.gp-modal-backdrop {
  position: fixed; inset: 0; z-index: 6000; display: flex; align-items: flex-start; justify-content: center;
  background: rgb(15 23 42 / 0.34); padding: 24px 18px; overflow-y: auto;
}
.gp-modal {
  background: rgba(255, 255, 255, calc(var(--frost-card-opacity, 0.72) + 0.2));
  backdrop-filter: blur(var(--frost-modal-blur, 20px)) saturate(1.2);
  -webkit-backdrop-filter: blur(var(--frost-modal-blur, 20px)) saturate(1.2);
  border: 1px solid rgb(255 255 255 / 0.85); border-radius: 20px;
  box-shadow: 0 24px 60px rgb(15 23 42 / 0.25);
  width: min(680px, 100%);
  /* Nunca más alto que la ventana: cuerpo con scroll + pie anclado (los botones siempre visibles). */
  max-height: calc(100vh - 48px);
  display: flex; flex-direction: column; overflow: hidden;
}
.gp-modal-title { flex: 0 0 auto; margin: 0; padding: 14px 16px 12px 20px; font-family: var(--font-display); font-size: 1.02rem; font-weight: 700; display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; border-bottom: 1px solid rgb(226 232 240 / 0.58); }
.gp-modal-title-text { min-width: 0; padding-top: 5px; line-height: 1.35; }
.gp-modal-title-actions { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; }
.gp-modal-close { width: 34px; height: 34px; padding: 0; border-radius: 999px; justify-content: center; color: #475569; background: rgb(255 255 255 / 0.48); }
.gp-modal-close:hover { color: #b91c1c; border-color: rgb(248 113 113 / 0.42); background: rgb(254 242 242 / 0.78); }
.gp-btn.is-amber {
  color: #5f2d08; border-color: rgb(217 119 6 / 0.72);
  background: linear-gradient(135deg, rgb(251 191 36 / 0.52), rgb(245 158 11 / 0.34));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.68), 0 8px 20px rgb(180 83 9 / 0.2);
  backdrop-filter: blur(12px) saturate(1.14);
}
.gp-btn.is-amber:hover:not(:disabled) { color: #451a03; border-color: #b45309; background: linear-gradient(135deg, rgb(251 191 36 / 0.78), rgb(245 158 11 / 0.58)); transform: translateY(-1px); }
.gp-btn.is-success { color: #f0fdf4; border-color: rgb(21 128 61 / 0.76); background: linear-gradient(135deg, rgb(22 163 74 / 0.94), rgb(5 150 105 / 0.82)); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.24), 0 8px 20px rgb(21 128 61 / 0.24); }
.gp-btn.is-success:disabled { color: #f0fdf4; opacity: 0.92; }
.gp-tooltip-anchor { display: inline-flex; }
.gp-frost-tooltip {
  position: fixed; z-index: 10050; width: min(360px, calc(100vw - 24px)); padding: 10px 12px; border-radius: 12px;
  color: #172033; background: linear-gradient(145deg, rgb(255 255 255 / 0.88), rgb(241 245 249 / 0.78));
  border: 1px solid rgb(255 255 255 / 0.82); box-shadow: 0 14px 34px rgb(15 23 42 / 0.2), inset 0 1px 0 rgb(255 255 255 / 0.92);
  backdrop-filter: blur(18px) saturate(1.24); font-size: 0.75rem; line-height: 1.42; pointer-events: auto;
  animation: gp-tooltip-in 0.14s ease-out;
}
.gp-frost-tooltip strong { display: block; font-size: 0.77rem; }
.gp-frost-tooltip p { margin: 6px 0 0; color: #475569; }
.gp-tooltip-more { display: block; margin-top: 3px; color: #94a3b8; font-size: 0.64rem; font-weight: 600; }
.gp-frost-tooltip.is-expanded { border-color: rgb(245 158 11 / 0.28); background: linear-gradient(145deg, rgb(255 255 255 / 0.93), rgb(255 251 235 / 0.86)); }
@keyframes gp-tooltip-in { from { opacity: 0; transform: translateY(-3px) scale(.985); } to { opacity: 1; transform: none; } }
.gp-modal-body { flex: 1 1 auto; overflow-y: auto; padding: 2px 20px 6px; }
.gp-modal-footer { flex: 0 0 auto; display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid rgb(226 232 240 / 0.7); }

/* KPI */
.gp-kpi-value { font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; line-height: 1.05; color: #0f172a; }
.gp-kpi-label { font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #64748b; }

/* Spinner */
@keyframes gp-rotate { to { transform: rotate(360deg); } }
.gp-spinner {
  width: 14px; height: 14px; border-radius: 999px; display: inline-block; flex-shrink: 0;
  border: 2px solid rgb(2 132 199 / 0.25); border-top-color: #0284c7; animation: gp-rotate 0.9s linear infinite;
}

/* Pills de filtro (tabs) */
.gp-pill-tabs { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.gp-pill-tabs button {
  border: 1px solid rgb(255 255 255 / 0.8); background: rgb(255 255 255 / 0.55); color: #475569;
  padding: 0.32rem 0.8rem; border-radius: 999px; font: inherit; font-size: 0.76rem; font-weight: 600; cursor: pointer;
}
.gp-pill-tabs button.is-active {
  color: #fff; border-color: transparent;
  background: radial-gradient(circle at 22% 22%, rgb(255 255 255 / 0.32), transparent 56%), linear-gradient(135deg, #0057b8 0%, #0284c7 56%, #06b6d4 100%);
}

/* Texto de artículo en el visor */
.gp-articulo { white-space: pre-wrap; line-height: 1.6; font-size: 0.9rem; color: #1e293b; }

/* ═══════════════════════════════════════════════════════════════════════════
   Modal PREMIUM de resumen de búsqueda (.bz-*) + progreso en vivo en la fila.
   Idioma frost: gradiente de marca azul→cian, cristal, número héroe.
   ═══════════════════════════════════════════════════════════════════════════ */
@keyframes bz-pop { from { opacity: 0; transform: translateY(10px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes bz-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes bz-indet { 0% { transform: translateX(-120%); } 100% { transform: translateX(360%); } }

.bz-modal {
  position: relative;
  width: min(780px, 100%);
  max-height: calc(100vh - 48px);
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgb(255 255 255 / 0.85);
  background: rgba(255, 255, 255, calc(var(--frost-card-opacity, 0.72) + 0.22));
  backdrop-filter: blur(var(--frost-modal-blur, 20px)) saturate(1.25);
  -webkit-backdrop-filter: blur(var(--frost-modal-blur, 20px)) saturate(1.25);
  box-shadow: 0 30px 70px rgb(15 23 42 / 0.32);
  animation: bz-pop 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.bz-close {
  position: absolute; top: 16px; right: 16px; z-index: 2;
  width: 2rem; height: 2rem; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgb(255 255 255 / 0.5); background: rgb(255 255 255 / 0.22); color: #fff; cursor: pointer;
  backdrop-filter: blur(8px); transition: background-color 150ms ease, transform 150ms ease;
}
.bz-close:hover { background: rgb(255 255 255 / 0.42); transform: rotate(90deg); }

/* ── Hero con gradiente de marca ── */
.bz-hero {
  position: relative; overflow: hidden; flex: 0 0 auto;
  padding: 24px 26px 20px; color: #fff;
  background:
    radial-gradient(circle at 88% -10%, rgb(6 182 212 / 0.55), transparent 42%),
    radial-gradient(circle at 8% 120%, rgb(2 132 199 / 0.5), transparent 46%),
    linear-gradient(135deg, #0057b8 0%, #0284c7 55%, #06b6d4 100%);
}
.bz-hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 30% 0%, rgb(255 255 255 / 0.18), transparent 55%); pointer-events: none; }
.bz-hero-fail { background: linear-gradient(135deg, #b91c1c 0%, #9f1239 60%, #7f1d1d 100%); }
.bz-eyebrow { position: relative; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: rgb(255 255 255 / 0.78); }
.bz-title { position: relative; font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; line-height: 1.12; margin: 4px 40px 0 0; letter-spacing: -0.01em; }
.bz-hero-main { position: relative; display: flex; align-items: center; gap: 20px; margin-top: 14px; }
.bz-hero-big { display: flex; align-items: baseline; gap: 10px; flex-shrink: 0; }
.bz-hero-num { font-family: var(--font-display); font-size: 3.4rem; font-weight: 700; line-height: 0.9; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.bz-hero-unit { white-space: pre-line; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; line-height: 1.15; color: rgb(255 255 255 / 0.82); }
.bz-synth { margin: 0; font-size: 0.9rem; line-height: 1.45; color: rgb(255 255 255 / 0.94); }
.bz-chips { position: relative; display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.bz-chip { display: inline-flex; align-items: center; gap: 5px; padding: 0.22rem 0.62rem; border-radius: 999px; font-size: 0.68rem; font-weight: 600; color: #fff; background: rgb(255 255 255 / 0.16); border: 1px solid rgb(255 255 255 / 0.3); backdrop-filter: blur(6px); }

/* ── Cuerpo ── */
.bz-body { flex: 1 1 auto; overflow-y: auto; padding: 20px 26px 22px; display: flex; flex-direction: column; gap: 18px; }

.bz-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; }
.bz-kpi { display: flex; flex-direction: column; gap: 2px; padding: 13px 14px; border-radius: 15px; background: rgb(255 255 255 / 0.6); border: 1px solid rgb(255 255 255 / 0.82); box-shadow: 0 6px 16px rgb(15 23 42 / 0.06); }
.bz-kpi-ic { display: inline-flex; align-items: center; justify-content: center; width: 27px; height: 27px; border-radius: 9px; background: rgb(15 23 42 / 0.06); color: #475569; margin-bottom: 5px; }
.bz-kpi-num { font-family: var(--font-display); font-size: 1.75rem; font-weight: 700; line-height: 1; color: #0f172a; font-variant-numeric: tabular-nums; }
.bz-kpi-lab { font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #64748b; }
.bz-kpi-accent { border-color: rgb(2 132 199 / 0.4); background: linear-gradient(160deg, rgb(2 132 199 / 0.1), rgb(6 182 212 / 0.06)); }
.bz-kpi-accent .bz-kpi-ic { background: rgb(2 132 199 / 0.16); color: #0284c7; }
.bz-kpi-accent .bz-kpi-num { color: #0057b8; }
.bz-kpi-green .bz-kpi-ic { background: rgb(34 197 94 / 0.16); color: #16a34a; }
.bz-kpi-green .bz-kpi-num { color: #15803d; }
.bz-kpi-amber .bz-kpi-ic { background: rgb(245 158 11 / 0.16); color: #d97706; }
.bz-kpi-amber .bz-kpi-num { color: #b45309; }

.bz-section { display: flex; flex-direction: column; gap: 10px; }
.bz-sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.bz-sec-head > span:first-child { font-family: var(--font-display); font-weight: 700; font-size: 0.9rem; color: #0f172a; }
.bz-sec-sub { font-size: 0.72rem; color: #64748b; }

/* Barra de calidad de extracción (segmentada) */
.bz-health { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: rgb(15 23 42 / 0.06); }
.bz-h { height: 100%; transition: width 0.55s cubic-bezier(0.2, 0.7, 0.2, 1); }
.bz-h + .bz-h { border-left: 2px solid rgb(255 255 255 / 0.92); }
.bz-h-ok { background: linear-gradient(90deg, #34d399, #10b981); }
.bz-h-warn { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.bz-h-err { background: linear-gradient(90deg, #f87171, #ef4444); }
.bz-h-pend { background: #94a3b8; }
.bz-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 0.72rem; color: #475569; }
.bz-legend span { display: inline-flex; align-items: center; gap: 5px; }
.bz-dot { width: 8px; height: 8px; border-radius: 999px; display: inline-block; }
.bz-dot.bz-ok { background: #10b981; } .bz-dot.bz-warn { background: #f59e0b; } .bz-dot.bz-err { background: #ef4444; } .bz-dot.bz-pend { background: #94a3b8; }

.bz-callout { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; font-size: 0.85rem; color: #065f46; background: rgb(16 185 129 / 0.12); border: 1px solid rgb(16 185 129 / 0.3); }
.bz-callout svg { color: #10b981; flex-shrink: 0; }
.bz-callout strong { font-weight: 700; }
.bz-warnbox { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; font-size: 0.8rem; color: #92400e; background: rgb(245 158 11 / 0.12); border: 1px solid rgb(245 158 11 / 0.3); }
.bz-warnbox.bz-warnbox-alert { color: #9f1239; background: rgb(225 29 72 / 0.09); border-color: rgb(225 29 72 / 0.30); }
.bz-error { display: flex; align-items: flex-start; gap: 12px; padding: 16px; border-radius: 14px; color: #991b1b; background: rgb(239 68 68 / 0.1); border: 1px solid rgb(239 68 68 / 0.3); }
.bz-error-msg { font-size: 0.8rem; color: #b91c1c; margin-top: 3px; }

/* Cronología de titulares nuevos (raíl a la izquierda) */
.bz-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.bz-timeline::before { content: ""; position: absolute; left: 62px; top: 10px; bottom: 10px; width: 2px; transform: translateX(-50%); background: linear-gradient(180deg, rgb(2 132 199 / 0.5), rgb(6 182 212 / 0.12)); }
.bz-tl-item { position: relative; display: grid; grid-template-columns: 62px 1fr; column-gap: 16px; padding: 8px 0; animation: bz-rise 0.34s both; }
.bz-tl-dot { position: absolute; left: 62px; top: 12px; width: 9px; height: 9px; border-radius: 999px; transform: translateX(-50%); background: linear-gradient(135deg, #0057b8, #06b6d4); box-shadow: 0 0 0 3px rgb(2 132 199 / 0.14); }
.bz-tl-date { text-align: right; padding-right: 12px; padding-top: 1px; font-size: 0.72rem; color: #64748b; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bz-tl-body { padding-left: 10px; min-width: 0; }
.bz-tl-title { display: block; font-weight: 600; font-size: 0.88rem; line-height: 1.35; color: #0f172a; text-decoration: none; }
a.bz-tl-title:hover { color: #0057b8; text-decoration: underline; }
.bz-tl-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.bz-tl-medio { font-size: 0.74rem; color: #64748b; }
.bz-tag { font-size: 0.63rem; font-weight: 700; padding: 0.1rem 0.45rem; border-radius: 999px; letter-spacing: 0.02em; }
.bz-tag-green { background: rgb(34 197 94 / 0.15); color: #15803d; }
.bz-tag-blue { background: rgb(2 132 199 / 0.14); color: #0369a1; }
.bz-tag-soft { background: rgb(15 23 42 / 0.06); color: #475569; }

.bz-emptybox { text-align: center; padding: 24px 12px; }
.bz-empty-ic { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 999px; background: rgb(34 197 94 / 0.14); color: #16a34a; margin-bottom: 10px; }
.bz-empty-t { font-family: var(--font-display); font-weight: 700; color: #0f172a; }
.bz-empty-h { font-size: 0.82rem; color: #64748b; margin: 3px auto 0; max-width: 400px; }
.bz-more { text-align: center; font-size: 0.76rem; color: #64748b; padding-top: 6px; }

.bz-footer { flex: 0 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 14px 22px; border-top: 1px solid rgb(226 232 240 / 0.7); }

@media (max-width: 620px) {
  .bz-kpis { grid-template-columns: repeat(2, 1fr); }
  .bz-hero-main { flex-direction: column; align-items: flex-start; gap: 10px; }
  .bz-hero-num { font-size: 2.8rem; }
}

/* ── Progreso EN VIVO sobre la fila de la empresa ── */
tr.bz-searching > td { background: rgb(2 132 199 / 0.05); }
.bz-inline { display: inline-flex; align-items: center; gap: 9px; padding: 0.32rem 0.72rem; border-radius: 999px; background: rgb(2 132 199 / 0.1); border: 1px solid rgb(2 132 199 / 0.25); color: #0369a1; font-size: 0.74rem; font-weight: 600; white-space: nowrap; }
.bz-inline-ring { width: 13px; height: 13px; border-radius: 999px; flex-shrink: 0; border: 2px solid rgb(2 132 199 / 0.25); border-top-color: #0284c7; animation: gp-rotate 0.85s linear infinite; }
.bz-inline-bar { position: relative; width: 84px; height: 4px; border-radius: 999px; background: rgb(2 132 199 / 0.16); overflow: hidden; flex-shrink: 0; }
.bz-inline-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #0057b8, #06b6d4); transition: width 0.4s ease; }
.bz-inline-fill.is-indet { position: absolute; top: 0; left: 0; width: 34%; animation: bz-indet 1.1s infinite; }

/* ── Estrella de relevancia ── */
.gp-star { border: none; background: none; padding: 2px; cursor: pointer; color: #cbd5e1; display: inline-flex; line-height: 0; border-radius: 6px; transition: color 140ms ease, transform 140ms ease; }
.gp-star:hover { color: #f59e0b; transform: scale(1.18); }
.gp-star.is-on { color: #f59e0b; }

/* ── KPIs interactivos por empresa (Dashboard) ── */
.gp-emp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 12px; }
.gp-emp-card { text-align: left; font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 16px; background: rgb(255 255 255 / 0.6); border: 1px solid rgb(255 255 255 / 0.82); box-shadow: 0 8px 20px rgb(15 23 42 / 0.06); transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease; }
.gp-emp-card:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgb(0 87 184 / 0.14); border-color: rgb(2 132 199 / 0.35); }
.gp-emp-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gp-emp-name { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; color: #0f172a; }
.gp-emp-metrics { display: flex; gap: 20px; }
.gp-emp-metric { display: flex; flex-direction: column; gap: 2px; }
.gp-emp-metric b { font-family: var(--font-display); font-size: 1.55rem; font-weight: 700; line-height: 1; color: #0f172a; font-variant-numeric: tabular-nums; display: inline-flex; align-items: baseline; gap: 5px; }
.gp-emp-metric > span { font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.05em; color: #64748b; font-weight: 700; }
.gp-emp-delta { color: #15803d; font-weight: 700; font-size: 0.72rem; }
.gp-emp-foot { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; min-height: 20px; }

/* ── Modal de propuestas de clustering ── */
.cl-lead { margin: 0 0 12px; font-size: 0.85rem; color: #475569; }
.cl-prop { border: 1px solid rgb(226 232 240 / 0.95); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; background: rgb(255 255 255 / 0.55); }
.cl-prop.is-off { opacity: 0.45; }
.cl-prop-head { display: flex; align-items: center; gap: 10px; }
.cl-prop-head input[type=text] { flex: 1; }
.cl-kw { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.cl-news { margin-top: 8px; font-size: 0.78rem; color: #475569; display: grid; gap: 3px; max-height: 132px; overflow: auto; }
.cl-news .d { color: #94a3b8; margin-right: 6px; font-variant-numeric: tabular-nums; }

/* ── Medios: rating de fiabilidad + bloqueo ── */
.me-rating { display: inline-flex; align-items: center; gap: 1px; }
.me-star { border: none; background: none; padding: 0 1px; cursor: pointer; color: #d1d5db; line-height: 0; display: inline-flex; }
.me-star.on, .me-star:hover { color: #f59e0b; }
.me-auto { font-size: 0.6rem; color: #94a3b8; margin-left: 5px; text-transform: uppercase; letter-spacing: 0.05em; }
.me-reset { border: none; background: none; cursor: pointer; color: #94a3b8; font-size: 0.95rem; margin-left: 4px; padding: 0; line-height: 1; }
.me-reset:hover { color: #0284c7; }
.me-blocked > td { opacity: 0.5; }

/* Punto de fiabilidad del medio (en Noticias) */
.fi-dot { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 999px; font-size: 0.62rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.fi-5 { background: rgb(16 185 129 / 0.16); color: #047857; }
.fi-4 { background: rgb(45 212 191 / 0.2); color: #0f766e; }
.fi-3 { background: rgb(148 163 184 / 0.22); color: #475569; }
.fi-2 { background: rgb(245 158 11 / 0.18); color: #b45309; }
.fi-1 { background: rgb(239 68 68 / 0.16); color: #b91c1c; }

/* ── Menú contextual (clic derecho) frost ── */
@keyframes cm-in { from { opacity: 0; transform: scale(0.97) translateY(-4px); } to { opacity: 1; transform: none; } }
.cm-backdrop { position: fixed; inset: 0; z-index: 7000; }
.cm-menu {
  position: fixed; min-width: 214px; max-width: 320px; padding: 6px;
  border-radius: 14px; border: 1px solid rgb(255 255 255 / 0.85);
  background: rgba(255, 255, 255, calc(var(--frost-card-opacity, 0.72) + 0.2));
  backdrop-filter: blur(var(--frost-modal-blur, 20px)) saturate(1.2);
  -webkit-backdrop-filter: blur(var(--frost-modal-blur, 20px)) saturate(1.2);
  box-shadow: 0 18px 44px rgb(15 23 42 / 0.28);
  animation: cm-in 0.12s ease;
}
.cm-item {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 10px; border: none; background: none;
  cursor: pointer; border-radius: 9px; font: inherit; font-size: 0.82rem; color: #0f172a; text-align: left;
  transition: background-color 120ms ease, color 120ms ease;
}
.cm-item:hover:not(:disabled) { background: rgb(2 132 199 / 0.1); color: #0057b8; }
.cm-item:disabled { opacity: 0.4; cursor: default; }
.cm-danger:hover:not(:disabled) { background: rgb(239 68 68 / 0.1); color: #b91c1c; }
.cm-ic { width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; color: #64748b; flex-shrink: 0; }
.cm-item:hover:not(:disabled) .cm-ic { color: inherit; }
.cm-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-hint { font-size: 0.7rem; color: #94a3b8; flex-shrink: 0; }
.cm-active { font-weight: 700; }
.cm-active .cm-ic { color: #0284c7; }
.cm-sep { height: 1px; background: rgb(226 232 240 / 0.8); margin: 5px 6px; }
.cm-header { font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.06em; color: #94a3b8; font-weight: 700; padding: 6px 10px 3px; max-width: 300px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Cabeceras ordenables */
th.gp-sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.gp-sortable:hover { color: #0284c7; }
.gp-sort-ar { font-size: 0.7rem; margin-left: 3px; color: #0284c7; }

/* Píldora de empresa (Noticias) — azul corporativo frost, clicable */
.tc-emp-pill {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 3px 11px 3px 4px; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 0.78rem; font-weight: 700; line-height: 1.25; color: #0057b8;
  background: rgba(0, 87, 184, 0.10); border: 1px solid rgba(0, 87, 184, 0.28);
  backdrop-filter: blur(6px) saturate(1.15); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.tc-emp-pill .tc-emp-logo { border-radius: 50%; } /* el tamaño lo fija el prop `size` de EmpresaLogo */

/* Enlace-icono a la web corporativa (Empresas). */
.tc-web-ic { display: inline-flex; align-items: center; color: #94a3b8; transition: color 0.15s ease, transform 0.15s ease; }
.tc-web-ic:hover { color: #0057b8; transform: translateY(-1px); }
.tc-emp-pill:hover { background: rgba(0, 87, 184, 0.18); box-shadow: 0 2px 10px rgba(0, 87, 184, 0.18); }

/* Resumen breve bajo el titular (Noticias): 3 líneas máx., completo, con palabras clave en negrita */
.tc-noti-resumen {
  font-size: 0.79rem; line-height: 1.4; color: #475569; margin-top: 3px; max-width: 620px;
  display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.tc-noti-resumen strong { color: #0f172a; font-weight: 700; }

/* ── TOOLTIP FROST GLOBAL (todos los `title` de la app) ──────────────────────────────────────── */
.tc-tip {
  position: fixed; z-index: 9000; pointer-events: none; /* SIEMPRE por encima de modales (6000) y menús (7000) */
  padding: 7px 12px; border-radius: 11px;
  font-size: 0.76rem; font-weight: 600; line-height: 1.45; color: #1e293b;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.92), rgb(244 250 255 / 0.86));
  border: 1px solid rgb(255 255 255 / 0.95);
  box-shadow: 0 10px 30px rgb(15 23 42 / 0.18), 0 2px 8px rgb(0 87 184 / 0.10);
  backdrop-filter: blur(14px) saturate(1.25);
  opacity: 0; transform: translateY(-3px) scale(0.98);
  transition: opacity 0.16s ease, transform 0.16s ease;
  white-space: pre-line;
}
.tc-tip.is-on { opacity: 1; transform: translateY(0) scale(1); }
.tc-tip.is-arriba.is-on { transform: translateY(0) scale(1); }
/* La app es FROST claro determinista: sin variantes dark (el SO en oscuro rompía el contraste). */

/* ── Logo de empresa ─────────────────────────────────────────────────────────────────────────── */
.tc-emp-logo {
  flex: 0 0 auto; border-radius: 7px; object-fit: contain; background: #fff;
  border: 1px solid rgb(0 87 184 / 0.14); box-shadow: 0 1px 2px rgb(0 0 0 / 0.05); vertical-align: middle;
}
.tc-emp-logo-fb {
  display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 800;
  background: linear-gradient(135deg, #0057b8, #06b6d4); border-color: transparent;
}

/* ── Comprobación previa de empresa (onboarding) ─────────────────────────────────────────────── */
.ep-preview { margin-top: 12px; border-top: 1px solid rgb(0 87 184 / 0.12); padding-top: 12px; }
.ep-avisos { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.ep-aviso {
  background: rgb(245 158 11 / 0.10); border: 1px solid rgb(245 158 11 / 0.38); color: #92400e;
  border-radius: 10px; padding: 8px 10px; font-size: 0.8rem; line-height: 1.35;
}
.ep-chip {
  border: 1px solid rgb(0 87 184 / 0.30); background: rgb(0 87 184 / 0.06); color: #0057b8;
  border-radius: 999px; padding: 3px 10px; font-size: 0.78rem; font-weight: 600; cursor: pointer;
}
.ep-chip:hover { background: rgb(0 87 184 / 0.13); }
.ep-muestra { max-height: 210px; overflow-y: auto; border: 1px solid rgb(0 87 184 / 0.12); border-radius: 10px; }
.ep-item { display: flex; gap: 8px; align-items: baseline; padding: 6px 10px; border-bottom: 1px solid rgb(0 87 184 / 0.06); font-size: 0.8rem; }
.ep-item:last-child { border-bottom: none; }
.ep-medio { flex: 0 0 auto; color: #0057b8; font-size: 0.7rem; font-weight: 700; max-width: 118px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-tit { color: #1e293b; line-height: 1.3; }

/* ── MI EMPRESA (vigilancia reputacional propia) ─────────────────────────────────────────────── */
.mk-hero {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  border-radius: 18px; padding: 20px 24px; position: relative; overflow: hidden;
  background:
    radial-gradient(560px 200px at 6% 0%, rgb(0 87 184 / 0.16), transparent 60%),
    radial-gradient(480px 210px at 96% 10%, rgb(6 182 212 / 0.14), transparent 55%),
    linear-gradient(180deg, rgb(255 255 255 / 0.72), rgb(255 255 255 / 0.5));
  border: 1px solid rgb(255 255 255 / 0.9); box-shadow: 0 14px 34px rgb(15 23 42 / 0.08);
  backdrop-filter: blur(12px) saturate(1.2);
}
.mk-hero-l { display: flex; gap: 16px; align-items: center; }
.mk-hero-ic {
  display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 54px; flex-shrink: 0;
  border-radius: 16px; color: #fff; background: linear-gradient(135deg, #b45309, #f59e0b);
  box-shadow: 0 10px 24px rgb(245 158 11 / 0.4);
}
.mk-hero-ic.is-cu { background: linear-gradient(135deg, #00418a, #0891b2); box-shadow: 0 10px 24px rgb(0 87 184 / 0.35); }
.mk-hero-eyebrow { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #64748b; }
.mk-hero-name { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: #0f172a; margin: 1px 0 4px; }
.mk-hero-alias { display: flex; gap: 6px; flex-wrap: wrap; }
.mk-alias {
  font-size: 0.72rem; font-weight: 600; color: #334155; padding: 2.5px 10px; border-radius: 999px;
  background: rgb(255 255 255 / 0.65); border: 1px solid rgb(15 23 42 / 0.1);
}
.mk-alias.is-warn { color: #b45309; border-color: rgb(245 158 11 / 0.45); background: rgb(245 158 11 / 0.1); }
.mk-alias.is-edit { cursor: pointer; color: #0057b8; border-style: dashed; background: transparent; }
.mk-alias.is-edit:hover { background: rgb(0 87 184 / 0.07); }

.mk-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.mk-kpi {
  display: flex; flex-direction: column; gap: 2px; align-items: flex-start; text-align: left;
  font: inherit; cursor: default; padding: 14px 16px; border-radius: 15px;
  background: rgb(255 255 255 / 0.62); border: 1px solid rgb(255 255 255 / 0.85);
  box-shadow: 0 6px 16px rgb(15 23 42 / 0.06); transition: transform 0.15s, box-shadow 0.15s;
}
.mk-kpi.is-click { cursor: pointer; }
.mk-kpi.is-click:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgb(0 87 184 / 0.14); }
.mk-kpi-ic {
  display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px;
  border-radius: 9px; background: rgb(0 87 184 / 0.1); color: #0057b8; margin-bottom: 4px;
}
.mk-kpi-num { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; line-height: 1; color: #0f172a; font-variant-numeric: tabular-nums; }
.mk-kpi-lab { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #64748b; }
.mk-kpi-lab em { display: block; font-style: normal; text-transform: none; letter-spacing: 0; color: #15803d; font-size: 0.7rem; margin-top: 1px; }
.mk-kpi.is-accent .mk-kpi-ic { background: rgb(2 132 199 / 0.16); color: #0284c7; }
.mk-kpi.is-accent .mk-kpi-num { color: #0057b8; }
.mk-kpi.is-amber .mk-kpi-ic { background: rgb(245 158 11 / 0.16); color: #d97706; }
.mk-kpi.is-green .mk-kpi-ic { background: rgb(34 197 94 / 0.16); color: #16a34a; }

.mk-chart { position: relative; }
.mk-chart svg { width: 100%; height: auto; display: block; }
/* Tooltip frost del gráfico: elevado sobre las barras (z-index), se ajusta al contenido (sin desbordar). */
.mk-tip {
  position: absolute; z-index: 6; pointer-events: none; white-space: nowrap;
  transform: translate(-50%, calc(-100% - 9px));
  display: flex; flex-direction: column; gap: 1px; padding: 6px 11px; border-radius: 10px;
  font-size: 0.75rem; line-height: 1.35; color: #334155;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.95), rgb(244 250 255 / 0.9));
  border: 1px solid rgb(255 255 255 / 0.96);
  box-shadow: 0 10px 26px rgb(15 23 42 / 0.18), 0 2px 8px rgb(0 87 184 / 0.10);
  backdrop-filter: blur(12px) saturate(1.25); -webkit-backdrop-filter: blur(12px) saturate(1.25);
}
.mk-tip strong { color: #0057b8; font-size: 0.79rem; font-weight: 700; text-transform: capitalize; }
.mk-tip span { color: #64748b; }
/* Chip del filtro de periodo (clic en barra) en el listado ampliado. */
.mk-filtro-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 0.76rem; font-weight: 700; color: #0057b8; text-transform: capitalize;
  background: rgb(0 87 184 / 0.10); border: 1px solid rgb(0 87 184 / 0.28);
}
.mk-filtro-chip:hover { background: rgb(0 87 184 / 0.18); }
.mk-casos { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.mk-caso {
  font: inherit; text-align: left; cursor: pointer; padding: 13px 15px; border-radius: 14px;
  background: rgb(255 255 255 / 0.6); border: 1px solid rgb(255 255 255 / 0.85);
  box-shadow: 0 5px 14px rgb(15 23 42 / 0.05); transition: transform 0.15s, box-shadow 0.15s;
}
.mk-caso:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgb(0 87 184 / 0.13); }
.mk-caso-t { font-weight: 700; color: #0f172a; line-height: 1.3; }
.mk-ultimas { display: grid; gap: 2px; }
.mk-noti {
  display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border-radius: 11px;
}
.mk-noti:hover { background: rgb(0 87 184 / 0.045); }
.mk-noti-fecha { flex-shrink: 0; width: 82px; font-size: 0.75rem; color: #94a3b8; padding-top: 2px; white-space: nowrap; }
.mk-noti-body { flex: 1; min-width: 0; font-size: 0.9rem; line-height: 1.35; }
.mk-noti-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 0.74rem; color: #94a3b8; margin-top: 2px; }
.mk-grupo { font-size: 0.76rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.07em; color: #0057b8; margin: 4px 0 6px; }

/* ── CUESTIONARIOS ────────────────────────────────────────────────────────────────────────────── */
.cu-item { padding: 12px; text-align: left; cursor: pointer; font: inherit; width: 100%; }
.cu-tl { display: flex; gap: 0; list-style: none; margin: 0; padding: 0; align-items: flex-start; }
.cu-tl li { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.cu-tl li::before {
  content: ''; position: absolute; top: 8px; left: -50%; width: 100%; height: 2.5px;
  background: rgb(15 23 42 / 0.1); z-index: 0;
}
.cu-tl li:first-child::before { display: none; }
.cu-tl li.is-done::before { background: linear-gradient(90deg, #0057b8, #06b6d4); }
.cu-tl-dot {
  position: relative; z-index: 1; width: 17px; height: 17px; border-radius: 50%; font-size: 0.6rem;
  display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 800;
  background: rgb(148 163 184 / 0.5); box-shadow: 0 0 0 3px rgb(255 255 255 / 0.85);
}
.cu-tl li.is-done .cu-tl-dot { background: linear-gradient(135deg, #0057b8, #06b6d4); }
.cu-tl-lab { font-size: 0.68rem; font-weight: 700; color: #64748b; text-align: center; line-height: 1.25; }
.cu-tl-lab em { display: block; font-style: normal; font-weight: 500; color: #94a3b8; font-size: 0.66rem; }
.cu-tl.is-compact .cu-tl-dot { width: 13px; height: 13px; font-size: 0.52rem; }
.cu-tl.is-compact li::before { top: 6px; }
.cu-linkbox {
  display: flex; gap: 8px; align-items: center; margin: 12px 0; padding: 8px 8px 8px 14px;
  border-radius: 11px; background: rgb(0 87 184 / 0.05); border: 1px dashed rgb(0 87 184 / 0.3);
}
.cu-link { flex: 1; min-width: 0; font-size: 0.8rem; color: #0057b8; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cu-h4 { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: #64748b; margin: 16px 0 10px; }
.cu-datos { display: grid; gap: 6px; margin-top: 14px; }
.cu-datos > div { display: flex; gap: 10px; align-items: baseline; font-size: 0.88rem; }
.cu-datos span { width: 150px; flex-shrink: 0; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #94a3b8; }
.cu-datos em { font-style: normal; color: #64748b; font-size: 0.8rem; }
.cu-hash { font-size: 0.74rem; background: rgb(15 23 42 / 0.05); border-radius: 6px; padding: 2px 8px; }
.cu-resp { display: grid; gap: 12px; max-height: 420px; overflow-y: auto; padding-right: 6px; }
.cu-resp-q { display: grid; grid-template-columns: minmax(200px, 3fr) minmax(140px, 2fr); gap: 10px; padding: 6px 0; border-top: 1px solid rgb(15 23 42 / 0.05); }
.cu-resp-t { font-size: 0.82rem; color: #475569; line-height: 1.35; }
.cu-resp-v { font-size: 0.84rem; } .cu-resp-v em { font-style: normal; color: #64748b; font-size: 0.8rem; }
.cu-pl {
  display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: 13px; cursor: pointer;
  border: 1.5px solid rgb(15 23 42 / 0.1); background: rgb(255 255 255 / 0.55); transition: all 0.15s;
}
.cu-pl.is-on { border-color: rgb(0 87 184 / 0.55); background: rgb(0 87 184 / 0.05); box-shadow: 0 6px 16px rgb(0 87 184 / 0.12); }
.cu-pl input { margin-top: 3px; accent-color: #0057b8; }
.cu-pl strong { display: block; font-size: 0.92rem; }
.cu-pl em { display: block; font-style: normal; font-size: 0.78rem; color: #64748b; margin: 1px 0 2px; line-height: 1.35; }
.cu-pl small { font-size: 0.72rem; color: #94a3b8; font-weight: 600; }
.cu-nuevocontacto { margin: 0 0 12px; padding: 10px 12px; border-radius: 11px; background: rgb(0 87 184 / 0.04); border: 1px dashed rgb(0 87 184 / 0.25); }
.cu-sec-edit { border: 1px solid rgb(15 23 42 / 0.08); border-radius: 13px; padding: 12px; background: rgb(255 255 255 / 0.45); }
.cu-sec-n {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 26px; height: 26px;
  border-radius: 9px; background: linear-gradient(135deg, #0057b8, #06b6d4); color: #fff; font-size: 0.78rem; font-weight: 800;
}
.cu-preg-edit { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 6px 8px; border-radius: 9px; background: rgb(15 23 42 / 0.025); }

/* ── Editor enriquecido de plantillas (form-builder) ─────────────────────────────────────────── */
.pe-preg { padding: 10px 12px; border-radius: 12px; background: rgb(255 255 255 / 0.65); border: 1px solid rgb(15 23 42 / 0.07); transition: box-shadow 0.15s; }
.pe-preg:hover { box-shadow: 0 6px 18px rgb(0 87 184 / 0.09); }
.pe-preg-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pe-tipo {
  display: inline-flex; gap: 5px; align-items: center; flex-shrink: 0; width: 108px;
  font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: #0057b8;
  background: rgb(0 87 184 / 0.08); border: 1px solid rgb(0 87 184 / 0.18); border-radius: 8px; padding: 4px 8px;
}
.pe-texto { flex: 1; min-width: 220px; }
.pe-req { display: inline-flex; gap: 3px; align-items: center; cursor: pointer; font-weight: 800; color: #dc2626; }
.pe-acciones { display: inline-flex; gap: 3px; }
.pe-ab {
  display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px;
  border: 1px solid rgb(15 23 42 / 0.1); border-radius: 8px; background: rgb(255 255 255 / 0.7);
  color: #64748b; cursor: pointer; transition: all 0.12s;
}
.pe-ab:hover:not(:disabled) { color: #0057b8; border-color: rgb(0 87 184 / 0.35); background: rgb(0 87 184 / 0.06); }
.pe-ab.is-danger:hover:not(:disabled) { color: #dc2626; border-color: rgb(220 38 38 / 0.35); background: rgb(220 38 38 / 0.06); }
.pe-ab:disabled { opacity: 0.35; cursor: default; }
.pe-det { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.pe-ops { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.pe-op {
  display: inline-flex; gap: 5px; align-items: center; font-size: 0.8rem; font-weight: 600; color: #334155;
  background: rgb(6 182 212 / 0.1); border: 1px solid rgb(6 182 212 / 0.3); border-radius: 999px; padding: 3px 6px 3px 11px;
}
.pe-op button { border: 0; background: none; cursor: pointer; color: #64748b; font-size: 0.9rem; line-height: 1; padding: 0 3px; }
.pe-op button:hover { color: #dc2626; }
.pe-op-inp { width: 150px; padding: 5px 10px; font-size: 0.8rem; }
.pe-paleta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px dashed rgb(15 23 42 / 0.12); }
.pe-paleta-lab { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: #94a3b8; }
.pe-add {
  display: inline-flex; gap: 5px; align-items: center; font: inherit; font-size: 0.78rem; font-weight: 700;
  color: #0057b8; background: rgb(255 255 255 / 0.6); border: 1px dashed rgb(0 87 184 / 0.4); border-radius: 999px;
  padding: 5px 12px; cursor: pointer; transition: all 0.12s;
}
.pe-add:hover { background: rgb(0 87 184 / 0.08); border-style: solid; transform: translateY(-1px); }

/* Resaltado IA en el visor de noticia (fragmentos importantes marcados + caja de claves) */
.tc-mark { background: rgba(250, 204, 21, 0.40); color: inherit; padding: 0 2px; border-radius: 3px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.tc-claves { margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; background: rgba(0, 87, 184, 0.06); border: 1px solid rgba(0, 87, 184, 0.16); }
.tc-claves.is-loading { display: flex; align-items: center; gap: 8px; color: #475569; font-size: 0.84rem; }
.tc-claves-h { font-weight: 800; font-size: 0.8rem; color: #0057b8; margin-bottom: 4px; }
.tc-claves ul { margin: 0; padding-left: 18px; }
.tc-claves li { font-size: 0.86rem; line-height: 1.5; margin: 2px 0; }

/* Submenú de secciones de Ajustes (píldora frost, patrón del ecosistema; pegajosa bajo la cabecera). */
.gp-settings-subnav {
  position: sticky; top: calc(var(--tc-header-h, 116px) + 6px); z-index: 40;
  display: flex; gap: 6px; margin: 0 auto 18px; padding: 6px; width: fit-content; max-width: 100%;
  border-radius: 999px; overflow-x: auto;
  background: linear-gradient(135deg, rgb(255 255 255 / 0.74), rgb(255 255 255 / 0.52));
  border: 1px solid rgb(255 255 255 / 0.72);
  box-shadow: 0 12px 30px rgb(15 23 42 / 0.12), inset 0 1px 1px rgb(255 255 255 / 0.72);
  backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
}
.gp-settings-btn {
  display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto;
  padding: 8px 14px; border: 0; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 0.82rem; font-weight: 600; white-space: nowrap;
  color: #64748b; background: transparent;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.gp-settings-btn:hover { color: #0057b8; background: rgb(0 87 184 / 0.08); }
.gp-settings-btn.is-active {
  color: #fff;
  background: linear-gradient(135deg, #0057b8 0%, #0284c7 56%, #06b6d4 100%);
  box-shadow: 0 4px 14px rgb(0 87 184 / 0.30), inset 0 1px 1px rgb(255 255 255 / 0.35);
}

/* Editor de mensaje con campos insertables (badges atómicos) — aviso de mi empresa. */
.tok-palette { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.tok-palette-lbl { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #64748b; margin-right: 2px; }
.tok-add {
  padding: 3px 9px; border-radius: 999px; cursor: pointer; font: inherit; font-size: 0.76rem; font-weight: 600;
  color: #0057b8; background: rgb(0 87 184 / 0.08); border: 1px solid rgb(0 87 184 / 0.24);
}
.tok-add:hover { background: rgb(0 87 184 / 0.16); }
.tok-editor {
  padding: 10px 12px; border-radius: 10px; border: 1px solid #cbd5e1; background: #fff;
  font-size: 0.88rem; line-height: 1.8; color: #1e293b; outline: none; overflow-wrap: anywhere;
}
.tok-editor:focus { border-color: #0057b8; box-shadow: 0 0 0 3px rgb(0 87 184 / 0.12); }
.tok-editor:empty::before { content: attr(aria-label); color: #94a3b8; }
.tok-badge {
  display: inline-block; padding: 1px 8px; margin: 0 1px; border-radius: 6px; vertical-align: baseline;
  font-size: 0.82em; font-weight: 700; color: #0057b8; background: rgb(0 87 184 / 0.12);
  border: 1px solid rgb(0 87 184 / 0.30); user-select: none; white-space: nowrap;
}

/* Historial de versiones (Acerca de Compliance). */
.gp-changelog { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.gp-changelog > li { padding-left: 14px; border-left: 2px solid rgb(0 87 184 / 0.25); }
.gp-changelog-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.gp-changelog-v { font-weight: 800; color: #0057b8; font-size: 0.92rem; }
.gp-changelog-date { color: #94a3b8; font-size: 0.74rem; }
.gp-changelog-title { font-weight: 600; font-size: 0.86rem; margin-top: 2px; color: #1e293b; }
.gp-changelog ul { margin: 4px 0 0; padding-left: 18px; }
.gp-changelog ul li { font-size: 0.8rem; color: #475569; margin: 2px 0; line-height: 1.5; }
