/* SICAS INSTITUCIONAL MODERNO — CAPA VISUAL 1 */

:root {
  --sicas-ink: #20334a;
  --sicas-muted: #65778c;
  --sicas-navy: #172b46;
  --sicas-navy-light: #24466d;
  --sicas-blue: #285b91;
  --sicas-teal: #397f79;
  --sicas-canvas: #f3f6fa;
  --sicas-surface: #ffffff;
  --sicas-surface-soft: #f7f9fc;
  --sicas-border: #dce4ed;
  --sicas-border-strong: #c8d4e1;
  --sicas-shadow: 0 5px 18px rgba(23, 43, 70, .065);
  --sicas-radius: 12px;
}

body {
  color: var(--sicas-ink);
  background: var(--sicas-canvas);
}

/* Espacio de trabajo y jerarquía tipográfica */
#page {
  min-width: 0;
  max-width: 100%;
  color: var(--sicas-ink);
  line-height: 1.55;
}

#page > * {
  min-width: 0;
}

#page :is(h1, h2, h3, h4) {
  color: var(--sicas-ink);
  line-height: 1.3;
  letter-spacing: -.018em;
}

#page h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.4rem, 2vw, 1.9rem);
  font-weight: 750;
  padding-bottom: .7rem;
  border-bottom: 1px solid var(--sicas-border);
}

#page h2 {
  font-size: clamp(1.08rem, 1.55vw, 1.35rem);
  font-weight: 720;
}

#page :is(.muted, .hint, .help-text, .description) {
  color: var(--sicas-muted);
}

/* Paneles y secciones */
#page :is(.panel, .card, .section, .audit-section,
          .worksheet-section, .ctl-panel, .ctl-card) {
  min-width: 0;
  border: 1px solid var(--sicas-border);
  border-radius: var(--sicas-radius);
  background: var(--sicas-surface);
  box-shadow: var(--sicas-shadow);
}

#page fieldset {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--sicas-border);
  border-radius: 10px;
  background: #fff;
}

#page legend {
  padding: 0 .4rem;
  color: var(--sicas-ink);
  font-weight: 700;
}

#page details {
  border: 1px solid var(--sicas-border);
  border-radius: 10px;
  background: #fff;
}

#page details > summary {
  color: var(--sicas-navy-light);
  font-weight: 700;
  cursor: pointer;
}

/* Controles uniformes y foco accesible */
#page :is(input, select, textarea, button):focus-visible {
  outline: 3px solid rgba(49, 105, 166, .28);
  outline-offset: 2px;
}

#page input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
#page select,
#page textarea {
  width: 100%;
  max-width: 100%;
  min-height: 40px;
  padding: .58rem .72rem;
  color: var(--sicas-ink);
  background: #fff;
  border: 1px solid var(--sicas-border-strong);
  border-radius: 8px;
}

#page textarea {
  min-height: 90px;
  resize: vertical;
}

#page input[type="checkbox"],
#page input[type="radio"] {
  accent-color: var(--sicas-blue);
}

#page label {
  color: #354960;
  font-weight: 560;
}

#page :is(.toolbar, .actions, .filters, .filter-bar, .form-actions) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .7rem;
}

#page button:disabled {
  opacity: .6;
  cursor: not-allowed;
}

/* Tablas de auditorías, expedientes y cédulas */
#page :is(.grid-wrap, .table-wrap, .table-responsive,
          .table-container, .responsive-table, .overflow-x-auto) {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow: auto;
  overscroll-behavior-inline: contain;
  border: 1px solid var(--sicas-border);
  border-radius: 11px;
  background: #fff;
}

#page table {
  width: 100%;
  max-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  color: #293c51;
  background: #fff;
  font-size: .89rem;
}

#page :is(.grid-wrap, .table-wrap, .table-responsive,
          .table-container, .responsive-table, .overflow-x-auto) table {
  min-width: 610px;
}

#page table :is(th, td) {
  padding: .7rem .8rem;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
  border-bottom: 1px solid #e5eaf1;
}

#page table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: #233e5b;
  background: #edf3f9;
  font-size: .8rem;
  font-weight: 750;
  border-bottom-color: #d5e0eb;
}

#page table tbody tr:nth-child(even) td {
  background: #f8fafc;
}

#page table tbody tr:hover td {
  background: #eff6fc;
}

#page table tbody tr:last-child td {
  border-bottom: 0;
}

/* Estados y etiquetas */
#page :is(.badge, .pill, .tag, .status-badge, .chip) {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: .2rem .55rem;
  border: 1px solid #d8e2ed;
  border-radius: 999px;
  color: #35516f;
  background: #f0f5fa;
  font-size: .76rem;
  font-weight: 700;
  line-height: 1.5;
}

#page :is(.success, .status-success, .badge-success) {
  color: #20664c;
  background: #e8f6ef;
  border-color: #bfe6d2;
}

#page :is(.warning, .status-warning, .badge-warning) {
  color: #855b13;
  background: #fff5df;
  border-color: #f0dfb2;
}

#page :is(.danger, .status-danger, .badge-danger) {
  color: #9a3038;
  background: #fff0f0;
  border-color: #f0c9cb;
}

/* Expedientes y auditorías */
#page[data-sicas-view="audit"] :is(.panel, .card, .section, fieldset) {
  border-top: 3px solid var(--sicas-blue);
}

#page[data-sicas-view="audit"] :is(.toolbar, .actions, .filters, .row) {
  flex-wrap: wrap;
}

#page[data-sicas-view="audit"] table td:first-child {
  color: #294969;
  font-weight: 650;
}

/* Cédulas de suscripción, reclamo e indemnización */
#page[data-sicas-view="worksheet"] :is(.panel, .card, .section, fieldset) {
  border-top: 3px solid var(--sicas-teal);
}

#page[data-sicas-view="worksheet"] table tbody td:first-child {
  color: #294d50;
  font-weight: 650;
}

#page[data-sicas-view="worksheet"] textarea {
  min-height: 82px;
}

#page[data-sicas-view="worksheet"] input[type="number"] {
  max-width: 125px;
  font-variant-numeric: tabular-nums;
}

/* Dashboard del Contralor */
#page[data-sicas-view="contralor"] :is(
  .ctl-kpi-grid, .ctl-kpis, .ctl-kpi-cards, .kpi-grid,
  .metrics-grid, .stats-grid, .dashboard-metrics
) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 1rem;
  align-items: stretch;
}

#page[data-sicas-view="contralor"] :is(
  .ctl-kpi, .ctl-kpi-card, .kpi-card, .metric-card,
  .stat-card, .summary-card, .dashboard-card
) {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--sicas-border);
  border-radius: var(--sicas-radius);
  background: #fff;
  box-shadow: var(--sicas-shadow);
}

#page[data-sicas-view="contralor"] :is(
  .ctl-tabs, [role="tablist"]
) {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--sicas-border);
}

#page[data-sicas-view="contralor"] :is(
  .ctl-tabs, [role="tablist"]
) button.active,
#page[data-sicas-view="contralor"] :is(
  .ctl-tabs, [role="tablist"]
) button[aria-selected="true"] {
  color: #fff;
  background: var(--sicas-navy);
  border-color: var(--sicas-navy);
}

#page[data-sicas-view="contralor"] :is(svg, canvas, img) {
  max-width: 100%;
}

/* Actividad del auditor */
#page[data-sicas-view="activity"] :is(.panel, .card, .section) {
  border-top: 3px solid #6a7ea0;
}

/* Navegación plegable que ya está integrada en app.js */
#nav [data-sicas-nav-item] {
  min-width: 0;
  border-radius: 9px;
  transition: color .15s ease, background-color .15s ease;
}

#nav [data-sicas-nav-item]:focus-visible,
#nav .sicas-nav-toggle:focus-visible {
  outline: 3px solid #9bc9f0;
  outline-offset: 2px;
}

/* Apariencia del login/MFA sin cambiar visibilidad ni .hidden */
#view-login:not(.hidden),
#view-change:not(.hidden),
#view-enroll:not(.hidden),
#view-mfa:not(.hidden) {
  border: 1px solid var(--sicas-border);
  border-radius: 15px;
  box-shadow: var(--sicas-shadow);
}

/* Adaptación móvil */
@media (max-width: 850px) {
  #page[data-sicas-view="contralor"] :is(
    .ctl-kpi-grid, .ctl-kpis, .ctl-kpi-cards, .kpi-grid,
    .metrics-grid, .stats-grid, .dashboard-metrics
  ) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  #page {
    font-size: .92rem;
  }

  #page h1 {
    font-size: 1.35rem;
  }

  #page table :is(th, td) {
    padding: .58rem .63rem;
  }

  #page[data-sicas-view="contralor"] :is(
    .ctl-kpi-grid, .ctl-kpis, .ctl-kpi-cards, .kpi-grid,
    .metrics-grid, .stats-grid, .dashboard-metrics
  ) {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  #page *, #nav * {
    transition-duration: .01ms !important;
  }
}

/* SICAS-CONTRALOR-DASHBOARD-POLISH-20261014-v1 */

/* Filtros: orden y agrupación sin alterar los controles */
#page .ctl-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  padding: 16px;
  margin-bottom: 14px;
  border: 1px solid #d9e3ee;
  border-radius: 13px;
  background: linear-gradient(135deg, #fff 0%, #f7fafd 100%);
  box-shadow: 0 4px 14px rgba(23, 43, 70, .045);
}

#page .ctl-filters > label {
  flex: 1 1 150px;
  min-width: 135px;
  margin: 0;
  color: #43566c;
  font-size: .83rem;
  font-weight: 650;
}

#page .ctl-filters :is(input, select) {
  margin-top: 5px;
  min-width: 0;
}

/* Pestañas del dashboard ejecutivo */
#page .ctl-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 7px;
  margin: 12px 0 15px;
  border: 1px solid #dce5ee;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(23, 43, 70, .04);
}

#page .ctl-tabs .ctl-tab-button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 9px 14px;
  color: #435a73;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: .86rem;
  font-weight: 650;
}

#page .ctl-tabs .ctl-tab-button:hover {
  color: #183b63;
  background: #eef4fa;
}

#page .ctl-tabs .ctl-tab-button.is-active {
  color: #fff;
  background: #1c385b;
  border-color: #1c385b;
  box-shadow: 0 2px 5px rgba(23, 43, 70, .15);
}

#page .ctl-tab-panel {
  min-width: 0;
  width: 100%;
}

/* Tarjetas de indicadores */
#page .ctl-cards,
#page .ctl-ingestion-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
  gap: 12px;
  align-items: stretch;
  margin: 12px 0 16px;
}

#page .ctl-cards > .card.stat,
#page .ctl-ingestion-cards > .card.stat {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 5px;
  min-width: 0;
  min-height: 94px;
  padding: 15px 14px;
  overflow-wrap: anywhere;
  border: 1px solid #dce5ee;
  border-top: 3px solid #3678b5;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 13px rgba(23, 43, 70, .055);
  transition: border-color .15s ease, box-shadow .15s ease;
}

#page .ctl-cards > .card.stat:nth-child(4n + 2),
#page .ctl-ingestion-cards > .card.stat:nth-child(4n + 2) {
  border-top-color: #319c91;
}

#page .ctl-cards > .card.stat:nth-child(4n + 3),
#page .ctl-ingestion-cards > .card.stat:nth-child(4n + 3) {
  border-top-color: #8065c8;
}

#page .ctl-cards > .card.stat:nth-child(4n + 4),
#page .ctl-ingestion-cards > .card.stat:nth-child(4n + 4) {
  border-top-color: #dc9b31;
}

#page .ctl-cards > .card.stat:hover,
#page .ctl-ingestion-cards > .card.stat:hover {
  box-shadow: 0 7px 19px rgba(23, 43, 70, .09);
  border-color: #cbd9e7;
}

/* Paneles de resultados */
#page .contralor-panel {
  min-width: 0;
  margin: 12px 0;
  padding: 18px;
  border: 1px solid #dce5ee;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 4px 15px rgba(23, 43, 70, .05);
}

#page .contralor-panel > :is(h2, h3, h4):first-child {
  margin-top: 0;
  padding-bottom: 11px;
  border-bottom: 1px solid #e4ebf2;
  color: #203b5c;
}

/* Tablas: mantener legibles las columnas comparativas */
#page .tablewrap {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow: auto;
  overscroll-behavior-inline: contain;
  border: 1px solid #e0e8f0;
  border-radius: 10px;
  background: #fff;
}

#page .tablewrap table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: .84rem;
}

#page .ctl-tab-panel-resumen .tablewrap table {
  min-width: 930px;
}

#page .tablewrap table th {
  padding: 11px 12px;
  color: #294561;
  background: #eef4fa;
  border-bottom: 1px solid #d7e2ed;
  font-weight: 720;
  white-space: nowrap;
}

#page .tablewrap table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e8edf3;
  vertical-align: middle;
  overflow-wrap: normal;
  word-break: normal;
}

#page .tablewrap table tbody tr:nth-child(even) td {
  background: #f8fafc;
}

#page .tablewrap table tbody tr:hover td {
  background: #edf5fc;
}

#page .tablewrap table tbody tr:last-child td {
  border-bottom: 0;
}

/* Gráficos y tendencias */
#page .ctl-chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  align-items: stretch;
  gap: 14px;
  min-width: 0;
  margin: 12px 0 16px;
}

#page .ctl-chart-grid > * {
  min-width: 0;
  max-width: 100%;
}

#page .ctl-trend-chart {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid #e0e8f0;
  border-radius: 10px;
  background: linear-gradient(180deg, #fff, #f9fbfe);
}

#page .ctl-trend-chart svg,
#page .ctl-chart-grid svg,
#page .ctl-chart-grid canvas {
  display: block;
  max-width: 100%;
}

/* Alertas y vencimientos */
#page .ctl-alert-details {
  margin: 12px 0;
  border: 1px solid #dce5ee;
  border-radius: 10px;
  background: #f9fbfd;
}

#page .ctl-alert-details > summary {
  padding: 12px 14px;
  color: #294561;
  font-weight: 700;
  cursor: pointer;
}

#page .ctl-alert-details[open] > summary {
  border-bottom: 1px solid #e1e8f0;
}

#page .ctl-alert-details > :not(summary) {
  max-width: 100%;
}

/* Gestión del histórico de KPI */
#page .ctl-kpi-host,
#page .ctl-kpi-history {
  min-width: 0;
  max-width: 100%;
}

#page .ctl-kpi-history {
  margin-top: 14px;
}

#page .ctl-kpi-host .tablewrap,
#page .ctl-kpi-history .tablewrap {
  margin-block: 10px;
}

/* Adaptación móvil */
@media (max-width: 720px) {
  #page .ctl-filters {
    align-items: stretch;
  }

  #page .ctl-filters > label {
    flex-basis: 100%;
  }

  #page .ctl-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
  }

  #page .ctl-tab-panel-resumen .tablewrap table {
    min-width: 930px;
  }

  #page .contralor-panel {
    padding: 13px;
  }

  #page .ctl-chart-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 440px) {
  #page .ctl-cards,
  #page .ctl-ingestion-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  #page .ctl-cards > .card.stat,
  #page .ctl-ingestion-cards > .card.stat {
    padding: 11px;
  }
}

/* SICAS-AUDIT-MODULE-POLISH-20261014-v1 */

/* Área de trabajo y encabezado */
#page[data-sicas-view="audit"] {
  color: #20334a;
  min-width: 0;
  max-width: 100%;
}

#page[data-sicas-view="audit"] > div {
  min-width: 0;
  max-width: 100%;
}

#page[data-sicas-view="audit"] h2 {
  margin: 0 0 1rem;
  padding: 0 0 .85rem;
  color: #172f4e;
  font-size: clamp(1.4rem, 2vw, 1.85rem);
  font-weight: 760;
  letter-spacing: -.02em;
  line-height: 1.3;
  border-bottom: 1px solid #dce5ee;
}

#page[data-sicas-view="audit"] h3 {
  margin: 1.25rem 0 .65rem;
  padding: .72rem .9rem;
  color: #254667;
  background: linear-gradient(90deg, #edf4fb 0%, #f8fafc 100%);
  border: 1px solid #dce6f0;
  border-left: 4px solid #326b9f;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 720;
}

/* Listados: Auditorías, Expedientes e Informes finales */
#page[data-sicas-view="audit"] table {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  border: 1px solid #dce5ee;
  border-radius: 10px;
  background: #fff;
  color: #293c51;
  font-size: .87rem;
  line-height: 1.45;
  border-spacing: 0;
  box-shadow: 0 3px 12px rgba(23, 43, 70, .045);
}

/* Ancho mínimo para que las columnas no se compriman hasta ser ilegibles */
#page[data-sicas-view="audit"] table thead,
#page[data-sicas-view="audit"] table tbody {
  min-width: 100%;
}

#page[data-sicas-view="audit"] table th,
#page[data-sicas-view="audit"] table td {
  padding: .72rem .8rem;
  vertical-align: middle;
  text-align: left;
  border-bottom: 1px solid #e6ecf2;
  overflow-wrap: normal;
}

#page[data-sicas-view="audit"] table th {
  color: #284666;
  background: #edf3f9;
  font-size: .79rem;
  font-weight: 750;
  white-space: nowrap;
  border-bottom: 1px solid #d5e0eb;
}

#page[data-sicas-view="audit"] table tbody tr:nth-child(even) td {
  background: #f8fafc;
}

#page[data-sicas-view="audit"] table tbody tr:hover td {
  background: #eef6fd;
}

#page[data-sicas-view="audit"] table tbody tr:last-child td {
  border-bottom: 0;
}

/* Botones de pestañas y acciones */
#page[data-sicas-view="audit"] button {
  max-width: 100%;
  border-radius: 8px;
  font-weight: 620;
  transition: color .15s ease, background-color .15s ease,
    border-color .15s ease;
}

#page[data-sicas-view="audit"] button:focus-visible,
#page[data-sicas-view="audit"] a:focus-visible {
  outline: 3px solid rgba(49, 105, 166, .3);
  outline-offset: 2px;
}

#page[data-sicas-view="audit"] button.active,
#page[data-sicas-view="audit"] button.is-active,
#page[data-sicas-view="audit"] button[aria-selected="true"] {
  color: #fff;
  background: #1f4168;
  border-color: #1f4168;
}

/* Formularios de auditoría y filtros */
#page[data-sicas-view="audit"] :is(input, select, textarea) {
  max-width: 100%;
  border-radius: 8px;
}

#page[data-sicas-view="audit"] :is(fieldset, details) {
  min-width: 0;
  border: 1px solid #dce5ee;
  border-radius: 10px;
  background: #fff;
}

#page[data-sicas-view="audit"] legend {
  padding: 0 .4rem;
  color: #294969;
  font-weight: 700;
}

#page[data-sicas-view="audit"] :is(.row, .toolbar, .actions, .filters) {
  flex-wrap: wrap;
  gap: .7rem;
}

/* Mensajes y estados */
#page[data-sicas-view="audit"] :is(.muted, .hint, .help-text) {
  color: #687a8e;
}

#page[data-sicas-view="audit"] :is(.badge, .pill, .tag, .status-badge) {
  display: inline-flex;
  align-items: center;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 700;
}

/* Evitar desbordamientos en pantallas pequeñas */
@media (max-width: 720px) {
  #page[data-sicas-view="audit"] h3 {
    font-size: .95rem;
    padding: .65rem .75rem;
  }

  #page[data-sicas-view="audit"] table {
    font-size: .83rem;
  }

  #page[data-sicas-view="audit"] table th,
  #page[data-sicas-view="audit"] table td {
    padding: .62rem .68rem;
  }
}

/* SICAS-HOME-AUDIT-LAYOUT-FIX-20261014-v1 */

/* FIX: las tablas deben conservar su modelo de tabla, no display:block */
#page[data-sicas-view="audit"] > div {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

#page[data-sicas-view="audit"] table {
  display: table !important;
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  overflow: visible !important;
  table-layout: auto;
  border-collapse: separate;
}

#page[data-sicas-view="audit"] table thead,
#page[data-sicas-view="audit"] table tbody {
  min-width: 0 !important;
}

#page[data-sicas-view="audit"] table th,
#page[data-sicas-view="audit"] table td {
  overflow-wrap: normal;
  word-break: normal;
}

/* FIX: menú plegado, evitar que el título NAVEGACIÓN se recorte */
#view-app.sicas-nav-collapsed #nav::before {
  display: none !important;
  content: none !important;
}

/* INICIO: jerarquía visual y espacios */
#page[data-sicas-view="general"] > div {
  min-width: 0;
  max-width: 100%;
}

#page[data-sicas-view="general"] > div > h2:first-child {
  margin: 0 0 12px;
  padding: 0 0 10px;
  color: #172f4e;
  font-size: clamp(1.4rem, 2vw, 1.85rem);
  font-weight: 760;
  letter-spacing: -.02em;
  border-bottom: 1px solid #dce5ee;
}

/* Tarjetas métricas que siguen al título Inicio */
#page[data-sicas-view="general"] > div > h2:first-child + div:has(> .card.stat) {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 12px;
  width: 100%;
  margin: 12px 0 18px;
  align-items: stretch;
}

