/* NEXAKOR ONE V4.28 — Visual Intelligence, Premium Navigation & Context Legibility */
:root{
  --nx428-cyan:#22d3ee;--nx428-sky:#38bdf8;--nx428-blue:#2563eb;--nx428-indigo:#4f46e5;
  --nx428-violet:#8b5cf6;--nx428-emerald:#10b981;--nx428-amber:#f59e0b;--nx428-rose:#f43f5e;
  --nx428-shadow:0 10px 26px rgba(15,23,42,.11),inset 0 1px rgba(255,255,255,.42);
}

/* 1) The company/branch selectors live inside the sidebar in Legacy. They must never inherit dark page text. */
html[data-nav-mode="legacy"][data-sidebar-variant="aurora"] .nx-v416-sidebar-context .context-select,
html[data-nav-mode="legacy"][data-sidebar-variant="executive"] .nx-v416-sidebar-context .context-select,
html[data-nav-mode="legacy"] .sidebar:not([data-variant="corporate"]):not([data-variant="minimal"]) .nx-v416-sidebar-context .context-select{
  color:#f8fbff!important;
  background:linear-gradient(180deg,rgba(255,255,255,.14),rgba(255,255,255,.075))!important;
  border-color:rgba(186,230,253,.28)!important;
  box-shadow:inset 0 1px rgba(255,255,255,.06),0 7px 15px rgba(0,0,0,.12)!important;
}
html[data-nav-mode="legacy"][data-sidebar-variant="aurora"] .nx-v416-sidebar-context .context-select option,
html[data-nav-mode="legacy"][data-sidebar-variant="executive"] .nx-v416-sidebar-context .context-select option,
html[data-nav-mode="legacy"] .sidebar:not([data-variant="corporate"]):not([data-variant="minimal"]) .nx-v416-sidebar-context .context-select option{background:#fff!important;color:#0f172a!important}
html[data-nav-mode="legacy"][data-sidebar-variant="aurora"] .nx-v416-context-caption,
html[data-nav-mode="legacy"][data-sidebar-variant="executive"] .nx-v416-context-caption,
html[data-nav-mode="legacy"][data-sidebar-variant="aurora"] .nx-v416-context-field>span,
html[data-nav-mode="legacy"][data-sidebar-variant="executive"] .nx-v416-context-field>span{color:#d7eefb!important;opacity:1!important}
html[data-nav-mode="legacy"][data-sidebar-variant="corporate"] .nx-v416-sidebar-context .context-select,
html[data-nav-mode="legacy"][data-sidebar-variant="minimal"] .nx-v416-sidebar-context .context-select{color:#17212b!important;background:#fff!important;border-color:#cad6e2!important}

/* 2) Rich module icons: line icon + color + depth, consistent across every navigation experience. */
.nx-module-svg{width:18px;height:18px;display:block;fill:none;stroke:currentColor;stroke-width:1.85;stroke-linecap:round;stroke-linejoin:round}
.nx-rich-nav-icon,.nx-v426-icon{position:relative;display:grid!important;place-items:center!important;flex:0 0 auto;width:30px!important;height:30px!important;min-width:30px!important;border-radius:11px!important;color:#fff!important;border:1px solid rgba(255,255,255,.48)!important;box-shadow:0 7px 16px rgba(15,23,42,.18),inset 0 1px 0 rgba(255,255,255,.44),inset 0 -4px 8px rgba(15,23,42,.12)!important;overflow:hidden}
.nx-rich-nav-icon::after,.nx-v426-icon::after{content:"";position:absolute;inset:1px;border-radius:9px;background:linear-gradient(160deg,rgba(255,255,255,.30),transparent 44%);pointer-events:none}
.nx-rich-nav-icon .nx-module-svg,.nx-v426-icon .nx-module-svg{position:relative;z-index:1;filter:drop-shadow(0 2px 2px rgba(0,0,0,.18))}
.tone-sky{background:linear-gradient(145deg,#67e8f9,#0ea5e9 55%,#1d4ed8)!important}.tone-emerald{background:linear-gradient(145deg,#6ee7b7,#10b981 56%,#047857)!important}.tone-violet{background:linear-gradient(145deg,#c4b5fd,#8b5cf6 56%,#6d28d9)!important}.tone-amber{background:linear-gradient(145deg,#fde68a,#f59e0b 56%,#d97706)!important}.tone-rose{background:linear-gradient(145deg,#fda4af,#f43f5e 56%,#be123c)!important}.tone-cyan{background:linear-gradient(145deg,#a5f3fc,#06b6d4 56%,#0e7490)!important}.tone-indigo{background:linear-gradient(145deg,#a5b4fc,#6366f1 56%,#4338ca)!important}.tone-slate{background:linear-gradient(145deg,#cbd5e1,#64748b 56%,#334155)!important}.tone-teal{background:linear-gradient(145deg,#99f6e4,#14b8a6 56%,#0f766e)!important}
.sidebar .nav-item{min-height:42px!important;gap:10px!important}.sidebar .nav-item:hover .nx-rich-nav-icon{transform:translateY(-1px) scale(1.04)}
.nx-v426-module{gap:11px!important}.nx-v426-module .nx-v426-icon{width:36px!important;height:36px!important;min-width:36px!important;border-radius:13px!important}.nx-v426-module.tile .nx-v426-icon{width:44px!important;height:44px!important;min-width:44px!important}.nx-v426-dock .nx-v426-icon{width:34px!important;height:34px!important;min-width:34px!important}

/* 3) A menu-type control that is actually visible. */
.nx-menu-type-button{height:36px!important;min-height:36px!important;gap:7px!important;padding:0 11px!important;border-radius:11px!important;font-size:11px!important;font-weight:850!important;box-shadow:0 5px 14px rgba(15,23,42,.06)}
.nx-menu-type-button>span:first-child{font-size:15px;color:var(--accent)}
html[data-nexakor-theme="veltria-oscuro"] .nx-menu-type-button{background:rgba(255,255,255,.10)!important;color:#eef8f4!important;border-color:rgba(255,255,255,.18)!important}
.nx-v428-mode-picker{top:9vh!important;width:min(940px,calc(100vw - 30px))!important;max-height:82vh!important;padding:0!important;overflow:hidden!important;background:linear-gradient(160deg,var(--surface),color-mix(in srgb,var(--surface2) 82%,var(--primary) 18%))!important}
.nx-v428-mode-picker>header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:20px 22px 14px;border-bottom:1px solid var(--border)}
.nx-v428-mode-picker>header span{font-size:9px;font-weight:900;letter-spacing:.16em;color:var(--primary)}
.nx-v428-mode-picker>header h3{margin:4px 0 4px!important;font-size:22px!important}.nx-v428-mode-picker>header p{margin:0;color:var(--muted);font-size:12px}
.nx-v428-mode-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;padding:18px 20px 22px}
.nx-v428-mode-choice{position:relative;min-width:0;padding:12px!important;border:1px solid var(--border)!important;border-radius:16px!important;background:linear-gradient(160deg,var(--surface),color-mix(in srgb,var(--surface2) 92%,var(--primary) 8%))!important;color:var(--ink)!important;text-align:left!important;box-shadow:0 9px 24px rgba(15,23,42,.06);display:grid!important;grid-template-columns:1fr!important;gap:7px!important}
.nx-v428-mode-choice:hover{transform:translateY(-2px);border-color:color-mix(in srgb,var(--primary) 55%,var(--border))!important;box-shadow:0 16px 34px rgba(15,23,42,.11)}.nx-v428-mode-choice.active{outline:2px solid var(--accent);outline-offset:1px}
.nx-v428-mode-choice strong{font-size:14px}.nx-v428-mode-choice small{min-height:48px;line-height:1.4!important;color:var(--muted)!important}.nx-v428-mode-choice em{justify-self:start;font-size:9px;font-style:normal;font-weight:900;letter-spacing:.09em;color:var(--primary)}
.nx-v428-mode-preview{height:92px;border-radius:12px;border:1px solid color-mix(in srgb,var(--border) 76%,transparent);background:linear-gradient(145deg,color-mix(in srgb,var(--nav) 94%,#fff 6%),color-mix(in srgb,var(--primary) 70%,var(--nav) 30%));display:grid;gap:5px;padding:8px;overflow:hidden;box-shadow:inset 0 1px rgba(255,255,255,.14)}
.nx-v428-mode-preview i{display:block;border-radius:5px;background:rgba(255,255,255,.80)}.nx-v428-mode-preview.command{grid-template-columns:1fr 1fr;grid-template-rows:17px 1fr 1fr}.nx-v428-mode-preview.command i:first-child{grid-column:1/-1}.nx-v428-mode-preview.launch{grid-template-columns:repeat(3,1fr);grid-template-rows:18px 1fr}.nx-v428-mode-preview.launch i:first-child{grid-column:1/-1}.nx-v428-mode-preview.dock{grid-template-columns:repeat(4,1fr);align-content:end}.nx-v428-mode-preview.dock i{height:22px}.nx-v428-mode-preview.legacy{grid-template-columns:30% 1fr;grid-template-rows:repeat(3,1fr)}.nx-v428-mode-preview.legacy i:first-child{grid-row:1/-1}

/* 4) Executive dashboard uses the viewport: six professional visual panels, less dead space. */
.dashboard-v384{width:100%!important;max-width:none!important;gap:6px!important}.dashboard-v384 .dash-premium-section{width:100%!important;max-width:none!important}.dashboard-v384 .dash-card-grid{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))!important;gap:7px!important}.dashboard-v384 .dash-card-premium{height:88px!important;min-height:88px!important;padding:8px 10px!important}.dashboard-v384 .dash-insights-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important;margin-top:8px!important;align-items:stretch!important}.dashboard-v384 .dash-insight-card{height:222px!important;min-height:222px!important;max-height:222px!important;padding:10px 11px!important;overflow:hidden!important}.dashboard-v384 .dash-v400-pulse{margin-bottom:5px!important}.workspace-home-scroll{padding:12px 14px 52px!important}.workspace-home-scroll::after{display:none!important}
.nx-v428-chart-card>header{display:flex;align-items:center;gap:8px;margin-bottom:7px}.nx-v428-chart-card>header h3{font-size:12px!important;margin:0!important;line-height:1.15}.nx-v428-chart-card>header p{font-size:9.5px!important;margin:2px 0 0!important;line-height:1.2}.nx-v428-chart-icon{display:grid;place-items:center;width:27px;height:27px;border-radius:9px;background:linear-gradient(145deg,#22d3ee,#2563eb);color:#fff;font-weight:900;box-shadow:0 6px 15px rgba(37,99,235,.22)}
.nx-v428-3d-bars{display:grid;gap:5px}.nx-v428-3d-row{display:grid;grid-template-columns:minmax(84px,.72fr) minmax(0,1fr) auto;gap:6px;align-items:center;font-size:9.5px}.nx-v428-3d-row>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.nx-v428-3d-row>div{height:10px;border-radius:999px;background:color-mix(in srgb,var(--surface2) 78%,var(--border) 22%);box-shadow:inset 0 2px 3px rgba(15,23,42,.10)}.nx-v428-3d-row i{display:block;width:var(--w);height:100%;border-radius:999px;background:linear-gradient(90deg,#22d3ee,#2563eb 55%,#8b5cf6);box-shadow:0 3px 8px rgba(37,99,235,.24),inset 0 1px rgba(255,255,255,.5)}.nx-v428-3d-row strong{font-size:9.5px;font-variant-numeric:tabular-nums}
.nx-v428-donut-layout{height:164px;display:grid;grid-template-columns:150px 1fr;gap:8px;align-items:center}.nx-v428-donut-layout svg{width:148px;height:148px;filter:drop-shadow(0 8px 14px rgba(15,23,42,.14))}.nx-v428-donut-layout text{fill:currentColor}.nx-v428-legend{display:grid;gap:5px;align-content:center}.nx-v428-legend span{display:grid;grid-template-columns:8px 1fr auto;gap:6px;align-items:center;font-size:9.5px}.nx-v428-legend span>i{width:8px;height:8px;border-radius:50%}.nx-v428-legend em{font-style:normal;font-weight:850}
.nx-v428-spark-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}.nx-v428-spark-grid>div{position:relative;min-height:66px;padding:5px 6px;border:1px solid color-mix(in srgb,var(--border) 84%,transparent);border-radius:9px;background:color-mix(in srgb,var(--surface) 93%,var(--primary) 7%);overflow:hidden}.nx-v428-spark-grid span{display:block;font-size:8.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.nx-v428-spark-grid strong{display:block;font-size:10px;margin-top:2px}.nx-v428-spark-grid strong.up{color:var(--good)}.nx-v428-spark-grid strong.down{color:var(--bad)}.nx-v428-spark-grid svg{position:absolute;right:2px;bottom:2px;width:86px;height:43px;opacity:.95}
.nx-v428-ranking{display:grid;gap:4px}.nx-v428-ranking>div{display:grid;grid-template-columns:21px minmax(0,1fr) auto;gap:6px;align-items:center;padding:4px 6px;border-radius:8px;background:color-mix(in srgb,var(--surface2) 72%,var(--primary) 8%);font-size:9px}.nx-v428-ranking .rank{display:grid;place-items:center;width:19px;height:19px;border-radius:7px;background:linear-gradient(145deg,#38bdf8,#4f46e5);color:#fff;font-weight:900}.nx-v428-ranking b,.nx-v428-ranking small{display:block}.nx-v428-ranking small{font-size:8px}.nx-v428-ranking strong{font-size:9px}
.nx-v428-heatmap{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.nx-v428-heatmap button{min-width:0;min-height:47px;padding:5px 6px;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--ink);text-align:left}.nx-v428-heatmap button[data-status="CRITICAL"],.nx-v428-heatmap button[data-status="HIGH"]{background:color-mix(in srgb,#ef4444 12%,var(--surface));border-color:color-mix(in srgb,#ef4444 34%,var(--border))}.nx-v428-heatmap button[data-status="WATCH"]{background:color-mix(in srgb,#f59e0b 12%,var(--surface));border-color:color-mix(in srgb,#f59e0b 34%,var(--border))}.nx-v428-heatmap span,.nx-v428-heatmap strong,.nx-v428-heatmap small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.nx-v428-heatmap span{font-size:8px}.nx-v428-heatmap strong{font-size:10px;margin:2px 0}.nx-v428-heatmap small{font-size:7.5px}
.nx-v428-concentration{display:grid;gap:7px}.nx-v428-stack{display:flex;height:24px;border-radius:8px;overflow:hidden;background:var(--surface2);box-shadow:inset 0 2px 4px rgba(15,23,42,.12)}.nx-v428-stack i{display:block;height:100%;box-shadow:inset 0 1px rgba(255,255,255,.46)}.nx-v428-concentration>div:not(.nx-v428-stack){display:grid;grid-template-columns:8px 1fr auto;gap:5px;align-items:center;font-size:8.5px}.nx-v428-concentration>div>i{width:8px;height:8px;border-radius:3px}.nx-v428-concentration>div>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* 5) Reusable module-summary visual intelligence. Uses only values already visible to the user. */
.nx-v428-auto-visuals{margin:8px 0 12px;padding:10px;border:1px solid color-mix(in srgb,var(--border) 82%,var(--primary) 18%);border-radius:16px;background:linear-gradient(155deg,color-mix(in srgb,var(--surface) 96%,var(--primary) 4%),color-mix(in srgb,var(--surface2) 91%,var(--accent) 9%));box-shadow:0 10px 26px rgba(15,23,42,.055)}
.nx-v428-auto-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:7px}.nx-v428-auto-head>div{display:flex;align-items:center;gap:8px}.nx-v428-auto-head b{font-size:12px}.nx-v428-auto-head span{font-size:9px;color:var(--muted)}.nx-v428-auto-badge{display:grid!important;place-items:center;width:27px;height:27px;border-radius:9px;color:#fff!important;background:linear-gradient(145deg,#22d3ee,#4f46e5);box-shadow:0 5px 12px rgba(37,99,235,.20)}
.nx-v428-auto-grid{display:grid;grid-template-columns:1.2fr .8fr 1fr;gap:8px}.nx-v428-auto-card{min-width:0;height:150px;padding:8px;border:1px solid var(--border);border-radius:12px;background:var(--surface);overflow:hidden}.nx-v428-auto-card h4{margin:0 0 6px!important;font-size:10px!important}.nx-v428-auto-bars{display:grid;gap:5px}.nx-v428-auto-bars>div{display:grid;grid-template-columns:90px 1fr auto;gap:5px;align-items:center;font-size:8.5px}.nx-v428-auto-bars span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.nx-v428-auto-bars i{display:block;height:8px;border-radius:999px;background:linear-gradient(90deg,#22d3ee,#2563eb,#8b5cf6);box-shadow:0 2px 5px rgba(37,99,235,.18)}.nx-v428-auto-bars strong{font-size:8.5px}
.nx-v428-auto-donut{display:grid;place-items:center;height:116px}.nx-v428-auto-donut>div{width:105px;height:105px;border-radius:50%;display:grid;place-items:center;filter:drop-shadow(0 8px 12px rgba(15,23,42,.12))}.nx-v428-auto-donut>div>span{width:67px;height:67px;border-radius:50%;display:grid;place-items:center;text-align:center;background:var(--surface);font-size:9px;font-weight:850;line-height:1.05}.nx-v428-auto-rank{display:grid;gap:4px}.nx-v428-auto-rank>div{display:grid;grid-template-columns:18px minmax(0,1fr) auto;gap:5px;align-items:center;padding:4px;border-radius:7px;background:var(--surface2);font-size:8.5px}.nx-v428-auto-rank b{display:grid;place-items:center;width:18px;height:18px;border-radius:6px;background:linear-gradient(145deg,#38bdf8,#4f46e5);color:#fff}.nx-v428-auto-rank span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.login-card [data-tenant-choice] small{margin-top:4px;font-size:10.5px;line-height:1.35;color:var(--muted)}.login-card [data-tenant-choice] select{min-height:42px}

@media(max-width:1180px){.dashboard-v384 .dash-insights-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.nx-v428-mode-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.nx-v428-auto-grid{grid-template-columns:1fr 1fr}.nx-v428-auto-card:last-child{grid-column:1/-1}}
@media(max-width:760px){.nx-menu-type-button [data-nav-experience-label]{display:none}.nx-menu-type-button{width:38px!important;padding:0!important}.dashboard-v384 .dash-insights-grid{grid-template-columns:1fr!important}.dashboard-v384 .dash-insight-card{height:auto!important;min-height:210px!important;max-height:none!important}.nx-v428-mode-grid{grid-template-columns:1fr}.nx-v428-auto-grid{grid-template-columns:1fr}.nx-v428-auto-card,.nx-v428-auto-card:last-child{grid-column:auto;height:auto;min-height:140px}}

/* V4.28: the menu-type control must remain visible on desktop. V4.19 hides the whole topbar on desktop to maximize
   the workspace, which also hid the new "Tipo de menú" entry. Restore a slim topbar that exposes only the menu-type
   selector; context/company/actions stay in the sidebar so nothing is duplicated. */
@media(min-width:901px){
  html[data-nav-mode] .main:has(.topbar.nx-v419-topbar){grid-template-rows:40px minmax(0,1fr)!important}
  html[data-nav-mode] .topbar.nx-v419-topbar{display:flex!important;height:40px!important;min-height:40px!important;padding:3px 12px!important;align-items:center!important;justify-content:flex-end!important;gap:8px!important}
  html[data-nav-mode] .topbar.nx-v419-topbar .menu-toggle,
  html[data-nav-mode] .topbar.nx-v419-topbar .top-search,
  html[data-nav-mode] .topbar.nx-v419-topbar .context-group,
  html[data-nav-mode] .topbar.nx-v419-topbar .status,
  html[data-nav-mode] .topbar.nx-v419-topbar [data-help],
  html[data-nav-mode] .topbar.nx-v419-topbar [data-nexa],
  html[data-nav-mode] .topbar.nx-v419-topbar [data-language]{display:none!important}
  html[data-nav-mode] .topbar.nx-v419-topbar .top-actions{display:flex!important;align-items:center!important;gap:8px!important;margin-left:auto!important}
  html[data-nav-mode] .topbar.nx-v419-topbar .nx-menu-type-button{display:inline-flex!important;visibility:visible!important;opacity:1!important}
}

/* V4.28 regression guard: V4.27 certified solid theme surfaces and dark-sidebar legibility. The V4.28 stylesheet
   dropped those rules (they had been added to v427.css), which collapsed title/sidebar contrast in the light,
   industrial and executive themes. They are restored here, loaded after every prior stylesheet. */
html[data-nexakor-theme] .card,html[data-nexakor-theme] .kpi,html[data-nexakor-theme] .content,html[data-nexakor-theme] .modal,html[data-nexakor-theme] .data-grid{background-color:var(--surface)!important}
html[data-nexakor-theme] .app-shell .sidebar[data-variant="aurora"],html[data-nexakor-theme] .app-shell .sidebar[data-variant="executive"]{background-color:var(--nav)!important}
html[data-nexakor-theme] .app-shell .sidebar[data-variant="aurora"] .nav-item,html[data-nexakor-theme] .app-shell .sidebar[data-variant="aurora"] .nav-item span,html[data-nexakor-theme] .app-shell .sidebar[data-variant="aurora"] .nav-item strong,html[data-nexakor-theme] .app-shell .sidebar[data-variant="aurora"] .nav-group-toggle,html[data-nexakor-theme] .app-shell .sidebar[data-variant="aurora"] .nav-group-toggle span,html[data-nexakor-theme] .app-shell .sidebar[data-variant="executive"] .nav-item,html[data-nexakor-theme] .app-shell .sidebar[data-variant="executive"] .nav-item span,html[data-nexakor-theme] .app-shell .sidebar[data-variant="executive"] .nav-item strong,html[data-nexakor-theme] .app-shell .sidebar[data-variant="executive"] .nav-group-toggle,html[data-nexakor-theme] .app-shell .sidebar[data-variant="executive"] .nav-group-toggle span{color:#e9f6ee!important}
