/* ============================================================================
   refine.css — pulido final del panel (se carga al último).
   Mantiene el estilo rojo/negro; compacta encabezados y corrige detalles.
   ============================================================================ */

/* Encabezado de cada vista: compacto y alineado a la izquierda */
.view .tactical-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 20px;
  text-align: left;
  padding: 20px 24px;
  margin-bottom: 18px;
  min-height: 0;
}
.view .tactical-hero h1 {
  grid-column: 1;
  font-size: 22px;
  letter-spacing: 0;
  text-shadow: none;
  line-height: 1.2;
}
.view .tactical-hero p {
  grid-column: 1;
  max-width: none;
}
.view .tactical-hero-actions {
  grid-column: 2;
  grid-row: 1 / span 2;
  margin: 0;
  justify-content: flex-end;
}

/* Estado de API sin conexión */
.sidebar-status-pill.offline { border-color: rgba(248, 113, 113, .35) !important; color: #fca5a5 !important; }
.sidebar-status-pill.offline .status-dot-pulse { background: #ef4444 !important; box-shadow: none !important; animation: none !important; }

/* Botones de las tarjetas de licencias: sin cortes de línea */
.view [data-action="quick-reset-hwid"],
.view [data-action="view-license"],
.view [data-action="detail-add-days"],
.view .license-card button {
  white-space: nowrap;
}

/* Adjuntos de tickets (ahora son botones) */
button.att-link {
  background: none !important;
  border: 0 !important;
  cursor: pointer !important;
  font: inherit !important;
}
button.att-preview-wrap {
  display: block !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  cursor: zoom-in !important;
  width: 100% !important;
}
.att-preview-img:not([src]) { min-height: 120px; background: rgba(255, 255, 255, .03); border-radius: 10px; }

/* Foco visible para navegación con teclado */
.view button:focus-visible,
.view a:focus-visible,
.view input:focus-visible,
.view select:focus-visible,
.sidebar button:focus-visible,
.login-card button:focus-visible,
.login-card input:focus-visible {
  outline: 2px solid #ff5a64;
  outline-offset: 2px;
}

/* Responsive: el encabezado se apila en pantallas angostas */
@media (max-width: 760px) {
  .view .tactical-hero { grid-template-columns: 1fr; padding: 16px; }
  .view .tactical-hero-actions { grid-column: 1; grid-row: auto; justify-content: flex-start; margin-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* La portada no debe desplazarse sola al cargar las fuentes */
html, body, .landing { overflow-anchor: none; }

/* Contraste AA en textos secundarios y en la insignia del menú activo */
.side-nav > small { color: #8f8b9c; }
.side-nav button.active i,
.side-nav button.active .badge-mini { background: rgba(0, 0, 0, .38) !important; color: #fff; }
.integ-mode-badge { color: #ff8a92; }
.code-ln { color: #777386; }

/* Avisos de error distinguibles de los de éxito */
.toast.is-error { border-color: rgba(248, 113, 113, .6) !important; }
.toast.is-error i { background: #b91c1c !important; color: #fff !important; }

/* La barra de búsqueda ocupa el hueco del antiguo botón "Buscar" (ahora filtra al escribir) */
.records-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.product-select span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Números decorativos (01, 02…): no aportan información y compiten con los datos */
.tactical-card:not(.license-card):not(.product-card) .tactical-num,
.policy-ref-num { display: none; }
.lic-card-subbar { margin-bottom: 10px; }
.hwid-tag, .suite-badge { white-space: nowrap; }

/* Usuarios: filtros y "Actualizar" comparten fila */
.users-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.users-toolbar .records-search { grid-column: 1 / -1; }
.users-toolbar .records-options { grid-column: 2; grid-row: 2; border: 0; padding: 0; }
.users-toolbar .records-filters { display: none; }
.users-toolbar .status-tabs { grid-column: 1; grid-row: 2; }

/* Pantallas angostas: nada queda recortado, lo ancho se desplaza dentro de su caja */
.view .panel:has(> .data-table) { overflow-x: auto; }
@media (max-width: 900px) {
  .view [class^="integ-"], .view [class*=" integ-"] { min-width: 0; max-width: 100%; }
  .integ-flow-tabs, .integ-lang-tabs, .integ-mode-tabs { overflow-x: auto; flex-wrap: nowrap; }
  .integ-flow-tabs > *, .integ-lang-tabs > *, .integ-mode-tabs > * { flex: 0 0 auto !important; }
  .integ-toolbar-unified { flex-direction: column; align-items: stretch; }
}
@media (max-width: 700px) {
  .users-toolbar { grid-template-columns: minmax(0, 1fr); }
  .users-toolbar .records-options { grid-column: 1; grid-row: 3; }
  .view .data-table { min-width: 620px; }
}

.view div:has(> .data-table) { overflow-x: auto; }
.dashboard .menu {
  background: #17161c !important;
  border: 1px solid #2d2c35;
  border-radius: 9px;
  color: #fff;
  width: 40px; height: 40px;
  place-items: center;
}
@media (max-width: 700px) {
  .integ-window-chrome .integ-mode-badge { display: none; }
  .security-card-head, .support-plan { flex-wrap: wrap; }
}

/* "Crear claves" en móvil: las tres opciones de HWID, una debajo de otra */
@media (max-width: 560px) {
  .lb-modern-modal .lb-hwid-segmented { grid-template-columns: minmax(0, 1fr); }
}

/* Pantallas de features.js */
.pager { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding: 14px 4px; color: #a5a1b0; font-size: 12px; }
.pager span { margin-right: auto; }
.feature-card { padding: 0; overflow: hidden; margin: 0 0 18px; }
.feature-body { padding: 16px; display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.feature-actions { margin-left: auto; }
.feature-empty { margin: 4px 0; color: #a5a1b0; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.row-actions .btn { white-space: nowrap; }
.feature-form { display: grid; gap: 12px; }
.feature-form.cols { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); align-items: end; }
.feature-form label { display: grid; gap: 6px; margin: 0; }
.feature-form label.check-row { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.modal-card .check-row input { width: 16px; height: 16px; min-height: 0; margin: 0; flex: none; accent-color: #dc2626; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px 14px; border: 1px solid #2d2c35; border-radius: 9px; padding: 12px; }
.secret-box { margin: 12px 0; padding: 14px; border: 1px solid #2d2c35; border-radius: 9px; background: #0d0d11; color: #f3f1f7; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 320px; overflow: auto; font-size: 12px; }
.modal-card textarea { width: 100%; }
.chat-log { max-height: 300px; overflow: auto; }
.device-item-row > div { min-width: 0; overflow-wrap: anywhere; }
.forgot-link { background: none; border: 0; color: #b9b4c2; font-size: 12px; cursor: pointer; text-decoration: underline; justify-self: center; }
.credential-row code { overflow: hidden; text-overflow: ellipsis; }
/* El título del modal no se mete debajo de la ✕ y el selector de archivo no desborda su columna */
.modal-card .dialog-heading h2 { padding-right: 44px; overflow-wrap: anywhere; }
.feature-form label, .feature-form input { min-width: 0; max-width: 100%; }
.feature-form input[type="file"] { padding: 9px 10px; overflow: hidden; }
.feature-form.cols { align-items: start; }
.feature-form.cols > .btn { align-self: end; }

/* Detalle de licencia en móvil */
@media (max-width: 700px) {
  .modal .license-detail-modal, dialog .license-detail-modal, .license-detail-modal { max-width: 100%; width: 100%; }
  .license-detail-modal, .license-detail-modal #formContent { grid-template-columns: minmax(0, 1fr); }
  .license-detail-modal #formContent > * { min-width: 0; max-width: 100%; }
  .license-detail-modal .ld-note-form { flex-wrap: wrap; min-width: 0; }
  .license-detail-modal .ld-note-form > label:first-child { flex: 1 1 100%; }
  .license-detail-modal .ld-op-btn { max-width: 100%; }
}

/* Menú lateral: la lista se desplaza; la tarjeta de usuario y "Cerrar sesión" quedan siempre a la vista */
.sidebar .side-nav { flex: 1 1 auto; min-height: 0; overflow: hidden auto; align-content: start; scrollbar-width: thin; scrollbar-color: #34333f transparent; }
.sidebar > :not(.side-nav) { flex-shrink: 0; }
.sidebar .profile { margin-top: 10px; }
.sidebar-logout { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 38px; margin-top: 8px; border: 1px solid #4a2329; border-radius: 10px; background: #1c1317; color: #ffb3b8; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.sidebar-logout:hover { background: #3a161b; color: #fff; }
.sidebar-logout svg { width: 15px; height: 15px; }

/* Apariencia: la animación elegida se pinta detrás del encabezado real de cada vista y de la tarjeta de usuario */
.page-fx { position: relative; overflow: hidden; }
.page-fx > :not(.network-canvas) { position: relative; z-index: 1; }
.page-fx > .network-canvas, .profile > .profile-network { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
/* Se atenúa a la izquierda, donde va el título */
.page-fx > .network-canvas { opacity: .85; -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, .12) 0, rgba(0, 0, 0, .2) 35%, #000 70%); mask-image: linear-gradient(90deg, rgba(0, 0, 0, .12) 0, rgba(0, 0, 0, .2) 35%, #000 70%); }
.profile > .profile-network { opacity: .7 !important; }
.profile:after { display: none !important; }
.tactical-hero.page-fx::before { background: linear-gradient(90deg, transparent, var(--user-fx, #ff3b47) 30%, var(--user-fx, #ff3b47) 70%, transparent) !important; }
.tactical-hero.page-fx { border-color: color-mix(in srgb, var(--user-fx, #ff3b47) 35%, #282736); }
.sidebar .profile { border-color: color-mix(in srgb, var(--user-fx, #ff3b47) 40%, #252532) !important; }
.sidebar .profile .avatar { border-color: var(--user-fx, #ff4d57); }

/* Clientes: resumen del sitio y filtros */
.site-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 0 0 18px; }
.site-stat { display: grid; gap: 4px; padding: 16px; border: 1px solid #2d2c35; border-radius: 12px; background: #14141b; }
.site-stat b { color: #fff; font-size: 24px; }
.site-stat span { color: #a5a1b0; font-size: 12px; }
.customer-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.new-tag { padding: 2px 6px; border-radius: 6px; background: #12351f; color: #6ee79b; font-size: 10px; font-weight: 700; }
.feature-body:empty { display: none; }

/* Ninguna ventana queda cortada: si es más alta que la pantalla, se desplaza por dentro */
.modal > .modal-card { max-height: calc(100dvh - 32px); overflow: hidden auto !important; }

/* Ficha de una cuenta */
.modal > .modal-card.customer-modal { width: min(600px, 100%); padding: 0; scrollbar-width: thin; scrollbar-color: #3a3946 transparent; }
.customer-modal .cust-head { display: flex; align-items: center; gap: 16px; padding: 24px 68px 20px 24px; background: linear-gradient(120deg, rgba(220, 38, 38, .2), transparent 62%); border-bottom: 1px solid #26252f; }
.cust-head > div { min-width: 0; }
.cust-avatar { display: grid; place-items: center; flex: none; width: 56px; height: 56px; border-radius: 16px; background: linear-gradient(140deg, #ef4444, #991b1b); color: #fff; font-size: 18px; font-weight: 800; }
.customer-modal .cust-head h2 { margin: 0; font-size: 20px; line-height: 1.25; overflow-wrap: anywhere; }
.customer-modal .cust-head p { margin: 2px 0 10px; color: #a5a1b0; font-size: 13px; overflow-wrap: anywhere; }
.cust-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.cust-tag { padding: 3px 9px; border-radius: 999px; background: #24232d; color: #b9b5c4; font-size: 11px; font-weight: 600; }
.cust-tag.is-plan { background: #3b2a0b; color: #fbc860; }
.cust-tag.is-ok { background: #10301d; color: #6ee79b; }
.cust-tag.is-bad { background: #3a161b; color: #ffa3aa; }
.cust-meters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 20px 24px 0; }
.cust-meter { display: grid; align-content: start; gap: 8px; padding: 14px; border-radius: 12px; background: #1a1a22; }
.cust-meter > span { display: flex; align-items: center; gap: 6px; color: #a5a1b0; font-size: 12px; }
.cust-meter svg { width: 14px; height: 14px; color: #f87171; }
.cust-meter b { color: #fff; font-size: 22px; line-height: 1; }
.cust-meter b small { color: #8f8b9c; font-size: 11px; font-weight: 500; }
.cust-meter i { display: block; height: 4px; border-radius: 4px; background: #2c2b37; overflow: hidden; }
.cust-meter u { display: block; height: 100%; border-radius: 4px; background: #22c55e; }
.cust-meter .is-full u { background: #ef4444; }
.cust-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 18px 24px; border-bottom: 1px solid #26252f; }
.cust-facts > div { padding: 0 14px; }
.cust-facts dt { color: #8f8b9c; font-size: 11px; }
.cust-facts dd { margin: 4px 0 0; color: #eceaf1; font-size: 13px; font-weight: 600; }
.cust-block { padding: 20px 24px 0; }
.cust-block + .cust-block { margin-top: 20px; border-top: 1px solid #26252f; }
.customer-filters + .lic-table-scroll :is(td, th) { white-space: nowrap; }
.customer-modal .cust-block h3 { margin: 0 0 10px; color: #fff; font-size: 14px; }
.cust-block > p { margin: 0; color: #8f8b9c; font-size: 13px; }
.cust-products, .cust-timeline { margin: 0; padding: 0; list-style: none; }
.cust-products li { display: flex; align-items: center; gap: 10px; padding: 9px 0; font-size: 13px; }
.cust-products li + li { border-top: 1px solid #23222c; }
.cust-products svg { flex: none; width: 15px; height: 15px; color: #f87171; }
.cust-products span { flex: 1; min-width: 0; overflow-wrap: anywhere; color: #eceaf1; }
.cust-products b { color: #a5a1b0; font-weight: 600; white-space: nowrap; }
.cust-timeline li { position: relative; display: flex; justify-content: space-between; gap: 14px; padding: 0 0 14px 20px; font-size: 13px; color: #dedbe6; }
.cust-timeline li::before { content: ''; position: absolute; left: 0; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: #ef4444; }
.cust-timeline li:not(:last-child)::after { content: ''; position: absolute; left: 3.5px; top: 16px; bottom: -2px; width: 1px; background: #34333f; }
.cust-timeline time { flex: none; color: #8f8b9c; font-size: 12px; }
.cust-actions { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding: 14px 24px; border-top: 1px solid #26252f; background: #131319; }
.cust-actions .btn { min-height: 38px; }
.cust-actions .danger-button { margin-left: auto; }
.customer-modal #formContent > .cust-block:last-child { padding-bottom: 14px; }
@media (max-width: 560px) {
  .customer-modal .cust-head { padding-left: 18px; }
  .cust-meters, .cust-facts, .cust-block, .cust-actions { padding-left: 18px; padding-right: 18px; }
  .cust-meter { padding: 12px 10px; }
  .cust-meter b small { display: block; margin-top: 5px; }
  .cust-facts { grid-template-columns: minmax(0, 1fr); }
  .cust-facts > div { display: flex; justify-content: space-between; gap: 12px; padding: 0; }
  .cust-facts dd { margin: 0; text-align: right; }
  .cust-timeline li { flex-direction: column; gap: 2px; }
  .cust-actions { flex-wrap: nowrap; }
  .cust-actions .btn { flex: 1 1 0; margin: 0; padding: 0 6px; }
  .cust-actions .btn span { display: none; }
}

/* Música y sonidos: control flotante */
.toast { pointer-events: none; }
#view { padding-bottom: 80px; }

/* ===== Tarjetas con el mismo estilo que las de la portada (.pf-card) ===== */
.tone-red, .sp-red { --tc: 239, 68, 68; --tc-hex: #f87171; }
.tone-green, .sp-green, .security-check.ok { --tc: 16, 185, 129; --tc-hex: #34d399; }
.tone-cyan, .sp-cyan { --tc: 6, 182, 212; --tc-hex: #22d3ee; }
.tone-blue { --tc: 56, 189, 248; --tc-hex: #38bdf8; --tone-col: #38bdf8; --tone-text: #7dd3fc; --tone-soft: rgba(56, 189, 248, .12); --tone-border: rgba(56, 189, 248, .3); }
.tone-orange, .tone-amber, .sp-orange, .security-check.warning { --tc: 245, 158, 11; --tc-hex: #fbbf24; }
.tone-purple, .sp-purple { --tc: 167, 139, 250; --tc-hex: #a78bfa; }

.tactical-card,
.panel {
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(var(--tc, 239, 68, 68), .09) 0%, transparent 55%),
    linear-gradient(180deg, rgba(24, 15, 17, .92) 0%, rgba(13, 9, 10, .98) 100%) !important;
  border: 1px solid rgba(255, 255, 255, .08) !important;
  border-radius: 16px !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .45) !important;
}
.tactical-card:hover {
  transform: translateY(-3px) !important;
  border-color: rgba(var(--tc, 239, 68, 68), .45) !important;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .5), 0 0 0 1px rgba(var(--tc, 239, 68, 68), .12) !important;
}
.exec-chart-card:hover, .exec-donut-card:hover { transform: none !important; }
.tactical-card::before,
.panel::before {
  content: '' !important;
  display: block !important;
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px !important;
  background: linear-gradient(90deg, transparent, var(--tc-hex, #f87171), transparent) !important;
  opacity: .7;
  border-radius: 0 !important;
  z-index: 2;
  pointer-events: none;
}
.panel::before { opacity: .45; }

.tactical-icon-box {
  border-radius: 10px !important;
  background: rgba(var(--tc, 239, 68, 68), .14) !important;
  border: 1px solid rgba(var(--tc, 239, 68, 68), .35) !important;
  color: var(--tc-hex, #f87171) !important;
  box-shadow: 0 0 18px rgba(var(--tc, 239, 68, 68), .12);
}
.tactical-tag {
  padding: 3px 10px !important;
  border-radius: 99px !important;
  background: rgba(var(--tc, 239, 68, 68), .1) !important;
  border: 1px solid rgba(var(--tc, 239, 68, 68), .22) !important;
  color: var(--tc-hex, #f87171) !important;
  font-family: inherit !important;
  font-weight: 700 !important;
  letter-spacing: .08em !important;
}
.tactical-list { border-top-color: rgba(255, 255, 255, .06) !important; }
.tactical-list li { color: #d4d0dc; }
.tactical-list li .t-bullet {
  background: transparent !important;
  color: var(--tc-hex, #f87171) !important;
}
.tactical-sub { color: #a8a3b3 !important; }

/* Tarjetas pequeñas: mismo fondo cálido y acento del color de cada una */
.exec-cf-stat, .site-stat, .plan-cap-card, .integ-tip-card, .integ-field-card,
.security-check, .sec-score-box, .policy-ref-card, .sp-benefit-card, .telemetry-mini-card {
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(var(--tc, 239, 68, 68), .08) 0%, transparent 60%),
    linear-gradient(180deg, rgba(24, 15, 17, .9) 0%, rgba(13, 9, 10, .96) 100%) !important;
  border: 1px solid rgba(255, 255, 255, .08) !important;
  border-radius: 14px !important;
  transition: transform .16s ease, border-color .16s ease;
}
.exec-cf-stat:hover, .site-stat:hover, .plan-cap-card:hover, .policy-ref-card:hover,
.sp-benefit-card:hover, .security-check:hover, .telemetry-mini-card:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--tc, 239, 68, 68), .45) !important;
}
@media (prefers-reduced-motion: reduce) {
  .tactical-card:hover, .exec-cf-stat:hover, .site-stat:hover, .plan-cap-card:hover,
  .policy-ref-card:hover, .sp-benefit-card:hover, .security-check:hover, .telemetry-mini-card:hover { transform: none !important; }
}
.site-stat { position: relative; overflow: hidden; }
.site-stat::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, transparent, var(--tc-hex, #f87171), transparent); opacity: .7; }
.site-stat b { color: var(--tc-hex, #fff); }

/* Soporte: filtros en una sola línea, todos del mismo ancho y con el texto centrado */
.ticket-list .ticket-filters { display: flex !important; flex-wrap: nowrap !important; gap: 4px !important; }
.ticket-list .ticket-filters button { flex: 1 1 auto; width: auto !important; min-width: 0; justify-content: center; gap: 4px; padding: 6px 6px !important; margin: 0 !important; }
.ticket-list .ticket-filters button b { padding: 1px 4px; }
@media (max-width: 560px) {
  .ticket-list .ticket-filters { flex-wrap: wrap !important; }
  .ticket-list .ticket-filters button { flex: 1 1 28%; }
}

/* Licencias (tabla): el nombre del PC usa todo el ancho libre y termina en "…" si no cabe */
.lic-dev-name { flex: 1 1 auto; min-width: 0; max-width: none !important; }
.lic-dev-name > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lic-dev-slot { flex: none; }

/* ===== Páginas públicas: Documentación, Estado, Términos y Privacidad ===== */
.doc-page .pub-head { margin-bottom: 26px; }
.doc-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 24px; max-width: 1180px; margin: 0 auto; padding: 0 24px 48px; align-items: start; }
.doc-toc { position: sticky; top: 90px; display: grid; gap: 2px; padding: 14px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 14px; background: linear-gradient(180deg, rgba(24, 15, 17, .92), rgba(13, 9, 10, .98)); }
.doc-toc a { padding: 8px 10px; border-radius: 8px; color: #b9b2bd; font-size: 13px; text-decoration: none; }
.doc-toc a:hover { background: rgba(239, 68, 68, .1); color: #fff; }
.doc-body { display: grid; gap: 18px; min-width: 0; }
.doc-card { position: relative; overflow: hidden; padding: 24px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 16px; background: linear-gradient(180deg, rgba(24, 15, 17, .92), rgba(13, 9, 10, .98)); box-shadow: 0 14px 34px rgba(0, 0, 0, .45); color: #c9c3cd; font-size: 14px; line-height: 1.65; scroll-margin-top: 90px; }
.doc-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, transparent, #f87171, transparent); opacity: .7; }
.doc-card h3 { margin: 0 0 12px; color: #fff; font-size: 18px; }
.doc-card p { margin: 10px 0; }
.doc-card ol, .doc-card ul { margin: 8px 0; padding-left: 20px; display: grid; gap: 6px; }
.doc-card code { padding: 1px 6px; border-radius: 5px; background: rgba(255, 255, 255, .06); color: #fca5a5; font-size: 12.5px; }
.doc-code { margin: 10px 0; padding: 14px 16px; overflow-x: auto; border: 1px solid rgba(255, 255, 255, .07); border-radius: 10px; background: #0b0809; color: #e7e2ea; font: 12.5px/1.6 ui-monospace, Consolas, monospace; white-space: pre; }
.doc-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 12px; }
.doc-flow span { padding: 7px 12px; border: 1px solid rgba(239, 68, 68, .3); border-radius: 99px; background: rgba(239, 68, 68, .08); color: #fff; font-size: 13px; }
.doc-flow b { margin-right: 6px; color: #f87171; }
.doc-flow i { color: #6f6874; font-style: normal; }
.doc-table-wrap { overflow-x: auto; margin: 10px 0; border: 1px solid rgba(255, 255, 255, .07); border-radius: 10px; }
.doc-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.doc-table th { padding: 10px 12px; background: rgba(255, 255, 255, .03); color: #8f8794; font-size: 11px; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
.doc-table td { padding: 10px 12px; border-top: 1px solid rgba(255, 255, 255, .06); vertical-align: top; }
.doc-table td:first-child { white-space: nowrap; }
.doc-sdks { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.doc-sdks a { display: grid; gap: 2px; padding: 14px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; background: rgba(255, 255, 255, .02); color: #fff; text-decoration: none; transition: border-color .16s, transform .16s; }
.doc-sdks a:hover { border-color: rgba(239, 68, 68, .45); transform: translateY(-2px); }
.doc-sdks span { color: #8f8794; font-size: 12px; }
.status-pill { padding: 4px 12px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 99px; color: #b9b2bd; font-size: 12px; font-weight: 700; }
.status-pill.ok { border-color: rgba(16, 185, 129, .35); background: rgba(16, 185, 129, .12); color: #34d399; }
.status-pill.down { border-color: rgba(239, 68, 68, .4); background: rgba(239, 68, 68, .12); color: #f87171; }
.pub-head h2 em.status-ok { color: #34d399; text-shadow: 0 0 24px rgba(16, 185, 129, .35); }
.legal-body { max-width: 820px; margin: 0 auto 48px; }
.legal-body h3 { margin-top: 22px; font-size: 16px; }
.legal-body h3:first-child { margin-top: 0; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; }
.footer-links button { padding: 0; border: 0; background: none; color: #b5a6a9; font: inherit; font-size: 12px; cursor: pointer; }
.footer-links button:hover { color: #fff; }
@media (max-width: 820px) {
  .doc-layout { grid-template-columns: 1fr; }
  .doc-toc { position: static; grid-template-columns: repeat(2, 1fr); }
  .landing-footer { flex-direction: column; gap: 12px; }
  .footer-links { justify-content: center; }
}

/* Términos, Privacidad y Docs: tarjetas con icono, etiqueta y número */
.legal-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
.legal-chips span { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 99px; background: rgba(255, 255, 255, .03); color: #c9c3cd; font: 12px ui-monospace, Consolas, monospace; }
.legal-chips svg { width: 13px; height: 13px; color: #f87171; }
.legal-chips span:nth-child(2) svg { color: #34d399; }
.legal-chips span:nth-child(3) svg { color: #22d3ee; }
.legal-wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px 56px; }
.legal-notice { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 26px; padding: 20px 24px; border: 1px solid rgba(239, 68, 68, .35); border-radius: 14px; background: linear-gradient(90deg, rgba(239, 68, 68, .12), rgba(13, 9, 10, .9) 70%); }
.legal-notice > i { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border: 1px solid rgba(239, 68, 68, .4); border-radius: 10px; background: rgba(239, 68, 68, .14); color: #f87171; }
.legal-notice > i svg { width: 18px; height: 18px; }
.legal-notice b { display: block; margin-bottom: 4px; color: #fff; font: 800 13px ui-monospace, Consolas, monospace; letter-spacing: .06em; }
.legal-notice p { margin: 0; color: #c9c3cd; font-size: 14px; line-height: 1.6; }
.legal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.legal-card { position: relative; display: flex; flex-direction: column; overflow: hidden; padding: 26px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 16px; background: radial-gradient(120% 90% at 100% 0%, rgba(var(--tc, 239, 68, 68), .08), transparent 55%), linear-gradient(180deg, rgba(24, 15, 17, .92), rgba(13, 9, 10, .98)); box-shadow: 0 14px 34px rgba(0, 0, 0, .45); color: #c9c3cd; font-size: 14px; line-height: 1.7; transition: transform .16s ease, border-color .16s ease; }
.legal-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, transparent, var(--tc-hex, #f87171), transparent); opacity: .75; }
.legal-grid .legal-card:hover { transform: translateY(-3px); border-color: rgba(var(--tc, 239, 68, 68), .45); }
.legal-card-top { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.legal-ico { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border: 1px solid rgba(var(--tc, 239, 68, 68), .35); border-radius: 12px; background: rgba(var(--tc, 239, 68, 68), .14); color: var(--tc-hex, #f87171); box-shadow: 0 0 18px rgba(var(--tc, 239, 68, 68), .15); }
.legal-ico svg { width: 20px; height: 20px; }
.legal-card-top > div { flex: 1; min-width: 0; }
.legal-tag { display: inline-block; margin-bottom: 6px; padding: 2px 9px; border: 1px solid rgba(var(--tc, 239, 68, 68), .3); border-radius: 5px; background: rgba(var(--tc, 239, 68, 68), .1); color: var(--tc-hex, #f87171); font: 800 10.5px ui-monospace, Consolas, monospace; letter-spacing: .1em; }
.legal-card h3, .doc-card .legal-card-top h3 { margin: 0; color: #fff; font: 800 17px ui-monospace, Consolas, monospace; letter-spacing: .01em; }
.legal-card-top > em { flex: none; padding: 3px 8px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 6px; background: rgba(255, 255, 255, .03); color: #6f6874; font: 700 11px ui-monospace, Consolas, monospace; }
.legal-card > p { flex: 1; margin: 0 0 18px; }
.legal-card ul { display: grid; gap: 9px; margin: auto 0 0; padding: 16px 0 0; border-top: 1px solid rgba(255, 255, 255, .07); list-style: none; }
.legal-card ul li { display: flex; align-items: flex-start; gap: 10px; color: #b9b2bd; font-size: 13px; line-height: 1.5; }
.legal-card ul li i { display: grid; place-items: center; flex: none; width: 17px; height: 17px; margin-top: 1px; border: 1px solid rgba(var(--tc, 239, 68, 68), .5); border-radius: 50%; color: var(--tc-hex, #f87171); }
.legal-card ul li i svg { width: 10px; height: 10px; }
.doc-card.legal-card { display: block; }
.doc-card.legal-card > p { margin: 10px 0; }
.doc-card.legal-card ol, .doc-card.legal-card ul.plain { border-top: 0; }
.doc-card.legal-card ol { display: grid; gap: 6px; margin: 8px 0; padding: 0 0 0 20px; list-style: decimal; }
@media (max-width: 820px) { .legal-grid { grid-template-columns: 1fr; } .legal-card { padding: 20px; } }
@media (max-width: 560px) { .legal-wrap { padding: 0 12px 40px; } .legal-notice { padding: 16px; gap: 12px; } .legal-card-top { gap: 12px; } .legal-ico { width: 40px; height: 40px; } .legal-card h3, .doc-card .legal-card-top h3 { font-size: 15px; } }

/* Estado: banner general, métricas y barras de las últimas comprobaciones */
.status-hero { display: flex; align-items: center; gap: 20px; margin-bottom: 24px; padding: 24px 28px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 16px; background: linear-gradient(90deg, rgba(255, 255, 255, .04), rgba(13, 9, 10, .9) 70%); }
.status-hero.is-ok { border-color: rgba(16, 185, 129, .4); background: linear-gradient(90deg, rgba(16, 185, 129, .14), rgba(13, 9, 10, .92) 70%); }
.status-hero.is-down { border-color: rgba(239, 68, 68, .45); background: linear-gradient(90deg, rgba(239, 68, 68, .14), rgba(13, 9, 10, .92) 70%); }
.status-orb { position: relative; flex: none; width: 18px; height: 18px; border-radius: 50%; background: #8f8794; }
.status-hero.is-ok .status-orb { background: #10b981; box-shadow: 0 0 18px #10b981; }
.status-hero.is-down .status-orb { background: #ef4444; box-shadow: 0 0 18px #ef4444; }
.status-orb::after { content: ''; position: absolute; inset: -6px; border: 2px solid currentColor; border-radius: 50%; opacity: 0; color: inherit; }
.status-hero.is-ok .status-orb::after { color: #10b981; animation: statusPing 2s ease-out infinite; }
@keyframes statusPing { from { opacity: .7; transform: scale(.6); } to { opacity: 0; transform: scale(1.6); } }
.status-hero > div { flex: 1; min-width: 0; }
.status-hero b { display: block; color: #fff; font-size: 18px; }
.status-hero p { margin: 4px 0 0; color: #b9b2bd; font-size: 14px; }
.status-refresh { display: inline-flex; flex: none; align-items: center; gap: 8px; padding: 10px 16px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 10px; background: rgba(255, 255, 255, .04); color: #fff; font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.status-refresh:hover { border-color: rgba(255, 255, 255, .3); }
.status-refresh:disabled { opacity: .5; cursor: default; }
.status-refresh svg { width: 15px; height: 15px; }
.status-part .legal-card-top > .status-pill { flex: none; align-self: flex-start; }
.status-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.status-metrics div { padding: 10px 12px; border: 1px solid rgba(255, 255, 255, .07); border-radius: 10px; background: rgba(255, 255, 255, .02); min-width: 0; }
.status-metrics small { display: block; color: #8f8794; font-size: 11px; }
.status-metrics b { display: block; overflow: hidden; color: #fff; font: 700 13px ui-monospace, Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.status-bars { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .07); }
.status-bars i { height: 26px; border-radius: 3px; background: rgba(255, 255, 255, .07); }
.status-bars i.ok { background: #10b981; }
.status-bars i.down { background: #ef4444; }
.status-note { margin: 24px 0 0; }
@media (max-width: 560px) {
  .status-hero { flex-wrap: wrap; padding: 18px; }
  .status-refresh { width: 100%; justify-content: center; }
  .status-metrics { grid-template-columns: 1fr 1fr; }
}

/* Docs: índice lateral con iconos, sección activa y avance */
.doc-side { position: sticky; top: 90px; display: grid; gap: 14px; }
.doc-side .doc-toc { position: static; gap: 4px; padding: 16px; border-radius: 16px; box-shadow: 0 14px 34px rgba(0, 0, 0, .45); }
.doc-toc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; padding: 0 4px 12px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.doc-toc-head span { color: #f87171; font: 800 11px ui-monospace, Consolas, monospace; letter-spacing: .12em; }
.doc-toc-head b { color: #6f6874; font-size: 11px; font-weight: 600; }
.doc-side .doc-toc a { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid transparent; border-radius: 10px; color: #b9b2bd; transition: background .15s, border-color .15s, color .15s; }
.doc-toc a i { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border: 1px solid rgba(var(--tc), .3); border-radius: 8px; background: rgba(var(--tc), .1); color: var(--tc-hex); }
.doc-toc a i svg { width: 14px; height: 14px; }
.doc-toc a span { flex: 1; min-width: 0; font-size: 13px; }
.doc-toc a em { color: #5f5964; font: 700 10.5px ui-monospace, Consolas, monospace; font-style: normal; }
.doc-side .doc-toc a:hover { background: rgba(255, 255, 255, .03); color: #fff; }
.doc-side .doc-toc a.active { border-color: rgba(var(--tc), .35); background: linear-gradient(90deg, rgba(var(--tc), .14), transparent); color: #fff; }
.doc-toc a.active em { color: var(--tc-hex); }
.doc-toc-progress { height: 3px; margin: 10px 4px 0; overflow: hidden; border-radius: 3px; background: rgba(255, 255, 255, .06); }
.doc-toc-progress i { display: block; width: 4%; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #ef4444, #f87171); transition: width .2s; }
.doc-help { display: grid; gap: 6px; padding: 18px; border: 1px solid rgba(239, 68, 68, .3); border-radius: 16px; background: linear-gradient(160deg, rgba(239, 68, 68, .14), rgba(13, 9, 10, .95) 70%); }
.doc-help > i { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(239, 68, 68, .4); border-radius: 9px; background: rgba(239, 68, 68, .14); color: #f87171; }
.doc-help > i svg { width: 16px; height: 16px; }
.doc-help b { color: #fff; font-size: 14px; }
.doc-help p { margin: 0; color: #b9b2bd; font-size: 12.5px; line-height: 1.5; }
.doc-help a { margin-top: 6px; padding: 9px 12px; border-radius: 9px; background: #dc2626; color: #fff; font-size: 13px; font-weight: 700; text-align: center; text-decoration: none; }
.doc-help a:hover { background: #ef4444; }
.doc-layout { grid-template-columns: 250px minmax(0, 1fr); }
@media (max-width: 820px) {
  .doc-layout { grid-template-columns: 1fr; }
  .doc-side { position: static; }
  .doc-side .doc-toc { grid-template-columns: 1fr; }
  .doc-help { display: none; }
}
.landing { overflow: clip !important; }
@media (max-width: 480px) { .nav-pill { gap: 0 !important; padding: 4px !important; max-width: calc(100vw - 16px); } .nav-pill button { padding: 7px 8px !important; font-size: 12px !important; } }

/* Logo: hexágono con la N, en la portada y en el panel */
.nx-logo { display: block; width: 100%; height: 100%; }
.hero-logo-clean { width: 92px; height: 92px; margin: 0 auto 18px !important; font-size: 0 !important; text-shadow: none !important; filter: drop-shadow(0 0 26px rgba(239, 68, 68, .55)) drop-shadow(0 8px 18px rgba(0, 0, 0, .5)); animation: nxFloat 6s ease-in-out infinite; }
@keyframes nxFloat { 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .hero-logo-clean { animation: none; } }
.hero-title-clean { font-style: normal !important; font-weight: 800 !important; letter-spacing: .06em !important; }
.hero-title-clean span { text-shadow: 0 2px 18px rgba(0, 0, 0, .5); }
.hero-title-clean .crimson-glow { font-style: normal !important; background: linear-gradient(180deg, #ff7a7e, #ef4444); -webkit-background-clip: text; background-clip: text; color: transparent !important; text-shadow: none !important; filter: drop-shadow(0 0 16px rgba(239, 68, 68, .45)); }
.sidebar .brand > span.brand-mark { width: 40px; height: 40px; padding: 0; border: 0 !important; border-radius: 0; background: none !important; box-shadow: none !important; filter: drop-shadow(0 0 10px rgba(239, 68, 68, .4)); }
.footer-mark { display: block; width: 22px; height: 22px; }

/* Registro de auditoría */
.modal > .modal-card.audit-modal { width: min(760px, 100%); padding: 26px; }
.audit-modal-head { display: flex; align-items: center; gap: 14px; padding-right: 44px; }
.audit-modal-head > i { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border: 1px solid rgba(239, 68, 68, .4); border-radius: 12px; background: rgba(239, 68, 68, .14); color: #f87171; box-shadow: 0 0 18px rgba(239, 68, 68, .2); }
.audit-modal-head > i svg { width: 20px; height: 20px; }
.audit-modal-head h2 { margin: 0 0 4px; font-size: 21px; }
.audit-modal-head p { margin: 0; color: #a8a3b3; font-size: 13px; }
.audit-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 20px 0 16px; }
.audit-stat { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; background: radial-gradient(120% 100% at 100% 0%, rgba(var(--tc), .1), transparent 60%), rgba(255, 255, 255, .02); }
.audit-stat > i { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border: 1px solid rgba(var(--tc), .35); border-radius: 9px; background: rgba(var(--tc), .12); color: var(--tc-hex); }
.audit-stat > i svg { width: 15px; height: 15px; }
.audit-stat b { display: block; color: #fff; font-size: 19px; line-height: 1.1; }
.audit-stat small { color: #8f8794; font-size: 11px; }
.audit-tools { display: grid; gap: 10px; margin-bottom: 12px; }
.audit-search { display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 10px; background: #0f0c0e; }
.audit-search svg { width: 15px; height: 15px; color: #8f8794; }
.audit-search input { flex: 1; min-width: 0; padding: 11px 0; border: 0 !important; background: none !important; color: #fff; outline: none; box-shadow: none !important; }
.audit-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.audit-filters button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border: 1px solid rgba(255, 255, 255, .09); border-radius: 99px; background: rgba(255, 255, 255, .03); color: #b9b2bd; font-size: 12px; font-weight: 600; cursor: pointer; }
.audit-filters button:hover { color: #fff; border-color: rgba(255, 255, 255, .2); }
.audit-filters button.active { border-color: rgba(239, 68, 68, .5); background: rgba(239, 68, 68, .15); color: #fff; }
.audit-filters button i { width: 7px; height: 7px; border-radius: 50%; background: var(--tc-hex); }
.audit-filters button b { padding: 0 5px; border-radius: 5px; background: rgba(255, 255, 255, .08); font-size: 11px; }
.audit-list { max-height: min(46vh, 420px); overflow: auto; margin: 0 -6px; padding: 0 6px 4px; scrollbar-width: thin; scrollbar-color: #3a3946 transparent; }
.audit-day { position: sticky; top: 0; z-index: 1; padding: 10px 2px 6px; background: #120d0f; color: #f87171; font: 800 11px ui-monospace, Consolas, monospace; letter-spacing: .1em; text-transform: uppercase; }
.audit-row { position: relative; display: flex; align-items: flex-start; gap: 12px; margin-bottom: 8px; padding: 12px 14px 12px 16px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .07); border-radius: 12px; background: linear-gradient(90deg, rgba(var(--tc), .07), rgba(255, 255, 255, .015) 45%); transition: border-color .15s; }
.audit-row::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--tc-hex); opacity: .8; }
.audit-row:hover { border-color: rgba(var(--tc), .4); }
.audit-ico { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border: 1px solid rgba(var(--tc), .35); border-radius: 10px; background: rgba(var(--tc), .12); color: var(--tc-hex); }
.audit-ico svg { width: 16px; height: 16px; }
.audit-main { flex: 1; min-width: 0; }
.audit-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.audit-title b { color: #fff; font-size: 14px; }
.audit-chip { padding: 1px 8px; border: 1px solid rgba(var(--tc), .3); border-radius: 99px; background: rgba(var(--tc), .1); color: var(--tc-hex); font-size: 10.5px; font-weight: 700; letter-spacing: .04em; }
.audit-metas { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.audit-metas:empty { display: none; }
.audit-meta { display: inline-flex; gap: 5px; max-width: 100%; overflow: hidden; padding: 2px 8px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 6px; background: rgba(0, 0, 0, .25); color: #e2dce6; font: 11.5px ui-monospace, Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.audit-meta em { color: #8f8794; font-style: normal; }
.audit-row time { flex: none; color: #8f8794; font: 12px ui-monospace, Consolas, monospace; }
.audit-empty { display: grid; justify-items: center; gap: 6px; padding: 40px 0; color: #8f8794; text-align: center; }
.audit-empty svg { width: 26px; height: 26px; color: #f87171; }
.audit-empty b { color: #fff; }
.audit-empty p { margin: 0; font-size: 13px; }
@media (max-width: 640px) {
  .modal > .modal-card.audit-modal { padding: 20px 16px; }
  .audit-stats { grid-template-columns: 1fr 1fr; }
}

/* Logs y Telemetría: actividad de los programas */
.logs-stats { margin-top: 0; }
.logs-filters { margin-bottom: 14px; }
.log-kind { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border: 1px solid rgba(var(--tc), .35); border-radius: 99px; background: rgba(var(--tc), .12); color: var(--tc-hex); font-size: 11px; font-weight: 700; white-space: nowrap; }
.log-kind::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--tc-hex); }

/* 2FA: el encabezado de las tarjetas llega al borde; se le da aire interior */
.twofactor-grid .authenticator .security-card-head,
.twofactor-grid .why-2fa .security-card-head { padding: 20px 20px 0; margin: 0 -20px 18px; }
.security-form .security-card-head,
.appearance-preview .security-card-head { padding: 20px 20px 0; margin: 0 -20px 18px; }

/* Seguridad: datos de la cuenta con icono de color */
.security-page .security-profile .meta-chips > .meta-chip { display: flex; align-items: center; gap: 10px; padding: 9px 12px 9px 9px; border: 1px solid rgba(var(--tc), .22); border-radius: 12px; background: radial-gradient(120% 120% at 0% 0%, rgba(var(--tc), .12), transparent 60%), rgba(255, 255, 255, .02); white-space: nowrap; min-width: 0; transition: border-color .2s, transform .2s; }
.security-page .security-profile .meta-chips > .meta-chip:hover { border-color: rgba(var(--tc), .5); transform: translateY(-1px); }
.meta-chip > i { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border: 1px solid rgba(var(--tc), .35); border-radius: 9px; background: rgba(var(--tc), .14); color: var(--tc-hex); }
.meta-chip > i svg { width: 15px; height: 15px; }
.meta-chip > span { display: grid; gap: 1px; min-width: 0; }
.meta-chip small { color: #8f8794; font-size: 9.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.meta-chip b { display: flex; align-items: center; gap: 5px; color: #fff; font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.meta-chip b svg { width: 12px; height: 12px; color: #8f8794; flex: none; }
.meta-chip b.copyable-id { cursor: pointer; }
.meta-chip b.copyable-id:hover svg { color: var(--tc-hex); }
.meta-chip em { color: var(--tc-hex); font-size: 10.5px; font-style: normal; opacity: .85; }

/* Foto de perfil */
.avatar.has-photo { padding: 0; overflow: hidden; }
.avatar .avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.avatar-edit { position: relative; flex: none; }
.avatar-edit > label.avatar { position: relative; cursor: pointer; }
.avatar-overlay { position: absolute; inset: 0; display: grid; place-items: center; border-radius: inherit; background: rgba(10, 8, 12, .62); color: #fff; opacity: 0; transition: opacity .2s; }
.avatar-overlay svg { width: 20px; height: 20px; }
.avatar-edit > label.avatar:hover .avatar-overlay, .avatar-edit > label.avatar:focus-within .avatar-overlay { opacity: 1; }
.avatar-remove { position: absolute; right: -4px; bottom: -4px; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 1px solid rgba(239, 68, 68, .5); border-radius: 50%; background: #1a1014; color: #f87171; cursor: pointer; z-index: 2; }
.avatar-remove svg { width: 12px; height: 12px; }
.avatar-remove:hover { background: #ef4444; color: #fff; }
/* Las cajitas de datos van en su propia fila, debajo del nombre y el nivel de seguridad */
.security-page .security-profile { grid-template-columns: auto minmax(0, 1fr) auto; }
.security-page .security-profile .meta-chips { grid-column: 1 / -1; order: 4; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 14px 0 0; border-left: 0; border-top: 1px solid rgba(255, 255, 255, .07); }
@media (max-width: 720px) { .security-page .security-profile .meta-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Integración: archivos extra del plugin de Minecraft */
.integ-extras { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 0; color: #8f8794; font-size: 11px; }
.integ-extras button { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 99px; background: rgba(255, 255, 255, .03); color: #d8d0d6; font-size: 11px; font-weight: 600; cursor: pointer; }
.integ-extras button:hover { border-color: rgba(239, 68, 68, .5); color: #fff; }
.integ-extras svg { width: 11px; height: 11px; }

/* ===== Celular: menú, tablas como tarjetas y barras de filtros ===== */
@media (max-width: 950px) {
  .sidebar.open { box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .6); z-index: 60; }
}
@media (max-width: 720px) {
  .lic-table-scroll { overflow: visible !important; }
  table.data-table, table.data-table tbody, table.data-table tr, table.data-table td { display: block; width: 100%; min-width: 0 !important; }
  table.data-table { min-width: 0 !important; }
  table.data-table thead { display: none; }
  table.data-table tbody tr {
    position: relative; margin: 0 0 10px; padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; background: rgba(255, 255, 255, .025);
  }
  .table-panel { background: transparent !important; border: 0 !important; padding: 0 !important; box-shadow: none !important; }
  table.data-table td {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 7px 0 !important; border: 0 !important; border-bottom: 1px dashed rgba(255, 255, 255, .06) !important;
    text-align: right; white-space: normal !important; word-break: break-word;
  }
  table.data-table td:last-child { border-bottom: 0 !important; }
  table.data-table td[data-label]::before {
    content: attr(data-label); flex: 0 0 auto; max-width: 42%; text-align: left;
    font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #8b8b98;
  }
  table.data-table td { justify-content: flex-end; flex-wrap: wrap; }
  table.data-table td[data-label]::before { margin-right: auto; }
  table.data-table td .btn, table.data-table td button { white-space: nowrap; }
  table.data-table td:not([data-label]) { position: absolute; top: 8px; right: 10px; width: auto; border: 0 !important; padding: 0 !important; }
  table.data-table td:first-child:not([data-label]) ~ td:nth-child(2) { padding-right: 34px !important; }

  /* Pestañas de filtros: se acomodan en varias filas en vez de una barra con scroll */
  .status-tabs { flex-wrap: wrap !important; overflow: visible !important; gap: 6px !important; }
  .status-tabs > * { flex: 0 0 auto; }
  .records-search { flex-wrap: wrap !important; gap: 8px !important; }
  .records-search .search-box { flex: 1 1 100% !important; min-width: 0 !important; }
  .records-search > .btn, .records-search > button { flex: 1 1 auto; justify-content: center; }
  .records-toolbar select { flex: 1 1 100%; width: 100% !important; max-width: none !important; }
}

/* Celular: tarjetas de números en 2 columnas y más compactas */
@media (max-width: 720px) {
  .tactical-kpi-grid { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
  .tactical-card { padding: 12px !important; min-height: 0 !important; }
  .tactical-card-top { gap: 6px !important; margin-bottom: 8px !important; flex-wrap: wrap; }
  .tactical-icon-box { width: 28px !important; height: 28px !important; }
  .tactical-icon-box svg { width: 15px !important; height: 15px !important; }
  .tactical-tag { font-size: 9.5px !important; padding: 3px 7px !important; letter-spacing: .04em !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .tactical-num { display: none !important; }
  .tactical-val-row { flex-wrap: wrap; gap: 4px 6px !important; margin: 0 !important; }
  .tactical-val { font-size: 26px !important; line-height: 1.1 !important; }
  .tactical-sub { font-size: 11.5px !important; }
  .tactical-list { display: none !important; }
}
@media (max-width: 720px) {
  .integ-flow-tabs { flex-wrap: wrap !important; overflow: visible !important; gap: 6px !important; }
  .integ-flow-tabs > button { flex: 1 1 auto; }
}
@media (max-width: 720px) {
  .integ-lang-tabs, .integ-mode-tabs { flex-wrap: wrap !important; overflow: visible !important; }
  .integ-toolbar-unified { flex-wrap: wrap !important; }
}
