/* Compact variant, opt-in for dense worker-detail tables. */
.panel-table.align-middle > thead > tr > th,
.panel-table.align-middle > tbody > tr > td { vertical-align: middle; }
.panel-table .table-disclosure {
  display: inline-flex; align-items: center; gap: var(--space-1);
  margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none;
  color: var(--primary); font: inherit; line-height: inherit; cursor: pointer;
}
.panel-table .table-disclosure:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.panel-table.compact { font-size: var(--text-xs); }
.panel-table.compact thead th,
.panel-table.compact tbody td { padding: var(--space-2); }
.panel-table.compact .row-action { font-size: var(--text-xs); padding: var(--space-1) var(--space-2); }

/* ==========================================================================
   components/tables.css - ESTANDAR de tablas de historicos + controles orden/filtro (tqc-table.js). COMPONENTE.
   Fase 1: movido TAL CUAL desde tqc.css (orden preservado => cascada identica).
   ========================================================================== */
/* ============================================================
   ESTÁNDAR ÚNICO DE TABLAS DE HISTÓRICOS  (fuente de verdad)
   Aplicar con: <table class="data-table" data-enhance> dentro de
   un contenedor .table-responsive. El orden por columna y el filtro
   tipo Excel los agrega tqc-table.js automáticamente (data-enhance).
   NO crear clases nuevas por tabla: todo cambio de diseño va aquí.
   ============================================================ */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  color: var(--text);
  background: var(--card);
}
.data-table thead th {
  background: #e3e9f8;
  color: #000078;
  text-align: left;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: 11px;
  padding: 9px 12px;
  border-bottom: 2px solid #000078;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
  vertical-align: middle;
  position: relative;
  user-select: none;
}
.data-table tbody td {
  padding: 9px 12px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
.data-table tbody tr:nth-child(even) td {
  background: #fafbfc;
}
.data-table tbody tr:hover td {
  background: #eef4ff;
}
.data-table td.dt-num,
.data-table th.dt-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.data-table tbody td.empty,
.data-table tbody td.empty-state {
  white-space: normal;
  color: var(--muted);
  text-align: center;
  padding: 18px 12px;
}

/* Modificador "compact": fila mas baja y letra mas pequeña (listados de catalogo/config). */
.data-table.compact {
  font-size: 12px;
}
.data-table.compact thead th {
  padding: 6px 10px;
  /* el encabezado NO se reduce de tamaño, solo baja el padding */
}
.data-table.compact tbody td {
  padding: 5px 8px;
}
/* El boton "Editar" (min-height 32px de .btn-small) es lo que realmente
   estira la fila; se reduce solo dentro de la tabla compacta. */
.data-table.compact .btn-small {
  min-height: 24px;
  padding: 3px 10px;
  font-size: 11px;
}

/* Modificador "tall" en el wrapper .table-responsive: limita filas visibles con
   scroll vertical propio y fija el encabezado mientras se hace scroll. */
.table-responsive.tall {
  max-height: 480px;
  overflow-y: auto;
}
.table-responsive.tall .data-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

/* --- Controles de orden y filtro que inyecta tqc-table.js --- */
.data-table th .dt-head {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.data-table th .dt-label { cursor: pointer; }
.data-table th .dt-arrow { color: var(--primary); font-size: 11px; }
.data-table th .dt-filter {
  cursor: pointer;
  color: #98a2b3;
  font-size: 12px;
  line-height: 1;
  padding: 0 2px;
}
.data-table th .dt-filter.dt-on { color: var(--primary); }
.dt-pop {
  position: absolute;
  z-index: 60;
  width: 230px;
  background: var(--card);
  border: 1px solid #d0d7e2;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(16, 24, 40, .18);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
}
.dt-pop .dt-pop-search { padding: 8px; }
.dt-pop .dt-pop-search input {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
  border: 1px solid #d0d7e2;
  border-radius: var(--radius-xs);
  font-size: 12px;
}
.dt-pop .dt-pop-list { max-height: 170px; overflow: auto; padding: 0 8px; }
.dt-pop .dt-pop-list label {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 0; cursor: pointer; white-space: nowrap;
}
.dt-pop .dt-pop-actions {
  display: flex; gap: 6px; padding: 8px; border-top: 1px solid #eef1f6;
}
.dt-pop .dt-pop-actions button {
  flex: 1; font-size: 12px; padding: 5px;
  border: 1px solid #d0d7e2; background: var(--card);
  border-radius: var(--radius-xs); cursor: pointer;
}
/* Login liquid glass: capa final, ligera y transparente. */
.container-login { max-width: none; width: 100%; min-height: calc(100vh - 64px); margin: 0; padding: 0 18px 34px; position: relative; isolation: isolate; overflow: hidden; background: linear-gradient(145deg, #030814 0%, #061a37 54%, #061328 100%); }
.container-login::before, .container-login::after { content: ""; position: absolute; pointer-events: none; z-index: -1; animation: none; }
.container-login::before { inset: -20%; background: radial-gradient(ellipse at 20% 28%, rgba(255,192,0,.09), transparent 30%), radial-gradient(ellipse at 80% 70%, rgba(35,181,211,.08), transparent 34%); filter: blur(22px); opacity: .7; }
.container-login::after { inset: 0; background: radial-gradient(circle at 18% 28%, rgba(255,255,255,.42) 0 1px, transparent 2px), radial-gradient(circle at 39% 72%, rgba(255,192,0,.30) 0 1px, transparent 2px), radial-gradient(circle at 74% 34%, rgba(35,181,211,.30) 0 1px, transparent 2px); background-size: 173px 131px, 241px 193px, 307px 229px; opacity: .18; }
.login-shell { position: relative; min-height: calc(100vh - 112px); display: flex; align-items: center; justify-content: center; padding: 46px 0; overflow: hidden; isolation: isolate; }
.login-stage { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.login-stage::before, .login-stage::after, .login-energy-one, .login-energy-two, .login-energy-three, .login-depth-lines, .login-starfield { display: none; }
.login-spark-canvas { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; display: block; opacity: .56; mix-blend-mode: screen; }

.login-card { --glass-x: 50%; --glass-y: 50%; --glass-angle: 0deg; --glass-intensity: 0; position: relative; z-index: 2; width: min(100%, 520px); padding: 30px; overflow: hidden; color: #fff; border: 1px solid rgba(230,248,255,.42); border-radius: var(--radius-2xl); background: rgba(7,29,59,.14); backdrop-filter: blur(8px) saturate(125%) brightness(1.04); -webkit-backdrop-filter: blur(8px) saturate(125%) brightness(1.04); box-shadow: 0 24px 68px rgba(0,0,0,.36), inset 0 1px 0 rgba(255,255,255,.34), inset 0 -1px 0 rgba(206,237,255,.12); }
.login-card::before, .login-card::after, .login-card-border { content: none; display: none; }
.login-card-halo, .login-card-shimmer { position: absolute; inset: 0; pointer-events: none; }
.login-card-halo { inset: -34%; z-index: -1; background: radial-gradient(ellipse at var(--glass-x) var(--glass-y), rgba(205,242,255,calc(.08 + var(--glass-intensity) * .14)), transparent 62%); opacity: calc(.18 + var(--glass-intensity) * .32); filter: blur(22px); }
.login-card-shimmer { z-index: 1; background: radial-gradient(ellipse at var(--glass-x) var(--glass-y), rgba(255,255,255,.20), transparent 57%), linear-gradient(115deg, transparent 28%, rgba(255,255,255,.07) 48%, transparent 66%); mix-blend-mode: screen; }

.login-brand, .login-form, .login-footnote { position: relative; z-index: 2; }
.login-brand { display: block; margin-bottom: 24px; }
.login-brand-heading { display: flex; align-items: center; gap: 16px; }
.login-brand h1 { flex: 1 1 auto; min-width: 0; margin: 0; color: #fff; font-size: clamp(1.9rem, 4.4vw, 2.45rem); font-weight: 950; line-height: 1; letter-spacing: 0; white-space: nowrap; text-shadow: 0 0 24px rgba(255,255,255,.16); }
.login-brand p { max-width: none; margin: 14px 0 0; color: rgba(255,255,255,.76); font-size: .98rem; line-height: 1.48; }
.login-logo-box { width: 138px; min-width: 138px; height: 72px; padding: 10px 14px; border-color: rgba(255,192,0,.38); background: linear-gradient(145deg, rgba(7,27,58,.84), rgba(18,63,140,.56)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.13), 0 18px 38px rgba(0,0,0,.34); transition: transform .12s ease-out, border-color .12s ease-out, box-shadow .12s ease-out, filter .12s ease-out; }
.login-logo-box::after { display: none; }
.login-logo-box:hover, .login-logo-box:focus-visible { transform: translateY(-2px) scale(1.025); border-color: rgba(255,192,0,.95); filter: brightness(1.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.22), 0 22px 44px rgba(0,0,0,.38), 0 0 32px rgba(255,192,0,.64); }
.login-logo-box img { transition: transform .12s ease-out, filter .12s ease-out; }
.login-logo-box:hover img, .login-logo-box:focus-visible img { transform: scale(1.045); filter: drop-shadow(0 0 12px rgba(255,255,255,.80)) drop-shadow(0 0 22px rgba(255,192,0,.56)); }

.login-form { gap: 16px; }
.login-form label { color: rgba(255,255,255,.84); font-weight: 850; }
.login-form input { border-color: rgba(255,255,255,.24); background: rgba(2,13,31,.72); color: #fff !important; -webkit-text-fill-color: #fff; caret-color: #ffc000; color-scheme: dark; box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 12px 30px rgba(0,0,0,.18); }
.login-form input:focus { border-color: rgba(255,192,0,.72); box-shadow: 0 0 0 4px rgba(255,192,0,.12), 0 0 28px rgba(35,181,211,.16), inset 0 1px 0 rgba(255,255,255,.10); }
.login-form input:-webkit-autofill, .login-form input:-webkit-autofill:hover, .login-form input:-webkit-autofill:focus { -webkit-text-fill-color: #fff; box-shadow: 0 0 0 1000px #071a35 inset, 0 0 0 4px rgba(255,192,0,.12); transition: background-color 9999s ease-out 0s; }
.password-control input { padding-right: 58px; }
.password-toggle { right: 8px; top: 15px; width: 36px; min-width: 36px; height: 34px; padding: 0; border-radius: 50%; border-color: rgba(255,255,255,.22); background: #10294d; color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
.password-toggle-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.password-toggle:hover, .password-toggle:focus-visible, .password-toggle[aria-pressed="true"] { background: rgba(255,192,0,.16); color: #fff; transform: none; box-shadow: 0 0 0 4px rgba(255,192,0,.10), 0 0 22px rgba(255,192,0,.22); }
.login-card .btn.primary, .login-card button.primary, .login-card button[type="submit"] { min-height: 50px; border: 1px solid rgba(255,255,255,.16); background: linear-gradient(135deg, rgba(255,192,0,.98), rgba(35,181,211,.86) 48%, rgba(18,63,140,.96)); color: #fff; box-shadow: 0 16px 34px rgba(0,0,0,.32), 0 0 34px rgba(255,192,0,.20); }
.login-submit::before, .login-shell.is-launching::before { display: none !important; }
.login-footnote { margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.68); }
.login-footnote::before { display: none; }
.login-footnote a { color: #ffc000; font-weight: 900; }
@media (max-width: 620px) { .container-login { padding: 0 14px 24px; } .login-shell { min-height: calc(100vh - 94px); padding: 28px 0; } .login-card { padding: 24px 20px; border-radius: var(--radius-xl); } .login-brand { text-align: left; } .login-brand-heading { gap: 12px; } .login-logo-box { width: 116px; min-width: 116px; height: 62px; } .login-brand h1 { font-size: clamp(1.55rem, 8vw, 2rem); } }

/* Atmósfera azul: neblina leve detrás del cristal y partículas del canvas visibles. */
.container-login {
  background:
    radial-gradient(ellipse at 16% 18%, rgba(56, 158, 214, .20), transparent 34%),
    radial-gradient(ellipse at 78% 28%, rgba(32, 92, 177, .26), transparent 36%),
    radial-gradient(ellipse at 50% 94%, rgba(10, 55, 112, .52), transparent 48%),
    linear-gradient(145deg, #020916 0%, #082448 54%, #041226 100%);
}

.container-login::before {
  inset: -30%;
  background:
    radial-gradient(ellipse at 26% 34%, rgba(128, 220, 255, .18), transparent 25%),
    radial-gradient(ellipse at 72% 42%, rgba(43, 137, 220, .24), transparent 31%),
    radial-gradient(ellipse at 48% 76%, rgba(76, 177, 224, .13), transparent 34%);
  filter: blur(42px);
  opacity: .82;
  animation: loginBlueMistDrift 20s ease-in-out infinite alternate;
}

.container-login::after { opacity: .24; }
.login-spark-canvas { opacity: .68; }

@keyframes loginBlueMistDrift {
  0% { transform: translate3d(-2%, 1%, 0) scale(.98); }
  50% { transform: translate3d(2%, -1.5%, 0) scale(1.05); }
  100% { transform: translate3d(-.5%, 2%, 0) scale(1.01); }
}

/* Entrada corta y campo espacial con más presencia, sin bloquear el formulario. */
.login-spark-canvas { opacity: .78; }
.login-card { animation: loginSpaceArrival .46s cubic-bezier(.22, .75, .22, 1) both; }

@keyframes loginSpaceArrival {
  from { opacity: 0; filter: blur(8px); transform: translateY(10px) scale(1.012); }
  to { opacity: 1; filter: blur(0); transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .container-login::before,
  .login-card { animation: none !important; }
}

/* Espacio sideral: sin patrones repetidos, más contraste y profundidad al fondo. */
.container-login {
  background:
    radial-gradient(ellipse at 18% 14%, rgba(13, 61, 112, .26), transparent 34%),
    radial-gradient(ellipse at 86% 82%, rgba(10, 40, 88, .22), transparent 38%),
    linear-gradient(145deg, #01030a 0%, #020917 48%, #031126 100%);
}

.container-login::after {
  display: none;
}

.container-login::before {
  background:
    radial-gradient(ellipse at 22% 30%, rgba(63, 148, 212, .11), transparent 28%),
    radial-gradient(ellipse at 76% 64%, rgba(33, 109, 190, .12), transparent 34%);
  filter: blur(56px);
  opacity: .5;
}

.login-spark-canvas {
  opacity: .9;
}

/* Sistema unificado de acciones textuales: normal y compacto para tablas. */
body :is(
  .btn,
  .primary-action,
  .secondary-action,
  .secondary-button,
  .button-secondary,
  .row-action,
  .registro-action-btn,
  button:not(.nav-scroll-btn):not(.portal-slide-btn):not(.password-toggle):not(.icon-btn):not(.usuario-icon-action):not(.quote-action-chip)
) {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

body :is(.btn-primary, .btn.primary, .primary-action, .registro-action-btn.primary) {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

body :is(.btn-secondary, .btn.secondary, .secondary-action, .secondary-button, .button-secondary) {
  background: #ffffff;
  border-color: var(--line);
  color: var(--primary);
}

body :is(.btn-primary, .btn.primary, .primary-action, .registro-action-btn.primary):hover {
  background: color-mix(in srgb, var(--primary) 88%, #000000);
  border-color: color-mix(in srgb, var(--primary) 88%, #000000);
  color: #ffffff;
}

body :is(.btn-secondary, .btn.secondary, .secondary-action, .secondary-button, .button-secondary):hover {
  background: #f3f8ff;
  border-color: color-mix(in srgb, var(--primary) 34%, var(--line));
  color: var(--primary);
}

body :is(
  .btn,
  .primary-action,
  .secondary-action,
  .secondary-button,
  .button-secondary,
  .row-action,
  .registro-action-btn,
  button:not(.nav-scroll-btn):not(.portal-slide-btn):not(.password-toggle):not(.icon-btn):not(.usuario-icon-action):not(.quote-action-chip)
):focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--user-accent) 28%, transparent);
}

body .row-action,
body .btn-sm,
body .btn-small {
  min-height: 32px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
}

body .row-action {
  background: #eef6ff;
  border-color: #d4e4f5;
  color: var(--primary);
}

body .row-action:hover {
  background: #dfeeff;
  border-color: color-mix(in srgb, var(--primary) 30%, #d4e4f5);
  color: var(--primary);
}

body .registro-action-btn {
  align-items: flex-start;
  justify-content: center;
  min-height: 56px;
  border-color: var(--primary);
  box-shadow: 0 5px 14px rgba(15, 39, 71, .08);
}

body .registro-action-btn:not(.primary) {
  background: #ffffff;
  color: var(--primary);
}

/* Inicio: accesos generados a partir del trabajo reciente del usuario. */
.portal-usage-section {
  position: relative;
  z-index: 4;
  max-width: 1240px;
  margin: 14px auto 0;
  padding: 0 4%;
}

.portal-usage-heading h2 {
  margin: 0 0 10px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  text-shadow: 0 1px 3px rgba(7, 31, 61, .42);
}

.portal-usage-grid {
  display: grid;
  /* Fila única: crea tantas columnas iguales como accesos haya (hasta 6),
     sin estirarlas de más cuando hay pocas. En pantallas medianas/móvil
     los media queries de abajo permiten que envuelvan/apilen. */
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 12px;
}

.portal-usage-card {
  position: relative;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 10px 16px;
  text-decoration: none;
}

/* Liquid glass SOLO para los accesos rápidos "Frecuentes": cristal traslúcido,
   reflejo superior y borde luminoso, sin perder el color del chip ni la
   legibilidad del texto. Se sobreescribe el look genérico de .module-card. */
body .module-card.portal-usage-card {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, .55);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, .60) 0%, rgba(255, 255, 255, .30) 48%, rgba(220, 235, 252, .28) 100%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  box-shadow:
    0 10px 26px rgba(15, 46, 77, .12),
    inset 0 1px 0 rgba(255, 255, 255, .72),
    inset 0 -1px 0 rgba(255, 255, 255, .16);
}

/* Reflejo/brillo de cristal en la parte superior (reemplaza el círculo heredado). */
body .module-card.portal-usage-card::after {
  content: '';
  position: absolute;
  inset: 0;
  right: auto;
  bottom: auto;
  width: auto;
  height: auto;
  z-index: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, .38) 0%, rgba(255, 255, 255, 0) 44%);
  pointer-events: none;
}

body .module-card.portal-usage-card:hover {
  border-color: rgba(255, 255, 255, .78);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, .72) 0%, rgba(255, 255, 255, .40) 48%, rgba(220, 235, 252, .34) 100%);
  box-shadow:
    0 16px 38px rgba(15, 46, 77, .16),
    inset 0 1px 0 rgba(255, 255, 255, .82),
    inset 0 -1px 0 rgba(255, 255, 255, .20);
}

.portal-usage-card strong {
  color: #0e2748;
  font-size: 15px;
}

/* Chip glass conservando su color (verde de "activo").
   Sin mayúsculas forzadas y en una sola línea (el nombre viene ya con su
   capitalización correcta, p.ej. "Dirección Técnica"). */
.portal-usage-card .module-status {
  align-self: flex-start;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: none;
  letter-spacing: normal;
  background: rgba(232, 255, 241, .72);
  color: #12653a;
  border: 1px solid rgba(22, 101, 52, .20);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.portal-usage-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 18px;
  color: #62748b;
  background: rgba(255, 255, 255, .58);
  border: 1px solid rgba(162, 185, 211, .45);
  border-radius: var(--radius-sm);
}

.dashboard-chart-card .chart-description {
  max-width: 330px;
  margin: 4px 0 0;
  color: #667b94;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
}

.dashboard-finding-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.dashboard-finding-modal[hidden] {
  display: none;
}

.dashboard-finding-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: rgba(9, 26, 47, .38);
  cursor: default;
}

.dashboard-finding-panel {
  position: relative;
  width: min(860px, 100%);
  max-height: min(78vh, 720px);
  padding: 22px;
  background: #f8fbff;
  border-radius: var(--radius-sm);
  box-shadow: 0 20px 52px rgba(8, 28, 54, .25);
  outline: 0;
}

.dashboard-finding-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.dashboard-finding-panel h2 {
  margin: 3px 0 0;
  color: #17375d;
  font-size: 16px;
}

.dashboard-finding-panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashboard-finding-panel-actions > strong {
  color: #5a4bb7;
  font-size: 24px;
}

.dashboard-finding-table-wrap {
  max-height: calc(min(78vh, 720px) - 102px);
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid rgba(173, 191, 213, .5);
  border-radius: var(--radius-sm);
  background: #ffffff;
}

.dashboard-finding-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
}

.dashboard-finding-table th,
.dashboard-finding-table td {
  padding: 9px 8px;
  border-bottom: 1px solid rgba(173, 191, 213, .38);
  text-align: left;
  overflow-wrap: anywhere;
}

.dashboard-finding-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f3f7fc;
  color: #536b87;
  font-size: 11px;
  text-transform: uppercase;
}

.dashboard-finding-table td {
  color: #20364d;
  font-size: 13px;
}

.dashboard-finding-table th:nth-child(1) { width: 17%; }
.dashboard-finding-table th:nth-child(2),
.dashboard-finding-table td:nth-child(2) { width: 7%; text-align: center; }
.dashboard-finding-table th:nth-child(3) { width: 12%; }
.dashboard-finding-table th:nth-child(4) { width: 17%; }
.dashboard-finding-table th:nth-child(5) { width: 18%; }
.dashboard-finding-table th:nth-child(6) { width: 14%; }
.dashboard-finding-table th:nth-child(7) { width: 15%; }

@media (max-width: 640px) {
  .dashboard-finding-modal { padding: 12px; }
  .dashboard-finding-panel { width: 100%; max-height: 84vh; padding: 16px; }
  .dashboard-finding-table-wrap { max-height: calc(84vh - 90px); }
  .dashboard-finding-table th,
  .dashboard-finding-table td { padding: 7px 4px; font-size: 10px; }
}

/* Pantallas medianas: 6 en una fila queda apretado -> se envuelven. */
@media (max-width: 900px) {
  .portal-usage-grid {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }
}

@media (max-width: 640px) {
  .portal-usage-section { padding: 0 14px; }
  .portal-usage-grid {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: 1fr;
  }
}
