/* Shared MYTH Operations navigation. Console layouts own widths and breakpoints. */
:root {
  --ops-nav-bg: #101a2e;
  --ops-nav-text: #d9e3f8;
  --ops-nav-muted: #aab9d4;
  --ops-nav-active: #253b65;
  --ops-nav-hover: #1d2d4a;
  --ops-nav-divider: #33405a;
  --ops-bar-bg: #fff;
  --ops-bar-text: #101b31;
  --ops-bar-border: #dde4ef;
  --ops-bar-hover: #eaf0ff;
}

html[data-theme="dark"] {
  --ops-nav-bg: #0a1222;
  --ops-bar-bg: #151f32;
  --ops-bar-text: #f0f4ff;
  --ops-bar-border: #32405a;
  --ops-bar-hover: #243559;
}

html .myth-nav-rail.myth-nav-rail {
  background: var(--ops-nav-bg);
  color: var(--ops-nav-text);
  border-color: var(--ops-nav-divider);
}
.myth-nav-rail :is(.nav-label, .nav-heading, .nav-caption, .nav-group-label, .ai-nav-label, .hospital-nav-label, .regie-nav-label, .eyebrow, .sidebar-foot p, .sidebar-foot span) {
  color: var(--ops-nav-muted);
}
.myth-nav-rail :is(.nav-link, .nav-item, .ai-nav, .hospital-nav, .regie-nav, .nav-console-link, .myth-side-extra a, .myth-nav-related a, nav [data-view]) {
  color: var(--ops-nav-text);
  border-color: transparent;
  border-radius: 8px;
  text-decoration: none;
}
.myth-nav-rail :is(.nav-link, .nav-item, .ai-nav, .hospital-nav, .regie-nav, .nav-console-link, .myth-side-extra a, .myth-nav-related a, nav [data-view]):hover {
  color: #fff;
  background: var(--ops-nav-hover);
}
.myth-nav-rail :is(.active, .is-active, [aria-current="page"], [aria-selected="true"]):is(.nav-link, .nav-item, .ai-nav, .hospital-nav, .regie-nav, nav [data-view]) {
  color: #fff;
  background: var(--ops-nav-active);
  font-weight: 650;
}
.myth-nav-rail :is(.brand, .ai-brand, .hospital-brand, .treasury-brand, .regie-marque, .sidebar-foot strong) {
  color: #fff;
}
.myth-nav-rail :is(.brand, .ai-brand, .hospital-brand, .treasury-brand) small { color: var(--ops-nav-muted); }
.myth-nav-rail :is(.brand, .ai-brand, .hospital-brand, .treasury-brand) img { filter: brightness(0) invert(1); }
.myth-nav-rail :is(.regie-replier, .sidebar-toggle, .panel-mode-toggle, #menu-toggle) {
  color: var(--ops-nav-text);
  border-color: var(--ops-nav-divider);
  background: var(--ops-nav-hover);
}
.myth-nav-rail :is(.sidebar-bottom, .sidebar-foot, .myth-side-extra, .myth-nav-related) {
  border-color: var(--ops-nav-divider);
}
.myth-nav-related {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--ops-nav-divider);
}
.myth-nav-related > :is(.nav-label, .regie-nav-label) { margin-top: 0; }
.myth-nav-rail :focus-visible, .myth-nav-bar :focus-visible {
  outline: 2px solid #7999ff;
  outline-offset: 2px;
}
html .myth-nav-bar.myth-nav-bar {
  min-height: 64px;
  background: var(--ops-bar-bg);
  color: var(--ops-bar-text);
  border-color: var(--ops-bar-border);
  flex-wrap: wrap;
  column-gap: 12px;
}
.myth-nav-home {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-height: 44px;
  border-radius: 8px;
  color: inherit;
}
.myth-nav-home img { width: 28px; height: 28px; object-fit: contain; }
html[data-theme="dark"] .myth-nav-home img { filter: brightness(0) invert(1); }
.myth-nav-controls {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  max-width: 100%;
}
.myth-nav-bar :is(.myth-nav-controls button, .myth-bar-right .myth-nav-logout) {
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ops-bar-text);
  font: inherit;
  cursor: pointer;
}
.myth-nav-bar .myth-nav-theme {
  width: 44px;
  border-color: var(--ops-bar-border);
}
.myth-nav-bar :is(.myth-nav-home, .myth-nav-controls button, .myth-bar-right .myth-nav-logout):hover { background: var(--ops-bar-hover); }
.myth-nav-rail :is(.msg-brand, .treasury-brand, .sidebar-bottom a, .sidebar-bottom p, .myth-side-extra p) {
  color: var(--ops-nav-text);
}
.myth-nav-rail :is(.msg-brand, .treasury-brand) img { filter: brightness(0) invert(1); }
.myth-nav-rail .myth-side-extra a.myth-side-home { color: var(--ops-nav-text); background: transparent; }
.myth-nav-rail .myth-side-extra a.myth-side-home:hover { background: var(--ops-nav-hover); }
.regie-barre .myth-nav-related { align-self: stretch; }
.regie-shell.reduite .myth-nav-related .regie-nav-label { margin-inline: auto; }
@media (max-width: 820px) {
  .app-header.myth-nav-bar + .app-shell > .myth-nav-rail { position: static; }
}
