﻿:root {
  --bg: #07111e;
  --bg-soft: #0c1830;
  --bg-panel: rgba(11, 23, 43, 0.76);
  --bg-panel-strong: rgba(15, 29, 54, 0.94);
  --line: rgba(157, 180, 217, 0.14);
  --line-strong: rgba(157, 180, 217, 0.26);
  --text: #edf3ff;
  --muted: #8ea2c8;
  --muted-strong: #b7c6e3;
  --accent: #7de8ca;
  --accent-2: #ffcb7f;
  --accent-3: #92b6ff;
  --danger: #ff8888;
  --success: #96f1a8;
  --warning: #ffbb74;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "Google Sans Text", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(93, 226, 184, 0.16), transparent 30%),
    radial-gradient(circle at 82% 16%, rgba(255, 203, 127, 0.14), transparent 24%),
    linear-gradient(140deg, #04101b 0%, #091426 36%, #101c36 100%);
}

body.modal-open {
  overflow: hidden;
}

.ambient,
.grid-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.ambient-a {
  background: radial-gradient(circle at 12% 0%, rgba(125, 232, 202, 0.14), transparent 32%);
}

.ambient-b {
  background: radial-gradient(circle at 100% 100%, rgba(146, 182, 255, 0.12), transparent 28%);
}

.grid-overlay {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.84), transparent 92%);
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1480px, calc(100% - 32px));
  min-width: 0;
  margin: 0 auto;
  padding: 24px 0 56px;
}

.hero,
.panel,
.metric-panel {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--bg-panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.9fr);
  gap: 28px;
  padding: 32px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(18, 37, 68, 0.92), rgba(7, 15, 28, 0.88)),
    radial-gradient(circle at top left, rgba(125, 232, 202, 0.14), transparent 28%);
}

.eyebrow,
.panel-kicker,
.metric-kicker {
  margin: 0;
  color: var(--accent);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(2.5rem, 4.8vw, 5rem);
  line-height: 0.92;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

.lede {
  max-width: 58rem;
  margin-bottom: 18px;
  color: var(--muted-strong);
  font-size: 1.02rem;
  line-height: 1.65;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag,
.timestamp-pill,
.badge,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  font-weight: 700;
}

.tag {
  padding: 9px 14px;
  border: 1px solid rgba(125, 232, 202, 0.18);
  background: rgba(125, 232, 202, 0.08);
  color: #d8fff3;
}

.hero-side {
  display: grid;
  align-content: space-between;
  gap: 18px;
}

.status-pill {
  justify-self: end;
  padding: 12px 18px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.08);
}

.status-pill.online {
  color: #032112;
  background: linear-gradient(135deg, #9af4b0, #d8ffb4);
}

.status-pill.offline {
  color: white;
  background: linear-gradient(135deg, #7f2f43, #cb5865);
}

.status-stack {
  display: grid;
  gap: 14px;
}

.status-line {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.status-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.82rem;
}

.status-line strong {
  display: block;
  font-size: 0.96rem;
  line-height: 1.5;
  word-break: break-word;
}

.summary-grid,
.analytics-grid,
.main-grid,
.content-grid {
  display: grid;
  gap: 20px;
}

.summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 20px;
}

.metric-panel {
  border-radius: var(--radius-lg);
  padding: 22px;
}

.work-status-panel {
  margin-top: 20px;
}

.view-switcher {
  margin-top: 20px;
}

.ops-readiness-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 20px;
  margin-top: 20px;
}

.preflight-status {
  margin-bottom: 14px;
}

.preflight-summary {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.preflight-summary strong {
  font-size: 1.05rem;
}

.preflight-summary span {
  color: var(--muted-strong);
  line-height: 1.45;
}

.preflight-summary.ok {
  border-color: rgba(125, 232, 202, 0.38);
  background: rgba(125, 232, 202, 0.08);
}

.preflight-summary.warn,
.preflight-summary.warning {
  border-color: rgba(255, 202, 128, 0.38);
  background: rgba(255, 202, 128, 0.08);
}

.preflight-summary.fail,
.preflight-summary.error {
  border-color: rgba(255, 136, 136, 0.34);
  background: rgba(255, 136, 136, 0.07);
}

.preflight-grid {
  display: grid;
  gap: 10px;
}

.preflight-check {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
}

.preflight-check h4 {
  margin: 0 0 4px;
  font-size: 0.94rem;
}

.preflight-check p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.check-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--muted);
}

.preflight-check.ok .check-dot {
  background: var(--success);
}

.preflight-check.warn .check-dot,
.preflight-check.warning .check-dot {
  background: var(--warning);
}

.preflight-check.fail .check-dot,
.preflight-check.error .check-dot {
  background: var(--danger);
}

.incident-feed {
  display: grid;
  gap: 10px;
  max-height: 520px;
  overflow: auto;
  padding-right: 6px;
}

.incident-item {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
}

.incident-item.warn,
.incident-item.warning {
  border-color: rgba(255, 202, 128, 0.28);
}

.incident-item.error {
  border-color: rgba(255, 136, 136, 0.32);
}

.incident-time {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.incident-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.incident-title strong {
  min-width: 0;
  line-height: 1.35;
}

.incident-title span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.incident-body p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.view-tab-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.view-tab {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted-strong);
  padding: 12px 16px;
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.view-tab:hover {
  transform: translateY(-1px);
  border-color: rgba(125, 232, 202, 0.28);
  background: rgba(125, 232, 202, 0.08);
}

.view-tab.active {
  border-color: rgba(125, 232, 202, 0.44);
  background: linear-gradient(135deg, rgba(125, 232, 202, 0.16), rgba(146, 182, 255, 0.14));
  color: var(--text);
}

.work-status-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.work-status-summary p {
  max-width: 780px;
  margin: 10px 0 0;
  color: var(--muted-strong);
  line-height: 1.6;
}

.work-status-next {
  min-width: 210px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
}

.work-status-next span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.82rem;
}

.work-status-next strong {
  display: block;
  color: var(--text);
  line-height: 1.45;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted-strong);
  font-weight: 700;
}

.status-chip.ok {
  border-color: rgba(125, 232, 202, 0.45);
  background: rgba(125, 232, 202, 0.14);
  color: #d8fff3;
}

.status-chip.running {
  border-color: rgba(138, 180, 255, 0.5);
  background: rgba(138, 180, 255, 0.15);
  color: #dbe8ff;
}

.status-chip.waiting,
.status-chip.skip {
  border-color: rgba(255, 202, 128, 0.5);
  background: rgba(255, 202, 128, 0.14);
  color: #ffe6bf;
}

.status-chip.fail {
  border-color: rgba(255, 110, 126, 0.55);
  background: rgba(255, 110, 126, 0.14);
  color: #ffd1d7;
}

.linear-status {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.linear-status::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 23px;
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
}

.status-step {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: grid;
  gap: 10px;
  padding: 0 0 0;
}

.status-node {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #111d31;
  color: var(--muted);
  font-weight: 800;
  box-shadow: 0 0 0 6px rgba(7, 15, 28, 0.96);
}

