/*!***************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[3]!./app/side-rail.css ***!
  \***************************************************************************************************************************************************************************************************************************************************************/
/* FX5 Manager ? teal / slate chrome */

.shell-rail {
  --rail-w: 248px;
  --rail-w-c: 64px;
  --fxm-primary: var(--primary);
  --fxm-primary-hover: var(--primary-hover);
  --fxm-primary-active: var(--primary-active);
  --fxm-soft: var(--primary-soft);
  --fxm-bg: var(--bg);
  --fxm-surface: var(--bg-elev);
  --fxm-secondary: var(--bg-row);
  --fxm-border: var(--border);
  --fxm-text: var(--text);
  --fxm-text-2: var(--text-2);
  --fxm-muted: var(--muted);
  --fxm-ok: var(--ok);
  --fxm-warn: var(--warn);
  --fxm-info: var(--info);
  --fxm-header: var(--header-bg);
  --fxm-header-text: var(--header-text);
  --fxm-footer: var(--footer-bg);
  --fxm-footer-text: var(--footer-text);
  --fxm-radius: 8px;
  --fxm-radius-sm: 6px;
  --fxm-shadow: var(--shadow);
  grid-template-columns: var(--rail-w) 1fr;
  background: var(--fxm-bg);
  color: var(--fxm-text);
  font-family: "Segoe UI Variable", "Segoe UI", "Inter", system-ui, sans-serif;
}

.shell-rail.shell-collapsed {
  grid-template-columns: var(--rail-w-c) 1fr;
}

/* -- Sidebar ? theme-aware rail -- */
.fxm-rail {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 40;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--bg-side) 0%, var(--bg-side-2) 100%);
  color: var(--side-text);
  border-right: 1px solid var(--side-border);
  overflow: hidden;
}

.fxm-rail-art {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.fxm-rail-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
}
.fxm-rail-orb.a {
  width: 180px;
  height: 180px;
  top: -60px;
  right: -70px;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.28), transparent 68%);
}
.fxm-rail-orb.b {
  width: 220px;
  height: 220px;
  bottom: 10%;
  left: -110px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.18), transparent 70%);
}
.fxm-rail-mesh {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.12) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.55), transparent 85%);
          mask-image: linear-gradient(180deg, rgba(0,0,0,.55), transparent 85%);
}

.fxm-metro-tiles,
.fxm-metro-tile {
  display: none !important;
}

.fxm-rail-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 8px 12px;
  flex-shrink: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
}

.fxm-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1;
  text-decoration: none;
  color: inherit;
}

.fxm-brand:hover {
  text-decoration: none;
  color: inherit;
}

.fxm-brand-mark {
  width: 34px;
  height: 34px;
  border-radius: var(--fxm-radius-sm);
  background: var(--primary);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid #000000;
}

.fxm-icon-btn {
  width: 30px;
  height: 30px;
  border: 1px solid #333;
  border-radius: var(--fxm-radius-sm);
  background: #1f1f1f;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none;
}

.fxm-icon-btn:hover {
  background: #222;
  color: var(--primary);
  border-color: var(--primary);
}

.fxm-mt-card {
  border-radius: var(--fxm-radius);
  padding: 10px;
  background: #1f1f1f;
  border: 1px solid #333;
  box-shadow: none;
}

.fxm-mt-top strong {
  display: block;
  font-size: 12.5px;
  color: var(--primary);
}

.fxm-brand-mark .brand-logo {
  width: 26px !important;
  height: 26px !important;
  border: 0 !important;
  border-radius: 4px !important;
  box-shadow: none !important;
  background: transparent !important;
}

.fxm-brand-copy {
  min-width: 0;
  line-height: 1.15;
}

.fxm-brand-copy strong {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.01em;
}

.fxm-brand-copy em {
  display: block;
  margin-top: 2px;
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--fxm-primary);
}

.fxm-chev-left {
  transform: rotate(90deg);
}

.fxm-chev-left.open {
  transform: rotate(-90deg);
}

.fxm-rail-search {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 10px 6px;
  padding: 7px 10px;
  border-radius: var(--fxm-radius-sm);
  background: var(--fxm-secondary);
  border: 1px solid var(--fxm-border);
  flex-shrink: 0;
}

.fxm-find-ico {
  width: 14px;
  height: 14px;
  color: var(--fxm-muted);
}

.fxm-rail-search input {
  flex: 1 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--fxm-text);
  font: inherit;
  font-size: 12.5px;
}

.fxm-rail-search input::placeholder {
  color: var(--fxm-muted);
}

.fxm-rail-search kbd {
  font-family: ui-monospace, monospace;
  font-size: 10px;
  padding: 2px 5px;
  border-radius: 4px;
  border: 1px solid var(--fxm-border);
  color: var(--fxm-muted);
  background: var(--fxm-surface);
}

.fxm-rail-nav {
  position: relative;
  z-index: 1;
  flex: 1 1;
  overflow: auto;
  padding: 4px 8px 12px;
}

.fxm-rail-nav::-webkit-scrollbar {
  width: 4px;
}

.fxm-rail-nav::-webkit-scrollbar-thumb {
  background: #d0d5dd;
  border-radius: 4px;
}

.fxm-nav-group {
  margin-bottom: 4px;
}

.fxm-nav-heading {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 18px 6px;
  border: 0;
  background: transparent;
  color: var(--fxm-muted);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  text-align: left;
  border-radius: 0;
}

.fxm-rail.is-collapsed .fxm-nav-link {
  justify-content: center;
  padding: 8px;
  margin: 2px 6px;
}

.fxm-rail.is-collapsed .fxm-nav-link.is-active::before {
  display: none;
}

.fxm-rail.is-collapsed .fxm-nav-link.is-active {
  background: rgba(245, 197, 24, 0.12) !important;
}

.fxm-rail.is-collapsed .fxm-nav-tile {
  color: inherit;
}

.fxm-nav-heading:hover {
  color: var(--fxm-text-2);
}

.fxm-mini-chev {
  width: 12px;
  height: 12px;
  opacity: 0.7;
  transition: transform 0.15s ease;
}

.fxm-mini-chev.open {
  transform: rotate(180deg);
}

.fxm-nav-empty {
  margin: 0;
  padding: 8px 10px;
  color: var(--fxm-muted);
  font-size: 12px;
}

.fxm-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 36px;
  padding: 6px 10px 6px 12px;
  margin: 2px 8px;
  border-radius: 6px;
  border-left: 0;
  position: relative;
  color: var(--fxm-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  background: transparent;
  transition: background 0.08s ease;
}

.fxm-nav-link:hover {
  background: rgba(245, 197, 24, 0.08);
  color: var(--fxm-text);
  text-decoration: none;
}

.fxm-nav-link.is-active {
  background: rgba(245, 197, 24, 0.14) !important;
  color: var(--primary) !important;
  font-weight: 600;
}

.fxm-nav-link.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--primary);
}

.fxm-nav-tile {
  width: 20px;
  height: 20px;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: transparent;
  color: #e8e8e8;
  border: 0;
}

.fxm-nav-ico {
  width: 16px !important;
  height: 16px !important;
  color: inherit !important;
  flex-shrink: 0;
}

.fxm-nav-link:hover .fxm-nav-tile {
  background: transparent;
  border-color: transparent;
  color: var(--primary);
}

.fxm-nav-link.is-active .fxm-nav-tile {
  background: transparent;
  border-color: transparent;
  color: var(--primary);
  box-shadow: none;
}

.fxm-nav-text {
  flex: 1 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fxm-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--fxm-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.fxm-rail-foot {
  position: relative;
  z-index: 1;
  padding: 10px;
  flex-shrink: 0;
  border-top: 1px solid var(--fxm-border);
  background: var(--fxm-surface);
}

.fxm-mt-card {
  border-radius: var(--fxm-radius);
  padding: 10px;
  background: var(--fxm-secondary);
  border: 1px solid var(--fxm-border);
  box-shadow: none;
}

.fxm-mt-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.fxm-mt-top strong {
  display: block;
  font-size: 12.5px;
  color: var(--fxm-text);
}

.fxm-mt-conn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 11px;
  color: #027a48;
}

.fxm-mt-conn i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--fxm-ok);
}

.fxm-live-pill {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 999px;
  background: #ecfdf3;
  color: #027a48;
  border: 1px solid #abefc6;
}

.fxm-mt-time {
  margin-top: 8px;
  font-size: 11px;
  color: var(--fxm-muted);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

/* Collapsed rail */
.fxm-rail.is-collapsed .fxm-rail-head {
  flex-direction: column;
  padding: 12px 8px;
}

.fxm-rail.is-collapsed .fxm-brand {
  justify-content: center;
  flex: 0 1;
}

.fxm-rail.is-collapsed .fxm-nav-link {
  justify-content: center;
  padding: 8px;
  margin: 2px 6px;
}

.fxm-rail.is-collapsed .fxm-nav-link.is-active {
  background: rgba(245, 197, 24, 0.12) !important;
}

.fxm-rail.is-collapsed .fxm-nav-link.is-active::before {
  display: none;
}

.fxm-rail.is-collapsed .fxm-rail-foot {
  display: flex;
  justify-content: center;
  padding: 8px;
}

.fxm-foot-dot {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #ecfdf3;
  border: 1px solid #abefc6;
  display: grid;
  place-items: center;
}

.fxm-foot-dot i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fxm-ok);
}

/* -- Topbar -- */
.shell-rail .main {
  background: var(--fxm-bg);
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  color: var(--fxm-text);
}

.shell-rail .topbar.fxm-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 12px;
  background: var(--fxm-header, var(--header-bg));
  color: var(--fxm-header-text, #f8fafc);
  border-bottom: 1px solid rgba(45, 212, 191, 0.28);
  box-shadow: none;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 50;
  overflow: visible;
}