#page[data-sicas-view="general"] > div > h2:first-child + div:has(> .card.stat) > .card.stat {
  min-width: 0;
  padding: 15px;
  border: 1px solid #dce5ee;
  border-top: 3px solid #3479b8;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(23, 43, 70, .055);
}

#page[data-sicas-view="general"] > div > h2:first-child + div:has(> .card.stat) > .card.stat:nth-child(4n + 2) {
  border-top-color: #319c91;
}

#page[data-sicas-view="general"] > div > h2:first-child + div:has(> .card.stat) > .card.stat:nth-child(4n + 3) {
  border-top-color: #8065c8;
}

#page[data-sicas-view="general"] > div > h2:first-child + div:has(> .card.stat) > .card.stat:nth-child(4n + 4) {
  border-top-color: #dc9b31;
}

#page[data-sicas-view="general"] > div > h2:first-child + div:has(> .card.stat) > .card.stat:hover {
  border-color: #bfd2e4;
  box-shadow: 0 7px 20px rgba(23, 43, 70, .09);
}

/* Secciones de Inicio: Auditorías en curso e Informes finales */
#page[data-sicas-view="general"] > div > h3 {
  margin: 16px 0 9px;
  padding: 0 0 8px;
  color: #254667;
  font-size: 1rem;
  font-weight: 730;
  border-bottom: 1px solid #dce5ee;
  background: transparent;
}

#page[data-sicas-view="general"] table {
  display: table !important;
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  overflow: visible !important;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #dce5ee;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(23, 43, 70, .045);
}

#page[data-sicas-view="general"] table th {
  padding: 11px 12px;
  color: #294561;
  background: #edf3f9;
  border-bottom: 1px solid #d7e2ed;
  font-weight: 720;
  text-align: left;
}

#page[data-sicas-view="general"] table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e8edf3;
  vertical-align: middle;
}

#page[data-sicas-view="general"] table tbody tr:nth-child(even) td {
  background: #f8fafc;
}

#page[data-sicas-view="general"] table tbody tr:hover td {
  background: #eef6fd;
}

#page[data-sicas-view="general"] table tbody tr:last-child td {
  border-bottom: 0;
}

/* Evitar que Inicio se desborde en pantallas estrechas */
@media (max-width: 720px) {
  #page[data-sicas-view="general"] > div > h2:first-child + div:has(> .card.stat) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #page[data-sicas-view="general"] table {
    font-size: .82rem;
  }

  #page[data-sicas-view="general"] table th,
  #page[data-sicas-view="general"] table td {
    padding: 8px;
  }
}

/* SICAS-HOME-DASHBOARD-STYLES-20261014-v1 */

#page > .home-dashboard {
  display: grid;
  gap: 18px;
  align-content: start;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  color: #20334a;
}

#page > .home-dashboard .home-dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  padding: 2px 0 14px;
  border-bottom: 1px solid #dce5ee;
}

#page > .home-dashboard .home-eyebrow {
  margin: 0 0 5px;
  color: #53708f;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .11em;
}

#page > .home-dashboard .home-dashboard-header h2 {
  margin: 0;
  padding: 0;
  border: 0;
  color: #17314f;
  font-size: clamp(1.55rem, 2.2vw, 2rem);
  font-weight: 780;
  line-height: 1.2;
}

#page > .home-dashboard .home-subtitle {
  margin: 7px 0 0;
  color: #667b92;
  font-size: .93rem;
}

#page > .home-dashboard .home-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid #cee8dd;
  border-radius: 999px;
  color: #276b54;
  background: #eff9f4;
  font-size: .76rem;
  font-weight: 700;
  white-space: nowrap;
}

#page > .home-dashboard .home-live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #31a177;
}

#page > .home-dashboard .home-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 0;
}

#page > .home-dashboard .home-metrics > .card.stat {
  position: relative;
  min-width: 0;
  min-height: 108px;
  padding: 17px 16px;
  overflow: hidden;
  border: 1px solid #dce5ee;
  border-top: 3px solid #3479b8;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 15px rgba(23, 43, 70, .055);
}

#page > .home-dashboard .home-metrics > .card.stat:nth-child(4n + 2) {
  border-top-color: #319c91;
}

#page > .home-dashboard .home-metrics > .card.stat:nth-child(4n + 3) {
  border-top-color: #8065c8;
}

#page > .home-dashboard .home-metrics > .card.stat:nth-child(4n + 4) {
  border-top-color: #dc9b31;
}

#page > .home-dashboard .home-metrics .stat .n {
  margin: 0 0 7px;
  color: #1c385b;
  font-size: clamp(1.65rem, 2vw, 2.1rem);
  font-weight: 780;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

#page > .home-dashboard .home-metrics .stat .l {
  color: #61748a;
  font-size: .83rem;
  line-height: 1.35;
}

#page > .home-dashboard .home-section-heading h3 {
  margin: 0 0 4px;
  color: #1f3d60;
  font-size: 1.14rem;
  font-weight: 760;
}

#page > .home-dashboard .home-panel-note {
  margin: 0;
  color: #718197;
  font-size: .8rem;
  line-height: 1.45;
}

#page > .home-dashboard .home-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  min-width: 0;
}

#page > .home-dashboard .home-panel {
  min-width: 0;
  padding: 17px;
  border: 1px solid #dce5ee;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 4px 15px rgba(23, 43, 70, .05);
}

#page > .home-dashboard .home-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 15px;
}

#page > .home-dashboard .home-panel-title {
  min-width: 0;
}

#page > .home-dashboard .home-panel-head h3 {
  margin: 0 0 4px;
  color: #203b5c;
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.35;
}

#page > .home-dashboard .home-link-button {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid #d7e3ef;
  border-radius: 8px;
  color: #285b91;
  background: #f7fafd;
  font-size: .77rem;
  font-weight: 700;
  cursor: pointer;
}

#page > .home-dashboard .home-link-button:hover {
  background: #eaf3fc;
}

#page > .home-dashboard .home-bars {
  display: grid;
  gap: 13px;
}

#page > .home-dashboard .home-bar-row {
  min-width: 0;
}

#page > .home-dashboard .home-bar-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  color: #435970;
  font-size: .83rem;
}

#page > .home-dashboard .home-bar-label {
  min-width: 0;
  overflow-wrap: anywhere;
}

#page > .home-dashboard .home-bar-value {
  flex: 0 0 auto;
  color: #1f3d60;
  font-size: .83rem;
  font-variant-numeric: tabular-nums;
}

#page > .home-dashboard .home-bar-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f7;
}

#page > .home-dashboard .home-bar-fill {
  display: block;
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  transition: width .25s ease;
}

#page > .home-dashboard .home-bar-fill.tone-0 { background: #3479b8; }
#page > .home-dashboard .home-bar-fill.tone-1 { background: #319c91; }
#page > .home-dashboard .home-bar-fill.tone-2 { background: #8065c8; }
#page > .home-dashboard .home-bar-fill.tone-3 { background: #dc9b31; }
#page > .home-dashboard .home-bar-fill.tone-4 { background: #d35e69; }

#page > .home-dashboard .home-table-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
  min-width: 0;
}

#page > .home-dashboard .home-table-panel {
  min-width: 0;
  padding: 15px;
}

#page > .home-dashboard .home-table-panel .tablewrap {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid #e0e8f0;
  border-radius: 9px;
  box-shadow: none;
}

#page[data-sicas-view="general"] > .home-dashboard .home-table-panel .tablewrap table {
  display: table !important;
  width: 100% !important;
  min-width: 620px !important;
  max-width: none !important;
  overflow: visible !important;
  border-collapse: separate;
  border-spacing: 0;
  font-size: .82rem;
}

#page > .home-dashboard .home-table-panel .tablewrap th {
  padding: 10px;
  color: #294561;
  background: #edf3f9;
  border-bottom: 1px solid #d7e2ed;
  font-size: .76rem;
  white-space: nowrap;
}

#page > .home-dashboard .home-table-panel .tablewrap td {
  padding: 10px;
  border-bottom: 1px solid #e8edf3;
  vertical-align: middle;
}

#page > .home-dashboard .home-table-panel .tablewrap tbody tr:hover td {
  background: #eef6fd;
}

#page > .home-dashboard .home-table-panel .tablewrap tr:last-child td {
  border-bottom: 0;
}

#page > .home-dashboard .home-empty {
  margin: 0;
  padding: 15px 8px;
  color: #718197;
  font-size: .86rem;
  line-height: 1.5;
}

@media (max-width: 1000px) {
  #page > .home-dashboard .home-table-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  #page > .home-dashboard .home-chart-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  #page > .home-dashboard .home-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #page > .home-dashboard .home-panel {
    padding: 13px;
  }
}

@media (max-width: 440px) {
  #page > .home-dashboard .home-dashboard-header {
    display: grid;
  }

  #page > .home-dashboard .home-metrics {
    gap: 8px;
  }

  #page > .home-dashboard .home-metrics > .card.stat {
    min-height: 95px;
    padding: 12px;
  }

  #page > .home-dashboard .home-metrics .stat .n {
    font-size: 1.5rem;
  }

  #page > .home-dashboard .home-panel-head {
    flex-wrap: wrap;
  }
}

/* SICAS-HOME-CHARTS-CSS-20261014-v1 */

#page > .home-dashboard .home-line-chart {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  margin-top: 4px;
}

#page > .home-dashboard .home-line-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 8px;
}

#page > .home-dashboard .home-line-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #566d84;
  font-size: .75rem;
  font-weight: 600;
}

#page > .home-dashboard .home-line-swatch,
#page > .home-dashboard .home-donut-swatch {
  display: inline-block;
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

#page > .home-dashboard .home-donut-layout {
  display: grid;
  grid-template-columns: minmax(145px, .9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 20px;
  min-width: 0;
  padding: 8px 2px;
}

#page > .home-dashboard .home-donut-ring {
  display: grid;
  place-items: center;
  width: min(100%, 220px);
  aspect-ratio: 1;
  margin-inline: auto;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(23, 43, 70, .04);
}

#page > .home-dashboard .home-donut-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 61%;
  aspect-ratio: 1;
  border: 1px solid #e6edf4;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 12px rgba(23, 43, 70, .08);
}

#page > .home-dashboard .home-donut-center strong {
  color: #1d385a;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

#page > .home-dashboard .home-donut-center span {
  margin-top: 5px;
  color: #73849a;
  font-size: .76rem;
}

#page > .home-dashboard .home-donut-legend {
  display: grid;
  gap: 0;
  min-width: 0;
}

#page > .home-dashboard .home-donut-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px 42px;
  align-items: center;
  gap: 8px;
  padding: 11px 0;
  border-bottom: 1px solid #edf1f6;
  font-size: .81rem;
}

#page > .home-dashboard .home-donut-row:last-child {
  border-bottom: 0;
}

#page > .home-dashboard .home-donut-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #52677e;
}

#page > .home-dashboard .home-donut-count {
  color: #233e5d;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

#page > .home-dashboard .home-donut-percent {
  color: #78899c;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 620px) {
  #page > .home-dashboard .home-donut-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  #page > .home-dashboard .home-donut-ring {
    width: min(62vw, 205px);
  }
}

/* SICAS-HOME-UNIT-PERIOD-CSS-20261014-v2 */

#page > .home-dashboard .home-units-ranking .home-bars {
  gap: 15px;
}

#page > .home-dashboard .home-units-ranking .home-bar-meta {
  font-size: .84rem;
}

#page > .home-dashboard .home-units-ranking .home-bar-value {
  min-width: 2ch;
  text-align: right;
  font-size: .86rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

#page > .home-dashboard .home-units-ranking .home-bar-track {
  height: 10px;
  border: 1px solid #e5edf5;
  background: #edf2f7;
}

#page > .home-dashboard .home-unit-trend-panel .home-panel-head {
  align-items: flex-start;
}

#page > .home-dashboard .home-unit-trend-panel .home-period-select {
  flex: 0 0 auto;
  width: auto;
  min-width: 112px;
  max-width: 145px;
  min-height: 36px;
  padding: 6px 9px;
  border: 1px solid #d5e0eb;
  border-radius: 8px;
  color: #294561;
  background: #f8fafc;
  font-size: .8rem;
  font-weight: 650;
}

#page > .home-dashboard .home-unit-trend-panel .home-line-chart {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

@media (max-width: 560px) {
  #page > .home-dashboard .home-unit-trend-panel .home-panel-head {
    flex-wrap: wrap;
  }
}

/* SICAS-AUDIT-TABLE-WRAPPER-FIX-20261014-v1 */

/* El contenedor gestiona el desplazamiento; la tabla conserva su modelo. */
#page[data-sicas-view="audit"] .tablewrap {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: .4rem 0 1.35rem;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #dce5ee;
  border-radius: 10px;
  background: #fff;
}

#page[data-sicas-view="audit"] .tablewrap > table {
  display: table !important;
  width: 100% !important;
  min-width: 560px !important;
  max-width: none !important;
  margin: 0;
  overflow: visible !important;
  table-layout: auto;
  border: 0;
  border-radius: 0;
  border-spacing: 0;
  border-collapse: separate;
  box-shadow: none;
}

/* Más espacio para las tablas con más columnas. */
#page[data-sicas-view="audit"] .tablewrap > table:has(> thead > tr > th:nth-child(4)) {
  min-width: 670px !important;
}

#page[data-sicas-view="audit"] .tablewrap > table:has(> thead > tr > th:nth-child(5)) {
  min-width: 770px !important;
}

#page[data-sicas-view="audit"] .tablewrap > table:has(> thead > tr > th:nth-child(6)) {
  min-width: 880px !important;
}

#page[data-sicas-view="audit"] .tablewrap > table:has(> thead > tr > th:nth-child(7)) {
  min-width: 1000px !important;
}

#page[data-sicas-view="audit"] .tablewrap > table th,
#page[data-sicas-view="audit"] .tablewrap > table td {
  box-sizing: border-box;
}

#page[data-sicas-view="audit"] .tablewrap > table tbody tr.clickable {
  cursor: pointer;
}

#page[data-sicas-view="audit"] .tablewrap > table tbody tr.clickable:focus-within td,
#page[data-sicas-view="audit"] .tablewrap > table tbody tr.clickable:hover td {
  background: #eef6fd;
}

/* En pantallas pequeñas, desplazar la tabla sin comprimir sus columnas. */
@media (max-width: 720px) {
  #page[data-sicas-view="audit"] .tablewrap {
    margin-bottom: 1rem;
  }
}

/* SICAS-QUESTIONNAIRE-VISUAL-POLISH-20261014-v1 */

/* Estadísticas compactas y adaptables */
#page[data-sicas-view="audit"] .row:has(> .card.stat) {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  align-items: stretch;
  margin: 12px 0 16px;
}

#page[data-sicas-view="audit"] .row:has(> .card.stat) > .card.stat {
  box-sizing: border-box;
  min-width: 0;
  min-height: 76px;
  padding: 12px;
  border: 1px solid #dce5ee;
  border-top: 3px solid #319c91;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(23, 43, 70, .045);
}

/* Contenedor de tabla: desplazar la tabla, no la página completa */
#page[data-sicas-view="audit"] .grid-wrap.audit-system-questionnaire {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 14px 0 20px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #dce5ee;
  border-radius: 10px;
  background: #fff;
}

/* Columnas con espacio suficiente para preguntas y observaciones */
#page[data-sicas-view="audit"] .grid-wrap.audit-system-questionnaire > table {
  width: 100%;
  min-width: 1560px;
  table-layout: fixed;
  border: 0;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 0;
  box-shadow: none;
}

#page[data-sicas-view="audit"] .grid-wrap.audit-system-questionnaire > table th,
#page[data-sicas-view="audit"] .grid-wrap.audit-system-questionnaire > table td {
  box-sizing: border-box;
  padding: 11px 12px;
  vertical-align: top;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.45;
  border-bottom: 1px solid #e6ecf2;
}

#page[data-sicas-view="audit"] .grid-wrap.audit-system-questionnaire > table th {
  color: #284666;
  background: #edf3f9;
  font-size: .8rem;
  font-weight: 750;
}

#page[data-sicas-view="audit"] .grid-wrap.audit-system-questionnaire > table tbody tr:nth-child(even) td {
  background: #f8fafc;
}

#page[data-sicas-view="audit"] .grid-wrap.audit-system-questionnaire > table tbody tr:hover td {
  background: #eef6fd;
}

/* Anchos para: ID, sección, pregunta, existencia, soporte,
   evidencia, puntaje, observación y acciones */
#page[data-sicas-view="audit"] .grid-wrap.audit-system-questionnaire > table th:nth-child(1),
#page[data-sicas-view="audit"] .grid-wrap.audit-system-questionnaire > table td:nth-child(1) { width: 68px; }

#page[data-sicas-view="audit"] .grid-wrap.audit-system-questionnaire > table th:nth-child(2),
#page[data-sicas-view="audit"] .grid-wrap.audit-system-questionnaire > table td:nth-child(2) { width: 150px; }

#page[data-sicas-view="audit"] .grid-wrap.audit-system-questionnaire > table th:nth-child(3),
#page[data-sicas-view="audit"] .grid-wrap.audit-system-questionnaire > table td:nth-child(3) { width: 355px; }

#page[data-sicas-view="audit"] .grid-wrap.audit-system-questionnaire > table th:nth-child(4),
#page[data-sicas-view="audit"] .grid-wrap.audit-system-questionnaire > table td:nth-child(4) { width: 120px; }

#page[data-sicas-view="audit"] .grid-wrap.audit-system-questionnaire > table th:nth-child(5),
#page[data-sicas-view="audit"] .grid-wrap.audit-system-questionnaire > table td:nth-child(5) { width: 155px; }

#page[data-sicas-view="audit"] .grid-wrap.audit-system-questionnaire > table th:nth-child(6),
#page[data-sicas-view="audit"] .grid-wrap.audit-system-questionnaire > table td:nth-child(6) { width: 180px; }

#page[data-sicas-view="audit"] .grid-wrap.audit-system-questionnaire > table th:nth-child(7),
#page[data-sicas-view="audit"] .grid-wrap.audit-system-questionnaire > table td:nth-child(7) {
  width: 82px;
  text-align: center;
}

#page[data-sicas-view="audit"] .grid-wrap.audit-system-questionnaire > table th:nth-child(8),
#page[data-sicas-view="audit"] .grid-wrap.audit-system-questionnaire > table td:nth-child(8) { width: 270px; }

#page[data-sicas-view="audit"] .grid-wrap.audit-system-questionnaire > table th:nth-child(9),
#page[data-sicas-view="audit"] .grid-wrap.audit-system-questionnaire > table td:nth-child(9) { width: 180px; }

/* Controles amplios, consistentes y cómodos de editar */
#page[data-sicas-view="audit"] .grid-wrap.audit-system-questionnaire > table select,
#page[data-sicas-view="audit"] .grid-wrap.audit-system-questionnaire > table textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  font: inherit;
  border-radius: 7px;
}

#page[data-sicas-view="audit"] .grid-wrap.audit-system-questionnaire > table select {
  min-height: 38px;
  padding: 7px;
}

#page[data-sicas-view="audit"] .grid-wrap.audit-system-questionnaire > table textarea {
  min-height: 78px;
  padding: 9px;
  line-height: 1.45;
  resize: vertical;
}

#page[data-sicas-view="audit"] .grid-wrap.audit-system-questionnaire > table td:nth-child(9) button {
  max-width: 100%;
  margin: 3px 0;
  white-space: normal;
}

@media (max-width: 720px) {
  #page[data-sicas-view="audit"] .row:has(> .card.stat) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  #page[data-sicas-view="audit"] .row:has(> .card.stat) > .card.stat {
    padding: 10px;
  }

  #page[data-sicas-view="audit"] .grid-wrap.audit-system-questionnaire {
    margin-top: 10px;
  }
}

/* SICAS-AUDIT-SUMMARY-DASHBOARD-20261014-v1 */

#page[data-sicas-view="audit"] .audit-summary-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  min-width: 0;
}

#page[data-sicas-view="audit"] .audit-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

#page[data-sicas-view="audit"] .audit-kpi {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
  padding: 16px;
  border: 1px solid #dce5ee;
  border-top: 4px solid #3479b8;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(23, 43, 70, .055);
}

#page[data-sicas-view="audit"] .audit-kpi-teal { border-top-color: #319c91; }
#page[data-sicas-view="audit"] .audit-kpi-rose { border-top-color: #bd6873; }
#page[data-sicas-view="audit"] .audit-kpi-violet { border-top-color: #8065c8; }

#page[data-sicas-view="audit"] .audit-kpi-label {
  color: #65778b;
  font-size: .82rem;
  font-weight: 650;
}

#page[data-sicas-view="audit"] .audit-kpi-value {
  color: #1d3552;
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  font-weight: 800;
  line-height: 1.15;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

#page[data-sicas-view="audit"] .audit-kpi-note {
  color: #63758a;
  font-size: .8rem;
}

#page[data-sicas-view="audit"] .audit-progress {
  width: 100%;
  height: 8px;
  margin: 5px 0 1px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef4;
}

