/* ============================================
   PriceONN Forecast Tab — Card design v5
   2-column split (Price Map | Summary) inside
   accordion shell. Multi-forecast supported.
   ============================================ */

:root {
  --po-bg: #0a0e1a;
  --po-card: #0f1421;
  --po-border: rgba(255,255,255,0.06);
  --po-border-soft: rgba(255,255,255,0.05);
  --po-border-faint: rgba(255,255,255,0.04);

  --po-text: #e5e7eb;
  --po-text-mid: #9ca3af;
  --po-text-dim: #6b7280;
  --po-text-ghost: #d1d5db;

  --po-red: #ef4444;
  --po-red-soft: rgba(239,68,68,0.08);
  --po-red-bg: rgba(239,68,68,0.16);
  --po-red-tint: rgba(239,68,68,0.10);
  --po-red-border: rgba(239,68,68,0.18);

  --po-green: #10b981;
  --po-green-2: #059669;
  --po-green-22: #22c55e;
  --po-green-soft: rgba(16,185,129,0.08);
  --po-green-tint: rgba(16,185,129,0.14);
  --po-green-border: rgba(16,185,129,0.18);

  --po-amber: #f59e0b;
  --po-amber-bright: #fbbf24;
  --po-amber-soft: rgba(245,158,11,0.06);
  --po-amber-tint: rgba(245,158,11,0.16);
  --po-amber-bg: rgba(245,158,11,0.12);
  --po-amber-border: rgba(245,158,11,0.25);

  --po-blue: #3b82f6;
  --po-blue-soft: rgba(59,130,246,0.06);
  --po-blue-border: rgba(59,130,246,0.15);
  --po-blue-text: #93c5fd;
  --po-blue-light: #60a5fa;

  --po-gray: #6b7280;
}

/* ── Wrap ──────────────────────────────────────── */
.forecast-wrap { display: flex; flex-direction: column; gap: 14px; }

.forecast-empty {
  text-align: center; padding: 64px 24px;
  color: var(--po-text-mid);
  border: 1px dashed var(--po-border);
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
}
.forecast-empty svg { color: rgba(255,255,255,0.35); margin-bottom: 16px; }
.forecast-empty-title { font-size: 16px; font-weight: 600; color: var(--po-text); margin-bottom: 6px; }
.forecast-empty-desc { font-size: 13px; }