.fxm-nav-toggle {
  width: 36px !important;
  height: 36px !important;
  border-radius: 6px !important;
  color: var(--fxm-header-text, #f8fafc) !important;
}

.fxm-nav-toggle:hover {
  background: rgba(0, 0, 0, 0.1) !important;
}

.fxm-top-titles {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
  margin-right: 8px;
}

.fxm-top-titles strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--fxm-header-text, #f8fafc);
  letter-spacing: 0;
  font-family: "Segoe UI Variable", "Segoe UI", sans-serif;
}

.fxm-top-titles span {
  font-size: 11px;
  color: var(--header-muted, #3d3200);
  font-weight: 600;
}

.fxm-top-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1;
  min-width: 0;
}

.fxm-top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1;
  max-width: 440px;
  padding: 7px 10px;
  border-radius: var(--fxm-radius-sm);
  background: rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.25);
  color: #3d3200;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.fxm-top-search:hover {
  border-color: rgba(0, 0, 0, 0.4);
  background: rgba(0, 0, 0, 0.18);
}

.fxm-top-search span {
  flex: 1 1;
  font-size: 13px;
  color: #3d3200;
}

.fxm-top-search kbd {
  font-family: ui-monospace, monospace;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.25);
  color: #000000;
}

.fxm-top-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  position: relative;
  z-index: 80;
  overflow: visible;
}

.fxm-live-server {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.15);
  color: #f8fafc;
  border: 1px solid rgba(0, 0, 0, 0.25);
  font-size: 12px;
  font-weight: 650;
}

.fxm-live-server i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #161616;
}

.fxm-top-clock {
  font-size: 12px;
  color: #000000;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-weight: 600;
}

.fxm-top-btn {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: var(--fxm-radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: #000000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
}

.fxm-top-btn:hover {
  background: rgba(0, 0, 0, 0.12);
  color: #000000;
  border-color: rgba(0, 0, 0, 0.2);
  text-decoration: none;
}

.fxm-top-btn .fxm-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 15px;
  height: 15px;
  font-size: 9px;
}

.fxm-top-btn.is-warn {
  color: #b54708;
  background: #fffaeb;
  border-color: #fedf89;
}

.fxm-user-menu {
  position: relative;
}

.fxm-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 8px 2px 2px;
  border-radius: 20px;
  border: 1px solid transparent;
  background: transparent;
  max-width: 220px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
}

.fxm-user:hover,
.fxm-user-menu.is-open .fxm-user {
  border-color: var(--fxm-border);
  background: rgba(0, 0, 0, 0.04);
}

.fxm-top-actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.fxm-user-av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #161616;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0;
  border: 1px solid #000000;
}

.fxm-user-meta strong {
  font-size: 12.5px;
  font-weight: 700;
  color: #000000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fxm-user-meta span {
  font-size: 11px;
  color: #3d3200;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fxm-user-chev {
  width: 14px;
  height: 14px;
  color: #000000;
  flex-shrink: 0;
}

.fxm-app-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 16px;
  border-top: 2px solid var(--primary);
  background: var(--fxm-footer, #3a3420);
  font-size: 12px;
  color: var(--fxm-footer-text, #e8d48a);
}

.fxm-app-foot-right a {
  color: #f0e0a0;
  text-decoration: none;
  font-weight: 550;
}

.fxm-app-foot-right a:hover {
  color: var(--primary);
  text-decoration: none;
}

.shell-rail .btn:not(.ghost):not(.danger) {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #ffffff !important;
}

.shell-rail .btn.ghost {
  background: transparent !important;
  border: 1px solid #444 !important;
  color: #f5f5f5 !important;
}

.shell-rail .panel,
.shell-win11 .panel,
.shell-metro .panel,
.shell-rail .card,
.shell-rail .cards-dash .card {
  border-radius: 8px !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow-sm) !important;
  background: var(--bg-elev) !important;
  color: var(--text) !important;
}

.fxm-badge {
  background: #161616;
  color: var(--primary);
}

.fxm-hero {
  border-radius: var(--fxm-radius);
  padding: 14px 16px;
  background: var(--primary);
  color: #000000;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  min-height: 88px;
  border: 1px solid #000000;
  box-shadow: none;
}

.fxm-user-av.lg {
  width: 40px;
  height: 40px;
  font-size: 16px;
  border-radius: 50%;
}

.fxm-user-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.fxm-user-meta strong {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--fxm-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fxm-user-meta span {
  font-size: 11px;
  color: var(--fxm-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fxm-user-chev {
  width: 14px;
  height: 14px;
  color: var(--fxm-muted);
  flex-shrink: 0;
  transform: rotate(0deg);
}

.fxm-user-menu.is-open .fxm-user-chev {
  transform: rotate(180deg);
}

.fxm-user-drop {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 240px;
  background: #242424;
  border: 1px solid #333;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  padding: 6px;
  z-index: 60;
}

.fxm-user-drop-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px 12px;
  border-bottom: 1px solid #333;
  margin-bottom: 4px;
}

.fxm-user-drop-head strong {
  display: block;
  font-size: 13px;
  color: var(--primary);
}

.fxm-user-drop-head span {
  display: block;
  font-size: 11px;
  color: #c0c0c0;
  word-break: break-all;
}

.fxm-user-drop a,
.fxm-user-drop button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #f5f5f5;
  font: inherit;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  text-align: left;
}

.fxm-user-drop a:hover,
.fxm-user-drop button:hover {
  background: rgba(20, 184, 166, 0.14);
  text-decoration: none;
  color: var(--primary);
}

/* Header sits on dark slate ? light text/icons */
.shell-rail .topbar.fxm-topbar .fxm-user-meta strong {
  color: #f8fafc !important;
}
.shell-rail .topbar.fxm-topbar .fxm-user-meta span,
.shell-rail .topbar.fxm-topbar .fxm-user-chev {
  color: #94a3b8 !important;
}
.shell-rail .topbar.fxm-topbar .fxm-top-btn,
.shell-rail .topbar.fxm-topbar .fxm-nav-toggle {
  color: #f8fafc !important;
}

.fxm-user-drop a,
.fxm-user-drop button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--fxm-text);
  font: inherit;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  text-align: left;
}

.fxm-user-drop a:hover,
.fxm-user-drop button:hover {
  background: var(--fxm-secondary);
  text-decoration: none;
}

.fxm-user-drop a svg,
.fxm-user-drop button svg {
  width: 15px;
  height: 15px;
  color: var(--fxm-muted);
}

.fxm-user-drop button.danger {
  color: var(--warn);
  margin-top: 2px;
  border-top: 1px solid var(--fxm-border);
  border-radius: 0 0 6px 6px;
}

.fxm-user-drop button.danger:hover {
  background: rgba(225, 29, 72, 0.12);
}

.fxm-app-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 16px;
  border-top: 2px solid var(--primary);
  background: #221e12;
  font-size: 12px;
  color: #f0e0a0;
}

.fxm-app-foot-left,
.fxm-app-foot-mid,
.fxm-app-foot-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.fxm-app-foot-right a {
  color: #f0e0a0;
  text-decoration: none;
  font-weight: 550;
}

.fxm-app-foot-right a:hover {
  color: var(--primary);
  text-decoration: none;
}

.shell-rail .app-footer,
.shell-rail .shell-foot {
  display: none !important;
}

.shell-rail .content.page-surface {
  background: var(--fxm-bg) !important;
  padding: 16px 20px 24px;
  flex: 1 1;
}

.shell-rail .panel,
.shell-win11 .panel,
.shell-metro .panel,
.shell-rail .card,
.shell-rail .cards-dash .card,
.shell-rail .accounts-kpi,
.shell-rail .fxm-kpi {
  border-radius: 10px !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow-sm) !important;
  background: var(--bg-elev) !important;
  color: var(--text) !important;
}

.shell-rail .btn,
.shell-win11 .btn {
  border-radius: 4px !important;
  font-family: "Segoe UI Variable", "Segoe UI", sans-serif;
}

.shell-rail .btn:not(.ghost):not(.danger) {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #ffffff !important;
}

.shell-rail .btn.ghost {
  background: transparent !important;
  border: 1px solid var(--fxm-border) !important;
  color: var(--fxm-text) !important;
}

.shell-rail .input,
.shell-rail .select,
.shell-rail input.input,
.shell-rail select.select {
  border-radius: 4px !important;
  border: 1px solid var(--border) !important;
  background: var(--control-bg) !important;
  color: var(--control-text) !important;
}

.fxm-crumbbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 0;
  color: var(--fxm-muted);
  font-size: 12px;
}

.fxm-crumbbar a {
  color: var(--fxm-text-2);
  text-decoration: none;
}

.fxm-crumbbar a:hover {
  color: var(--fxm-primary);
  text-decoration: none;
}

.fxm-crumbbar .sep {
  color: #d0d5dd;
}

.fxm-crumbbar strong {
  color: var(--fxm-text);
  font-weight: 600;
}

.shell-rail .content.page-surface {
  background: var(--fxm-bg) !important;
  padding: 12px 16px 24px;
  flex: 1 1;
}

.shell-rail .app-footer,
.shell-rail .shell-foot {
  display: none;
}

/* -- Dashboard -- */
.fxm-dash {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fxm-welcome-row {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  grid-gap: 12px;
  gap: 12px;
  align-items: stretch;
}

.fxm-welcome h1 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fxm-text);
}

.fxm-welcome p {
  margin: 0;
  color: var(--fxm-text-2);
  font-size: 13px;
  max-width: 560px;
  line-height: 1.45;
}