.status-step.ok .status-node {
  border-color: rgba(125, 232, 202, 0.65);
  background: linear-gradient(135deg, #7de8ca, #bfffe9);
  color: #03241a;
}

.status-step.running .status-node {
  border-color: rgba(138, 180, 255, 0.75);
  background: linear-gradient(135deg, #8ab4ff, #c8d8ff);
  color: #07142a;
}

.status-step.skip .status-node,
.status-step.waiting .status-node {
  border-color: rgba(255, 202, 128, 0.65);
  background: linear-gradient(135deg, #ffd08a, #ffe5bf);
  color: #332000;
}

.status-step.fail .status-node {
  border-color: rgba(255, 110, 126, 0.75);
  background: linear-gradient(135deg, #ff6e7e, #ffc3c9);
  color: #3a0710;
}

.status-step-body {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-panel-strong);
}

.status-step-body h4 {
  margin-bottom: 6px;
  font-size: 0.96rem;
}

.status-step-body p {
  margin-bottom: 8px;
  color: var(--muted-strong);
  line-height: 1.5;
}

.status-step-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.metric-value {
  margin: 14px 0 8px;
  font-size: clamp(2.1rem, 2.8vw, 3.2rem);
  font-weight: 700;
  letter-spacing: 0;
}

.metric-subtext {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.badge,
.timestamp-pill {
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
}

.decision.trade {
  background: linear-gradient(135deg, var(--accent), #bfffe9);
  color: #03241a;
}

.decision.hold {
  background: linear-gradient(135deg, var(--accent-2), #ffe2b8);
  color: #332000;
}

.analytics-grid {
  grid-template-columns: 1.05fr 1fr 1fr;
  margin-top: 20px;
}

.panel {
  border-radius: var(--radius-lg);
  padding: 24px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-header-top {
  margin-bottom: 18px;
}

.panel h2 {
  margin-bottom: 0;
  font-size: 1.25rem;
  letter-spacing: 0;
}

.panel h3 {
  margin-bottom: 0;
  font-size: 1rem;
  letter-spacing: 0;
}

.donut-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.donut-shell {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto;
}

.donut-chart {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(var(--accent) 0deg, rgba(255, 255, 255, 0.08) 0deg);
  border: 1px solid var(--line);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.donut-chart::after {
  content: "";
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(8, 21, 40, 0.96), rgba(10, 18, 31, 0.96));
  border: 1px solid var(--line);
}

.donut-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  z-index: 1;
}

.donut-center strong {
  font-size: 1.8rem;
  letter-spacing: 0;
}

.donut-center span {
  color: var(--muted);
}

.legend-stack,
.bar-metrics,
.flow-stack,
.card-stack,
.source-list,
.radar-grid,
.performance-grid,
.control-stack {
  display: grid;
  gap: 12px;
}

.research-assist {
  display: grid;
  gap: 14px;
}

.scan-overview-grid {
  display: grid;
  gap: 14px;
}

.scan-overview-hero {
  display: grid;
  gap: 10px;
}

.scan-overview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.scan-overview-head h3 {
  margin: 0;
}

.scan-overview-note {
  color: var(--muted);
  line-height: 1.55;
}

.scan-overview-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.scan-overview-metric {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  padding: 12px;
  display: grid;
  gap: 5px;
}

.scan-overview-metric span {
  color: var(--muted);
  font-size: 0.82rem;
}

.scan-overview-metric strong {
  font-size: 1rem;
  line-height: 1.4;
}

.scan-overview-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.scan-overview-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.035);
  padding: 12px;
  display: grid;
  gap: 8px;
}

.scan-overview-card h4 {
  margin: 0;
  font-size: 0.95rem;
}

.scan-overview-card p,
.scan-overview-card li {
  color: var(--muted);
  line-height: 1.5;
}

.scan-overview-card ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.scan-overview-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.scan-overview-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  font-size: 0.82rem;
}

.research-assist-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.research-context-preview {
  margin: 0;
  min-height: 220px;
  max-height: 360px;
  overflow: auto;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: #071121;
  color: #b9c8e6;
  line-height: 1.55;
  font-family: "Google Sans Text", "Segoe UI", sans-serif;
  white-space: pre-wrap;
  word-break: break-word;
}

.starter-json-box {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(9, 17, 32, 0.72);
  overflow: hidden;
}

.starter-json-box summary {
  cursor: pointer;
  padding: 14px 16px;
  color: var(--muted-strong);
  font-weight: 700;
  user-select: none;
}

.starter-json-box[open] summary {
  border-bottom: 1px solid var(--line);
}

.starter-json-preview {
  min-height: 180px;
  max-height: 320px;
  border: 0;
  border-radius: 0;
}

.manual-research-box {
  display: grid;
  gap: 10px;
}

.assistant-label {
  color: var(--muted-strong);
  font-size: 0.92rem;
  font-weight: 700;
}

.manual-research-input {
  width: 100%;
  min-height: 220px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #071121;
  color: var(--text);
  font: inherit;
  line-height: 1.55;
  resize: vertical;
}

.manual-research-input:focus {
  outline: 2px solid rgba(125, 232, 202, 0.35);
  outline-offset: 0;
  border-color: rgba(125, 232, 202, 0.45);
}

.manual-research-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.legend-item,
.bar-card,
.flow-item,
.idea-card,
.position-card,
.mini-card,
.radar-card,
.source-card,
.subpanel {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--bg-panel-strong);
  border-radius: var(--radius-md);
}

.legend-item,
.bar-card,
.flow-item,
.idea-card,
.position-card,
.mini-card,
.radar-card,
.source-card,
.subpanel {
  padding: 16px;
}

.radar-card.hot-radar {
  border-color: rgba(255, 202, 128, 0.35);
  background:
    linear-gradient(135deg, rgba(255, 202, 128, 0.08), rgba(255, 255, 255, 0.03)),
    var(--bg-panel-strong);
}

.legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.legend-label {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted-strong);
}

.lede,
.metric-subtext,
.status-line strong,
.flow-item p,
.idea-card p,
.position-card p,
.mini-card p,
.source-card p,
.radar-card p,
.review-note,
.modal-section p,
.source-domain,
.source-url,
.empty {
  overflow-wrap: anywhere;
}

.swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.bar-card {
  display: grid;
  gap: 10px;
}

.bar-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.bar-head strong {
  font-size: 0.95rem;
}

.bar-head span {
  color: var(--muted);
  font-size: 0.88rem;
}

.bar-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-3), var(--accent));
}

.flow-item {
  position: relative;
  padding-left: 20px;
}

.flow-item::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 20px;
  bottom: -12px;
  width: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.flow-item:last-child::before {
  display: none;
}

.flow-dot {
  position: absolute;
  left: 0;
  top: 18px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.08);
}

.flow-item.ok .flow-dot {
  background: var(--success);
}

.flow-item.fail .flow-dot {
  background: var(--danger);
}

.flow-item.skip .flow-dot {
  background: var(--warning);
}

.flow-item h4,
.idea-card h4,
.position-card h4,
.mini-card h4,
.source-card h4,
.radar-card h4 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.flow-item p,
.idea-card p,
.position-card p,
.mini-card p,
.source-card p,
.radar-card p,
.review-note,
.modal-section p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.position-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

.main-grid {
  grid-template-columns: 1.4fr 1fr;
  margin-top: 20px;
}

.spotlight,
.wide-panel {
  grid-column: 1 / -1;
}

.market-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric-box {
  min-height: 108px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
    rgba(16, 28, 53, 0.94);
}

.metric-box span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.84rem;
}

.metric-box strong {
  display: block;
  font-size: 1rem;
  line-height: 1.5;
}

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

.span-2 {
  grid-column: 1 / -1;
}

.pulse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.pulse-card {
  appearance: none;
  text-align: left;
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.pulse-card:hover {
  transform: translateY(-1px);
}

.pulse-card.active {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.pulse-card strong {
  font-size: 1.2rem;
  color: var(--text);
}

.pulse-card span {
  color: var(--muted);
  font-size: 0.82rem;
}

.pulse-card em {
  color: var(--muted-strong);
  font-size: 0.84rem;
  font-style: normal;
}

.pulse-card.ready {
  border-color: rgba(125, 232, 202, 0.24);
  background: rgba(125, 232, 202, 0.08);
}

.pulse-card.waiting {
  border-color: rgba(255, 202, 128, 0.24);
  background: rgba(255, 202, 128, 0.08);
}

.pulse-card.blocked,
.pulse-card.expired {
  border-color: rgba(255, 136, 136, 0.22);
  background: rgba(255, 136, 136, 0.07);
}

.pulse-card.watchlist {
  border-color: rgba(126, 187, 255, 0.22);
  background: rgba(126, 187, 255, 0.08);
}

.funnel-grid {
  display: grid;
  gap: 14px;
}

.funnel-section {
  display: grid;
  gap: 12px;
}

.funnel-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.funnel-metric {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(7, 17, 33, 0.72);
  padding: 12px;
  display: grid;
  gap: 6px;
}

.funnel-metric span,
.funnel-card small,
.funnel-run-meta,
.funnel-run-note {
  color: var(--muted);
}

.funnel-metric strong {
  font-size: 1.15rem;
}

.funnel-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.funnel-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(7, 17, 33, 0.82);
  padding: 12px;
  display: grid;
  gap: 6px;
}

.funnel-card h4,
.funnel-run h4 {
  margin: 0;
  font-size: 0.98rem;
}

.funnel-card strong {
  font-size: 1.1rem;
}

.funnel-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.funnel-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  font-size: 0.78rem;
}

.funnel-card.ready {
  border-color: rgba(125, 232, 202, 0.24);
}

.funnel-card.waiting {
  border-color: rgba(255, 202, 128, 0.24);
}

.funnel-card.blocked {
  border-color: rgba(255, 136, 136, 0.22);
}

.funnel-run-list {
  display: grid;
  gap: 10px;
}

.funnel-run {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(7, 17, 33, 0.72);
  padding: 12px;
  display: grid;
  gap: 6px;
}

.content-grid.tight {
  gap: 16px;
}

.subpanel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.subpanel-meta {
  color: var(--muted);
  font-size: 0.84rem;
}

.idea-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.idea-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted-strong);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.idea-filter-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(125, 232, 202, 0.28);
}

.idea-filter-btn.active {
  border-color: rgba(125, 232, 202, 0.32);
  background: rgba(125, 232, 202, 0.12);
  color: #e6fff8;
}

.idea-filter-btn .count {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 0.76rem;
}

.filtered-hidden {
  display: none;
}

.insight-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
  color: var(--muted-strong);
  line-height: 1.6;
}

.alert-banner {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 177, 110, 0.22);
  background: linear-gradient(135deg, rgba(83, 43, 18, 0.98), rgba(160, 83, 29, 0.74));
  color: #fff1dd;
  font-weight: 500;
  line-height: 1.6;
}

.alert-banner.hidden {
  display: none;
}

.health-readiness-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 18px;
}

.health-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.health-card {
  min-width: 0;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
}

.health-card span,
.health-summary span,
.readiness-meta span,
.idea-readiness span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

.health-card strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.4;
  word-break: break-word;
}

.health-card.ok,
.health-summary.ok {
  border-color: rgba(125, 232, 202, 0.28);
}

.health-card.warning,
.health-card.waiting,
.health-summary.warning {
  border-color: rgba(255, 202, 128, 0.34);
}

.health-card.manual,
.health-summary.manual {
  border-color: rgba(146, 182, 255, 0.34);
}

.health-issues {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.health-summary {
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
}

.health-summary strong {
  display: block;
  margin-bottom: 4px;
}

.health-summary p {
  margin-top: 8px;
}

.health-issue-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted-strong);
  line-height: 1.6;
}

.readiness-stack {
  display: grid;
  gap: 10px;
}

.readiness-card {
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
}

.readiness-card.ready {
  border-color: rgba(125, 232, 202, 0.36);
  background: rgba(125, 232, 202, 0.07);
}

.readiness-card.waiting {
  border-color: rgba(255, 202, 128, 0.36);
  background: rgba(255, 202, 128, 0.06);
}

.readiness-card.blocked {
  border-color: rgba(255, 136, 136, 0.28);
  background: rgba(255, 136, 136, 0.055);
}

.readiness-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.readiness-top h4 {
  margin: 0 0 6px;
}

.readiness-top p {
  margin: 0;
}

