/*
 * SGC CMP — Visual system 2026
 * Capa deliberadamente aislada bajo body.ui-2026. La aplicación conserva
 * su DOM, IDs y lógica; este archivo redefine únicamente presentación.
 */

body.ui-2026 {
  --ui26-rail: 74px;
  --ui26-rail-open: 232px;
  --ui26-radius-xl: 22px;
  --ui26-radius-lg: 16px;
  --ui26-radius-md: 12px;
  --ui26-ease: cubic-bezier(.2,.8,.2,1);
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  text-rendering: optimizeLegibility;
}

body.ui-2026[data-theme="premium"] {
  --ds-page-bg: #090b10;
  --ds-card: rgba(17,20,28,.82);
  --ds-surface: rgba(255,255,255,.045);
  --ds-border: rgba(255,255,255,.085);
  --ds-border-strong: rgba(255,255,255,.16);
  --ds-text: #f7f8fb;
  --ds-text-secondary: #b0b5c2;
  --ds-muted: #727987;
  --ds-accent: #9b87f5;
  --ds-accent-soft: rgba(155,135,245,.13);
  --ds-accent-border: rgba(155,135,245,.34);
  --bg: var(--ds-page-bg);
  --card: #11141c;
  --border: var(--ds-border);
  --text: var(--ds-text);
  --text-strong: var(--ds-text);
  --text-secondary: var(--ds-text-secondary);
  --muted: var(--ds-muted);
  --muted-light: #727987;
  background-color: #090b10;
  background-image:
    radial-gradient(850px circle at 76% -15%, rgba(124,92,255,.16), transparent 52%),
    radial-gradient(620px circle at 12% 0%, rgba(38,169,138,.08), transparent 47%);
}

/* Shell y rail */
body.ui-2026 .sidebar {
  width: var(--ui26-rail);
  min-width: var(--ui26-rail);
  padding: 14px 10px 12px;
  background: rgba(9,11,16,.92);
  border-right: 1px solid rgba(255,255,255,.07);
  backdrop-filter: blur(22px) saturate(130%);
  transition: width .25s var(--ui26-ease), min-width .25s var(--ui26-ease);
}

body.ui-2026.sidebar-expanded {
  --sidebar-w: var(--ui26-rail-open);
}

body.ui-2026.sidebar-expanded .sidebar {
  width: var(--ui26-rail-open);
  min-width: var(--ui26-rail-open);
}