.fxm-hero {
  border-radius: var(--fxm-radius);
  padding: 14px 16px;
  background: var(--primary);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  min-height: 88px;
  border: 1px solid var(--warn);
  box-shadow: none;
}

.fxm-hero h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.fxm-hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.fxm-hero-pills span {
  font-size: 11px;
  font-weight: 650;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.fxm-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-gap: 10px;
  gap: 10px;
}

.fxm-kpi {
  background: var(--fxm-surface);
  border: 1px solid var(--fxm-border);
  border-left: 3px solid var(--fxm-primary);
  border-radius: var(--fxm-radius);
  padding: 12px;
  box-shadow: var(--fxm-shadow);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 96px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.fxm-kpi::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -36px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--primary-soft);
  pointer-events: none;
  z-index: 0;
}

.fxm-kpi > * {
  position: relative;
  z-index: 1;
}

.fxm-kpi:hover {
  border-color: color-mix(in srgb, var(--fxm-primary) 40%, var(--fxm-border));
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
}

.fxm-kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.fxm-kpi-ico {
  width: 30px;
  height: 30px;
  border-radius: var(--fxm-radius-sm);
  display: grid;
  place-items: center;
  color: #fff;
}

.fxm-kpi-ico.t1 { background: var(--fxm-primary); }
.fxm-kpi-ico.t2 { background: var(--fxm-ok); }
.fxm-kpi-ico.t3 { background: #f04438; }
.fxm-kpi-ico.t4 { background: var(--fxm-muted); }
.fxm-kpi-ico.t5 { background: var(--fxm-info); }
.fxm-kpi-ico.t6 { background: var(--fxm-warn); }

.fxm-kpi-label {
  font-size: 11.5px;
  color: var(--fxm-muted);
  font-weight: 600;
}

.fxm-kpi-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--fxm-text);
  letter-spacing: -0.02em;
  line-height: 1;
}

.fxm-kpi-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.fxm-kpi-delta {
  font-size: 11px;
  font-weight: 650;
  color: var(--fxm-text-2);
}

.fxm-kpi-delta.up { color: #027a48; }
.fxm-kpi-delta.down { color: var(--warn); }

.fxm-spark {
  width: 72px;
  height: 24px;
}

.fxm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  background: var(--fxm-surface);
  border: 1px solid var(--fxm-border);
  border-radius: var(--fxm-radius);
}

.fxm-actions .btn-primary,
.fxm-actions .btn.btn-primary {
  background: var(--fxm-primary) !important;
  border-color: var(--fxm-primary) !important;
  color: #fff !important;
}

.fxm-actions .btn-primary:hover,
.fxm-actions .btn.btn-primary:hover {
  background: var(--fxm-primary-hover) !important;
  border-color: var(--fxm-primary-hover) !important;
}

.fxm-qlabel {
  margin-left: auto;
  font-size: 12px;
  color: var(--fxm-muted);
  font-weight: 650;
}

.fxm-qlinks {
  display: inline-flex;
  gap: 6px;
}

.fxm-qlink {
  width: 32px;
  height: 32px;
  border-radius: var(--fxm-radius-sm);
  border: 1px solid var(--fxm-border);
  background: var(--fxm-secondary);
  color: var(--fxm-text-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.fxm-qlink:hover {
  border-color: #fecdca;
  color: var(--fxm-primary);
  background: var(--fxm-soft);
  text-decoration: none;
}

.fxm-mid {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  grid-gap: 10px;
  gap: 10px;
}

.fxm-bottom {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  grid-gap: 10px;
  gap: 10px;
}

.fxm-card {
  background: var(--fxm-surface);
  border: 1px solid var(--fxm-border);
  border-radius: var(--fxm-radius);
  padding: 12px;
  box-shadow: var(--fxm-shadow);
  min-width: 0;
}

.fxm-card-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.fxm-card-h h3 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--fxm-text);
}

.fxm-card-h a {
  font-size: 12px;
  font-weight: 600;
  color: var(--fxm-primary);
  text-decoration: none;
}

.fxm-card-h a:hover {
  text-decoration: underline;
}

.fxm-activity {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-gap: 8px;
  gap: 8px;
}

.fxm-activity li {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  grid-gap: 10px;
  gap: 10px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--fxm-border);
}

.fxm-activity li:last-child {
  border-bottom: 0;
}

.fxm-act-ico {
  width: 28px;
  height: 28px;
  border-radius: var(--fxm-radius-sm);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.fxm-act-ico.a { background: var(--fxm-ok); }
.fxm-act-ico.b { background: var(--fxm-info); }
.fxm-act-ico.c { background: var(--fxm-warn); }
.fxm-act-ico.d { background: var(--fxm-primary); }

.fxm-activity strong {
  display: block;
  font-size: 12.5px;
  color: var(--fxm-text);
}

.fxm-activity div span {
  display: block;
  font-size: 11.5px;
  color: var(--fxm-muted);
  margin-top: 2px;
}

.fxm-activity > li > span:last-child {
  font-size: 11px;
  color: var(--fxm-muted);
  white-space: nowrap;
}

.fxm-ops-banner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 650;
  color: #027a48;
  background: #ecfdf3;
  border: 1px solid #abefc6;
  border-radius: 999px;
  padding: 3px 8px;
}

.fxm-ops-banner i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fxm-ok);
}

.fxm-sys-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-gap: 2px;
  gap: 2px;
}

.fxm-sys-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--fxm-border);
}

.fxm-sys-list li:last-child {
  border-bottom: 0;
}

.fxm-sys-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--fxm-text);
  font-weight: 550;
}

.fxm-sys-name i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--fxm-ok);
}