.readiness-badge {
  flex: 0 0 auto;
  align-self: flex-start;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 800;
}

.readiness-badge.ready {
  border-color: rgba(125, 232, 202, 0.42);
  color: #d8fff3;
}

.readiness-badge.waiting {
  border-color: rgba(255, 202, 128, 0.42);
  color: #ffe6bf;
}

.readiness-badge.blocked {
  border-color: rgba(255, 136, 136, 0.38);
  color: #ffd6d6;
}

.readiness-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.readiness-meta span {
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
}

.idea-card,
.position-card,
.mini-card {
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.idea-card:hover,
.radar-card:hover {
  transform: translateY(-2px);
  border-color: rgba(125, 232, 202, 0.32);
}

.idea-card-action {
  cursor: pointer;
}

.idea-card-action:focus-visible {
  outline: 2px solid rgba(125, 232, 202, 0.45);
  outline-offset: 3px;
}

.idea-narrative {
  color: var(--muted-strong);
}

.idea-tags {
  margin-top: 10px;
}

.idea-readiness {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
}

.idea-readiness.ready {
  border-color: rgba(125, 232, 202, 0.34);
}

.idea-readiness.waiting {
  border-color: rgba(255, 202, 128, 0.34);
}

.idea-readiness.blocked {
  border-color: rgba(255, 136, 136, 0.28);
}

.idea-readiness strong {
  color: var(--muted-strong);
  font-size: 0.88rem;
  line-height: 1.45;
}

.idea-readiness-note {
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--muted);
}

.idea-readiness-note.ready {
  color: #9be7cf;
}

.idea-readiness-note.blocked {
  color: #ffb0b0;
}

.idea-link,
.radar-link {
  all: unset;
  display: block;
  cursor: pointer;
}

.idea-link-card {
  display: grid;
  gap: 10px;
  width: 100%;
}

.idea-link h4,
.radar-link h4 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.idea-cta {
  margin-top: 4px;
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 700;
}

.badge-inline {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.badge-inline.watchlist {
  border-color: rgba(255, 202, 128, 0.28);
  background: rgba(255, 202, 128, 0.12);
  color: #ffe5bf;
}

.badge-inline.expired {
  border-color: rgba(255, 136, 136, 0.24);
  background: rgba(255, 136, 136, 0.1);
  color: #ffd7d7;
}

.idea-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.idea-meta-row span {
  padding: 6px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted-strong);
  font-size: 0.8rem;
  font-weight: 700;
}

.actionability-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.actionability-pill {
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(125, 232, 202, 0.2);
  background: rgba(125, 232, 202, 0.08);
  color: #e2fff7;
  font-size: 0.8rem;
  font-weight: 800;
}

.actionability-pill.soft {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted-strong);
}

.watchlist-card {
  border-color: rgba(255, 202, 128, 0.16);
  background: linear-gradient(145deg, rgba(255, 202, 128, 0.08), rgba(255, 255, 255, 0.03));
}

.expired-card {
  border-color: rgba(255, 136, 136, 0.18);
  background: linear-gradient(145deg, rgba(255, 136, 136, 0.08), rgba(255, 255, 255, 0.03));
}

.watchlist-card:hover {
  border-color: rgba(255, 202, 128, 0.34);
}

.expired-card:hover {
  border-color: rgba(255, 136, 136, 0.34);
}

.outcome-label {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
}

.watchlist-card .idea-cta {
  color: #ffd79d;
}

.watchlist-reason {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(255, 202, 128, 0.24);
  background: rgba(255, 202, 128, 0.05);
  color: #ffe5bf;
  font-size: 0.88rem;
  line-height: 1.5;
}

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

.radar-single-column {
  grid-template-columns: 1fr;
  max-height: 980px;
  overflow: auto;
  padding-right: 6px;
}

.radar-single-column::-webkit-scrollbar {
  width: 10px;
}

.radar-single-column::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

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

.source-card {
  display: grid;
  gap: 12px;
}

.source-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.source-domain {
  color: var(--muted-strong);
}

.source-url {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.source-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(125, 232, 202, 0.12);
  border: 1px solid rgba(125, 232, 202, 0.18);
  color: #d9fff3;
  text-decoration: none;
  font-weight: 700;
}

.source-link:hover {
  background: rgba(125, 232, 202, 0.18);
}

.source-summary {
  grid-column: 1 / -1;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.88rem;
  line-height: 1.5;
}

.performance-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.performance-drilldown {
  grid-column: 1 / -1;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(125, 232, 202, 0.18);
  background: linear-gradient(135deg, rgba(125, 232, 202, 0.08), rgba(146, 182, 255, 0.05));
}

.performance-drilldown span {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.performance-drilldown strong {
  display: block;
  color: var(--muted-strong);
  font-size: 0.95rem;
  line-height: 1.6;
}

.performance-card {
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--bg-panel-strong);
}

.performance-card span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.82rem;
}

.performance-card strong {
  display: block;
  font-size: 1.45rem;
  letter-spacing: 0;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted-strong);
  font-size: 0.8rem;
  font-weight: 500;
}

.control-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.control-buttons-secondary {
  grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, 1fr));
}

.control-ticket-input {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
}

.control-ticket-input span {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.03em;
}

.control-ticket-input input {
  width: 100%;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid rgba(148, 174, 220, 0.26);
  background: rgba(7, 18, 36, 0.82);
  color: var(--text);
  font: inherit;
}

.control-ticket-input input:focus {
  outline: 2px solid rgba(255, 206, 96, 0.34);
  border-color: rgba(255, 206, 96, 0.52);
}

.range-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.range-btn {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 8px 12px;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

.range-btn.active {
  color: #04131d;
  background: linear-gradient(135deg, var(--accent), #d3fff4);
}

.control-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  white-space: normal;
  cursor: pointer;
}

.control-btn:hover {
  background: rgba(255, 255, 255, 0.11);
}

.control-btn.success {
  border-color: rgba(150, 241, 168, 0.24);
  background: rgba(150, 241, 168, 0.10);
}

.control-btn.warning {
  border-color: rgba(255, 187, 116, 0.24);
  background: rgba(255, 187, 116, 0.10);
}

.control-btn.danger {
  border-color: rgba(255, 128, 128, 0.3);
  background: rgba(255, 110, 126, 0.13);
}

.control-btn.panic {
  color: #3b2100;
  border-color: rgba(255, 207, 96, 0.78);
  background: linear-gradient(135deg, rgba(255, 232, 133, 0.96), rgba(255, 186, 76, 0.94));
}

.control-btn.panic .btn-icon {
  background: rgba(59, 33, 0, 0.12);
  color: #3b2100;
}

.control-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  color: var(--muted-strong);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.has-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  transform: translateX(-50%) translateY(4px);
  width: min(280px, 80vw);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(8, 16, 31, 0.98);
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
  box-shadow: var(--shadow);
  z-index: 5;
}

.has-tooltip:hover::after,
.has-tooltip:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.control-note {
  color: var(--muted);
  margin-bottom: 0;
}

.public-mode-banner {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 202, 128, 0.22);
  background: rgba(255, 202, 128, 0.08);
  color: #ffe6bf;
}

.chart-box {
  position: relative;
  min-height: 220px;
  padding: 10px 0 0;
}

.chart-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.8rem;
}

.line-chart {
  width: 100%;
  height: 220px;
  display: block;
}

.line-chart .line-point {
  fill: #dff7ff;
  stroke: #7de8ca;
  stroke-width: 1.5;
  cursor: pointer;
}

.chart-axis-labels {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.8rem;
}

.bar-chart {
  display: grid;
  gap: 12px;
}

.bar-chart-row {
  display: grid;
  gap: 8px;
  cursor: pointer;
}

.bar-chart-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.86rem;
  color: var(--muted-strong);
}

.profit.positive {
  color: var(--success);
}

.profit.negative {
  color: var(--danger);
}

.table-wrap {
  overflow-x: auto;
}

.table-action {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 8px 12px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.table-action:hover {
  background: rgba(255, 255, 255, 0.12);
}

.note-preview {
  display: block;
  max-width: 220px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
  white-space: normal;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

th,
td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--muted);
  font-weight: 500;
}

.weekly-review {
  display: grid;
  gap: 16px;
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.review-list {
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--bg-panel-strong);
}

.review-list ul {
  margin: 10px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.log-view {
  margin: 0;
  min-height: 240px;
  max-height: 360px;
  overflow: auto;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: #071121;
  color: #b9c8e6;
  line-height: 1.55;
  font-family: "Google Sans Text", "Segoe UI", sans-serif;
  white-space: pre-wrap;
  word-break: break-word;
}

.empty {
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--line-strong);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(4, 10, 17, 0.68);
  backdrop-filter: blur(12px);
}

.modal-overlay.hidden {
  display: none;
}

.modal-card {
  width: min(1180px, 100%);
  max-height: 88vh;
  overflow: auto;
  padding: 24px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(18, 37, 68, 0.96), rgba(8, 16, 31, 0.98)),
    rgba(15, 29, 54, 0.96);
  box-shadow: var(--shadow);
}

.modal-close {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  padding: 10px 16px;
  font-family: inherit;
  cursor: pointer;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.14);
}

.modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.modal-section {
  margin-top: 14px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.modal-section h4 {
  margin-bottom: 10px;
}

.trade-chart-section {
  background:
    linear-gradient(135deg, rgba(120, 175, 255, 0.08), rgba(101, 214, 172, 0.05)),
    rgba(255, 255, 255, 0.04);
}

.trade-chart-empty {
  display: flex;
  align-items: center;
  gap: 16px;
}

.trade-chart-empty-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  min-height: 68px;
  padding: 12px;
  border-radius: 22px;
  border: 1px solid rgba(125, 184, 255, 0.24);
  background: rgba(125, 184, 255, 0.08);
  color: #dbe7ff;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.trade-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.trade-chart-head p {
  margin-top: 6px;
}

