/* Tema oficial VIGMASOFT / W&K — carga primero para variables globales y fuente */
@import url('theme-vigmasoft.css');
@import url('wk-institutional-global.css');

.vista360-body {
  background-color: var(--background-color, var(--bg-primary-1));
  background-image: var(--background-image);
  background-repeat: no-repeat;
  background-position: center center;
  background-attachment: fixed;
  background-size: cover;
}
.vista360-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 32px;
  margin-bottom: 28px;
  background: var(--color-surface-strong);
  border: 1px solid var(--color-border);
  border-radius: 18px;
  box-shadow: var(--color-card-shadow);
  backdrop-filter: blur(8px);
  color: var(--color-text);
}
.vista360-topbar-left {
  display: flex;
  align-items: center;
  gap: 18px;
}
.vista360-logo {
  height: 42px;
}
.vista360-topbar-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.vista360-topbar-meta strong {
  font-size: 1.15rem;
  color: var(--color-heading);
}
.vista360-topbar-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}
.vista360-topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.vista360-topbar-user {
  color: var(--color-text-muted);
  font-weight: 600;
}
/* ==========================================================
   W&K WORKING SOLUTIONS – STYLE SHEET
   Autor: Wilmer Centeno (versión corporativa)
   ========================================================== */

/* ======== VARIABLES BASE (complementan theme-vigmasoft.css) ======== */
:root {
  --transition: all 0.3s ease;
  --radius: 8px;
  --shadow: 0 0 12px rgba(0, 0, 0, 0.4);
  /* Alineados a paleta institucional W&K */
  --color-primary: var(--wk-steel, var(--border-soft-2));
  --color-primary-dark: var(--wk-navy, var(--border-soft-1));
  --color-primary-light: var(--wk-frost, var(--text-primary-2));
  --color-primary-accent: var(--wk-ice, var(--border-soft-2));
  --color-white: #ffffff;
  --color-black: #000000;
  --color-gray: var(--text-secondary-1);
  --color-accent: var(--border-soft-2);
  /* Fondo y texto desde tema oficial */
  --background-color: var(--bg-primary-1);
  --background-image: url('/img/fondo_dashboard.png');
  --color-text: var(--text-primary-1);
  --color-text-muted: var(--text-secondary-1);
  --color-heading: var(--text-primary-2);
  --color-link: var(--border-soft-2);
  --color-surface: var(--card-bg-1);
  --color-surface-strong: var(--card-bg-2);
  --color-border: var(--border-soft-1);
  --color-card-bg: var(--card-bg-1);
  --color-card-border: var(--border-soft-1);
  --color-card-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  --color-hero-start: rgba(127, 166, 189, 0.25);
  --color-hero-end: rgba(111, 143, 163, 0.2);
  --color-hero-glow: rgba(127, 166, 189, 0.15);
  --color-table-head: var(--bg-primary-3);
  --color-table-hover: rgba(255, 255, 255, 0.05);
  --color-table-stripe: rgba(255, 255, 255, 0.03);
  --color-table-hover: rgba(255, 255, 255, 0.05);
  --color-table-stripe: rgba(255, 255, 255, 0.03);
  --color-field-bg-start: rgba(255, 255, 255, 0.38);
  --color-field-bg-end: rgba(255, 255, 255, 0.24);
  --color-field-text: #041529;
  --color-placeholder: rgba(4, 21, 41, 0.5);
  --color-outline-border: rgba(255, 255, 255, 0.35);
  --color-ghost-bg: rgba(255, 255, 255, 0.08);
  --color-ghost-bg-hover: rgba(255, 255, 255, 0.16);
  --color-alert-info-bg: rgba(48, 171, 255, 0.12);
  --color-alert-info-border: rgba(48, 171, 255, 0.35);
  --color-alert-info-text: #9ad4ff;
  --color-pagination-bg: rgba(90, 138, 163, 0.12);
  --color-pagination-hover: rgba(90, 138, 163, 0.25);
}

:root[data-theme="dark"] {
  --background-color: var(--wk-dark-base);
  --background-image: none;
  --color-text: var(--wk-dark-text);
  --color-text-muted: var(--wk-dark-text-muted);
  --color-heading: var(--wk-dark-text);
  --color-link: var(--wk-ice);
  --color-surface: var(--wk-dark-card);
  --color-surface-strong: var(--wk-dark-card-2);
  --color-border: var(--wk-dark-border);
  --color-card-bg: var(--wk-dark-card);
  --color-card-border: var(--wk-dark-border-soft);
  --color-card-shadow: 0 8px 24px rgba(20, 28, 38, 0.18);
  --color-hero-start: rgba(107, 163, 199, 0.35);
  --color-hero-end: rgba(74, 127, 165, 0.28);
  --color-hero-glow: rgba(107, 163, 199, 0.2);
  --color-table-head: var(--wk-dark-panel);
  --color-table-hover: rgba(255, 255, 255, 0.06);
  --color-table-stripe: rgba(255, 255, 255, 0.04);
  --color-field-bg-start: rgba(255, 255, 255, 0.92);
  --color-field-bg-end: rgba(234, 242, 248, 0.88);
  --color-field-text: var(--wk-charcoal);
  --color-placeholder: rgba(45, 55, 72, 0.5);
  --color-outline-border: rgba(186, 198, 212, 0.35);
  --color-ghost-bg: rgba(255, 255, 255, 0.08);
  --color-ghost-bg-hover: rgba(255, 255, 255, 0.14);
  --color-alert-info-bg: rgba(0, 153, 187, 0.12);
  --color-alert-info-border: rgba(0, 153, 187, 0.28);
  --color-alert-info-text: #B8E4F0;
  --color-pagination-bg: rgba(255, 255, 255, 0.08);
  --color-pagination-hover: rgba(255, 255, 255, 0.14);
}

:root[data-theme="light"] {
  --background-color: var(--wk-cloud);
  --background-image: none;
  --color-text: var(--wk-charcoal);
  --color-text-muted: rgba(45, 55, 72, 0.62);
  --color-heading: var(--wk-navy);
  --color-link: var(--wk-ice);
  --color-primary: var(--wk-steel);
  --color-primary-dark: var(--wk-navy);
  --color-primary-light: var(--wk-frost);
  --color-primary-accent: var(--wk-teal);
  --color-accent: var(--wk-steel);
  --color-white: var(--wk-white);
  --color-black: var(--wk-charcoal);
  --color-surface: var(--wk-white);
  --color-surface-strong: var(--wk-white);
  --color-border: rgba(27, 58, 84, 0.12);
  --color-card-bg: var(--wk-white);
  --color-card-border: rgba(27, 58, 84, 0.08);
  --color-card-shadow: 0 12px 24px rgba(27, 58, 84, 0.08);
  --color-hero-start: var(--wk-frost);
  --color-hero-end: rgba(107, 163, 199, 0.35);
  --color-hero-glow: rgba(74, 127, 165, 0.18);
  --color-table-head: var(--wk-frost);
  --color-table-hover: rgba(45, 55, 72, 0.04);
  --color-table-stripe: rgba(45, 55, 72, 0.06);
  --color-field-bg-start: var(--wk-white);
  --color-field-bg-end: var(--wk-frost);
  --color-field-text: var(--wk-charcoal);
  --color-placeholder: rgba(45, 55, 72, 0.42);
  --color-outline-border: rgba(27, 58, 84, 0.22);
  --color-ghost-bg: rgba(27, 58, 84, 0.06);
  --color-ghost-bg-hover: rgba(27, 58, 84, 0.12);
  --color-alert-info-bg: rgba(0, 153, 187, 0.1);
  --color-alert-info-border: rgba(0, 153, 187, 0.28);
  --color-alert-info-text: var(--wk-navy);
  --color-pagination-bg: rgba(27, 58, 84, 0.06);
  --color-pagination-hover: rgba(27, 58, 84, 0.12);
}

/* ======== RESET ======== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans, ui-sans-serif, system-ui, "Segoe UI", sans-serif);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  animation: fadeInBody 1s ease forwards;
}

/* ======== FONDOS DIFERENCIADOS DEFINITIVOS ======== */

/* Fondo para páginas PRE-LOGIN (index.php, login.php, register.php, etc.) */
body.prelogin {
  background: #000 url('/img/textura.PNG')
    no-repeat center center fixed;
  background-size: cover;
  color: #fff;
  animation: fadeInBody 1s ease forwards;
}