/* Topbar */
.fc-topbar {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 12px;
}
.fc-period-chips {
  display: inline-flex; background: rgba(0,0,0,0.28);
  border-radius: 999px; padding: 3px; gap: 2px;
  border: 1px solid var(--po-border);
}
.fc-chip {
  border: 0; background: transparent; color: var(--po-text-mid);
  font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
  padding: 6px 16px; border-radius: 999px; cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease;
}
.fc-chip:hover:not(:disabled):not(.is-active) { color: #fff; background: rgba(255,255,255,0.05); }
.fc-chip.is-active {
  background: linear-gradient(135deg, var(--po-blue), #6366f1); color: #fff;
  box-shadow: 0 4px 14px rgba(59,130,246,0.30);
}
.fc-chip:disabled { opacity: 0.32; cursor: not-allowed; }

.fc-count { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--po-text-mid); }
.fc-count-num { font-weight: 700; color: var(--po-text); }
.fc-count-label { color: var(--po-text-dim); }
.fc-pubdot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--po-green-22);
  box-shadow: 0 0 0 0 rgba(34,197,94, 0.55);
  animation: fcPubPulse 2.4s infinite;
}
@keyframes fcPubPulse {
  0%   { box-shadow: 0 0 0 0 rgba(34,197,94, 0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(34,197,94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94, 0); }
}

/* ── Accordion ─────────────────────────────────── */
.fc-accordion { display: flex; flex-direction: column; gap: 12px; }

.fc-item {
  background: var(--po-card);
  border: 1px solid var(--po-border);
  border-radius: 12px;
  overflow: hidden;
  color: var(--po-text);
}

/* ── Card header strip (always visible, click toggles) ─── */
.fc-item-head {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; padding: 12px 18px;
  background: transparent;
  border: 0; border-bottom: 1px solid transparent;
  color: inherit; cursor: pointer; text-align: left;
  font-family: inherit;
  transition: border-color 0.2s ease;
}
.fc-item-head:focus-visible { outline: 2px solid rgba(99,102,241,0.4); outline-offset: -2px; }
.fc-item.fc-bias-bearish .fc-item-head { background: linear-gradient(90deg, rgba(239,68,68,0.10) 0%, rgba(239,68,68,0) 60%); }
.fc-item.fc-bias-bullish .fc-item-head { background: linear-gradient(90deg, rgba(16,185,129,0.10) 0%, rgba(16,185,129,0) 60%); }
.fc-item.fc-bias-neutral .fc-item-head { background: linear-gradient(90deg, rgba(107,114,128,0.10) 0%, rgba(107,114,128,0) 60%); }
.fc-item.is-open .fc-item-head { border-bottom-color: var(--po-border-soft); }

.fc-head-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.fc-head-icon {
  width: 28px; height: 28px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.fc-item.fc-bias-bearish .fc-head-icon { background: var(--po-red-bg); color: var(--po-red); }
.fc-item.fc-bias-bullish .fc-head-icon { background: var(--po-green-tint); color: var(--po-green); }
.fc-item.fc-bias-neutral .fc-head-icon { background: rgba(107,114,128,0.18); color: var(--po-text-mid); }

.fc-head-title-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.fc-head-bias {
  font-size: 13px; font-weight: 500; letter-spacing: 0.4px;
}
.fc-item.fc-bias-bearish .fc-head-bias { color: var(--po-red); }
.fc-item.fc-bias-bullish .fc-head-bias { color: var(--po-green); }
.fc-item.fc-bias-neutral .fc-head-bias { color: var(--po-text-mid); }

.fc-verifier {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 500; letter-spacing: 0.5px;
  padding: 2px 7px; border-radius: 3px;
  border: 1px solid transparent;
  text-transform: uppercase; white-space: nowrap;
}
.fc-verifier-verified   { color: var(--po-green); background: rgba(16,185,129,0.12); border-color: rgba(16,185,129,0.25); }
.fc-verifier-unverified { color: var(--po-amber); background: var(--po-amber-bg);    border-color: var(--po-amber-border); }
.fc-verifier-rejected   { color: var(--po-red);   background: var(--po-red-tint);    border-color: rgba(239,68,68,0.30); }

.fc-head-pub { font-size: 11px; color: var(--po-text-dim); margin-top: 2px; letter-spacing: 0.3px; }
.fc-head-pub .fc-pubtime { color: var(--po-text-dim); }

.fc-head-right {
  display: flex; align-items: center; gap: 14px;
}
.fc-head-conviction { text-align: right; }
.fc-conv-bignum {
  display: flex; align-items: baseline; gap: 4px; justify-content: flex-end;
  font-variant-numeric: tabular-nums;
}
.fc-conv-bignum-num {
  font-size: 28px; font-weight: 500; color: #fff; line-height: 1;
}
.fc-conv-bignum-den { font-size: 13px; color: var(--po-text-dim); }
.fc-conv-bigtag {
  font-size: 10px; letter-spacing: 1px; margin-top: 2px;
}
.fc-item.fc-bias-bearish .fc-conv-bigtag { color: var(--po-red); }
.fc-item.fc-bias-bullish .fc-conv-bigtag { color: var(--po-green); }
.fc-item.fc-bias-neutral .fc-conv-bigtag { color: var(--po-text-mid); }

.fc-item-chevron {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 4px;
  color: var(--po-text-dim);
  transition: transform 0.25s ease;
}
.fc-item.is-open .fc-item-chevron { transform: rotate(180deg); }

/* ── Body (collapsible) ───────────────────────── */
.fc-item-body {
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.25s ease;
}
.fc-item.is-open .fc-item-body { max-height: 8000px; opacity: 1; }

.fc-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 8px;
  font-size: 13px;
  margin: 14px 18px 0;
}
.fc-banner-warn { background: var(--po-amber-soft); color: var(--po-amber-bright); border: 1px solid var(--po-amber-border); }
.fc-banner-info { background: rgba(59,130,246,0.08); color: var(--po-blue-text); border: 1px solid rgba(59,130,246,0.22); }

/* Two-column body grid: PRICE MAP (280px) | SUMMARY (1fr) */
.fc-body-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0;
}