.trade-chart-setup-note {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
}

.trade-chart-setup-note strong {
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.trade-chart-setup-note span {
  color: var(--muted-strong);
  font-size: 0.84rem;
  line-height: 1.5;
}

.trade-chart-setup-note.pullback {
  border-color: rgba(169, 141, 255, 0.26);
  background: rgba(169, 141, 255, 0.08);
}

.trade-chart-setup-note.breakout {
  border-color: rgba(111, 194, 255, 0.26);
  background: rgba(111, 194, 255, 0.08);
}

.trade-chart-setup-note.reclaim {
  border-color: rgba(125, 232, 202, 0.26);
  background: rgba(125, 232, 202, 0.08);
}

.trade-chart-setup-note.earnings_momentum {
  border-color: rgba(255, 184, 108, 0.26);
  background: rgba(255, 184, 108, 0.08);
}

.trade-chart-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.trade-chart-tf,
.trade-chart-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.trade-chart-btn {
  border: 1px solid rgba(148, 176, 221, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted-strong);
  padding: 8px 12px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.trade-chart-btn:hover,
.trade-chart-btn.active {
  background: rgba(125, 184, 255, 0.14);
  border-color: rgba(125, 184, 255, 0.42);
  color: #e6efff;
  transform: translateY(-1px);
}

.trade-chart-btn-strong {
  background: rgba(111, 229, 163, 0.12);
  border-color: rgba(111, 229, 163, 0.36);
}

.trade-chart-stage {
  position: relative;
  min-height: 420px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(148, 176, 221, 0.16);
  background:
    radial-gradient(circle at top, rgba(123, 170, 255, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(8, 18, 33, 0.96), rgba(6, 12, 24, 1));
}

.trade-chart-stage:fullscreen {
  min-height: 100vh;
  padding: 18px;
  background:
    radial-gradient(circle at top, rgba(123, 170, 255, 0.14), transparent 42%),
    linear-gradient(180deg, rgba(8, 18, 33, 1), rgba(6, 12, 24, 1));
}

.trade-chart-canvas {
  width: 100%;
  height: 420px;
}

.trade-chart-canvas .tradingview-widget-container,
.trade-chart-canvas .tradingview-widget-container__widget {
  width: 100%;
  height: 100%;
}

.trade-chart-canvas .tradingview-widget-container {
  position: relative;
}

.trade-chart-canvas .tradingview-widget-copyright {
  position: absolute;
  right: 14px;
  bottom: 10px;
  z-index: 2;
  display: inline-flex;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(7, 17, 29, 0.82);
  border: 1px solid rgba(148, 176, 221, 0.18);
  font-size: 0.72rem;
  color: var(--muted);
  backdrop-filter: blur(8px);
}

.trade-chart-canvas .tradingview-widget-copyright a {
  color: #b9d7ff;
  text-decoration: none;
}

.trade-chart-widget-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
  color: var(--muted-strong);
}

.trade-chart-widget-fallback strong {
  font-size: 1rem;
}

.trade-chart-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.trade-chart-zone-overlay {
  position: absolute;
  left: 14px;
  right: 14px;
  min-height: 18px;
  border-top: 1px dashed rgba(255, 210, 112, 0.85);
  border-bottom: 1px dashed rgba(255, 210, 112, 0.85);
  background: linear-gradient(180deg, rgba(255, 210, 112, 0.2), rgba(255, 210, 112, 0.08));
  box-shadow: inset 0 0 0 1px rgba(255, 210, 112, 0.18);
}

.trade-chart-zone-label {
  position: absolute;
  left: 12px;
  top: 8px;
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 210, 112, 0.18);
  border: 1px solid rgba(255, 210, 112, 0.28);
  color: #ffe7b0;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  backdrop-filter: blur(6px);
}

.trade-chart-level {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 0;
  border-top: 2px solid rgba(255, 255, 255, 0.18);
}

.trade-chart-level::after {
  content: "";
  position: absolute;
  inset: -1px 0 auto 0;
  border-top: 1px dashed currentColor;
  opacity: 0.9;
}

.trade-chart-level-label {
  position: absolute;
  right: 0;
  top: -14px;
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid currentColor;
  background: rgba(7, 17, 29, 0.88);
  color: inherit;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  backdrop-filter: blur(8px);
}

.trade-chart-level-stop {
  color: #ff8f8f;
}

.trade-chart-level-target {
  color: #75e0a7;
}

.trade-chart-level-current {
  color: #87bcff;
}

.trade-chart-level-setup {
  color: #b99aff;
}

.trade-chart-stage:fullscreen .trade-chart-canvas {
  height: calc(100vh - 36px);
}

.trade-chart-stage:fullscreen .trade-chart-canvas .tradingview-widget-copyright {
  right: 22px;
  bottom: 18px;
}

.trade-chart-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.trade-chart-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 0.78rem;
}

.trade-map-section {
  background:
    linear-gradient(135deg, rgba(146, 182, 255, 0.08), rgba(125, 232, 202, 0.06)),
    rgba(255, 255, 255, 0.04);
}

.trade-map-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.trade-map-head p {
  margin-top: 6px;
}

.trade-map-badge {
  flex: 0 0 auto;
  padding: 8px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.78rem;
  font-weight: 800;
}

.trade-map-badge.live {
  border-color: rgba(138, 180, 255, 0.42);
  background: rgba(138, 180, 255, 0.12);
  color: #dce8ff;
}

.trade-map-badge.muted {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
}

.trade-map-badge.breakout {
  border-color: rgba(111, 194, 255, 0.42);
}

.trade-map-badge.reclaim {
  border-color: rgba(125, 232, 202, 0.42);
}

.trade-map-badge.pullback {
  border-color: rgba(169, 141, 255, 0.42);
}

.trade-map-badge.earnings_momentum {
  border-color: rgba(255, 184, 108, 0.42);
}

.trade-map-chart {
  position: relative;
  min-height: 132px;
  margin-bottom: 12px;
  padding: 24px 8px 0;
}

.trade-map-rail {
  position: absolute;
  left: 4%;
  right: 4%;
  top: 72px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 136, 136, 0.2), rgba(138, 180, 255, 0.24), rgba(150, 241, 168, 0.2));
}

.trade-map-zone {
  position: absolute;
  top: 60px;
  height: 32px;
  min-width: 24px;
  border-radius: 999px;
  border: 1px solid rgba(255, 203, 127, 0.4);
  background: linear-gradient(135deg, rgba(255, 203, 127, 0.24), rgba(255, 203, 127, 0.1));
}

.trade-map-zone-label {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  color: #ffe7bf;
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.trade-map-marker {
  position: absolute;
  top: 24px;
  transform: translateX(-50%);
}

.trade-map-dot {
  position: absolute;
  left: 50%;
  top: 42px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  transform: translateX(-50%);
  border: 2px solid rgba(7, 17, 30, 0.95);
}

.trade-map-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50px;
  width: 2px;
  height: 32px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.18);
}

.trade-map-marker.stop .trade-map-dot {
  background: var(--danger);
}

.trade-map-marker.target .trade-map-dot {
  background: var(--success);
}

.trade-map-marker.current .trade-map-dot {
  background: var(--accent-3);
}

.trade-map-label {
  display: inline-block;
  min-width: 96px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 16, 31, 0.94);
  color: var(--muted-strong);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  white-space: nowrap;
}

.trade-map-marker.stop .trade-map-label {
  margin-top: 88px;
}

.trade-map-marker.target .trade-map-label,
.trade-map-marker.current .trade-map-label {
  margin-bottom: 0;
}

.trade-map-scale {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.78rem;
}

.trade-map-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.trade-map-stat {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.trade-map-stat span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.78rem;
}

.trade-map-stat strong {
  display: block;
  color: var(--muted-strong);
  font-size: 0.9rem;
  line-height: 1.45;
}