#page[data-sicas-view="audit"] .audit-progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #319c91, #3479b8);
  transition: width .2s ease;
}

#page[data-sicas-view="audit"] .audit-summary-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 14px;
  align-items: start;
}

#page[data-sicas-view="audit"] .audit-summary-panel {
  box-sizing: border-box;
  min-width: 0;
  margin: 0;
  padding: 16px;
}

#page[data-sicas-view="audit"] .audit-summary-panel > h3 {
  margin-top: 0;
}

#page[data-sicas-view="audit"] .audit-summary-kv {
  grid-template-columns: minmax(105px, .65fr) minmax(0, 1.35fr);
  gap: 9px 12px;
}

#page[data-sicas-view="audit"] .audit-summary-kv > * {
  min-width: 0;
  overflow-wrap: anywhere;
}

#page[data-sicas-view="audit"] .audit-rating-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

#page[data-sicas-view="audit"] .audit-rating-metric {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #e0e8f0;
  border-radius: 9px;
  background: #f8fafc;
}

#page[data-sicas-view="audit"] .audit-rating-metric > span:first-child {
  color: #697b8f;
  font-size: .8rem;
  font-weight: 650;
}

#page[data-sicas-view="audit"] .audit-rating-metric > strong {
  color: #1d3552;
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
}

#page[data-sicas-view="audit"] .audit-rating-scale {
  margin-top: 12px;
  color: #697b8f;
  font-size: .8rem;
  line-height: 1.6;
}

#page[data-sicas-view="audit"] .audit-manual-reason {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff8e8;
  color: #6c5223;
  overflow-wrap: anywhere;
}

#page[data-sicas-view="audit"] .audit-rating-actions {
  margin-top: 13px;
}

#page[data-sicas-view="audit"] .audit-section-heading h3 {
  margin-bottom: 5px;
}

#page[data-sicas-view="audit"] .audit-section-heading p {
  margin: 0 0 14px;
}

#page[data-sicas-view="audit"] .audit-sheet-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

#page[data-sicas-view="audit"] .audit-sheet-result {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 9px;
  width: 100%;
  min-width: 0;
  padding: 14px;
  border: 1px solid #dce5ee;
  border-radius: 10px;
  background: #fff;
  color: #293c51;
  text-align: left;
  white-space: normal;
  box-shadow: 0 2px 8px rgba(23, 43, 70, .035);
}

#page[data-sicas-view="audit"] .audit-sheet-result:hover {
  border-color: #94b5d3;
  background: #f8fbfe;
}

#page[data-sicas-view="audit"] .audit-sheet-result:focus-visible {
  outline: 3px solid rgba(49, 105, 166, .3);
  outline-offset: 2px;
}

#page[data-sicas-view="audit"] .audit-sheet-result-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

#page[data-sicas-view="audit"] .audit-sheet-result-title {
  min-width: 0;
  color: #244565;
  font-size: .92rem;
  font-weight: 750;
  overflow-wrap: anywhere;
}

#page[data-sicas-view="audit"] .audit-sheet-result-score {
  flex-shrink: 0;
  color: #1d3552;
  font-size: .95rem;
  font-variant-numeric: tabular-nums;
}

#page[data-sicas-view="audit"] .audit-sheet-result-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 5px 10px;
  color: #697b8f;
  font-size: .78rem;
}

#page[data-sicas-view="audit"] .audit-history-details {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid #dce5ee;
  border-radius: 10px;
  background: #fff;
}

#page[data-sicas-view="audit"] .audit-history-details > summary {
  color: #294969;
  font-weight: 750;
  cursor: pointer;
}

#page[data-sicas-view="audit"] .audit-history-details[open] > summary {
  margin-bottom: 12px;
}

#page[data-sicas-view="audit"] .audit-phase-actions {
  margin: 8px 0 14px;
}

@media (max-width: 1000px) {
  #page[data-sicas-view="audit"] .audit-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #page[data-sicas-view="audit"] .audit-summary-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 680px) {
  #page[data-sicas-view="audit"] .audit-sheet-results {
    grid-template-columns: minmax(0, 1fr);
  }

  #page[data-sicas-view="audit"] .audit-rating-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #page[data-sicas-view="audit"] .audit-summary-kv {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  #page[data-sicas-view="audit"] .audit-summary-kv > b:not(:first-child) {
    margin-top: 8px;
  }

  #page[data-sicas-view="audit"] .audit-kpi {
    padding: 12px;
  }
}

@media (max-width: 420px) {
  #page[data-sicas-view="audit"] .audit-rating-metrics {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* SICAS-OBSERVATIONS-DASHBOARD-20261014-v1 */

#page[data-sicas-view="audit"] .audit-observations-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  min-width: 0;
}

#page[data-sicas-view="audit"] .audit-observations-heading,
#page[data-sicas-view="audit"] .audit-observations-table-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

#page[data-sicas-view="audit"] .audit-observations-heading h3,
#page[data-sicas-view="audit"] .audit-observations-table-heading h3 {
  margin: 0 0 5px;
}

#page[data-sicas-view="audit"] .audit-observations-heading p,
#page[data-sicas-view="audit"] .audit-observations-table-heading p {
  margin: 0;
  line-height: 1.5;
}

#page[data-sicas-view="audit"] .audit-observation-total {
  flex: 0 0 auto;
  color: #536b85;
  font-size: .8rem;
  font-weight: 700;
  white-space: nowrap;
  padding: 6px 10px;
  border: 1px solid #dce5ee;
  border-radius: 999px;
  background: #f5f8fc;
}

#page[data-sicas-view="audit"] .audit-observation-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

#page[data-sicas-view="audit"] .audit-observation-kpi {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  padding: 15px;
  border: 1px solid #dce5ee;
  border-top: 4px solid #3479b8;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(23, 43, 70, .045);
}

#page[data-sicas-view="audit"] .audit-observation-blue {
  border-top-color: #3479b8;
}

#page[data-sicas-view="audit"] .audit-observation-red {
  border-top-color: #bd6873;
}

#page[data-sicas-view="audit"] .audit-observation-amber {
  border-top-color: #d99a27;
}

#page[data-sicas-view="audit"] .audit-observation-violet {
  border-top-color: #8065c8;
}

#page[data-sicas-view="audit"] .audit-observation-kpi-label {
  color: #65778b;
  font-size: .82rem;
  font-weight: 650;
}

#page[data-sicas-view="audit"] .audit-observation-kpi-value {
  color: #1d3552;
  font-size: clamp(1.55rem, 2.1vw, 2rem);
  font-weight: 800;
  line-height: 1.12;
  font-variant-numeric: tabular-nums;
}

#page[data-sicas-view="audit"] .audit-observation-kpi-note {
  color: #718197;
  font-size: .77rem;
  line-height: 1.45;
}

#page[data-sicas-view="audit"] .audit-observation-filters {
  display: grid;
  grid-template-columns: minmax(230px, 1.4fr) repeat(2, minmax(170px, .8fr));
  align-items: end;
  gap: 12px;
  margin: 0;
  padding: 15px;
  border-top: 3px solid #3479b8;
}

#page[data-sicas-view="audit"] .audit-observation-filter {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  color: #405771;
  font-size: .82rem;
  font-weight: 650;
}

#page[data-sicas-view="audit"] .audit-observation-filter input,
#page[data-sicas-view="audit"] .audit-observation-filter select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 40px;
  border: 1px solid #d4deea;
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
  font: inherit;
  font-weight: 400;
}

#page[data-sicas-view="audit"] .audit-observations-panel {
  min-width: 0;
  margin: 0;
  padding: 16px;
}

#page[data-sicas-view="audit"] .audit-observations-table-heading {
  align-items: center;
  margin-bottom: 12px;
}

#page[data-sicas-view="audit"] .audit-observations-table .tablewrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid #dce5ee;
  border-radius: 9px;
  background: #fff;
}

#page[data-sicas-view="audit"] .audit-observations-table .tablewrap > table {
  width: 100%;
  min-width: 1120px;
  max-width: none;
  table-layout: fixed;
  border: 0;
  border-collapse: separate;
  border-spacing: 0;
  box-shadow: none;
}

#page[data-sicas-view="audit"] .audit-observations-table .tablewrap th,
#page[data-sicas-view="audit"] .audit-observations-table .tablewrap td {
  padding: 12px 13px;
  vertical-align: middle;
  white-space: normal;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

#page[data-sicas-view="audit"] .audit-observations-table .tablewrap th {
  background: #edf3f9;
  color: #284666;
  font-size: .78rem;
  font-weight: 750;
}

#page[data-sicas-view="audit"] .audit-observations-table .tablewrap tr:nth-child(even) td {
  background: #f8fafc;
}

#page[data-sicas-view="audit"] .audit-observations-table .tablewrap tr:hover td {
  background: #eef6fd;
}

#page[data-sicas-view="audit"] .audit-observations-table th:nth-child(1),
#page[data-sicas-view="audit"] .audit-observations-table td:nth-child(1) {
  width: 65px;
}

#page[data-sicas-view="audit"] .audit-observations-table th:nth-child(2),
#page[data-sicas-view="audit"] .audit-observations-table td:nth-child(2) {
  width: 105px;
}

#page[data-sicas-view="audit"] .audit-observations-table th:nth-child(3),
#page[data-sicas-view="audit"] .audit-observations-table td:nth-child(3) {
  width: 390px;
}

#page[data-sicas-view="audit"] .audit-observations-table th:nth-child(4),
#page[data-sicas-view="audit"] .audit-observations-table td:nth-child(4) {
  width: 180px;
}

#page[data-sicas-view="audit"] .audit-observations-table th:nth-child(5),
#page[data-sicas-view="audit"] .audit-observations-table td:nth-child(5) {
  width: 130px;
}

#page[data-sicas-view="audit"] .audit-observations-table th:nth-child(6),
#page[data-sicas-view="audit"] .audit-observations-table td:nth-child(6) {
  width: 145px;
}

#page[data-sicas-view="audit"] .audit-observations-table th:nth-child(7),
#page[data-sicas-view="audit"] .audit-observations-table td:nth-child(7) {
  width: 210px;
}

#page[data-sicas-view="audit"] .audit-observation-description {
  color: #30465e;
  line-height: 1.5;
}

#page[data-sicas-view="audit"] .audit-observation-description > strong {
  font-weight: 650;
}

#page[data-sicas-view="audit"] .audit-observation-description > p {
  margin: 6px 0 0;
  font-size: .8rem;
}

#page[data-sicas-view="audit"] .audit-observation-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

#page[data-sicas-view="audit"] .audit-observation-actions button {
  margin: 0;
  white-space: normal;
}

@media (max-width: 1000px) {
  #page[data-sicas-view="audit"] .audit-observation-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #page[data-sicas-view="audit"] .audit-observation-filters {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  #page[data-sicas-view="audit"] .audit-observations-heading,
  #page[data-sicas-view="audit"] .audit-observations-table-heading {
    flex-direction: column;
    align-items: stretch;
  }

  #page[data-sicas-view="audit"] .audit-observations-panel {
    padding: 12px;
  }

  #page[data-sicas-view="audit"] .audit-observation-kpi {
    padding: 12px;
  }
}

/* SICAS-CEDULA-LAYOUT-ISOLATION-20261014-v1 */

/* Sistemas: la tabla conserva sus nueve columnas específicas. */
#page[data-sicas-view="audit"] .grid-wrap.audit-system-questionnaire {
  max-height: 68vh;
  overflow: auto !important;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

/* Cédulas financieras: columnas dinámicas y desplazamiento independiente. */
#page[data-sicas-view="audit"] .grid-wrap.audit-financial-worksheet {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  max-height: 68vh;
  overflow: auto !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  border: 1px solid #dce5ee;
  border-radius: 10px;
  background: #fff;
}

#page[data-sicas-view="audit"] .grid-wrap.audit-financial-worksheet > table {
  display: table !important;
  width: max-content !important;
  min-width: 100% !important;
  max-width: none !important;
  table-layout: auto !important;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
}

#page[data-sicas-view="audit"] .grid-wrap.audit-financial-worksheet th,
#page[data-sicas-view="audit"] .grid-wrap.audit-financial-worksheet td {
  box-sizing: border-box;
  padding: 10px 12px;
  vertical-align: top;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  line-height: 1.45;
}

#page[data-sicas-view="audit"] .grid-wrap.audit-financial-worksheet thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #edf3f9;
  color: #284666;
  white-space: normal;
}

/* Primera columna: referencia del ítem. */
#page[data-sicas-view="audit"] .grid-wrap.audit-financial-worksheet
  th:first-child,
#page[data-sicas-view="audit"] .grid-wrap.audit-financial-worksheet
  td:first-child {
  width: 115px;
  min-width: 115px;
}

/* Columnas dinámicas de criterios: más espacio y sin anchuras fijas
   heredadas del cuestionario de Sistemas. */
#page[data-sicas-view="audit"] .grid-wrap.audit-financial-worksheet
  th:nth-child(n+2):nth-last-child(n+6),
#page[data-sicas-view="audit"] .grid-wrap.audit-financial-worksheet
  td:nth-child(n+2):nth-last-child(n+6) {
  width: 125px;
  min-width: 125px;
}

/* Las cinco columnas finales siempre conservan espacio para editar. */
#page[data-sicas-view="audit"] .grid-wrap.audit-financial-worksheet
  :is(th, td):nth-last-child(5) {
  width: 85px;
  min-width: 85px;
}

#page[data-sicas-view="audit"] .grid-wrap.audit-financial-worksheet
  :is(th, td):nth-last-child(4) {
  width: 90px;
  min-width: 90px;
}

#page[data-sicas-view="audit"] .grid-wrap.audit-financial-worksheet
  :is(th, td):nth-last-child(3) {
  width: 245px;
  min-width: 245px;
}

#page[data-sicas-view="audit"] .grid-wrap.audit-financial-worksheet
  :is(th, td):nth-last-child(2) {
  width: 250px;
  min-width: 250px;
}

#page[data-sicas-view="audit"] .grid-wrap.audit-financial-worksheet
  :is(th, td):last-child {
  width: 155px;
  min-width: 155px;
}

#page[data-sicas-view="audit"] .grid-wrap.audit-financial-worksheet select {
  box-sizing: border-box;
  width: 100%;
  min-width: 80px;
  max-width: 100%;
}

#page[data-sicas-view="audit"] .grid-wrap.audit-financial-worksheet textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 220px;
  max-width: 100%;
  min-height: 76px;
}

@media (max-width: 720px) {
  #page[data-sicas-view="audit"] .grid-wrap.audit-financial-worksheet,
  #page[data-sicas-view="audit"] .grid-wrap.audit-system-questionnaire {
    max-height: 65vh;
  }
}

/* SICAS-ACCOUNT-NOTIFICATIONS-20261014-v1 */
.account-menu { position: relative; flex: 0 0 auto; z-index: 60; }
.account-menu.hidden { display: none !important; }
.account-menu-toggle {
  display: inline-flex; align-items: center; gap: 9px; max-width: min(420px, 42vw);
  padding: 8px 11px; border: 1px solid rgba(122, 145, 171, .34); border-radius: 11px;
  background: #fff; color: #233c59; font: inherit; cursor: pointer;
  box-shadow: 0 2px 7px rgba(31, 56, 100, .06);
}
.account-menu-toggle #whoami { max-width: 260px; min-width: 0; padding: 0; border: 0; white-space: normal; text-align: left; }
.account-chevron { color: #667b92; font-size: 1.1rem; }
.notification-count {
  display: inline-flex; min-width: 21px; height: 21px; padding: 0 6px; align-items: center; justify-content: center;
  border-radius: 999px; color: #fff; background: #b53f46; font-size: .72rem; font-weight: 800;
}
.notification-count.hidden { display: none !important; }
.account-menu-panel {
  position: absolute; top: calc(100% + 9px); right: 0; width: 260px; padding: 7px;
  display: grid; gap: 3px; border: 1px solid #dbe3ed; border-radius: 14px; background: #fff;
  box-shadow: 0 14px 36px rgba(21, 42, 67, .18); z-index: 100;
}
.account-menu-panel.hidden { display: none !important; }
.account-menu-panel button {
  display: flex; align-items: center; width: 100%; text-align: left; gap: 10px;
  border: 0; border-radius: 8px; padding: 10px 12px; color: #263e58; background: transparent;
  font: inherit; font-size: .9rem; cursor: pointer; box-shadow: none;
}
.account-menu-panel button:hover { background: #eff4fa; }
.account-menu-panel #btn-logout { margin-top: 2px; background: #b53f46; color: #fff; }
.account-settings-summary dl { display: grid; grid-template-columns: 100px minmax(0,1fr); gap: 7px 12px; }
.account-settings-summary dt { color: #64778c; font-weight: 700; }
.account-settings-summary dd { margin: 0; overflow-wrap: anywhere; }
.notification-center { display: grid; gap: 14px; }
.notification-center-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.notification-center-toolbar button.is-active { background: #1f3864; color: #fff; }
.notification-list { display: grid; gap: 10px; }
.notification-toast {
  position: fixed; z-index: 200; right: 22px; bottom: 22px; width: min(420px, calc(100vw - 28px));
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  padding: 15px; border: 1px solid #cbd8e6; border-left: 4px solid #315d91; border-radius: 13px;
  background: #fff; color: #263e58; box-shadow: 0 14px 38px rgba(21, 42, 67, .2);
}
.notification-toast.hidden { display: none !important; }
.notification-toast-copy { display: grid; gap: 4px; min-width: 0; }
.notification-toast-copy strong { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: #315d91; }
.notification-toast-copy span { font-weight: 750; }
.notification-toast-copy p { margin: 0; font-size: .86rem; color: #61758a; overflow-wrap: anywhere; }
.notification-toast-actions { display: flex; gap: 5px; align-items: start; }
.notification-toast-actions button { flex: 0 0 auto; padding: 6px 8px; font-size: .76rem; }
.notification-toast-actions .notification-toast-dismiss { background: transparent; border: 0; box-shadow: none; color: #61758a; font-size: 1.25rem; padding: 0 4px; }
.notification-item { padding: 15px 17px; border: 1px solid #dbe3ed; border-radius: 12px; background: #fff; box-shadow: 0 2px 7px rgba(31, 56, 100, .045); }
.notification-item.is-unread { border-left: 4px solid #315d91; }
.notification-item.is-unattended { border-right: 3px solid #c58b20; }
.notification-item-header { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.notification-item h3 { margin: 0; font-size: 1rem; }
.notification-item .notification-message { margin: 8px 0; white-space: pre-wrap; overflow-wrap: anywhere; color: #4c6075; }
.notification-meta { color: #708196; font-size: .78rem; }
.notification-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.notification-actions button { padding: 7px 10px; font-size: .82rem; }
@media (max-width: 760px) {
  .account-menu { margin-left: auto; }
  .account-menu-toggle { max-width: 88vw; }
  .account-menu-toggle #whoami { max-width: 58vw; }
  .account-menu-panel { right: 0; width: min(280px, 88vw); }
}

/* SICAS-ACCOUNT-DROPDOWN-POLISH-20261015-v1 */
/* Alcance intencional: solo el botón y el menú de cuenta del encabezado. */
#account-menu {
  position: relative;
  isolation: isolate;
  z-index: 120;
  flex: 0 0 auto;
}

#account-menu #account-menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  max-width: min(430px, 44vw);
  padding: 10px 15px;
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 15px;
  background: linear-gradient(135deg, #2e557e 0%, #203f63 100%);
  color: #fff;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 5px 16px rgba(26, 59, 91, .16);
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}

#account-menu #account-menu-toggle:hover {
  box-shadow: 0 8px 21px rgba(26, 59, 91, .22);
  border-color: rgba(255, 255, 255, .48);
}

#account-menu #account-menu-toggle:active { transform: translateY(1px); }
#account-menu #account-menu-toggle:focus-visible,
#account-menu .account-menu-panel button:focus-visible {
  outline: 3px solid #66c9d6;
  outline-offset: 3px;
}

#account-menu #account-menu-toggle #whoami {
  display: block;
  min-width: 0;
  max-width: min(330px, 35vw);
  padding: 0;
  border: 0;
  color: #fff;
  font-size: .94rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}

#account-menu .account-chevron {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, .88);
  font-size: 1.15rem;
  line-height: 1;
  transition: transform .18s ease;
}

#account-menu #account-menu-toggle[aria-expanded="true"] .account-chevron {
  transform: rotate(180deg);
}

#account-menu #notification-badge {
  flex: 0 0 auto;
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #25486d;
  border-radius: 999px;
  background: #d94d58;
  color: #fff;
  font-size: .7rem;
  font-weight: 800;
  line-height: 1;
}

#account-menu #notification-badge.hidden { display: none !important; }

#account-menu #account-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(318px, calc(100vw - 24px));
  max-height: min(70vh, 420px);
  overflow-y: auto;
  display: grid;
  gap: 3px;
  padding: 8px;
  border: 1px solid #d9e3ed;
  border-radius: 16px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 18px 46px rgba(23, 48, 75, .21), 0 3px 9px rgba(23, 48, 75, .07);
  backdrop-filter: blur(12px);
  z-index: 999;
  transform-origin: top right;
}

#account-menu #account-menu-panel.hidden { display: none !important; }
#account-menu #account-menu-panel:not(.hidden) { animation: sicas-account-menu-in .16s ease-out both; }

@keyframes sicas-account-menu-in {
  from { opacity: 0; transform: translateY(-5px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

#account-menu #account-menu-panel button,
#account-menu #account-menu-panel button.secondary,
#account-menu #account-menu-panel button.small {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #294662;
  font: inherit;
  font-size: .91rem;
  font-weight: 550;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
  box-shadow: none;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}

#account-menu #account-menu-panel button::before {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  border-radius: 8px;
  background: #edf3f9;
  color: #315b81;
  font-size: 1rem;
  line-height: 1;
}

#account-menu #btn-settings::before { content: "⚙"; }
#account-menu #btn-notifications::before { content: "●"; font-size: .72rem; }
#account-menu #btn-logout::before { content: "↪"; font-size: 1.12rem; }

#account-menu #account-menu-panel button:hover {
  background: #f0f5fa;
  border-color: #e1eaf3;
  color: #193b5b;
}
#account-menu #account-menu-panel button:active { transform: scale(.992); }

#account-menu #account-menu-panel #btn-logout {
  margin-top: 5px;
  padding-top: 11px;
  border-top: 1px solid #edf0f4;
  border-radius: 10px;
  background: #fff5f5;
  color: #a6333b;
}
#account-menu #account-menu-panel #btn-logout::before {
  background: #fbe2e3;
  color: #a6333b;
}
#account-menu #account-menu-panel #btn-logout:hover {
  background: #fbe7e8;
  border-color: #f2d2d4;
  color: #8e2730;
}

@media (max-width: 760px) {
  #account-menu { max-width: calc(100vw - 30px); }
  #account-menu #account-menu-toggle {
    width: min(100%, 430px);
    max-width: calc(100vw - 30px);
    min-height: 50px;
    padding: 9px 12px;
    border-radius: 13px;
  }
  #account-menu #account-menu-toggle #whoami {
    max-width: calc(100vw - 105px);
    font-size: .88rem;
  }
  #account-menu #account-menu-panel {
    right: 0;
    width: min(318px, calc(100vw - 30px));
    max-height: 65vh;
  }
  #account-menu #account-menu-panel button { min-height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  #account-menu #account-menu-toggle,
  #account-menu .account-chevron,
  #account-menu #account-menu-panel button { transition: none; }
  #account-menu #account-menu-panel:not(.hidden) { animation: none; }
}