body.ui-2026 .sidebar-logo {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(145deg,#8d75f6,#6655d8);
  box-shadow: 0 9px 28px rgba(111,87,222,.28), inset 0 1px rgba(255,255,255,.2);
}

body.ui-2026 .sidebar-logo-mark img { width: 24px; height: 24px; }
body.ui-2026 .sidebar-nav { gap: 3px; padding: 0 4px; }

body.ui-2026 .nav-item {
  width: 46px;
  min-height: 42px;
  border-radius: 12px;
  color: #777e8c;
  background: transparent;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}

body.ui-2026 .nav-item:hover {
  color: #eef0f6;
  background: rgba(255,255,255,.06);
  transform: translateY(-1px);
}

body.ui-2026 .nav-item.active {
  color: #fff;
  background: linear-gradient(145deg,rgba(155,135,245,.28),rgba(155,135,245,.13));
  box-shadow: inset 0 0 0 1px rgba(173,158,255,.22), 0 8px 24px rgba(75,55,155,.13);
}

body.ui-2026 .nav-item .nav-ic {
  font-size: 17px;
  line-height: 1;
  filter: grayscale(1) saturate(0) brightness(1.35);
  opacity: .92;
}

body.ui-2026 .nav-item.active .nav-ic,
body.ui-2026 .nav-item:hover .nav-ic { filter: grayscale(1) brightness(2); }

body.ui-2026 .nav-search {
  border: 0 !important;
  background: rgba(255,255,255,.04);
  margin-bottom: 8px !important;
}

body.ui-2026 .sidebar-toggle {
  width: 44px;
  min-height: 32px;
  border-radius: 10px;
  border-color: rgba(255,255,255,.07);
  color: #707684;
  margin: 7px 0 0;
}

body.ui-2026.sidebar-expanded .sidebar-toggle { width: calc(100% - 8px); }
body.ui-2026 .sidebar-avatar { background: linear-gradient(145deg,#262b36,#161a22); border: 1px solid rgba(255,255,255,.1); }

/* Herramientas de mantenimiento: separadas de las acciones operativas para
   evitar ejecuciones accidentales y reducir la densidad del encabezado. */
body.ui-2026 .fdir-maintenance { position: relative; }
body.ui-2026 .fdir-maintenance > summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--ds-border, #dfe3ea);
  border-radius: 8px;
  background: var(--ds-card, #fff);
  color: var(--ds-text-secondary, #475569);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}
body.ui-2026 .fdir-maintenance > summary::-webkit-details-marker { display: none; }
body.ui-2026 .fdir-maintenance-menu {
  position: absolute;
  z-index: 80;
  right: 0;
  top: calc(100% + 8px);
  width: min(340px, calc(100vw - 32px));
  padding: 10px;
  border: 1px solid var(--ds-border, #dfe3ea);
  border-radius: 12px;
  background: var(--ds-card, #fff);
  box-shadow: 0 18px 48px rgba(15,23,42,.18);
}
body.ui-2026 .fdir-maintenance-note {
  padding: 8px 9px 10px;
  color: var(--ds-text-secondary, #64748b);
  font-size: 11.5px;
  line-height: 1.45;
}
body.ui-2026 .fdir-maintenance-menu button {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ds-text, #0f172a);
  text-align: left;
  font: 600 12.5px/1.3 var(--font, Inter, sans-serif);
  cursor: pointer;
}
body.ui-2026 .fdir-maintenance-menu button:hover,
body.ui-2026 .fdir-maintenance-menu button:focus-visible { background: var(--ds-hover, rgba(79,70,229,.10)); outline: none; }
body.ui-2026 .fdir-maintenance-menu button.danger { color: var(--err, #b91c1c); }

/* Los encabezados heredados usaban botones blancos con texto fijo. En temas
   oscuros se usan tokens para mantener contraste legible. */
body.ui-2026[data-theme="premium"] .ui26-page-actions > button,
body.ui-2026[data-theme="dark"] .ui26-page-actions > button {
  background: var(--ds-card) !important;
  color: var(--ds-text) !important;
  border-color: var(--ds-border-strong) !important;
}

@media (max-width: 900px) {
  body.ui-2026 .ui26-page-tools { align-items: flex-start !important; }
  body.ui-2026 .ui26-page-actions { width: 100%; }
  body.ui-2026 .fdir-maintenance-menu { left: 0; right: auto; }
}

body.ui-2026.sidebar-expanded .sidebar-logo-mark {
  background: linear-gradient(145deg,#8d75f6,#6655d8) !important;
  box-shadow: 0 9px 28px rgba(111,87,222,.25) !important;
}

body.ui-2026.sidebar-expanded .sidebar-logo-text .s-title { color: #f7f8fb; }
body.ui-2026.sidebar-expanded .nav-item .nav-lbl { color: #9298a5; }
body.ui-2026.sidebar-expanded .nav-item.active .nav-lbl,
body.ui-2026.sidebar-expanded .nav-item:hover .nav-lbl { color: #fff; }

body.ui-2026 .main { background: transparent; }
body.ui-2026 .view:not(#view-aprobacion) { background-color: transparent !important; }
body.ui-2026 .view.active { animation: ui26ViewIn .28s var(--ui26-ease) both; }

@keyframes ui26ViewIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Encabezados y controles */
body.ui-2026 .ds-page-header {
  padding-top: 6px;
  align-items: center;
  margin-bottom: 24px;
}

body.ui-2026 .ds-eyebrow {
  color: #777e8c;
  letter-spacing: .13em;
  font-size: .6rem;
}

body.ui-2026 .ds-h1 {
  font-size: clamp(1.85rem,2.5vw,2.65rem);
  font-weight: 650;
  letter-spacing: -.045em;
}

body.ui-2026 .ds-sub { color: #777e8c; font-size: .76rem; }

body.ui-2026 .ds-btn,
body.ui-2026 .hv2-btn {
  min-height: 38px;
  padding: 9px 14px;
  border-radius: 11px;
  border-color: rgba(255,255,255,.1);
  background: rgba(255,255,255,.045);
  color: #e7e9ef;
  box-shadow: none;
}

body.ui-2026 .ds-btn:hover,
body.ui-2026 .hv2-btn:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.17); }

body.ui-2026 .ds-btn.primary,
body.ui-2026 .hv2-btn.primary {
  background: #f1f2f5;
  border-color: #f1f2f5;
  color: #101218;
  box-shadow: 0 6px 20px rgba(255,255,255,.08);
}

body.ui-2026 .fil-pill,
body.ui-2026 .search-field,
body.ui-2026 select {
  border-color: rgba(255,255,255,.085);
  background-color: rgba(255,255,255,.035);
  color: #c9cdd6;
}

/* Dashboard */
body.ui-2026 #view-dashboard { overflow-y: auto; }

body.ui-2026 #view-dashboard .ui26-dashboard-header {
  padding: 34px 36px 20px !important;
  background: transparent !important;
  border: 0 !important;
}

body.ui-2026 #view-dashboard .ui26-dashboard-header .ds-h1 {
  font-size: clamp(2.15rem,3vw,3.25rem);
}

body.ui-2026 #dash-kpi-row {
  grid-template-columns: repeat(6,minmax(130px,1fr)) !important;
  padding: 10px 36px 0 !important;
  gap: 10px !important;
  background: transparent !important;
}

body.ui-2026 #view-dashboard .dash-kpi-card {
  min-height: 138px;
  background: rgba(17,20,28,.72) !important;
  border: 1px solid rgba(255,255,255,.075) !important;
  border-radius: 16px !important;
  box-shadow: inset 0 1px rgba(255,255,255,.025), 0 14px 40px rgba(0,0,0,.13) !important;
  backdrop-filter: blur(18px);
}

body.ui-2026 #view-dashboard .dash-kpi-card > div:first-child {
  height: 1px !important;
  opacity: .5;
}

body.ui-2026 #view-dashboard .dash-kpi-card .panel-body-col { padding: 17px 17px 15px; }
body.ui-2026 #view-dashboard .dash-kpi-card .kpi-val { font-size: 2.05rem !important; font-weight: 620 !important; }
body.ui-2026 #view-dashboard .dash-kpi-card .flex-between-14 > div:first-child { letter-spacing: .08em !important; color: #777e8c !important; }
body.ui-2026 #view-dashboard .dash-kpi-card .flex-between-14 > div:last-child { background: rgba(255,255,255,.045) !important; filter: grayscale(1); }

body.ui-2026 #dash-main-body {
  padding: 16px 36px 42px !important;
  gap: 12px !important;
  overflow: visible !important;
  background: transparent !important;
}

body.ui-2026 #view-dashboard .dash-tile { min-height: 210px; }
body.ui-2026 #view-dashboard .dash-tile > * {
  height: 100%;
  background: rgba(17,20,28,.72) !important;
  border: 1px solid rgba(255,255,255,.075) !important;
  border-radius: var(--ui26-radius-lg) !important;
  box-shadow: inset 0 1px rgba(255,255,255,.025), 0 16px 42px rgba(0,0,0,.12) !important;
  backdrop-filter: blur(18px);
}

body.ui-2026 #dash-urgentes > * {
  background:
    linear-gradient(125deg,rgba(144,117,245,.13),transparent 46%),
    rgba(17,20,28,.8) !important;
}

body.ui-2026 #view-dashboard .card-hdr-row { border-color: rgba(255,255,255,.07); }
body.ui-2026 #view-dashboard .hover-row { border-color: rgba(255,255,255,.055); }
body.ui-2026 #view-dashboard .hover-row:hover { background: rgba(255,255,255,.035); }

/* Directorio */
body.ui-2026 #view-funcionarios { overflow-y: auto; background: transparent !important; }
body.ui-2026 #view-funcionarios > div:first-child { padding: 30px 36px 44px !important; }
body.ui-2026 .ui26-page-tools { margin-bottom: 16px !important; }
body.ui-2026 .ui26-page-tools > div:first-child { color: #737987 !important; }
body.ui-2026 .ui26-page-tools > div:first-child span:last-child { color: #d7dae1 !important; }

body.ui-2026 .ui26-page-actions { gap: 6px !important; }
body.ui-2026 .ui26-page-actions button {
  padding: 7px 10px !important;
  border-radius: 9px !important;
  border-color: rgba(255,255,255,.08) !important;
  background: rgba(255,255,255,.035) !important;
  color: #9da3af !important;
}
body.ui-2026 .ui26-page-actions button:hover { background: rgba(255,255,255,.07) !important; color: #f5f6f8 !important; }

body.ui-2026 #view-funcionarios .hv2-shell {
  border-radius: var(--ui26-radius-xl);
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(15,18,25,.78);
  box-shadow: 0 28px 80px rgba(0,0,0,.2), inset 0 1px rgba(255,255,255,.03);
}

body.ui-2026 #view-funcionarios .hv2-band {
  padding: 28px 30px 0;
  background:
    radial-gradient(520px circle at 88% -50%,rgba(155,135,245,.18),transparent 60%),
    #10131a;
}

body.ui-2026 #view-funcionarios .hv2-name { font-size: 1.35rem; letter-spacing: -.025em; }
body.ui-2026 #view-funcionarios .hv2-avatar { background: rgba(155,135,245,.12); border: 1px solid rgba(155,135,245,.24); }
body.ui-2026 #view-funcionarios .hv2-status-badge { background: rgba(60,207,150,.1); color: #55d6a2; border: 1px solid rgba(60,207,150,.2); }
body.ui-2026 #view-funcionarios .hv2-metric-value { font-weight: 600; letter-spacing: -.035em; }
body.ui-2026 #view-funcionarios .hv2-tab { border-radius: 9px 9px 0 0; color: #7f8693; }
body.ui-2026 #view-funcionarios .hv2-tab.active {
  color: #f5f6f8;
  border-color: #9b87f5;
  background: rgba(155,135,245,.12) !important;
  box-shadow: inset 0 0 0 1px rgba(155,135,245,.12);
}

body.ui-2026 #view-funcionarios .hv2-workspace {
  padding: 20px 24px 26px;
  min-height: 520px;
  background: rgba(8,10,15,.38);
}

body.ui-2026 .ui26-directory-tools > div:first-child,
body.ui-2026 .ui26-directory-tools select,
body.ui-2026 .ui26-directory-tools button {
  background: rgba(255,255,255,.035) !important;
  border-color: rgba(255,255,255,.085) !important;
  color: #b6bbc5 !important;
}

body.ui-2026 .ui26-directory-tools input { color: #e8eaf0 !important; }
body.ui-2026 .ui26-directory-tools input::placeholder { color: #636a77; }

body.ui-2026 .fdir-v3-table-card {
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 15px;
  overflow: hidden;
  background: rgba(255,255,255,.018) !important;
}
body.ui-2026 #view-funcionarios .fdir-v3-table thead tr { background: rgba(255,255,255,.03); border-color: rgba(255,255,255,.07); }
body.ui-2026 #view-funcionarios .fdir-v3-table th { color: #6f7684; }
body.ui-2026 #view-funcionarios .fdir-v3-table td { border-color: rgba(255,255,255,.055); }
body.ui-2026 #view-funcionarios .fdir-v3-table tbody tr:hover { background: rgba(255,255,255,.03); }

/* Aprobación y SGI */
body.ui-2026 #view-aprobacion { padding: 34px 36px 70px !important; }
body.ui-2026 #view-aprobacion .grid-kpi-auto { gap: 10px; }
body.ui-2026 #view-aprobacion .grid-kpi-auto > * {
  background: rgba(17,20,28,.72) !important;
  border: 1px solid rgba(255,255,255,.075) !important;
  border-radius: var(--ui26-radius-lg) !important;
  box-shadow: none !important;
}

body.ui-2026 .ui26-workflow-search .search-field {
  min-height: 48px;
  border-radius: 13px;
  background: rgba(255,255,255,.03);
}

body.ui-2026 .ui26-workflow-layout .card-xl {
  border: 1px solid rgba(255,255,255,.075);
  border-radius: var(--ui26-radius-lg) !important;
  background: rgba(17,20,28,.66) !important;
  box-shadow: none;
}

body.ui-2026 #aprob-tabla thead tr,
body.ui-2026 #aprob-tabla td { border-color: rgba(255,255,255,.06) !important; }

body.ui-2026 .ui26-sgi-section {
  margin-top: 38px !important;
  padding-top: 26px;
  border-top: 1px solid rgba(255,255,255,.075);
}

body.ui-2026 .ui26-sgi-head { gap: 18px; }
body.ui-2026 .ui26-sgi-head > div:first-child > div:first-child { font-size: 1.2rem !important; letter-spacing: -.025em; }
body.ui-2026 .ui26-sgi-actions { flex-wrap: wrap; justify-content: flex-end; }
body.ui-2026 .ui26-sgi-actions button {
  min-height: 36px;
  padding: 8px 12px !important;
  border-radius: 10px !important;
  background: rgba(255,255,255,.045) !important;
  border: 1px solid rgba(255,255,255,.085) !important;
  color: #b7bdc8 !important;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
body.ui-2026 .ui26-sgi-actions button:hover { background: rgba(255,255,255,.08) !important; color: #fff !important; }
body.ui-2026 .ui26-sgi-actions button:first-child { background: #eeeef2 !important; color: #111319 !important; border-color: #eeeef2 !important; }
body.ui-2026 .ui26-sgi-actions button:nth-child(4) { color: #f19a9a !important; border-color: rgba(241,120,120,.2) !important; }

body.ui-2026 .ui26-sgi-filters { margin: 16px 0 12px !important; }
body.ui-2026 .ui26-sgi-filters > div,
body.ui-2026 .ui26-sgi-filters input,
body.ui-2026 .ui26-sgi-filters select {
  background-color: rgba(255,255,255,.03) !important;
  border-color: rgba(255,255,255,.085) !important;
  color: #bdc2cc !important;
}

body.ui-2026 .ui26-sgi-table-shell {
  border-radius: var(--ui26-radius-lg) !important;
  border: 1px solid rgba(255,255,255,.075);
  background: rgba(17,20,28,.65) !important;
  box-shadow: none !important;
  overflow-x: auto !important;
}
body.ui-2026 .ui26-sgi-table { min-width: 1120px; }
body.ui-2026 .ui26-sgi-table thead { background: rgba(255,255,255,.025); }
body.ui-2026 .ui26-sgi-table th { color: #69717f !important; border-color: rgba(255,255,255,.06) !important; }
body.ui-2026 .ui26-sgi-table td { border-color: rgba(255,255,255,.055) !important; }
body.ui-2026 .ui26-sgi-table tbody tr:hover { background: rgba(255,255,255,.028); }

/* Cotejo con Transparencia: evita heredar texto claro sobre superficies
   claras y lo integra visualmente al tema activo. */
body.ui-2026 #auditoria-transp-modal .at-dialog {
  color: #1f2937;
}

body.ui-2026 #auditoria-transp-modal .at-body,
body.ui-2026 #auditoria-transp-modal .at-table,
body.ui-2026 #auditoria-transp-modal .at-table th,
body.ui-2026 #auditoria-transp-modal .at-table td {
  color: #334155;
}

body.ui-2026 #auditoria-transp-modal .at-table th {
  font-weight: 700;
  letter-spacing: .035em;
}

body.ui-2026[data-theme="premium"] #auditoria-transp-modal,
body.ui-2026[data-theme="dark"] #auditoria-transp-modal {
  background: rgba(3,5,9,.78) !important;
  backdrop-filter: blur(12px);
}

body.ui-2026[data-theme="premium"] #auditoria-transp-modal .at-dialog,
body.ui-2026[data-theme="dark"] #auditoria-transp-modal .at-dialog {
  background: #11141c !important;
  color: #e8eaf0 !important;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 20px !important;
  box-shadow: 0 30px 90px rgba(0,0,0,.5) !important;
}

body.ui-2026[data-theme="premium"] #auditoria-transp-modal .at-header,
body.ui-2026[data-theme="dark"] #auditoria-transp-modal .at-header {
  background: #0c0f16 !important;
  border-bottom: 1px solid rgba(255,255,255,.075);
}

body.ui-2026[data-theme="premium"] #auditoria-transp-modal .at-body,
body.ui-2026[data-theme="dark"] #auditoria-transp-modal .at-body {
  background: #11141c;
  color: #c8cdd6 !important;
}

body.ui-2026[data-theme="premium"] #auditoria-transp-modal .at-help,
body.ui-2026[data-theme="dark"] #auditoria-transp-modal .at-help {
  background: rgba(96,165,250,.075) !important;
  border-color: rgba(96,165,250,.18) !important;
  color: #b9c5d7 !important;
}

body.ui-2026[data-theme="premium"] #auditoria-transp-modal .at-help a,
body.ui-2026[data-theme="dark"] #auditoria-transp-modal .at-help a {
  color: #8ab9ff !important;
}

body.ui-2026[data-theme="premium"] #auditoria-transp-modal .at-dropzone,
body.ui-2026[data-theme="dark"] #auditoria-transp-modal .at-dropzone {
  background: rgba(255,255,255,.025) !important;
  border-color: rgba(155,135,245,.42) !important;
}

body.ui-2026[data-theme="premium"] #auditoria-transp-modal .at-dropzone > div:nth-child(2),
body.ui-2026[data-theme="dark"] #auditoria-transp-modal .at-dropzone > div:nth-child(2) {
  color: #edf0f5 !important;
}

