/* ============================================================
   v8.css — FXBias v8 design overlay (v40.2 faithful)
   ============================================================ */

:root {
  --v8-bull: #7dd3ae;
  --v8-bull-glow: rgba(125,211,174,0.45);
  --v8-bull-stroke-l: #6ba88b;
  --v8-bear: #e89a8e;
  --v8-bear-glow: rgba(232,154,142,0.45);
  --v8-bear-stroke-l: #c47467;
  --v8-neutral: #a5acba;
  --v8-neutral-glow: rgba(165,172,186,0.30);
  --v8-warm-amber: #e8b87a;
  --v8-warm-amber-glow: rgba(232,184,122,0.55);
  --v8-light-pulse: #9a8bbf;
  --v8-light-pulse-glow: rgba(154,139,191,0.55);
  --v8-light-pulse-deep: #6a5a91;
  --v8-d-bg: #1a1a1c;
  --v8-d-stage: #1a1a1c;
  --v8-d-card-bg: linear-gradient(155deg, #1f1f24 0%, #1a1a1d 100%);
  --v8-d-text: #f0f0f3;
  --v8-d-muted: rgba(240,240,243,0.55);
  --v8-d-faint: rgba(240,240,243,0.38);
  --v8-d-ring-bg: #28282d;
  --v8-d-shadow-out: -3px -3px 7px rgba(255,255,255,0.025), 5px 5px 14px rgba(0,0,0,0.6);
  --v8-l-bg: linear-gradient(160deg, #e8e1ed 0%, #d4d1e3 28%, #b8c5d6 55%, #a5c0c8 80%, #c8d4d2 100%);
  --v8-l-text: #2e2940;
  --v8-l-card-glass: rgba(255,255,255,0.55);
  --v8-l-card-border: rgba(255,255,255,0.7);
}

/* ── Stage backgrounds for Bias tab ───────────────────────── */
body.v8-bias-active {
  background: var(--v8-d-bg) !important;
}
html[data-theme="clean"] body.v8-bias-active {
  background: var(--v8-l-bg) !important;
}
body.v8-bias-active #main-content {
  background: transparent !important;
}

/* ── Hide stock nav/header bits when v8 nav is active ─────── */
body.v8-bias-active #top-nav { display: none !important; }
body.v8-bias-active #header .logo { display: none !important; }
body.v8-bias-active #header .week-badge { display: none !important; }
body.v8-bias-active #header .data-status-badge { display: none !important; }

body.v8-bias-active #header {
  background: var(--v8-d-bg) !important;
  border-bottom: 1px solid rgba(255,255,255,0.05) !important;
  padding: 0 20px !important;
  justify-content: stretch !important;
  min-height: 64px;
}
html[data-theme="clean"] body.v8-bias-active #header {
  background: transparent !important;
  border-bottom: 1px solid rgba(255,255,255,0.4) !important;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

/* ── v8 Top Nav (mode toggle + brand dropdown + status) ───── */
.v8-top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  position: relative;
  gap: 12px;
}
.v8-mode-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: linear-gradient(145deg, #18181b, #232328);
  border-radius: 999px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.4), 0 1px 0 rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.04);
}
html[data-theme="clean"] .v8-mode-toggle {
  background: rgba(255,255,255,0.55);
  -webkit-backdrop-filter: blur(30px);
  backdrop-filter: blur(30px);
  box-shadow: inset 0 2px 4px rgba(46,41,64,0.10), 0 1px 0 rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,0.7);
}
.v8-mode-toggle .mode-opt {
  padding: 6px 14px;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(240,240,243,0.4);
  border-radius: 999px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  user-select: none;
  background: transparent;
  border: none;
}
html[data-theme="clean"] .v8-mode-toggle .mode-opt {
  color: rgba(46,41,64,0.45);
}
.v8-mode-toggle .mode-opt.active {
  background: linear-gradient(145deg, #36363e, #232328);
  color: var(--v8-warm-amber);
  box-shadow: 0 1px 4px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.05);
}
.v8-mode-toggle .mode-opt.active.intraday-active {
  color: var(--v8-bull);
}
html[data-theme="clean"] .v8-mode-toggle .mode-opt.active {
  background: rgba(255,255,255,0.92);
  color: #b8741a;
  box-shadow: 0 1px 4px rgba(46,41,64,0.10), inset 0 1px 0 rgba(255,255,255,0.95);
}
html[data-theme="clean"] .v8-mode-toggle .mode-opt.active.intraday-active {
  color: var(--v8-bull-stroke-l);
}

.v8-brand-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.v8-nav-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 22px;
  background: linear-gradient(145deg, #232328, #18181b);
  border-radius: 999px;
  box-shadow: var(--v8-d-shadow-out);
  cursor: pointer;
  min-width: 170px;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.04);
  user-select: none;
  transition: all 0.18s;
}
.v8-nav-trigger:hover {
  border-color: rgba(125,211,174,0.20);
  box-shadow: var(--v8-d-shadow-out), 0 0 14px rgba(125,211,174,0.18);
}
html[data-theme="clean"] .v8-nav-trigger {
  background: rgba(255,255,255,0.55);
  -webkit-backdrop-filter: blur(30px);
  backdrop-filter: blur(30px);
  box-shadow: 0 8px 24px rgba(46,41,64,0.10), inset 0 1px 0 rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.7);
}
.v8-nav-trigger-label {
  font-size: 13px;
  color: var(--v8-d-text);
  font-weight: 500;
  letter-spacing: 0.4px;
}
html[data-theme="clean"] .v8-nav-trigger-label {
  color: var(--v8-l-text);
}
.v8-nav-trigger-arrow {
  color: rgba(240,240,243,0.5);
  font-size: 10px;
}
html[data-theme="clean"] .v8-nav-trigger-arrow {
  color: rgba(46,41,64,0.5);
}

.v8-nav-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: linear-gradient(155deg, #26262c 0%, #1a1a1d 100%);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 18px 44px rgba(0,0,0,0.65), inset 0 1px 0 rgba(255,255,255,0.06);
  min-width: 180px;
  z-index: 1000;
  display: none;
}
html[data-theme="clean"] .v8-nav-menu {
  background: rgba(255,255,255,0.96);
  -webkit-backdrop-filter: blur(40px);
  backdrop-filter: blur(40px);
  box-shadow: 0 18px 44px rgba(46,41,64,0.22), inset 0 1px 0 rgba(255,255,255,0.95);
  border: 1px solid rgba(255,255,255,0.85);
}
.v8-nav-menu.open { display: block; }
.v8-nav-menu-item {
  padding: 10px 14px;
  font-size: 13px;
  color: rgba(240,240,243,0.75);
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.2px;
}
html[data-theme="clean"] .v8-nav-menu-item {
  color: rgba(46,41,64,0.75);
}
.v8-nav-menu-item:hover {
  background: rgba(125,211,174,0.10);
  color: var(--v8-d-text);
}
html[data-theme="clean"] .v8-nav-menu-item:hover {
  background: rgba(125,211,174,0.15);
  color: var(--v8-l-text);
}
.v8-nav-menu-item.active {
  background: rgba(125,211,174,0.14);
  color: var(--v8-bull);
}
html[data-theme="clean"] .v8-nav-menu-item.active {
  background: rgba(125,211,174,0.18);
  color: var(--v8-bull-stroke-l);
}

.v8-status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 8px 14px;
  background: linear-gradient(145deg, #232328, #18181b);
  border-radius: 999px;
  box-shadow: var(--v8-d-shadow-out);
  border: 1px solid rgba(255,255,255,0.04);
  font-size: 10px;
  color: rgba(240,240,243,0.7);
  letter-spacing: 1.6px;
  font-weight: 600;
  font-family: 'SF Mono', monospace;
  white-space: nowrap;
}
html[data-theme="clean"] .v8-status-badge {
  background: rgba(255,255,255,0.55);
  -webkit-backdrop-filter: blur(30px);
  backdrop-filter: blur(30px);
  box-shadow: 0 8px 24px rgba(46,41,64,0.10), inset 0 1px 0 rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.7);
  color: rgba(46,41,64,0.7);
}
.v8-status-badge .data-dot,
.v8-status-badge .data-status-dot,
.v8-status-badge .status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}
.v8-status-badge .status-dot.green,
.v8-status-badge .data-status-dot.green {
  background: var(--v8-bull);
  box-shadow: 0 0 9px var(--v8-bull-glow);
}
.v8-status-badge .status-dot.amber,
.v8-status-badge .data-status-dot.amber {
  background: var(--v8-warm-amber);
  box-shadow: 0 0 9px var(--v8-warm-amber-glow);
}
.v8-status-badge .status-dot.red,
.v8-status-badge .data-status-dot.red {
  background: var(--v8-bear);
  box-shadow: 0 0 9px var(--v8-bear-glow);
}

/* ── Page inner ───────────────────────────────────────────── */
body.v8-bias-active #main-content .page-inner {
  padding: 22px 20px;
  max-width: 1700px;
  margin: 0 auto;
}
@media (max-width: 900px) {
  body.v8-bias-active #main-content .page-inner {
    padding: 14px 12px 130px;
  }
}

/* ── Monday brief ─────────────────────────────────────────── */
body.v8-bias-active #monday-brief {
  background: var(--v8-d-card-bg) !important;
  border-radius: 22px !important;
  box-shadow: var(--v8-d-shadow-out) !important;
  border: 1px solid rgba(255,255,255,0.04) !important;
  overflow: hidden;
  margin-bottom: 22px;
  padding: 0;
}
html[data-theme="clean"] body.v8-bias-active #monday-brief {
  background: var(--v8-l-card-glass) !important;
  -webkit-backdrop-filter: blur(40px);
  backdrop-filter: blur(40px);
  box-shadow: 0 12px 32px rgba(46,41,64,0.12), inset 0 1px 0 rgba(255,255,255,0.9) !important;
  border: 1px solid var(--v8-l-card-border) !important;
}
body.v8-bias-active #monday-brief .brief-header { padding: 14px 22px; }
body.v8-bias-active #monday-brief .brief-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--v8-d-text);
}
html[data-theme="clean"] body.v8-bias-active #monday-brief .brief-title {
  color: var(--v8-l-text);
}

/* ── Group labels ─────────────────────────────────────────── */
body.v8-bias-active .v8-group-label {
  font-size: 10px;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--v8-d-muted);
  font-weight: 600;
  margin: 22px 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
html[data-theme="clean"] body.v8-bias-active .v8-group-label {
  color: rgba(46,41,64,0.6);
  border-bottom-color: rgba(46,41,64,0.10);
}

/* ── Bias grid ────────────────────────────────────────────── */
body.v8-bias-active .v8-bias-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 1199px) {
  body.v8-bias-active .v8-bias-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 900px) {
  body.v8-bias-active .v8-bias-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}
@media (max-width: 600px) {
  body.v8-bias-active .v8-bias-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Bias card (v8 faithful) ──────────────────────────────── */
body.v8-bias-active .v8-card {
  background: var(--v8-d-card-bg) !important;
  border-radius: 20px !important;
  padding: 18px 18px 20px !important;
  box-shadow: var(--v8-d-shadow-out) !important;
  border: 1px solid rgba(255,255,255,0.03) !important;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 240px;
}
html[data-theme="clean"] body.v8-bias-active .v8-card {
  background: var(--v8-l-card-glass) !important;
  -webkit-backdrop-filter: blur(40px);
  backdrop-filter: blur(40px);
  box-shadow: 0 12px 32px rgba(46,41,64,0.12), inset 0 1px 0 rgba(255,255,255,0.9) !important;
  border: 1px solid var(--v8-l-card-border) !important;
}

.v8-card-glow {
  position: absolute;
  top: -35%;
  right: -28%;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  filter: blur(14px);
  pointer-events: none;
  opacity: 0.55;
  z-index: 0;
}
.v8-card-glow.bull { background: radial-gradient(circle, var(--v8-bull-glow) 0%, transparent 60%); }
.v8-card-glow.bear { background: radial-gradient(circle, var(--v8-bear-glow) 0%, transparent 60%); }
.v8-card-glow.neutral { background: radial-gradient(circle, var(--v8-neutral-glow) 0%, transparent 60%); }

.v8-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  position: relative;
  z-index: 2;
}
.v8-card-head-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.v8-card-head-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

body.v8-bias-active .top-conviction-lbl {
  font-size: 9px;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--v8-d-faint);
  font-weight: 600;
  margin-bottom: 2px;
}
html[data-theme="clean"] body.v8-bias-active .top-conviction-lbl {
  color: rgba(46,41,64,0.45);
}

body.v8-bias-active .v8-card .bias-symbol {
  font-size: 17px;
  font-weight: 400;
  color: var(--v8-d-text);
  letter-spacing: 0.3px;
  line-height: 1.15;
}
html[data-theme="clean"] body.v8-bias-active .v8-card .bias-symbol {
  color: var(--v8-l-text);
}