/* ── PRICE MAP (left column) ──────────────────── */
.fc-pricemap {
  padding: 18px 16px 18px 18px;
  border-right: 1px solid var(--po-border-soft);
}
.fc-pricemap-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
  font-size: 10px; color: var(--po-text-dim);
  letter-spacing: 1px; font-weight: 500;
  text-transform: uppercase;
}
.fc-pricemap-head .fc-pricemap-symbol { letter-spacing: 0.5px; }

.fc-pricemap-rows { position: relative; padding-left: 10px; }
.fc-pricemap-line {
  position: absolute; left: 4px; top: 8px; bottom: 8px;
  width: 1px;
}
.fc-pricemap.fc-bias-bearish .fc-pricemap-line {
  background: linear-gradient(180deg,
    rgba(239,68,68,0.4) 0%,
    rgba(255,255,255,0.08) 30%,
    rgba(255,255,255,0.08) 50%,
    rgba(245,158,11,0.4) 60%,
    rgba(16,185,129,0.4) 100%);
}
.fc-pricemap.fc-bias-bullish .fc-pricemap-line {
  background: linear-gradient(180deg,
    rgba(16,185,129,0.4) 0%,
    rgba(245,158,11,0.4) 30%,
    rgba(255,255,255,0.08) 45%,
    rgba(255,255,255,0.08) 65%,
    rgba(239,68,68,0.4) 100%);
}
.fc-pricemap.fc-bias-neutral .fc-pricemap-line {
  background: linear-gradient(180deg,
    rgba(239,68,68,0.4) 0%,
    rgba(255,255,255,0.08) 50%,
    rgba(16,185,129,0.4) 100%);
}

.fc-rung {
  position: relative; display: flex; align-items: center; gap: 10px;
  padding: 6px 0;
}
.fc-rung-dot {
  position: absolute; left: -10px;
  width: 9px; height: 9px; border-radius: 50%;
  border: 2px solid var(--po-card);
}
.fc-rung-content {
  flex: 1; padding-left: 14px;
}
.fc-rung-label {
  font-size: 10px; letter-spacing: 0.5px; font-weight: 500;
  text-transform: uppercase;
}
.fc-rung-line2 {
  display: flex; justify-content: space-between; align-items: baseline;
  font-variant-numeric: tabular-nums;
}
.fc-rung-value { font-size: 14px; font-weight: 500; }
.fc-rung-delta { font-size: 11px; color: var(--po-text-dim); }

/* Variants */
.fc-rung-stop .fc-rung-dot { background: var(--po-red); }
.fc-rung-stop .fc-rung-label { color: var(--po-red); }
.fc-rung-stop .fc-rung-value { color: var(--po-red); }

.fc-rung-watch .fc-rung-dot { background: rgba(245,158,11,0.18); border-color: var(--po-amber); }
.fc-rung-watch .fc-rung-label { color: var(--po-amber); }
.fc-rung-watch .fc-rung-value { color: var(--po-amber-bright); }

.fc-rung-confirm .fc-rung-dot { background: rgba(16,185,129,0.18); border-color: var(--po-green); }
.fc-rung-confirm .fc-rung-label { color: var(--po-green); }
.fc-rung-confirm .fc-rung-value { color: var(--po-green); }