body.ui-2026[data-theme="premium"] #auditoria-transp-modal .at-dropzone > div:nth-child(3),
body.ui-2026[data-theme="dark"] #auditoria-transp-modal .at-dropzone > div:nth-child(3) {
  color: #858c99 !important;
}

body.ui-2026[data-theme="premium"] #auditoria-transp-modal .at-kpi,
body.ui-2026[data-theme="dark"] #auditoria-transp-modal .at-kpi {
  background: color-mix(in srgb, var(--at-color) 9%, transparent) !important;
  border-color: color-mix(in srgb, var(--at-color) 28%, transparent) !important;
}

body.ui-2026[data-theme="premium"] #auditoria-transp-modal .at-summary > div,
body.ui-2026[data-theme="dark"] #auditoria-transp-modal .at-summary > div {
  color: #aeb4c0 !important;
}

body.ui-2026[data-theme="premium"] #auditoria-transp-modal .at-summary button,
body.ui-2026[data-theme="dark"] #auditoria-transp-modal .at-summary button {
  background: #eeeef2 !important;
  color: #111319 !important;
  border-radius: 10px !important;
}

body.ui-2026[data-theme="premium"] #auditoria-transp-modal .at-table-shell,
body.ui-2026[data-theme="dark"] #auditoria-transp-modal .at-table-shell {
  border-color: rgba(255,255,255,.085) !important;
  background: rgba(4,6,10,.22);
}