body.v8-bias-active .v8-card .bias-tag {
  font-size: 9px;
  letter-spacing: 1.6px;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}
body.v8-bias-active .v8-card .bias-tag.bull { color: var(--v8-bull); }
body.v8-bias-active .v8-card .bias-tag.bear { color: var(--v8-bear); }
body.v8-bias-active .v8-card .bias-tag.neutral { color: var(--v8-neutral); }
body.v8-bias-active .v8-card .bias-tag.override { color: var(--v8-warm-amber); }
html[data-theme="clean"] body.v8-bias-active .v8-card .bias-tag.bull { color: var(--v8-bull-stroke-l); }
html[data-theme="clean"] body.v8-bias-active .v8-card .bias-tag.bear { color: var(--v8-bear-stroke-l); }
html[data-theme="clean"] body.v8-bias-active .v8-card .bias-tag.override { color: #b8741a; }

.news-conflict-triangle {
  font-size: 13px;
  color: var(--v8-warm-amber);
  cursor: pointer;
  filter: drop-shadow(0 0 4px var(--v8-warm-amber-glow));
  user-select: none;
  line-height: 1;
}
.news-conflict-triangle:hover { transform: scale(1.15); transition: transform 0.15s; }
html[data-theme="clean"] .news-conflict-triangle { color: #b8741a; }

body.v8-bias-active .v8-card .plan-badge {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 7px;
  background: rgba(232,184,122,0.14);
  color: var(--v8-warm-amber);
  border: 1px solid rgba(232,184,122,0.25);
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.3px;
}
body.v8-bias-active .v8-card .plan-badge.active-today {
  background: rgba(125,211,174,0.18);
  color: var(--v8-bull);
  border-color: rgba(125,211,174,0.35);
}

/* ── Ring ─────────────────────────────────────────────────── */
body.v8-bias-active .v8-card .inst-ring-wrap {
  position: relative;
  width: 130px;
  height: 130px;
  margin: 4px auto 8px;
  cursor: pointer;
  z-index: 2;
  border-radius: 50%;
  outline: none;
}
body.v8-bias-active .v8-card .inst-ring-glow {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  filter: blur(16px);
  pointer-events: none;
  z-index: 0;
}
body.v8-bias-active .v8-card .inst-ring-glow.bull {
  background: radial-gradient(circle, rgba(125,211,174,0.75) 0%, rgba(125,211,174,0.30) 35%, transparent 65%);
}
body.v8-bias-active .v8-card .inst-ring-glow.bear {
  background: radial-gradient(circle, rgba(232,154,142,0.75) 0%, rgba(232,154,142,0.30) 35%, transparent 65%);
}
body.v8-bias-active .v8-card .inst-ring-glow.neutral {
  background: radial-gradient(circle, var(--v8-neutral-glow) 0%, transparent 65%);
}
body.v8-bias-active .v8-card .inst-ring-svg {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
body.v8-bias-active .v8-card .inst-ring-wrap:hover .inst-ring-svg {
  transform: scale(1.03);
}
body.v8-bias-active .v8-card .ring-track { fill: var(--v8-d-ring-bg); }
html[data-theme="clean"] body.v8-bias-active .v8-card .ring-track {
  fill: rgba(255,255,255,0.96);
}
body.v8-bias-active .v8-card .ring-track-stroke {
  stroke: rgba(255,255,255,0.03);
  fill: none;
  stroke-width: 1;
}
html[data-theme="clean"] body.v8-bias-active .v8-card .ring-track-stroke {
  stroke: rgba(46,41,64,0.06);
}
body.v8-bias-active .v8-card .ring-progress {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0.92;
}
body.v8-bias-active .v8-card .inst-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
}
body.v8-bias-active .v8-card .inst-ring-value {
  font-size: 30px;
  font-weight: 200;
  color: var(--v8-d-text);
  letter-spacing: -1.2px;
  line-height: 1;
}
html[data-theme="clean"] body.v8-bias-active .v8-card .inst-ring-value {
  color: var(--v8-l-text);
}
body.v8-bias-active .v8-card .inst-ring-value sup {
  font-size: 13px;
  opacity: 0.4;
  font-weight: 300;
}
body.v8-bias-active .v8-card .inst-ring-sublabel {
  font-size: 8px;
  color: rgba(240,240,243,0.45);
  letter-spacing: 1.8px;
  margin-top: 4px;
  text-transform: uppercase;
  font-weight: 500;
}
html[data-theme="clean"] body.v8-bias-active .v8-card .inst-ring-sublabel {
  color: rgba(46,41,64,0.5);
}

/* ── Optional pillars (Settings toggle) ───────────────────── */
body.v8-bias-active .v8-card .inst-meta {
  position: relative;
  z-index: 2;
  background: rgba(255,255,255,0.02);
  border-radius: 9px;
  padding: 7px 9px;
  margin-top: 4px;
  border: 1px solid rgba(255,255,255,0.03);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px 10px;
  font-size: 10.5px;
  font-family: 'SF Mono', monospace;
}
html[data-theme="clean"] body.v8-bias-active .v8-card .inst-meta {
  background: rgba(255,255,255,0.30);
  border: 1px solid rgba(46,41,64,0.06);
}
body.v8-bias-active .v8-card .inst-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
body.v8-bias-active .v8-card .meta-lbl {
  color: rgba(240,240,243,0.45);
  font-size: 9.5px;
  letter-spacing: 0.5px;
  font-weight: 600;
}
html[data-theme="clean"] body.v8-bias-active .v8-card .meta-lbl {
  color: rgba(46,41,64,0.55);
}
body.v8-bias-active .v8-card .meta-val {
  color: var(--v8-d-text);
  font-weight: 500;
}
html[data-theme="clean"] body.v8-bias-active .v8-card .meta-val {
  color: var(--v8-l-text);
}

/* ── Override panel ───────────────────────────────────────── */
.v8-override-panel {
  position: absolute;
  background: linear-gradient(155deg, #26262c 0%, #1a1a1d 100%);
  border-radius: 14px;
  padding: 12px 10px 10px;
  box-shadow: 0 20px 56px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  width: 210px;
  z-index: 100;
  animation: v8-panel-slide-right 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}
html[data-theme="clean"] .v8-override-panel {
  background: rgba(255,255,255,0.96);
  -webkit-backdrop-filter: blur(40px);
  backdrop-filter: blur(40px);
  box-shadow: 0 20px 56px rgba(46,41,64,0.22), inset 0 1px 0 rgba(255,255,255,0.95);
  border: 1px solid rgba(255,255,255,0.85);
}
@keyframes v8-panel-slide-right {
  from { opacity: 0; transform: translateX(12px) scale(0.96); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}
.v8-override-title {
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(240,240,243,0.5);
  font-weight: 700;
  margin-bottom: 8px;
  text-align: center;
}
html[data-theme="clean"] .v8-override-title {
  color: rgba(46,41,64,0.55);
}
.v8-override-opt {
  padding: 6px 8px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  text-align: center;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 3px;
  user-select: none;
}
.v8-override-opt:hover { transform: translateY(-1px); }
.v8-override-opt.bull-strong { background: rgba(125,211,174,0.18); color: var(--v8-bull); border: 1px solid rgba(125,211,174,0.25); }
.v8-override-opt.bull        { background: rgba(125,211,174,0.12); color: var(--v8-bull); border: 1px solid rgba(125,211,174,0.18); }
.v8-override-opt.bull-slight { background: rgba(125,211,174,0.07); color: rgba(125,211,174,0.85); border: 1px solid rgba(125,211,174,0.12); }
.v8-override-opt.neutral     { background: rgba(165,172,186,0.10); color: var(--v8-neutral); border: 1px solid rgba(165,172,186,0.18); }
.v8-override-opt.bear-slight { background: rgba(232,154,142,0.07); color: rgba(232,154,142,0.85); border: 1px solid rgba(232,154,142,0.12); }
.v8-override-opt.bear        { background: rgba(232,154,142,0.12); color: var(--v8-bear); border: 1px solid rgba(232,154,142,0.18); }
.v8-override-opt.bear-strong { background: rgba(232,154,142,0.18); color: var(--v8-bear); border: 1px solid rgba(232,154,142,0.25); }

.v8-override-revert {
  display: block;
  padding: 6px;
  margin-top: 6px;
  font-size: 9.5px;
  color: rgba(240,240,243,0.6);
  text-align: center;
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.05);
  letter-spacing: 0.4px;
}
html[data-theme="clean"] .v8-override-revert {
  background: rgba(46,41,64,0.06);
  color: rgba(46,41,64,0.7);
  border: 1px solid rgba(46,41,64,0.08);
}
.v8-override-divider {
  height: 1px;
  background: rgba(255,255,255,0.07);
  margin: 8px -10px 6px;
}
html[data-theme="clean"] .v8-override-divider {
  background: rgba(46,41,64,0.10);
}
.v8-override-plan {
  display: block;
  padding: 8px;
  font-size: 10.5px;
  letter-spacing: 0.4px;
  font-weight: 600;
  color: rgba(125,211,174,0.85);
  text-align: center;
  border-radius: 8px;
  background: rgba(125,211,174,0.08);
  border: 1px solid rgba(125,211,174,0.20);
  cursor: pointer;
  transition: all 0.15s;
}
.v8-override-plan:hover {
  background: rgba(125,211,174,0.14);
  border-color: rgba(125,211,174,0.30);
  transform: translateY(-1px);
}
html[data-theme="clean"] .v8-override-plan {
  color: var(--v8-bull-stroke-l);
  background: rgba(125,211,174,0.12);
  border: 1px solid rgba(107,168,139,0.30);
}

.v8-override-backdrop { display: none; }
@media (max-width: 900px) {
  .v8-override-backdrop.mobile {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.40);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    z-index: 99;
    animation: v8-fade-in 0.18s;
  }
  .v8-override-panel {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: calc(100vw - 32px) !important;
    max-width: 340px !important;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    z-index: 1100;
    animation: v8-panel-pop-center 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
  @keyframes v8-panel-pop-center {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.92); }
    to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  }
  @keyframes v8-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
  }
}

/* ── Pulse circle ─────────────────────────────────────────── */
.v8-pulse-btn {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 998;
  width: 56px;
  height: 56px;
  cursor: pointer;
  pointer-events: auto;
}
@media (min-width: 901px) { .v8-pulse-btn { display: none; } }
.v8-pulse-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  opacity: 0;
  animation: v8-pulse-out 2.6s ease-out infinite;
  pointer-events: none;
  background: radial-gradient(circle, rgba(125,211,174,0.55) 0%, rgba(125,211,174,0.15) 50%, transparent 75%);
  box-shadow: 0 0 0 1px rgba(125,211,174,0.25);
}
html[data-theme="clean"] .v8-pulse-ring {
  background: radial-gradient(circle, rgba(154,139,191,0.55) 0%, rgba(154,139,191,0.20) 50%, transparent 75%);
  box-shadow: 0 0 0 1.5px rgba(154,139,191,0.40);
}
.v8-pulse-ring:nth-child(1) { animation-delay: 0s; }
.v8-pulse-ring:nth-child(2) { animation-delay: 0.87s; }
.v8-pulse-ring:nth-child(3) { animation-delay: 1.74s; }
@keyframes v8-pulse-out {
  0%   { opacity: 0.75; transform: scale(1); }
  100% { opacity: 0; transform: scale(2.6); }
}
.v8-pulse-core {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  animation: v8-core-breathe 3.4s ease-in-out infinite;
  background: radial-gradient(circle at 35% 30%, #34343c 0%, #1c1c20 100%);
  border: 1px solid rgba(125,211,174,0.30);
  box-shadow: 0 0 16px rgba(125,211,174,0.32),
              0 8px 22px rgba(0,0,0,0.55),
              inset 0 1px 0 rgba(255,255,255,0.06);
}
html[data-theme="clean"] .v8-pulse-core {
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.98), rgba(232,225,245,0.95));
  border: 1.5px solid rgba(154,139,191,0.50);
  box-shadow: 0 0 18px rgba(154,139,191,0.45),
              0 8px 22px rgba(106,90,145,0.25),
              inset 0 1px 0 rgba(255,255,255,0.95);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}
@keyframes v8-core-breathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.04); }
}
.v8-pulse-letter {
  font-size: 22px;
  font-weight: 300;
  letter-spacing: -0.5px;
  user-select: none;
  pointer-events: none;
  color: var(--v8-d-text);
  text-shadow: 0 0 10px rgba(125,211,174,0.55), 0 0 22px rgba(125,211,174,0.30);
}
html[data-theme="clean"] .v8-pulse-letter {
  color: var(--v8-light-pulse-deep);
  text-shadow: 0 0 10px rgba(154,139,191,0.65), 0 0 22px rgba(154,139,191,0.35);
}