/* Fondo para páginas POST-LOGIN (dashboard, home, facturación, etc.) */
body.postlogin {
  background-color: var(--background-color) !important;
  background-image: var(--background-image) !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
  background-attachment: fixed !important;
  background-size: cover !important;
  color: var(--color-text);
  animation: fadeInBody 1s ease forwards;
}

/* Modo claro: sin fondo.jpg; logo institucional vía ::before en wk-institutional-global.css */
html[data-theme="light"] body.postlogin {
  background-image: none !important;
}

/* Modo oscuro suave: sin textura oscura de fondo */
html[data-theme="dark"] body.postlogin {
  background-image: none !important;
  background-color: var(--wk-dark-base, #3A4454) !important;
}

/* Suavizado global */
@keyframes fadeInBody {
  from { opacity: 0; }
  to { opacity: 1; }
}


/* ======== TOPBAR ======== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 20px;
  margin-bottom: 16px;
  background: var(--wk-dark-topbar, rgba(47, 56, 71, 0.96));
  border: 1px solid var(--wk-dark-border-soft, rgba(186, 198, 212, 0.14));
  border-radius: 18px;
  box-shadow: 0 4px 20px rgba(20, 28, 38, 0.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--wk-dark-text, #E8EDF2);
}
.topbar img {
  height: 28px;
  transition: var(--transition);
}
.topbar-logo-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--wk-frost, #EAF2F8);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.topbar .topbar-logo-img {
  height: 28px;
  width: auto;
  max-width: 48px;
  object-fit: contain;
  border-radius: 4px;
}
.topbar img:hover {
  transform: scale(1.05);
}
.topbar .user-info {
  font-weight: 600;
  color: var(--color-text-muted);
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  color: var(--color-text-muted);
}
.topbar-meta strong {
  font-size: 0.85rem;
  background: linear-gradient(135deg, #5A8AA3 0%, #E8F1F5 50%, #4A6B7C 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.topbar-subtitle {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.topbar-user {
  color: var(--color-text-muted);
  font-weight: 600;
}
.topbar-bell {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.topbar-bell img {
  height: 20px;
  filter: drop-shadow(0 0 3px rgba(90, 138, 163, 0.4));
}
/* Botones de icono en topbar (campana, búsqueda): mismo aspecto que el reference */
.topbar-icon-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 6px;
  border: 1px solid rgba(90, 138, 163, 0.35);
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.2s;
  color: #E8F1F5;
  text-decoration: none;
  position: relative;
}
.topbar-icon-btn:hover {
  border-color: rgba(90, 138, 163, 0.6);
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}
.topbar-icon-btn svg {
  flex-shrink: 0;
}
.topbar-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #e74c3c;
  color: var(--color-white);
  font-size: 11px;
  font-weight: bold;
  border-radius: 999px;
  padding: 2px 5px;
  min-width: 1.25em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
}
.topbar-count.is-empty {
  display: none !important;
}
[data-theme="light"] .topbar-count {
  color: var(--color-white);
}