body.ui-2026[data-theme="premium"] #auditoria-transp-modal .at-table thead,
body.ui-2026[data-theme="dark"] #auditoria-transp-modal .at-table thead {
  background: #171a22 !important;
}

body.ui-2026[data-theme="premium"] #auditoria-transp-modal .at-table th,
body.ui-2026[data-theme="dark"] #auditoria-transp-modal .at-table th {
  color: #9299a7 !important;
}

body.ui-2026[data-theme="premium"] #auditoria-transp-modal .at-table td,
body.ui-2026[data-theme="dark"] #auditoria-transp-modal .at-table td {
  color: #d3d7df !important;
}

body.ui-2026[data-theme="premium"] #auditoria-transp-modal .at-table tbody tr,
body.ui-2026[data-theme="dark"] #auditoria-transp-modal .at-table tbody tr {
  border-color: rgba(255,255,255,.065) !important;
}

body.ui-2026[data-theme="premium"] #auditoria-transp-modal .at-table tbody tr:hover,
body.ui-2026[data-theme="dark"] #auditoria-transp-modal .at-table tbody tr:hover {
  background: rgba(255,255,255,.025);
}

/* =====================================================================
   Pase integral de componentes
   Tipografía, tablas, formularios, etiquetas, estados, paneles y modales
   de las 22 vistas. Se excluye el iframe documental, que tiene su propio
   sistema al final de generador-v2.html.
   ===================================================================== */
body.ui-2026 .view:not(#view-generador):not(#view-aprobacion) {
  color: var(--ds-text);
  font-size: 14px;
  line-height: 1.45;
}

body.ui-2026 .view:not(#view-generador):not(#view-aprobacion) :where(h1,h2,h3,h4,h5,h6) {
  color: var(--ds-text);
  letter-spacing: -.025em;
}

body.ui-2026 .view:not(#view-generador):not(#view-aprobacion) :where(p,.text-body-md,.text-82-muted,.view-subtitle) {
  color: var(--ds-text-secondary);
}

