
:root {
  --nmu-bg: #f8fafc;
  --nmu-card: #ffffff;
  --nmu-card-sub: #f1f5f9;
  --nmu-line: #e2e8f0;
  --nmu-line-sub: #cbd5e1;
  --nmu-gold: #b48a3c;
  --nmu-gold-dim: #fef8eb;
  --nmu-gold-border: #e8d098;
  --nmu-text: #0f172a;
  --nmu-text-sub: #334155;
  --nmu-muted: #64748b;
  --nmu-up: #16a34a;
  --nmu-up-bg: #dcfce7;
  --nmu-down: #dc2626;
  --nmu-down-bg: #fee2e2;
  --nmu-warn: #d97706;
  --nmu-warn-bg: #fef3c7;
  --nmu-blue: #2563eb;
  --nmu-blue-bg: #eff6ff;
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
}

.macro-terminal-container * { box-sizing: border-box; }
.macro-terminal-container {
  padding: 28px 16px 80px;
  background-color: #0d0d0d;
  color: var(--nmu-text);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}
.macro-terminal-container > main, .macro-terminal-container .nmu-root { max-width: 1620px; margin: 0 auto; }

/* Root Shell */
.nmu-root {
  background: var(--nmu-card);
  border: 1px solid var(--nmu-line);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

/* Executive Top Navigation */
.nmu-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: #ffffff;
  border-bottom: 1px solid var(--nmu-line);
  gap: 16px;
  flex-wrap: wrap;
}
.nmu-brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nmu-brand-logo {
  display: flex;
  align-items: center;
  gap: 9px;
}
.nmu-logo-icon {
  font-size: 20px;
  background: var(--nmu-gold-dim);
  border: 1px solid var(--nmu-gold-border);
  border-radius: 8px;
  padding: 4px 6px;
  line-height: 1;
}
.nmu-brand-text {
  display: flex;
  flex-direction: column;
}
.nmu-brand-title {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--nmu-text);
  line-height: 1.2;
}
.nmu-brand-badge {
  font-size: 11px;
  font-weight: 700;
  color: #15803d;
}
.nmu-live-status {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  margin-left: 6px;
}
.nmu-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--nmu-up);
  box-shadow: 0 0 8px rgba(22, 163, 74, 0.7);
  display: inline-block;
}
.nmu-dot.warn { background: var(--nmu-warn); box-shadow: 0 0 8px var(--nmu-warn); }
.nmu-dot.bad { background: var(--nmu-down); box-shadow: 0 0 8px var(--nmu-down); }

/* Center Tabs */
.nmu-tabs {
  display: flex;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 12px;
  gap: 3px;
  border: none;
}
.nmu-tab {
  padding: 8px 16px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--nmu-muted);
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  transition: all 0.15s ease;
}
.nmu-tab:hover { color: var(--nmu-text); }
.nmu-tab.active {
  background: #ffffff;
  color: var(--nmu-text);
  box-shadow: 0 1px 3px rgba(15,23,42,0.08);
  border-color: rgba(226, 232, 240, 0.6);
}

/* Clocks Capsule */
.nmu-clock-capsule {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f8fafc;
  border: 1px solid var(--nmu-line);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--nmu-muted);
}
.nmu-clock-item { display: flex; align-items: baseline; gap: 4px; }
.nmu-clock-item small { font-size: 10px; font-weight: 700; color: var(--nmu-muted); text-transform: uppercase; }
.nmu-clock-item b { color: var(--nmu-text); font-variant-numeric: tabular-nums; font-weight: 700; }
.nmu-clock-sep { width: 1px; height: 14px; background: var(--nmu-line); }

/* Slim Telemetry Strip */
.nmu-telemetry {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 7px 24px;
  background: #fbfcfd;
  border-bottom: 1px solid var(--nmu-line);
  scrollbar-width: none;
}
.nmu-telemetry::-webkit-scrollbar { display: none; }
.nmu-ticker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid var(--nmu-line);
  border-radius: 7px;
  background: #ffffff;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.nmu-ticker b { color: var(--nmu-text); }