.modal-textarea {
  width: 100%;
  min-height: 140px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 14px 16px;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.6;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.primary-btn,
.secondary-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 16px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.primary-btn {
  background: linear-gradient(135deg, var(--accent), #d7fff2);
  color: #032212;
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.chart-tooltip {
  position: fixed;
  z-index: 60;
  max-width: 280px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(8, 16, 31, 0.96);
  color: var(--text);
  box-shadow: var(--shadow);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -8px);
  transition: opacity 120ms ease;
}

.chart-tooltip.visible {
  opacity: 1;
}

.chart-tooltip strong {
  display: block;
  margin-bottom: 4px;
}

.modal-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  display: grid;
  gap: 8px;
}

@media (max-width: 1280px) {
  .summary-grid,
  .ops-readiness-grid,
  .analytics-grid,
  .main-grid,
  .market-grid,
  .content-grid,
  .health-readiness-grid,
  .review-grid,
  .view-tab-row,
  .source-list,
  .radar-grid,
  .performance-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .status-pill {
    justify-self: start;
  }
}

@media (max-width: 880px) {
  .shell {
    width: min(100% - 18px, 100%);
  }

  .summary-grid,
  .ops-readiness-grid,
  .analytics-grid,
  .main-grid,
  .market-grid,
  .content-grid,
  .health-readiness-grid,
  .health-card-grid,
  .review-grid,
  .view-tab-row,
  .source-list,
  .radar-grid,
  .performance-grid,
  .modal-grid {
    grid-template-columns: 1fr;
  }

  .donut-layout {
    grid-template-columns: 1fr;
  }

  .hero,
  .metric-panel,
  .panel,
  .modal-card {
    padding: 18px;
  }

  h1 {
    font-size: clamp(2.1rem, 10vw, 3rem);
    line-height: 1.04;
  }

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

  .control-buttons-secondary {
    grid-template-columns: 1fr;
  }

  .research-assist-actions {
    grid-template-columns: 1fr;
  }

  .scan-overview-columns {
    grid-template-columns: 1fr;
  }

  .work-status-summary {
    display: grid;
  }

  .work-status-next {
    min-width: 0;
  }

  .linear-status {
    grid-template-columns: 1fr;
  }

  .linear-status::before {
    left: 22px;
    right: auto;
    top: 12px;
    bottom: 12px;
    width: 2px;
    height: auto;
  }

  .status-step {
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: start;
  }

  .readiness-top {
    display: grid;
  }

  .readiness-badge {
    justify-self: start;
  }

  .incident-item {
    grid-template-columns: 1fr;
  }

  .trade-chart-head,
  .trade-chart-actions {
    display: grid;
  }

  .trade-chart-actions {
    align-items: stretch;
  }

  .trade-chart-tf,
  .trade-chart-toolbar {
    justify-content: flex-start;
  }

  .trade-chart-stage {
    min-height: 360px;
  }

  .trade-chart-canvas {
    height: 360px;
  }
}

@media (max-width: 460px) {
  .control-buttons {
    grid-template-columns: 1fr;
  }

  .trade-chart-stage {
    min-height: 300px;
  }

  .trade-chart-canvas {
    height: 300px;
  }

  .trade-chart-meta {
    display: grid;
  }
}

html {
  scroll-padding-top: 120px;
}

.shell {
  padding-top: 18px;
}

.topbar {
  position: sticky;
  top: 16px;
  z-index: 24;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 14px 18px;
  border: 1px solid rgba(157, 180, 217, 0.18);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(8, 18, 32, 0.9), rgba(10, 23, 43, 0.82)),
    rgba(7, 17, 30, 0.78);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, #7de8ca, #9fd0ff);
  color: #07212a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.brand-mark svg,
.nav-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.brand-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.brand-overline {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.brand-name {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.35;
}

.topbar-nav {
  display: flex;
  justify-content: center;
  flex: 1 1 440px;
  flex-wrap: wrap;
  gap: 10px;
}

.topbar-link {
  min-height: 50px;
  padding: 10px 14px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.nav-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.09);
  color: var(--muted-strong);
}

.topbar-side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.topbar-chip {
  display: inline-flex;
  align-items: center;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(125, 232, 202, 0.24);
  background: rgba(125, 232, 202, 0.08);
  color: #d8fff3;
  font-size: 0.82rem;
  font-weight: 700;
}

.utility-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(157, 180, 217, 0.2);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  padding: 11px 14px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.utility-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(125, 232, 202, 0.3);
  background: rgba(125, 232, 202, 0.08);
}

.utility-btn-inline {
  padding: 9px 12px;
  font-size: 0.84rem;
}

.hero {
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -120px -120px auto;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(157, 208, 255, 0.2), transparent 65%);
  pointer-events: none;
}

.hero-copy {
  display: grid;
  gap: 16px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.summary-grid .metric-panel {
  position: relative;
  overflow: hidden;
  padding-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
    var(--bg-panel);
}

.summary-grid .metric-panel::before,
.summary-grid .metric-panel::after {
  position: absolute;
  right: 18px;
  top: 18px;
}

.summary-grid .metric-panel::before {
  content: "";
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
}

.summary-grid .metric-panel::after {
  top: 30px;
  right: 28px;
  color: var(--muted-strong);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.summary-grid .metric-panel:nth-child(1)::after {
  content: "PF";
}

.summary-grid .metric-panel:nth-child(2)::after {
  content: "TR";
}

.summary-grid .metric-panel:nth-child(3)::after {
  content: "AI";
}

.summary-grid .metric-panel:nth-child(4)::after {
  content: "WK";
}

.summary-grid .metric-panel:nth-child(1)::before {
  background: rgba(146, 182, 255, 0.12);
}

.summary-grid .metric-panel:nth-child(2)::before {
  background: rgba(125, 232, 202, 0.12);
}

.summary-grid .metric-panel:nth-child(3)::before {
  background: rgba(255, 203, 127, 0.12);
}

.summary-grid .metric-panel:nth-child(4)::before {
  background: rgba(255, 255, 255, 0.08);
}

.summary-grid .badge,
.summary-grid .status-pill {
  width: fit-content;
}

.view-switcher {
  background:
    linear-gradient(135deg, rgba(19, 36, 66, 0.94), rgba(7, 18, 34, 0.9)),
    var(--bg-panel);
}

.view-tab-row {
  gap: 14px;
}

#workspace-panel .view-tab-row {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

#workspace-panel .view-tab {
  position: relative;
  justify-content: flex-start;
  align-items: center;
  min-height: 92px;
  padding: 18px 18px 18px 72px;
  border-radius: 22px;
  text-align: left;
  font-size: 1rem;
  white-space: normal;
}

#workspace-panel .view-tab::before,
#workspace-panel .view-tab::after {
  position: absolute;
}

#workspace-panel .view-tab::before {
  content: "";
  left: 18px;
  top: 18px;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

#workspace-panel .view-tab::after {
  left: 28px;
  top: 31px;
  color: var(--muted-strong);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

#workspace-panel .view-tab[data-view="overview"]::after {
  content: "OV";
}

#workspace-panel .view-tab[data-view="research"]::after {
  content: "AI";
}

#workspace-panel .view-tab[data-view="ideas"]::after {
  content: "ID";
}

#workspace-panel .view-tab[data-view="control"]::after {
  content: "CT";
}

#workspace-panel .view-tab[data-view="trading"]::after {
  content: "TR";
}

#workspace-panel .view-tab[data-view="analytics"]::after {
  content: "AN";
}

#workspace-panel .view-tab.active::before {
  background: linear-gradient(135deg, rgba(125, 232, 202, 0.22), rgba(146, 182, 255, 0.22));
  border-color: rgba(125, 232, 202, 0.28);
}

#workspace-panel .view-tab[data-view="overview"].active::before {
  background: linear-gradient(135deg, rgba(81, 149, 255, 0.24), rgba(126, 194, 255, 0.2));
  border-color: rgba(106, 170, 255, 0.34);
}

#workspace-panel .view-tab[data-view="research"].active::before {
  background: linear-gradient(135deg, rgba(100, 222, 193, 0.24), rgba(84, 175, 222, 0.2));
  border-color: rgba(100, 222, 193, 0.34);
}

#workspace-panel .view-tab[data-view="ideas"].active::before {
  background: linear-gradient(135deg, rgba(255, 228, 122, 0.3), rgba(255, 191, 72, 0.24));
  border-color: rgba(255, 209, 86, 0.46);
}

#workspace-panel .view-tab[data-view="control"].active::before {
  background: linear-gradient(135deg, rgba(255, 236, 146, 0.32), rgba(255, 200, 82, 0.28));
  border-color: rgba(255, 214, 98, 0.52);
}

#workspace-panel .view-tab[data-view="trading"].active::before {
  background: linear-gradient(135deg, rgba(255, 168, 121, 0.25), rgba(255, 126, 126, 0.22));
  border-color: rgba(255, 168, 121, 0.35);
}

#workspace-panel .view-tab[data-view="analytics"].active::before {
  background: linear-gradient(135deg, rgba(160, 184, 255, 0.25), rgba(133, 227, 205, 0.22));
  border-color: rgba(160, 184, 255, 0.35);
}

#workspace-panel .control-note {
  margin-top: 14px;
  color: var(--muted-strong);
  line-height: 1.6;
}

@media (max-width: 1280px) {
  .topbar-nav {
    justify-content: flex-start;
  }
}

@media (max-width: 880px) {
  .topbar {
    top: 10px;
    padding: 14px;
  }

  .topbar-nav,
  .topbar-side {
    width: 100%;
  }

  .topbar-link {
    flex: 1 1 calc(50% - 10px);
    justify-content: center;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  #workspace-panel .view-tab {
    min-height: 82px;
  }
}

@media (max-width: 460px) {
  .topbar-link {
    flex-basis: 100%;
  }

  .topbar-side {
    justify-content: stretch;
  }

  .topbar-side > * {
    width: 100%;
    justify-content: center;
  }

  .trade-map-head,
  .trade-map-summary {
    display: grid;
  }

  .trade-map-summary {
    grid-template-columns: 1fr;
  }

  .trade-map-label {
    min-width: 84px;
    font-size: 0.72rem;
  }
}

body.win95-theme {
  font-family: Tahoma, "MS Sans Serif", "Segoe UI", sans-serif;
  color: #101010;
  background: #008080;
}

body.win95-theme .ambient,
body.win95-theme .grid-overlay {
  display: none;
}

body.win95-theme {
  --bg: #008080;
  --bg-soft: #c0c0c0;
  --bg-panel: #c0c0c0;
  --bg-panel-strong: #c0c0c0;
  --line: #808080;
  --line-strong: #404040;
  --text: #111111;
  --muted: #333333;
  --muted-strong: #111111;
  --accent: #000080;
  --accent-2: #808000;
  --accent-3: #1084d0;
  --danger: #a80000;
  --success: #006600;
  --warning: #7a4f00;
  --shadow: none;
  --radius-xl: 0;
  --radius-lg: 0;
  --radius-md: 0;
  --radius-sm: 0;
}

body.win95-theme .shell {
  width: min(1600px, calc(100% - 20px));
  padding: 12px 0 72px;
}