.v8-pulse-menu {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  background: linear-gradient(155deg, #26262c 0%, #1a1a1d 100%);
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 18px 44px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.07);
  display: none;
  min-width: 220px;
}
html[data-theme="clean"] .v8-pulse-menu {
  background: rgba(255,255,255,0.96);
  -webkit-backdrop-filter: blur(40px);
  backdrop-filter: blur(40px);
  box-shadow: 0 18px 44px rgba(46,41,64,0.22), inset 0 1px 0 rgba(255,255,255,0.95);
  border: 1px solid rgba(255,255,255,0.85);
}
.v8-pulse-menu.open { display: block; }
.v8-pulse-menu-item {
  padding: 11px 14px;
  font-size: 13px;
  color: rgba(240,240,243,0.75);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
html[data-theme="clean"] .v8-pulse-menu-item { color: rgba(46,41,64,0.75); }
.v8-pulse-menu-item:hover { background: rgba(255,255,255,0.05); }
html[data-theme="clean"] .v8-pulse-menu-item:hover { background: rgba(125,211,174,0.12); }
.v8-pulse-menu-item.active {
  background: rgba(125,211,174,0.10);
  color: var(--v8-d-text);
}
html[data-theme="clean"] .v8-pulse-menu-item.active {
  color: var(--v8-l-text);
  background: rgba(125,211,174,0.16);
}
.v8-pulse-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.20);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  z-index: 997;
  display: none;
}
.v8-pulse-backdrop.open { display: block; }

/* ── Countdown + freeze ───────────────────────────────────── */
body.v8-bias-active .countdown-panel {
  background: var(--v8-d-card-bg) !important;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: var(--v8-d-shadow-out);
  border: 1px solid rgba(255,255,255,0.03) !important;
  margin: 14px 0;
}
html[data-theme="clean"] body.v8-bias-active .countdown-panel {
  background: var(--v8-l-card-glass) !important;
  -webkit-backdrop-filter: blur(40px);
  backdrop-filter: blur(40px);
  box-shadow: 0 8px 24px rgba(46,41,64,0.10), inset 0 1px 0 rgba(255,255,255,0.85);
  border: 1px solid var(--v8-l-card-border) !important;
}
body.v8-bias-active .freeze-banner {
  background: rgba(232,184,122,0.12);
  border: 1px solid rgba(232,184,122,0.30);
  border-radius: 11px;
  padding: 10px 14px;
  margin: 14px 0;
  font-size: 12px;
  color: var(--v8-warm-amber);
}
body.v8-bias-active .freeze-banner-major {
  background: rgba(232,154,142,0.12);
  border-color: rgba(232,154,142,0.30);
  color: var(--v8-bear);
}
body.v8-bias-active .hidden-note {
  font-size: 11px;
  color: var(--v8-d-muted);
  padding: 12px;
  border-radius: 9px;
  background: rgba(255,255,255,0.02);
  border-left: 2px solid rgba(165,172,186,0.4);
  margin-top: 16px;
}
html[data-theme="clean"] body.v8-bias-active .hidden-note {
  color: rgba(46,41,64,0.7);
  background: rgba(255,255,255,0.4);
}

/* ── v40.3 fixes ────────────────────────────────────────── */

/* Top nav inner container — centers content within max-width matching page-inner */
.v8-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1660px;
  margin: 0 auto;
  position: relative;
}
.v8-brand-wrap {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

/* Status popover (click on status badge) */
.v8-status-popover {
  position: absolute;
  z-index: 1500;
  background: linear-gradient(155deg, #26262c 0%, #1a1a1d 100%);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 18px 44px rgba(0,0,0,0.65), inset 0 1px 0 rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.07);
  min-width: 240px;
  max-width: 340px;
  font-size: 11px;
  line-height: 1.55;
  color: rgba(240,240,243,0.85);
  animation: v8-pop-in 0.18s ease-out;
}
html[data-theme="clean"] .v8-status-popover {
  background: rgba(255,255,255,0.96);
  -webkit-backdrop-filter: blur(40px);
  backdrop-filter: blur(40px);
  box-shadow: 0 18px 44px rgba(46,41,64,0.22), inset 0 1px 0 rgba(255,255,255,0.95);
  border: 1px solid rgba(255,255,255,0.85);
  color: rgba(46,41,64,0.85);
}
.v8-status-popover .v8-status-pop-title {
  font-size: 10px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--v8-bull);
  margin-bottom: 8px;
}
.v8-status-popover pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: -apple-system, system-ui, sans-serif;
  font-size: 11px;
}
@keyframes v8-pop-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.v8-status-badge { cursor: pointer; }

/* Group filter pills */
.v8-group-filter {
  display: flex;
  gap: 8px;
  margin: 14px 0 18px;
  flex-wrap: wrap;
}
.v8-group-chip {
  padding: 6px 14px;
  font-size: 10px;
  letter-spacing: 1.4px;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
  background: rgba(255,255,255,0.04);
  color: rgba(240,240,243,0.55);
  border: 1px solid rgba(255,255,255,0.05);
  transition: all 0.2s;
}
html[data-theme="clean"] .v8-group-chip {
  background: rgba(255,255,255,0.45);
  color: rgba(46,41,64,0.6);
  border: 1px solid rgba(255,255,255,0.6);
}
.v8-group-chip:hover {
  background: rgba(125,211,174,0.10);
  color: var(--v8-bull);
  border-color: rgba(125,211,174,0.20);
}
.v8-group-chip.active {
  background: rgba(125,211,174,0.16);
  color: var(--v8-bull);
  border-color: rgba(125,211,174,0.35);
}
html[data-theme="clean"] .v8-group-chip.active {
  background: rgba(125,211,174,0.20);
  color: var(--v8-bull-stroke-l);
  border-color: rgba(107,168,139,0.40);
}

/* Performance: remove backdrop-filter from cards (too heavy on scroll) */
html[data-theme="clean"] body.v8-bias-active .v8-card {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  background: rgba(255,255,255,0.65) !important;
}
html[data-theme="clean"] body.v8-bias-active #monday-brief {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  background: rgba(255,255,255,0.65) !important;
}
html[data-theme="clean"] body.v8-bias-active .countdown-panel {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  background: rgba(255,255,255,0.55) !important;
}

/* Card override-open state: ring slides left, panel appears right inline */
body.v8-bias-active .v8-card.v8-card-override-open .inst-ring-wrap {
  transform: translateX(-40%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}
body.v8-bias-active .v8-card .inst-ring-wrap {
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.v8-override-panel-inline {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 130px;
  z-index: 5;
  animation: v8-panel-slide-in 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes v8-panel-slide-in {
  from { opacity: 0; transform: translate(8px, -50%); }
  to   { opacity: 1; transform: translate(0, -50%); }
}
.v8-override-panel-inline .v8-override-title { font-size: 8px; letter-spacing: 1.4px; }
.v8-override-panel-inline .v8-override-opt {
  padding: 4px 5px;
  font-size: 8.5px;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}
.v8-override-panel-inline .v8-override-revert,
.v8-override-panel-inline .v8-override-plan {
  font-size: 9px;
  padding: 5px;
}

/* Mobile: hide top nav, keep pulse — Bias dropdown not needed when pulse menu exists */
@media (max-width: 900px) {
  body.v8-bias-active #header {
    display: none !important;
  }
  body.v8-bias-active #main-content {
    padding-top: max(20px, env(safe-area-inset-top, 0));
  }
  /* Force card border-radius on mobile (fix sharp corner bug) */
  body.v8-bias-active .v8-card {
    border-radius: 20px !important;
  }
  body.v8-bias-active #monday-brief {
    border-radius: 22px !important;
  }
  body.v8-bias-active .countdown-panel {
    border-radius: 14px !important;
  }
}

/* Pulse btn: hide on scroll */
.v8-pulse-btn {
  transition: opacity 0.28s cubic-bezier(0.16,1,0.3,1), transform 0.32s cubic-bezier(0.16,1,0.3,1);
}
.v8-pulse-btn.hide-scroll {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(20px) scale(0.85);
}

/* Radial menu — circle of items around pulse btn */
.v8-pulse-radial {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 999;
  width: 56px;
  height: 56px;
  pointer-events: none;
  display: none;
  overflow: visible;
}
.v8-pulse-radial.open {
  display: block;
  pointer-events: auto;
  overflow: visible;
}
.v8-radial-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 56px;
  height: 56px;
  margin-left: -28px; /* center on btn axis */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(155deg, #26262c 0%, #1a1a1d 100%);
  border: 1px solid rgba(125,211,174,0.25);
  border-radius: 50%;
  box-shadow: 0 8px 22px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.06);
  cursor: pointer;
  opacity: 0;
  transform-origin: center;
  animation: v8-radial-in 0.42s cubic-bezier(0.16,1,0.3,1) forwards;
}
html[data-theme="clean"] .v8-radial-item {
  background: rgba(255,255,255,0.96);
  border: 1.5px solid rgba(154,139,191,0.40);
  box-shadow: 0 8px 22px rgba(106,90,145,0.20), inset 0 1px 0 rgba(255,255,255,0.95);
}
.v8-radial-item.active {
  border-color: rgba(125,211,174,0.55);
  box-shadow: 0 0 18px rgba(125,211,174,0.35), 0 8px 22px rgba(0,0,0,0.55);
}
html[data-theme="clean"] .v8-radial-item.active {
  border-color: rgba(154,139,191,0.65);
  box-shadow: 0 0 18px rgba(154,139,191,0.40), 0 8px 22px rgba(106,90,145,0.25);
}
@keyframes v8-radial-in {
  from { opacity: 0; transform: translate(0, 0) scale(0.4); }
  to   { opacity: 1; transform: var(--final-transform, none) scale(1); }
}
/* The inline transform is set by JS — animation override doesn't reset it. Use a simpler keyframe: */
@keyframes v8-radial-in {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}
.v8-radial-letter {
  font-size: 14px;
  font-weight: 500;
  color: var(--v8-d-text);
  line-height: 1;
}
html[data-theme="clean"] .v8-radial-letter {
  color: var(--v8-l-text);
}
.v8-radial-item.active .v8-radial-letter {
  color: var(--v8-bull);
  text-shadow: 0 0 8px rgba(125,211,174,0.55);
}
html[data-theme="clean"] .v8-radial-item.active .v8-radial-letter {
  color: var(--v8-light-pulse-deep);
}
.v8-radial-label {
  font-size: 8px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: rgba(240,240,243,0.55);
  margin-top: 2px;
}
html[data-theme="clean"] .v8-radial-label {
  color: rgba(46,41,64,0.55);
}

/* Monday Brief redesign — Macro v2 style (text labels, no colored dots) */
body.v8-bias-active #monday-brief .brief-section {
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
body.v8-bias-active #monday-brief .brief-section:last-child {
  border-bottom: none;
}
html[data-theme="clean"] body.v8-bias-active #monday-brief .brief-section {
  border-bottom-color: rgba(46,41,64,0.07);
}
body.v8-bias-active #monday-brief .brief-sec-title {
  font-size: 10px;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(240,240,243,0.55);
  margin-bottom: 12px;
}
html[data-theme="clean"] body.v8-bias-active #monday-brief .brief-sec-title {
  color: rgba(46,41,64,0.6);
}
/* Remove decorative emoji dots inside brief content */
body.v8-bias-active #monday-brief .cot-filter-pill,
body.v8-bias-active #monday-brief .price-dot {
  background: transparent !important;
  border: none !important;
  padding: 2px 0 !important;
  box-shadow: none !important;
}
body.v8-bias-active #monday-brief .brief-empty {
  font-size: 12px;
  color: rgba(240,240,243,0.4);
  font-style: italic;
  padding: 8px 0;
}
html[data-theme="clean"] body.v8-bias-active #monday-brief .brief-empty {
  color: rgba(46,41,64,0.5);
}


/* ── v40.4 fixes ────────────────────────────────────────── */

/* Journal modal — apply v8 design language with !important to override inline styles */
#journal-modal {
  background: rgba(10, 10, 12, 0.75) !important;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