body.ui-2026 .view:not(#view-generador):not(#view-aprobacion) :where(
  .kpi-sublabel,.field-meta,.repo-kpi-label,.repo-doc-sub,.repo-recent-sub,
  .audit-date,.gdoc-tl-lbl,.iw-card-desc,.iw-step-status,.form-label,
  .ndoc-label,.gdoc-label,.nf-fg label,.anx-fg label
) {
  color: var(--ds-muted);
  letter-spacing: .055em;
}

body.ui-2026 .view:not(#view-generador):not(#view-aprobacion) :where(
  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  select,textarea,.form-input,.ndoc-input,.gdoc-input,.renov-fil-input
) {
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--ds-border) !important;
  border-radius: 10px !important;
  background: var(--ds-surface) !important;
  color: var(--ds-text) !important;
  box-shadow: none !important;
  outline: none;
}

body.ui-2026 .view:not(#view-generador):not(#view-aprobacion) :where(input,select,textarea)::placeholder {
  color: var(--ds-muted) !important;
  opacity: .8;
}

body.ui-2026 .view:not(#view-generador):not(#view-aprobacion) :where(input,select,textarea):focus {
  border-color: var(--ds-accent) !important;
  box-shadow: 0 0 0 3px var(--ds-accent-soft) !important;
}

body.ui-2026 .view:not(#view-generador):not(#view-aprobacion) :where(input,select,textarea):disabled {
  opacity: .52;
  cursor: not-allowed;
}

body.ui-2026 .view:not(#view-generador):not(#view-aprobacion) :where(button,[role="button"],label[for]) {
  font-family: var(--font);
}

body.ui-2026 .view:not(#view-generador):not(#view-aprobacion) button:not(.nav-item):not(.sidebar-toggle) {
  border-radius: 10px;
}

body.ui-2026 .view:not(#view-generador):not(#view-aprobacion) :where(
  .card-xl,.card-sm,.card-md,.card-float,.ds-card,.section-card,.inner-card,
  .panel-bg-box,.repo-kpi-card,.repo-doc-card,.repo-doc-list-wrap,
  .legal-card,.legal-right,.ctr-widget,.form-section
) {
  border: 1px solid var(--ds-border) !important;
  border-radius: var(--ui26-radius-lg) !important;
  background: var(--ds-card) !important;
  box-shadow: none !important;
}

body.ui-2026 .view:not(#view-generador):not(#view-aprobacion) :where(
  .card-xl,.card-sm,.card-md,.ds-card,.section-card,.repo-doc-card,.legal-card
):hover {
  border-color: var(--ds-border-strong) !important;
}

body.ui-2026 .view:not(#view-generador):not(#view-aprobacion) :where(
  .card-hdr-row,.section-card-header,.panel-hdr-card,.repo-panel-head,
  .repo-panel-section,.repo-panel-footer,.ndoc-foot,.modal-nf-footer,
  .modal-anx-footer,.iw-footer
) {
  border-color: var(--ds-border) !important;
}

/* Tablas: una única escala visual y contraste explícito. */
body.ui-2026 .view:not(#view-generador):not(#view-aprobacion) table {
  width: 100%;
  color: var(--ds-text);
  font-variant-numeric: tabular-nums;
}

body.ui-2026 .view:not(#view-generador):not(#view-aprobacion) table thead {
  background: var(--ds-surface) !important;
}

body.ui-2026 .view:not(#view-generador):not(#view-aprobacion) table th {
  height: 42px;
  padding: 10px 14px !important;
  color: var(--ds-muted) !important;
  font-size: .66rem !important;
  font-weight: 700 !important;
  line-height: 1.2;
  letter-spacing: .085em !important;
  text-transform: uppercase;
  border-color: var(--ds-border) !important;
  white-space: nowrap;
}

body.ui-2026 .view:not(#view-generador):not(#view-aprobacion) table td {
  padding: 12px 14px !important;
  color: var(--ds-text-secondary) !important;
  font-size: .77rem;
  line-height: 1.4;
  border-color: var(--ds-border) !important;
}

body.ui-2026 .view:not(#view-generador):not(#view-aprobacion) table tbody tr {
  background: transparent;
  border-color: var(--ds-border) !important;
  transition: background .14s ease;
}

body.ui-2026 .view:not(#view-generador):not(#view-aprobacion) table tbody tr:hover {
  background: var(--ds-surface) !important;
}

body.ui-2026 .view:not(#view-generador):not(#view-aprobacion) table tbody tr:last-child td {
  border-bottom: 0;
}

/* Filas marcadas por importación: conservar semántica sin superficies claras. */
body.ui-2026[data-theme="premium"] .view tr[style*="background:#f5f3ff"],
body.ui-2026[data-theme="dark"] .view tr[style*="background:#f5f3ff"] {
  background: rgba(155,135,245,.08) !important;
}
body.ui-2026[data-theme="premium"] .view tr[style*="background:#f0fdf4"],
body.ui-2026[data-theme="dark"] .view tr[style*="background:#f0fdf4"] {
  background: rgba(52,211,153,.07) !important;
}
body.ui-2026[data-theme="premium"] .view tr[style*="background:#fffbeb"],
body.ui-2026[data-theme="dark"] .view tr[style*="background:#fffbeb"] {
  background: rgba(251,191,36,.07) !important;
}

/* Etiquetas, pills y estados: misma geometría sin borrar su color semántico. */
body.ui-2026 .view :where(
  .badge,.repo-badge,.repo-panel-badge,.repo-doc-status-badge,.iw-type-badge,
  .hv2-status-badge,.hv2-tab-badge,.badge-count-xs,.badge-auto,.accent-chip,
  [class*="status-badge"],[class*="state-badge"]
) {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 23px;
  padding: 3px 9px;
  border-radius: 999px !important;
  font-size: .64rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .035em;
}

body.ui-2026 .view :where(.fil-pill,.ds-subtabs,.hv2-tabs,.repo-view-toggle) {
  border: 1px solid var(--ds-border);
  background: var(--ds-surface);
  border-radius: 11px;
}

body.ui-2026 .view :where(.ds-subtab,.dot-subtab,.hv2-tab,.fsp-seg,.repo-vt-btn) {
  color: var(--ds-muted);
  border-radius: 9px;
}

body.ui-2026 .view :where(.ds-subtab,.dot-subtab,.hv2-tab,.fsp-seg,.repo-vt-btn).active {
  color: var(--ds-text);
  background: var(--ds-accent-soft);
}