.fxm-sys-ms {
  font-size: 11.5px;
  color: var(--fxm-muted);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

/* Command palette */
.shell-rail .cmd-overlay {
  z-index: 80;
}

.shell-rail .cmd-panel {
  border-radius: 10px;
  border-color: var(--fxm-border);
  box-shadow: 0 12px 40px rgba(16, 24, 40, 0.14);
}

.shell-rail .cmd-item.active {
  background: var(--fxm-soft);
}

.shell-rail .cmd-item.active strong {
  color: var(--fxm-primary-active);
}

/* Mobile drawer */
.side-backdrop {
  position: fixed;
  inset: 0;
  z-index: 35;
  border: 0;
  background: rgba(16, 24, 40, 0.4);
  cursor: pointer;
}

@media (max-width: 1280px) {
  .fxm-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .fxm-mid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 1100px) {
  .fxm-welcome-row,
  .fxm-bottom {
    grid-template-columns: 1fr;
  }
  .fxm-mid {
    grid-template-columns: 1fr;
  }
  .fxm-user-meta {
    display: none;
  }
}

@media (max-width: 900px) {
  .shell-rail,
  .shell-rail.shell-collapsed {
    grid-template-columns: 1fr;
  }

  .fxm-rail {
    position: fixed;
    left: 0;
    top: 0;
    width: min(280px, 88vw);
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    box-shadow: 0 12px 40px rgba(16, 24, 40, 0.18);
  }

  .shell-rail.mobile-nav-open .fxm-rail {
    transform: translateX(0);
  }

  .fxm-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fxm-top-search span,
  .fxm-top-search kbd,
  .fxm-live-server,
  .fxm-top-clock,
  .fxm-qlabel {
    display: none;
  }

  .fxm-top-search {
    max-width: 44px;
    justify-content: center;
    padding: 7px;
  }

  .shell-rail .content.page-surface {
    padding: 10px 12px 20px;
  }
}

@media (max-width: 480px) {
  .fxm-kpi-grid {
    grid-template-columns: 1fr;
  }
  .fxm-actions .btn {
    flex: 1 1 100%;
  }
}

.desktop-only {
  display: inline-flex;
}

.mobile-only {
  display: none;
}

@media (max-width: 900px) {
  .desktop-only {
    display: none !important;
  }
  .mobile-only {
    display: inline-flex !important;
  }
}


/* Content surfaces follow theme tokens (no forced dark ink) */
.shell-rail .main,
.shell-rail .content,
.shell-rail .page-surface {
  color: var(--text) !important;
}
.shell-rail .muted,
.shell-rail .fxm-crumbbar {
  color: var(--muted) !important;
}
.shell-rail .panel,
.shell-rail .card,
.shell-rail .ui-card,
.shell-rail table.data,
.shell-rail .dg-table {
  color: var(--text) !important;
}
.shell-rail table.data th,
.shell-rail .dg-table th {
  color: var(--muted) !important;
  background: var(--bg-row) !important;
}
.shell-rail table.data td,
.shell-rail .dg-table td {
  color: var(--text) !important;
  border-color: var(--border) !important;
}
.shell-rail .input,
.shell-rail .select,
.shell-rail input,
.shell-rail select,
.shell-rail textarea {
  background: var(--control-bg) !important;
  color: var(--control-text) !important;
  border-color: var(--border) !important;
}
.shell-rail .content.page-surface {
  background: var(--bg) !important;
}
.shell-rail .fxm-app-foot {
  background: var(--footer-bg) !important;
  color: var(--footer-text) !important;
}

/* ===== FX5 sidebar ? theme tokens (light mica / dark charcoal) ===== */
.shell-rail {
  --rail-w: 248px;
  --rail-w-c: 64px;
  --rail-bg: var(--bg-side);
  --rail-bg-2: var(--bg-side-2);
  --rail-text: var(--side-text);
  --rail-muted: var(--side-muted);
  --rail-line: var(--side-border);
  --rail-hover: var(--side-hover);
  --rail-active: var(--side-active);
  --rail-accent: var(--side-indicator);
  --rail-card: color-mix(in srgb, var(--side-text) 4%, transparent);
  --rail-card-border: var(--side-border);
}

.fxm-rail,
.shell-rail .fxm-rail {
  background: linear-gradient(180deg, var(--rail-bg) 0%, var(--rail-bg-2) 100%) !important;
  border-right: 1px solid var(--rail-line) !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  color: var(--rail-text) !important;
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif !important;
}

.fxm-rail-head {
  min-height: 56px;
  padding: 14px 14px 12px !important;
  border-bottom: 1px solid var(--rail-line) !important;
  background: transparent !important;
  gap: 10px !important;
}

.fxm-brand-mark {
  width: 32px !important;
  height: 32px !important;
  background: var(--primary) !important;
  border: 0 !important;
  border-radius: 8px !important;
  color: #000 !important;
}

.fxm-brand-mark .brand-logo {
  width: 22px !important;
  height: 22px !important;
  border-radius: 4px !important;
}

.fxm-brand-copy {
  line-height: 1.2 !important;
}

.fxm-brand-copy strong {
  color: var(--rail-text) !important;
  font-weight: 650 !important;
  font-size: 15px !important;
  letter-spacing: -0.02em !important;
}

.fxm-brand-copy em {
  color: var(--rail-accent) !important;
  font-size: 10.5px !important;
  font-weight: 600 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  margin-top: 1px !important;
}

.fxm-rail-search,
.fxm-top-search {
  display: none !important;
}

.fxm-rail-nav {
  padding: 4px 8px 12px !important;
}

.fxm-nav-group {
  margin-bottom: 6px !important;
}

.fxm-nav-heading,
.shell-rail .fxm-nav-heading,
.fxm-rail .fxm-nav-heading {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
  background: transparent !important;
  color: var(--rail-muted) !important;
  font-size: 10.5px !important;
  font-weight: 650 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  padding: 10px 10px 4px 12px !important;
  margin: 2px 0 0 !important;
  min-height: 28px !important;
  border: 0 !important;
  cursor: pointer !important;
  text-align: left !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.fxm-nav-heading:hover,
.shell-rail .fxm-nav-heading:hover {
  color: var(--rail-text) !important;
  background: transparent !important;
}

.fxm-nav-heading-ico {
  width: 14px !important;
  height: 14px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: var(--rail-muted) !important;
}

.fxm-nav-heading-ico svg,
.fxm-nav-heading-ico .nav-ico,
.fxm-nav-heading .fxm-mini-chev,
.fxm-nav-heading svg {
  width: 12px !important;
  height: 12px !important;
  color: inherit !important;
}

.fxm-nav-heading-label {
  flex: 1 1 !important;
  min-width: 0 !important;
  color: inherit !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.fxm-nav-group.has-active > .fxm-nav-heading,
.fxm-nav-group.has-active > .fxm-nav-heading .fxm-nav-heading-label,
.fxm-nav-group.has-active > .fxm-nav-heading .fxm-nav-heading-ico,
.fxm-nav-group.has-active > .fxm-nav-heading svg {
  color: var(--rail-accent) !important;
}

.fxm-nav-children {
  display: flex !important;
  flex-direction: column !important;
  gap: 1px !important;
  padding: 2px 0 6px !important;
}

.fxm-nav-children .fxm-nav-link,
.shell-rail .fxm-rail a.fxm-nav-link,
.fxm-nav-link {
  position: relative !important;
  margin: 0 4px !important;
  padding: 0 10px 0 12px !important;
  min-height: 34px !important;
  border-radius: 7px !important;
  color: var(--rail-text) !important;
  background: transparent !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  letter-spacing: 0.005em !important;
  text-transform: none !important;
  gap: 10px !important;
  border-left: 0 !important;
  box-shadow: none !important;
  opacity: 0.9;
}

.fxm-nav-children .fxm-nav-link:hover,
.shell-rail .fxm-rail a.fxm-nav-link:hover,
.fxm-nav-link:hover {
  background: var(--rail-hover) !important;
  color: var(--rail-text) !important;
  text-decoration: none !important;
  opacity: 1;
}

.fxm-nav-link:hover .fxm-nav-tile,
.fxm-nav-link:hover .fxm-nav-ico,
.fxm-nav-link:hover svg {
  color: var(--rail-accent) !important;
}

.fxm-nav-link.is-active,
.fxm-rail .fxm-nav-link.is-active,
.shell-rail .fxm-nav-link.is-active,
.fxm-nav-children .fxm-nav-link.is-active {
  background: var(--rail-active) !important;
  color: var(--rail-accent) !important;
  font-weight: 600 !important;
  opacity: 1;
}

.fxm-nav-link.is-active::before {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  left: 0 !important;
  top: 7px !important;
  bottom: 7px !important;
  width: 3px !important;
  border-radius: 0 2px 2px 0 !important;
  background: var(--rail-accent) !important;
}

.fxm-nav-link.is-active .fxm-nav-text,
.fxm-nav-link.is-active .fxm-nav-tile,
.fxm-nav-link.is-active .fxm-nav-ico,
.fxm-nav-link.is-active svg {
  color: var(--rail-accent) !important;
}

.shell-rail .fxm-nav-link.is-active,
.shell-rail .fxm-nav-link.is-active * {
  color: var(--rail-accent) !important;
}

.fxm-nav-tile {
  width: 28px !important;
  height: 28px !important;
  border-radius: 7px !important;
  background: color-mix(in srgb, var(--rail-text) 6%, transparent) !important;
  border: 1px solid color-mix(in srgb, var(--rail-line) 80%, transparent) !important;
  color: var(--rail-muted) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.fxm-nav-link:hover .fxm-nav-tile {
  background: color-mix(in srgb, var(--rail-accent) 14%, transparent) !important;
  border-color: color-mix(in srgb, var(--rail-accent) 30%, transparent) !important;
  color: var(--rail-accent) !important;
}

.fxm-nav-link.is-active .fxm-nav-tile {
  background: color-mix(in srgb, var(--rail-accent) 18%, transparent) !important;
  border-color: color-mix(in srgb, var(--rail-accent) 40%, transparent) !important;
  color: var(--rail-accent) !important;
}

.fxm-nav-ico {
  width: 14px !important;
  height: 14px !important;
}

.fxm-nav-text {
  font-size: 13px !important;
  line-height: 1.2 !important;
}

.fxm-badge {
  background: var(--primary) !important;
  color: #ffffff !important;
  border-radius: 999px !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  min-width: 18px !important;
  height: 18px !important;
}

.fxm-nav-link.is-active .fxm-badge {
  background: var(--primary) !important;
  color: #ffffff !important;
}

.fxm-rail-foot {
  border-top: 1px solid var(--rail-line) !important;
  background: transparent !important;
  padding: 10px 12px 12px !important;
}

.fxm-mt-card {
  background: var(--rail-card) !important;
  border: 1px solid var(--rail-card-border) !important;
  border-radius: 10px !important;
  padding: 10px 11px !important;
  box-shadow: none !important;
}

.fxm-mt-top strong {
  color: var(--rail-text) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}

.fxm-mt-conn {
  color: var(--ok) !important;
  font-size: 11px !important;
}

.fxm-live-pill {
  background: color-mix(in srgb, var(--rail-accent) 16%, transparent) !important;
  color: var(--rail-accent) !important;
  border: 1px solid color-mix(in srgb, var(--rail-accent) 28%, transparent) !important;
  border-radius: 999px !important;
  font-weight: 700 !important;
  font-size: 9.5px !important;
  letter-spacing: 0.06em !important;
}

.fxm-mt-time {
  color: var(--rail-muted) !important;
  font-size: 11px !important;
}

.fxm-icon-btn {
  background: var(--rail-card) !important;
  border: 1px solid var(--rail-card-border) !important;
  color: var(--rail-muted) !important;
  border-radius: 7px !important;
}

.fxm-icon-btn:hover {
  background: color-mix(in srgb, var(--rail-accent) 12%, transparent) !important;
  color: var(--rail-accent) !important;
  border-color: color-mix(in srgb, var(--rail-accent) 35%, transparent) !important;
}

.fxm-rail.is-collapsed .fxm-nav-link {
  justify-content: center !important;
  padding: 8px !important;
  margin: 2px 6px !important;
}

.fxm-rail.is-collapsed .fxm-nav-link.is-active {
  background: var(--rail-active) !important;
  color: var(--rail-accent) !important;
}

.fxm-rail.is-collapsed .fxm-nav-link.is-active::before {
  display: none !important;
}

.fxm-rail.is-collapsed .fxm-nav-link.is-active .fxm-nav-tile,
.fxm-rail.is-collapsed .fxm-nav-link.is-active svg {
  color: var(--rail-accent) !important;
}

.shell-rail .fxm-rail .fxm-nav-link:not(.is-active) {
  color: var(--rail-text) !important;
}

.shell-rail .fxm-nav-heading,
.shell-rail .fxm-nav-heading .fxm-nav-heading-label,
.shell-rail .fxm-nav-heading .fxm-nav-heading-ico,
.shell-rail .fxm-nav-heading svg {
  color: var(--rail-muted) !important;
  background: transparent !important;
}

.shell-rail .fxm-nav-group.has-active > .fxm-nav-heading,
.shell-rail .fxm-nav-group.has-active > .fxm-nav-heading .fxm-nav-heading-label,
.shell-rail .fxm-nav-group.has-active > .fxm-nav-heading .fxm-nav-heading-ico,
.shell-rail .fxm-nav-group.has-active > .fxm-nav-heading svg {
  color: var(--rail-accent) !important;
}

/* Teal chrome ? header / buttons / hero */
.shell-rail .topbar.fxm-topbar {
  position: relative !important;
  overflow: visible !important;
  min-height: 56px !important;
  padding: 0 16px !important;
  background:
    linear-gradient(105deg, #0f172a 0%, #123047 48%, #0f766e 100%) !important;
  border-bottom: 1px solid rgba(45, 212, 191, 0.28) !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18) !important;
  color: #f8fafc !important;
  z-index: 50 !important;
}
.fxm-topbar-art {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  border-radius: inherit;
}
.fxm-topbar-orb {
  position: absolute;
  border-radius: 50%;
}
.fxm-topbar-orb.a {
  width: 160px;
  height: 160px;
  top: -70px;
  right: 18%;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.35), transparent 70%);
}
.fxm-topbar-orb.b {
  width: 120px;
  height: 120px;
  bottom: -60px;
  right: 6%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.28), transparent 70%);
}
.fxm-topbar-grid {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(248, 250, 252, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(248, 250, 252, 0.12) 1px, transparent 1px);
  background-size: 18px 18px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%, #000 80%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 30%, #000 80%, transparent);
}
.shell-rail .topbar.fxm-topbar > *:not(.fxm-topbar-art) {
  position: relative;
  z-index: 1;
}
.shell-rail .topbar.fxm-topbar .fxm-top-btn,
.shell-rail .topbar.fxm-topbar .fxm-nav-toggle,
.shell-rail .topbar.fxm-topbar .fxm-user-meta strong,
.shell-rail .topbar.fxm-topbar .fxm-user-meta span,
.shell-rail .topbar.fxm-topbar .fxm-user-chev,
.shell-rail .topbar.fxm-topbar .fxm-top-clock,
.shell-rail .topbar.fxm-topbar .fxm-top-titles strong,
.shell-rail .topbar.fxm-topbar .fxm-top-titles span,
.shell-rail .topbar.fxm-topbar .fxm-live-server,
.shell-rail .topbar.fxm-topbar svg,
.shell-rail .topbar.fxm-topbar .nav-ico {
  color: #f8fafc !important;
  fill: none;
  stroke: currentColor;
}
.shell-rail .topbar.fxm-topbar .fxm-top-titles span,
.shell-rail .topbar.fxm-topbar .fxm-user-meta span,
.shell-rail .topbar.fxm-topbar .fxm-top-clock {
  color: #94a3b8 !important;
}
.shell-rail .topbar.fxm-topbar .fxm-top-btn,
.shell-rail .topbar.fxm-topbar .fxm-nav-toggle {
  background: rgba(248, 250, 252, 0.06) !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  border-radius: 8px !important;
}
.shell-rail .topbar.fxm-topbar .fxm-top-btn:hover,
.shell-rail .topbar.fxm-topbar .fxm-nav-toggle:hover {
  background: rgba(45, 212, 191, 0.16) !important;
  border-color: rgba(45, 212, 191, 0.4) !important;
}
.shell-rail .topbar.fxm-topbar .fxm-user-av {
  background: #0d9488 !important;
  color: #ffffff !important;
  border-color: rgba(45, 212, 191, 0.5) !important;
}
.shell-rail .topbar.fxm-topbar .fxm-badge {
  background: #14b8a6 !important;
  color: #042f2e !important;
}
.shell-rail .topbar.fxm-topbar .fxm-live-server i {
  background: #34d399 !important;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.22);
}