html[data-theme="clean"] #journal-modal {
  background: rgba(46, 41, 64, 0.35) !important;
}
#journal-modal > div {
  background: linear-gradient(155deg, #1f1f24 0%, #1a1a1d 100%) !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
  border-radius: 20px !important;
  box-shadow: 0 30px 70px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.06) !important;
  padding: 24px !important;
}
html[data-theme="clean"] #journal-modal > div {
  background: rgba(255,255,255,0.96) !important;
  border: 1px solid rgba(255,255,255,0.85) !important;
  box-shadow: 0 30px 70px rgba(46,41,64,0.30), inset 0 1px 0 rgba(255,255,255,0.95) !important;
}
#journal-modal h2 {
  color: var(--v8-bull) !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  letter-spacing: 0.3px !important;
}
html[data-theme="clean"] #journal-modal h2 {
  color: var(--v8-bull-stroke-l) !important;
}
#journal-modal label {
  color: rgba(240,240,243,0.55) !important;
  font-size: 11px !important;
  letter-spacing: 1.4px !important;
  text-transform: uppercase !important;
  font-weight: 600 !important;
}
html[data-theme="clean"] #journal-modal label {
  color: rgba(46,41,64,0.60) !important;
}
#journal-modal input[type=text],
#journal-modal input[type=date],
#journal-modal input[type=number],
#journal-modal textarea,
#journal-modal select {
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
  color: var(--v8-d-text) !important;
  border-radius: 10px !important;
  font-family: inherit !important;
  font-size: 13px !important;
  padding: 10px 12px !important;
}
html[data-theme="clean"] #journal-modal input[type=text],
html[data-theme="clean"] #journal-modal input[type=date],
html[data-theme="clean"] #journal-modal input[type=number],
html[data-theme="clean"] #journal-modal textarea,
html[data-theme="clean"] #journal-modal select {
  background: rgba(255,255,255,0.65) !important;
  border: 1px solid rgba(46,41,64,0.10) !important;
  color: var(--v8-l-text) !important;
}
#journal-modal input:focus,
#journal-modal textarea:focus,
#journal-modal select:focus {
  outline: none !important;
  border-color: rgba(125,211,174,0.40) !important;
  box-shadow: 0 0 0 3px rgba(125,211,174,0.10) !important;
}
/* Direction radio cards */
#journal-modal label[style*="flex:1"] {
  background: rgba(255,255,255,0.03) !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
  border-radius: 10px !important;
  letter-spacing: 0.3px !important;
  font-size: 12px !important;
  color: rgba(240,240,243,0.75) !important;
  text-transform: none !important;
  font-weight: 500 !important;
  transition: all 0.18s !important;
}
#journal-modal label[style*="flex:1"]:hover {
  background: rgba(125,211,174,0.08) !important;
  border-color: rgba(125,211,174,0.20) !important;
}
html[data-theme="clean"] #journal-modal label[style*="flex:1"] {
  background: rgba(255,255,255,0.65) !important;
  border: 1px solid rgba(46,41,64,0.10) !important;
  color: var(--v8-l-text) !important;
}
/* Buttons */
#journal-modal button {
  border-radius: 11px !important;
  font-family: inherit !important;
  font-size: 12px !important;
  letter-spacing: 0.5px !important;
  font-weight: 600 !important;
  padding: 10px 18px !important;
  cursor: pointer !important;
  transition: all 0.18s !important;
}
#journal-modal button[style*="var(--green"],
#journal-modal button[style*="background:var(--green"],
#journal-modal button[style*="background: var(--green"] {
  background: linear-gradient(155deg, rgba(125,211,174,0.30), rgba(125,211,174,0.15)) !important;
  color: var(--v8-bull) !important;
  border: 1px solid rgba(125,211,174,0.35) !important;
}
#journal-modal button[style*="var(--green"]:hover {
  background: linear-gradient(155deg, rgba(125,211,174,0.40), rgba(125,211,174,0.20)) !important;
  box-shadow: 0 0 16px rgba(125,211,174,0.25) !important;
}
#journal-modal #journal-close,
#journal-modal button[style*="transparent"] {
  background: transparent !important;
  color: rgba(240,240,243,0.5) !important;
  border: none !important;
  padding: 4px 10px !important;
}
#journal-modal #journal-close:hover {
  color: var(--v8-bear) !important;
}
html[data-theme="clean"] #journal-modal #journal-close {
  color: rgba(46,41,64,0.55) !important;
}

/* Monday Brief — full v8 design (override existing brief styles) */
body.v8-bias-active #monday-brief .brief-section {
  position: relative;
  padding: 18px 22px;
  margin: 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  background: transparent !important;
}
html[data-theme="clean"] body.v8-bias-active #monday-brief .brief-section {
  border-bottom-color: rgba(46,41,64,0.08);
}
body.v8-bias-active #monday-brief .brief-section:last-child {
  border-bottom: none;
}

/* Section bracket-style label (Macro v2 mockup) */
body.v8-bias-active #monday-brief .brief-sec-title {
  font-size: 9.5px !important;
  letter-spacing: 2.4px !important;
  text-transform: uppercase !important;
  font-weight: 600 !important;
  color: rgba(240,240,243,0.55) !important;
  margin-bottom: 14px !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  width: 100%;
  font-family: -apple-system, 'SF Pro Display', system-ui, sans-serif !important;
}
html[data-theme="clean"] body.v8-bias-active #monday-brief .brief-sec-title {
  color: rgba(46,41,64,0.6) !important;
  border-bottom-color: rgba(46,41,64,0.10);
}

/* COT filter row layout — clean text rows */
body.v8-bias-active #monday-brief .cot-filter-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 6px 0;
  font-size: 12px;
  font-family: -apple-system, 'SF Pro Display', system-ui, sans-serif !important;
}
body.v8-bias-active #monday-brief .cot-filter-label {
  font-size: 10px !important;
  letter-spacing: 1.4px !important;
  text-transform: uppercase !important;
  font-weight: 700 !important;
  min-width: 80px;
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  border: none !important;
}
body.v8-bias-active #monday-brief .cot-filter-label.long { color: var(--v8-bear) !important; }
body.v8-bias-active #monday-brief .cot-filter-label.short { color: var(--v8-bull) !important; }
body.v8-bias-active #monday-brief .cot-filter-label.neutral { color: rgba(240,240,243,0.55) !important; }
html[data-theme="clean"] body.v8-bias-active #monday-brief .cot-filter-label.long { color: var(--v8-bear-stroke-l) !important; }
html[data-theme="clean"] body.v8-bias-active #monday-brief .cot-filter-label.short { color: var(--v8-bull-stroke-l) !important; }
html[data-theme="clean"] body.v8-bias-active #monday-brief .cot-filter-label.neutral { color: rgba(46,41,64,0.55) !important; }
body.v8-bias-active #monday-brief .cot-filter-pill {
  background: transparent !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
  border-radius: 6px !important;
  padding: 3px 8px !important;
  font-size: 11px !important;
  color: var(--v8-d-text) !important;
  box-shadow: none !important;
  font-family: 'SF Mono', monospace !important;
  font-weight: 500 !important;
  letter-spacing: 0.3px !important;
}
html[data-theme="clean"] body.v8-bias-active #monday-brief .cot-filter-pill {
  border: 1px solid rgba(46,41,64,0.10) !important;
  color: var(--v8-l-text) !important;
}

/* Plan week — day rows */
body.v8-bias-active #monday-brief .plan-week-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 5px 0;
  border-left: none !important;
  background: transparent !important;
  font-size: 12px;
}
body.v8-bias-active #monday-brief .plan-week-day {
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
  font-size: 10px !important;
  letter-spacing: 1.4px !important;
  text-transform: uppercase !important;
  font-weight: 700 !important;
  color: rgba(240,240,243,0.65) !important;
  min-width: 80px;
  box-shadow: none !important;
  border: none !important;
}
html[data-theme="clean"] body.v8-bias-active #monday-brief .plan-week-day {
  color: rgba(46,41,64,0.65) !important;
}
body.v8-bias-active #monday-brief .plan-week-day::before {
  content: '' !important;
  display: none !important;
}
body.v8-bias-active #monday-brief .plan-week-events {
  font-size: 11.5px !important;
  color: rgba(240,240,243,0.65) !important;
  font-family: 'SF Mono', monospace !important;
  letter-spacing: 0.2px;
}
html[data-theme="clean"] body.v8-bias-active #monday-brief .plan-week-events {
  color: rgba(46,41,64,0.70) !important;
}

/* Context row (divergences + price moves) */
body.v8-bias-active #monday-brief .price-context-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 5px 0;
  font-size: 12px;
  background: transparent !important;
  border-radius: 0 !important;
  border: none !important;
}
body.v8-bias-active #monday-brief .price-inst {
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.5px;
  min-width: 70px;
  font-family: 'SF Mono', monospace !important;
  color: var(--v8-d-text) !important;
}
html[data-theme="clean"] body.v8-bias-active #monday-brief .price-inst {
  color: var(--v8-l-text) !important;
}
body.v8-bias-active #monday-brief .price-change {
  font-size: 11px !important;
  font-family: 'SF Mono', monospace !important;
  min-width: 70px;
}
body.v8-bias-active #monday-brief .price-tag,
body.v8-bias-active #monday-brief .price-context-note {
  background: transparent !important;
  padding: 0 !important;
  font-size: 11.5px !important;
  border: none !important;
  color: rgba(240,240,243,0.70) !important;
}
html[data-theme="clean"] body.v8-bias-active #monday-brief .price-tag,
html[data-theme="clean"] body.v8-bias-active #monday-brief .price-context-note {
  color: rgba(46,41,64,0.70) !important;
}

/* Win/Loss + Lesson section */
body.v8-bias-active #monday-brief .lesson-card,
body.v8-bias-active #monday-brief .wl-grid {
  background: rgba(255,255,255,0.02) !important;
  border-radius: 12px !important;
  border: 1px solid rgba(255,255,255,0.04) !important;
  padding: 12px 14px !important;
  font-size: 12px;
}
html[data-theme="clean"] body.v8-bias-active #monday-brief .lesson-card,
html[data-theme="clean"] body.v8-bias-active #monday-brief .wl-grid {
  background: rgba(255,255,255,0.40) !important;
  border: 1px solid rgba(46,41,64,0.08) !important;
}

/* Brief note (XAU/XAG/NQ disclaimer) */
body.v8-bias-active #monday-brief .brief-note {
  font-size: 10.5px !important;
  color: rgba(240,240,243,0.40) !important;
  font-style: italic;
  padding: 6px 0 0;
  margin-top: 4px;
}
html[data-theme="clean"] body.v8-bias-active #monday-brief .brief-note {
  color: rgba(46,41,64,0.50) !important;
}

/* Hint pill at top of brief */
body.v8-bias-active #monday-brief .swing-hint {
  background: rgba(232,184,122,0.10) !important;
  border: 1px solid rgba(232,184,122,0.25) !important;
  border-radius: 11px !important;
  color: var(--v8-warm-amber) !important;
  font-size: 11.5px !important;
  padding: 9px 14px !important;
  margin: 12px 22px !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
body.v8-bias-active #monday-brief .swing-hint .swing-switch-btn {
  background: rgba(232,184,122,0.20) !important;
  color: var(--v8-warm-amber) !important;
  border: 1px solid rgba(232,184,122,0.35) !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px !important;
  padding: 4px 10px !important;
  border-radius: 7px !important;
}

/* TOP CONVICTION heart-beat pulse on instrument name */
@keyframes v8-heartbeat-pulse {
  0%, 70%, 100% { opacity: 1; transform: scale(1); }
  10% { opacity: 0.5; transform: scale(0.96); }
  20% { opacity: 1; transform: scale(1.02); }
  30% { opacity: 0.7; transform: scale(0.98); }
  40% { opacity: 1; transform: scale(1); }
}
body.v8-bias-active .v8-card.is-top .bias-symbol {
  display: inline-block;
  animation: v8-heartbeat-pulse 1.4s ease-in-out infinite;
  text-shadow: 0 0 14px var(--acc);
}

/* Hide group filter chips when filter is in Settings (we removed UI from Bias page) */
body.v8-bias-active .v8-group-filter {
  display: none !important;
}

/* Top conviction label colored by bias direction */
body.v8-bias-active .v8-card.is-top .top-conviction-lbl {
  color: var(--acc);
  text-shadow: 0 0 8px var(--acc);
}

/* Align top-nav inner with page-inner (same horizontal padding) */
body.v8-bias-active #header {
  padding: 0 !important;
}
.v8-nav-inner {
  padding: 0 20px;
  max-width: 1660px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}


/* ── v40.5 — Monday Brief v8-brief-* classes ──────────────── */
body.v8-bias-active #monday-brief .v8-brief-section {
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
body.v8-bias-active #monday-brief .v8-brief-section:last-child {
  border-bottom: none;
}
html[data-theme="clean"] body.v8-bias-active #monday-brief .v8-brief-section {
  border-bottom-color: rgba(46,41,64,0.08);
}

body.v8-bias-active #monday-brief .v8-brief-sec-title {
  font-size: 10px;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(240,240,243,0.55);
  margin-bottom: 14px;
  font-family: -apple-system, 'SF Pro Display', system-ui, sans-serif;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
html[data-theme="clean"] body.v8-bias-active #monday-brief .v8-brief-sec-title {
  color: rgba(46,41,64,0.6);
  border-bottom-color: rgba(46,41,64,0.08);
}