.fc-rung-target .fc-rung-dot { background: var(--po-green); }
.fc-rung-target .fc-rung-label { color: var(--po-green); }
.fc-rung-target .fc-rung-value { color: var(--po-green); }
.fc-rung-target .fc-rung-delta { color: var(--po-green); }

.fc-rung-target2 .fc-rung-dot { background: var(--po-green-2); }
.fc-rung-target2 .fc-rung-label { color: var(--po-green-2); }
.fc-rung-target2 .fc-rung-value { color: var(--po-green-2); }
.fc-rung-target2 .fc-rung-delta { color: var(--po-green); }

.fc-rung-now {
  padding: 10px 0; margin: 4px 0;
  background: rgba(255,255,255,0.03);
  border-radius: 6px;
  border-left: 2px solid #fff;
}
.fc-rung-now .fc-rung-content { padding-left: 18px; padding-right: 10px; }
.fc-rung-now .fc-rung-dot {
  left: -13px; width: 14px; height: 14px;
  background: #fff; border: 3px solid var(--po-card);
  box-shadow: 0 0 0 1px #fff;
}
.fc-rung-now .fc-rung-label { color: #fff; letter-spacing: 1px; font-weight: 500; }
.fc-rung-now .fc-rung-value { font-size: 18px; color: #fff; }

/* ── SUMMARY (right column) ───────────────────── */
.fc-summary { padding: 18px 22px; }
.fc-summary-title { font-size: 22px; font-weight: 500; color: #fff; margin-bottom: 4px; line-height: 1.2; }
.fc-summary-sub   { font-size: 13px; color: var(--po-text-mid); margin-bottom: 16px; }

.fc-stats-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 8px; overflow: hidden;
  margin-bottom: 14px;
}
.fc-stat { background: var(--po-card); padding: 11px 13px; }
.fc-stat-label { font-size: 10px; color: var(--po-text-dim); letter-spacing: 0.5px; margin-bottom: 4px; text-transform: uppercase; }
.fc-stat-value { font-size: 16px; font-weight: 500; color: var(--po-text); font-variant-numeric: tabular-nums; }
.fc-stat-value.is-red   { color: var(--po-red); }
.fc-stat-value.is-green { color: var(--po-green); }
.fc-stat-unit { font-size: 11px; color: var(--po-text-dim); margin-left: 4px; }
.fc-stat-sub  { font-size: 10px; color: var(--po-text-dim); margin-top: 4px; }

.fc-rr-bar {
  display: flex; gap: 2px; margin-top: 6px; height: 3px;
}
.fc-rr-bar-risk   { background: var(--po-red);   border-radius: 1px; }
.fc-rr-bar-reward { background: var(--po-green); border-radius: 1px; }

.fc-trigger-flow {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 12px;
  background: var(--po-blue-soft);
  border: 1px solid var(--po-blue-border);
  border-radius: 6px;
}
.fc-trigger-flow svg { color: var(--po-blue-light); flex-shrink: 0; }
.fc-trigger-flow-text {
  font-size: 11px; color: var(--po-blue-text); line-height: 1.4;
  font-variant-numeric: tabular-nums;
}
.fc-flow-watch   { color: var(--po-amber-bright); }
.fc-flow-confirm { color: var(--po-green); }
.fc-flow-target  { color: var(--po-green); }
.fc-flow-arrow   { color: var(--po-text-dim); margin: 0 4px; }

/* ── Analysis Section ─────────────────────────── */
.fc-analysis-section {
  background: rgba(255,255,255,0.015);
  border-top: 1px solid var(--po-border-soft);
  padding: 18px 22px;
}
.fc-analysis-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.fc-analysis-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: var(--po-text-mid);
  font-weight: 500; letter-spacing: 1px;
  text-transform: uppercase;
}
.fc-analysis-meta {
  font-size: 10px; color: var(--po-text-dim);
  letter-spacing: 0.5px; text-transform: uppercase;
}

.fc-key-drivers { margin-bottom: 14px; }
.fc-key-drivers-label {
  font-size: 10px; color: var(--po-text-dim);
  font-weight: 500; letter-spacing: 1px;
  margin-bottom: 8px; text-transform: uppercase;
}
.fc-driver-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.fc-driver-tag {
  font-size: 11px; padding: 4px 9px; border-radius: 4px;
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid transparent;
}
.fc-driver-tag-dot { width: 4px; height: 4px; border-radius: 50%; }

.fc-driver-bear { background: rgba(239,68,68,0.08); color: #fca5a5; border-color: rgba(239,68,68,0.18); }
.fc-driver-bear .fc-driver-tag-dot { background: var(--po-red); }
.fc-driver-bull { background: rgba(16,185,129,0.08); color: #6ee7b7; border-color: rgba(16,185,129,0.18); }
.fc-driver-bull .fc-driver-tag-dot { background: var(--po-green); }
.fc-driver-neutral { background: rgba(107,114,128,0.10); color: var(--po-text-mid); border-color: rgba(107,114,128,0.25); }
.fc-driver-neutral .fc-driver-tag-dot { background: var(--po-text-mid); }

.fc-prose-2col {
  font-size: 13px; color: var(--po-text-mid); line-height: 1.7;
  column-count: 2; column-gap: 28px; column-rule: 1px solid var(--po-border-faint);
}
.fc-prose-2col p { margin: 0 0 12px; break-inside: avoid; }
.fc-prose-2col p:last-child { margin-bottom: 0; }
.fc-prose-2col .num { color: var(--po-text-ghost); }

.fc-prose-2col.is-collapsed { max-height: 220px; overflow: hidden; position: relative; column-count: 2; }
.fc-prose-2col.is-collapsed::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0;
  height: 80px;
  background: linear-gradient(180deg, transparent, rgba(15,20,33,1) 95%);
  pointer-events: none;
}
.fc-readmore {
  margin-top: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--po-border);
  background: rgba(255,255,255,0.02);
  color: var(--po-text);
  font-size: 12px; font-weight: 500; letter-spacing: 0.4px;
  padding: 6px 12px; border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  font-family: inherit;
}
.fc-readmore:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.12); }
.fc-readmore svg { transition: transform 0.2s ease; }
.fc-readmore .readmore-less { display: none; }
.fc-analysis-section.is-expanded .fc-readmore .readmore-more { display: none; }
.fc-analysis-section.is-expanded .fc-readmore .readmore-less { display: inline; }
.fc-analysis-section.is-expanded .fc-readmore svg { transform: rotate(180deg); }