.fxm-hero {
  background: linear-gradient(120deg, #0f766e, #0ea5e9) !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  border-radius: 12px !important;
  color: #ffffff !important;
}
.fxm-hero *,
.fxm-hero-pills span {
  color: #ffffff !important;
}
.fxm-hero-pills span {
  background: rgba(255, 255, 255, 0.14) !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  border-radius: 999px !important;
}

.btn:not(.ghost):not(.danger),
.btn.btn-primary,
.shell-rail .btn:not(.ghost):not(.danger),
.fxm-login-submit {
  background: var(--primary) !important;
  border-color: var(--primary-active) !important;
  color: #ffffff !important;
  border-radius: 8px !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12) !important;
}
.btn:not(.ghost):not(.danger):hover,
.btn.btn-primary:hover,
.fxm-login-submit:hover:not(:disabled) {
  background: var(--primary-hover) !important;
  color: #ffffff !important;
}
.fxm-login-theme button.on,
.fxm-theme-btn.on {
  background: var(--primary) !important;
  color: #ffffff !important;
}
input[type="checkbox"]:checked,
.fxm-login input[type="checkbox"]:checked {
  accent-color: var(--primary);
}

/* Footer upgrade */
.fxm-app-foot {
  position: relative !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
  flex-wrap: wrap !important;
  padding: 14px 18px !important;
  background:
    linear-gradient(105deg, #0f172a 0%, #123047 55%, #134e4a 100%) !important;
  border-top: 1px solid rgba(45, 212, 191, 0.28) !important;
  color: #cbd5e1 !important;
  font-size: 12px !important;
}
.fxm-app-foot-art {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.fxm-foot-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #2dd4bf, #38bdf8, transparent);
}
.fxm-app-foot > *:not(.fxm-app-foot-art) {
  position: relative;
  z-index: 1;
}
.fxm-app-foot-left {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
}
.fxm-foot-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(45, 212, 191, 0.16);
  border: 1px solid rgba(45, 212, 191, 0.35);
}
.fxm-foot-copy {
  display: grid;
  grid-gap: 1px;
  gap: 1px;
  line-height: 1.15;
}
.fxm-foot-copy strong {
  color: #f8fafc !important;
  font-size: 12.5px;
  font-weight: 700;
}
.fxm-foot-copy em {
  color: #94a3b8 !important;
  font-style: normal;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.fxm-app-foot-mid {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  color: #94a3b8 !important;
}
.fxm-foot-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: #6ee7b7 !important;
  font-weight: 650;
  font-size: 11px;
}
.fxm-foot-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  display: inline-block;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.2);
}
.fxm-foot-clock {
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  color: #cbd5e1 !important;
}
.fxm-app-foot-right {
  display: inline-flex !important;
  gap: 14px !important;
}
.fxm-app-foot-right a {
  color: #e2e8f0 !important;
  text-decoration: none !important;
  font-weight: 600 !important;
}
.fxm-app-foot-right a:hover {
  color: #2dd4bf !important;
}

/* Sidebar head + brand accents */
.fxm-rail-head {
  background: linear-gradient(180deg, rgba(20, 184, 166, 0.12), transparent) !important;
  border-bottom: 1px solid rgba(45, 212, 191, 0.18) !important;
}
.fxm-brand-mark {
  background: linear-gradient(145deg, #14b8a6, #0ea5e9) !important;
  border: 0 !important;
  box-shadow: 0 6px 16px rgba(13, 148, 136, 0.35) !important;
}
.fxm-rail-foot .fxm-mt-card {
  background: linear-gradient(145deg, rgba(20, 184, 166, 0.12), rgba(14, 165, 233, 0.08)) !important;
  border-color: rgba(45, 212, 191, 0.28) !important;
}
.fxm-live-pill {
  background: rgba(45, 212, 191, 0.16) !important;
  color: #5eead4 !important;
  border-color: rgba(45, 212, 191, 0.35) !important;
}

/* ===== Theme-aware graphic cards (must win over legacy dark forces) ===== */
.shell-rail .card,
.shell-rail .cards-dash .card,
.shell-rail .accounts-kpi,
.shell-rail .fxm-kpi,
.shell-rail .ui-card,
.shell-rail .c360-acct-card,
.shell-rail .section-card,
.shell-rail .df-panel,
.shell-rail .panel {
  background: var(--bg-elev) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  box-shadow: var(--shadow-sm) !important;
}

.shell-rail .card,
.shell-rail .accounts-kpi,
.shell-rail .fxm-kpi,
.shell-rail .c360-acct-card {
  position: relative !important;
  overflow: hidden !important;
  isolation: isolate;
  border-left: 3px solid var(--accent) !important;
  border-radius: 10px !important;
  min-height: 104px;
}

/* KYC / desk KPI buttons ? graphic cards with readable text */
.shell-rail .kyc-kpi-grid .accounts-kpi,
.shell-rail .kyc-kpi-grid button.accounts-kpi,
.shell-rail button.card.accounts-kpi {
  color: var(--text) !important;
  text-align: left !important;
}
.shell-rail .kyc-kpi-grid .accounts-kpi .label,
.shell-rail .kyc-kpi-grid .accounts-kpi .hint,
.shell-rail button.card.accounts-kpi .label,
.shell-rail button.card.accounts-kpi .hint {
  color: var(--muted) !important;
}
.shell-rail .kyc-kpi-grid .accounts-kpi .value,
.shell-rail button.card.accounts-kpi .value {
  color: var(--text) !important;
}

/* Document vault cards carry action bars ? never clip */
.shell-rail .doc-vault-card.card.accounts-kpi,
.shell-rail .doc-mgr .doc-vault-card,
.shell-rail .doc-mgr .doc-folder-card {
  overflow: visible !important;
  min-height: 168px !important;
  height: auto !important;
}
.shell-rail .doc-mgr .doc-folder-card {
  min-height: 0 !important;
}
.shell-rail .doc-mgr .doc-actions-bar,
.shell-rail .doc-mgr .doc-vault-card .accounts-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  overflow: visible !important;
  position: relative;
  z-index: 2;
}

.shell-rail .card.tone-ok,
.shell-rail .accounts-kpi.tone-ok { border-left-color: var(--ok) !important; }
.shell-rail .card.tone-warn,
.shell-rail .accounts-kpi.tone-warn { border-left-color: var(--warn) !important; }
.shell-rail .card.tone-danger,
.shell-rail .accounts-kpi.tone-danger { border-left-color: var(--danger) !important; }
.shell-rail .card.tone-info,
.shell-rail .accounts-kpi.tone-info { border-left-color: var(--info) !important; }
.shell-rail .card.tone-accent,
.shell-rail .accounts-kpi.tone-accent { border-left-color: var(--accent) !important; }