/* ---- Resumen de auditoría (2026-10-25): resultado, indicadores, datos y evolución ---- */
#page[data-sicas-view="audit"] .audit-phase-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 16px;
}
#page[data-sicas-view="audit"] .audit-phase-bar .stepper { margin: 0; flex: 1 1 420px; }
#page[data-sicas-view="audit"] .audit-section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 12px; }
#page[data-sicas-view="audit"] .audit-section-head h3 { margin: 0; }
#page[data-sicas-view="audit"] .audit-section-head p { margin: 0; font-size: .82rem; }

#page[data-sicas-view="audit"] .audit-hero {
  display: grid; grid-template-columns: minmax(220px, .8fr) minmax(0, 1.6fr);
  gap: 18px 24px; margin: 0; padding: 20px;
  border-top: 4px solid #1f3864; border-radius: 14px;
}
#page[data-sicas-view="audit"] .audit-hero-main { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
#page[data-sicas-view="audit"] .audit-hero-label { color: #65778b; font-size: .82rem; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; }
#page[data-sicas-view="audit"] .audit-hero-score { color: #1d3552; font-size: clamp(2.2rem, 4vw, 3rem); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
#page[data-sicas-view="audit"] .audit-hero-note { color: #4f6378; font-size: .86rem; }
#page[data-sicas-view="audit"] .audit-hero-side { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-content: start; }
#page[data-sicas-view="audit"] .audit-hero-metric {
  display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 12px;
  border: 1px solid #e0e8f0; border-radius: 10px; background: #f8fafc;
}
#page[data-sicas-view="audit"] .audit-hero-metric > span { color: #697b8f; font-size: .78rem; font-weight: 650; }
#page[data-sicas-view="audit"] .audit-hero-metric > strong { color: #1d3552; font-size: 1.3rem; font-variant-numeric: tabular-nums; }
#page[data-sicas-view="audit"] .audit-hero-foot {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
  padding-top: 12px; border-top: 1px solid #e6edf4; font-size: .8rem;
}
#page[data-sicas-view="audit"] .audit-hero-foot button { margin-left: auto; }

#page[data-sicas-view="audit"] .audit-indicator-block + .audit-indicator-block { margin-top: 18px; }
#page[data-sicas-view="audit"] .audit-indicator-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
#page[data-sicas-view="audit"] .audit-indicator-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; }
#page[data-sicas-view="audit"] .audit-indicator {
  min-width: 0; padding: 14px 14px 12px; border: 1px solid #dce5ee; border-top: 4px solid #319c91;
  border-radius: 12px; background: #fff; box-shadow: 0 4px 14px rgba(23, 43, 70, .05);
}
#page[data-sicas-view="audit"] .audit-indicator .n { color: #1d3552; font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
#page[data-sicas-view="audit"] .audit-indicator .l { margin-top: 6px; color: #4f6378; font-size: .82rem; line-height: 1.3; }
#page[data-sicas-view="audit"] .audit-indicator.ind-controles_si { border-top-color: #2e8b57; }
#page[data-sicas-view="audit"] .audit-indicator.ind-controles_no,
#page[data-sicas-view="audit"] .audit-indicator.ind-brechas_alto { border-top-color: #b00020; }
#page[data-sicas-view="audit"] .audit-indicator.ind-brechas_medio { border-top-color: #b8860b; }

#page[data-sicas-view="audit"] .audit-summary-panel details { margin-top: 12px; }
#page[data-sicas-view="audit"] .audit-summary-panel details > summary { cursor: pointer; font-weight: 650; color: #1d3552; }

@media (max-width: 900px) {
  #page[data-sicas-view="audit"] .audit-hero { grid-template-columns: minmax(0, 1fr); }
  #page[data-sicas-view="audit"] .audit-hero-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #page[data-sicas-view="audit"] .audit-summary-layout { grid-template-columns: minmax(0, 1fr); }
  #page[data-sicas-view="audit"] .audit-hero-foot button { margin-left: 0; }
}
#page[data-sicas-view="audit"] .audit-team-list { display: grid; gap: 10px; }
#page[data-sicas-view="audit"] .audit-team-member {
  display: flex; align-items: center; gap: 12px; padding: 12px;
  border: 1px solid #e0e8f0; border-radius: 10px; background: #f8fafc;
}
#page[data-sicas-view="audit"] .audit-team-initials {
  flex: 0 0 42px; height: 42px; display: grid; place-items: center;
  border-radius: 50%; background: #1f3864; color: #fff; font-weight: 750; letter-spacing: .03em;
}
#page[data-sicas-view="audit"] .audit-team-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
#page[data-sicas-view="audit"] .audit-team-info > span { font-size: .85rem; }
#page[data-sicas-view="audit"] .audit-phase-scores { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 12px; }
#page[data-sicas-view="audit"] .audit-phase-score {
  display: flex; flex-direction: column; gap: 5px; padding: 14px; border: 1px solid #dce5ee;
  border-top: 4px solid #9fb3c8; border-radius: 12px; background: #fff;
}
#page[data-sicas-view="audit"] .audit-phase-score > span:first-child { color: #4f6378; font-size: .82rem; font-weight: 650; }
#page[data-sicas-view="audit"] .audit-phase-score > strong { color: #1d3552; font-size: 1.6rem; font-variant-numeric: tabular-nums; }
#page[data-sicas-view="audit"] .audit-phase-score.current { border-top-color: #3479b8; background: #f5f9fd; }
#page[data-sicas-view="audit"] .audit-phase-score.final { border-top-color: #1f3864; background: #eef3fa; }
#page[data-sicas-view="audit"] tr.audit-row-muted td { opacity: .62; }