/* Estados vacíos y carga: jerarquía discreta, sin emojis gigantes saturados. */
body.ui-2026 .view :where(.empty-state,.repo-empty,.anx-empty,.panel-loading,.td-loading) {
  color: var(--ds-muted) !important;
}
body.ui-2026 .view :where(.empty-state-icon,.empty-icon) {
  filter: grayscale(1);
  opacity: .55;
}
body.ui-2026 .view .loading-spinner {
  border-color: var(--ds-border);
  border-top-color: var(--ds-accent);
}

/* Modales nativos de la SPA. */
body.ui-2026 :where(
  .modal-nf-overlay,.modal-anx-overlay,.ndoc-overlay,.iw-overlay,
  .modal-flex-overlay,.modal-flex-overlay-lt,[id^="modal-"][style*="position:fixed"]
) {
  backdrop-filter: blur(10px);
}

body.ui-2026 :where(.modal-nf,.modal-anx,.ndoc-modal,.iw-modal) {
  color: var(--ds-text);
  background: var(--ds-card) !important;
  border: 1px solid var(--ds-border);
  border-radius: 20px !important;
  box-shadow: 0 30px 90px rgba(0,0,0,.38) !important;
}

body.ui-2026 :where(.modal-nf-head,.modal-anx-head,.ndoc-head,.iw-head) {
  background: #0d1017 !important;
  border-bottom: 1px solid var(--ds-border);
}

body.ui-2026 :where(.modal-nf-body,.modal-anx-body,.ndoc-body,.iw-body) {
  background: var(--ds-card) !important;
  color: var(--ds-text-secondary);
}