.shell-rail .card::after,
.shell-rail .accounts-kpi::after,
.shell-rail .fxm-kpi::after,
.shell-rail .c360-acct-card::after {
  content: "" !important;
  position: absolute !important;
  right: -30px !important;
  bottom: -40px !important;
  width: 120px !important;
  height: 120px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle at 30% 30%, var(--primary-soft), transparent 70%) !important;
  pointer-events: none !important;
  z-index: 0 !important;
  opacity: 1 !important;
  display: block !important;
}

.shell-rail .card.tone-ok::after,
.shell-rail .accounts-kpi.tone-ok::after {
  background: radial-gradient(circle at 30% 30%, var(--ok-dim), transparent 70%) !important;
}
.shell-rail .card.tone-info::after,
.shell-rail .accounts-kpi.tone-info::after {
  background: radial-gradient(circle at 30% 30%, var(--info-dim), transparent 70%) !important;
}
.shell-rail .card.tone-warn::after,
.shell-rail .accounts-kpi.tone-warn::after {
  background: radial-gradient(circle at 30% 30%, var(--warn-dim), transparent 70%) !important;
}
.shell-rail .card.tone-danger::after,
.shell-rail .accounts-kpi.tone-danger::after {
  background: radial-gradient(circle at 30% 30%, var(--danger-dim), transparent 70%) !important;
}

.shell-rail .card > *,
.shell-rail .accounts-kpi > *,
.shell-rail .fxm-kpi > *,
.shell-rail .c360-acct-card > * {
  position: relative;
  z-index: 1;
}

.shell-rail .card .label,
.shell-rail .accounts-kpi .label,
.shell-rail .fxm-kpi-label {
  color: var(--muted) !important;
}
.shell-rail .card .value,
.shell-rail .accounts-kpi .value,
.shell-rail .fxm-kpi-value {
  color: var(--text) !important;
}
.shell-rail .card .hint,
.shell-rail .accounts-kpi .hint {
  color: var(--muted) !important;
}

.shell-rail .card-ico {
  width: 34px !important;
  height: 34px !important;
  border-radius: 8px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

[data-theme="light"] .shell-rail .card,
[data-theme="light"] .shell-rail .accounts-kpi,
[data-theme="light"] .shell-rail .fxm-kpi,
[data-theme="light"] .shell-rail .c360-acct-card {
  background: #ffffff !important;
  border-color: #e4e7ec !important;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 0 0 1px rgba(16, 24, 40, 0.02) !important;
}

[data-theme="light"] .shell-rail .card:hover,
[data-theme="light"] .shell-rail .accounts-kpi.is-clickable:hover,
[data-theme="light"] .shell-rail .fxm-kpi:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, #e4e7ec) !important;
  box-shadow: 0 4px 14px rgba(16, 24, 40, 0.08) !important;
}

/* Sidebar polish */
.fxm-rail-head {
  background: color-mix(in srgb, var(--primary) 8%, transparent) !important;
}
.fxm-brand-mark {
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.12) !important;
}
.fxm-nav-group {
  margin-bottom: 8px !important;
}

/* ===== Footer card (always readable on dark rail) + sign out ===== */
.fxm-rail-foot {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  padding: 12px !important;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.45)) !important;
  border-top: 1px solid rgba(45, 212, 191, 0.22) !important;
  z-index: 2 !important;
}
.fxm-rail-foot .fxm-mt-card {
  background: linear-gradient(145deg, #132033 0%, #0f2740 55%, #134e4a 140%) !important;
  border: 1px solid rgba(45, 212, 191, 0.38) !important;
  border-radius: 12px !important;
  padding: 12px !important;
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
  color: #e2e8f0 !important;
}
.fxm-mt-identity {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-width: 0 !important;
}
.fxm-mt-mark {
  width: 32px !important;
  height: 32px !important;
  border-radius: 9px !important;
  display: inline-grid !important;
  place-items: center !important;
  background: rgba(45, 212, 191, 0.16) !important;
  border: 1px solid rgba(45, 212, 191, 0.35) !important;
  color: #5eead4 !important;
  flex-shrink: 0 !important;
}
.fxm-mt-mark svg {
  width: 15px !important;
  height: 15px !important;
  color: #5eead4 !important;
}
.fxm-rail-foot .fxm-mt-top strong {
  color: #f8fafc !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
}
.fxm-rail-foot .fxm-mt-conn {
  color: #6ee7b7 !important;
  font-weight: 600 !important;
}
.fxm-rail-foot .fxm-mt-conn i {
  background: #34d399 !important;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.2) !important;
}
.fxm-rail-foot .fxm-live-pill {
  background: rgba(45, 212, 191, 0.18) !important;
  color: #5eead4 !important;
  border: 1px solid rgba(45, 212, 191, 0.4) !important;
}
.fxm-rail-foot .fxm-mt-time {
  color: #94a3b8 !important;
  margin-top: 10px !important;
  padding-top: 8px !important;
  border-top: 1px solid rgba(148, 163, 184, 0.16) !important;
}

.fxm-rail-signout {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  width: 100% !important;
  min-height: 38px !important;
  padding: 0 12px !important;
  border-radius: 10px !important;
  border: 1px solid rgba(251, 113, 133, 0.35) !important;
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.18), rgba(190, 18, 60, 0.12)) !important;
  color: #fda4af !important;
  font: inherit !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  cursor: pointer !important;
  box-shadow: none !important;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease !important;
}
.fxm-rail-signout:hover {
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.32), rgba(190, 18, 60, 0.22)) !important;
  border-color: rgba(251, 113, 133, 0.55) !important;
  color: #fecdd3 !important;
}
.fxm-rail-signout-ico {
  width: 22px !important;
  height: 22px !important;
  border-radius: 6px !important;
  display: inline-grid !important;
  place-items: center !important;
  background: rgba(251, 113, 133, 0.16) !important;
  color: inherit !important;
}
.fxm-rail-signout-ico svg,
.fxm-rail-signout svg {
  width: 14px !important;
  height: 14px !important;
  color: inherit !important;
}
.fxm-rail-foot-mini {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 8px !important;
}
.fxm-rail-signout.is-mini {
  width: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  border-radius: 10px !important;
}
.fxm-foot-dot {
  width: 36px !important;
  height: 36px !important;
  border-radius: 10px !important;
  background: rgba(52, 211, 153, 0.14) !important;
  border: 1px solid rgba(52, 211, 153, 0.35) !important;
}
.fxm-foot-dot i {
  background: #34d399 !important;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.2) !important;
}