/* Panel desplegable de notificaciones */
.topbar-notif-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.topbar-notif-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(360px, calc(100vw - 24px));
  max-height: min(420px, 70vh);
  display: flex;
  flex-direction: column;
  background: var(--wk-dark-card, #536074);
  border: 1px solid var(--wk-dark-border, rgba(186, 198, 212, 0.22));
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(20, 28, 38, 0.22);
  z-index: 1100;
  overflow: hidden;
}
.topbar-notif-panel[hidden] {
  display: none !important;
}
.topbar-notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--wk-dark-border-soft, rgba(186, 198, 212, 0.14));
  font-size: 0.875rem;
}
.topbar-notif-summary {
  font-size: 0.75rem;
  color: var(--wk-dark-text-muted, #AEBBC6);
}
.topbar-notif-list {
  overflow-y: auto;
  max-height: 320px;
}
.topbar-notif-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-bottom: 1px solid var(--wk-dark-border-soft, rgba(186, 198, 212, 0.1));
  background: transparent;
  color: var(--wk-dark-text, #E8EDF2);
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
  font-family: inherit;
}
.topbar-notif-item:hover {
  background: rgba(107, 163, 199, 0.12);
}
.topbar-notif-item.is-unread {
  background: rgba(107, 163, 199, 0.08);
  border-left: 3px solid var(--wk-ice, #6BA3C7);
}
.topbar-notif-item-type {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--wk-ice, #6BA3C7);
}
.topbar-notif-item-msg {
  font-size: 0.8125rem;
  line-height: 1.4;
  color: inherit;
}
.topbar-notif-item-date {
  font-size: 0.7rem;
  color: var(--wk-dark-text-muted, #AEBBC6);
}
.topbar-notif-empty,
.topbar-notif-loading {
  padding: 20px 14px;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--wk-dark-text-muted, #AEBBC6);
}
html[data-theme="light"] .topbar-notif-panel {
  background: var(--wk-white, #fff);
  border-color: rgba(27, 58, 84, 0.12);
  box-shadow: 0 12px 28px rgba(27, 58, 84, 0.12);
}
html[data-theme="light"] .topbar-notif-head {
  border-bottom-color: rgba(27, 58, 84, 0.1);
  color: var(--wk-navy, #1B3A54);
}
html[data-theme="light"] .topbar-notif-summary {
  color: var(--wk-steel, #4A7FA5);
}
html[data-theme="light"] .topbar-notif-item {
  color: var(--wk-charcoal, #2D3748);
  border-bottom-color: rgba(27, 58, 84, 0.08);
}
html[data-theme="light"] .topbar-notif-item:hover {
  background: var(--wk-frost, #EAF2F8);
}
html[data-theme="light"] .topbar-notif-item.is-unread {
  background: rgba(234, 242, 248, 0.9);
  border-left-color: var(--wk-teal, #0099BB);
}
html[data-theme="light"] .topbar-notif-item-date,
html[data-theme="light"] .topbar-notif-empty,
html[data-theme="light"] .topbar-notif-loading {
  color: var(--wk-steel, #4A7FA5);
}

/* Topbar: texto y botones siempre legibles en modo oscuro */
.topbar {
  color: #E8F1F5;
}
.topbar .btn-outline,
.topbar .btn-ghost {
  color: #E8F1F5 !important;
  border-color: rgba(232, 241, 245, 0.5);
  padding: 6px 12px;
  min-height: 34px;
  height: auto;
  border-radius: 10px;
  font-size: 0.8125rem;
}
.topbar .btn-outline:hover,
.topbar .btn-ghost:hover {
  color: #fff !important;
  border-color: #E8F1F5;
  background: rgba(232, 241, 245, 0.15);
}
.topbar-user,
.topbar-subtitle {
  color: rgba(232, 241, 245, 0.95);
}
.topbar-meta strong {
  color: #E8F1F5;
}

/* Topbar en modo claro: navy institucional (navbar de marca) */
[data-theme="light"] .topbar {
  background: var(--wk-navy);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--wk-frost);
}
[data-theme="light"] .topbar .btn-outline,
[data-theme="light"] .topbar .btn-ghost {
  color: var(--wk-frost) !important;
  border-color: rgba(255, 255, 255, 0.35);
}
[data-theme="light"] .topbar .btn-outline:hover,
[data-theme="light"] .topbar .btn-ghost:hover {
  color: var(--wk-white) !important;
  border-color: var(--wk-ice);
  background: rgba(255, 255, 255, 0.1);
}
[data-theme="light"] .topbar-user,
[data-theme="light"] .topbar-subtitle {
  color: rgba(234, 242, 248, 0.9);
}
[data-theme="light"] .topbar-meta strong {
  color: var(--wk-white);
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  -webkit-text-fill-color: unset;
}
[data-theme="light"] .topbar .topbar-icon-btn,
[data-theme="light"] .topbar .topbar-bell {
  color: var(--wk-frost);
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
}
[data-theme="light"] .topbar .topbar-icon-btn:hover,
[data-theme="light"] .topbar .topbar-bell:hover {
  color: var(--wk-white);
  border-color: var(--wk-ice);
  background: rgba(255, 255, 255, 0.14);
}

.alert-banner {
  background: var(--color-surface-strong);
  color: var(--color-heading);
  overflow: hidden;
  white-space: nowrap;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  font-weight: 600;
  padding: 8px 0;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  box-shadow: var(--color-card-shadow);
  margin: 0 20px 24px;
}
.alert-track {
  display: inline-block;
  animation: scrollAlerts 25s linear infinite;
}
.alert-track span {
  display: inline-block;
  padding: 0 60px;
}
@keyframes scrollAlerts {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* ======== SIDEBAR ======== */
.sidebar {
  position: fixed;
  top: 44px;
  left: 0;
  width: 200px;
  height: calc(100% - 44px);
  background: var(--wk-dark-panel, rgba(67, 78, 96, 0.97));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--wk-dark-border-soft, rgba(186, 198, 212, 0.14));
  box-shadow: 2px 0 16px rgba(20, 28, 38, 0.1);
  padding-top: 12px;
  z-index: 999;
  overflow-y: auto;
  transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}

/* (Revert) Sidebar: no inyectar encabezados/acciones extra aquí */
.sidebar.collapsed {
  transform: translateX(-100%);
  width: 0;
  overflow: hidden;
  pointer-events: none;
}
/* Botón ☰ junto al logo pequeño del sidebar (todos los roles / módulos) */
.sidebar-logo.director-sidebar-logo {
  padding: 10px 10px 12px;
  border-bottom: 1px solid rgba(90, 138, 163, 0.28);
}

.sidebar-brand-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
}

.sidebar-logo-toggle,
#sidebarToggle.sidebar-logo-toggle {
  position: fixed !important;
  top: 52px !important;
  left: 8px !important;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  margin: 0 !important;
  padding: 0 !important;
  flex: 0 0 44px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  background: var(--wk-white, #fff);
  border: 1px solid rgba(27, 58, 84, 0.14);
  border-radius: 10px;
  color: var(--wk-navy, #1B3A54);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(27, 58, 84, 0.08);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  z-index: 1002;
}

.sidebar:not(.collapsed) .sidebar-logo.director-sidebar-logo {
  padding-left: 52px;
}

.sidebar-brand-mark {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-brand-mark .sidebar-logo-img {
  display: block;
  max-height: 48px;
  width: auto;
  max-width: 118px;
  object-fit: contain;
}

.sidebar-logo-toggle:hover {
  background: var(--wk-frost, #EAF2F8);
  border-color: var(--wk-steel, #4A7FA5);
  transform: scale(1.03);
}

html[data-theme="light"] .sidebar-logo-toggle {
  background: var(--wk-white, #fff);
  color: var(--wk-navy, #1B3A54);
  border-color: rgba(27, 58, 84, 0.16);
}

html[data-theme="dark"] .sidebar-logo-toggle {
  background: rgba(255, 255, 255, 0.95);
  color: var(--wk-navy, #1B3A54);
  border-color: rgba(27, 58, 84, 0.2);
}

/* No usar menú en topbar ni botón huérfano fuera del sidebar */
.topbar .topbar-menu-btn,
body.postlogin > button.sidebar-toggle-btn,
body > button#sidebarToggle:not(.sidebar-logo-toggle) {
  display: none !important;
}
.sidebar a {
  display: block;
  color: var(--color-primary);
  text-decoration: none;
  padding: 10px 18px;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 0.85rem;
  transition: var(--transition);
}
.sidebar a:hover {
  background: rgba(90, 138, 163, 0.15);
  color: #E8F1F5;
  padding-left: 28px;
  border-left: 2px solid rgba(90, 138, 163, 0.4);
}
.sidebar a.active {
  background: rgba(90, 138, 163, 0.2);
  color: #E8F1F5 !important;
  border-left: 4px solid #5A8AA3;
  padding-left: 28px;
  box-shadow: inset 0 0 20px rgba(90, 138, 163, 0.1);
}

/* Iconos del sidebar con tamaño fijo (Director y cualquier .nav-item) para que no se vean enormes */
.sidebar .nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 0.8rem;
  text-transform: none;
  letter-spacing: 0;
}
.sidebar .nav-item svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
}
.sidebar .nav-section-label {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  padding: 10px 16px 4px;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

[data-theme="light"] .sidebar {
  background: var(--wk-white);
  border-color: rgba(27, 58, 84, 0.12);
}
[data-theme="light"] .sidebar a {
  color: var(--wk-steel);
}
[data-theme="light"] .sidebar a:hover,
[data-theme="light"] .sidebar a.active {
  background: var(--wk-frost);
  color: var(--wk-navy);
  border-left-color: var(--wk-teal);
}

/* ======== CONTENIDO PRINCIPAL ======== */
.content {
  margin-left: var(--wk-sidebar-width, 220px);
  padding-top: 44px;
  padding-bottom: 60px;
  padding-left: 16px;
  padding-right: 16px;
  color: var(--color-text);
  transition: margin-left 0.3s ease, width 0.3s ease;
  width: calc(100% - var(--wk-sidebar-width, 220px));
  box-sizing: border-box;
}
.content.sidebar-collapsed {
  margin-left: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}
.main-content.sidebar-collapsed {
  margin-left: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}
.main-content {
  margin-left: var(--wk-sidebar-width, 220px);
  padding-top: 44px;
  padding-bottom: 60px;
  padding-left: 30px;
  padding-right: 30px;
  color: var(--color-text);
  min-height: calc(100vh - 44px);
  transition: margin-left 0.3s ease, width 0.3s ease;
  width: calc(100% - var(--wk-sidebar-width, 220px));
  box-sizing: border-box;
}

/* Expansión global al ocultar menú lateral (todos los módulos y roles) */
body.sidebar-menu-collapsed .content,
body.sidebar-menu-collapsed .main-content,
body.sidebar-menu-collapsed .vista360-content,
body.sidebar-menu-collapsed .viat-main,
body.sidebar-menu-collapsed .content.cdc-page,
body.sidebar-menu-collapsed .dashboard-consolidado-dir {
  margin-left: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

body.sidebar-menu-collapsed .vista360-content.v360-wrap .page,
body.sidebar-menu-collapsed .vista360-content.v360-wrap .main {
  margin-left: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}
.container {
  width: 90%;
  margin: 0 auto;
  background: var(--color-surface);
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: var(--color-card-shadow);
  border: 1px solid var(--color-border);
  animation: fadeInCard 1s ease forwards;
}
.container-wk {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  background: var(--color-surface);
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: var(--color-card-shadow);
  border: 1px solid var(--color-border);
  animation: fadeInCard 1s ease forwards;
}

/* ======== ENCABEZADOS ======== */
h1, h2, h3 {
  color: var(--color-heading);
  text-align: center;
  margin-bottom: 20px;
}

/* ======== TABLAS ======== */
.table-container {
  overflow-x: auto;
  margin-top: 20px;
}
.table-wk {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-card-bg);
  color: var(--color-text);
  border-radius: var(--radius);
  overflow: hidden;
}
.table-wk th {
  background: var(--color-table-head);
  color: var(--color-text);
  text-transform: uppercase;
  padding: 10px;
  border-bottom: 1px solid var(--color-border);
}
.table-wk td {
  padding: 10px;
  text-align: center;
  border-bottom: 1px solid var(--color-border);
}
.table-wk tr:nth-child(even) {
  background: var(--color-table-stripe);
}
.table-wk tr:hover {
  background: var(--color-table-hover);
}

/* ======== FORMULARIOS ======== */
form {
  width: 100%;
  color: var(--color-text);
}
input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border-radius: var(--radius);
  border: none;
  outline: none;
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-field-text, #000);
  font-size: 15px;
}
[data-theme="light"] input[type="text"],
[data-theme="light"] input[type="email"],
[data-theme="light"] input[type="password"],
[data-theme="light"] select,
[data-theme="light"] textarea {
  background: rgba(255, 255, 255, 1);
  color: var(--color-field-text);
  border: 1px solid var(--color-border);
}
textarea {
  resize: vertical;
}

/* ======== BOTONES ======== */
.btn {
  display: inline-block;
  background: var(--color-primary);
  color: #000;
  padding: 10px 18px;
  border: none;
  border-radius: var(--radius);
  font-weight: bold;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition);
}
.btn:hover {
  background: #E8F1F5;
  transform: scale(1.05);
}
.btn-primary {
  background: var(--color-primary);
  color: #000;
  cursor: pointer;
}
.btn-primario {
  background: var(--color-primary);
  color: #000;
  cursor: pointer;
}

/* ======== CARDS ======== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 25px;
}
.card {
  /* Estilo glassmorphism del landing - limpio y elegante */
  background: linear-gradient(135deg, rgba(74, 107, 124, 0.2), rgba(44, 62, 80, 0.3));
  border: 2px solid rgba(90, 138, 163, 0.3);
  border-radius: 30px;
  padding: 40px 50px;
  text-align: center;
  backdrop-filter: blur(10px);
  transform: perspective(1000px) rotateY(0deg);
  transition: all 0.5s ease;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: visible;
  cursor: pointer;
  text-decoration: none;
  font-weight: bold;
  color: #E8F1F5;
  animation: fadeInCard 1s ease forwards;
}
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* Efecto de textura rugosa adicional con gradientes radiales */
  background: 
    radial-gradient(circle at 20% 30%, rgba(232, 241, 245, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(90, 138, 163, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(74, 107, 124, 0.05) 0%, transparent 70%),
    /* Patrón de rayas sutiles para textura */
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 10px,
      rgba(90, 138, 163, 0.03) 10px,
      rgba(90, 138, 163, 0.03) 11px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 10px,
      rgba(74, 107, 124, 0.02) 10px,
      rgba(74, 107, 124, 0.02) 11px
    );
  opacity: 1;
  pointer-events: none;
  z-index: 1;
  border-radius: 20px;
}
.card::after {
  content: '';
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  /* Highlight metálico en borde superior izquierdo (simula luz desde arriba-izquierda) */
  background: linear-gradient(145deg, 
    rgba(232, 241, 245, 0.25) 0%,
    rgba(232, 241, 245, 0.1) 30%,
    transparent 60%
  );
  border-radius: 20px;
  opacity: 0.6;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 0;
  filter: blur(1px);
}
.card:hover::before {
  opacity: 1;
  background-position: 200% 0;
}
.card:hover::after {
  opacity: 0.9;
  /* Efecto de brillo animado que simula reflejo metálico */
  animation: metallicShine 3s ease-in-out infinite;
}
@keyframes metallicShine {
  0%, 100% { 
    background: linear-gradient(145deg, 
      rgba(232, 241, 245, 0.25) 0%,
      rgba(232, 241, 245, 0.1) 30%,
      transparent 60%
    );
  }
  50% { 
    background: linear-gradient(145deg, 
      rgba(232, 241, 245, 0.4) 0%,
      rgba(90, 138, 163, 0.2) 30%,
      transparent 60%
    );
  }
}
[data-theme="light"] .card {
  background: rgba(255, 255, 255, 0.95);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
[data-theme="light"] .card:hover {
  background: var(--color-heading);
  color: var(--color-white);
}
.card:hover {
  transform: perspective(1000px) rotateY(5deg) translateY(-10px);
  border-color: #5A8AA3;
  box-shadow: 0 20px 60px rgba(90, 138, 163, 0.4);
}
.card,
.card *,
.card h3,
.card p,
.card strong,
.card a {
  text-decoration: none !important;
  position: relative;
  z-index: 2;
}
.card:hover,
.card:hover *,
.card:hover h3,
.card:hover p,
.card:hover strong {
  color: #fff !important;
  text-shadow: 
    0 0 10px rgba(255, 255, 255, 0.4),
    0 0 20px rgba(255, 255, 255, 0.2),
    0 2px 8px rgba(0, 0, 0, 0.3);
  text-decoration: none !important;
}
/* Quitar subrayado de los enlaces (cards) */
a.card,
a.card:link,
a.card:visited,
a.card:hover,
a.card:active {
  text-decoration: none !important;
}

/* ======== ANIMACIONES ======== */
@keyframes fadeInBody {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* ======== MENSAJES ======== */
.message {
  text-align: center;
  padding: 15px;
  border-radius: var(--radius);
  margin: 15px auto;
  width: 60%;
  font-weight: bold;
  box-shadow: 0 0 10px #0c3a1fff;
  animation: fadeInCard 0.3s ease forwards;
}

/* ======== FOOTER ======== */
footer {
  text-align: center;
  color: var(--color-primary);
  padding: 20px;
  margin-top: 40px;
}

/* ======== BOTONES ADICIONALES ======== */
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--color-outline-border);
  background: transparent;
  color: var(--color-text);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  cursor: pointer;
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: var(--color-ghost-bg);
  color: var(--color-text);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.btn-ghost:hover {
  background: var(--color-ghost-bg-hover);
  cursor: pointer;
}

/* ======== VISTA 360° ======== */
.vista360-content {
  margin-left: var(--wk-sidebar-width, 220px);
  padding: 32px 16px 40px;
  width: calc(100% - var(--wk-sidebar-width, 220px));
  max-width: none;
  margin-right: 0;
  min-height: calc(100vh - 100px);
  transition: margin-left 0.3s ease, width 0.3s ease;
  box-sizing: border-box;
}
.vista360-content.sidebar-collapsed,
body.sidebar-menu-collapsed .vista360-content {
  margin-left: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}
.vista360-wrapper {
  background: var(--color-surface);
  border-radius: 30px;
  padding: 24px;
  box-shadow: var(--color-card-shadow);
  border: 1px solid var(--color-border);
  width: 100%;
}
.vista360-hero {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 28px 32px;
  border-radius: 30px;
  margin-bottom: 24px;
  /* Estilo glassmorphism del landing */
  background: linear-gradient(135deg, rgba(74, 107, 124, 0.2), rgba(44, 62, 80, 0.3));
  backdrop-filter: blur(10px);
  border: 2px solid rgba(90, 138, 163, 0.3);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  animation: heroGlowPulse 3s ease-in-out infinite;
}
@keyframes heroGlowPulse {
  0%, 100% {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(90, 138, 163, 0.3);
  }
  50% {
    box-shadow: 0 20px 60px rgba(90, 138, 163, 0.4);
    border-color: rgba(90, 138, 163, 0.5);
  }
}
.vista360-hero::before {
  content: '';
  position: absolute;
  top: -150px;
  right: -130px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(90, 138, 163, 0.5), rgba(232, 241, 245, 0.3), transparent 70%);
  animation: heroGlowRotate1 8s linear infinite;
  filter: blur(20px);
}
@keyframes heroGlowRotate1 {
  0% {
    transform: rotate(0deg) scale(1);
    opacity: 0.6;
  }
  50% {
    transform: rotate(180deg) scale(1.2);
    opacity: 0.8;
  }
  100% {
    transform: rotate(360deg) scale(1);
    opacity: 0.6;
  }
}
.vista360-hero::after {
  content: '';
  position: absolute;
  bottom: -180px;
  left: -140px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(232, 241, 245, 0.4), rgba(90, 138, 163, 0.3), transparent 65%);
  animation: heroGlowRotate2 10s linear infinite reverse;
  filter: blur(25px);
}
@keyframes heroGlowRotate2 {
  0% {
    transform: rotate(0deg) scale(1);
    opacity: 0.5;
  }
  50% {
    transform: rotate(-180deg) scale(1.3);
    opacity: 0.7;
  }
  100% {
    transform: rotate(-360deg) scale(1);
    opacity: 0.5;
  }
}
.vista360-hero > * {
  position: relative;
  z-index: 2;
}
.vista360-hero-main h1 {
  font-size: 1.6rem;
  margin-bottom: 8px;
  color: var(--color-heading);
  text-shadow: 
    0 0 10px rgba(90, 138, 163, 0.6),
    0 0 20px rgba(90, 138, 163, 0.4),
    0 0 30px rgba(90, 138, 163, 0.2),
    0 2px 4px rgba(0, 0, 0, 0.3);
  animation: heroTitleShine 2.5s ease-in-out infinite;
}
@keyframes heroTitleShine {
  0%, 100% {
    text-shadow: 
      0 0 10px rgba(90, 138, 163, 0.6),
      0 0 20px rgba(90, 138, 163, 0.4),
      0 0 30px rgba(90, 138, 163, 0.2),
      0 2px 4px rgba(0, 0, 0, 0.3);
  }
  50% {
    text-shadow: 
      0 0 20px rgba(90, 138, 163, 0.9),
      0 0 40px rgba(90, 138, 163, 0.6),
      0 0 60px rgba(90, 138, 163, 0.4),
      0 2px 4px rgba(0, 0, 0, 0.3);
  }
}
.vista360-hero-main p {
  color: var(--color-text-muted);
  max-width: 680px;
  font-size: 0.95rem;
  line-height: 1.5;
}
.vista360-hero-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  color: var(--color-text-muted);
  font-weight: 600;
}
.vista360-hero-label {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  opacity: 0.8;
}
.vista360-hero-meta strong {
  font-size: 1.2rem;
  color: var(--color-heading);
}
.vista360-hero-user {
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.vista360-filter-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.vista360-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 60px;
}
.vista360-field label {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.vista360-field input,
.vista360-field select {
  background: linear-gradient(135deg, var(--color-field-bg-start), var(--color-field-bg-end));
  border: 1px solid var(--color-border);
  color: var(--color-field-text);
  padding: 11px 14px;
  border-radius: 12px;
  transition: var(--transition);
  backdrop-filter: blur(6px);
  height: 45px;
  box-sizing: border-box;
}
.vista360-field select {
  cursor: pointer;
}
.vista360-field input::placeholder {
  color: var(--color-placeholder);
}
.vista360-field input:focus,
.vista360-field select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(90, 138, 163, 0.2);
}
/* Estilo institucional para el botón de selección de archivo */
.vista360-field input[type="file"] {
  padding: 8px;
  background: rgba(26, 35, 50, 0.4);
  border: 2px solid rgba(90, 138, 163, 0.3);
  border-radius: 12px;
  height: auto;
  min-height: 45px;
  cursor: pointer;
  display: flex;
  align-items: center;
  color: rgba(232, 241, 245, 0.9);
}
.vista360-field input[type="file"]::-webkit-file-upload-button {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 11px 20px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  margin-right: 12px;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(90, 138, 163, 0.3);
  height: 45px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.vista360-field input[type="file"]::-webkit-file-upload-button:hover {
  background: linear-gradient(135deg, #E8F1F5, var(--color-primary));
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(90, 138, 163, 0.5);
  cursor: pointer;
}
.vista360-field input[type="file"]::file-selector-button {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 11px 20px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  margin-right: 12px;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(90, 138, 163, 0.3);
  height: 45px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.vista360-field input[type="file"]::file-selector-button:hover {
  background: linear-gradient(135deg, #E8F1F5, var(--color-primary));
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(90, 138, 163, 0.5);
  cursor: pointer;
}
.vista360-field-actions {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding-top: 0;
}
.vista360-field-actions button,
.vista360-field-actions .btn {
  cursor: pointer;
  height: 45px;
  white-space: nowrap;
}
/* Asegurar cursor pointer en todos los botones de vista360 */
.vista360-btn-search,
.vista360-btn-export,
.vista360-search-buttons button,
.vista360-search-buttons .btn,
.vista360-search-buttons a {
  cursor: pointer;
}

.vista360-upload {
  /* Estilo glassmorphism del landing */
  background: linear-gradient(135deg, rgba(74, 107, 124, 0.2), rgba(44, 62, 80, 0.3));
  backdrop-filter: blur(10px);
  border-radius: 30px;
  padding: 20px 24px;
  border: 2px solid rgba(90, 138, 163, 0.3);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  margin-bottom: 24px;
}
.vista360-upload header h2 {
  font-size: 1.2rem;
  color: var(--color-heading);
  margin-bottom: 6px;
}
.vista360-upload header p {
  color: var(--color-text-muted);
  margin-bottom: 14px;
  font-size: 0.9rem;
}
.vista360-upload-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 14px;
  align-items: start;
}
.vista360-progress {
  display: none;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--color-border);
  grid-column: 1 / -1;
}
.vista360-archivo-nombre {
  color: rgba(232, 241, 245, 0.8);
  font-size: 0.9rem;
  margin-top: 8px;
  min-height: 20px;
}
.vista360-progress-bar {
  height: 100%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  border-radius: inherit;
  width: 0%;
  transition: width 0.35s ease;
}

.vista360-alert {
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(90, 138, 163, 0.12);
  color: #5A8AA3;
  border: 1px solid rgba(90, 138, 163, 0.35);
  margin-bottom: 24px;
  text-align: center;
  font-weight: 600;
}
.vista360-alert-info {
  /* Colores nuevos del logo y landing */
  background: rgba(90, 138, 163, 0.15);
  color: #5A8AA3;
  border: 2px solid rgba(90, 138, 163, 0.4);
  border-radius: 16px;
}

.vista360-detail {
  background: var(--color-surface);
  border-radius: 30px;
  padding: 24px 28px;
  border: 1px solid var(--color-border);
  box-shadow: var(--color-card-shadow);
  margin-bottom: 32px;
}
.vista360-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}
.vista360-section-header h2 {
  margin: 0;
  color: var(--color-heading);
}
.vista360-section-header p {
  margin: 4px 0 0;
  color: var(--color-text-muted);
}
.vista360-table-header {
  align-items: center;
}
.vista360-table-meta {
  display: flex;
  gap: 10px;
  align-items: center;
}
.pill-primary {
  background: rgba(90, 138, 163, 0.85);
  color: #fff;
  border: none;
}
.vista360-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.vista360-detail-section {
  margin-bottom: 26px;
}
.vista360-detail-section h3 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}
.vista360-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.vista360-detail-card {
  padding: 16px;
  border-radius: 14px;
  background: var(--color-card-bg);
  border: 1px solid var(--color-card-border);
  box-shadow: var(--color-card-shadow);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.vista360-detail-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--color-text-muted);
  letter-spacing: 0.06em;
}
.vista360-detail-value {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-text);
}
.vista360-detail-value em {
  color: var(--color-text-muted);
  font-style: normal;
}

.vista360-mass-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  padding: 18px;
  background: var(--color-surface);
  border-radius: 16px;
  border: 1px solid var(--color-border);
}
.vista360-mass-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.vista360-mass-group select,
.vista360-mass-group button {
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background: linear-gradient(135deg, var(--color-field-bg-start), var(--color-field-bg-end));
  color: var(--color-field-text);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.vista360-mass-group button:hover {
  cursor: pointer;
}
.vista360-mass-group button[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.vista360-table-card {
  background: var(--color-card-bg);
  border-radius: 18px;
  border: 1px solid var(--color-card-border);
  box-shadow: var(--color-card-shadow);
  margin-bottom: 26px;
}
.vista360-table-container {
  max-height: 520px;
  overflow: auto;
}
.vista360-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  color: var(--color-text);
}
.vista360-table th,
.vista360-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border);
  text-align: center;
  font-size: 0.9rem;
}
.vista360-table thead {
  position: sticky;
  top: 0;
  background: var(--color-table-head);
  z-index: 2;
}
.vista360-table thead th {
  color: var(--color-text);
  font-weight: 600;
}
.vista360-table tbody tr:hover {
  background: var(--color-table-hover);
}
.vista360-table-select {
  width: 42px;
}
.vista360-table-empty {
  padding: 20px;
  color: var(--color-text-muted);
}
.vista360-link {
  color: var(--color-link);
  font-weight: 600;
  text-decoration: none;
}
.vista360-link:hover {
  text-decoration: none;
}

.vista360-pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.vista360-pagination a,
.vista360-pagination span {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--color-pagination-bg);
  color: var(--color-heading);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
}
.vista360-pagination a:hover {
  background: var(--color-pagination-hover);
  color: var(--color-text);
  cursor: pointer;
}
.vista360-pagination .active {
  background: var(--color-primary);
  color: #000;
}

.vista360-footer {
  text-align: center;
  margin-top: 28px;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

/* Vista 360: botones e iconos más compactos (evitar emojis/iconos gigantes) */
.vista360-body .vista360-btn-search,
.vista360-body .vista360-btn-sin-oc,
.vista360-body .vista360-btn-export,
.vista360-body .vista360-field-actions .btn,
.vista360-body .vista360-detail-actions .btn,
.vista360-body .vista360-mass-group button,
.vista360-body .vista360-mass-group .btn,
.vista360-body .vista360-topbar .btn {
  font-size: 0.8125rem;
  padding: 7px 12px;
  min-height: 34px;
  height: auto;
  line-height: 1.35;
}
.vista360-body .vista360-buttons-container {
  min-width: 140px;
  gap: 6px;
}
.vista360-body .vista360-field-actions button,
.vista360-body .vista360-field-actions .btn {
  height: 34px;
  padding: 6px 12px;
}
.vista360-body .vista360-filter-bar .vista360-field input,
.vista360-body .vista360-filter-bar .vista360-field select {
  padding: 8px 12px;
  height: 38px;
  font-size: 0.875rem;
}
.vista360-body .vista360-hero-main h1 {
  font-size: 1.35rem;
}
.vista360-body .vista360-hero-meta strong {
  font-size: 1rem;
}
.vista360-body .vista360-section-header h2 {
  font-size: 1rem;
}
.vista360-body .vista360-detail-card,
.vista360-body .vista360-detail-section h3 {
  font-size: 0.9rem;
}
.vista360-body .vista360-table th,
.vista360-body .vista360-table td {
  padding: 8px 10px;
  font-size: 0.8125rem;
}
.vista360-body .vista360-upload header h2 {
  font-size: 1rem;
}
.vista360-body .vista360-topbar {
  padding: 10px 20px;
  margin-bottom: 16px;
}
.vista360-body .vista360-topbar-meta strong {
  font-size: 1rem;
}
.vista360-body .vista360-topbar .btn {
  padding: 6px 12px;
  font-size: 0.8125rem;
}

/* ======== RESPONSIVE ======== */
@media (max-width: 900px) {
  :root {
    --wk-sidebar-width: 220px;
  }
}

/* Etiquetas cortas del topbar (móvil) */
.topbar-btn-label-short {
  display: none;
}

@media (max-width: 768px) {
  body.postlogin {
    padding-top: 52px;
  }

  .topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1001;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 6px 10px;
    min-height: 48px;
    max-height: 52px;
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
  }

  .topbar-left {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 50%;
  }

  .topbar-meta strong {
    font-size: 0.68rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 100%;
    -webkit-text-fill-color: currentColor;
    background: none;
    color: inherit;
  }

  .topbar-subtitle,
  .topbar-user,
  .topbar-logo-img,
  .topbar-logo-placeholder {
    display: none !important;
  }

  .topbar-right {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 4px;
    min-width: 0;
  }

  .topbar-btn-label-full {
    display: none;
  }

  .topbar-btn-label-short {
    display: inline;
  }

  .topbar .btn-outline,
  .topbar .btn-ghost,
  .topbar .btn-theme-toggle {
    font-size: 0.65rem;
    padding: 6px 7px;
    min-height: 34px;
    line-height: 1.1;
    white-space: nowrap;
  }

  .topbar-icon-btn,
  .topbar-bell {
    width: 34px;
    height: 34px;
    min-width: 34px;
    padding: 0;
  }

  .topbar-notif-panel {
    position: fixed;
    top: 52px;
    right: 8px;
    left: auto;
    width: min(360px, calc(100vw - 16px));
    z-index: 1003;
    max-height: calc(100vh - 64px);
    overflow: auto;
  }

  .sidebar-logo-toggle,
  #sidebarToggle.sidebar-logo-toggle {
    top: 56px !important;
  }

  .content,
  .main-content,
  .vista360-content {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 12px;
    padding-right: 12px;
    padding-top: 8px;
  }

  .sidebar:not(.collapsed) {
    position: fixed;
    top: 52px;
    left: 0;
    width: min(280px, 88vw) !important;
    height: calc(100vh - 52px);
    z-index: 1000;
    transform: translateX(0) !important;
    opacity: 1 !important;
    pointer-events: auto;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
  }

  .sidebar.collapsed {
    transform: translateX(-100%) !important;
    width: 0 !important;
    pointer-events: none;
  }

  .wk-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 52px 0 0 0;
    z-index: 999;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
  }

  .wk-sidebar-backdrop.is-visible {
    display: block;
  }

  body.wk-sidebar-mobile-open {
    overflow: hidden;
  }

  body.director-institucional .content,
  body.director-institucional .main-content {
    margin: 0 0 24px !important;
    padding: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .container-home {
    margin: 0 8px !important;
    max-width: 100% !important;
    width: auto !important;
  }

  .programador-kpis {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 700px) {
  .cards {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ========== TEMA INSTITUCIONAL DIRECTOR – modo oscuro ========== */
html[data-theme="dark"] body.director-institucional {
  --dir-bg-base: var(--wk-dark-base, #3A4454);
  --dir-bg-panel: var(--wk-dark-panel, #434E60);
  --dir-bg-card: rgba(255, 255, 255, 0.1);
  --dir-border: var(--wk-dark-border, rgba(186, 198, 212, 0.22));
  --dir-cyan: var(--wk-ice, #6BA3C7);
  --dir-blue: var(--wk-steel, #4A7FA5);
  --dir-text-primary: var(--wk-dark-text, #E8EDF2);
  --dir-text-secondary: var(--wk-dark-text-muted, #AEBBC6);
  --dir-text-muted: var(--wk-dark-text-dim, #8E9DAB);
  background-color: var(--dir-bg-base) !important;
  min-height: 100vh;
}

html[data-theme="light"] body.director-institucional {
  --dir-bg-base: var(--wk-cloud);
  --dir-bg-panel: var(--wk-white);
  --dir-bg-card: var(--wk-white);
  --dir-border: rgba(27, 58, 84, 0.12);
  --dir-cyan: var(--wk-teal);
  --dir-blue: var(--wk-steel);
  --dir-text-primary: var(--wk-charcoal);
  --dir-text-secondary: var(--wk-navy);
  --dir-text-muted: var(--wk-steel);
  background-color: var(--wk-cloud) !important;
  min-height: 100vh;
}

body.director-institucional {
  min-height: 100vh;
}
/* Área de contenido con el mismo fondo para que no se vea otra textura */
/* Contenedor único: todo el contenido Director dentro de un panel visible */
body.director-institucional .content,
body.director-institucional .main-content {
  background: var(--dir-bg-panel);
  border: 1px solid var(--dir-border);
  border-radius: 16px;
  padding: 28px 32px;
  margin: 24px 24px 32px;
  box-shadow: 0 6px 24px rgba(20, 28, 38, 0.12);
  min-height: calc(100vh - 120px);
}
body.director-institucional .container,
body.director-institucional .container-wk {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--dir-border);
}
body.director-institucional .topbar {
  background: var(--wk-dark-topbar, #2F3847);
  border-color: var(--dir-border);
  color: var(--dir-text-primary);
}
body.director-institucional .topbar .btn-outline,
body.director-institucional .topbar .btn-ghost {
  color: var(--dir-text-primary) !important;
  border-color: rgba(0,212,255,0.3);
}
body.director-institucional .topbar .btn-outline:hover,
body.director-institucional .topbar .btn-ghost:hover {
  color: var(--dir-cyan) !important;
  border-color: var(--dir-cyan);
  background: rgba(0,212,255,0.1);
}
body.director-institucional .topbar-user,
body.director-institucional .topbar-subtitle,
body.director-institucional .topbar-meta strong {
  color: var(--dir-text-primary);
}
body.director-institucional .topbar .topbar-icon-btn,
body.director-institucional .topbar .topbar-bell {
  color: var(--dir-text-primary);
  border-color: var(--dir-border);
  background: var(--dir-bg-card);
}
body.director-institucional .topbar .topbar-icon-btn:hover,
body.director-institucional .topbar .topbar-bell:hover {
  color: var(--dir-cyan);
  border-color: rgba(0,212,255,0.3);
  background: rgba(0,212,255,0.08);
}
body.director-institucional .sidebar {
  background: var(--dir-bg-panel);
  border-color: var(--dir-border);
  width: 220px;
  display: flex;
  flex-direction: column;
  padding-top: 0;
}
body.director-institucional .sidebar a {
  color: var(--dir-text-secondary);
}
body.director-institucional .sidebar a:hover,
body.director-institucional .sidebar .nav-item:hover {
  background: var(--dir-bg-card);
  color: var(--dir-text-primary);
  border-left-color: var(--dir-cyan);
}
body.director-institucional .sidebar a.active,
body.director-institucional .sidebar .nav-item.active {
  background: rgba(107, 163, 199, 0.14);
  color: var(--wk-ice) !important;
  border-left-color: var(--wk-ice);
}
/* Director sidebar: logo block */
body.director-institucional .sidebar-logo.director-sidebar-logo {
  padding: 10px 10px 12px;
  border-bottom: 1px solid var(--dir-border);
  display: block;
}
[data-theme="light"] body.director-institucional .sidebar-logo.director-sidebar-logo {
  border-bottom-color: rgba(27, 58, 84, 0.12);
}
body.director-institucional .logo-mark {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--dir-cyan), var(--dir-blue));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  color: var(--dir-bg-base);
  flex-shrink: 0;
}
body.director-institucional .logo-text {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--dir-text-primary);
  line-height: 1.1;
}
body.director-institucional .logo-sub {
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--dir-text-muted);
  font-weight: 400;
}
body.director-institucional .sidebar-nav.director-sidebar-nav {
  flex: 1;
  padding: 16px 0;
  overflow-y: auto;
}
body.director-institucional .nav-section-label {
  font-size: 10px;
  letter-spacing: 2px;
  color: #fff;
  padding: 12px 20px 6px;
  text-transform: uppercase;
}
body.director-institucional .sidebar .nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  font-size: 14px;
  color: var(--dir-text-secondary);
  border-left: 2px solid transparent;
  text-decoration: none;
  transition: all 0.2s;
}
body.director-institucional .sidebar .nav-item svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}
body.director-institucional .sidebar-footer.director-sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--dir-border);
  display: flex;
  align-items: center;
  gap: 10px;
}
body.director-institucional .avatar.director-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e3a5f, #2d5986);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--dir-cyan);
  flex-shrink: 0;
  border: 1px solid rgba(0,212,255,0.3);
}
body.director-institucional .sidebar .user-info {
  flex: 1;
  min-width: 0;
}
body.director-institucional .sidebar .user-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--dir-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.director-institucional .sidebar .user-role {
  font-size: 10px;
  color: var(--dir-text-muted);
}
body.director-institucional .sidebar-logout {
  color: var(--dir-text-muted);
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}
body.director-institucional .sidebar-logout:hover {
  color: var(--dir-cyan);
}
body.director-institucional .content,
body.director-institucional .main-content {
  margin-left: 220px;
  color: var(--dir-text-primary);
}
body.director-institucional h1,
body.director-institucional h2,
body.director-institucional h3 {
  color: var(--dir-text-primary);
}
body.director-institucional .card {
  background: var(--dir-bg-card);
  border-color: var(--dir-border);
  color: var(--dir-text-primary);
}

/* Director – Modo claro: fondos claros y texto oscuro (contraste) */
body.director-institucional[data-theme="light"],
[data-theme="light"] body.director-institucional {
  --dir-bg-base: var(--wk-cloud);
  --dir-bg-panel: var(--wk-white);
  --dir-bg-card: var(--wk-white);
  --dir-border: rgba(27, 58, 84, 0.12);
  --dir-cyan: var(--wk-teal);
  --dir-blue: var(--wk-steel);
  --dir-text-primary: var(--wk-charcoal);
  --dir-text-secondary: var(--wk-navy);
  --dir-text-muted: var(--wk-steel);
  background-color: var(--wk-cloud) !important;
}
[data-theme="light"] body.director-institucional .content,
[data-theme="light"] body.director-institucional .main-content {
  background: var(--wk-white) !important;
  border-color: rgba(27, 58, 84, 0.12) !important;
  box-shadow: 0 8px 32px rgba(27, 58, 84, 0.08) !important;
  color: var(--wk-charcoal) !important;
}
[data-theme="light"] body.director-institucional .topbar {
  background: var(--wk-navy);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--wk-frost);
}
[data-theme="light"] body.director-institucional .topbar .btn-outline,
[data-theme="light"] body.director-institucional .topbar .btn-ghost {
  color: var(--wk-frost) !important;
  border-color: rgba(255, 255, 255, 0.35);
}
[data-theme="light"] body.director-institucional .topbar .btn-outline:hover,
[data-theme="light"] body.director-institucional .topbar .btn-ghost:hover {
  color: var(--wk-white) !important;
  border-color: var(--wk-ice);
  background: rgba(255, 255, 255, 0.1);
}
[data-theme="light"] body.director-institucional .topbar-user,
[data-theme="light"] body.director-institucional .topbar-subtitle,
[data-theme="light"] body.director-institucional .topbar-meta strong {
  color: var(--wk-frost);
}
[data-theme="light"] body.director-institucional .topbar .topbar-icon-btn,
[data-theme="light"] body.director-institucional .topbar .topbar-bell {
  color: var(--wk-frost);
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
}
[data-theme="light"] body.director-institucional .topbar .topbar-icon-btn:hover,
[data-theme="light"] body.director-institucional .topbar .topbar-bell:hover {
  color: var(--wk-white);
  border-color: var(--wk-ice);
  background: rgba(255, 255, 255, 0.14);
}
[data-theme="light"] body.director-institucional .sidebar {
  background: var(--wk-white);
  border-color: rgba(27, 58, 84, 0.12);
}
[data-theme="light"] body.director-institucional .sidebar a {
  color: var(--wk-steel);
}
[data-theme="light"] body.director-institucional .sidebar a:hover,
[data-theme="light"] body.director-institucional .sidebar a.active,
[data-theme="light"] body.director-institucional .sidebar .nav-item:hover,
[data-theme="light"] body.director-institucional .sidebar .nav-item.active {
  background: var(--wk-frost) !important;
  color: var(--wk-navy) !important;
  border-left-color: var(--wk-teal) !important;
}
[data-theme="light"] body.director-institucional .logo-text,
[data-theme="light"] body.director-institucional .sidebar .user-name {
  color: var(--wk-charcoal);
}
[data-theme="light"] body.director-institucional .logo-sub,
[data-theme="light"] body.director-institucional .nav-section-label,
[data-theme="light"] body.director-institucional .sidebar .user-role {
  color: var(--wk-steel);
}
[data-theme="light"] body.director-institucional .sidebar-logout {
  color: var(--wk-steel);
}
[data-theme="light"] body.director-institucional .sidebar-logout:hover {
  color: var(--wk-teal);
}
[data-theme="light"] body.director-institucional .content,
[data-theme="light"] body.director-institucional .main-content {
  color: var(--wk-charcoal);
  background: var(--wk-white);
  border-color: rgba(27, 58, 84, 0.12);
  box-shadow: 0 8px 32px rgba(27, 58, 84, 0.08);
}
[data-theme="light"] body.director-institucional h1,
[data-theme="light"] body.director-institucional h2,
[data-theme="light"] body.director-institucional h3 {
  color: var(--wk-navy);
}
[data-theme="light"] body.director-institucional .card {
  background: var(--wk-white);
  border-color: rgba(27, 58, 84, 0.12);
  color: var(--wk-charcoal);
}
[data-theme="light"] body.director-institucional .container,
[data-theme="light"] body.director-institucional .container-wk {
  background: var(--wk-white);
  color: var(--wk-charcoal);
}
[data-theme="light"] body.director-institucional table,
[data-theme="light"] body.director-institucional th,
[data-theme="light"] body.director-institucional td {
  color: var(--wk-charcoal);
}
[data-theme="light"] body.director-institucional .topbar-logo-placeholder {
  color: var(--wk-frost);
}
[data-theme="light"] body.director-institucional .nav-section-label {
  color: var(--wk-steel) !important;
}
[data-theme="light"] body.director-institucional .dashboard-consolidado-dir .kpi-card {
  background: var(--wk-white) !important;
  border-color: rgba(27, 58, 84, 0.1) !important;
  box-shadow: 0 2px 12px rgba(27, 58, 84, 0.06);
}
[data-theme="light"] body.director-institucional .dashboard-consolidado-dir .kpi-card.cyan::before { background: var(--wk-teal); }
[data-theme="light"] body.director-institucional .dashboard-consolidado-dir .kpi-card.blue::before { background: var(--wk-steel); }
[data-theme="light"] body.director-institucional .dashboard-consolidado-dir .kpi-card.green::before { background: #2ecc71; }
[data-theme="light"] body.director-institucional .dashboard-consolidado-dir .kpi-card.amber::before { background: #f39c12; }
[data-theme="light"] body.director-institucional .dashboard-consolidado-dir .kpi-card.cyan .kpi-progress-fill { background: var(--wk-teal); }
[data-theme="light"] body.director-institucional .dashboard-consolidado-dir .kpi-card.blue .kpi-progress-fill { background: var(--wk-steel); }
[data-theme="light"] body.director-institucional .dashboard-consolidado-dir .panel {
  background: var(--wk-white) !important;
  border-color: rgba(27, 58, 84, 0.1) !important;
}
[data-theme="light"] body.director-institucional .dashboard-consolidado-dir .page-title {
  color: var(--wk-navy) !important;
}

/* ========== Dashboard Consolidado Director (imagen referencia) ========== */
body.director-institucional .dashboard-consolidado-dir .page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
}
body.director-institucional .dashboard-consolidado-dir .page-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--dir-text-primary);
  line-height: 1.1;
}
body.director-institucional .dashboard-consolidado-dir .page-subtitle {
  font-size: 13px;
  color: var(--dir-text-muted);
  margin-top: 4px;
}
body.director-institucional .dashboard-consolidado-dir .page-subtitle span {
  color: var(--dir-blue);
  font-weight: 500;
}
/* Subtítulos técnicos del dashboard consolidado (encabezado y fila métricas por estado) */
body.director-institucional .dashboard-consolidado-dir .page-header .page-subtitle {
  display: none !important;
}
body.director-institucional .dashboard-consolidado-dir .metrics-vigmasoft-row > .page-subtitle {
  display: none !important;
}
body.director-institucional .dashboard-consolidado-dir .dashboard-error-msg {
  margin-top: 12px;
  padding: 10px;
  background: rgba(255, 92, 122, 0.15);
  color: #ffb3b3;
  border-radius: 8px;
}
body.director-institucional .dashboard-consolidado-dir .dashboard-info-msg {
  margin-top: 12px;
  padding: 10px;
  background: rgba(0, 212, 255, 0.12);
  color: #7ea8cc;
  border-radius: 8px;
  border: 1px solid rgba(0, 212, 255, 0.25);
  font-size: 13px;
}

body.director-institucional .dashboard-consolidado-dir .kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
body.director-institucional .dashboard-consolidado-dir .kpi-card {
  background: var(--dir-bg-card);
  border: 1px solid var(--dir-border);
  border-radius: 10px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
}
body.director-institucional .dashboard-consolidado-dir .kpi-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 10px 0 0 10px;
}
body.director-institucional .dashboard-consolidado-dir .kpi-card.cyan::before { background: var(--dir-cyan); }
body.director-institucional .dashboard-consolidado-dir .kpi-card.blue::before { background: var(--dir-blue); }
body.director-institucional .dashboard-consolidado-dir .kpi-card.green::before { background: #00e5a0; }
body.director-institucional .dashboard-consolidado-dir .kpi-card.amber::before { background: #ffb74d; }
body.director-institucional .dashboard-consolidado-dir .kpi-label {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--dir-text-muted);
  margin-bottom: 10px;
  font-weight: 500;
}
body.director-institucional .dashboard-consolidado-dir .kpi-value {
  font-size: 34px;
  font-weight: 700;
  color: var(--dir-text-primary);
  line-height: 1;
}
body.director-institucional .dashboard-consolidado-dir .kpi-value .kpi-unit {
  font-size: 16px;
  font-weight: 400;
  color: var(--dir-text-muted);
  margin-left: 4px;
}
body.director-institucional .dashboard-consolidado-dir .kpi-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 12px;
}
body.director-institucional .dashboard-consolidado-dir .kpi-trend.flat,
body.director-institucional .dashboard-consolidado-dir .kpi-compare {
  color: var(--dir-text-muted);
}
body.director-institucional .dashboard-consolidado-dir .kpi-progress {
  margin-top: 12px;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
}
body.director-institucional .dashboard-consolidado-dir .kpi-progress-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 1s ease;
}
body.director-institucional .dashboard-consolidado-dir .kpi-card.cyan .kpi-progress-fill { background: var(--dir-cyan); }
body.director-institucional .dashboard-consolidado-dir .kpi-card.blue .kpi-progress-fill { background: var(--dir-blue); }
body.director-institucional .dashboard-consolidado-dir .kpi-card.green .kpi-progress-fill { background: #00e5a0; }
body.director-institucional .dashboard-consolidado-dir .kpi-card.amber .kpi-progress-fill { background: #ffb74d; }

body.director-institucional .dashboard-consolidado-dir .charts-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
body.director-institucional .dashboard-consolidado-dir .panel {
  background: var(--dir-bg-card);
  border: 1px solid var(--dir-border);
  border-radius: 10px;
  overflow: hidden;
}
body.director-institucional .dashboard-consolidado-dir .panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--dir-border);
}
body.director-institucional .dashboard-consolidado-dir .panel-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--dir-text-secondary);
}
body.director-institucional .dashboard-consolidado-dir .panel-badge {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 20px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
body.director-institucional .dashboard-consolidado-dir .panel-badge.info {
  background: rgba(74, 158, 255, 0.12);
  color: var(--dir-blue);
  border: 1px solid rgba(74, 158, 255, 0.2);
}
body.director-institucional .dashboard-consolidado-dir .panel-badge.cyan {
  background: rgba(0, 212, 255, 0.1);
  color: var(--dir-cyan);
  border: 1px solid rgba(0, 212, 255, 0.2);
}
body.director-institucional .dashboard-consolidado-dir .panel-body {
  padding: 20px;
}
body.director-institucional .dashboard-consolidado-dir .chart-wrap {
  position: relative;
  height: 200px;
}

body.director-institucional .dashboard-consolidado-dir .tables-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
body.director-institucional .dashboard-consolidado-dir table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
body.director-institucional .dashboard-consolidado-dir thead tr {
  background: rgba(0, 0, 0, 0.2);
}
body.director-institucional .dashboard-consolidado-dir thead th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--dir-text-muted);
  border-bottom: 1px solid var(--dir-border);
}
body.director-institucional .dashboard-consolidado-dir .td-right {
  text-align: right;
}