body.win95-theme .desktop-body {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

body.win95-theme .workspace-area {
  min-width: 0;
  display: grid;
  gap: 16px;
}

body.win95-theme .topbar,
body.win95-theme .navigator-window,
body.win95-theme .hero,
body.win95-theme .panel,
body.win95-theme .metric-panel,
body.win95-theme .subpanel,
body.win95-theme .modal-card,
body.win95-theme .status-line,
body.win95-theme .work-status-next,
body.win95-theme .preflight-summary,
body.win95-theme .preflight-check,
body.win95-theme .incident-item,
body.win95-theme .status-step-body,
body.win95-theme .funnel-metric,
body.win95-theme .funnel-card,
body.win95-theme .funnel-run,
body.win95-theme .control-status,
body.win95-theme .research-context-preview,
body.win95-theme .starter-json-box,
body.win95-theme .manual-research-input,
body.win95-theme .modal-textarea,
body.win95-theme .chart-tooltip,
body.win95-theme .trade-map-stat {
  background: #c0c0c0;
  border: 2px solid;
  border-color: #ffffff #404040 #404040 #ffffff;
  box-shadow: inset -1px -1px 0 #000000, inset 1px 1px 0 #dfdfdf;
  backdrop-filter: none;
  color: #111111;
}

body.win95-theme .topbar {
  position: sticky;
  top: 8px;
  z-index: 40;
  margin-bottom: 16px;
  padding: 44px 14px 14px;
  border-radius: 0;
}

body.win95-theme .topbar::before,
body.win95-theme .window-titlebar,
body.win95-theme .panel-header,
body.win95-theme .subpanel-head {
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #ffffff;
}

body.win95-theme .topbar::before {
  content: "แดชบอร์ด Opus Bot";
  position: absolute;
  left: 2px;
  right: 2px;
  top: 2px;
  height: 28px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

body.win95-theme .window-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px;
  font-size: 0.88rem;
  font-weight: 700;
}

body.win95-theme .window-controls {
  display: inline-flex;
  gap: 4px;
}

body.win95-theme .window-controls span {
  width: 14px;
  height: 14px;
  background: #c0c0c0;
  border: 1px solid;
  border-color: #ffffff #404040 #404040 #ffffff;
  box-shadow: inset -1px -1px 0 #000000, inset 1px 1px 0 #dfdfdf;
}

body.win95-theme .navigator-window {
  position: sticky;
  top: 90px;
  padding: 0;
  overflow: hidden;
}

body.win95-theme .navigator-content {
  display: grid;
  gap: 14px;
  padding: 12px;
}

body.win95-theme .nav-group {
  display: grid;
  gap: 10px;
}

body.win95-theme .nav-group h3 {
  margin: 0;
  font-size: 0.9rem;
  color: #000080;
}

body.win95-theme .nav-guide p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.45;
}

body.win95-theme .navigator-tabs,
body.win95-theme .navigator-links {
  display: grid;
  gap: 8px;
}

body.win95-theme .hero,
body.win95-theme .panel,
body.win95-theme .metric-panel,
body.win95-theme .subpanel,
body.win95-theme .modal-card {
  border-radius: 0;
}

body.win95-theme .hero,
body.win95-theme .panel,
body.win95-theme .metric-panel,
body.win95-theme .subpanel {
  padding: 16px;
}

body.win95-theme .hero {
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 20px;
}

body.win95-theme .hero::after {
  display: none;
}

body.win95-theme .eyebrow,
body.win95-theme .panel-kicker,
body.win95-theme .metric-kicker,
body.win95-theme .brand-overline,
body.win95-theme .status-label,
body.win95-theme .subpanel-meta {
  color: #222222;
  letter-spacing: 0.02em;
}

body.win95-theme .brand-name,
body.win95-theme h1,
body.win95-theme h2,
body.win95-theme h3,
body.win95-theme h4,
body.win95-theme strong,
body.win95-theme .metric-value {
  color: #111111;
}

body.win95-theme h1 {
  font-size: clamp(2rem, 3.4vw, 3rem);
  line-height: 1.08;
}

body.win95-theme .lede,
body.win95-theme .metric-subtext,
body.win95-theme .work-status-summary p,
body.win95-theme .incident-body p,
body.win95-theme .control-note,
body.win95-theme .source-url,
body.win95-theme .empty,
body.win95-theme .funnel-card small,
body.win95-theme .funnel-run-meta,
body.win95-theme .funnel-run-note,
body.win95-theme .trade-map-scale,
body.win95-theme .modal-list {
  color: #2f2f2f;
}

body.win95-theme .topbar-nav {
  justify-content: flex-start;
  gap: 8px;
}

body.win95-theme .brand-lockup {
  min-width: min(100%, 320px);
}

body.win95-theme .brand-mark,
body.win95-theme .nav-icon {
  border-radius: 0;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #ffffff #404040 #404040 #ffffff;
  box-shadow: inset -1px -1px 0 #000000, inset 1px 1px 0 #dfdfdf;
  color: #000080;
}

body.win95-theme .topbar-chip,
body.win95-theme .tag,
body.win95-theme .timestamp-pill,
body.win95-theme .status-pill,
body.win95-theme .badge,
body.win95-theme .chip,
body.win95-theme .funnel-chip,
body.win95-theme .actionability-pill {
  border-radius: 0;
  border: 2px solid;
  border-color: #ffffff #404040 #404040 #ffffff;
  box-shadow: inset -1px -1px 0 #000000, inset 1px 1px 0 #dfdfdf;
  background: #d4d0c8;
  color: #111111;
}

body.win95-theme .status-pill.online,
body.win95-theme .decision.trade,
body.win95-theme .pulse-card.ready,
body.win95-theme .funnel-card.ready,
body.win95-theme .idea-readiness.ready {
  background: #dff5d8;
  color: #111111;
}

body.win95-theme .status-pill.offline,
body.win95-theme .pulse-card.blocked,
body.win95-theme .funnel-card.blocked,
body.win95-theme .idea-readiness.blocked {
  background: #f6d4d4;
  color: #111111;
}

body.win95-theme .decision.hold,
body.win95-theme .pulse-card.waiting,
body.win95-theme .funnel-card.waiting,
body.win95-theme .idea-readiness.waiting,
body.win95-theme .status-chip.waiting,
body.win95-theme .status-chip.skip {
  background: #f7edc7;
  color: #111111;
}

body.win95-theme .view-tab,
body.win95-theme .utility-btn,
body.win95-theme .control-btn,
body.win95-theme .range-btn,
body.win95-theme .primary-btn,
body.win95-theme .secondary-btn,
body.win95-theme .modal-close,
body.win95-theme .nav-shortcut {
  border-radius: 0;
  border: 2px solid;
  border-color: #ffffff #404040 #404040 #ffffff;
  box-shadow: inset -1px -1px 0 #000000, inset 1px 1px 0 #dfdfdf;
  background: #d4d0c8;
  color: #111111;
  transition: none;
}

body.win95-theme .view-tab:hover,
body.win95-theme .utility-btn:hover,
body.win95-theme .control-btn:hover,
body.win95-theme .range-btn:hover,
body.win95-theme .primary-btn:hover,
body.win95-theme .secondary-btn:hover,
body.win95-theme .nav-shortcut:hover {
  transform: none;
  background: #e6e2da;
}

body.win95-theme .view-tab:active,
body.win95-theme .utility-btn:active,
body.win95-theme .control-btn:active,
body.win95-theme .range-btn:active,
body.win95-theme .nav-shortcut:active {
  border-color: #404040 #ffffff #ffffff #404040;
  box-shadow: inset 1px 1px 0 #000000, inset -1px -1px 0 #dfdfdf;
}

body.win95-theme .view-tab.active,
body.win95-theme .range-btn.active {
  background: #b9d2f2;
  border-color: #404040 #ffffff #ffffff #404040;
  box-shadow: inset 1px 1px 0 #000000, inset -1px -1px 0 #dfdfdf;
}

body.win95-theme .navigator-tab,
body.win95-theme .nav-shortcut {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  padding: 10px 12px;
  font-size: 0.88rem;
  font-weight: 700;
}

body.win95-theme .topbar-link {
  min-height: 40px;
  padding: 8px 12px;
}

body.win95-theme .summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.win95-theme .metric-panel {
  gap: 10px;
  min-height: 180px;
  justify-content: space-between;
}

body.win95-theme .summary-grid .metric-panel::before,
body.win95-theme .summary-grid .metric-panel::after {
  display: none;
}

body.win95-theme .view-switcher,
body.win95-theme .work-status-panel,
body.win95-theme .analytics-grid,
body.win95-theme .ops-readiness-grid,
body.win95-theme .main-grid,
body.win95-theme .content-grid,
body.win95-theme .health-readiness-grid {
  margin-top: 0;
}

body.win95-theme .ops-readiness-grid {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}

body.win95-theme .analytics-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.win95-theme .main-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.win95-theme .wide-panel,
body.win95-theme .spotlight {
  grid-column: 1 / -1;
}