/* COT filter rows */
body.v8-bias-active #monday-brief .v8-brief-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 6px 0;
  font-family: -apple-system, 'SF Pro Display', system-ui, sans-serif;
}
body.v8-bias-active #monday-brief .v8-brief-row-label {
  font-size: 10px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  font-weight: 700;
  min-width: 90px;
  white-space: nowrap;
}
body.v8-bias-active #monday-brief .v8-brief-row-label.bull { color: var(--v8-bull); }
body.v8-bias-active #monday-brief .v8-brief-row-label.bear { color: var(--v8-bear); }
body.v8-bias-active #monday-brief .v8-brief-row-label.neutral { color: rgba(240,240,243,0.55); }
html[data-theme="clean"] body.v8-bias-active #monday-brief .v8-brief-row-label.bull { color: var(--v8-bull-stroke-l); }
html[data-theme="clean"] body.v8-bias-active #monday-brief .v8-brief-row-label.bear { color: var(--v8-bear-stroke-l); }
html[data-theme="clean"] body.v8-bias-active #monday-brief .v8-brief-row-label.neutral { color: rgba(46,41,64,0.55); }

body.v8-bias-active #monday-brief .v8-brief-row-values {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
body.v8-bias-active #monday-brief .v8-brief-ccy {
  font-size: 11.5px;
  color: var(--v8-d-text);
  font-family: 'SF Mono', monospace;
  font-weight: 600;
  letter-spacing: 0.3px;
}
html[data-theme="clean"] body.v8-bias-active #monday-brief .v8-brief-ccy {
  color: var(--v8-l-text);
}
body.v8-bias-active #monday-brief .v8-brief-pct {
  color: rgba(240,240,243,0.45);
  font-weight: 400;
}
html[data-theme="clean"] body.v8-bias-active #monday-brief .v8-brief-pct {
  color: rgba(46,41,64,0.50);
}

/* Day rows (Plán týždňa) */
body.v8-bias-active #monday-brief .v8-brief-day-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 14px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  font-family: -apple-system, 'SF Pro Display', system-ui, sans-serif;
}
body.v8-bias-active #monday-brief .v8-brief-day-row:last-child {
  border-bottom: none;
}
html[data-theme="clean"] body.v8-bias-active #monday-brief .v8-brief-day-row {
  border-bottom-color: rgba(46,41,64,0.05);
}
body.v8-bias-active #monday-brief .v8-brief-day-name {
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(240,240,243,0.65);
}
html[data-theme="clean"] body.v8-bias-active #monday-brief .v8-brief-day-name {
  color: rgba(46,41,64,0.65);
}
body.v8-bias-active #monday-brief .v8-brief-day-row.major .v8-brief-day-name { color: var(--v8-bear); }
body.v8-bias-active #monday-brief .v8-brief-day-row.high  .v8-brief-day-name { color: var(--v8-warm-amber); }
html[data-theme="clean"] body.v8-bias-active #monday-brief .v8-brief-day-row.major .v8-brief-day-name { color: var(--v8-bear-stroke-l); }
html[data-theme="clean"] body.v8-bias-active #monday-brief .v8-brief-day-row.high .v8-brief-day-name { color: #b8741a; }

body.v8-bias-active #monday-brief .v8-brief-day-events {
  font-size: 11.5px;
  color: rgba(240,240,243,0.65);
  font-family: 'SF Mono', monospace;
  letter-spacing: 0.2px;
  line-height: 1.55;
}
html[data-theme="clean"] body.v8-bias-active #monday-brief .v8-brief-day-events {
  color: rgba(46,41,64,0.70);
}

/* Price rows (kontext minulého týždňa) */
body.v8-bias-active #monday-brief .v8-brief-price-row {
  display: grid;
  grid-template-columns: 80px 80px 1fr;
  gap: 14px;
  padding: 6px 0;
  align-items: baseline;
  font-family: -apple-system, 'SF Pro Display', system-ui, sans-serif;
}
body.v8-bias-active #monday-brief .v8-brief-price-inst {
  font-family: 'SF Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--v8-d-text);
  letter-spacing: 0.4px;
}
html[data-theme="clean"] body.v8-bias-active #monday-brief .v8-brief-price-inst {
  color: var(--v8-l-text);
}
body.v8-bias-active #monday-brief .v8-brief-price-pct {
  font-family: 'SF Mono', monospace;
  font-size: 12px;
}
body.v8-bias-active #monday-brief .v8-brief-price-pct.bull { color: var(--v8-bull); }
body.v8-bias-active #monday-brief .v8-brief-price-pct.bear { color: var(--v8-bear); }
body.v8-bias-active #monday-brief .v8-brief-price-pct.neutral { color: rgba(240,240,243,0.50); }
html[data-theme="clean"] body.v8-bias-active #monday-brief .v8-brief-price-pct.bull { color: var(--v8-bull-stroke-l); }
html[data-theme="clean"] body.v8-bias-active #monday-brief .v8-brief-price-pct.bear { color: var(--v8-bear-stroke-l); }
html[data-theme="clean"] body.v8-bias-active #monday-brief .v8-brief-price-pct.neutral { color: rgba(46,41,64,0.50); }
body.v8-bias-active #monday-brief .v8-brief-price-label {
  font-size: 11.5px;
}
body.v8-bias-active #monday-brief .v8-brief-price-label.bull    { color: var(--v8-bull); }
body.v8-bias-active #monday-brief .v8-brief-price-label.amber   { color: var(--v8-warm-amber); }
body.v8-bias-active #monday-brief .v8-brief-price-label.neutral { color: rgba(240,240,243,0.55); }
html[data-theme="clean"] body.v8-bias-active #monday-brief .v8-brief-price-label.bull { color: var(--v8-bull-stroke-l); }
html[data-theme="clean"] body.v8-bias-active #monday-brief .v8-brief-price-label.amber { color: #b8741a; }
html[data-theme="clean"] body.v8-bias-active #monday-brief .v8-brief-price-label.neutral { color: rgba(46,41,64,0.55); }

/* Loading / empty / note */
body.v8-bias-active #monday-brief .v8-brief-loading,
body.v8-bias-active #monday-brief .v8-brief-empty {
  font-size: 12px;
  color: rgba(240,240,243,0.40);
  font-style: italic;
  padding: 8px 0;
}
html[data-theme="clean"] body.v8-bias-active #monday-brief .v8-brief-loading,
html[data-theme="clean"] body.v8-bias-active #monday-brief .v8-brief-empty {
  color: rgba(46,41,64,0.55);
}
body.v8-bias-active #monday-brief .v8-brief-note {
  font-size: 10.5px;
  color: rgba(240,240,243,0.40);
  font-style: italic;
  padding-top: 8px;
  margin-top: 4px;
  border-top: 1px solid rgba(255,255,255,0.04);
}
html[data-theme="clean"] body.v8-bias-active #monday-brief .v8-brief-note {
  color: rgba(46,41,64,0.50);
  border-top-color: rgba(46,41,64,0.06);
}
body.v8-bias-active #monday-brief .v8-brief-retry-btn {
  background: rgba(232,184,122,0.10);
  color: var(--v8-warm-amber);
  border: 1px solid rgba(232,184,122,0.25);
  border-radius: 8px;
  font-size: 11px;
  letter-spacing: 0.5px;
  font-weight: 600;
  padding: 6px 12px;
  margin-top: 8px;
  cursor: pointer;
  font-family: inherit;
}

/* Mode hint banner */
body.v8-bias-active #monday-brief .v8-brief-hint {
  background: rgba(232,184,122,0.10);
  border: 1px solid rgba(232,184,122,0.25);
  border-radius: 12px;
  color: var(--v8-warm-amber);
  font-size: 12px;
  padding: 11px 16px;
  margin: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
body.v8-bias-active #monday-brief .v8-brief-hint-text {
  flex: 1;
  letter-spacing: 0.2px;
}
body.v8-bias-active #monday-brief .v8-brief-hint-btn {
  background: rgba(232,184,122,0.20);
  color: var(--v8-warm-amber);
  border: 1px solid rgba(232,184,122,0.35);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 5px 12px;
  border-radius: 7px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
html[data-theme="clean"] body.v8-bias-active #monday-brief .v8-brief-hint {
  color: #b8741a;
  background: rgba(232,184,122,0.14);
  border-color: rgba(232,184,122,0.40);
}
html[data-theme="clean"] body.v8-bias-active #monday-brief .v8-brief-hint-btn {
  color: #b8741a;
  background: rgba(232,184,122,0.25);
  border-color: rgba(232,184,122,0.50);
}


/* Radial item — hover state (when finger is dragged over it) */
.v8-radial-item.hover {
  transform: var(--final-transform, none) scale(1.15) !important;
  border-color: rgba(125,211,174,0.65) !important;
  box-shadow: 0 0 22px rgba(125,211,174,0.50), 0 8px 22px rgba(0,0,0,0.55) !important;
  z-index: 5;
}
html[data-theme="clean"] .v8-radial-item.hover {
  border-color: rgba(154,139,191,0.65) !important;
  box-shadow: 0 0 22px rgba(154,139,191,0.55), 0 8px 22px rgba(106,90,145,0.25) !important;
}
.v8-radial-item.hover .v8-radial-letter {
  color: var(--v8-bull);
  text-shadow: 0 0 10px rgba(125,211,174,0.70);
}
html[data-theme="clean"] .v8-radial-item.hover .v8-radial-letter {
  color: var(--v8-light-pulse-deep);
  text-shadow: 0 0 10px rgba(154,139,191,0.70);
}

/* Touch-action: none on pulse btn — prevents browser scroll/zoom on drag */
.v8-pulse-btn {
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}


/* ── Journal modal — v8 class-based design ────────────────── */
.jm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 12, 0.78);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 9998;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 12px;
  overflow-y: auto;
  animation: jm-fade-in 0.2s ease-out;
}
html[data-theme="clean"] .jm-overlay {
  background: rgba(46, 41, 64, 0.40);
}
@keyframes jm-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.jm-card {
  background: linear-gradient(155deg, #1f1f24 0%, #1a1a1d 100%);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 22px;
  box-shadow: 0 30px 70px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.06);
  max-width: 520px;
  width: 100%;
  margin: auto;
  padding: 26px 24px;
  animation: jm-pop-in 0.28s cubic-bezier(0.16,1,0.3,1);
  font-family: -apple-system, 'SF Pro Display', system-ui, sans-serif;
}
html[data-theme="clean"] .jm-card {
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(255,255,255,0.85);
  box-shadow: 0 30px 70px rgba(46,41,64,0.30), inset 0 1px 0 rgba(255,255,255,0.95);
}
@keyframes jm-pop-in {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.jm-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}
.jm-title {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.3px;
  color: var(--v8-bull);
}
html[data-theme="clean"] .jm-title {
  color: var(--v8-bull-stroke-l);
}
.jm-close {
  background: transparent;
  border: none;
  color: rgba(240,240,243,0.50);
  font-size: 24px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s;
}
.jm-close:hover {
  background: rgba(232,154,142,0.10);
  color: var(--v8-bear);
}
html[data-theme="clean"] .jm-close {
  color: rgba(46,41,64,0.55);
}
html[data-theme="clean"] .jm-close:hover {
  background: rgba(196,116,103,0.12);
  color: var(--v8-bear-stroke-l);
}

.jm-field {
  margin-bottom: 16px;
}
.jm-label {
  display: block;
  font-size: 10px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(240,240,243,0.55);
  margin-bottom: 7px;
}
html[data-theme="clean"] .jm-label {
  color: rgba(46,41,64,0.60);
}
.jm-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.jm-input {
  width: 100%;
  padding: 11px 13px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--v8-d-text);
  border-radius: 11px;
  font-size: 13px;
  font-family: inherit;
  letter-spacing: 0.2px;
  transition: all 0.18s;
  box-sizing: border-box;
}
html[data-theme="clean"] .jm-input {
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(46,41,64,0.10);
  color: var(--v8-l-text);
}
.jm-input:focus {
  outline: none;
  border-color: rgba(125,211,174,0.40);
  box-shadow: 0 0 0 3px rgba(125,211,174,0.10);
  background: rgba(255,255,255,0.06);
}
html[data-theme="clean"] .jm-input:focus {
  background: rgba(255,255,255,0.85);
  border-color: rgba(107,168,139,0.50);
  box-shadow: 0 0 0 3px rgba(125,211,174,0.15);
}
.jm-textarea {
  resize: vertical;
  min-height: 90px;
}