/* Tabla facturación acumulada por ARL × mes (dashboard consolidado) */
body.director-institucional .dashboard-consolidado-dir .fact-mensual-arl-panel {
  width: 100%;
  box-sizing: border-box;
}
body.director-institucional .dashboard-consolidado-dir .fact-mensual-arl-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -4px;
  padding: 0 4px;
}
body.director-institucional .dashboard-consolidado-dir .fact-mensual-arl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 520px;
}
body.director-institucional .dashboard-consolidado-dir .fact-mensual-arl-table th,
body.director-institucional .dashboard-consolidado-dir .fact-mensual-arl-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--dir-border);
}
body.director-institucional .dashboard-consolidado-dir .fact-mensual-arl-table thead th {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dir-text-muted);
  white-space: nowrap;
}
body.director-institucional .dashboard-consolidado-dir .fact-mensual-arl-table .fact-col-arl {
  min-width: 110px;
}
body.director-institucional .dashboard-consolidado-dir .fact-mensual-arl-table .fact-col-mes {
  font-variant-numeric: tabular-nums;
}
body.director-institucional .dashboard-consolidado-dir .fact-mensual-tfoot-row td {
  background: rgba(0, 212, 255, 0.06);
  border-top: 2px solid rgba(100, 180, 255, 0.28);
  color: var(--dir-text-primary);
}