.nmu-ticker span { font-variant-numeric: tabular-nums; }
.nmu-ticker .up { color: var(--nmu-up); font-weight: 700; }
.nmu-ticker .down { color: var(--nmu-down); font-weight: 700; }
.nmu-ticker small { color: var(--nmu-muted); font-size: 9px; margin-left: 2px; }

/* Unified Command Bar */
.nmu-command-bar {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-bottom: 1px solid var(--nmu-line);
}
.nmu-scope-scroller {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 24px 8px;
  scrollbar-width: none;
}
.nmu-scope-scroller::-webkit-scrollbar { display: none; }
.nmu-scope-tag {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--nmu-muted);
  letter-spacing: .08em;
  margin-right: 4px;
  white-space: nowrap;
}
.nmu-scope {
  font-size: 11px;
  padding: 5px 12px;
  border-radius: 999px;
  font-weight: 600;
  background: #f8fafc;
  border: 1px solid var(--nmu-line);
  color: var(--nmu-text);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.12s ease;
}
.nmu-scope:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}
.nmu-scope.active {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(15,23,42,0.2);
}

.nmu-filter-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 24px 10px;
  border-top: 1px solid #f1f5f9;
  flex-wrap: wrap;
}
.nmu-era-group {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.nmu-era-tag {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--nmu-muted);
  letter-spacing: .08em;
  margin-right: 3px;
}
.nmu-era {
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid var(--nmu-line);
  background: #ffffff;
  color: var(--nmu-text-sub);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.12s ease;
}
.nmu-era:hover { border-color: var(--nmu-gold); color: #8c6823; }
.nmu-era.highlight {
  background: var(--nmu-gold-dim);
  border-color: var(--nmu-gold);
  color: #8c6823;
  font-weight: 700;
}
.nmu-era-select {
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--nmu-line);
  background: #f8fafc;
  color: var(--nmu-text-sub);
}

.nmu-chip, .nmu-btn, .nmu-select, .nmu-input {
  background: #ffffff;
  color: var(--nmu-text);
  border: 1px solid var(--nmu-line);
  border-radius: 8px;
  padding: 6px 11px;
  font-size: 12px;
  font-family: inherit;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
}
.nmu-chip, .nmu-btn { cursor: pointer; }
.nmu-chip:hover, .nmu-btn:hover, .nmu-btn.active {
  border-color: var(--nmu-gold);
  color: #8c6823;
  background: var(--nmu-gold-dim);
}

/* Professional SVG Icons & Dot Badges */
.nmu-svg-icon {
  display: inline-block;
  vertical-align: middle;
}
.nmu-tab-svg {
  display: inline-block;
  vertical-align: -2.5px;
  margin-right: 6px;
}
.nmu-scope-svg {
  display: inline-block;
  vertical-align: -2px;
  margin-right: 5px;
  opacity: 0.85;
}
.nmu-scope.active .nmu-scope-svg {
  opacity: 1;
}
.ng-btn-icon {
  display: inline-block;
  vertical-align: -2px;
  margin-right: 5px;
}
.ng-impact-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: 0px;
}
.ng-impact-dot.high { background: var(--nmu-down); box-shadow: 0 0 5px rgba(220, 38, 38, 0.4); }
.ng-impact-dot.med { background: var(--nmu-warn); box-shadow: 0 0 5px rgba(217, 119, 6, 0.4); }
.ng-impact-dot.low { background: var(--nmu-up); box-shadow: 0 0 5px rgba(22, 163, 74, 0.4); }

/* Panels */
.nmu-panel { display: none; padding: 18px 24px 24px; }
.nmu-panel.active { display: block; }