/* Direction radio row */
.jm-dir-row {
  display: flex;
  gap: 8px;
}
.jm-dir-opt {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 11px;
  cursor: pointer;
  font-size: 12.5px;
  color: rgba(240,240,243,0.75);
  letter-spacing: 0.3px;
  font-weight: 500;
  transition: all 0.18s;
  position: relative;
}
.jm-dir-opt:hover {
  background: rgba(125,211,174,0.08);
  border-color: rgba(125,211,174,0.20);
}
.jm-dir-opt.selected {
  background: rgba(125,211,174,0.15);
  border-color: rgba(125,211,174,0.40);
  color: var(--v8-bull);
}
.jm-dir-opt.selected.long {
  background: rgba(125,211,174,0.15);
  border-color: rgba(125,211,174,0.40);
  color: var(--v8-bull);
}
.jm-dir-opt.selected.short {
  background: rgba(232,154,142,0.15);
  border-color: rgba(232,154,142,0.40);
  color: var(--v8-bear);
}
.jm-dir-opt.selected.watch {
  background: rgba(154,139,191,0.15);
  border-color: rgba(154,139,191,0.40);
  color: #b3a3d6;
}
.jm-dir-opt input[type=radio] {
  margin: 0;
  accent-color: var(--v8-bull);
}
html[data-theme="clean"] .jm-dir-opt {
  background: rgba(255,255,255,0.55);
  border-color: rgba(46,41,64,0.10);
  color: var(--v8-l-text);
}
html[data-theme="clean"] .jm-dir-opt.selected {
  background: rgba(125,211,174,0.20);
  border-color: rgba(107,168,139,0.45);
  color: var(--v8-bull-stroke-l);
}
html[data-theme="clean"] .jm-dir-opt.selected.short {
  background: rgba(232,154,142,0.20);
  border-color: rgba(196,116,103,0.50);
  color: var(--v8-bear-stroke-l);
}
html[data-theme="clean"] .jm-dir-opt.selected.watch {
  background: rgba(154,139,191,0.20);
  border-color: rgba(154,139,191,0.50);
  color: var(--v8-light-pulse-deep);
}

.jm-pill-btn {
  background: rgba(125,211,174,0.10);
  border: 1px solid rgba(125,211,174,0.25);
  color: var(--v8-bull);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 10.5px;
  letter-spacing: 0.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.jm-pill-btn:hover {
  background: rgba(125,211,174,0.18);
  border-color: rgba(125,211,174,0.40);
}
html[data-theme="clean"] .jm-pill-btn {
  background: rgba(125,211,174,0.14);
  border: 1px solid rgba(107,168,139,0.35);
  color: var(--v8-bull-stroke-l);
}

.jm-empty {
  font-size: 11.5px;
  color: rgba(240,240,243,0.45);
  text-align: center;
  padding: 12px;
  background: rgba(255,255,255,0.02);
  border: 1px dashed rgba(255,255,255,0.08);
  border-radius: 11px;
}
html[data-theme="clean"] .jm-empty {
  color: rgba(46,41,64,0.55);
  background: rgba(255,255,255,0.40);
  border: 1px dashed rgba(46,41,64,0.18);
}

.jm-hint {
  font-size: 10.5px;
  color: rgba(240,240,243,0.45);
  margin-top: 6px;
  line-height: 1.5;
  letter-spacing: 0.1px;
}
html[data-theme="clean"] .jm-hint {
  color: rgba(46,41,64,0.55);
}

.jm-actions {
  display: flex;
  gap: 8px;
  margin-top: 22px;
}
.jm-btn {
  border: none;
  padding: 11px 18px;
  border-radius: 11px;
  font-size: 12.5px;
  font-family: inherit;
  font-weight: 600;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: all 0.18s;
}
.jm-btn-fill { flex: 1; }
.jm-btn-primary {
  background: linear-gradient(155deg, rgba(125,211,174,0.30), rgba(125,211,174,0.15));
  color: var(--v8-bull);
  border: 1px solid rgba(125,211,174,0.40);
}
.jm-btn-primary:hover {
  background: linear-gradient(155deg, rgba(125,211,174,0.40), rgba(125,211,174,0.22));
  box-shadow: 0 0 16px rgba(125,211,174,0.25);
}
html[data-theme="clean"] .jm-btn-primary {
  background: linear-gradient(155deg, rgba(125,211,174,0.35), rgba(125,211,174,0.20));
  color: var(--v8-bull-stroke-l);
  border: 1px solid rgba(107,168,139,0.50);
}
.jm-btn-ghost {
  background: rgba(255,255,255,0.04);
  color: rgba(240,240,243,0.70);
  border: 1px solid rgba(255,255,255,0.06);
}
.jm-btn-ghost:hover {
  background: rgba(255,255,255,0.08);
}
html[data-theme="clean"] .jm-btn-ghost {
  background: rgba(255,255,255,0.55);
  color: var(--v8-l-text);
  border: 1px solid rgba(46,41,64,0.10);
}
html[data-theme="clean"] .jm-btn-ghost:hover {
  background: rgba(255,255,255,0.75);
}
.jm-btn-danger {
  background: rgba(232,154,142,0.10);
  color: var(--v8-bear);
  border: 1px solid rgba(232,154,142,0.30);
}
.jm-btn-danger:hover {
  background: rgba(232,154,142,0.20);
}
html[data-theme="clean"] .jm-btn-danger {
  background: rgba(232,154,142,0.14);
  color: var(--v8-bear-stroke-l);
  border: 1px solid rgba(196,116,103,0.35);
}


/* ── v40.6 — Monday Brief v7 layout ───────────────────────── */

/* COT block */
body.v8-bias-active #monday-brief .v8-cot-block {
  margin-bottom: 14px;
}
body.v8-bias-active #monday-brief .v8-cot-block-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  margin-bottom: 7px;
  text-transform: uppercase;
}
body.v8-bias-active #monday-brief .v8-cot-block.long .v8-cot-block-label { color: var(--v8-bull); }
body.v8-bias-active #monday-brief .v8-cot-block.short .v8-cot-block-label { color: var(--v8-bear); }
body.v8-bias-active #monday-brief .v8-cot-block.neutral .v8-cot-block-label { color: rgba(240,240,243,0.55); }
html[data-theme="clean"] body.v8-bias-active #monday-brief .v8-cot-block.long .v8-cot-block-label { color: var(--v8-bull-stroke-l); }
html[data-theme="clean"] body.v8-bias-active #monday-brief .v8-cot-block.short .v8-cot-block-label { color: var(--v8-bear-stroke-l); }
html[data-theme="clean"] body.v8-bias-active #monday-brief .v8-cot-block.neutral .v8-cot-block-label { color: rgba(46,41,64,0.55); }

body.v8-bias-active #monday-brief .v8-cot-currency-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.03);
  border-radius: 9px;
  margin-bottom: 5px;
  font-size: 12px;
}
html[data-theme="clean"] body.v8-bias-active #monday-brief .v8-cot-currency-row {
  background: rgba(255,255,255,0.40);
  border: 1px solid rgba(255,255,255,0.55);
}
body.v8-bias-active #monday-brief .v8-cot-cur {
  font-weight: 700;
  letter-spacing: 0.5px;
  font-family: 'SF Mono', monospace;
  color: var(--v8-d-text);
  min-width: 38px;
  font-size: 11.5px;
}
html[data-theme="clean"] body.v8-bias-active #monday-brief .v8-cot-cur { color: var(--v8-l-text); }
body.v8-bias-active #monday-brief .v8-cot-pct {
  color: rgba(240,240,243,0.45);
  font-family: 'SF Mono', monospace;
  font-size: 10.5px;
  min-width: 48px;
}
html[data-theme="clean"] body.v8-bias-active #monday-brief .v8-cot-pct { color: rgba(46,41,64,0.50); }
body.v8-bias-active #monday-brief .v8-cot-desc {
  font-size: 11px;
  color: rgba(240,240,243,0.65);
  line-height: 1.45;
  flex: 1;
  font-family: -apple-system, 'SF Pro Display', system-ui, sans-serif;
}
html[data-theme="clean"] body.v8-bias-active #monday-brief .v8-cot-desc { color: rgba(46,41,64,0.72); }

/* Plan day row with impact left border */
body.v8-bias-active #monday-brief .v8-brief-day-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 8px 12px 8px 14px;
  margin-bottom: 5px;
  border-radius: 9px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.03);
  border-left-width: 3px;
  border-left-style: solid;
  font-size: 11.5px;
  line-height: 1.55;
  grid-template-columns: unset;
}
html[data-theme="clean"] body.v8-bias-active #monday-brief .v8-brief-day-row {
  background: rgba(255,255,255,0.35);
  border: 1px solid rgba(255,255,255,0.55);
  border-left-width: 3px;
  border-left-style: solid;
}
body.v8-bias-active #monday-brief .v8-brief-day-row.impact-high { border-left-color: var(--v8-bear); }
body.v8-bias-active #monday-brief .v8-brief-day-row.impact-med  { border-left-color: var(--v8-warm-amber); }
body.v8-bias-active #monday-brief .v8-brief-day-row.impact-low  { border-left-color: var(--v8-neutral); }
body.v8-bias-active #monday-brief .v8-brief-day-row.impact-none { border-left-color: rgba(255,255,255,0.06); }
html[data-theme="clean"] body.v8-bias-active #monday-brief .v8-brief-day-row.impact-none { border-left-color: rgba(46,41,64,0.08); }

body.v8-bias-active #monday-brief .v8-brief-day-name {
  font-weight: 600;
  color: var(--v8-d-text);
  min-width: 75px;
  letter-spacing: 0.3px;
  font-size: 12px;
}
html[data-theme="clean"] body.v8-bias-active #monday-brief .v8-brief-day-name { color: var(--v8-l-text); }
body.v8-bias-active #monday-brief .v8-brief-day-events {
  color: rgba(240,240,243,0.65);
  flex: 1;
  font-family: 'SF Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.1px;
}
html[data-theme="clean"] body.v8-bias-active #monday-brief .v8-brief-day-events { color: rgba(46,41,64,0.70); }

/* Major event pill (inline) */
body.v8-bias-active #monday-brief .v8-ev-major {
  display: inline-block;
  padding: 1px 6px;
  margin: 0 3px;
  background: rgba(232,184,122,0.14);
  color: var(--v8-warm-amber);
  border: 1px solid rgba(232,184,122,0.30);
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  font-family: -apple-system, 'SF Pro Display', system-ui, sans-serif;
  vertical-align: middle;
}
html[data-theme="clean"] body.v8-bias-active #monday-brief .v8-ev-major { color: #b8741a; }
body.v8-bias-active #monday-brief .v8-ev-done {
  color: var(--v8-bull);
  opacity: 0.75;
  font-weight: 700;
  font-size: 10px;
}
html[data-theme="clean"] body.v8-bias-active #monday-brief .v8-ev-done { color: var(--v8-bull-stroke-l); }

/* Divergence rows (Kontext minulého týždňa) */
body.v8-bias-active #monday-brief .v8-brief-divergence {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 8px 12px;
  margin-bottom: 5px;
  background: rgba(255,255,255,0.025);
  border-radius: 9px;
  border: 1px solid rgba(255,255,255,0.03);
  font-size: 11.5px;
}
html[data-theme="clean"] body.v8-bias-active #monday-brief .v8-brief-divergence {
  background: rgba(255,255,255,0.35);
  border: 1px solid rgba(255,255,255,0.55);
}
body.v8-bias-active #monday-brief .v8-brief-div-sym {
  font-weight: 700;
  min-width: 75px;
  color: var(--v8-d-text);
  font-family: 'SF Mono', monospace;
  font-size: 11.5px;
  letter-spacing: 0.4px;
}
html[data-theme="clean"] body.v8-bias-active #monday-brief .v8-brief-div-sym { color: var(--v8-l-text); }
body.v8-bias-active #monday-brief .v8-brief-div-pct {
  min-width: 60px;
  font-family: 'SF Mono', monospace;
  font-size: 12px;
  font-weight: 600;
}
body.v8-bias-active #monday-brief .v8-brief-div-pct.bull    { color: var(--v8-bull); }
body.v8-bias-active #monday-brief .v8-brief-div-pct.bear    { color: var(--v8-bear); }
body.v8-bias-active #monday-brief .v8-brief-div-pct.neutral { color: rgba(240,240,243,0.50); }
html[data-theme="clean"] body.v8-bias-active #monday-brief .v8-brief-div-pct.bull { color: var(--v8-bull-stroke-l); }
html[data-theme="clean"] body.v8-bias-active #monday-brief .v8-brief-div-pct.bear { color: var(--v8-bear-stroke-l); }
html[data-theme="clean"] body.v8-bias-active #monday-brief .v8-brief-div-pct.neutral { color: rgba(46,41,64,0.55); }
body.v8-bias-active #monday-brief .v8-brief-div-note {
  flex: 1;
  font-size: 11px;
  color: rgba(240,240,243,0.65);
  line-height: 1.45;
  letter-spacing: 0.2px;
}
html[data-theme="clean"] body.v8-bias-active #monday-brief .v8-brief-div-note { color: rgba(46,41,64,0.70); }