/* ===== Rail graphics + colored icon tiles (last-wins) ===== */
.fxm-rail {
  isolation: isolate;
}
.fxm-rail-art {
  z-index: 0 !important;
}
.fxm-rail-orb.c {
  width: 160px;
  height: 160px;
  top: 38%;
  right: -90px;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.16), transparent 70%);
  filter: blur(4px);
}
.fxm-rail-sheen {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(165deg, rgba(45, 212, 191, 0.14) 0%, transparent 38%),
    linear-gradient(20deg, transparent 40%, rgba(56, 189, 248, 0.08) 100%);
  pointer-events: none;
}
.fxm-rail-candles {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 168px;
  width: 100%;
  opacity: 0.55;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 35%, #000 80%, transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0%, #000 35%, #000 80%, transparent 100%);
}
.fxm-rail-spark {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 92px;
  height: 22px;
  opacity: 0.55;
  pointer-events: none;
}
.fxm-rail.is-collapsed .fxm-rail-spark,
.fxm-rail.is-collapsed .fxm-rail-candles {
  opacity: 0.28;
}
.fxm-rail-head {
  z-index: 2 !important;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.35), transparent),
    color-mix(in srgb, var(--primary) 10%, transparent) !important;
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
}
.fxm-brand-mark {
  background: linear-gradient(145deg, #2dd4bf, #0d9488 55%, #0f766e) !important;
  box-shadow: 0 6px 16px rgba(13, 148, 136, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
}

.fxm-nav-tile {
  width: 30px !important;
  height: 30px !important;
  border-radius: 9px !important;
}
.fxm-nav-tile.tone-teal,
.fxm-nav-heading-ico.tone-teal { --ico: #2dd4bf; --ico-bg: rgba(45, 212, 191, 0.18); --ico-bd: rgba(45, 212, 191, 0.42); }
.fxm-nav-tile.tone-sky,
.fxm-nav-heading-ico.tone-sky { --ico: #38bdf8; --ico-bg: rgba(56, 189, 248, 0.18); --ico-bd: rgba(56, 189, 248, 0.42); }
.fxm-nav-tile.tone-amber,
.fxm-nav-heading-ico.tone-amber { --ico: #fbbf24; --ico-bg: rgba(251, 191, 36, 0.2); --ico-bd: rgba(251, 191, 36, 0.45); }
.fxm-nav-tile.tone-cyan,
.fxm-nav-heading-ico.tone-cyan { --ico: #22d3ee; --ico-bg: rgba(34, 211, 238, 0.18); --ico-bd: rgba(34, 211, 238, 0.42); }
.fxm-nav-tile.tone-indigo,
.fxm-nav-heading-ico.tone-indigo { --ico: #a5b4fc; --ico-bg: rgba(129, 140, 248, 0.2); --ico-bd: rgba(129, 140, 248, 0.45); }
.fxm-nav-tile.tone-green,
.fxm-nav-heading-ico.tone-green { --ico: #4ade80; --ico-bg: rgba(74, 222, 128, 0.18); --ico-bd: rgba(74, 222, 128, 0.42); }
.fxm-nav-tile.tone-rose,
.fxm-nav-heading-ico.tone-rose { --ico: #fb7185; --ico-bg: rgba(251, 113, 133, 0.2); --ico-bd: rgba(251, 113, 133, 0.45); }
.fxm-nav-tile.tone-gold,
.fxm-nav-heading-ico.tone-gold { --ico: #fbbf24; --ico-bg: rgba(245, 158, 11, 0.2); --ico-bd: rgba(245, 158, 11, 0.48); }
.fxm-nav-tile.tone-violet,
.fxm-nav-heading-ico.tone-violet { --ico: #c4b5fd; --ico-bg: rgba(167, 139, 250, 0.2); --ico-bd: rgba(167, 139, 250, 0.45); }
.fxm-nav-tile.tone-orange,
.fxm-nav-heading-ico.tone-orange { --ico: #fb923c; --ico-bg: rgba(251, 146, 60, 0.2); --ico-bd: rgba(251, 146, 60, 0.45); }
.fxm-nav-tile.tone-emerald,
.fxm-nav-heading-ico.tone-emerald { --ico: #34d399; --ico-bg: rgba(52, 211, 153, 0.18); --ico-bd: rgba(52, 211, 153, 0.42); }
.fxm-nav-tile.tone-slate,
.fxm-nav-heading-ico.tone-slate { --ico: #cbd5e1; --ico-bg: rgba(148, 163, 184, 0.16); --ico-bd: rgba(148, 163, 184, 0.38); }

.shell-rail .fxm-rail a.fxm-nav-link .fxm-nav-tile[class*="tone-"],
.fxm-nav-link .fxm-nav-tile[class*="tone-"] {
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--ico) 28%, transparent), var(--ico-bg)) !important;
  border: 1px solid var(--ico-bd) !important;
  color: var(--ico) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 4px 10px color-mix(in srgb, var(--ico) 12%, transparent) !important;
}
.shell-rail .fxm-rail a.fxm-nav-link .fxm-nav-tile[class*="tone-"] svg,
.shell-rail .fxm-rail a.fxm-nav-link .fxm-nav-tile[class*="tone-"] .fxm-nav-ico,
.shell-rail .fxm-rail a.fxm-nav-link:hover .fxm-nav-tile[class*="tone-"] svg,
.shell-rail .fxm-rail a.fxm-nav-link:hover .fxm-nav-tile[class*="tone-"] .fxm-nav-ico,
.shell-rail .fxm-rail a.fxm-nav-link.is-active .fxm-nav-tile[class*="tone-"] svg,
.shell-rail .fxm-rail a.fxm-nav-link.is-active .fxm-nav-tile[class*="tone-"] *,
.fxm-nav-link .fxm-nav-tile[class*="tone-"] svg,
.fxm-nav-link .fxm-nav-tile[class*="tone-"] .fxm-nav-ico {
  color: var(--ico) !important;
  stroke: currentColor !important;
}
.shell-rail .fxm-rail a.fxm-nav-link:hover .fxm-nav-tile[class*="tone-"] {
  filter: brightness(1.14);
  transform: translateY(-1px);
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--ico) 22%, transparent),
    0 8px 16px color-mix(in srgb, var(--ico) 18%, transparent) !important;
}
.shell-rail .fxm-rail a.fxm-nav-link.is-active .fxm-nav-tile[class*="tone-"] {
  background: color-mix(in srgb, var(--ico) 34%, transparent) !important;
  border-color: color-mix(in srgb, var(--ico) 65%, transparent) !important;
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--ico) 20%, transparent),
    0 6px 14px color-mix(in srgb, var(--ico) 16%, transparent) !important;
}

.fxm-nav-heading-ico[class*="tone-"] {
  width: 22px !important;
  height: 22px !important;
  border-radius: 7px !important;
  background: var(--ico-bg) !important;
  border: 1px solid var(--ico-bd) !important;
  color: var(--ico) !important;
}
.fxm-nav-heading-ico[class*="tone-"] svg {
  width: 12px !important;
  height: 12px !important;
  color: var(--ico) !important;
}
.shell-rail .fxm-nav-group.has-active > .fxm-nav-heading .fxm-nav-heading-ico[class*="tone-"],
.shell-rail .fxm-nav-group.has-active > .fxm-nav-heading .fxm-nav-heading-ico[class*="tone-"] svg {
  color: var(--ico) !important;
  background: color-mix(in srgb, var(--ico) 26%, transparent) !important;
}
/* ============================================================
   Professional sidebar ? light + dark (final overrides)
   ============================================================ */

.shell-rail {
  --rail-w: 252px;
  --rail-w-c: 68px;
  --rail-bg: var(--bg-side);
  --rail-bg-2: var(--bg-side-2);
  --rail-text: var(--side-text);
  --rail-muted: var(--side-muted);
  --rail-line: var(--side-border);
  --rail-hover: var(--side-hover);
  --rail-active: var(--side-active);
  --rail-accent: var(--side-indicator);
  --rail-surface: color-mix(in srgb, var(--side-text) 4%, transparent);
}

.shell-rail .fxm-rail,
.fxm-rail {
  position: -webkit-sticky !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 40 !important;
  height: 100vh !important;
  display: flex !important;
  flex-direction: column !important;
  background: var(--rail-bg) !important;
  color: var(--rail-text) !important;
  border-right: 1px solid var(--rail-line) !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  overflow: hidden !important;
  isolation: auto !important;
  font-family: var(--font) !important;
}

/* Hide legacy decorative art if present */
.fxm-rail-art,
.fxm-rail-orb,
.fxm-rail-mesh,
.fxm-rail-sheen,
.fxm-rail-candles,
.fxm-rail-spark {
  display: none !important;
}

.fxm-rail-head {
  position: relative !important;
  z-index: 2 !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-height: 56px !important;
  padding: 12px 14px !important;
  flex-shrink: 0 !important;
  border-bottom: 1px solid var(--rail-line) !important;
  background: transparent !important;
  -webkit-backdrop-filter: none !important;
          backdrop-filter: none !important;
}

.fxm-brand {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-width: 0 !important;
  flex: 1 1 !important;
  text-decoration: none !important;
  color: inherit !important;
}

.fxm-brand-mark {
  width: 32px !important;
  height: 32px !important;
  border-radius: 8px !important;
  display: grid !important;
  place-items: center !important;
  flex-shrink: 0 !important;
  background: var(--primary) !important;
  border: 0 !important;
  box-shadow: none !important;
  color: #fff !important;
}

.fxm-brand-mark .brand-logo {
  width: 20px !important;
  height: 20px !important;
  border: 0 !important;
  border-radius: 3px !important;
  background: transparent !important;
  box-shadow: none !important;
}

.fxm-brand-copy {
  min-width: 0 !important;
  line-height: 1.15 !important;
}

.fxm-brand-copy strong {
  display: block !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  color: var(--rail-text) !important;
}

.fxm-brand-copy em {
  display: block !important;
  margin-top: 2px !important;
  font-style: normal !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: var(--rail-muted) !important;
}

.fxm-icon-btn {
  width: 30px !important;
  height: 30px !important;
  border-radius: 7px !important;
  border: 1px solid var(--rail-line) !important;
  background: transparent !important;
  color: var(--rail-muted) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  box-shadow: none !important;
}

.fxm-icon-btn:hover {
  background: var(--rail-hover) !important;
  color: var(--rail-accent) !important;
  border-color: color-mix(in srgb, var(--rail-accent) 35%, var(--rail-line)) !important;
}

.fxm-rail-nav {
  position: relative !important;
  z-index: 1 !important;
  flex: 1 1 !important;
  overflow: auto !important;
  padding: 8px 10px 12px !important;
}

.fxm-rail-nav::-webkit-scrollbar { width: 4px; }
.fxm-rail-nav::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--rail-muted) 35%, transparent);
  border-radius: 4px;
}

.fxm-nav-group {
  margin-bottom: 6px !important;
}

.fxm-nav-heading,
.shell-rail .fxm-nav-heading,
.fxm-rail .fxm-nav-heading {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 28px !important;
  padding: 10px 8px 4px 10px !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--rail-muted) !important;
  font: inherit !important;
  font-size: 10.5px !important;
  font-weight: 650 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
  text-align: left !important;
  box-shadow: none !important;
}

.fxm-nav-heading:hover {
  color: var(--rail-text) !important;
  background: transparent !important;
}

.fxm-nav-heading-label {
  flex: 1 1 !important;
  min-width: 0 !important;
  color: inherit !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.fxm-mini-chev {
  width: 12px !important;
  height: 12px !important;
  opacity: 0.65 !important;
  color: inherit !important;
  transition: transform 0.15s ease !important;
  flex-shrink: 0 !important;
}

.fxm-mini-chev.open {
  transform: rotate(180deg) !important;
}

.fxm-nav-group.has-active > .fxm-nav-heading,
.fxm-nav-group.has-active > .fxm-nav-heading .fxm-nav-heading-label,
.fxm-nav-group.has-active > .fxm-nav-heading svg {
  color: var(--rail-accent) !important;
}

.fxm-nav-children {
  display: flex !important;
  flex-direction: column !important;
  gap: 1px !important;
  padding: 2px 0 4px !important;
}

.fxm-nav-link,
.shell-rail .fxm-rail a.fxm-nav-link,
.fxm-nav-children .fxm-nav-link {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-height: 36px !important;
  margin: 0 2px !important;
  padding: 0 10px 0 10px !important;
  border-radius: 8px !important;
  border: 0 !important;
  border-left: 0 !important;
  background: transparent !important;
  color: var(--rail-text) !important;
  text-decoration: none !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  opacity: 1 !important;
  box-shadow: none !important;
  transition: background 0.12s ease, color 0.12s ease !important;
}

.fxm-nav-link:hover,
.shell-rail .fxm-rail a.fxm-nav-link:hover {
  background: var(--rail-hover) !important;
  color: var(--rail-text) !important;
  text-decoration: none !important;
  filter: none !important;
  transform: none !important;
}

.fxm-nav-link.is-active,
.fxm-rail .fxm-nav-link.is-active,
.shell-rail .fxm-nav-link.is-active,
.fxm-nav-children .fxm-nav-link.is-active {
  background: var(--rail-active) !important;
  color: var(--rail-accent) !important;
  font-weight: 600 !important;
  opacity: 1 !important;
}

.fxm-nav-link.is-active::before {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  left: 0 !important;
  top: 8px !important;
  bottom: 8px !important;
  width: 3px !important;
  border-radius: 0 2px 2px 0 !important;
  background: var(--rail-accent) !important;
}

.fxm-nav-tile,
.shell-rail .fxm-rail a.fxm-nav-link .fxm-nav-tile,
.fxm-nav-link .fxm-nav-tile[class*="tone-"] {
  width: 28px !important;
  height: 28px !important;
  border-radius: 7px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  background: var(--rail-surface) !important;
  border: 1px solid var(--rail-line) !important;
  color: var(--rail-muted) !important;
  box-shadow: none !important;
  filter: none !important;
  transform: none !important;
}

.fxm-nav-link:hover .fxm-nav-tile,
.shell-rail .fxm-rail a.fxm-nav-link:hover .fxm-nav-tile {
  background: color-mix(in srgb, var(--rail-accent) 12%, transparent) !important;
  border-color: color-mix(in srgb, var(--rail-accent) 28%, var(--rail-line)) !important;
  color: var(--rail-accent) !important;
  filter: none !important;
  transform: none !important;
  box-shadow: none !important;
}

.fxm-nav-link.is-active .fxm-nav-tile,
.shell-rail .fxm-rail a.fxm-nav-link.is-active .fxm-nav-tile {
  background: color-mix(in srgb, var(--rail-accent) 16%, transparent) !important;
  border-color: color-mix(in srgb, var(--rail-accent) 40%, var(--rail-line)) !important;
  color: var(--rail-accent) !important;
  box-shadow: none !important;
}

.fxm-nav-ico,
.fxm-nav-tile svg,
.fxm-nav-link .fxm-nav-tile svg,
.fxm-nav-link.is-active .fxm-nav-tile svg,
.fxm-nav-link:hover .fxm-nav-tile svg {
  width: 15px !important;
  height: 15px !important;
  color: inherit !important;
  stroke: currentColor !important;
}

.fxm-nav-text {
  flex: 1 1 !important;
  min-width: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
  color: inherit !important;
}

.fxm-nav-link.is-active .fxm-nav-text,
.shell-rail .fxm-nav-link.is-active,
.shell-rail .fxm-nav-link.is-active * {
  color: var(--rail-accent) !important;
}

.fxm-badge {
  min-width: 18px !important;
  height: 18px !important;
  padding: 0 5px !important;
  border-radius: 999px !important;
  background: var(--primary) !important;
  color: #fff !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
}

/* Footer */
.fxm-rail-foot {
  position: relative !important;
  z-index: 2 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  padding: 12px !important;
  flex-shrink: 0 !important;
  border-top: 1px solid var(--rail-line) !important;
  background: transparent !important;
}

.fxm-mt-card,
.fxm-rail-foot .fxm-mt-card {
  border-radius: 10px !important;
  padding: 10px 11px !important;
  background: var(--rail-surface) !important;
  border: 1px solid var(--rail-line) !important;
  box-shadow: none !important;
  color: var(--rail-text) !important;
}

.fxm-mt-top {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 8px !important;
}

.fxm-mt-identity {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-width: 0 !important;
}

.fxm-mt-mark {
  width: 30px !important;
  height: 30px !important;
  border-radius: 8px !important;
  display: inline-grid !important;
  place-items: center !important;
  flex-shrink: 0 !important;
  background: color-mix(in srgb, var(--rail-accent) 12%, transparent) !important;
  border: 1px solid color-mix(in srgb, var(--rail-accent) 28%, transparent) !important;
  color: var(--rail-accent) !important;
}

.fxm-mt-mark svg {
  width: 14px !important;
  height: 14px !important;
  color: inherit !important;
}

.fxm-mt-top strong,
.fxm-rail-foot .fxm-mt-top strong {
  display: block !important;
  font-size: 12.5px !important;
  font-weight: 650 !important;
  color: var(--rail-text) !important;
}

.fxm-mt-conn,
.fxm-rail-foot .fxm-mt-conn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin-top: 3px !important;
  font-size: 11px !important;
  font-weight: 550 !important;
  color: var(--ok) !important;
}

.fxm-mt-conn i,
.fxm-rail-foot .fxm-mt-conn i {
  width: 6px !important;
  height: 6px !important;
  border-radius: 50% !important;
  background: var(--ok) !important;
  box-shadow: none !important;
}

.fxm-live-pill,
.fxm-rail-foot .fxm-live-pill {
  font-size: 9.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  padding: 3px 7px !important;
  border-radius: 999px !important;
  background: color-mix(in srgb, var(--ok) 12%, transparent) !important;
  color: var(--ok) !important;
  border: 1px solid color-mix(in srgb, var(--ok) 28%, transparent) !important;
}

.fxm-mt-time,
.fxm-rail-foot .fxm-mt-time {
  margin-top: 8px !important;
  padding-top: 8px !important;
  border-top: 1px solid var(--rail-line) !important;
  font-size: 11px !important;
  color: var(--rail-muted) !important;
  font-feature-settings: "tnum" !important;
  font-variant-numeric: tabular-nums !important;
}

.fxm-rail-signout {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  width: 100% !important;
  min-height: 36px !important;
  padding: 0 12px !important;
  border-radius: 8px !important;
  border: 1px solid var(--rail-line) !important;
  background: transparent !important;
  color: var(--rail-muted) !important;
  font: inherit !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  box-shadow: none !important;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease !important;
}

.fxm-rail-signout:hover {
  background: color-mix(in srgb, var(--danger) 10%, transparent) !important;
  border-color: color-mix(in srgb, var(--danger) 35%, var(--rail-line)) !important;
  color: var(--danger) !important;
}

.fxm-rail-signout-ico {
  width: 20px !important;
  height: 20px !important;
  border-radius: 6px !important;
  display: inline-grid !important;
  place-items: center !important;
  background: transparent !important;
  color: inherit !important;
}

.fxm-rail-signout-ico svg,
.fxm-rail-signout svg {
  width: 14px !important;
  height: 14px !important;
  color: inherit !important;
}

.fxm-rail-foot-mini {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 8px !important;
}

.fxm-rail-signout.is-mini {
  width: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
}

.fxm-foot-dot {
  width: 36px !important;
  height: 36px !important;
  border-radius: 9px !important;
  display: grid !important;
  place-items: center !important;
  background: color-mix(in srgb, var(--ok) 12%, transparent) !important;
  border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent) !important;
}

.fxm-foot-dot i {
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  background: var(--ok) !important;
  box-shadow: none !important;
}

/* Collapsed */
.fxm-rail.is-collapsed .fxm-rail-head {
  flex-direction: column !important;
  padding: 12px 8px !important;
}

.fxm-rail.is-collapsed .fxm-brand {
  justify-content: center !important;
  flex: 0 1 !important;
}

.fxm-rail.is-collapsed .fxm-nav-link {
  justify-content: center !important;
  padding: 8px !important;
  margin: 2px 6px !important;
}

.fxm-rail.is-collapsed .fxm-nav-link.is-active::before {
  display: none !important;
}

.fxm-rail.is-collapsed .fxm-rail-foot {
  display: flex !important;
  justify-content: center !important;
  padding: 10px 8px !important;
}

/* Light theme polish */
[data-theme="light"] .fxm-rail {
  background: #ffffff !important;
  box-shadow: 1px 0 0 var(--rail-line), 4px 0 24px rgba(15, 23, 42, 0.04) !important;
}

[data-theme="light"] .fxm-brand-mark {
  color: #ffffff !important;
}

[data-theme="dark"] .fxm-rail {
  background: #020617 !important;
}

[data-theme="dark"] .fxm-mt-card,
[data-theme="dark"] .fxm-rail-foot .fxm-mt-card {
  background: rgba(148, 163, 184, 0.06) !important;
}

/* Close is mobile-drawer only ? never show on desktop */
.fxm-rail .fxm-icon-btn.mobile-only {
  display: none !important;
}

/* Active must beat `.shell-rail .fxm-rail a.fxm-nav-link` (0,3,1) */
.shell-rail .fxm-rail a.fxm-nav-link.is-active,
.fxm-rail a.fxm-nav-link.is-active {
  background: var(--rail-active) !important;
  background-color: var(--rail-active) !important;
  color: var(--rail-accent) !important;
}

.shell-rail .fxm-rail a.fxm-nav-link.is-active .fxm-nav-text,
.shell-rail .fxm-rail a.fxm-nav-link.is-active .fxm-nav-tile,
.shell-rail .fxm-rail a.fxm-nav-link.is-active svg {
  color: var(--rail-accent) !important;
}

@media (max-width: 900px) {
  .fxm-rail {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    width: min(280px, 88vw) !important;
    transform: translateX(-105%) !important;
    transition: transform 0.2s ease !important;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18) !important;
  }
  .shell-rail.mobile-nav-open .fxm-rail {
    transform: translateX(0) !important;
  }
  .fxm-rail .fxm-icon-btn.mobile-only {
    display: inline-flex !important;
  }
}