body.ui-2026[data-theme="premium"] .view:not(#view-generador):not(#view-aprobacion) [style*="background:#fff"],
body.ui-2026[data-theme="dark"] .view:not(#view-generador):not(#view-aprobacion) [style*="background:#fff"] {
  background: var(--ds-card) !important;
  border-color: var(--ds-border) !important;
}

body.ui-2026[data-theme="premium"] .view:not(#view-generador):not(#view-aprobacion) [style*="color:#475569"],
body.ui-2026[data-theme="dark"] .view:not(#view-generador):not(#view-aprobacion) [style*="color:#475569"],
body.ui-2026[data-theme="premium"] .view:not(#view-generador):not(#view-aprobacion) [style*="color:#334155"],
body.ui-2026[data-theme="dark"] .view:not(#view-generador):not(#view-aprobacion) [style*="color:#334155"] {
  color: var(--ds-text-secondary) !important;
}

body.ui-2026[data-theme="premium"] .view:not(#view-generador):not(#view-aprobacion) [style*="color:#94a3b8"],
body.ui-2026[data-theme="dark"] .view:not(#view-generador):not(#view-aprobacion) [style*="color:#94a3b8"] {
  color: var(--ds-muted) !important;
}

body.ui-2026 .view :where(a,button,[role="button"]):focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ds-accent-soft) !important;
}

body.ui-2026 * {
  scrollbar-color: var(--ds-border-strong) transparent;
}
body.ui-2026 *::-webkit-scrollbar { width: 7px; height: 7px; }
body.ui-2026 *::-webkit-scrollbar-thumb { background: var(--ds-border-strong); border-radius: 999px; }

/* Diálogos deliberadamente claros dentro del tema oscuro.
   Definen su propio color base para que ningún texto sin color explícito
   herede el blanco global de body. */
body.ui-2026 .ui26-light-dialog {
  color: #334155 !important;
  color-scheme: light;
  background: #fff !important;
}

body.ui-2026 .ui26-light-dialog .ui26-light-table-shell {
  background: #fff !important;
  border-color: #dbe3ee !important;
}

body.ui-2026 .ui26-light-dialog .ui26-light-table {
  color: #334155 !important;
}

body.ui-2026 .ui26-light-dialog .ui26-light-table thead {
  background: #f8fafc !important;
}

body.ui-2026 .ui26-light-dialog .ui26-light-table th {
  color: #64748b !important;
  border-color: #dbe3ee !important;
}

body.ui-2026 .ui26-light-dialog .ui26-light-table td {
  color: #475569 !important;
  border-color: #dbe3ee !important;
}

body.ui-2026 .ui26-light-dialog .ui26-light-table td:first-child {
  color: #1e293b !important;
  font-weight: 600;
}

/* Los módulos legacy escriben colores con variables del tema oscuro dentro
   de diálogos blancos. Resolver esas variables localmente evita texto blanco
   sobre blanco sin borrar colores semánticos explícitos (rojo, verde, ámbar). */
body.ui-2026 .ui26-light-dialog [style*="color:var(--text"],
body.ui-2026 .ui26-light-dialog [style*="color: var(--text"],
body.ui-2026 .ui26-light-dialog [style*="color:var(--ds-text"],
body.ui-2026 .ui26-light-dialog [style*="color: var(--ds-text"] {
  color: #334155 !important;
}

body.ui-2026 .ui26-light-dialog [style*="color:var(--muted"],
body.ui-2026 .ui26-light-dialog [style*="color: var(--muted"],
body.ui-2026 .ui26-light-dialog [style*="color:var(--ds-muted"],
body.ui-2026 .ui26-light-dialog [style*="color: var(--ds-muted"] {
  color: #64748b !important;
}

body.ui-2026 .ui26-light-dialog :where(input,select,textarea) {
  color: #1e293b !important;
  background: #fff !important;
  border-color: #cbd5e1 !important;
}

/* Red de seguridad para otros paneles blancos creados dinámicamente por
   módulos legacy: el panel establece texto oscuro aunque no tenga clase. */
body.ui-2026 > div[style*="position:fixed"] > div[style*="background:#fff"] {
  color: #334155;
  color-scheme: light;
}

body.ui-2026 > div[style*="position:fixed"] > div[style*="background:#fff"] table {
  color: #334155;
}

body.ui-2026 > div[style*="position:fixed"] > div[style*="background:#fff"] [style*="color:var(--text"],
body.ui-2026 > div[style*="position:fixed"] > div[style*="background:#fff"] [style*="color: var(--text"],
body.ui-2026 > div[style*="position:fixed"] > div[style*="background:white"] [style*="color:var(--text"] {
  color: #334155 !important;
}

/* Light theme counterpart: same geometry, calmer surfaces. */
body.ui-2026[data-theme="light"] {
  background: #f2f3f6;
  --ds-page-bg: #f2f3f6;
  --ds-card: rgba(255,255,255,.86);
}
body.ui-2026[data-theme="light"] .sidebar { background: rgba(246,247,249,.94); border-color: rgba(15,23,42,.08); }
body.ui-2026[data-theme="light"] .nav-item { color: #737987; }
body.ui-2026[data-theme="light"] .nav-item:hover { color: #171a21; background: rgba(15,23,42,.055); }
body.ui-2026[data-theme="light"] .nav-item.active { color: #171a21; background: #fff; box-shadow: 0 6px 22px rgba(15,23,42,.09), inset 0 0 0 1px rgba(15,23,42,.06); }
body.ui-2026[data-theme="light"] .nav-item .nav-ic { filter: grayscale(1); }
body.ui-2026[data-theme="light"] .sidebar-toggle { border-color: rgba(15,23,42,.08); }
body.ui-2026[data-theme="light"] .ds-btn,
body.ui-2026[data-theme="light"] .hv2-btn {
  background: rgba(255,255,255,.88);
  border-color: rgba(15,23,42,.11);
  color: #334155;
}
body.ui-2026[data-theme="light"] .ds-btn:hover,
body.ui-2026[data-theme="light"] .hv2-btn:hover {
  background: #fff;
  border-color: rgba(15,23,42,.2);
  color: #0f172a;
}
body.ui-2026[data-theme="light"] .ds-btn.primary,
body.ui-2026[data-theme="light"] .hv2-btn.primary {
  background: #151820;
  border-color: #151820;
  color: #fff;
}
body.ui-2026[data-theme="light"] .fil-pill,
body.ui-2026[data-theme="light"] .search-field,
body.ui-2026[data-theme="light"] select {
  background-color: rgba(255,255,255,.88);
  border-color: rgba(15,23,42,.1);
  color: #334155;
}
body.ui-2026[data-theme="light"] .ui26-workflow-search .search-field {
  background: rgba(255,255,255,.88);
}
body.ui-2026[data-theme="light"] #aprob-tabla thead tr,
body.ui-2026[data-theme="light"] #aprob-tabla td {
  border-color: rgba(15,23,42,.09) !important;
}
body.ui-2026[data-theme="light"] .ui26-page-actions button,
body.ui-2026[data-theme="light"] .ui26-directory-tools > div:first-child,
body.ui-2026[data-theme="light"] .ui26-directory-tools select,
body.ui-2026[data-theme="light"] .ui26-directory-tools button { background: rgba(255,255,255,.8) !important; border-color: rgba(15,23,42,.09) !important; color: #4b5260 !important; }
body.ui-2026[data-theme="light"] #view-dashboard .dash-kpi-card,
body.ui-2026[data-theme="light"] #view-dashboard .dash-tile > *,
body.ui-2026[data-theme="light"] #view-aprobacion .grid-kpi-auto > *,
body.ui-2026[data-theme="light"] .ui26-workflow-layout .card-xl,
body.ui-2026[data-theme="light"] #aprob-panel,
body.ui-2026[data-theme="light"] .ui26-sgi-table-shell {
  background: rgba(255,255,255,.82) !important;
  border-color: rgba(15,23,42,.075) !important;
  box-shadow: 0 12px 36px rgba(15,23,42,.055) !important;
}
body.ui-2026[data-theme="light"] #view-funcionarios .hv2-workspace { background: #f8f9fb; }
body.ui-2026[data-theme="light"] .fdir-v3-table-card { background: #fff !important; border-color: rgba(15,23,42,.075); }
body.ui-2026[data-theme="light"] #view-funcionarios .fdir-v3-table thead tr { background: #f6f7f9; }
body.ui-2026[data-theme="light"] .ui26-sgi-actions button { background: #fff !important; border-color: rgba(15,23,42,.1) !important; color: #525866 !important; }
body.ui-2026[data-theme="light"] .ui26-sgi-actions button:first-child { background: #151820 !important; color: #fff !important; }

/* ── Contraste de los paneles hv2 en temas oscuros ────────────────────
   Los cuatro módulos comparten la plantilla hv2. Su CSS original fue
   concebido como una banda oscura sobre un workspace claro; en premium y
   dark, en cambio, las variables de texto pasan a ser claras. Si una
   superficie seguía blanca, el resultado era texto casi invisible (sobre
   todo en Contratos y en la ficha lateral). Repetimos el ID del módulo
   para superar la especificidad de las reglas base de styles.css. */
body.ui-2026:is([data-theme="dark"], [data-theme="premium"])
:is(#view-hoja-vida, #view-funcionarios, #view-contratos, #view-permisos) .hv2-workspace {
  background: var(--ds-page-bg);
}

body.ui-2026:is([data-theme="dark"], [data-theme="premium"])
:is(#view-hoja-vida, #view-funcionarios, #view-contratos, #view-permisos)
:is(.hv-card, .hv2-table-wrap, .hv360-sidebar-card) {
  background: var(--ds-card) !important;
  border-color: var(--ds-border) !important;
  box-shadow: none;
}

body.ui-2026:is([data-theme="dark"], [data-theme="premium"])
:is(#view-hoja-vida, #view-funcionarios, #view-contratos, #view-permisos)
:is(.hv2-table-head, .hv360-sidebar-card-header) {
  border-color: var(--ds-border) !important;
}

body.ui-2026:is([data-theme="dark"], [data-theme="premium"])
:is(#view-hoja-vida, #view-funcionarios, #view-contratos, #view-permisos) .hv2-table-row-head {
  background: var(--ds-surface) !important;
  border-color: var(--ds-border) !important;
  color: var(--ds-muted) !important;
}

body.ui-2026:is([data-theme="dark"], [data-theme="premium"])
:is(#view-hoja-vida, #view-funcionarios, #view-contratos, #view-permisos)
:is(.hv2-table-row, .hv2-doc-row, .hv2-alert-row) {
  color: var(--ds-text-secondary);
  border-color: var(--ds-border) !important;
}

body.ui-2026:is([data-theme="dark"], [data-theme="premium"])
:is(#view-hoja-vida, #view-funcionarios, #view-contratos, #view-permisos) .hv2-table-row:hover {
  background: var(--ds-surface) !important;
}

body.ui-2026:is([data-theme="dark"], [data-theme="premium"])
:is(#view-hoja-vida, #view-funcionarios, #view-contratos, #view-permisos)
:is(.hv2-row-field, .hv2-activity-row) {
  border-color: var(--ds-border) !important;
}

body.ui-2026:is([data-theme="dark"], [data-theme="premium"])
:is(#view-hoja-vida, #view-funcionarios, #view-contratos, #view-permisos)
:is(.hv2-row-field-val, .hv2-alert-title, .hv2-activity-title) {
  color: var(--ds-text) !important;
}

body.ui-2026:is([data-theme="dark"], [data-theme="premium"])
:is(#view-hoja-vida, #view-funcionarios, #view-contratos, #view-permisos)
:is(.hv-field-val, .hv2-row-field-lbl, .hv2-alert-meta, .hv2-activity-date, .hv360-sidebar-card-title) {
  color: var(--ds-text-secondary) !important;
}

body.ui-2026:is([data-theme="dark"], [data-theme="premium"])
:is(#view-hoja-vida, #view-funcionarios, #view-contratos, #view-permisos) .hv-field-label {
  color: var(--ds-muted) !important;
}

body.ui-2026:is([data-theme="dark"], [data-theme="premium"])
:is(#view-hoja-vida, #view-funcionarios, #view-contratos, #view-permisos)
:is(.hv2-progress-track, .hv2-tab-badge) {
  background: var(--ds-surface);
  border-color: var(--ds-border);
  color: var(--ds-text-secondary);
}

body.ui-2026:is([data-theme="dark"], [data-theme="premium"])
:is(#view-hoja-vida, #view-funcionarios, #view-contratos, #view-permisos) .hv2-tab.active {
  background: var(--ds-page-bg);
  color: var(--ds-text);
}

/* Contraste compartido: tarjetas elevadas sobre el fondo oscuro y controles
   seleccionados claros. Limitado a los temas oscuros de la aplicación. */
body.ui-2026:is([data-theme="dark"], [data-theme="premium"])
.view:not(#view-generador):not(#view-aprobacion)
:is(.card-xl, .card-sm, .card-md, .ds-card, .section-card, .inner-card,
    .repo-kpi-card, .repo-doc-card, .legal-card, .ctr-widget, .form-section,
    .hv-card, .hv2-table-wrap, .hv360-sidebar-card) {
  background: linear-gradient(145deg, rgba(255,255,255,.035), transparent 55%), var(--ds-card) !important;
  border: 1px solid rgba(167,139,250,.48) !important;
  box-shadow: 0 0 0 1px rgba(167,139,250,.1),
    0 10px 28px rgba(0,0,0,.24),
    0 8px 32px rgba(139,92,246,.38),
    0 0 14px rgba(139,92,246,.18),
    inset 0 1px 0 rgba(255,255,255,.06) !important;
}

body.ui-2026:is([data-theme="dark"], [data-theme="premium"])
.view:not(#view-generador):not(#view-aprobacion)
:is(.card-hdr-row, .section-card-header, .repo-panel-head,
    .hv2-table-row-head, .hv360-sidebar-card-header) {
  background: rgba(255,255,255,.045) !important;
  color: var(--ds-text-secondary) !important;
  border-color: rgba(190,195,220,.2) !important;
}

body.ui-2026:is([data-theme="dark"], [data-theme="premium"]) .view
:is(.ds-subtab, .dot-subtab, .hv2-tab, .fsp-seg, .repo-vt-btn).active {
  background: #f1f2f5 !important;
  color: #101218 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}

body.ui-2026:is([data-theme="dark"], [data-theme="premium"]) .view
:is(.ds-btn, .hv2-btn).primary {
  background: #f1f2f5 !important;
  color: #101218 !important;
  border-color: #f1f2f5 !important;
  box-shadow: 0 10px 32px rgba(139,92,246,.5),
    0 0 16px rgba(139,92,246,.22) !important;
}

body.ui-2026:is([data-theme="dark"], [data-theme="premium"]) .view
:is(.ds-btn, .hv2-btn, .ds-subtab, .hv2-tab, .repo-vt-btn):focus-visible {
  outline: 2px solid #b9a4ff;
  outline-offset: 3px;
}

/* Responsive */
@media (max-width: 1180px) {
  body.ui-2026 #dash-kpi-row { grid-template-columns: repeat(3,1fr) !important; }
  body.ui-2026 .ui26-workflow-layout { grid-template-columns: 1fr !important; }
  body.ui-2026 #aprob-panel { position: static !important; }
  body.ui-2026 .ui26-sgi-head { align-items: flex-start !important; flex-direction: column; }
  body.ui-2026 .ui26-sgi-actions { justify-content: flex-start; }
}

@media (max-width: 820px) {
  body.ui-2026 { --ui26-rail: 62px; }
  body.ui-2026 .sidebar { padding-inline: 7px; }
  body.ui-2026 #view-dashboard .ui26-dashboard-header,
  body.ui-2026 #view-aprobacion,
  body.ui-2026 #view-funcionarios > div:first-child { padding-left: 20px !important; padding-right: 20px !important; }
  body.ui-2026 #dash-kpi-row,
  body.ui-2026 #dash-main-body { padding-left: 20px !important; padding-right: 20px !important; }
  body.ui-2026 #dash-main-body { grid-template-columns: 1fr !important; }
  body.ui-2026 #dash-main-body .dash-tile { grid-column: 1 / -1 !important; }
  body.ui-2026 .ds-page-header { align-items: flex-start; flex-direction: column; }
  body.ui-2026 .ui26-page-actions { max-height: 84px; overflow-y: auto; }
  body.ui-2026 #auditoria-transp-modal .at-kpis { grid-template-columns: repeat(3,1fr) !important; }
}

@media (max-width: 560px) {
  body.ui-2026 #dash-kpi-row { grid-template-columns: repeat(2,1fr) !important; }
  body.ui-2026 #view-dashboard .dash-kpi-card { min-height: 125px; }
  body.ui-2026 #view-dashboard .dash-kpi-card .kpi-val { font-size: 1.7rem !important; }
  body.ui-2026 .ui26-sgi-actions { display: grid !important; grid-template-columns: 1fr 1fr; width: 100%; }
  body.ui-2026 .ui26-sgi-actions button { width: 100%; }
  body.ui-2026 #auditoria-transp-modal { padding: 8px !important; }
  body.ui-2026 #auditoria-transp-modal .at-body { padding: 14px !important; }
  body.ui-2026 #auditoria-transp-modal .at-kpis { grid-template-columns: repeat(2,1fr) !important; }
}

@media (prefers-reduced-motion: reduce) {
  body.ui-2026 *, body.ui-2026 *::before, body.ui-2026 *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