/* ── Monday Brief HEADER — fix blue tint on hover/click ──── */
body.v8-bias-active #monday-brief .brief-header {
  background: transparent !important;
  cursor: pointer;
}
body.v8-bias-active #monday-brief .brief-header:hover {
  background: rgba(255,255,255,0.015) !important;
}
html[data-theme="clean"] body.v8-bias-active #monday-brief .brief-header:hover {
  background: rgba(255,255,255,0.30) !important;
}
body.v8-bias-active #monday-brief .brief-header:active,
body.v8-bias-active #monday-brief .brief-header:focus {
  background: rgba(255,255,255,0.025) !important;
  outline: none;
}


/* ── v40.6 — radial full circle + inline override on mobile + bigger panel ── */

/* Radial container needs more space for full circle */
.v8-pulse-radial {
  width: 56px;
  height: 56px;
  /* The radial items extend from this center via transform — no extra layout needed */
}

/* Override panel inline — desktop + mobile uniform */
.v8-override-panel-inline {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  width: 145px;
  z-index: 5;
  animation: v8-panel-slide-in 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 14px 11px 11px !important;
}
.v8-override-panel-inline .v8-override-title {
  font-size: 8.5px;
  letter-spacing: 1.6px;
  margin-bottom: 10px;
}
.v8-override-panel-inline .v8-override-opt {
  padding: 7px 6px;
  font-size: 9px;
  letter-spacing: 0.6px;
  margin-bottom: 4px;
}
.v8-override-panel-inline .v8-override-revert,
.v8-override-panel-inline .v8-override-plan {
  font-size: 9.5px;
  padding: 7px 6px;
  margin-top: 6px;
}
.v8-override-panel-inline .v8-override-divider {
  margin: 10px -11px 6px;
}

/* On mobile, override panel can take a bit more width since card is wider */
@media (max-width: 900px) {
  .v8-override-panel-inline {
    width: 150px;
    right: 16px;
  }
  /* Ring slides further left on mobile (card is wider, ring stays in same proportion) */
  body.v8-bias-active .v8-card.v8-card-override-open .inst-ring-wrap {
    transform: translateX(-25%);
  }
}

/* On desktop, ring slides more aggressively */
@media (min-width: 901px) {
  body.v8-bias-active .v8-card.v8-card-override-open .inst-ring-wrap {
    transform: translateX(-32%);
  }
}


/* ── v40.7 fixes ───────────────────────────────────────── */

/* iOS Safari: prevent text selection anywhere during radial drag */
body.v8-radial-active,
body.v8-radial-active * {
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
}
.v8-pulse-btn,
.v8-pulse-radial,
.v8-radial-item {
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
  touch-action: none !important;
}

/* Pulse btn — sit higher above browser chrome on mobile */
@media (max-width: 900px) {
  .v8-pulse-btn {
    bottom: max(90px, env(safe-area-inset-bottom, 90px));
  }
}

/* Radial menu — full circle but radius smaller and pivoted so it stays on screen */
.v8-pulse-radial {
  /* The transform anchor is centered on pulse btn — items position via JS translate */
  pointer-events: none;
}
.v8-pulse-radial.open { pointer-events: auto; }

/* Radial items — better hit target + clear hover state */
.v8-radial-item {
  width: 64px !important;
  height: 64px !important;
  margin-left: -32px !important;
  margin-top: -32px !important;
  top: 50% !important;
  left: 50% !important;
}
.v8-radial-letter { font-size: 16px !important; font-weight: 500 !important; }
.v8-radial-label  { font-size: 8.5px !important; }

/* Hover state — bigger feedback, ring around item */
.v8-radial-item.hover {
  transform: var(--final-transform, none) scale(1.25) !important;
  border-color: rgba(125,211,174,0.85) !important;
  box-shadow:
    0 0 0 4px rgba(125,211,174,0.25),
    0 0 28px rgba(125,211,174,0.60),
    0 8px 22px rgba(0,0,0,0.55) !important;
  z-index: 10 !important;
}
html[data-theme="clean"] .v8-radial-item.hover {
  border-color: rgba(154,139,191,0.85) !important;
  box-shadow:
    0 0 0 4px rgba(154,139,191,0.25),
    0 0 28px rgba(154,139,191,0.60),
    0 8px 22px rgba(106,90,145,0.30) !important;
}