/* World Markets Tab */
.nmu-market-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(220px, 1fr) auto;
  gap: 12px;
  margin-bottom: 16px;
}
.nmu-market-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
  color: var(--nmu-muted);
  font-size: 12px;
  font-weight: 500;
}
.nmu-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--nmu-line);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}
.nmu-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 960px;
}
.nmu-table th, .nmu-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--nmu-line);
  text-align: left;
  font-size: 12px;
}
.nmu-table th {
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--nmu-muted);
  background: #f8fafc;
  text-transform: uppercase;
  font-weight: 700;
  position: sticky;
  top: 0;
  z-index: 2;
}
.nmu-asset b { display: block; color: var(--nmu-text); font-weight: 700; font-size: 13px; }
.nmu-asset small, .nmu-muted { color: var(--nmu-muted); }
.nmu-price { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--nmu-text); }
.nmu-up { color: var(--nmu-up) !important; font-weight: 700; }
.nmu-down { color: var(--nmu-down) !important; font-weight: 700; }
.nmu-flat { color: var(--nmu-muted) !important; }
.nmu-state {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--nmu-text-sub);
  font-size: 10px;
  font-weight: 700;
}
.nmu-stale { color: var(--nmu-warn); font-size: 10px; margin-left: 5px; font-weight: 600; }
.nmu-pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.nmu-empty { padding: 40px; text-align: center; color: var(--nmu-muted); font-size: 13px; }