body.director-institucional .dashboard-consolidado-dir tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
body.director-institucional .dashboard-consolidado-dir tbody td {
  padding: 11px 14px;
  color: var(--dir-text-secondary);
}
body.director-institucional .dashboard-consolidado-dir tbody td:first-child {
  color: var(--dir-text-primary);
  font-weight: 500;
}
body.director-institucional .dashboard-consolidado-dir .empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 10px;
}
body.director-institucional .dashboard-consolidado-dir .empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--dir-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dir-text-muted);
}
body.director-institucional .dashboard-consolidado-dir .empty-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--dir-text-secondary);
}
body.director-institucional .dashboard-consolidado-dir .empty-sub {
  font-size: 12px;
  color: var(--dir-text-muted);
  text-align: center;
}
body.director-institucional .dashboard-consolidado-dir .btn-ghost {
  margin-top: 4px;
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid rgba(0, 212, 255, 0.3);
  background: rgba(0, 212, 255, 0.06);
  color: var(--dir-cyan);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}
body.director-institucional .dashboard-consolidado-dir .btn-ghost:hover {
  background: rgba(0, 212, 255, 0.12);
}
body.director-institucional .dashboard-consolidado-dir .table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-top: 1px solid var(--dir-border);
  font-size: 12px;
  color: var(--dir-text-muted);
}
body.director-institucional .dashboard-consolidado-dir .page-dots {
  display: flex;
  gap: 4px;
}
body.director-institucional .dashboard-consolidado-dir .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dir-text-muted);
  cursor: pointer;
  transition: 0.2s;
}
body.director-institucional .dashboard-consolidado-dir .dot.active {
  background: var(--dir-cyan);
}
body.director-institucional .dashboard-consolidado-dir .badge.blue {
  background: rgba(74, 158, 255, 0.1);
  color: var(--dir-blue);
  border: 1px solid rgba(74, 158, 255, 0.2);
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

@media (max-width: 1200px) {
  body.director-institucional .dashboard-consolidado-dir .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  body.director-institucional .dashboard-consolidado-dir .charts-row {
    grid-template-columns: 1fr;
  }
  body.director-institucional .dashboard-consolidado-dir .tables-row {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  body.director-institucional .dashboard-consolidado-dir .kpi-grid {
    grid-template-columns: 1fr;
  }
}

/* Modal Asignación múltiple: anular .btn { color: #000 } y .btn-outline para texto visible */
#modalAsignacionMulti .btn,
#modalAsignacionMulti .btn-outline,
#modalAsignacionMulti .btn-primario {
  color: #ffffff !important;
}
[data-theme="light"] #modalAsignacionMulti .btn-outline,
body.light-mode #modalAsignacionMulti .btn-outline {
  color: #0E1A24 !important;
}
[data-theme="light"] #modalAsignacionMulti .btn-primario,
body.light-mode #modalAsignacionMulti .btn-primario {
  background: #0E1A24 !important;
  border-color: #0E1A24 !important;
  color: #ffffff !important;
}