/* Mobile override — full bottom-sheet modal (like v8 mockup mobile) */
.v8-override-panel-mobile {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: calc(100vw - 32px) !important;
  max-width: 340px !important;
  max-height: calc(100vh - 64px) !important;
  overflow-y: auto !important;
  z-index: 1100 !important;
  padding: 16px 14px 12px !important;
  animation: v8-panel-pop-center 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.v8-override-panel-mobile .v8-override-title {
  font-size: 10px;
  letter-spacing: 2.4px;
  margin-bottom: 14px;
}
.v8-override-panel-mobile .v8-override-opt {
  padding: 12px 8px;
  font-size: 11px;
  letter-spacing: 1.4px;
  margin-bottom: 6px;
}
.v8-override-panel-mobile .v8-override-revert,
.v8-override-panel-mobile .v8-override-plan {
  font-size: 12px;
  padding: 11px;
  margin-top: 8px;
}
.v8-override-panel-mobile .v8-override-divider {
  margin: 12px -14px 8px;
}
@keyframes v8-panel-pop-center {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.92); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes v8-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.v8-override-backdrop.mobile {
  display: block !important;
  position: fixed;
  inset: 0;
  background: rgba(10,10,12,0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 1099;
  animation: v8-fade-in 0.18s;
}

/* Desktop inline panel — adjusted dimensions */
@media (min-width: 901px) {
  .v8-override-panel-inline {
    width: 140px !important;
    right: 12px !important;
    padding: 12px 10px 10px !important;
  }
  body.v8-bias-active .v8-card.v8-card-override-open .inst-ring-wrap {
    transform: translateX(-38%) !important;
  }
}

/* Light theme — impact left border colors (was missing) */
html[data-theme="clean"] body.v8-bias-active #monday-brief .v8-brief-day-row.impact-high { border-left-color: var(--v8-bear-stroke-l) !important; }
html[data-theme="clean"] body.v8-bias-active #monday-brief .v8-brief-day-row.impact-med  { border-left-color: #b8741a !important; }
html[data-theme="clean"] body.v8-bias-active #monday-brief .v8-brief-day-row.impact-low  { border-left-color: rgba(46,41,64,0.30) !important; }

/* Sharp corner fix — countdown panel, brief, all v8 surfaces on mobile */
@media (max-width: 900px) {
  body.v8-bias-active .countdown-panel,
  body.v8-bias-active .countdown-panel * {
    border-radius: 14px;
  }
  body.v8-bias-active .v8-card {
    border-radius: 20px !important;
    overflow: hidden;
  }
  body.v8-bias-active #monday-brief {
    border-radius: 22px !important;
    overflow: hidden;
  }
  /* Countdown content — inset rows */
  body.v8-bias-active .countdown-events-list {
    border-radius: 11px;
    overflow: hidden;
  }
}


/* ── v40.8 fixes ───────────────────────────────────────── */

/* RADIAL MENU — fixed at screen center so full circle is always visible */
.v8-pulse-radial {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  bottom: auto !important;
  width: 0 !important;  /* zero-width anchor; items position from this center via transform */
  height: 0 !important;
  z-index: 1001 !important;
  pointer-events: none;
  display: block !important;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.18s ease-out;
}
.v8-pulse-radial.open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
.v8-radial-item {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  margin: -32px 0 0 -32px !important; /* center 64x64 item on anchor */
  width: 64px !important;
  height: 64px !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(155deg, #26262c 0%, #1a1a1d 100%);
  border: 1.5px solid rgba(125,211,174,0.30);
  border-radius: 50%;
  box-shadow: 0 8px 22px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.06);
  cursor: pointer;
  transition: opacity 0.2s, transform 0.18s cubic-bezier(0.16,1,0.3,1), border-color 0.18s, box-shadow 0.18s !important;
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
  touch-action: none !important;
}
html[data-theme="clean"] .v8-radial-item {
  background: rgba(255,255,255,0.96);
  border: 1.5px solid rgba(154,139,191,0.45);
  box-shadow: 0 8px 22px rgba(106,90,145,0.22), inset 0 1px 0 rgba(255,255,255,0.95);
}
.v8-radial-item.active {
  border-color: rgba(125,211,174,0.65);
  box-shadow: 0 0 18px rgba(125,211,174,0.40), 0 8px 22px rgba(0,0,0,0.55);
}
.v8-radial-item.hover {
  transform: scale(1.30) translateZ(0) !important;
  border-color: rgba(125,211,174,0.90) !important;
  box-shadow:
    0 0 0 6px rgba(125,211,174,0.20),
    0 0 30px rgba(125,211,174,0.70),
    0 8px 22px rgba(0,0,0,0.55) !important;
  z-index: 12 !important;
  background: linear-gradient(155deg, #2e2e36 0%, #1f1f24 100%) !important;
}
html[data-theme="clean"] .v8-radial-item.hover {
  background: rgba(255,255,255,0.98) !important;
  border-color: rgba(154,139,191,0.90) !important;
  box-shadow:
    0 0 0 6px rgba(154,139,191,0.20),
    0 0 30px rgba(154,139,191,0.70),
    0 8px 22px rgba(106,90,145,0.30) !important;
}
.v8-radial-letter {
  font-size: 17px;
  font-weight: 500;
  color: var(--v8-d-text);
  line-height: 1;
  letter-spacing: -0.5px;
}
html[data-theme="clean"] .v8-radial-letter {
  color: var(--v8-light-pulse-deep);
}
.v8-radial-label {
  font-size: 8px;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: rgba(240,240,243,0.55);
  margin-top: 3px;
  font-weight: 600;
}
html[data-theme="clean"] .v8-radial-label {
  color: rgba(46,41,64,0.60);
}
.v8-radial-item.hover .v8-radial-letter {
  color: var(--v8-bull);
}
html[data-theme="clean"] .v8-radial-item.hover .v8-radial-letter {
  color: var(--v8-bull-stroke-l);
}

/* Center hint text inside radial circle */
.v8-radial-center-hint {
  position: absolute;
  top: 0;
  left: 0;
  width: 110px;
  margin: -22px 0 0 -55px;
  text-align: center;
  font-size: 11px;
  font-weight: 500;
  color: rgba(240,240,243,0.70);
  pointer-events: none;
  letter-spacing: 0.3px;
  line-height: 1.3;
}
.v8-radial-center-sub {
  font-size: 9px;
  letter-spacing: 1.2px;
  color: rgba(240,240,243,0.40);
  text-transform: uppercase;
  font-weight: 600;
  display: inline-block;
  margin-top: 2px;
}
html[data-theme="clean"] .v8-radial-center-hint { color: rgba(46,41,64,0.70); }
html[data-theme="clean"] .v8-radial-center-sub  { color: rgba(46,41,64,0.40); }

/* Radial backdrop — darker for focus */
.v8-pulse-backdrop.open {
  background: rgba(10,10,12,0.55) !important;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  z-index: 1000 !important;
}

/* Pulse btn still triggers radial via pointer events even when radial is open (so dragging works).
   When radial is open, we also dim the pulse btn slightly so it's not visually competing. */
body.v8-radial-active .v8-pulse-btn {
  z-index: 1002;
  opacity: 0.7;
}

/* OVERRIDE PANEL — unified inline on mobile + desktop */
.v8-override-panel-inline {
  position: absolute !important;
  top: 50% !important;
  right: 14px !important;
  transform: translateY(-50%) !important;
  z-index: 5 !important;
  animation: v8-panel-slide-in 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Desktop sizes — narrow card (4-col grid) */
@media (min-width: 901px) {
  .v8-override-panel-inline {
    width: 140px !important;
    padding: 12px 10px 10px !important;
  }
  body.v8-bias-active .v8-card.v8-card-override-open .inst-ring-wrap {
    transform: translateX(-38%) !important;
  }
}

/* Mobile sizes — wider single-col card (~340px) — ring shrinks + panel narrower */
@media (max-width: 900px) {
  .v8-override-panel-inline {
    width: 130px !important;
    right: 12px !important;
    padding: 11px 9px 9px !important;
    max-height: 92%;
    overflow-y: auto;
  }
  .v8-override-panel-inline .v8-override-title {
    font-size: 8.5px !important;
    letter-spacing: 1.4px !important;
    margin-bottom: 8px !important;
  }
  .v8-override-panel-inline .v8-override-opt {
    padding: 7px 5px !important;
    font-size: 9px !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 3px !important;
  }
  .v8-override-panel-inline .v8-override-revert,
  .v8-override-panel-inline .v8-override-plan {
    font-size: 9px !important;
    padding: 7px !important;
    margin-top: 5px !important;
  }
  .v8-override-panel-inline .v8-override-divider {
    margin: 8px -9px 5px !important;
  }
  /* Shrink ring more aggressively on mobile so panel fits next to it */
  body.v8-bias-active .v8-card.v8-card-override-open .inst-ring-wrap {
    transform: translateX(-30%) scale(0.85) !important;
    transform-origin: center !important;
  }
}

@keyframes v8-panel-slide-in {
  from { opacity: 0; transform: translate(8px, -50%); }
  to   { opacity: 1; transform: translate(0, -50%); }
}

/* SHARP CORNER FIX — countdown rows + child elements */
body.v8-bias-active .countdown-panel {
  border-radius: 14px !important;
  overflow: hidden !important;
}
body.v8-bias-active .countdown-panel > * {
  border-radius: 0 !important;
}
body.v8-bias-active .countdown-panel .countdown-title {
  border-radius: 14px 14px 0 0 !important;
}
body.v8-bias-active .countdown-panel .countdown-events-list,
body.v8-bias-active .countdown-panel .countdown-row {
  border-radius: 0;
}
body.v8-bias-active .countdown-panel .countdown-row + .countdown-row {
  border-top: 1px solid rgba(255,255,255,0.04);
}
html[data-theme="clean"] body.v8-bias-active .countdown-panel .countdown-row + .countdown-row {
  border-top-color: rgba(46,41,64,0.06);
}

/* ── Override: MANUAL badge in ring ─────────────────────── */
.inst-ring-manual {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1.8px;
  color: var(--v8-warm-amber);
  text-transform: uppercase;
  margin-top: 3px;
  opacity: 0.9;
}
html[data-theme="clean"] .inst-ring-manual {
  color: #b8741a;
}

/* ── Override panel: PC max-height = card ────────────────── */
@media (min-width: 600px) {
  .v8-override-panel-inline {
    max-height: calc(100% - 28px) !important;
    overflow-y: auto;
  }
}


/* ════════════════════════════════════════════════════════════
   MACRO TAB v2 REDESIGN
   Activated via: body.v8-macro-active
   ════════════════════════════════════════════════════════════ */

/* Stage */
body.v8-macro-active {
  background: var(--v8-d-bg, #1a1a1c) !important;
}
html[data-theme="clean"] body.v8-macro-active {
  background: var(--v8-l-bg, linear-gradient(160deg,#e8e1ed 0%,#d4d1e3 28%,#b8c5d6 55%,#a5c0c8 80%,#c8d4d2 100%)) !important;
}

/* Hide old page title and stock header on macro */
body.v8-macro-active .page-title,
body.v8-macro-active header {
  display: none !important;
}

/* Week scrubber pills */
body.v8-macro-active .week-switcher {
  display: flex;
  gap: 8px;
  padding: 14px 16px 10px;
  justify-content: center;
}
body.v8-macro-active .week-btn {
  padding: 7px 20px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  color: rgba(240,240,243,0.55);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s;
  letter-spacing: 0.2px;
}
body.v8-macro-active .week-btn.active {
  background: rgba(125,211,174,0.14);
  border-color: rgba(125,211,174,0.35);
  color: #7dd3ae;
  font-weight: 600;
}
body.v8-macro-active .week-btn-weekend.active {
  background: rgba(232,184,122,0.14);
  border-color: rgba(232,184,122,0.35);
  color: var(--v8-warm-amber);
}
html[data-theme="clean"] body.v8-macro-active .week-btn {
  background: rgba(255,255,255,0.45);
  border-color: rgba(255,255,255,0.65);
  color: rgba(46,41,64,0.55);
}
html[data-theme="clean"] body.v8-macro-active .week-btn.active {
  background: rgba(107,168,139,0.18);
  border-color: rgba(107,168,139,0.45);
  color: #4a8a6a;
}

/* KPI row */
body.v8-macro-active .kpi-row {
  display: flex;
  gap: 8px;
  padding: 0 16px 12px;
  justify-content: center;
}
body.v8-macro-active .kpi-item {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 8px 14px;
  text-align: center;
  min-width: 64px;
}
html[data-theme="clean"] body.v8-macro-active .kpi-item {
  background: rgba(255,255,255,0.55);
  border-color: rgba(255,255,255,0.7);
}

/* Day navigator dots */
.macro-day-nav {
  display: flex;
  gap: 6px;
  padding: 4px 16px 12px;
  justify-content: center;
  overflow-x: auto;
}
.macro-day-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  background: transparent;
  color: rgba(240,240,243,0.4);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.macro-day-dot.active {
  background: rgba(125,211,174,0.12);
  border-color: rgba(125,211,174,0.30);
  color: #7dd3ae;
  font-weight: 600;
}
html[data-theme="clean"] .macro-day-dot {
  border-color: rgba(46,41,64,0.12);
  color: rgba(46,41,64,0.45);
}
html[data-theme="clean"] .macro-day-dot.active {
  background: rgba(107,168,139,0.15);
  border-color: rgba(107,168,139,0.40);
  color: #4a8a6a;
}

/* Day cards */
body.v8-macro-active .macro-day-card {
  margin: 0 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.07);
  background: linear-gradient(155deg, #1f1f24 0%, #1a1a1d 100%);
  overflow: hidden;
  position: relative;
  /* Corner glow via box-shadow */
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
  transition: box-shadow 0.3s;
}
body.v8-macro-active .macro-day-card.glow-bull {
  box-shadow: 0 2px 12px rgba(0,0,0,0.35),
              4px 0 20px -8px rgba(125,211,174,0.25),
              -4px 0 20px -8px rgba(125,211,174,0.1);
  border-color: rgba(125,211,174,0.12);
}
body.v8-macro-active .macro-day-card.glow-bear {
  box-shadow: 0 2px 12px rgba(0,0,0,0.35),
              4px 0 20px -8px rgba(232,154,142,0.25),
              -4px 0 20px -8px rgba(232,154,142,0.1);
  border-color: rgba(232,154,142,0.12);
}
body.v8-macro-active .macro-day-card.today-card {
  border-color: rgba(125,211,174,0.18);
}
html[data-theme="clean"] body.v8-macro-active .macro-day-card {
  background: rgba(255,255,255,0.65);
  border-color: rgba(255,255,255,0.75);
  box-shadow: 0 2px 12px rgba(46,41,64,0.08);
}

/* Day header */
body.v8-macro-active .macro-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
body.v8-macro-active .macro-day-name {
  font-size: 13px;
  font-weight: 600;
  color: rgba(240,240,243,0.9);
  text-transform: capitalize;
  letter-spacing: 0.3px;
}
body.v8-macro-active .macro-today-pip {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #7dd3ae;
  background: rgba(125,211,174,0.12);
  border: 1px solid rgba(125,211,174,0.25);
  border-radius: 4px;
  padding: 2px 8px;
}
html[data-theme="clean"] body.v8-macro-active .macro-day-name { color: #2e2940; }
html[data-theme="clean"] body.v8-macro-active .macro-today-pip {
  color: #4a8a6a;
  background: rgba(107,168,139,0.12);
  border-color: rgba(107,168,139,0.30);
}

/* Events inside day card */
body.v8-macro-active .macro-day-events {
  padding: 4px 0 6px;
}
body.v8-macro-active .macro-day-events .event-row {
  padding: 9px 16px;
  border-radius: 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  background: transparent;
  transition: background 0.15s;
}
body.v8-macro-active .macro-day-events .event-row:last-child {
  border-bottom: none;
}
body.v8-macro-active .macro-day-events .event-row:hover {
  background: rgba(255,255,255,0.025);
}
html[data-theme="clean"] body.v8-macro-active .macro-day-events .event-row {
  border-bottom-color: rgba(46,41,64,0.06);
}
html[data-theme="clean"] body.v8-macro-active .macro-day-events .event-row:hover {
  background: rgba(46,41,64,0.03);
}

/* Event row internals */
body.v8-macro-active .macro-day-events .event-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
body.v8-macro-active .macro-day-events .ev-time {
  font-size: 12px;
  font-family: 'SF Mono', 'Consolas', monospace;
  color: rgba(240,240,243,0.45);
  min-width: 36px;
}
body.v8-macro-active .macro-day-events .imp-high {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(232,154,142,0.15);
  color: #e89a8e;
  border: 1px solid rgba(232,154,142,0.25);
}
body.v8-macro-active .macro-day-events .imp-med {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(232,184,122,0.12);
  color: var(--v8-warm-amber);
  border: 1px solid rgba(232,184,122,0.20);
}
body.v8-macro-active .macro-day-events .ev-name {
  font-size: 13px;
  color: rgba(240,240,243,0.85);
  flex: 1;
}
html[data-theme="clean"] body.v8-macro-active .macro-day-events .ev-time { color: rgba(46,41,64,0.45); }
html[data-theme="clean"] body.v8-macro-active .macro-day-events .ev-name { color: #2e2940; }

/* Values row */
body.v8-macro-active .macro-day-events .event-vals {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-left: 44px;
  margin-top: 2px;
}
body.v8-macro-active .macro-day-events .ev-lbl {
  font-size: 11px;
  color: rgba(240,240,243,0.40);
}
body.v8-macro-active .macro-day-events .ev-lbl b { color: rgba(240,240,243,0.70); }
html[data-theme="clean"] body.v8-macro-active .macro-day-events .ev-lbl { color: rgba(46,41,64,0.40); }
html[data-theme="clean"] body.v8-macro-active .macro-day-events .ev-lbl b { color: rgba(46,41,64,0.70); }

/* Surprise badge */
body.v8-macro-active .macro-day-events .beat { color: #7dd3ae; font-size: 11px; }
body.v8-macro-active .macro-day-events .miss { color: #e89a8e; font-size: 11px; }
body.v8-macro-active .macro-day-events .inline-s { color: rgba(240,240,243,0.35); font-size: 11px; }

/* Actual colors */
body.v8-macro-active .macro-day-events .actual-bullish { color: #7dd3ae; font-weight: 600; }
body.v8-macro-active .macro-day-events .actual-bearish { color: #e89a8e; font-weight: 600; }
body.v8-macro-active .macro-day-events .actual-inline  { color: rgba(240,240,243,0.45); }
body.v8-macro-active .macro-day-events .pending { color: rgba(240,240,243,0.30); font-style: italic; font-size: 11px; }

/* v8-ev-major pill inside macro day card */
body.v8-macro-active .v8-ev-major {
  display: inline-block;
  padding: 1px 6px;
  margin-left: 5px;
  background: rgba(232,184,122,0.14);
  color: var(--v8-warm-amber);
  border: 1px solid rgba(232,184,122,0.30);
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  vertical-align: middle;
}

/* Hint text */
body.v8-macro-active .ev-hint {
  font-size: 10px;
  color: rgba(240,240,243,0.28);
  margin: 2px 0 0 44px;
  font-style: italic;
}

/* Refresh button */
body.v8-macro-active .macro-refresh-wrap {
  padding: 0 16px 12px;
  display: flex;
  justify-content: center;
}
body.v8-macro-active .macro-refresh-btn {
  padding: 7px 18px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  color: rgba(240,240,243,0.55);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
body.v8-macro-active .macro-refresh-btn:hover {
  background: rgba(125,211,174,0.08);
  border-color: rgba(125,211,174,0.25);
  color: #7dd3ae;
}
html[data-theme="clean"] body.v8-macro-active .macro-refresh-btn {
  background: rgba(255,255,255,0.55);
  border-color: rgba(255,255,255,0.7);
  color: rgba(46,41,64,0.6);
}

/* Event add-plan and hide buttons */
body.v8-macro-active .event-add-plan,
body.v8-macro-active .event-hide {
  background: transparent;
  border: none;
  color: rgba(240,240,243,0.22);
  cursor: pointer;
  padding: 2px 4px;
  font-size: 12px;
  transition: color 0.15s;
}
body.v8-macro-active .event-add-plan:hover { color: #7dd3ae; }
body.v8-macro-active .event-hide:hover { color: #e89a8e; }

/* Weekend panel */
body.v8-macro-active .weekend-panel {
  text-align: center;
  padding: 60px 20px;
  color: rgba(240,240,243,0.6);
}
body.v8-macro-active .weekend-icon { font-size: 40px; margin-bottom: 12px; }
body.v8-macro-active .weekend-title { font-size: 18px; font-weight: 600; color: rgba(240,240,243,0.85); margin-bottom: 6px; }
body.v8-macro-active .weekend-sub { font-size: 13px; opacity: 0.6; margin-bottom: 12px; }
body.v8-macro-active .weekend-countdown { font-size: 13px; color: var(--v8-warm-amber); }

/* Info-only badge */
body.v8-macro-active .info-only-badge {
  font-size: 9px;
  color: rgba(240,240,243,0.30);
  padding: 1px 5px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 3px;
  margin-left: 4px;
}