/* Macro Research Tab */
.nmu-research-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.nmu-kpi {
  background: #ffffff;
  border: 1px solid var(--nmu-line);
  border-radius: 12px;
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.nmu-kpi small {
  display: block;
  color: var(--nmu-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
}
.nmu-kpi strong {
  display: block;
  font-size: 26px;
  font-weight: 800;
  color: var(--nmu-text);
  margin-top: 6px;
}
.nmu-section {
  background: #ffffff;
  border: 1px solid var(--nmu-line);
  border-radius: 14px;
  padding: 20px;
  margin-top: 16px;
  box-shadow: var(--shadow-sm);
}
.nmu-section h3 {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 800;
  color: var(--nmu-text);
}
.nmu-events {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.nmu-event-card {
  background: #fbfcfd;
  border: 1px solid var(--nmu-line);
  border-radius: 10px;
  padding: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.nmu-event-card:hover {
  border-color: var(--nmu-gold);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}
.nmu-event-card .row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.nmu-event-card b { font-size: 13px; color: var(--nmu-text); font-weight: 700; }
.nmu-event-card small { color: var(--nmu-muted); font-size: 11px; }
.nmu-research-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.nmu-feature-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.nmu-feature {
  padding: 14px;
  border: 1px solid var(--nmu-line);
  background: #fbfcfd;
  border-radius: 10px;
}
.nmu-feature b { display: block; font-size: 13px; font-weight: 700; margin-bottom: 4px; color: var(--nmu-text); }
.nmu-feature span { font-size: 12px; color: var(--nmu-muted); line-height: 1.5; }
.nmu-health-ok { color: var(--nmu-up); font-weight: 700; }
.nmu-health-warn { color: var(--nmu-warn); font-weight: 700; }

/* Economic Calendar View in White UI */
.ng-cal {
  background: #ffffff;
  color: var(--nmu-text);
  border: 1px solid var(--nmu-line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.ng-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
}
.ng-sidebar {
  padding: 18px;
  border-right: 1px solid var(--nmu-line);
  background: #fbfcfd;
  min-width: 0;
}
.ng-main { min-width: 0; }
.ng-calnav-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.ng-calnav-head strong { font-size: 14px; font-weight: 800; color: var(--nmu-text); }
.ng-calnav-head > div { display: flex; gap: 6px; }
.ng-icon-btn, .ng-btn, .ng-select, .ng-search {
  background: #ffffff;
  color: var(--nmu-text);
  border: 1px solid var(--nmu-line);
  border-radius: 8px;
  padding: 7px 11px;
  font-size: 12px;
  font-family: inherit;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
}
.ng-btn, .ng-icon-btn { cursor: pointer; }
.ng-icon-btn { font-size: 16px; line-height: 1; padding: 5px 10px; font-weight: 700; }
.ng-btn:hover, .ng-btn.active {
  border-color: var(--nmu-gold);
  color: #8c6823;
  background: var(--nmu-gold-dim);
}
.ng-calnav-selects {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 8px;
}
.ng-month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-top: 12px;
}
.ng-dow {
  color: var(--nmu-muted);
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  padding: 4px;
  text-transform: uppercase;
}
.ng-day {
  height: 36px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #ffffff;
  color: var(--nmu-text);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.12s ease;
}
.ng-day:hover {
  background: #f1f5f9;
  border-color: var(--nmu-line);
}
.ng-day.out { opacity: .35; }
.ng-day.today { border-color: var(--nmu-gold); background: #fefdf9; }
.ng-day.selected {
  background: var(--nmu-gold-dim);
  border-color: var(--nmu-gold);
  color: #8c6823;
  font-weight: 800;
}
.ng-day.selected em {
  color: #8c6823;
}
.ng-day span {
  display: inline-block;
  line-height: 1;
  pointer-events: none;
}
.ng-day em {
  position: absolute;
  right: 3px;
  top: 2px;
  font-size: 8px;
  line-height: 1;
  font-style: normal;
  color: var(--nmu-muted);
  font-weight: 600;
  pointer-events: none;
}
.ng-day.impact-3:after, .ng-day.impact-2:after, .ng-day.impact-1:after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  left: 50%;
  bottom: 3px;
  transform: translateX(-50%);
  pointer-events: none;
}
.ng-day.impact-3:after { background: var(--nmu-down); }
.ng-day.impact-2:after { background: var(--nmu-warn); }
.ng-day.impact-1:after { background: var(--nmu-up); }
.ng-side-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.ng-history-box {
  margin-top: 16px;
  background: #ffffff;
  border: 1px solid var(--nmu-line);
  border-radius: 10px;
  padding: 12px;
  box-shadow: var(--shadow-sm);
}
.ng-history-box small { display: block; color: var(--nmu-muted); font-size: 10px; text-transform: uppercase; font-weight: 700; }
.ng-history-box strong { display: block; color: #8c6823; font-size: 12px; margin: 4px 0; font-weight: 700; }
.ng-history-box span { display: block; color: var(--nmu-muted); font-size: 10px; line-height: 1.45; }
.ng-legend { font-size: 10px; color: var(--nmu-muted); margin-top: 12px; font-weight: 500; }
.ng-legend i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin: 0 4px 0 8px; vertical-align: middle; }
.ng-legend .h3 { background: var(--nmu-down); }
.ng-legend .h2 { background: var(--nmu-warn); }
.ng-legend .h1 { background: var(--nmu-up); }

.ng-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--nmu-line);
  background: #ffffff;
}
.ng-toolbar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  flex-wrap: wrap;
}
.ng-toolbar-row.controls-row {
  padding-top: 4px;
}
.ng-tabs, .ng-impacts { display: flex; gap: 6px; flex-wrap: wrap; }
.ng-search { min-width: 220px; flex: 1; }
.ng-selected-bar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 18px;
  background: #fbfcfd;
  border-bottom: 1px solid var(--nmu-line);
  color: var(--nmu-muted);
  font-size: 12px;
  font-weight: 500;
}
.ng-selected-bar b { color: var(--nmu-text); font-weight: 700; }
.ng-meta { font-size: 11px; display: flex; align-items: center; gap: 6px; }
.ng-status-dot {
  width: 7px;
  height: 7px;
  background: var(--nmu-up);
  display: inline-block;
  border-radius: 50%;
}
.ng-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  align-items: start;
  transition: all 0.2s ease;
}
.ng-main {
  min-width: 0;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
}
.ng-sidebar.collapsed { display: none; }
.ng-layout.sidebar-collapsed { grid-template-columns: minmax(0, 1fr); }
.ng-cal-toggle { margin-left: auto; font-weight: 600; cursor: pointer; }
.ng-cal-toggle.active { background: var(--nmu-gold-dim); border-color: var(--nmu-gold); color: #8c6823; }

.ng-table-wrap {
  overflow-x: auto;
  max-height: 800px;
}
.ng-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 960px;
}
.ng-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
  color: var(--nmu-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 10px;
  font-weight: 700;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--nmu-line);
}
.ng-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--nmu-line);
  font-size: 12px;
  vertical-align: middle;
}
.ng-row { cursor: pointer; transition: background 0.12s ease; }
.ng-row:hover { background: #f8fafc; }
.ng-time b { display: block; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--nmu-text); font-size: 12px; }
.ng-time span { display: block; color: var(--nmu-muted); font-size: 10px; margin-top: 1px; }
.ng-time em { font-style: normal; }
.ng-countdown { display: block; color: #8c6823; font-size: 9px; margin-top: 2px; font-weight: 600; }

.ng-cur-pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  font-weight: 700;
  font-size: 11px;
  color: var(--nmu-text);
  border: 1px solid var(--nmu-line);
}
.ng-impact { display: inline-flex; gap: 2px; }
.ng-impact i { display: block; width: 4px; height: 14px; border-radius: 2px; background: #cbd5e1; }
.ng-impact.i1 i:nth-child(1) { background: var(--nmu-up); }
.ng-impact.i2 i:nth-child(-n+2) { background: var(--nmu-warn); }
.ng-impact.i3 i { background: var(--nmu-down); }

.ng-event { font-weight: 700; color: var(--nmu-text); font-size: 13px; line-height: 1.3; }
.ng-category { display: flex; align-items: center; gap: 4px; color: var(--nmu-muted); font-size: 10px; margin-top: 2px; }
.ng-status-pill { text-transform: uppercase; font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 4px; background: #f1f5f9; color: var(--nmu-muted); }
.ng-cluster { display: block; color: #8c6823; font-size: 10px; font-weight: 800; margin-bottom: 2px; }

.ng-num { font-variant-numeric: tabular-nums; text-align: right; }
.ng-actual { font-size: 13px; font-weight: 800; color: var(--nmu-text); }
.ng-num.ng-up .ng-actual, .ng-num.ng-positive .ng-actual, .ng-num.ng-hawkish .ng-actual { color: var(--nmu-up); }
.ng-num.ng-down .ng-actual, .ng-num.ng-negative .ng-actual, .ng-num.ng-dovish .ng-actual { color: var(--nmu-down); }
.ng-muted-num { color: var(--nmu-muted); font-size: 12px; font-weight: 500; }
.ng-revised { display: block; color: #b45309; font-size: 9px; font-weight: 600; }

.ng-surprise-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--nmu-line);
  background: #f8fafc;
}
.ng-surprise-pill b { font-variant-numeric: tabular-nums; }
.ng-surprise-pill small { font-size: 10px; font-weight: 600; opacity: 0.85; }
.ng-surprise-pill.ng-positive, .ng-surprise-pill.ng-hawkish { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.ng-surprise-pill.ng-negative, .ng-surprise-pill.ng-dovish { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.ng-surprise-pill.ng-flat, .ng-surprise-pill.ng-inline { background: #fffbeb; color: #b45309; border-color: #fde68a; }

.ng-moves { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.ng-move {
  white-space: nowrap;
  border: 1px solid var(--nmu-line);
  background: #ffffff;
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 600;
}
.ng-move b { color: var(--nmu-text); margin-right: 2px; }
.ng-move-more {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid var(--nmu-line);
  font-size: 9px;
  font-weight: 700;
  color: var(--nmu-muted);
}
.ng-move.ng-up { color: var(--nmu-up) !important; border-color: #bbf7d0; background: #f0fdf4; }
.ng-move.ng-down { color: var(--nmu-down) !important; border-color: #fecaca; background: #fef2f2; }
.ng-move.ng-flat { color: var(--nmu-warn) !important; }

.ng-footnote {
  padding: 10px 18px;
  border-top: 1px solid var(--nmu-line);
  color: var(--nmu-muted);
  font-size: 10px;
  line-height: 1.5;
  background: #fbfcfd;
}

/* Modals in White UI */
.ng-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.ng-modal.open { display: flex; }
.ng-panel {
  width: min(1180px, 100%);
  max-height: 92vh;
  overflow: auto;
  background: #ffffff;
  border: 1px solid var(--nmu-line);
  border-radius: 18px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
}
.ng-panel-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--nmu-line);
  background: #f8fafc;
}
.ng-panel-head h3 {
  font-size: 24px;
  font-weight: 800;
  color: var(--nmu-text);
  margin: 4px 0;
}
.ng-close {
  margin-left: auto;
  background: #ffffff;
  border: 1px solid var(--nmu-line);
  color: var(--nmu-text);
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.ng-close:hover { background: #f1f5f9; }
.ng-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  padding: 20px 24px;
}
.ng-stat {
  background: #fbfcfd;
  border: 1px solid var(--nmu-line);
  border-radius: 12px;
  padding: 14px;
}
.ng-stat small, .ng-stat span { display: block; color: var(--nmu-muted); font-size: 10px; font-weight: 600; text-transform: uppercase; }
.ng-stat strong { display: block; font-size: 18px; font-weight: 800; color: var(--nmu-text); margin: 4px 0; }
.ng-section {
  padding: 20px 24px;
  border-top: 1px solid var(--nmu-line);
}
.ng-section h4 { margin: 0 0 10px; color: #8c6823; font-size: 15px; font-weight: 800; }
.ng-section p { color: var(--nmu-text-sub); line-height: 1.6; font-size: 13px; margin: 0; }
.ng-section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.ng-cluster-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.ng-cluster-list > div { background: #fbfcfd; border: 1px solid var(--nmu-line); border-radius: 10px; padding: 10px; }
.ng-cluster-list b { display: block; font-size: 12px; color: var(--nmu-text); font-weight: 700; }
.ng-cluster-list span { font-size: 11px; color: var(--nmu-muted); }
.ng-impact-table-wrap { overflow-x: auto; border: 1px solid var(--nmu-line); border-radius: 10px; margin-top: 8px; }
.ng-impact-table { border-collapse: collapse; width: 100%; min-width: 1080px; }
.ng-impact-table th, .ng-impact-table td { border-bottom: 1px solid var(--nmu-line); padding: 10px 12px; font-size: 11px; text-align: left; }
.ng-impact-table th { background: #f8fafc; color: var(--nmu-muted); text-transform: uppercase; font-size: 10px; font-weight: 700; }
.ng-impact-table th.ng-num, .ng-impact-table td.ng-num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.ng-impact-table td.ng-up { color: var(--nmu-up) !important; }
.ng-impact-table td.ng-down { color: var(--nmu-down) !important; }
.ng-impact-table td.ng-flat { color: var(--nmu-muted) !important; }
.ng-impact-table td:first-child b { display: block; color: var(--nmu-text); font-weight: 700; }
.ng-impact-table small { color: var(--nmu-muted); font-size: 10px; }
.ng-macro-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #fbfcfd;
  border: 1px solid var(--nmu-line);
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 6px;
}
.ng-macro-badge {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  border: 1px solid var(--nmu-line);
  background: #ffffff;
  color: var(--nmu-text);
  flex-shrink: 0;
}
.ng-macro-badge.ng-hawkish, .ng-macro-badge.ng-positive {
  background: #f0fdf4;
  color: #15803d;
  border-color: #bbf7d0;
}
.ng-macro-badge.ng-dovish, .ng-macro-badge.ng-negative {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}
.ng-macro-badge.ng-inline, .ng-macro-badge.ng-flat {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}
.ng-chart {
  display: block;
  width: 100%;
  height: 230px;
  background: #ffffff;
  border: 1px solid var(--nmu-line);
  border-radius: 10px;
}
.ng-note { color: var(--nmu-muted) !important; font-size: 11px !important; margin-top: 8px !important; }
.ng-tech-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px; }
.ng-tech-grid > div { background: #fbfcfd; border: 1px solid var(--nmu-line); border-radius: 10px; padding: 10px; }
.ng-tech-grid b, .ng-tech-grid strong, .ng-tech-grid span { display: block; }
.ng-tech-grid b { font-size: 12px; color: var(--nmu-text); font-weight: 700; }
.ng-tech-grid span { color: var(--nmu-muted); font-size: 10px; }

/* Year Heatmap Modal */
.ng-year-panel { width: min(1280px, 100%); }
.ng-year-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 24px;
}
.ng-year-month {
  background: #fbfcfd;
  border: 1px solid var(--nmu-line);
  border-radius: 12px;
  padding: 12px;
}
.ng-year-month > strong { display: block; color: #8c6823; font-size: 13px; font-weight: 800; margin-bottom: 8px; }
.ng-year-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.ng-year-days button, .ng-year-days .blank { height: 26px; border-radius: 5px; }
.ng-year-days button {
  border: 1px solid var(--nmu-line);
  background: #ffffff;
  color: var(--nmu-text-sub);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.1s ease;
}
.ng-year-days button.i1 { background: #dcfce7; border-color: #86efac; color: #15803d; }
.ng-year-days button.i2 { background: #fef3c7; border-color: #fcd34d; color: #b45309; }
.ng-year-days button.i3 { background: #fee2e2; border-color: #fca5a5; color: #b91c1c; }
.ng-year-days button:hover { outline: 2px solid var(--nmu-gold); z-index: 2; }

/* Provenance & Quality */
.ng-provenance {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 10px 14px;
  background: #fbfcfd;
  border: 1px solid var(--nmu-line);
  border-radius: 10px;
}
.ng-provenance span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  color: #8c6823;
  border: 1px solid var(--nmu-gold-border);
  background: var(--nmu-gold-dim);
  border-radius: 999px;
  padding: 3px 8px;
}
.ng-provenance b { font-size: 11px; color: var(--nmu-text); font-weight: 700; }
.ng-provenance small { color: var(--nmu-muted); font-size: 11px; flex-basis: 100%; }
.ng-quality {
  font-size: 11px;
  font-weight: 800;
  border: 1px solid var(--nmu-line);
  border-radius: 999px;
  padding: 5px 12px;
}
.ng-quality-high { color: var(--nmu-up); background: var(--nmu-up-bg); border-color: #86efac; }
.ng-quality-medium { color: var(--nmu-warn); background: var(--nmu-warn-bg); border-color: #fcd34d; }
.ng-quality-low { color: var(--nmu-down); background: var(--nmu-down-bg); border-color: #fca5a5; }
.ng-quality-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.ng-quality-grid > div { background: #fbfcfd; border: 1px solid var(--nmu-line); border-radius: 8px; padding: 10px; }
.ng-quality-grid b { font-size: 11px; text-transform: capitalize; color: var(--nmu-text); font-weight: 700; }
.ng-quality-grid span { font-size: 10px; color: var(--nmu-muted); margin-top: 2px; display: block; }
.ng-quality-grid .ok b { color: var(--nmu-up); }
.ng-quality-grid .warn b { color: var(--nmu-warn); }

.ng-revision-list { display: grid; gap: 8px; margin-top: 8px; }
.ng-revision-list > div {
  display: grid;
  grid-template-columns: 160px 180px 1fr;
  gap: 12px;
  align-items: center;
  background: #fbfcfd;
  border: 1px solid var(--nmu-line);
  border-radius: 8px;
  padding: 10px;
}
.ng-revision-list time { color: var(--nmu-muted); font-size: 11px; }
.ng-revision-list b { font-size: 11px; text-transform: capitalize; color: var(--nmu-text); font-weight: 700; }
.ng-revision-list span { font-size: 11px; color: var(--nmu-text-sub); }

.nmu-panel [data-nexgen-calendar] .ng-head { display: none; }
.nmu-panel [data-nexgen-calendar] { background: transparent; }
.nmu-panel [data-nexgen-calendar] .ng-cal { border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }

.nmu-footer {
  padding: 16px 28px;
  color: var(--nmu-muted);
  font-size: 12px;
  line-height: 1.5;
  border-top: 1px solid var(--nmu-line);
  background: #f8fafc;
}

@media(max-width: 1100px) {
  .ng-layout { grid-template-columns: 1fr; }
  .ng-sidebar { border-right: 0; border-bottom: 1px solid var(--nmu-line); }
  .ng-year-grid { grid-template-columns: repeat(2, 1fr); }
  .nmu-market-toolbar { grid-template-columns: 1fr; }
  .nmu-research-grid { grid-template-columns: 1fr 1fr; }
  .nmu-feature-list { grid-template-columns: 1fr 1fr; }
}
@media(max-width: 700px) {
  body { padding: 12px; }
  .nmu-top { padding: 18px 16px; }
  .nmu-panel { padding: 14px; }
  .nmu-title { font-size: 24px; }
  .nmu-research-grid, .nmu-feature-list, .nmu-events { grid-template-columns: 1fr; }
  .ng-year-grid { grid-template-columns: 1fr; }
  .ng-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================
   VISUAL STATUS & LOADING INDICATORS
   ========================================================== */
.nmu-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #d97706, #b48a3c, #16a34a);
  box-shadow: 0 0 10px rgba(217, 119, 6, 0.7);
  z-index: 9999999;
  transition: width 0.25s ease, opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}
.nmu-progress-bar.active {
  opacity: 1;
  animation: nmu-prog 1.4s infinite ease-in-out;
}
@keyframes nmu-prog {
  0% { width: 10%; }
  50% { width: 70%; }
  100% { width: 92%; }
}
.nmu-progress-bar.done {
  width: 100% !important;
  opacity: 0 !important;
  transition: width 0.15s ease, opacity 0.4s ease 0.15s;
}
.nmu-progress-bar.error {
  width: 100% !important;
  background: #ef4444 !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.8) !important;
  opacity: 1 !important;
}

@keyframes ng-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes ng-pulse-glow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.85); }
}

.ng-spinner {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 2px solid rgba(180, 138, 60, 0.25);
  border-top-color: var(--nmu-gold);
  border-radius: 50%;
  animation: ng-spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
  flex-shrink: 0;
}
.ng-spinner-large {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(180, 138, 60, 0.2);
  border-top-color: var(--nmu-gold);
  border-radius: 50%;
  animation: ng-spin 0.7s linear infinite;
}

.ng-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.2s ease;
  line-height: 1.2;
}
.ng-status-badge.loading {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  color: #92400e;
}
.ng-status-badge.success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
}
.ng-status-badge.error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #b91c1c;
}
.ng-status-dot.ok {
  width: 8px;
  height: 8px;
  background: var(--nmu-up);
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  box-shadow: 0 0 6px rgba(22, 163, 74, 0.6);
  flex-shrink: 0;
}
.ng-status-dot.loading {
  width: 8px;
  height: 8px;
  background: #f59e0b;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  animation: ng-pulse-glow 1s infinite ease-in-out;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.6);
  flex-shrink: 0;
}
.ng-status-dot.err {
  width: 8px;
  height: 8px;
  background: var(--nmu-down);
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  box-shadow: 0 0 6px rgba(220, 38, 38, 0.6);
  flex-shrink: 0;
}
.ng-retry-btn {
  margin-left: 8px;
  padding: 3px 9px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  transition: all 0.15s ease;
}
.ng-retry-btn:hover {
  background: rgba(0, 0, 0, 0.08);
}

.nmu-dot.loading {
  background: #f59e0b;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.8);
  animation: ng-pulse-glow 1s infinite ease-in-out;
}

/* In-table loading & error states */
.ng-table-wrap {
  position: relative;
  overflow-x: auto;
  max-height: 800px;
}
.ng-table-wrap.is-loading .ng-table {
  opacity: 0.52;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.ng-table-wrap.is-loading::before {
  content: '';
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--nmu-gold) 0%, #3b82f6 50%, var(--nmu-gold) 100%);
  background-size: 200% 100%;
  animation: ng-shimmer 1.2s infinite linear;
  z-index: 10;
  display: block;
}
@keyframes ng-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.ng-loading-cell {
  text-align: center;
  padding: 48px 24px;
  color: var(--nmu-muted);
  font-size: 13px;
  font-weight: 600;
}
.ng-loading-cell .ng-spinner {
  width: 18px;
  height: 18px;
  border-width: 2.5px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}

.ng-error-card {
  text-align: center;
  padding: 40px 24px;
  max-width: 520px;
  margin: 30px auto;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}
.ng-error-icon {
  font-size: 36px;
  margin-bottom: 10px;
  line-height: 1;
}
.ng-error-card h4 {
  font-size: 17px;
  color: #991b1b;
  font-weight: 800;
  margin: 0 0 8px;
}
.ng-error-card p {
  font-size: 13px;
  color: #b91c1c;
  margin: 0 0 18px;
  line-height: 1.5;
}
.ng-error-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}