/* Paginación de tablas (máximo 10 filas por página) */
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin: 8px 0 4px; flex-wrap: wrap; }
.pager .pager-info { color: #4f6378; font-size: .85rem; font-variant-numeric: tabular-nums; }
.pager button[disabled] { opacity: .45; cursor: default; }
tr[hidden] { display: none; }

/* Vista previa de firmas escaneadas */
.sig-preview { display: block; max-height: 48px; max-width: 180px; background: #fff; border: 1px solid #e0e8f0; border-radius: 4px; }

/* Horario laboral: aviso de cierre y horas extras */
.schedule-banner { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 900; max-width: min(720px, calc(100vw - 32px));
  padding: 10px 16px; border-radius: 10px; font-weight: 600; box-shadow: 0 6px 20px rgba(15, 30, 60, .18); background: #eef3fa; color: #1d3552; }
.schedule-banner.warning { background: #fff4d6; color: #6b4a00; border: 1px solid #f0c75e; }
.schedule-banner[hidden] { display: none; }

/* Cuestionarios por bloques (LOPCYMAT, servicios en sucursales, cartelera fiscal, ADS) */
#page[data-sicas-view="audit"] .grid-wrap.audit-questionnaire > table { width: 100%; table-layout: fixed; }
#page[data-sicas-view="audit"] .grid-wrap.audit-questionnaire th:nth-child(1) { width: 92px; }
#page[data-sicas-view="audit"] .grid-wrap.audit-questionnaire th:nth-child(3) { width: 150px; }
#page[data-sicas-view="audit"] .grid-wrap.audit-questionnaire th:nth-child(4) { width: 32%; }
#page[data-sicas-view="audit"] .grid-wrap.audit-questionnaire th:nth-child(5) { width: 96px; }
#page[data-sicas-view="audit"] .grid-wrap.audit-questionnaire td { vertical-align: top; white-space: normal; }
#page[data-sicas-view="audit"] .grid-wrap.audit-questionnaire textarea { width: 100%; min-height: 54px; }
#page[data-sicas-view="audit"] .grid-wrap.audit-questionnaire tr.audit-q-block td { background: #eef2f8; color: #1f3556; }
.q-risk { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.q-risk-BAJO { background: #d7f0df; color: #1e6b3a; }
.q-risk-MEDIO { background: #fff1c2; color: #7a5a00; }
.q-risk-ALTO { background: #f8d4d4; color: #9b1c1c; }

/* Calendario interactivo de feriados (Horas extras y Horario laboral) */
#page .holiday-cal { margin: 8px 0 16px; }
#page .holiday-cal .cal-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
#page .holiday-cal .cal-title { font-size: 18px; min-width: 150px; text-align: center; color: #1f3556; }
#page .holiday-cal .cal-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: #4a5a70; margin-bottom: 8px; }
#page .holiday-cal .cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
#page .holiday-cal .sw { width: 14px; height: 14px; border-radius: 4px; display: inline-block; border: 1px solid #d5dce8; background: #fff; }
#page .holiday-cal .months { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
#page .holiday-cal .month { background: #fff; border: 1px solid #dde4ef; border-radius: 12px; padding: 10px; }
#page .holiday-cal .month.big { max-width: 760px; }
#page .holiday-cal .mname { all: unset; cursor: pointer; display: flex; justify-content: space-between; align-items: center; width: 100%; font-weight: 700; color: #1f3556; margin-bottom: 6px; }
#page .holiday-cal .mname:hover, #page .holiday-cal .mname:focus-visible { text-decoration: underline; }
#page .holiday-cal .mname .cnt { font-size: 11px; background: #f8d4d4; color: #9b1c1c; border-radius: 999px; padding: 1px 8px; }
#page .holiday-cal .grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
#page .holiday-cal .wd { font-size: 11px; color: #7a8699; text-align: center; padding-bottom: 2px; }
#page .holiday-cal .day { all: unset; box-sizing: border-box; cursor: pointer; text-align: center; font-size: 12px; padding: 5px 0; border-radius: 6px; background: #f7f9fc; color: #22324a; }
#page .holiday-cal .month.big .day { min-height: 72px; text-align: left; padding: 6px 8px; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
#page .holiday-cal .month.big .day .lbl { font-size: 11px; line-height: 1.25; font-weight: 600; }
#page .holiday-cal .day:hover, #page .holiday-cal .day:focus-visible { outline: 2px solid #4a6fa5; outline-offset: -2px; }
#page .holiday-cal .weekend, #page .holiday-cal .sw.weekend { background: #eceff4; color: #8a94a6; }
#page .holiday-cal .hol-fixed, #page .holiday-cal .sw.hol-fixed { background: #f8d4d4; color: #9b1c1c; font-weight: 700; }
#page .holiday-cal .hol-movable, #page .holiday-cal .sw.hol-movable { background: #fde4c8; color: #8a4a00; font-weight: 700; }
#page .holiday-cal .hol-decree, #page .holiday-cal .sw.hol-decree { background: #e3d7f5; color: #4b2a85; font-weight: 700; }
#page .holiday-cal .hol-off, #page .holiday-cal .sw.hol-off { background: #fff; color: #22324a; border: 1px dashed #c0392b; text-decoration: line-through; }
#page .holiday-cal .today, #page .holiday-cal .sw.today { box-shadow: inset 0 0 0 2px #1f3556; }
#page .holiday-cal .hol-list { margin-top: 10px; }
#page .holiday-cal button.day, #page .holiday-cal button.mname { min-height: 0; box-shadow: none; transform: none; font-family: inherit; }
#page .holiday-cal button.day { background: #f7f9fc !important; color: #22324a !important; border: 1px solid transparent !important; font-weight: 500; }
#page .holiday-cal button.day.weekend { background: #eceff4 !important; color: #8a94a6 !important; }
#page .holiday-cal button.day.hol-fixed { background: #f8d4d4 !important; color: #9b1c1c !important; font-weight: 700; }
#page .holiday-cal button.day.hol-movable { background: #fde4c8 !important; color: #8a4a00 !important; font-weight: 700; }
#page .holiday-cal button.day.hol-decree { background: #e3d7f5 !important; color: #4b2a85 !important; font-weight: 700; }
#page .holiday-cal button.day.hol-off { background: #fff !important; border: 1px dashed #c0392b !important; text-decoration: line-through; }
#page .holiday-cal button.day.today { box-shadow: inset 0 0 0 2px #1f3556 !important; }
#page .holiday-cal button.day:hover, #page .holiday-cal button.day:focus-visible { outline: 2px solid #4a6fa5; outline-offset: -2px; }
#page .holiday-cal button.mname { background: transparent !important; color: #1f3556 !important; border: 0 !important; padding: 0 !important; }
#page .holiday-cal .month.big button.day { min-height: 72px; }

/* Evaluación TI de sucursales */
#page .ti-filters { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; }
#page .ti-filters label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; min-width: 150px; }
#page .ti-chart { width: 100%; max-width: 900px; height: auto; }
#page .ti-chart .grid { stroke: #e3e8f0; }
#page .ti-chart .axis, #page .ti-chart .val { font-size: 11px; fill: #4a5a70; }
#page .ti-chart .lbl { font-size: 12px; fill: #22324a; }
.overlay.wide .modal { max-width: min(1100px, 96vw); width: 96vw; }
.ti-interview table.ti-form { width: 100%; }
.ti-interview table.ti-form td { vertical-align: top; }
.ti-interview table.ti-form input { width: 100%; }
.overlay.wide .modal { max-height: 92vh; overflow: auto; }
#page .ti-page .cal-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: #4a5a70; margin-top: 6px; }
#page .ti-page .cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
#page .ti-page .sw { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.ti-interview table.ti-form td.res-CUMPLE { background: #d7f0df !important; }
.ti-interview table.ti-form td.res-NO_CUMPLE { background: #f8d4d4 !important; }

/* Auditoría de Sistemas, fases 2 y 3: controles de la carta de documentación */
#page .audit-letter td { vertical-align: top; }
#page .audit-letter textarea { min-width: 220px; min-height: 64px; }
#page .audit-letter .letter-qs { display: grid; gap: 6px; }
#page .audit-letter .letter-q { display: grid; grid-template-columns: 1fr 90px; gap: 8px; align-items: center; font-size: .85rem; }
#page .audit-letter .letter-docs { display: grid; gap: 2px; margin-bottom: 6px; font-size: .82rem; }
#page .audit-letter .letter-outcome { font-weight: 600; }
#page .audit-letter td.res-CUMPLE { background: #d7f0df !important; }
#page .audit-letter td.res-NO_CUMPLE { background: #f8d4d4 !important; }
#page .audit-letter select { min-width: 200px; }

/* Inicio: brechas altas y medias por dominio (interactivo) */
#page > .home-dashboard .home-severity-panel { grid-column: 1 / -1; }
#page .home-severity-panel .home-panel-note { margin: 8px 0 0; }
#page .home-severity-panel .home-donut-layout { grid-template-columns: minmax(170px, 240px) minmax(0, 1fr); gap: 28px; }
#page .home-gap-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
#page .home-gap-tab { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid #d6e0eb; border-radius: 999px; background: #fff; color: #3d5673; font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; }
#page .home-gap-tab:hover { border-color: #9fb4cc; }
#page .home-gap-tab.is-active { background: #1d385a; border-color: #1d385a; color: #fff; }
#page .home-gap-tab-count { padding: 1px 7px; border-radius: 999px; background: rgba(29, 56, 90, .08); font-variant-numeric: tabular-nums; }
#page .home-gap-tab.is-active .home-gap-tab-count { background: rgba(255, 255, 255, .2); }
#page .home-gap-ring { position: relative; width: min(100%, 230px); aspect-ratio: 1; margin-inline: auto; }
#page .home-gap-ring svg { width: 100%; height: 100%; display: block; }
#page .home-gap-ring .home-donut-center { position: absolute; inset: 0; margin: auto; width: 58%; height: 58%; pointer-events: none; }
#page .home-gap-arc { cursor: pointer; transition: stroke-width .15s, opacity .15s; outline: none; }
#page .home-gap-arc:hover, #page .home-gap-arc:focus-visible { stroke-width: 22px; }
#page .home-gap-arc.is-dim { opacity: .35; }
#page .home-severity-panel button.home-donut-row { width: 100%; border: 0; border-bottom: 1px solid #edf1f6; background: none; font: inherit; font-size: .84rem; text-align: left; cursor: pointer; border-radius: 6px; padding-inline: 6px; }
#page .home-severity-panel button.home-donut-row:hover { background: #f4f7fb; }
#page .home-severity-panel .home-gap-sev.is-active { background: #eef3f9; box-shadow: inset 3px 0 0 #1d385a; }
#page .home-severity-panel .home-gap-sev.is-dim { opacity: .55; }
#page .home-gap-table-wrap { margin-top: 12px; max-height: 300px; overflow-y: auto; }
#page .home-gap-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
#page .home-gap-table th { position: sticky; top: 0; background: #fff; padding: 8px 6px; text-align: left; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #6b7a90; border-bottom: 1px solid #e3e9f1; }
#page .home-gap-table th.is-key { color: #1d385a; }
#page .home-gap-table td { padding: 9px 6px; border-bottom: 1px solid #edf1f6; color: #3d5673; }
#page .home-gap-table .num { width: 64px; text-align: right; font-variant-numeric: tabular-nums; }
#page .home-gap-table td.num { font-weight: 700; color: #233e5d; }
#page .home-gap-unit { cursor: pointer; }
#page .home-gap-unit:hover td { background: #f4f7fb; }
#page .home-gap-unit.is-active td { background: #eef3f9; }
#page .home-gap-unit.is-active td:first-child { box-shadow: inset 3px 0 0 #1d385a; }
#page .home-gap-audits { display: grid; gap: 6px; margin-top: 16px; padding-top: 14px; border-top: 1px solid #edf1f6; }
#page .home-gap-audits-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .86rem; color: #1d385a; }
#page .home-gap-audit { display: grid; grid-template-columns: minmax(130px, auto) minmax(0, 1fr) 44px 44px; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid #e6edf4; border-radius: 8px; background: #fff; font: inherit; font-size: .82rem; text-align: left; cursor: pointer; }
#page .home-gap-audit:hover { border-color: #9fb4cc; background: #f8fafd; }
#page .home-gap-audit-code { font-weight: 700; color: #1d385a; }
#page .home-gap-audit-unit { color: #5d7088; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#page .home-gap-pill { justify-self: end; min-width: 34px; padding: 2px 8px; border-radius: 999px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
#page .home-gap-pill.alto { background: #fbe3e7; color: #a32a3e; }
#page .home-gap-pill.medio { background: #fbf1d8; color: #8a6510; }
#page .home-gap-clear { justify-self: start; border: 0; background: none; padding: 4px 0; color: #2f6db5; font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; }
@media (max-width: 620px) {
  #page .home-severity-panel .home-donut-layout { grid-template-columns: minmax(0, 1fr); }
  #page .home-gap-audit { grid-template-columns: minmax(0, 1fr) 40px 40px; }
  #page .home-gap-audit-unit { grid-column: 1 / -1; grid-row: 2; }
}

/* Indicadores de carga: barra superior, spinner en botones, esqueleto de pantalla y entrada suave */
#sicas-loadbar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 10000; overflow: hidden; opacity: 0;
  pointer-events: none; transition: opacity .2s ease; background: rgba(31, 56, 100, .12); }
#sicas-loadbar.on { opacity: 1; }
#sicas-loadbar::before { content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 40%;
  background: linear-gradient(90deg, transparent, #2f6db5, #3aa0a0, transparent); animation: sicas-loadbar 1.1s ease-in-out infinite; }
@keyframes sicas-loadbar { from { left: -40%; } to { left: 100%; } }

button.is-loading { cursor: progress; opacity: .85; }
button.is-loading::before { content: ""; display: inline-block; width: .85em; height: .85em; margin-right: .45em;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -.12em;
  animation: sicas-spin .7s linear infinite; }
@keyframes sicas-spin { to { transform: rotate(360deg); } }

.sicas-loading { padding: 18px 2px; animation: sicas-fade .25s ease both; }
.sicas-loading-head { display: flex; align-items: center; gap: 10px; color: #5d7088; font-size: .92rem; margin-bottom: 16px; }
.sicas-spinner { width: 18px; height: 18px; border: 2.5px solid #c9d6e6; border-top-color: var(--navy); border-radius: 50%;
  animation: sicas-spin .8s linear infinite; flex: 0 0 auto; }
.sicas-skeleton { display: grid; gap: 12px; max-width: 920px; }
.sicas-skeleton .sk { display: block; border-radius: 8px; height: 14px;
  background: linear-gradient(90deg, #e7edf4 25%, #f3f6fa 37%, #e7edf4 63%); background-size: 400% 100%;
  animation: sicas-shimmer 1.4s ease infinite; }
.sicas-skeleton .sk-title { height: 26px; width: 38%; }
.sicas-skeleton .sk-line { width: 72%; } .sicas-skeleton .sk-line.short { width: 48%; }
.sicas-skeleton .sk-block { height: 160px; margin-top: 6px; }
@keyframes sicas-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

.sicas-page-enter { animation: sicas-fade .28s ease both; }
@keyframes sicas-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  #sicas-loadbar::before { animation: none; left: 0; width: 100%; opacity: .6; }
  button.is-loading::before, .sicas-spinner { animation-duration: 2s; }
  .sicas-skeleton .sk, .sicas-loading, .sicas-page-enter { animation: none; }
}

/* MENÚ LATERAL AGRUPADO (20261103): secciones plegables, íconos y desplegable en móvil. */
#nav .sicas-nav-mobile { display: none !important; }
#nav .sicas-nav-group { display: flex; flex-direction: column; gap: 2px; }
#nav .sicas-nav-group + .sicas-nav-group { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,.07); }
#nav .sicas-nav-items { display: flex; flex-direction: column; gap: 2px; }
#nav .sicas-nav-group.folded .sicas-nav-items { display: none; }
#nav button.sicas-nav-group-head {
  justify-content: space-between;
  padding: 6px 11px 4px !important;
  min-height: 0;
  color: var(--cc-sidebar-muted, #93a6bf) !important;
  font-size: .66rem;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
}
#nav button.sicas-nav-group-head:hover:not(:disabled) { color: #e5edf7 !important; background: transparent !important; }
#nav .sicas-nav-chevron { width: 7px; height: 7px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg); margin: -3px 3px 0; transition: transform .15s ease; flex: none; }
#nav .sicas-nav-group.folded .sicas-nav-chevron { transform: rotate(-45deg); margin-top: 0; }
#nav [data-sicas-nav-item] { padding-block: 8px; }
#nav .sicas-nav-icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
#nav [data-sicas-nav-item].active .sicas-nav-icon { opacity: 1; }
#nav .sicas-nav-toggle { margin-bottom: 4px; }

/* Plegado: solo íconos; las secciones se reducen a separadores. */
#view-app.sicas-nav-collapsed #nav button.sicas-nav-group-head { display: none !important; }
#view-app.sicas-nav-collapsed #nav .sicas-nav-group.folded .sicas-nav-items { display: flex; }
#view-app.sicas-nav-collapsed #nav [data-sicas-nav-item].has-icon::after { display: none; }
#view-app.sicas-nav-collapsed #nav [data-sicas-nav-item].has-icon { min-height: 40px; }
#view-app.sicas-nav-collapsed #nav [data-sicas-nav-item].has-icon .sicas-nav-icon { width: 20px; height: 20px; }

@media (max-width: 760px) {
  #nav, #view-app.sicas-nav-collapsed #nav { flex-direction: column !important; align-items: stretch !important; overflow: visible !important; padding: 8px !important; gap: 0 !important; }
  #nav .sicas-nav-toggle { display: none !important; }
  #nav button.sicas-nav-mobile { display: flex !important; width: 100% !important; min-height: 44px; max-width: none !important; gap: 10px; font-weight: 650; color: #fff !important; }
  #nav .sicas-nav-mobile-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #nav .sicas-nav-burger, #nav .sicas-nav-burger::before, #nav .sicas-nav-burger::after { display: block; width: 16px; height: 2px; background: currentColor; border-radius: 2px; position: relative; flex: none; }
  #nav .sicas-nav-burger::before, #nav .sicas-nav-burger::after { content: ""; position: absolute; left: 0; }
  #nav .sicas-nav-burger::before { top: -5px; }
  #nav .sicas-nav-burger::after { top: 5px; }
  #nav.sicas-nav-open .sicas-nav-mobile .sicas-nav-chevron { transform: rotate(-135deg); margin-top: 3px; }
  #nav:not(.sicas-nav-open) .sicas-nav-group { display: none; }
  #nav.sicas-nav-open .sicas-nav-group:first-of-type { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,.07); }
  #nav .sicas-nav-group button, #view-app.sicas-nav-collapsed #nav [data-sicas-nav-item] { width: 100% !important; max-width: none !important; justify-content: flex-start !important; }
  #nav .sicas-nav-group button.sicas-nav-group-head { justify-content: space-between !important; }
  #view-app.sicas-nav-collapsed #nav button.sicas-nav-group-head { display: flex !important; }
  #view-app.sicas-nav-collapsed #nav .sicas-nav-group.folded .sicas-nav-items { display: none; }
  #view-app.sicas-nav-collapsed #nav .sicas-nav-label { display: inline !important; }
}

/* Registro de actividades (integración de Control de horas) */
.act-form [hidden] { display: none !important; }
.act-form label.act-check, .modal label.act-check { display: flex; align-items: center; gap: 8px; margin: 8px 0 12px; }
.act-form label.act-check input { width: auto; margin: 0; }

/* ===== Dashboard · Horas y actividades (gráficos SVG + barras HTML; colores por clase, sin estilos en línea) ===== */
:root {
  --viz-oficina: #2a78d6; --viz-sucursal: #eb6834; --viz-finca: #1baf7a; --viz-casa: #eda100; --viz-sin: #a3adb8;
  --viz-bar: #3567a0; --viz-exp: #5f6f82; --viz-abs: #93a3b6;
  --viz-st1: #d3deeb; --viz-st2: #93b2d6; --viz-st3: #5a86b8; --viz-st4: #294b70;
  --viz-good: #0ca30c; --viz-good-ink: #0a6e0a; --viz-warn: #fab219; --viz-warn-ink: #7a4f00; --viz-bad: #d03b3b; --viz-bad-ink: #a32727;
}
.viz-root { display: grid; gap: 16px; }
.viz-c-OFICINA { --c: var(--viz-oficina); } .viz-c-SUCURSAL { --c: var(--viz-sucursal); } .viz-c-FINCA { --c: var(--viz-finca); }
.viz-c-CASA { --c: var(--viz-casa); } .viz-c-SIN_INDICAR { --c: var(--viz-sin); } .viz-c-bar { --c: var(--viz-bar); }
.viz-c-exp { --c: var(--viz-exp); } .viz-c-abs { --c: var(--viz-abs); }
.viz-st-POR_INICIAR { --c: var(--viz-st1); } .viz-st-INICIADA { --c: var(--viz-st2); } .viz-st-SUSPENDIDA { --c: var(--viz-st3); } .viz-st-CULMINADA { --c: var(--viz-st4); }
.viz-sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--c, #999); flex: none; }
.viz-sw-line { height: 0; border-top: 2px dashed var(--viz-exp); background: none; border-radius: 0; width: 14px; vertical-align: middle; }
.viz-sw-target { width: 3px; height: 12px; border-radius: 2px; background: var(--cc-ink, #19283b); }

/* encabezado: indicador + cifras */
.viz-hero { display: grid; grid-template-columns: minmax(260px, 1fr) 2fr; gap: 16px; }
.viz-hero-gauge { display: flex; flex-direction: column; align-items: center; text-align: center; margin: 0; }
.viz-hero-gauge h3 { align-self: stretch; text-align: left; }
.viz-gauge-wrap { position: relative; width: min(100%, 300px); }
.viz-gauge { width: 100%; height: auto; display: block; overflow: visible; }
.viz-gauge-bg, .viz-gauge-val { fill: none; stroke-width: 18; stroke-linecap: round; }
.viz-gauge-bg { stroke: var(--cc-line, #e0e7ef); }
.viz-gauge-val { stroke-dasharray: var(--p, 0) 100; transition: stroke-dasharray 1.1s cubic-bezier(.2,.8,.2,1); }
.viz-gauge-val.viz-good { stroke: var(--viz-good); } .viz-gauge-val.viz-warn { stroke: var(--viz-warn); } .viz-gauge-val.viz-bad { stroke: var(--viz-bad); }
.viz-gauge-val.viz-none { stroke: transparent; }
.viz-gauge-tick { stroke: var(--cc-ink, #19283b); stroke-width: 2.5; stroke-linecap: round; }
.viz-gauge-ticklabel { font-size: 10px; fill: var(--cc-muted, #69798d); }
.viz-gauge-center { position: absolute; left: 0; right: 0; bottom: 4px; }
.viz-gauge-pct { font-size: 2.3rem; font-weight: 800; line-height: 1; color: var(--cc-ink, #19283b); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.viz-gauge-sub { font-size: .82rem; color: var(--cc-muted, #69798d); margin-top: 4px; }
.viz-chip { display: inline-flex; align-items: center; gap: 6px; margin: 10px 0 4px; padding: 4px 12px; border-radius: 999px; font-size: .82rem; font-weight: 700;
  background: var(--cc-canvas, #f3f6fa); color: var(--cc-muted, #69798d); }
.viz-chip-icon { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: #fff; font-size: .72rem; }
.viz-chip.viz-good { background: #e7f6e7; color: var(--viz-good-ink); } .viz-chip.viz-good .viz-chip-icon { background: var(--viz-good); }
.viz-chip.viz-warn { background: #fff4dc; color: var(--viz-warn-ink); } .viz-chip.viz-warn .viz-chip-icon { background: var(--viz-warn); color: #0b0b0b; }
.viz-chip.viz-bad { background: #fbe9e9; color: var(--viz-bad-ink); } .viz-chip.viz-bad .viz-chip-icon { background: var(--viz-bad); }
.viz-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.viz-kpi { background: var(--cc-surface, #fff); border: 1px solid var(--cc-line, #e0e7ef); border-radius: var(--cc-radius, 13px); padding: 16px 18px;
  box-shadow: var(--cc-shadow); display: flex; flex-direction: column; gap: 4px; transition: transform .18s ease, box-shadow .18s ease; }
.viz-kpi:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(25, 40, 59, .09); }
.viz-kpi-value { font-size: 1.85rem; font-weight: 800; color: var(--cc-ink, #19283b); line-height: 1.05; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.viz-kpi-label { font-weight: 700; color: var(--cc-ink, #19283b); font-size: .9rem; }
.viz-kpi-sub { color: var(--cc-muted, #69798d); font-size: .8rem; line-height: 1.35; }
.viz-kpi-attn { border-color: #f1d08a; background: linear-gradient(180deg, #fffaf0, #fff); }
.viz-kpi-attn .viz-kpi-value { color: var(--viz-warn-ink); }
.viz-mini { margin-top: 6px; height: 6px; border-radius: 999px; background: var(--cc-line, #e0e7ef); overflow: hidden; }
.viz-mini-fill { height: 100%; width: var(--w, 0%); background: var(--c); border-radius: 999px; }

/* leyendas */
.viz-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: .82rem; color: var(--cc-muted, #69798d); margin-bottom: 8px; }
.viz-legend span { display: inline-flex; align-items: center; gap: 6px; }
.viz-legend-note { margin-left: auto; font-style: italic; }

/* ritmo */
.viz-scroll { overflow-x: auto; }
.viz-rhythm { width: 100%; min-width: 520px; height: auto; display: block; }
.viz-grid { stroke: var(--cc-line, #e0e7ef); stroke-width: 1; }
.viz-axis { stroke: #c4cfdc; stroke-width: 1; }
.viz-tick { font-size: 11px; fill: var(--cc-muted, #69798d); font-variant-numeric: tabular-nums; }
.viz-bar { fill: var(--viz-bar); }
.viz-col.is-off .viz-tick { fill: #a6b2c0; }
.viz-hit { fill: transparent; cursor: crosshair; }
.viz-col:hover .viz-hit, .viz-col:focus .viz-hit { fill: rgba(41, 75, 112, .07); }
.viz-col:hover .viz-bar, .viz-col:focus .viz-bar { fill: #24507f; }
.viz-col:focus { outline: none; }
.viz-exp-line { fill: none; stroke: var(--viz-exp); stroke-width: 2; stroke-dasharray: 5 4; pointer-events: none; }

/* anillo */
.viz-donut-wrap { display: grid; grid-template-columns: minmax(150px, 210px) 1fr; gap: 18px; align-items: center; }
.viz-donut { width: 100%; height: auto; }
.viz-arc { fill: var(--c); stroke: var(--cc-surface, #fff); stroke-width: 2; cursor: pointer; transition: opacity .2s ease, transform .2s ease; transform-origin: 100px 100px; }
.viz-arc:hover, .viz-arc:focus { transform: scale(1.04); outline: none; }
.viz-donut-total { font-size: 26px; font-weight: 800; fill: var(--cc-ink, #19283b); }
.viz-donut-unit { font-size: 12px; fill: var(--cc-muted, #69798d); }
.viz-place-legend { display: grid; gap: 6px; }
.viz-place-item { display: grid; grid-template-columns: 12px 1fr auto auto; gap: 10px; align-items: center; width: 100%; text-align: left;
  background: transparent; color: var(--cc-ink, #19283b); border: 1px solid transparent; border-radius: 10px; padding: 7px 10px; font-weight: 500; box-shadow: none; }
.viz-place-item:hover { background: var(--cc-canvas, #f3f6fa); }
.viz-place-item[aria-pressed="true"] { border-color: var(--cc-brand, #294b70); background: var(--cc-canvas, #f3f6fa); }
.viz-place-item .viz-sw { width: 12px; height: 12px; }
.viz-place-pct { color: var(--cc-muted, #69798d); font-size: .82rem; min-width: 52px; text-align: right; font-variant-numeric: tabular-nums; }
.viz-root.viz-focusing .viz-arc:not(.is-focus), .viz-root.viz-focusing .viz-seg[data-place]:not(.is-focus) { opacity: .18; }

/* estados */
.viz-strip { display: flex; gap: 2px; height: 26px; border-radius: 8px; overflow: hidden; background: var(--cc-line, #e0e7ef); }
.viz-strip-seg { width: var(--w, 0%); background: var(--c); min-width: 4px; }
.viz-strip-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; margin-top: 14px; }
.viz-strip-item { display: flex; align-items: center; gap: 8px; font-size: .88rem; }
.viz-strip-item b { margin-left: auto; font-variant-numeric: tabular-nums; }
.viz-closing { margin: 12px 0 0; }

/* personas y barras horizontales */
.viz-people { display: grid; gap: 4px; }
.viz-person { display: grid; grid-template-columns: minmax(150px, 220px) 1fr 112px; gap: 14px; align-items: center; width: 100%; text-align: left;
  background: transparent; color: var(--cc-ink, #19283b); border: 1px solid transparent; border-radius: 10px; padding: 8px 10px; box-shadow: none; font-weight: 400; }
.viz-person:hover, .viz-person:focus-visible { background: var(--cc-canvas, #f3f6fa); border-color: var(--cc-line, #e0e7ef); }
.viz-person-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.viz-person-name b, .viz-person-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viz-person-name span { font-size: .78rem; }
.viz-person-val { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-variant-numeric: tabular-nums; }
.viz-track { position: relative; display: flex; gap: 2px; height: 16px; background: var(--cc-canvas, #f3f6fa); border-radius: 6px; }
.viz-seg { width: var(--w, 0%); background: var(--c); min-width: 3px; transition: opacity .2s ease; }
.viz-track .viz-seg:first-child { border-radius: 6px 0 0 6px; }
.viz-track .viz-seg:last-of-type { border-radius: 0 6px 6px 0; }
.viz-track .viz-seg:first-child:last-of-type { border-radius: 6px; }
.viz-target { position: absolute; top: -4px; bottom: -4px; left: var(--w, 0%); width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--cc-ink, #19283b); }
.viz-dot-chip { font-size: .74rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.viz-dot-chip.viz-good { background: #e7f6e7; color: var(--viz-good-ink); } .viz-dot-chip.viz-warn { background: #fff4dc; color: var(--viz-warn-ink); }
.viz-dot-chip.viz-bad { background: #fbe9e9; color: var(--viz-bad-ink); }
.viz-more { justify-self: start; margin-top: 6px; }
.viz-hbars { display: grid; gap: 10px; }
.viz-hbar { display: grid; grid-template-columns: minmax(120px, 170px) 1fr 70px; gap: 12px; align-items: center; border-radius: 8px; padding: 2px 4px; }
.viz-hbar:hover, .viz-hbar:focus { background: var(--cc-canvas, #f3f6fa); outline: none; }
.viz-hbar-label { display: flex; flex-direction: column; min-width: 0; font-size: .88rem; }
.viz-hbar-label span { font-size: .76rem; }
.viz-hbar-val { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.viz-hbar .viz-seg { border-radius: 6px; }

/* detalle de una persona */
.viz-drill { border-left: 4px solid var(--cc-brand, #294b70); animation: vizFade .35s ease both; }
.viz-drill-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.viz-drill-head h3 { margin: 0 0 2px; }
.viz-timeline { display: grid; gap: 2px; margin-top: 8px; }
.viz-tl-item { display: grid; grid-template-columns: 14px 1fr auto; gap: 12px; align-items: start; padding: 10px 6px; border-bottom: 1px solid var(--cc-line, #e0e7ef); }
.viz-tl-dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 4px; background: var(--c); box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--cc-line, #e0e7ef); }
.viz-tl-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.viz-tl-body .muted { font-size: .8rem; margin-top: 2px; }
.viz-tl-hours { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.viz-table-view summary { cursor: pointer; font-weight: 700; color: var(--cc-brand, #294b70); }
.viz-table-view[open] summary { margin-bottom: 12px; }

/* tooltip */
.viz-tip { position: fixed; z-index: 1000; pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .12s ease, transform .12s ease;
  background: #13233a; color: #fff; border-radius: 10px; padding: 9px 12px; font-size: .8rem; min-width: 170px; box-shadow: 0 10px 30px rgba(0,0,0,.22); }
.viz-tip.is-on { opacity: 1; transform: none; }
.viz-tip-title { font-weight: 700; margin-bottom: 6px; }
.viz-tip-row { display: flex; align-items: center; gap: 8px; line-height: 1.6; }
.viz-tip-row b { margin-left: auto; padding-left: 14px; font-variant-numeric: tabular-nums; }
.viz-tip .viz-sw { box-shadow: 0 0 0 1px rgba(255,255,255,.6); }

/* animaciones de entrada */
.viz-grow { animation: vizGrow .8s cubic-bezier(.2,.8,.2,1) both; transform-origin: left center; }
.viz-rise { animation: vizRise .7s cubic-bezier(.2,.8,.2,1) both; transform-box: fill-box; transform-origin: bottom; }
@keyframes vizGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes vizRise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes vizFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .viz-grow, .viz-rise, .viz-drill { animation: none; }
  .viz-gauge-val, .viz-kpi, .viz-arc { transition: none; }
}
@media (max-width: 980px) { .viz-hero { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .viz-kpis { grid-template-columns: 1fr; }
  .viz-donut-wrap { grid-template-columns: 1fr; justify-items: center; }
  .viz-donut-wrap .viz-donut { width: min(200px, 100%); max-width: 200px; }
  .viz-person { grid-template-columns: 1fr 86px; }
  .viz-person .viz-track { grid-column: 1 / -1; grid-row: 2; }
  .viz-hbar { grid-template-columns: 1fr 60px; }
  .viz-hbar .viz-track { grid-column: 1 / -1; grid-row: 2; }
  .viz-legend-note { margin-left: 0; }
}

/* ===== Dashboard · Resumen, Brechas, Seguimiento, Calidad (componentes viz) ===== */
:root {
  /* riesgo: escala ordinal de un solo tono (claro = bajo, oscuro = crítico) */
  --viz-r-low: #f3c1b3; --viz-r-medium: #ec8a6c; --viz-r-high: #cf4b37; --viz-r-critical: #8b1a24; --viz-r-none: #b8c2cd; --viz-r-other: #8796a8;
  --viz-dom-fin: #2a78d6; --viz-dom-sis: #eb6834;
}
.viz-r-CRITICAL { --c: var(--viz-r-critical); } .viz-r-HIGH { --c: var(--viz-r-high); } .viz-r-MEDIUM { --c: var(--viz-r-medium); }
.viz-r-LOW { --c: var(--viz-r-low); } .viz-r-UNSPECIFIED { --c: var(--viz-r-none); } .viz-r-OTHER { --c: var(--viz-r-other); }
.viz-dom-FIN { --c: var(--viz-dom-fin); } .viz-dom-SIS { --c: var(--viz-dom-sis); }

.viz-active-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; font-size: .84rem; }
.viz-active-filters:empty { display: none; }
.viz-filter-chip { min-height: 0; padding: 4px 12px; border-radius: 999px; background: #e8eff8; color: var(--cc-brand, #294b70); border: 1px solid #c9d7e8; font-weight: 600; box-shadow: none; }
.viz-filter-chip:hover { background: #d9e5f3; }

/* tarjetas principales con tendencia */
.viz-hero4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.viz-kpi-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.viz-spark { width: 110px; height: 34px; flex: none; }
.viz-spark-area { fill: rgba(42, 120, 214, .10); }
.viz-spark-line { fill: none; stroke: var(--viz-dom-fin); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.viz-spark-risk { stroke: var(--viz-r-high); }
.viz-spark-dot { fill: var(--cc-surface, #fff); stroke: var(--cc-ink, #19283b); stroke-width: 1.5; }

/* comparativo espejo */
.viz-mirror { display: grid; gap: 6px; }
.viz-mirror-head, .viz-mirror-row { display: grid; grid-template-columns: 1fr 150px 1fr; align-items: center; gap: 10px; }
.viz-mirror-head { font-size: .82rem; margin-bottom: 4px; }
.viz-mirror-l { text-align: right; color: var(--viz-dom-fin); } .viz-mirror-r { color: #b4491c; }
.viz-mirror-row { padding: 4px 6px; border-radius: 8px; }
.viz-mirror-row:hover, .viz-mirror-row:focus { background: var(--cc-canvas, #f3f6fa); outline: none; }
.viz-mirror-side { display: flex; align-items: center; gap: 8px; height: 18px; }
.viz-mirror-left { justify-content: flex-end; }
.viz-mirror-bar { height: 14px; width: var(--w, 0%); background: var(--c); border-radius: 4px; min-width: 2px; }
.viz-mirror-num { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 28px; }
.viz-mirror-left .viz-mirror-num { text-align: right; }
.viz-mirror-label { text-align: center; font-size: .84rem; color: var(--cc-muted, #69798d); font-weight: 600; }
.viz-mirror-row.is-l .viz-mirror-left .viz-mirror-num, .viz-mirror-row.is-r .viz-mirror-side:last-child .viz-mirror-num { color: var(--cc-ink, #19283b); }
.viz-mirror-foot { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; font-size: .78rem; color: var(--cc-muted, #69798d); margin-top: 8px; }
.viz-mirror-foot span:first-child { text-align: right; } .viz-mirror-foot span:nth-child(2) { text-align: center; }
.viz-grow-r { animation: vizGrow .8s cubic-bezier(.2,.8,.2,1) both; transform-origin: right center; }

/* alertas */
.viz-strip-lg { height: 14px; margin-bottom: 10px; }
.viz-chips-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 12px; }
.viz-sevchip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--cc-canvas, #f3f6fa); font-size: .8rem; font-weight: 600; }
.viz-alert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.viz-alert { border: 1px solid var(--cc-line, #e0e7ef); border-left: 4px solid var(--c); border-radius: 10px; padding: 10px 12px; background: var(--cc-surface, #fff); }
.viz-alert-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.viz-alert-sev { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: #fff; background: var(--c); padding: 2px 8px; border-radius: 999px; }
.viz-r-LOW .viz-alert-sev, .viz-r-MEDIUM .viz-alert-sev { color: #3a1208; }
.viz-alert-late { margin-left: auto; font-size: .75rem; font-weight: 700; color: var(--viz-bad-ink, #a32727); }
.viz-alert-detail { font-size: .86rem; line-height: 1.35; }
.viz-alert-meta { font-size: .76rem; margin-top: 4px; }

/* riesgo, tendencia, mapa de calor */
.viz-risk-item { display: grid; grid-template-columns: 12px 1fr auto auto; gap: 10px; align-items: center; padding: 6px 10px; font-size: .9rem; }
.viz-risk-item .viz-sw { width: 12px; height: 12px; }
.viz-line { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.viz-line-a { stroke: var(--viz-bar, #3567a0); } .viz-line-o { stroke: var(--viz-r-high); }
.viz-area-risk { fill: rgba(207, 75, 55, .08); }
.viz-pt { stroke: var(--cc-surface, #fff); stroke-width: 2; } .viz-pt-a { fill: var(--viz-bar, #3567a0); } .viz-pt-o { fill: var(--viz-r-high); }
.viz-col:hover .viz-pt, .viz-col:focus .viz-pt { r: 6; }
.viz-heat { display: grid; gap: 4px; }
.viz-heat-row { display: grid; grid-template-columns: minmax(110px, 1.4fr) repeat(4, minmax(48px, 1fr)) 56px; gap: 4px; align-items: center; }
.viz-heat-head span { font-size: .74rem; font-weight: 700; color: var(--cc-muted, #69798d); text-align: center; text-transform: uppercase; letter-spacing: .03em; }
.viz-heat-unit { min-height: 0; text-align: left; padding: 6px 8px; background: transparent; color: var(--cc-ink, #19283b); font-weight: 600; box-shadow: none; border-radius: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viz-heat-unit:hover { background: var(--cc-canvas, #f3f6fa); }
.viz-heat-cell { display: grid; place-items: center; height: 38px; border-radius: 8px; font-weight: 700; font-variant-numeric: tabular-nums; background: #f3f5f8; color: #9aa6b4; transition: transform .15s ease; }
.viz-heat-cell:hover, .viz-heat-cell:focus { transform: scale(1.06); outline: none; }
.viz-heat-l1 { background: #fbe3dc; color: #6e1d14; } .viz-heat-l2 { background: #f3b5a3; color: #5a160f; }
.viz-heat-l3 { background: #e0715a; color: #fff; } .viz-heat-l4 { background: #a8262b; color: #fff; }
.viz-heat-total { text-align: center; font-variant-numeric: tabular-nums; }

/* flujo por fases */
.viz-flow { display: flex; align-items: stretch; gap: 6px; overflow-x: auto; padding-bottom: 6px; }
.viz-flow-arrow { align-self: center; font-size: 1.6rem; color: #b3c0cf; }
.viz-flow-step { flex: 1 1 0; min-width: 118px; border: 1px solid var(--cc-line, #e0e7ef); border-radius: 12px; padding: 12px; background: var(--cc-surface, #fff);
  display: flex; flex-direction: column; gap: 6px; position: relative; }
.viz-flow-step:focus, .viz-flow-step:hover { border-color: #b9c8da; outline: none; box-shadow: 0 6px 18px rgba(25,40,59,.07); }
.viz-flow-step.is-empty { opacity: .55; }
.viz-flow-step.is-neck { border-color: var(--viz-r-high); background: linear-gradient(180deg, #fff6f3, #fff); }
.viz-flow-n { font-size: 1.7rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.viz-flow-name { font-size: .8rem; font-weight: 600; color: var(--cc-muted, #69798d); min-height: 2.2em; }
.viz-flow-bar { height: 5px; width: var(--w, 0%); border-radius: 999px; background: var(--viz-bar, #3567a0); }
.viz-flow-step.is-neck .viz-flow-bar { background: var(--viz-r-high); }
.viz-flow-late { font-size: .72rem; font-weight: 700; color: var(--viz-bad-ink, #a32727); }
.viz-insight { margin: 10px 0 0; padding: 10px 12px; background: #fff7f2; border: 1px solid #f6d3c4; border-radius: 10px; font-size: .88rem; }

/* calidad */
.viz-quality { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.viz-qcard { border: 1px solid var(--cc-line, #e0e7ef); border-radius: 12px; padding: 12px 14px; background: var(--cc-surface, #fff); display: flex; flex-direction: column; gap: 4px; }
.viz-qcard-top { display: flex; align-items: center; gap: 8px; }
.viz-qcard-top b { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.viz-qcard-lvl { margin-left: auto; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.viz-qcard-label { font-weight: 700; font-size: .9rem; }
.viz-qcard-desc { font-size: .78rem; line-height: 1.35; }
.viz-q-good .viz-chip-icon { background: var(--viz-good); } .viz-q-good .viz-qcard-lvl { color: var(--viz-good-ink); }
.viz-q-warn { border-color: #f1d08a; background: linear-gradient(180deg, #fffaf0, #fff); } .viz-q-warn .viz-chip-icon { background: var(--viz-warn); color: #0b0b0b; } .viz-q-warn .viz-qcard-lvl { color: var(--viz-warn-ink); }
.viz-q-info .viz-chip-icon { background: #5f7d9c; } .viz-q-info .viz-qcard-lvl { color: #4b627a; }

@media (max-width: 1100px) { .viz-hero4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .viz-hero4 { grid-template-columns: 1fr; }
  .viz-mirror-head, .viz-mirror-row { grid-template-columns: 1fr 92px 1fr; }
  .viz-mirror-foot { grid-template-columns: 1fr; } .viz-mirror-foot span { text-align: left !important; }
  .viz-heat-row { grid-template-columns: minmax(90px, 1.2fr) repeat(4, minmax(36px, 1fr)) 40px; }
}
.viz-people-compact .viz-person { grid-template-columns: minmax(120px, 1.1fr) minmax(80px, 1fr) 112px; gap: 10px; }

/* ===== Inicio · centro de trabajo ===== */
.hc-top { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; align-items: start; }
.hc-attention { margin: 0; }
.hc-attn-list { display: grid; gap: 8px; }
.hc-attn { display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: center; width: 100%; text-align: left; min-height: 0;
  padding: 10px 12px; border-radius: 12px; border: 1px solid var(--cc-line, #e0e7ef); background: var(--cc-surface, #fff); color: var(--cc-ink, #19283b);
  font-weight: 400; box-shadow: none; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.hc-attn:hover, .hc-attn:focus-visible { transform: translateX(3px); border-color: #b9c8da; box-shadow: 0 6px 18px rgba(25,40,59,.07); }
.hc-attn-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--hc-soft); }
.hc-attn-icon svg { width: 20px; height: 20px; fill: none; stroke: var(--hc-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hc-attn-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hc-attn-text b { font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-attn-text span { font-size: .8rem; color: var(--cc-muted, #69798d); }
.hc-attn-go { color: #9aa8b8; font-size: 1.1rem; }
.hc-good { --hc-soft: #e7f6e7; --hc-ink: #0a6e0a; } .hc-warn { --hc-soft: #fff4dc; --hc-ink: #7a4f00; }
.hc-bad { --hc-soft: #fbe9e9; --hc-ink: #a32727; } .hc-info { --hc-soft: #e8eff8; --hc-ink: #294b70; } .hc-base { --hc-soft: #eef2f7; --hc-ink: #294b70; }
.hc-attn.hc-bad { border-left: 4px solid #d03b3b; } .hc-attn.hc-warn { border-left: 4px solid #fab219; }
.hc-allclear { padding: 18px; border-radius: 12px; background: #e7f6e7; color: #0a6e0a; font-weight: 700; text-align: center; }
.hc-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.hc-tile { display: flex; flex-direction: column; gap: 4px; text-align: left; min-height: 0; padding: 16px 18px; border-radius: var(--cc-radius, 13px);
  background: var(--cc-surface, #fff); border: 1px solid var(--cc-line, #e0e7ef); box-shadow: var(--cc-shadow); color: var(--cc-ink, #19283b); font-weight: 400;
  border-top: 3px solid var(--hc-ink); transition: transform .18s ease, box-shadow .18s ease; }
button.hc-tile:hover, button.hc-tile:focus-visible { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(25,40,59,.09); }
.hc-tile-value { font-size: 1.9rem; font-weight: 800; line-height: 1.05; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hc-tile-label { font-weight: 700; font-size: .9rem; }
.hc-tile-sub { font-size: .8rem; color: var(--cc-muted, #69798d); line-height: 1.35; }
.hc-tile-bar { margin-top: 6px; height: 6px; border-radius: 999px; background: var(--cc-line, #e0e7ef); overflow: hidden; }
.hc-tile-bar span { display: block; height: 100%; width: var(--w, 0%); background: var(--hc-ink); border-radius: 999px; animation: vizGrow .8s cubic-bezier(.2,.8,.2,1) both; transform-origin: left; }

.hc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; align-items: start; }
.hc-grid > .home-panel { margin: 0; }
.hc-split { display: flex; gap: 2px; height: 14px; border-radius: 7px; overflow: hidden; background: var(--cc-line, #e0e7ef); margin-top: 6px; }
.hc-split span { width: var(--w, 0%); }
.hc-split-a { background: #2a78d6; } .hc-split-c { background: #294b70; }
.hc-split-legend { display: flex; gap: 16px; font-size: .82rem; color: var(--cc-muted, #69798d); margin: 8px 0 4px; }
.hc-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: middle; }
.hc-sub { margin: 16px 0 8px; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--cc-muted, #69798d); }
.hc-flow { display: flex; gap: 4px; align-items: stretch; overflow-x: auto; padding-bottom: 4px; }
.hc-flow-arrow { align-self: center; color: #b3c0cf; font-size: 1.3rem; }
.hc-flow-step { flex: 1 1 0; min-width: 84px; display: flex; flex-direction: column; gap: 4px; padding: 10px; border-radius: 10px; border: 1px solid var(--cc-line, #e0e7ef); }
.hc-flow-step b { font-size: 1.35rem; line-height: 1; }
.hc-flow-step > span:not(.hc-flow-bar) { font-size: .74rem; color: var(--cc-muted, #69798d); min-height: 2.2em; }
.hc-flow-step.is-empty { opacity: .5; } .hc-flow-step.is-top { border-color: #2a78d6; background: #f2f7fd; }
.hc-flow-bar { display: block; height: 4px; width: var(--w, 0%); background: #2a78d6; border-radius: 999px; }
.home-severity-panel + .hc-grid, .hc-after-gaps { margin-top: 16px; }
.hc-units { display: grid; gap: 8px; }
.hc-unit { display: grid; grid-template-columns: minmax(90px, 1fr) 1.4fr 32px; gap: 10px; align-items: center; font-size: .86rem; }
.hc-unit > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-unit-track { height: 10px; border-radius: 999px; background: var(--cc-canvas, #f3f6fa); overflow: hidden; }
.hc-unit-bar { display: block; height: 100%; width: var(--w, 0%); background: #3567a0; border-radius: 999px; animation: vizGrow .8s cubic-bezier(.2,.8,.2,1) both; transform-origin: left; }
.hc-unit b { text-align: right; font-variant-numeric: tabular-nums; }
.hc-list { display: grid; gap: 6px; }
.hc-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; width: 100%; text-align: left; min-height: 0;
  padding: 10px 12px; border-radius: 10px; border: 1px solid var(--cc-line, #e0e7ef); background: var(--cc-surface, #fff); color: var(--cc-ink, #19283b); font-weight: 400; box-shadow: none; }
.hc-item:hover, .hc-item:focus-visible { background: var(--cc-canvas, #f3f6fa); border-color: #c9d6e4; }
.hc-item-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hc-item-main span { font-size: .8rem; color: var(--cc-muted, #69798d); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-steps, .hc-sigs { display: flex; gap: 3px; align-items: center; }
.hc-steps span { width: 14px; height: 6px; border-radius: 3px; background: #e2e8f0; }
.hc-steps span.done { background: #294b70; } .hc-steps span.now { background: #2a78d6; box-shadow: 0 0 0 2px #cfe0f5; }
.hc-sigs span { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #c4cfdc; }
.hc-sigs span.done { background: #0ca30c; border-color: #0ca30c; }
.hc-sigs small { margin-left: 4px; color: var(--cc-muted, #69798d); font-variant-numeric: tabular-nums; }
@media (max-width: 1100px) { .hc-top, .hc-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .hc-tiles { grid-template-columns: 1fr; } .hc-item { grid-template-columns: 1fr auto; } .hc-item .hc-steps, .hc-item .hc-sigs { display: none; } }

/* ===== Informe Ejecutivo en pantalla ===== */
.ge-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.ge-delta { font-weight: 700; }
.ge-good .ge-delta, .ge-delta.ge-good { color: var(--viz-good-ink); } .ge-bad .ge-delta, .ge-delta.ge-bad { color: var(--viz-bad-ink); }
.ge-messages { background: linear-gradient(180deg, #fffaf0, #fff); border: 1px solid #f1d08a; }
.ge-messages ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.ge-bar-a { fill: var(--viz-dom-fin); } .ge-bar-h { fill: var(--viz-r-high); }
.ge-sw-a { --c: var(--viz-dom-fin); } .ge-sw-h { --c: var(--viz-r-high); }
.ge-current .viz-hit { fill: rgba(42, 120, 214, .06); } .ge-tick-now { font-weight: 800; fill: var(--cc-ink, #19283b); }
.ge-cmp { display: grid; gap: 2px; }
.ge-cmp-row { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 10px; padding: 8px 10px; border-radius: 8px; font-variant-numeric: tabular-nums; }
.ge-cmp-head { font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--cc-muted, #69798d); }
.ge-cmp-row.ge-good { background: #eef8ee; } .ge-cmp-row.ge-bad { background: #fcefef; }
.ge-unit { cursor: default; }
.ge-audit { margin: 8px 0; } .ge-audit summary { cursor: pointer; font-weight: 600; }
@media (max-width: 1100px) { .ge-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .ge-kpis { grid-template-columns: 1fr; } .ge-cmp-row { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; font-size: .82rem; } }
.ge-doc-ok { --c: #1e9e5a; } .ge-doc-old { --c: #e8a317; } .ge-doc-no { --c: #c0392b; } .ge-doc-silent { --c: #e2702e; } .ge-doc-pend { --c: #b8c2cd; }
.ge-doc-legend { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 900px) { .ge-doc-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ge-growth { min-width: 0; }
.viz-strip-item b { white-space: nowrap; }

/* Submenú plegable dentro de una sección (Auditorías → Sistemas / Aplicativos). */
#nav .sicas-nav-sub { display: flex; flex-direction: column; gap: 2px; }
#nav button.sicas-nav-sub-head { padding-block: 8px; gap: 10px; }
#nav button.sicas-nav-sub-head .sicas-nav-label { flex: 1; text-align: left; }
#nav button.sicas-nav-sub-head .sicas-nav-chevron { margin-left: auto; }
#nav .sicas-nav-sub.folded .sicas-nav-sub-head .sicas-nav-chevron { transform: rotate(-45deg); margin-top: 0; }
#nav .sicas-nav-sub-items { display: flex; flex-direction: column; gap: 2px; margin-left: 14px; padding-left: 8px; border-left: 1px solid rgba(255,255,255,.12); }
#nav .sicas-nav-sub.folded .sicas-nav-sub-items { display: none; }
#nav .sicas-nav-sub-items [data-sicas-nav-item] { font-size: .9em; padding-block: 6px; }
#nav .sicas-nav-sub:has([data-sicas-nav-item].active) > .sicas-nav-sub-head { color: #fff; }
#view-app.sicas-nav-collapsed #nav .sicas-nav-sub-head .sicas-nav-chevron { display: none; }
#view-app.sicas-nav-collapsed #nav .sicas-nav-sub-items { margin-left: 0; padding-left: 0; border-left: 0; }
@media (max-width: 760px) {
  #nav .sicas-nav-group button.sicas-nav-sub-head { justify-content: flex-start !important; }
}

/* ===== Módulo de Auditorías: promedio de notas y nota vigente de cada auditoría ===== */
.au-b0 { --c: #c0392b; } .au-b1 { --c: #e2702e; } .au-b2 { --c: #e8a317; } .au-b3 { --c: #8fb43a; } .au-b4 { --c: #2e9e5b; } .au-b5 { --c: #157347; } .au-none { --c: #b8c2cd; }
.au-ring { flex: none; }
.au-ring-bg { fill: none; stroke: #e6ebf2; stroke-width: 7; }
.au-ring-val { fill: none; stroke: var(--c); stroke-width: 7; stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(.2,.8,.2,1); }
.au-ring-txt { font-size: 17px; font-weight: 800; fill: var(--cc-ink, #19283b); font-variant-numeric: tabular-nums; }
.au-hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 14px; }
.au-avg { margin: 0; display: grid; gap: 14px; }
.au-avg-main { display: flex; gap: 18px; align-items: center; }
.au-avg-label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--cc-muted, #69798d); }
.au-avg-value { font-size: 2.2rem; font-weight: 800; line-height: 1.05; color: var(--cc-ink, #19283b); letter-spacing: -.02em; }
.au-bins { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; align-items: end; height: 96px; }
.au-bin { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; height: 100%; }
.au-bin b { font-size: .8rem; font-variant-numeric: tabular-nums; }
.au-bin-bar { display: block; width: 70%; height: var(--w, 0%); min-height: 3px; border-radius: 5px 5px 2px 2px; background: var(--c); animation: vizRise .7s cubic-bezier(.2,.8,.2,1) both; transform-origin: bottom; }
.au-bin small { font-size: .7rem; color: var(--cc-muted, #69798d); white-space: nowrap; }
.au-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.au-kpi { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; border-radius: var(--cc-radius, 13px); background: var(--cc-surface, #fff);
  border: 1px solid var(--cc-line, #e0e7ef); box-shadow: var(--cc-shadow); }
.au-kpi b { font-size: 1.8rem; line-height: 1.05; font-variant-numeric: tabular-nums; color: var(--cc-ink, #19283b); }
.au-kpi span { font-weight: 700; font-size: .88rem; } .au-kpi small { color: var(--cc-muted, #69798d); font-size: .78rem; }
.au-kpi-bad { border-color: #efc4c4; background: linear-gradient(180deg, #fff5f5, #fff); } .au-kpi-bad b { color: #a32727; }
.au-kpi-warn { border-color: #f1d08a; background: linear-gradient(180deg, #fffaf0, #fff); } .au-kpi-warn b { color: #7a4f00; }
.au-compare { margin: 0; }
.au-compare-rows { display: grid; gap: 8px; }
.au-compare-row { display: grid; grid-template-columns: minmax(120px, 180px) 1fr 70px; gap: 12px; align-items: center; }
.au-compare-row b { text-align: right; font-variant-numeric: tabular-nums; }
.au-track { height: 12px; border-radius: 999px; background: var(--cc-canvas, #f3f6fa); overflow: hidden; }
.au-fill { display: block; height: 100%; width: var(--w, 0%); background: var(--c); border-radius: 999px; animation: vizGrow .8s cubic-bezier(.2,.8,.2,1) both; transform-origin: left; }
.au-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.au-filters input[type="search"] { flex: 1 1 240px; }
.au-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.au-card { display: flex; flex-direction: column; gap: 8px; text-align: left; width: 100%; min-height: 0; padding: 14px; border-radius: 14px;
  border: 1px solid var(--cc-line, #e0e7ef); background: var(--cc-surface, #fff); color: var(--cc-ink, #19283b); font-weight: 400; box-shadow: var(--cc-shadow);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
button.au-card:hover, button.au-card:focus-visible { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(25,40,59,.10); border-color: #c4d2e2; }
.au-card.is-late { border-left: 4px solid #c0392b; }
.au-card-top { display: flex; gap: 12px; align-items: center; }
.au-card-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.au-card-id b { font-size: .98rem; }
.au-card-id span { font-size: .8rem; color: var(--cc-muted, #69798d); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.au-kind { align-self: flex-start; padding: 1px 8px; border-radius: 999px; font-size: .7rem !important; font-weight: 700; color: #fff !important; }
.au-kind-sis { background: #eb6834; } .au-kind-app { background: #6250d6; } .au-kind-fin { background: #2a78d6; }
.au-card-rating { font-size: .82rem; }
.au-steps { display: flex; gap: 4px; }
.au-steps span { flex: 1; height: 6px; border-radius: 3px; background: #e2e8f0; }
.au-steps span.done { background: #294b70; } .au-steps span.now { background: #2a78d6; box-shadow: 0 0 0 2px #cfe0f5; }
.au-card-phase { font-size: .8rem; font-weight: 600; }
.au-late { color: #a32727; font-weight: 700; }
.au-card-foot { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--cc-line, #e0e7ef); padding-top: 8px; font-size: .76rem; }
.au-risk { padding: 1px 7px; border-radius: 999px; font-weight: 700; font-variant-numeric: tabular-nums; }
.au-risk-a { background: #fbe3dc; color: #8b1a24; } .au-risk-m { background: #fdeee7; color: #9a3d22; } .au-risk-b { background: #f3f5f8; color: #4b5b6e; }
.au-leader { margin-left: auto; color: var(--cc-muted, #69798d); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 45%; }
@media (max-width: 1000px) { .au-hero { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .au-kpis { grid-template-columns: 1fr 1fr; } .au-avg-main { flex-direction: column; align-items: flex-start; } }
.au-filters input[type="search"], .au-filters select { width: auto; margin: 0; }
.au-filters select { flex: 0 1 220px; }
@media (max-width: 600px) { .au-filters input[type="search"], .au-filters select { flex: 1 1 100%; } }

/* ---------------------------------------------------------------- Centro de notificaciones v2 + push */
.nt { max-width: 980px; }
.nt-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.nt-title h2 { margin: 0; }
.nt-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
#page .nt button.nt-kpi { display: grid; gap: 2px; text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid #dbe3ed; background: #fff; color: #1f3864; box-shadow: 0 2px 7px rgba(31, 56, 100, .045); cursor: pointer; }
#page .nt button.nt-kpi strong { font-size: 1.7rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
#page .nt button.nt-kpi span { font-size: .8rem; color: #61758a; }
#page .nt button.nt-kpi.nt-info { border-left: 4px solid #2a78d6; }
#page .nt button.nt-kpi.nt-warn { border-left: 4px solid #c58b20; }
#page .nt button.nt-kpi:hover { background: #f5f8fc; }
.nt-push { padding: 14px 16px; border-radius: 12px; border: 1px solid #dbe3ed; background: linear-gradient(135deg, #f6f9fd, #fff); display: grid; gap: 10px; }
.nt-push-head { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; }
.nt-push-head h3 { margin: 0 0 2px; font-size: 1rem; }
.nt-push-head p { margin: 0; font-size: .85rem; }
.nt-push-icon { font-size: 1.5rem; line-height: 1; }
.nt-push-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.nt-push-actions:empty { display: none; }
.nt-pill { font-size: .74rem; font-weight: 700; padding: 4px 9px; border-radius: 999px; white-space: nowrap; }
.nt-pill.nt-ok { background: #dff3ea; color: #126b49; }
.nt-pill.nt-off { background: #edf1f5; color: #546679; }
.nt-pill.nt-bad { background: #fbe3df; color: #9b2c1f; }
.nt-hint, .nt-msg { margin: 0; font-size: .82rem; }
.nt-msg { color: #1f3864; font-weight: 600; }
.nt-devices { margin: 0; padding-left: 18px; font-size: .82rem; display: grid; gap: 3px; }
.nt-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.nt-views { display: inline-flex; border: 1px solid #dbe3ed; border-radius: 10px; overflow: hidden; background: #fff; }
#page .nt .nt-views button.nt-view { border: 0; border-radius: 0; background: transparent; color: #315d91; box-shadow: none; padding: 7px 14px; font-size: .85rem; }
#page .nt .nt-views button.nt-view.is-active { background: #1f3864; color: #fff; }
.nt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.nt-chips[hidden] { display: none; }
#page .nt button.nt-chip { border: 1px solid #dbe3ed; background: #fff; color: #33475c; border-radius: 999px; padding: 5px 11px; font-size: .8rem; box-shadow: none; display: inline-flex; align-items: center; gap: 6px; }
#page .nt button.nt-chip.is-active { background: #e8f0fb; border-color: #2a78d6; color: #1f3864; font-weight: 700; }
#page .nt .nt-chip-count { background: #2a78d6; color: #fff; border-radius: 999px; padding: 0 6px; font-size: .7rem; font-weight: 700; }
.nt-list { display: grid; gap: 16px; }
.nt-group { display: grid; gap: 8px; }
.nt-day { margin: 0; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: #546679; }
.nt-item { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 13px 15px; border: 1px solid #dbe3ed; border-radius: 12px; background: #fff; box-shadow: 0 2px 7px rgba(31, 56, 100, .045); }
.nt-item.is-unread { border-left: 4px solid var(--nt-c, #315d91); background: #fbfdff; }
.nt-item.is-unread h3::after { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--nt-c, #315d91); margin-left: 8px; vertical-align: middle; }
.nt-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-size: 1.15rem; background: var(--nt-bg, #edf1f5); }
.nt-body { min-width: 0; }
.nt-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.nt-head h3 { margin: 0; font-size: .97rem; }
.nt-time { font-size: .76rem; color: #708196; white-space: nowrap; font-variant-numeric: tabular-nums; }
.nt-message { margin: 5px 0 7px; color: #4c6075; font-size: .88rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.nt-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .75rem; color: #708196; }
.nt-tag { background: var(--nt-bg, #edf1f5); color: var(--nt-c, #315d91); font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.nt-pending { color: #9a6a12; font-weight: 600; }
.nt-done { color: #126b49; font-weight: 600; }
.nt-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.nt-actions button { padding: 5px 10px; font-size: .8rem; }
.nt-cat-report { --nt-c: #2a78d6; --nt-bg: #e6f0fb; }
.nt-cat-role { --nt-c: #6a4fb3; --nt-bg: #efeafa; }
.nt-cat-system { --nt-c: #546679; --nt-bg: #edf1f5; }
.nt-cat-audit { --nt-c: #1b8a63; --nt-bg: #e2f4ec; }
.nt-cat-schedule { --nt-c: #c56a25; --nt-bg: #fcebdd; }
.nt-cat-engine { --nt-c: #8a5a00; --nt-bg: #fbf0d4; }
.nt-cat-activity { --nt-c: #1f7ea8; --nt-bg: #e2f2f9; }
.nt-cat-alert { --nt-c: #b23a2a; --nt-bg: #fbe3df; }
@media (max-width: 640px) {
  .nt-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  #page .nt button.nt-kpi { padding: 9px 10px; }
  #page .nt button.nt-kpi strong { font-size: 1.3rem; }
  .nt-push-head { grid-template-columns: auto 1fr; }
  .nt-push-head .nt-pill { grid-column: 1 / -1; justify-self: start; }
  .nt-item { grid-template-columns: 32px 1fr; gap: 9px; padding: 11px 12px; }
  .nt-icon { width: 32px; height: 32px; font-size: 1rem; }
}

#page .nt button.tertiary, #page .nt-push button.tertiary { color: #315d91; background: #fff; border: 1px solid #d5deea; }
#page .nt button.tertiary:hover:not(:disabled) { background: #f1f5f9; }
#page .nt button.tertiary:disabled { opacity: .5; }
#page .nt button.nt-kpi strong { color: #1f3864; }
#page .nt button.nt-chip.is-active { background: #e8f0fb; }
/* ---------------------------------------------------------------- Controles uniformes en TODO SICAS (páginas, diálogos y paneles)
   Antes solo #page tenía el estilo: los diálogos (S.ask/S.modal), las casillas y los selectores de archivo quedaban con el
   aspecto del navegador. */
:where(#page, .modal, .overlay) :is(input, select, textarea):hover:where(:not(:disabled):not([type="checkbox"]):not([type="radio"])) { border-color: #9fb2c8; }
:where(#page, .modal, .overlay) :is(input, select, textarea):focus:where(:not([type="checkbox"]):not([type="radio"])) {
  outline: none; border-color: #3169a6; box-shadow: 0 0 0 3px rgba(49, 105, 166, .18);
}
:where(#page, .modal, .overlay) :is(input, select, textarea):is(:disabled, [readonly]):where(:not([type="checkbox"]):not([type="radio"])) {
  background-color: #f2f5f9; color: #5d6f83; cursor: not-allowed;
}
:where(#page, .modal, .overlay) :is(input, textarea)::placeholder { color: #8796a8; opacity: 1; }
:where(#page, .modal, .overlay) select { appearance: auto; cursor: pointer; }
:where(#page, .modal, .overlay) input:is([type="date"], [type="time"], [type="datetime-local"], [type="month"]) { color-scheme: light; min-width: 0; }
:where(#page, .modal, .overlay) input[type="number"] { font-variant-numeric: tabular-nums; }

/* Casillas y opciones */
:where(#page, .modal, .overlay) input:is([type="checkbox"], [type="radio"]) {
  width: 17px; height: 17px; min-height: 0; margin: 0 6px 0 0; padding: 0; flex: 0 0 auto;
  accent-color: var(--sicas-blue, #315d91); vertical-align: -3px; cursor: pointer;
}
.modal label:has(> input[type="checkbox"]), .modal label:has(> input[type="radio"]) {
  display: flex; align-items: center; gap: 4px; font-weight: 600; margin: 8px 0;
}

/* Selector de archivos */
:where(#page, .modal, .overlay) input[type="file"] { padding: 6px; cursor: pointer; color: #4c6075; }
:where(#page, .modal, .overlay) input[type="file"]::file-selector-button {
  margin-right: 10px; padding: 6px 12px; border: 1px solid #c4d0de; border-radius: 6px; background: #eef3f9;
  color: #1f3864; font: inherit; font-weight: 700; cursor: pointer;
}
:where(#page, .modal, .overlay) input[type="file"]::file-selector-button:hover { background: #e1eaf5; }

/* Etiquetas de los diálogos (iguales a las de las páginas) */
.modal label { display: block; margin: 0 0 12px; color: #354960; font-weight: 650; font-size: .88rem; }
.modal label > :is(input, select, textarea) { margin-top: 5px; }
.modal label > .muted { display: block; font-weight: 400; font-size: .8rem; margin-top: 4px; }

/* Controles dentro de tablas: compactos pero con el mismo estilo */
:where(#page) td :where(input:not([type="checkbox"]):not([type="radio"]), select) { min-height: 36px; padding: .4rem .55rem; font-size: .86rem; }
:where(#page) td textarea { min-height: 56px; font-size: .86rem; }

/* Barras de filtros: los botones se alinean con la base de los campos */
#page :is(.row, .toolbar, .filters):has(:is(input, select)) { align-items: flex-end; }
#page :is(.row, .toolbar, .filters):has(:is(input, select)) > button { margin-bottom: 1px; }

/* Safari (iPhone/iPad/Mac): los select y los campos de fecha/hora usan el control nativo (gris, centrado y de otra altura).
   Se quita la apariencia nativa y se dibuja el mismo campo de SICAS con su flecha. */
:root { --sicas-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23315d91' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
select:not([multiple]):not([size]),
#page select:not([multiple]):not([size]) {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 2.1rem !important;
  background-image: var(--sicas-chevron);
  background-repeat: no-repeat;
  background-position: right .75rem center;
  background-size: 12px 8px;
  text-overflow: ellipsis;
}
input:is([type="date"], [type="time"], [type="datetime-local"], [type="month"]) {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  min-height: 40px;
  line-height: 1.3;
  text-align: left;
}
input::-webkit-date-and-time-value { text-align: left; min-height: 1.3em; }
input:is([type="search"], [type="email"], [type="number"], [type="text"], [type="password"], [type="tel"]) { -webkit-appearance: none; appearance: none; }
input[type="number"]::-webkit-inner-spin-button { opacity: .6; }
textarea { -webkit-appearance: none; appearance: none; }
/* iOS amplía la pantalla al enfocar campos con letra menor de 16 px: en teléfonos se usa 16 px. */
@media (max-width: 760px) and (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]), select, textarea { font-size: 16px !important; }
}

/* ====================================================================================================
   Dashboard compacto: tipos de auditoría (Financieras / Sistemas / Aplicativos), carriles de fases por
   tipo y pestañas sin tablas duplicadas.
   ==================================================================================================== */
:root { --viz-ty-fin: #2a78d6; --viz-ty-sis: #eb6834; --viz-ty-app: #6250d6; }
.viz-ty-fin { --c: var(--viz-ty-fin); } .viz-ty-sis { --c: var(--viz-ty-sis); } .viz-ty-app { --c: var(--viz-ty-app); }
.viz-seg.viz-ty-fin, .viz-seg.viz-ty-sis, .viz-seg.viz-ty-app { background: var(--c); }
.viz-type-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; display: inline-block; }

/* filtros en una sola franja; las acciones del Contralor van junto al título */
#page .ctl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
#page .ctl-head h2 { margin: 0; }
#page .ctl-head-note { margin: 2px 0 10px; font-size: .84rem; }
#page .ctl-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
#page .ctl-actions button.sm { min-height: 32px; padding: 4px 12px; font-size: .8rem; }
#page .ctl-filters.ctl-filters-compact { padding: 10px 14px 12px; margin-bottom: 10px; display: block; }
#page .ctl-filters-compact .toolbar { display: grid; grid-template-columns: repeat(auto-fit, minmax(122px, 1fr)); gap: 8px 10px; margin: 0; align-items: end; }
#page .ctl-filters-compact .toolbar > :is(label, button) { grid-column: auto; }
#page .ctl-filters-compact .toolbar label { min-width: 0; margin: 0; font-size: .74rem; display: flex; flex-direction: column; gap: 3px; }
#page .ctl-filters-compact :is(input, select) { min-height: 36px; height: 36px; padding-top: 4px; padding-bottom: 4px; width: 100%; margin: 0; }
#page .ctl-filters-compact .toolbar > button { min-height: 36px; height: 36px; padding: 4px 16px; margin: 0; }
#page .ctl-tabs { margin-bottom: 10px; }
#page .ctl-tab-panel > * + * { margin-top: 12px; }
#page .ctl-tab-panel .contralor-panel { margin-bottom: 0; }

/* una tarjeta por tipo de auditoría */
.viz-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.viz-type, #page .viz-types button.viz-type { display: flex; flex-direction: column; gap: 8px; text-align: left; width: 100%; padding: 14px 16px; border-radius: var(--cc-radius, 13px);
  border: 1px solid var(--cc-line, #e0e7ef); border-top: 3px solid var(--c, var(--cc-line)); background: var(--cc-surface, #fff); color: var(--cc-ink, #19283b);
  box-shadow: var(--cc-shadow, none); font: inherit; min-height: 0; }
.viz-type:has(.viz-ty-fin) { --c: var(--viz-ty-fin); } .viz-type:has(.viz-ty-sis) { --c: var(--viz-ty-sis); } .viz-type:has(.viz-ty-app) { --c: var(--viz-ty-app); }
#page .viz-types button.viz-type { cursor: pointer; transition: box-shadow .15s, transform .15s; }
#page .viz-types button.viz-type:hover { box-shadow: 0 8px 22px rgba(25, 40, 59, .1); transform: translateY(-1px); background: var(--cc-surface, #fff); }
#page .viz-types button.viz-type.is-on { box-shadow: 0 0 0 2px var(--c); }
.viz-type-head { display: flex; align-items: center; gap: 8px; font-size: .92rem; }
.viz-type-on { margin-left: auto; font-size: .7rem; font-weight: 700; color: #fff; background: var(--c); padding: 1px 8px; border-radius: 999px; }
.viz-type-main { display: flex; align-items: baseline; gap: 10px; }
.viz-type-n { font-size: 2.1rem; font-weight: 800; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.viz-type-sub { display: flex; flex-direction: column; font-size: .84rem; font-weight: 600; }
.viz-type-sub small { font-weight: 400; color: var(--cc-muted, #69798d); font-size: .76rem; }
.viz-type .viz-track { height: 6px; }
.viz-type-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding-top: 8px; border-top: 1px solid var(--cc-line, #e0e7ef); }
.viz-type-stat { display: flex; flex-direction: column; min-width: 0; }
.viz-type-stat b { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.viz-type-stat span { font-size: .68rem; color: var(--cc-muted, #69798d); line-height: 1.2; }
.viz-type-stat.is-bad b { color: var(--viz-bad-ink, #a32727); }

/* alertas: tres tarjetas y el resto en líneas */
.viz-alert-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.viz-more { margin-top: 10px; }
.viz-more > summary { cursor: pointer; font-weight: 700; font-size: .86rem; color: var(--cc-brand, #294b70); padding: 4px 0; }
.viz-alert-list { display: grid; gap: 4px; margin-top: 6px; max-height: 320px; overflow: auto; }
.viz-alert-line { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 5px 8px; border-radius: 8px;
  border-left: 3px solid var(--c); background: var(--cc-canvas, #f3f6fa); font-size: .82rem; }
.viz-alert-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* carriles de fases: cada tipo de auditoría con las fases que recorre */
.viz-lanes { display: grid; gap: 10px; }
.viz-lane { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--cc-line, #e0e7ef);
  border-left: 4px solid var(--c, var(--cc-line)); border-radius: 12px; background: var(--cc-canvas, #f6f8fb); }
.viz-lane:has(.viz-ty-fin) { --c: var(--viz-ty-fin); } .viz-lane:has(.viz-ty-sis) { --c: var(--viz-ty-sis); } .viz-lane:has(.viz-ty-app) { --c: var(--viz-ty-app); }
.viz-lane.is-idle { grid-template-columns: 1fr; padding: 8px 12px; opacity: .75; }
.viz-lane-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.viz-lane-head b { font-size: .95rem; }
.viz-lane-n { flex-basis: 100%; font-size: .78rem; color: var(--cc-muted, #69798d); }
.viz-lane.is-idle .viz-lane-n { flex-basis: auto; }
.viz-lane .viz-flow { padding-bottom: 0; gap: 4px; }
.viz-lane .viz-flow-step { padding: 8px 10px; min-width: 104px; display: flex; flex-direction: column; gap: 3px; }
.viz-flow-top { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.viz-lane .viz-flow-n { font-size: 1.45rem; }
.viz-flow-days { font-size: .7rem; font-weight: 600; color: var(--cc-muted, #69798d); white-space: nowrap; }
.viz-lane .viz-flow-name { min-height: 0; font-size: .78rem; line-height: 1.2; }
.viz-lane .viz-flow-arrow { font-size: 1.2rem; }

/* calidad: solo lo que pide atención */
.viz-quality { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.viz-qcard { padding: 10px 12px; }
.viz-q-fine { margin: 10px 0 0; font-size: .8rem; }
.viz-kpis.viz-kpis-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* horas y actividades, compacta */
.viz-compact > * + * { margin-top: 12px; }
.viz-compact .viz-hero { grid-template-columns: 230px minmax(0, 1fr) minmax(250px, 300px); gap: 12px; }
.viz-compact .viz-hero > .contralor-panel { margin: 0; }
.viz-compact .viz-gauge-wrap { width: min(100%, 210px); }
.viz-compact .viz-hero-gauge { padding-top: 14px; padding-bottom: 12px; }
.viz-compact .viz-hero-gauge .muted { font-size: .74rem; margin: 6px 0 0; }
.viz-compact .viz-kpi { padding: 12px 14px; }
.viz-compact .viz-kpi-value { font-size: 1.55rem; }
.viz-compact .viz-donut-wrap { grid-template-columns: 96px minmax(0, 1fr); gap: 10px; align-items: center; }
.viz-compact .viz-donut-wrap .viz-donut { width: 96px; max-width: 96px; }
.viz-compact .viz-place-legend { width: 100%; gap: 0; }
.viz-compact .viz-place-item { padding: 3px 6px; font-size: .8rem; gap: 6px; grid-template-columns: 10px minmax(0, 1fr) auto; }
.viz-compact .viz-place-pct { display: none; }
.viz-compact .viz-person { padding-top: 4px; padding-bottom: 4px; }
.viz-compact .viz-person-name { flex-direction: row; align-items: baseline; gap: 8px; }
.viz-compact .viz-person-val { flex-direction: row; align-items: center; justify-content: flex-end; gap: 8px; }
.viz-compact .viz-hbar { grid-template-columns: minmax(110px, 1fr) minmax(60px, 1.2fr) auto; }
.viz-stack > * + * { margin-top: 8px; }
.viz-subhead { margin: 14px 0 4px; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--cc-muted, #69798d); }
#page .viz-hero4 .viz-kpi-hero { padding: 12px 16px; }

@media (max-width: 1100px) {
  .viz-kpis.viz-kpis-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .viz-compact .viz-hero { grid-template-columns: 230px minmax(0, 1fr); }
  .viz-compact .viz-hero > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .viz-lane { grid-template-columns: 1fr; }
  .viz-type-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .viz-compact .viz-hero { grid-template-columns: 1fr; }
  .viz-compact .viz-hero > :last-child { grid-column: auto; }
  #page .ctl-actions { margin-left: 0; }
}
.viz-compact .viz-gauge-pct { font-size: 1.45rem; }
.viz-compact .viz-gauge-sub { font-size: .7rem; }
.viz-compact .viz-hero-gauge .viz-chip { font-size: .76rem; padding: 3px 10px; }

/* listado de auditorías: un bloque por tipo en «Todas las auditorías» */
.au-grid.au-grid-grouped { display: block; }
.au-group + .au-group { margin-top: 18px; }
.au-group-title { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 1rem; }
.au-group-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* registro de actividades: historial de observaciones y carga de actividades pasadas */
.act-timeline { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; max-height: 420px; overflow: auto; }
.act-note { border-left: 3px solid var(--viz-bar, #3567a0); background: var(--cc-canvas, #f3f6fa); border-radius: 8px; padding: 7px 10px; }
.act-note-REINICIO { border-left-color: var(--viz-warn, #fab219); } .act-note-EDICION { border-left-color: #93a3b6; }
.act-note-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: .82rem; }
.act-note-head .muted { font-size: .76rem; }
.act-note-body { font-size: .9rem; white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 2px; }
.act-running-notes h4 { margin: 12px 0 0; font-size: .86rem; }
.act-running-notes button { margin-top: 6px; }
.act-hint { margin: 10px 0 0; font-size: .82rem; }
#page label.act-backfill { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 7px 12px; border: 1px dashed var(--cc-line, #c8d4e1);
  border-radius: 10px; font-size: .86rem; font-weight: 600; cursor: pointer; background: var(--cc-canvas, #f6f8fb); }
#page .act-list .actions { display: flex; flex-wrap: wrap; gap: 4px; }
#page .act-list .actions button.sm { min-height: 28px; padding: 3px 9px; font-size: .78rem; }
#page .act-list td { vertical-align: middle; }

/* actividades que abarcan el mismo tiempo */
.act-overlap, .viz-overlap { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; background: #fff4dc; color: var(--viz-warn-ink, #7a4f00);
  font-size: .68rem; font-weight: 700; line-height: 1.5; white-space: nowrap; }
.viz-overlap { margin-left: 0; width: fit-content; }

/* redacción de Objetivos y Alcance con el motor de reglas */
.draft-box { margin: -2px 0 12px; padding: 10px 12px; border: 1px solid #cfe0f3; border-left: 4px solid var(--viz-bar, #3567a0); border-radius: 10px;
  background: linear-gradient(180deg, #f5f9fe, #fff); display: grid; gap: 7px; }
.draft-box[hidden] { display: none; }
.draft-head { display: flex; align-items: baseline; gap: 8px; font-size: .86rem; }
.draft-head .muted { font-size: .76rem; }
.draft-chips { display: flex; flex-wrap: wrap; gap: 6px; }
#page .draft-chips button.draft-chip, .modal .draft-chips button.draft-chip { padding: 3px 10px; min-height: 0; border-radius: 999px; font-size: .76rem; font-weight: 600;
  border: 1px solid var(--cc-line, #c8d4e1); background: #fff; color: var(--cc-ink, #19283b); }
#page .draft-chips button.draft-chip.is-on, .modal .draft-chips button.draft-chip.is-on { background: var(--cc-brand, #294b70); color: #fff; border-color: var(--cc-brand, #294b70); }
.draft-text { font-size: .88rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 190px; overflow: auto; padding: 8px 10px; background: #fff;
  border: 1px solid var(--cc-line, #e0e7ef); border-radius: 8px; }
.draft-basis { font-size: .76rem; }
.draft-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.draft-actions .muted { font-size: .76rem; }
.viz-compact .viz-person-name.has-overlap { flex-direction: column; align-items: flex-start; gap: 1px; }
.viz-person-name span.viz-overlap { overflow: visible; text-overflow: clip; }

/* ===== Inicio · Resumen por dominio (auditorías, actividades, informes y top 3 de notas) ===== */
:root {
  --hs-gestion: #2a78d6; --hs-pend: #eda100; --hs-cerrada: #1baf7a; --hs-emitido: #2a78d6; --hs-firmar: #6250d6; --hs-devuelto: #d03b3b;
  --hs-ty-sis: #eb6834; --hs-ty-app: #6250d6; --hs-ty-suc: #2a78d6; --hs-ty-uni: #1baf7a;
}
.hs { display: grid; gap: 14px; margin: 0 0 18px; }
.hs-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.hs-head h2 { margin: 0; font-size: 1.25rem; }
.hs-head p { margin: 2px 0 0; color: var(--cc-muted, #69798d); font-size: .85rem; }
.hs-groups { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border: 1px solid var(--cc-line, #d7dee8); border-radius: 12px; background: var(--cc-surface, #fff); }
.hs-group { margin: 0; padding: 7px 14px; border-radius: 9px; border: 0; font-weight: 700; font-size: .85rem; color: var(--cc-ink, #19283b); background: transparent; }
.hs-group:hover { background: var(--cc-canvas, #f3f6fa); }
.hs-group.is-on { background: var(--cc-brand, #294b70); color: #fff; }
.hs-body.is-busy { opacity: .55; transition: opacity .15s ease; }
.hs-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); grid-template-areas: "aud inf" "act act" "tip tip"; }
.hs-grid > .hs-card:nth-child(1) { grid-area: aud; } .hs-grid > .hs-card:nth-child(2) { grid-area: act; }
.hs-grid > .hs-card:nth-child(3) { grid-area: inf; } .hs-grid > .hs-card:nth-child(4) { grid-area: tip; }
.hs-card { background: var(--cc-surface, #fff); border: 1px solid var(--cc-line, #d7dee8); border-radius: 16px; padding: 16px 18px; min-width: 0; }
.hs-card-head h3 { margin: 0; font-size: 1rem; }
.hs-card-head p { margin: 2px 0 12px; color: var(--cc-muted, #69798d); font-size: .8rem; }
.hs-split { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 18px; }
.hs-aside { border-left: 1px solid var(--cc-line, #d7dee8); padding-left: 18px; }
.hs-aside h4 { margin: 0 0 8px; font-size: .85rem; color: var(--cc-muted, #69798d); text-transform: uppercase; letter-spacing: .04em; }
.hs-donut-wrap { display: grid; grid-template-columns: minmax(130px, 180px) 1fr; gap: 14px; align-items: center; }
.hs-donut-wrap.is-small { grid-template-columns: minmax(96px, 120px) 1fr; }
.hs-donut-wrap.is-small .viz-donut-total { font-size: 30px; }
.hs-empty-ring { stroke: var(--cc-line, #d7dee8); }
.hs-legend { display: grid; gap: 4px; }
.hs-leg { display: grid; grid-template-columns: 12px 1fr auto auto; gap: 8px; align-items: center; width: 100%; margin: 0; padding: 6px 8px; text-align: left;
  border: 1px solid transparent; border-radius: 9px; font-size: .84rem; background: transparent; }
.hs-leg:hover:not(:disabled) { background: var(--cc-canvas, #f3f6fa); }
.hs-leg.is-on { border-color: var(--cc-brand, #294b70); background: var(--cc-canvas, #f3f6fa); }
.hs-leg:disabled { opacity: .55; cursor: default; }
.hs-leg .viz-sw { width: 12px; height: 12px; }
.hs-leg-pct { color: var(--cc-muted, #69798d); font-size: .78rem; min-width: 3.2em; text-align: right; }
.hs-c-EN_GESTION { --c: var(--hs-gestion); } .hs-c-PENDIENTE { --c: var(--hs-pend); } .hs-c-CERRADA { --c: var(--hs-cerrada); }
.hs-c-EMITIDO { --c: var(--hs-emitido); } .hs-c-POR_FIRMAR { --c: var(--hs-firmar); } .hs-c-DEVUELTO { --c: var(--hs-devuelto); } .hs-c-FIRMADO { --c: var(--hs-cerrada); }
.hs-a-INICIADA { --c: var(--hs-gestion); } .hs-a-SUSPENDIDA { --c: var(--hs-pend); } .hs-a-POR_INICIAR { --c: #a3adb8; } .hs-a-CULMINADA { --c: var(--hs-cerrada); }
.hs-donut .viz-arc.is-on { transform: scale(1.05); }
.hs-drill { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--cc-line, #d7dee8); border-radius: 12px; background: var(--cc-canvas, #f3f6fa); }
.hs-drill-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; font-size: .85rem; }
.hs-drill-list { display: grid; gap: 2px; max-height: 240px; overflow: auto; }
.hs-drill-item { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; width: 100%; margin: 0; padding: 6px 8px; text-align: left; border: 0; border-radius: 8px; font-size: .82rem; background: transparent; }
.hs-drill-item:hover { background: var(--cc-surface, #fff); }
.hs-drill-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hs-drill-item small { color: var(--cc-muted, #69798d); }
.hs-drill-item em { font-style: normal; font-weight: 700; font-size: .72rem; color: var(--viz-bad-ink, #a32727); }
.hs-more { margin: 6px 0 0; font-size: .76rem; color: var(--cc-muted, #69798d); }
.hs-table-wrap { overflow-x: auto; }
.hs-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.hs-table th, .hs-table td { padding: 8px 10px; border-bottom: 1px solid var(--cc-line, #e4eaf1); text-align: left; white-space: nowrap; }
.hs-table th { font-size: .74rem; text-transform: uppercase; letter-spacing: .03em; color: var(--cc-muted, #69798d); font-weight: 700; }
.hs-table th.num, .hs-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.hs-table th .viz-sw { width: 9px; height: 9px; margin-right: 6px; vertical-align: baseline; }
.hs-table td.is-zero { color: var(--cc-muted, #9aa7b6); }
.hs-table td.is-total { font-weight: 800; }
.hs-table td:first-child { white-space: normal; min-width: 180px; }
.hs-table tfoot th { border-bottom: 0; border-top: 2px solid var(--cc-line, #d7dee8); color: var(--cc-ink, #19283b); font-size: .82rem; }
.hs-name { font-weight: 600; }
.hs-tag { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; font-size: .68rem; font-weight: 700; color: #fff; background: var(--c, #6b7a8c); vertical-align: middle; }
.hs-t-SISTEMAS { --c: var(--hs-ty-sis); } .hs-t-APLICATIVO { --c: var(--hs-ty-app); } .hs-t-SUCURSALES { --c: var(--hs-ty-suc); } .hs-t-UNIDADES { --c: var(--hs-ty-uni); }
.hs-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.hs-type { border: 1px solid var(--cc-line, #d7dee8); border-top: 4px solid var(--c, #6b7a8c); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.hs-type-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.hs-type-head h4 { margin: 0; font-size: .95rem; }
.hs-type-n { font-size: .75rem; color: var(--cc-muted, #69798d); }
.hs-type-avg { margin: 6px 0 8px; font-size: 1.6rem; font-weight: 800; line-height: 1.1; }
.hs-type-avg small { display: block; margin-top: 2px; font-size: .72rem; font-weight: 500; color: var(--cc-muted, #69798d); }
.hs-top { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.hs-top-row { display: grid; grid-template-columns: 20px minmax(0, 1fr) 56px auto; gap: 8px; align-items: center; width: 100%; margin: 0; padding: 5px 4px; border: 0; border-radius: 8px; text-align: left; font-size: .82rem; background: transparent; }
.hs-top-row:hover { background: var(--cc-canvas, #f3f6fa); }
.hs-rank { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: .7rem; font-weight: 800; color: #fff; background: var(--c, #6b7a8c); }
.hs-top-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hs-bar { display: block; height: 8px; border-radius: 999px; background: var(--cc-line, #e4eaf1); overflow: hidden; }
.hs-bar i { display: block; height: 100%; width: var(--w, 0%); border-radius: inherit; background: var(--c, #6b7a8c); }
.hs-notop { margin: 4px 0 0; font-size: .8rem; }
@media (max-width: 900px) {
  .hs-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "aud" "act" "inf" "tip"; }
  .hs-split { grid-template-columns: minmax(0, 1fr); }
  .hs-aside { border-left: 0; padding-left: 0; border-top: 1px solid var(--cc-line, #d7dee8); padding-top: 12px; }
}
@media (max-width: 520px) {
  .hs-donut-wrap, .hs-donut-wrap.is-small { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .hs-donut-wrap .viz-donut { max-width: 180px; }
  .hs-legend { width: 100%; }
  .hs-groups { width: 100%; } .hs-group { flex: 1 1 auto; }
}

/* Los botones del resumen conservan el color de texto del tema (el estilo «tertiary» los dejaba sin tinta) */
.hs .hs-leg, .hs .hs-drill-item, .hs .hs-top-row, .hs .hs-group:not(.is-on) { color: var(--cc-ink, #19283b); box-shadow: none; min-height: 0; }
.hs .hs-group.is-on { color: #fff; }
.hs .hs-leg b, .hs .hs-drill-item b, .hs .hs-top-row b { color: inherit; }
.hs-card .viz-donut { min-width: 0; }
.hs-top-row { grid-template-columns: 20px minmax(0, 1fr) auto; row-gap: 3px; }
.hs-top-row .hs-bar { grid-column: 2 / 4; grid-row: 2; }
.hs-donut-wrap.is-small .hs-leg-pct { display: none; }
.hs-donut-wrap.is-small .hs-leg { grid-template-columns: 12px 1fr auto; }

/* ===== Administrador · Usuarios: identidad, roles, estado y menú de acciones ===== */
.usr-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0 14px; }
.usr-search { flex: 1 1 260px; max-width: 420px; margin: 0; }
.usr-filter { width: auto; min-width: 140px; margin: 0; }
.usr-count { margin-left: auto; font-size: .85rem; }
.usr-table td { vertical-align: middle; }
.usr-id { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.usr-id b { display: block; line-height: 1.25; }
.usr-id small { display: block; color: var(--cc-muted, #69798d); font-size: .78rem; word-break: break-all; }
.usr-avatar { flex: none; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; font-size: .82rem; font-weight: 800;
  color: #fff; background: linear-gradient(135deg, var(--cc-brand, #294b70), #4a7bb0); }
.usr-roles { display: flex; flex-wrap: wrap; gap: 4px; }
.usr-chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .74rem; font-weight: 700; color: var(--cc-brand, #294b70);
  background: var(--cc-canvas, #eaf0f7); border: 1px solid var(--cc-line, #d7dee8); white-space: nowrap; }
.usr-state { display: flex; flex-wrap: wrap; gap: 4px; }
.usr-actions { display: flex; flex-wrap: nowrap; align-items: center; justify-content: flex-end; gap: 6px; }
.usr-actions button { margin: 0; white-space: nowrap; }
.usr-more { min-width: 74px; }
.usr-more[aria-expanded="true"] { background: var(--cc-canvas, #eaf0f7); }
.usr-menu { position: fixed; top: var(--y, 0); left: var(--x, 0); z-index: 1000; width: 300px; max-width: calc(100vw - 16px); padding: 8px;
  background: var(--cc-surface, #fff); border: 1px solid var(--cc-line, #d7dee8); border-radius: 14px; box-shadow: 0 18px 40px rgba(16, 32, 56, .22); }
.usr-menu-who { display: grid; padding: 6px 10px 8px; border-bottom: 1px solid var(--cc-line, #e4eaf1); margin-bottom: 4px; }
.usr-menu-who small { color: var(--cc-muted, #69798d); }
.usr-menu-title { padding: 8px 10px 2px; font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--cc-muted, #69798d); }
.usr-menu-item { display: grid; width: 100%; margin: 0; padding: 8px 10px; text-align: left; border: 0; border-radius: 9px; background: transparent;
  color: var(--cc-ink, #19283b); font-weight: 600; font-size: .86rem; box-shadow: none; min-height: 0; }
.usr-menu-item small { font-weight: 400; font-size: .74rem; color: var(--cc-muted, #69798d); }
.usr-menu-item:hover, .usr-menu-item:focus { background: var(--cc-canvas, #f3f6fa); outline: none; }
.usr-menu-item.is-danger, .usr-menu-item.is-danger small { color: var(--viz-bad-ink, #a32727); }
.usr-menu-item.is-danger:hover, .usr-menu-item.is-danger:focus { background: #fbe9e9; }
@media (max-width: 760px) { .usr-actions { flex-wrap: wrap; justify-content: flex-start; } .usr-count { margin-left: 0; width: 100%; } }
.usr-toolbar .usr-search { flex: 1 1 260px; width: auto; max-width: 420px; }
.usr-toolbar .usr-filter { flex: none; width: 160px; min-width: 0; }
.usr-menu .usr-menu-item { background: transparent; color: var(--cc-ink, #19283b); border: 0; box-shadow: none; text-transform: none; letter-spacing: 0; }
.usr-menu .usr-menu-item small { color: var(--cc-muted, #69798d); }
.usr-menu .usr-menu-item:hover, .usr-menu .usr-menu-item:focus { background: var(--cc-canvas, #eef3f9); }
.usr-menu .usr-menu-item.is-danger, .usr-menu .usr-menu-item.is-danger small { color: var(--viz-bad-ink, #a32727); }
.usr-menu .usr-menu-item.is-danger:hover, .usr-menu .usr-menu-item.is-danger:focus { background: #fbe9e9; }
#page .usr-toolbar .usr-search { flex: 1 1 260px; width: auto; max-width: 420px; }
#page .usr-toolbar .usr-filter { flex: none; width: 170px; }
.usr-table th:last-child { text-align: right; }
@media (max-width: 760px) {
  .usr-table table, .usr-table tbody, .usr-table tr, .usr-table td { display: block; width: 100%; }
  .usr-table thead { display: none; }
  .usr-table tr { padding: 12px 4px; border-bottom: 1px solid var(--cc-line, #e4eaf1); }
  .usr-table tr[hidden] { display: none; }
  .usr-table td { padding: 4px 8px; border: 0; }
  .usr-table td:nth-child(4) { display: none; }
  .usr-id { min-width: 0; }
}