body.win95-theme .content-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.win95-theme .content-grid.tight {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.win95-theme .span-2 {
  grid-column: 1 / -1;
}

body.win95-theme .panel-header,
body.win95-theme .subpanel-head {
  margin: -16px -16px 14px;
  padding: 7px 10px;
  border-bottom: 2px solid #808080;
}

body.win95-theme .panel-header h2,
body.win95-theme .subpanel-head h3,
body.win95-theme .panel-header .panel-kicker,
body.win95-theme .subpanel-head .subpanel-meta,
body.win95-theme .panel-header .timestamp-pill {
  color: #ffffff;
}

body.win95-theme .panel-header .timestamp-pill {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: none;
}

body.win95-theme .work-status-summary,
body.win95-theme .hero-actions,
body.win95-theme .hero-tags,
body.win95-theme .topbar-side {
  gap: 10px;
}

body.win95-theme .linear-status::before {
  background: #808080;
}

body.win95-theme .status-node {
  border-radius: 0;
  box-shadow: none;
  background: #d4d0c8;
  color: #111111;
  border: 2px solid;
  border-color: #ffffff #404040 #404040 #ffffff;
}

body.win95-theme .status-step.ok .status-node,
body.win95-theme .status-step.running .status-node,
body.win95-theme .status-step.skip .status-node,
body.win95-theme .status-step.waiting .status-node,
body.win95-theme .status-step.fail .status-node {
  color: #111111;
}

body.win95-theme .donut-chart {
  border: 2px solid;
  border-color: #ffffff #404040 #404040 #ffffff;
  box-shadow: inset -1px -1px 0 #000000, inset 1px 1px 0 #dfdfdf;
}

body.win95-theme .donut-chart::after {
  background: #c0c0c0;
  border: 2px solid;
  border-color: #404040 #ffffff #ffffff #404040;
}

body.win95-theme .table-wrap,
body.win95-theme .log-view,
body.win95-theme .research-context-preview,
body.win95-theme .manual-research-input,
body.win95-theme .chart-box,
body.win95-theme .weekly-review,
body.win95-theme .trade-chart-stage,
body.win95-theme .trade-map {
  background: #ffffff;
  color: #111111;
  border: 2px solid;
  border-color: #404040 #ffffff #ffffff #404040;
  box-shadow: inset 1px 1px 0 #808080, inset -1px -1px 0 #dfdfdf;
}

body.win95-theme .mobile-dock {
  display: none;
}

body.win95-theme .public-mode-banner {
  padding: 10px 12px;
  background: #f7edc7;
  border: 2px solid;
  border-color: #ffffff #404040 #404040 #ffffff;
  box-shadow: inset -1px -1px 0 #000000, inset 1px 1px 0 #dfdfdf;
}

@media (max-width: 1180px) {
  body.win95-theme .desktop-body {
    grid-template-columns: 1fr;
  }

  body.win95-theme .navigator-window {
    position: static;
  }

  body.win95-theme .navigator-tabs,
  body.win95-theme .navigator-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.win95-theme .hero,
  body.win95-theme .analytics-grid,
  body.win95-theme .ops-readiness-grid,
  body.win95-theme .main-grid,
  body.win95-theme .content-grid,
  body.win95-theme .content-grid.tight,
  body.win95-theme .health-readiness-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  body.win95-theme {
    padding-bottom: 84px;
  }

  body.win95-theme .shell {
    width: calc(100% - 12px);
    padding-bottom: 88px;
  }

  body.win95-theme .topbar {
    top: 0;
    padding-top: 40px;
  }

  body.win95-theme .topbar-nav {
    display: none;
  }

  body.win95-theme .brand-lockup,
  body.win95-theme .topbar-side {
    width: 100%;
  }

  body.win95-theme .topbar-side {
    justify-content: flex-start;
  }

  body.win95-theme .navigator-tabs,
  body.win95-theme .navigator-links,
  body.win95-theme .summary-grid {
    grid-template-columns: 1fr;
  }

  body.win95-theme .work-status-summary {
    display: grid;
  }

  body.win95-theme .mobile-dock {
    position: fixed;
    left: 6px;
    right: 6px;
    bottom: 6px;
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    padding: 6px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #404040 #404040 #ffffff;
    box-shadow: inset -1px -1px 0 #000000, inset 1px 1px 0 #dfdfdf;
  }

  body.win95-theme .mobile-dock-btn {
    min-height: 44px;
    padding: 8px 6px;
    font-size: 0.78rem;
  }
}

@media (max-width: 520px) {
  body.win95-theme .hero,
  body.win95-theme .panel,
  body.win95-theme .metric-panel,
  body.win95-theme .subpanel,
  body.win95-theme .modal-card {
    padding: 12px;
  }

  body.win95-theme .panel-header,
  body.win95-theme .subpanel-head {
    margin: -12px -12px 12px;
  }

  body.win95-theme .hero h1 {
    font-size: 1.7rem;
  }

  body.win95-theme .navigator-content {
    padding: 10px;
  }

  body.win95-theme .topbar-side > * {
    width: 100%;
    justify-content: center;
  }
}

/* Modern institutional dashboard overrides */
body {
  background:
    radial-gradient(circle at top left, rgba(63, 119, 255, 0.16), transparent 26%),
    radial-gradient(circle at 88% 10%, rgba(76, 211, 190, 0.14), transparent 22%),
    linear-gradient(160deg, #07111d 0%, #0a1628 35%, #101b31 100%);
}

.ambient-a {
  background: radial-gradient(circle at 10% 0%, rgba(76, 211, 190, 0.12), transparent 34%);
}

.ambient-b {
  background: radial-gradient(circle at 100% 100%, rgba(73, 123, 255, 0.14), transparent 30%);
}

.shell {
  width: min(1600px, calc(100% - 28px));
  padding-top: 18px;
}

.topbar {
  position: sticky;
  top: 14px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  border: 1px solid rgba(151, 176, 221, 0.16);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(12, 22, 40, 0.96), rgba(10, 18, 33, 0.88));
  box-shadow: 0 24px 60px rgba(2, 7, 16, 0.34);
  backdrop-filter: blur(18px);
}

.brand-copy {
  display: grid;
  gap: 4px;
}

.brand-overline {
  color: #8fb4ff;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand-name {
  font-size: 1.02rem;
  color: #f6f8fe;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(102, 166, 255, 0.28);
  background: linear-gradient(135deg, rgba(47, 83, 155, 0.92), rgba(15, 32, 64, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.brand-mark svg {
  width: 24px;
  height: 24px;
  stroke: #d7e5ff;
  stroke-width: 1.7;
  fill: none;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  justify-content: center;
}

.topbar-link,
.mobile-dock-btn,
.utility-btn,
.control-btn,
.range-btn,
.primary-btn,
.secondary-btn,
.table-action,
.modal-close {
  border: 1px solid rgba(148, 174, 220, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.topbar-link {
  min-height: 48px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.topbar-link:hover,
.utility-btn:hover,
.control-btn:hover,
.range-btn:hover,
.primary-btn:hover,
.secondary-btn:hover,
.table-action:hover,
.modal-close:hover,
.mobile-dock-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(118, 187, 255, 0.34);
  background: rgba(255, 255, 255, 0.07);
}

.topbar-link.active,
.range-btn.active,
.mobile-dock-btn.active {
  color: #f7fbff;
  border-color: rgba(95, 160, 255, 0.48);
  background: linear-gradient(135deg, rgba(43, 87, 176, 0.62), rgba(17, 38, 79, 0.74));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 14px 28px rgba(5, 14, 33, 0.24);
}

.topbar-link[data-view="overview"],
.navigator-tab[data-view="overview"],
#workspace-panel .view-tab[data-view="overview"],
.mobile-dock-btn[data-view="overview"] {
  border-color: rgba(94, 166, 255, 0.28);
}

.topbar-link[data-view="research"],
.navigator-tab[data-view="research"],
#workspace-panel .view-tab[data-view="research"],
.mobile-dock-btn[data-view="research"] {
  border-color: rgba(88, 213, 190, 0.28);
}

.topbar-link[data-view="ideas"],
.navigator-tab[data-view="ideas"],
#workspace-panel .view-tab[data-view="ideas"],
.mobile-dock-btn[data-view="ideas"] {
  border-color: rgba(255, 206, 96, 0.44);
}

.topbar-link[data-view="control"],
.navigator-tab[data-view="control"],
#workspace-panel .view-tab[data-view="control"],
.mobile-dock-btn[data-view="control"] {
  border-color: rgba(255, 216, 109, 0.56);
}

.topbar-link[data-view="trading"],
.navigator-tab[data-view="trading"],
#workspace-panel .view-tab[data-view="trading"],
.mobile-dock-btn[data-view="trading"] {
  border-color: rgba(255, 164, 124, 0.3);
}

.topbar-link[data-view="analytics"],
.navigator-tab[data-view="analytics"],
#workspace-panel .view-tab[data-view="analytics"],
.mobile-dock-btn[data-view="analytics"] {
  border-color: rgba(161, 185, 255, 0.3);
}

.topbar-link.active[data-view="overview"],
.navigator-tab.active[data-view="overview"],
#workspace-panel .view-tab.active[data-view="overview"],
.mobile-dock-btn.active[data-view="overview"] {
  border-color: rgba(114, 176, 255, 0.54);
  background: linear-gradient(135deg, rgba(51, 101, 193, 0.65), rgba(17, 46, 101, 0.8));
}

.topbar-link.active[data-view="research"],
.navigator-tab.active[data-view="research"],
#workspace-panel .view-tab.active[data-view="research"],
.mobile-dock-btn.active[data-view="research"] {
  border-color: rgba(99, 214, 194, 0.5);
  background: linear-gradient(135deg, rgba(25, 124, 117, 0.64), rgba(14, 54, 78, 0.76));
}

.topbar-link.active[data-view="ideas"],
.navigator-tab.active[data-view="ideas"],
#workspace-panel .view-tab.active[data-view="ideas"],
.mobile-dock-btn.active[data-view="ideas"] {
  color: #332200;
  border-color: rgba(255, 201, 78, 0.72);
  background: linear-gradient(135deg, rgba(255, 227, 126, 0.92), rgba(255, 188, 67, 0.9));
}

.topbar-link.active[data-view="control"],
.navigator-tab.active[data-view="control"],
#workspace-panel .view-tab.active[data-view="control"],
.mobile-dock-btn.active[data-view="control"] {
  color: #2a1a00;
  border-color: rgba(255, 214, 98, 0.82);
  background: linear-gradient(135deg, rgba(255, 235, 145, 0.98), rgba(255, 193, 74, 0.94));
}

.topbar-link.active[data-view="trading"],
.navigator-tab.active[data-view="trading"],
#workspace-panel .view-tab.active[data-view="trading"],
.mobile-dock-btn.active[data-view="trading"] {
  border-color: rgba(255, 170, 125, 0.55);
  background: linear-gradient(135deg, rgba(162, 74, 34, 0.76), rgba(104, 33, 25, 0.76));
}

.topbar-link.active[data-view="analytics"],
.navigator-tab.active[data-view="analytics"],
#workspace-panel .view-tab.active[data-view="analytics"],
.mobile-dock-btn.active[data-view="analytics"] {
  border-color: rgba(155, 186, 255, 0.56);
  background: linear-gradient(135deg, rgba(71, 97, 168, 0.72), rgba(24, 58, 104, 0.76));
}

.nav-icon,
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.7;
  fill: none;
}

.topbar-side {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(86, 220, 182, 0.22);
  border-radius: 999px;
  background: rgba(76, 211, 190, 0.08);
  color: #baf6e8;
  font-size: 0.82rem;
  font-weight: 700;
}

.utility-btn-inline {
  min-height: 40px;
  padding: 0 14px;
}

.desktop-body,
.workspace-area {
  display: block;
}

.navigator-window,
#overview-hero,
#workspace-panel {
  display: none;
}

.summary-grid,
.ops-readiness-grid,
.analytics-grid,
.main-grid,
.content-grid,
.health-readiness-grid {
  margin-top: 24px;
}

.summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.metric-panel,
.panel,
.subpanel,
.modal-card {
  border: 1px solid rgba(154, 177, 220, 0.14);
  background: linear-gradient(180deg, rgba(14, 24, 42, 0.92), rgba(9, 17, 31, 0.86));
  box-shadow: 0 22px 56px rgba(4, 10, 20, 0.32);
}

.metric-panel {
  min-height: 168px;
}

.panel,
.metric-panel,
.subpanel,
.modal-card {
  border-radius: 24px;
}

.panel-header,
.subpanel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.panel-header {
  margin-bottom: 18px;
}

.panel-kicker,
.metric-kicker,
.subpanel-meta {
  color: #8ea6cf;
}

.panel-header h2,
.subpanel-head h3,
.metric-value,
h1,
h2,
h3,
h4,
strong {
  color: #f7fbff;
}

.metric-subtext,
.control-note,
.empty,
.source-url,
.funnel-run-meta,
.funnel-run-note,
.trade-map-scale {
  color: #93a7cb;
}

.timestamp-pill,
.badge,
.status-pill,
.chip,
.funnel-chip,
.actionability-pill,
.tag {
  border: 1px solid rgba(148, 175, 220, 0.16);
  background: rgba(255, 255, 255, 0.05);
}

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

.wide-panel,
.spotlight,
.span-2 {
  grid-column: 1 / -1;
}

.content-grid,
.health-readiness-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.analytics-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ops-readiness-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
}

.research-board-shell {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.research-confidence-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.research-score-card {
  padding: 18px;
  border: 1px solid rgba(142, 166, 207, 0.14);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(18, 31, 55, 0.92), rgba(9, 18, 33, 0.88));
}

.research-score-card span,
.research-score-card small {
  display: block;
  color: #8ea6cf;
}

.research-score-card strong {
  display: block;
  margin: 10px 0 6px;
  font-size: 2rem;
  line-height: 1;
}

.research-board-table {
  overflow: hidden;
  border: 1px solid rgba(146, 169, 212, 0.14);
  border-radius: 20px;
  background: rgba(7, 14, 26, 0.46);
}

.research-board-data-table {
  width: 100%;
  border-collapse: collapse;
}

.research-board-data-table th,
.research-board-data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(146, 169, 212, 0.1);
  vertical-align: middle;
  text-align: left;
}

.research-board-data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #b7c6e3;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(9, 19, 35, 0.96);
}

.research-board-data-table tbody tr {
  transition: background 0.16s ease, transform 0.16s ease;
}

.research-board-data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.research-board-symbol {
  display: grid;
  gap: 4px;
}

.research-board-symbol strong {
  font-size: 1rem;
}

.research-board-symbol span {
  color: #8fa4ca;
  font-size: 0.88rem;
}

.board-rank {
  display: inline-flex;
  min-width: 32px;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #e7efff;
  font-weight: 800;
}

.board-reason-cell {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.board-reason-primary {
  color: #f7fbff;
  font-size: 0.9rem;
  line-height: 1.35;
}

.board-reason-detail {
  color: #9db0d2;
  font-size: 0.82rem;
  line-height: 1.45;
}

.board-reason-meta {
  color: #7fcfbe;
  font-size: 0.77rem;
  line-height: 1.4;
}

.confidence-cell {
  display: grid;
  gap: 8px;
  min-width: 150px;
}

.confidence-bar {
  position: relative;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.confidence-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.confidence-bar.elite span {
  background: linear-gradient(90deg, #5ce3c4, #9cf0c7);
}

.confidence-bar.high span {
  background: linear-gradient(90deg, #63aeff, #5ce3c4);
}

.confidence-bar.medium span {
  background: linear-gradient(90deg, #ffc66b, #ffd694);
}

.confidence-bar.watch span {
  background: linear-gradient(90deg, #6f7d96, #9aa7bb);
}

.board-status {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(142, 166, 207, 0.14);
  color: #dbe6f8;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.82rem;
  font-weight: 700;
}

.board-status.ready {
  color: #042416;
  background: linear-gradient(135deg, #84efbf, #aff7d0);
}

.board-status.waiting,
.board-status.watchlist,
.board-status.research {
  color: #fff5da;
  background: linear-gradient(135deg, rgba(223, 167, 73, 0.3), rgba(137, 97, 31, 0.3));
}

.board-status.blocked,
.board-status.expired {
  color: #ffd7d7;
  background: linear-gradient(135deg, rgba(179, 57, 76, 0.34), rgba(100, 26, 35, 0.36));
}

.table-action {
  min-height: 38px;
  padding: 0 12px;
  font-weight: 700;
}

.table-wrap,
.log-view,
.research-context-preview,
.manual-research-input,
.chart-box,
.weekly-review,
.trade-chart-stage,
.trade-map {
  border: 1px solid rgba(148, 175, 220, 0.14);
  border-radius: 18px;
  background: rgba(7, 14, 26, 0.42);
}

.log-view {
  max-height: 420px;
}

.mobile-dock {
  display: none;
}

@media (max-width: 1180px) {
  .summary-grid,
  .analytics-grid,
  .content-grid,
  .health-readiness-grid,
  .ops-readiness-grid,
  .main-grid,
  .research-confidence-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar {
    flex-wrap: wrap;
  }

  .topbar-nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 820px) {
  body {
    padding-bottom: 84px;
  }

  .shell {
    width: calc(100% - 16px);
    padding-bottom: 84px;
  }

  .topbar {
    top: 8px;
    padding: 16px;
    border-radius: 20px;
  }

  .summary-grid,
  .analytics-grid,
  .content-grid,
  .health-readiness-grid,
  .ops-readiness-grid,
  .main-grid,
  .research-confidence-summary {
    grid-template-columns: 1fr;
  }

  .research-board-table {
    overflow: visible;
  }

  .research-board-data-table {
    min-width: 0;
  }

  .topbar-side {
    width: 100%;
    justify-content: space-between;
  }

  .mobile-dock {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: 8px;
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
    border: 1px solid rgba(148, 175, 220, 0.16);
    border-radius: 18px;
    background: rgba(9, 18, 33, 0.92);
    box-shadow: 0 18px 40px rgba(4, 10, 20, 0.32);
    backdrop-filter: blur(18px);
  }

  .mobile-dock-btn {
    min-height: 48px;
    padding: 10px 8px;
    justify-content: center;
  }

  .research-board-data-table,
  .research-board-data-table tbody,
  .research-board-data-table tr,
  .research-board-data-table td {
    display: block;
    width: 100%;
  }

  .research-board-data-table thead {
    display: none;
  }

  .research-board-data-table tbody {
    display: grid;
    gap: 12px;
    padding: 12px;
  }

  .research-board-data-table tbody tr {
    padding: 14px;
    border: 1px solid rgba(146, 169, 212, 0.14);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(14, 24, 42, 0.94), rgba(8, 16, 30, 0.9));
  }

  .research-board-data-table td {
    padding: 8px 0;
    border-bottom: 1px solid rgba(146, 169, 212, 0.08);
  }

  .research-board-data-table td:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .research-board-data-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 6px;
    color: #7f98c3;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .research-board-open-btn {
    width: 100%;
    justify-content: center;
  }

  .confidence-cell {
    min-width: 0;
  }

  .board-status {
    justify-content: center;
  }
}

@media (max-width: 560px) {
  .topbar-nav {
    display: none;
  }

  .topbar-side {
    justify-content: flex-start;
  }

  .topbar-side .utility-btn-inline {
    display: none;
  }

  .metric-panel,
  .panel,
  .subpanel,
  .modal-card {
    border-radius: 20px;
    padding: 16px;
  }

  .panel-header,
  .subpanel-head {
    gap: 8px;
  }

  .brand-name {
    font-size: 0.94rem;
  }

  .summary-grid,
  .analytics-grid,
  .content-grid,
  .health-readiness-grid,
  .ops-readiness-grid,
  .main-grid,
  .research-confidence-summary {
    gap: 14px;
  }

  .panel,
  .metric-panel,
  .subpanel {
    padding: 14px;
  }

  .research-score-card {
    padding: 14px;
  }

  .research-board-data-table tbody {
    padding: 10px;
  }

  .research-board-data-table tbody tr {
    padding: 12px;
    border-radius: 16px;
  }

  .board-reason-primary {
    font-size: 0.86rem;
  }

  .board-reason-detail,
  .board-reason-meta,
  .research-board-symbol span {
    font-size: 0.78rem;
  }
}