/* ── Foot ─────────────────────────────────────── */
.fc-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 18px;
  background: rgba(0,0,0,0.15);
  border-top: 1px solid var(--po-border-faint);
  font-size: 11px;
}
.fc-foot-disclaimer { display: flex; align-items: center; gap: 8px; color: var(--po-text-dim); }
.fc-foot-link {
  color: var(--po-blue);
  text-decoration: none; font-weight: 500;
  display: flex; align-items: center; gap: 4px;
}
.fc-foot-link:hover { text-decoration: underline; }

/* ── Responsive ───────────────────────────────── */
@media (max-width: 880px) {
  .fc-body-grid { grid-template-columns: 1fr; }
  .fc-pricemap { border-right: 0; border-bottom: 1px solid var(--po-border-soft); }
  .fc-prose-2col { column-count: 1; }
}
@media (max-width: 640px) {
  .fc-item-head { flex-wrap: wrap; gap: 12px; padding: 12px 14px; }
  .fc-head-right { width: 100%; justify-content: space-between; }
  .fc-summary { padding: 16px; }
  .fc-pricemap { padding: 16px; }
  .fc-analysis-section { padding: 16px; }
  .fc-foot { padding: 10px 14px; flex-direction: column; gap: 8px; align-items: flex-start; }
  .fc-stats-grid { grid-template-columns: 1fr 1fr; }
  .fc-summary-title { font-size: 18px; }
  .fc-conv-bignum-num { font-size: 24px; }
}
