/* ============================================
   Gold Engine — Premium Dark Dashboard CSS
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ============ CSS Variables ============ */
:root {
  /* Colors — Premium Dark Gold Theme */
  --bg-primary: #0a0b0f;
  --bg-secondary: #12141c;
  --bg-card: #161821;
  --bg-card-hover: #1a1d28;
  --bg-glass: rgba(22, 24, 33, 0.7);
  
  --border-color: rgba(255, 215, 0, 0.08);
  --border-glow: rgba(255, 215, 0, 0.2);
  
  --text-primary: #f0f0f4;
  --text-secondary: #8b8fa3;
  --text-muted: #555970;
  
  --gold: #ffd700;
  --gold-dark: #b8960f;
  --gold-glow: rgba(255, 215, 0, 0.15);
  
  --green: #00e676;
  --green-bg: rgba(0, 230, 118, 0.1);
  --green-glow: rgba(0, 230, 118, 0.3);
  
  --red: #ff5252;
  --red-bg: rgba(255, 82, 82, 0.1);
  --red-glow: rgba(255, 82, 82, 0.3);
  
  --orange: #ff9800;
  --orange-bg: rgba(255, 152, 0, 0.1);
  
  --blue: #448aff;
  --blue-bg: rgba(68, 138, 255, 0.1);
  
  --purple: #b388ff;
  
  /* Layout */
  --radius: 14px;
  --radius-sm: 8px;
  --radius-xs: 5px;
  --gap: 16px;
  
  /* Fonts */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ============ Reset & Base ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Animated background gradient */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: 
    radial-gradient(ellipse 60% 40% at 20% 10%, rgba(255, 215, 0, 0.03), transparent),
    radial-gradient(ellipse 40% 50% at 80% 80%, rgba(68, 138, 255, 0.02), transparent);
  pointer-events: none;
  z-index: 0;
}

/* ============ Scrollbar ============ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-glow); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dark); }

/* ============ Layout ============ */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 1640px;
  margin: 0 auto;
  padding: 20px;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  margin-bottom: 20px;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: #000;
  box-shadow: 0 0 20px var(--gold-glow);
}

.header-title {
  font-size: 1.3rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--gold), #fff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 400;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-price {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  text-shadow: 0 0 20px var(--gold-glow);
}

.header-change {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  font-weight: 600;
}

.header-change.positive { color: var(--green); background: var(--green-bg); }
.header-change.negative { color: var(--red); background: var(--red-bg); }

.status-badges {
  display: flex;
  gap: 8px;
  align-items: center;
}

.badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid;
}

.badge-regime {
  color: var(--orange);
  background: var(--orange-bg);
  border-color: rgba(255, 152, 0, 0.3);
}

.badge-session {
  color: var(--blue);
  background: var(--blue-bg);
  border-color: rgba(68, 138, 255, 0.3);
}

.badge-alert-normal { color: var(--green); background: var(--green-bg); border-color: rgba(0, 230, 118, 0.3); }
.badge-alert-elevated { color: var(--orange); background: var(--orange-bg); border-color: rgba(255, 152, 0, 0.3); }
.badge-alert-high { 
  color: var(--red); background: var(--red-bg); border-color: rgba(255, 82, 82, 0.5);
  animation: pulse-alert 1.5s ease-in-out infinite;
}

@keyframes pulse-alert {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 82, 82, 0.4); }
  50% { box-shadow: 0 0 15px 3px rgba(255, 82, 82, 0.2); }
}

/* Refresh button */
.btn-refresh {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.2s;
  font-family: var(--font-sans);
}

.btn-refresh:hover {
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 0 15px var(--gold-glow);
}

.btn-refresh.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* ============ Grid Layout ============ */
.dashboard-grid {
  display: grid;
  grid-template-columns: 340px 1fr 340px;
  grid-template-rows: auto auto auto;
  gap: var(--gap);
}

/* ============ Card Base ============ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.card:hover {
  border-color: var(--border-glow);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.card-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.card-body {
  padding: 18px;
}

/* ============ Gauge (Column 1 Top) ============ */
.gauge-card {
  grid-column: 1;
  grid-row: 1;
}

.gauge-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 18px;
}

.gauge-svg {
  width: 280px;
  height: 160px;
}

.gauge-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 8px;
  text-align: center;
}

.gauge-score {
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 800;
  text-align: center;
  margin-top: 4px;
  line-height: 1;
}

.gauge-score.bullish { color: var(--green); text-shadow: 0 0 30px var(--green-glow); }
.gauge-score.bearish { color: var(--red); text-shadow: 0 0 30px var(--red-glow); }
.gauge-score.neutral { color: var(--orange); text-shadow: 0 0 30px rgba(255, 152, 0, 0.3); }

.gauge-direction {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 8px;
}

/* ============ Chart (Column 2, Row 1-2) ============ */
.chart-card {
  grid-column: 2;
  grid-row: 1 / 3;
}

#chart-container {
  width: 100%;
  height: 480px;
  position: relative;
}

.chart-controls {
  display: flex;
  gap: 6px;
  padding: 0 18px 12px;
}

.chart-tf-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 4px 12px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--font-mono);
  transition: all 0.2s;
}

.chart-tf-btn:hover, .chart-tf-btn.active {
  background: var(--gold-glow);
  color: var(--gold);
  border-color: var(--gold-dark);
}

/* ============ Cross-Asset Panel (Column 3 Top) ============ */
.crossasset-card {
  grid-column: 3;
  grid-row: 1;
}

.asset-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.asset-row:last-child { border-bottom: none; }

.asset-name {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.asset-value {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
}

.divergence-alert {
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(255, 152, 0, 0.08);
  border: 1px solid rgba(255, 152, 0, 0.2);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--orange);
  line-height: 1.5;
}

/* ============ Narrative Card (Column 1-2 Bottom) ============ */
.narrative-card {
  grid-column: 1 / 3;
  grid-row: 3;
}

.narrative-section {
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.narrative-section:last-child { border-bottom: none; }

.narrative-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 6px;
}

.narrative-text {
  font-size: 0.82rem;
  color: var(--text-primary);
  line-height: 1.7;
}

/* ============ Event Matrix / HMI (Column 1) ============ */
.hmi-card {
  grid-column: 1;
  grid-row: 2;
}

.hmi-bar-container {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.hmi-bar {
  flex: 1;
  height: 8px;
  background: var(--bg-secondary);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.hmi-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s ease, background 0.3s;
}

.hmi-value {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  min-width: 50px;
  text-align: right;
}

.event-list {
  max-height: 220px;
  overflow-y: auto;
}

.event-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 0.78rem;
}

.event-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.event-dot.bullish { background: var(--green); box-shadow: 0 0 8px var(--green-glow); }
.event-dot.bearish { background: var(--red); box-shadow: 0 0 8px var(--red-glow); }
.event-dot.neutral { background: var(--text-muted); }

.event-name {
  flex: 1;
  color: var(--text-primary);
  font-weight: 500;
}

.event-score {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.75rem;
}

/* ============ Calendar (Column 3 Row 2-3) ============ */
.calendar-card {
  grid-column: 3;
  grid-row: 2 / 4;
}

.cal-event {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.cal-event:last-child { border-bottom: none; }

.cal-event-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.cal-impact {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.cal-impact.red { background: var(--red); box-shadow: 0 0 8px var(--red-glow); }
.cal-impact.orange { background: var(--orange); }

.cal-event-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.cal-event-time {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-left: auto;
}

.cal-bias-row {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.cal-bias {
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  font-size: 0.68rem;
  font-weight: 600;
}

.cal-bias.bullish { color: var(--green); background: var(--green-bg); }
.cal-bias.bearish { color: var(--red); background: var(--red-bg); }
.cal-bias.neutral { color: var(--text-muted); background: rgba(255,255,255,0.03); }

.cal-data-row {
  display: flex;
  gap: 12px;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.cal-data-label {
  color: var(--text-muted);
}

.cal-data-value {
  font-weight: 600;
  color: var(--text-primary);
}

.cal-data-value.actual { color: var(--gold); }

/* ============ COT Summary ============ */
.cot-card {
  margin-top: var(--gap);
}

.cot-bar {
  display: flex;
  height: 20px;
  border-radius: 10px;
  overflow: hidden;
  margin: 12px 0;
  background: var(--bg-secondary);
}

.cot-bar-long {
  background: linear-gradient(90deg, var(--green), rgba(0, 230, 118, 0.5));
  transition: width 0.6s ease;
}

.cot-bar-short {
  background: linear-gradient(90deg, rgba(255, 82, 82, 0.5), var(--red));
  transition: width 0.6s ease;
}

.cot-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.cot-zscore {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 8px 0;
}

/* ============ Loading & Animation ============ */
.skeleton {
  background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-card-hover) 50%, var(--bg-secondary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.fade-in {
  animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============ Responsive ============ */
@media (max-width: 1200px) {
  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
  .chart-card { grid-column: 1 / 3; grid-row: auto; }
  .gauge-card { grid-column: 1; }
  .crossasset-card { grid-column: 2; }
  .hmi-card { grid-column: 1; }
  .calendar-card { grid-column: 2; }
  .narrative-card { grid-column: 1 / 3; }
}

@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-grid > * { grid-column: 1 !important; grid-row: auto !important; }
  .header { flex-wrap: wrap; gap: 12px; }
  .header-right { width: 100%; justify-content: space-between; }
  #chart-container { height: 350px; }
  .app-container { padding: 12px; }
}

/* ============ Timestamp ============ */
.timestamp {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* ============ Tooltips ============ */
[data-tooltip] {
  position: relative;
  cursor: help;
}

[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 6px 10px;
  border-radius: var(--radius-xs);
  font-size: 0.7rem;
  white-space: nowrap;
  border: 1px solid var(--border-color);
  z-index: 1000;
  pointer-events: none;
}

/* ============ Navigation Tabs ============ */
.main-nav {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
  background: var(--bg-card);
  padding: 6px;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  width: fit-content;
}

.nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.nav-tab.active {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 152, 0, 0.1));
  color: var(--gold);
  border: 1px solid rgba(255, 215, 0, 0.3);
  box-shadow: 0 2px 10px rgba(255, 215, 0, 0.1);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* ============ View Containers ============ */
.dashboard-view {
  display: none;
  animation: fadeIn 0.3s ease;
}

.dashboard-view.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============ Coach Intelligence Room ============ */
.coach-room {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.coach-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: linear-gradient(135deg, rgba(22, 24, 33, 0.9), rgba(26, 29, 40, 0.8));
  border: 1px solid var(--border-glow);
  padding: 16px 20px;
  border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.coach-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.coach-avatar {
  font-size: 2rem;
  background: rgba(255, 215, 0, 0.1);
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 215, 0, 0.25);
  box-shadow: 0 0 15px var(--gold-glow);
}

.coach-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.coach-tag {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(255, 215, 0, 0.15);
  color: var(--gold);
  border: 1px solid rgba(255, 215, 0, 0.3);
  font-weight: 600;
}

.coach-subdesc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.coach-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-coach-subnav {
  padding: 7px 15px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-coach-subnav.active {
  background: var(--gold);
  color: #000;
  border-color: var(--gold);
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
}

.btn-copy-brief {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 15px;
  background: linear-gradient(135deg, rgba(0, 230, 118, 0.15), rgba(0, 200, 83, 0.1));
  border: 1px solid rgba(0, 230, 118, 0.3);
  color: var(--green);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-copy-brief:hover {
  background: var(--green);
  color: #000;
  box-shadow: 0 0 12px var(--green-glow);
}

/* ============ Coach Hero Card ============ */
.coach-hero-card {
  background: radial-gradient(ellipse at top left, rgba(255, 215, 0, 0.08), transparent 70%), var(--bg-card);
  border: 1px solid var(--border-glow);
  padding: 22px;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

.coach-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--gold);
}

.stance-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.stance-pill {
  font-size: 1.05rem;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  letter-spacing: 0.5px;
}

.stance-pill.bullish {
  background: var(--green-bg);
  border-color: rgba(0, 230, 118, 0.4);
  color: var(--green);
}

.stance-pill.bearish {
  background: var(--red-bg);
  border-color: rgba(255, 82, 82, 0.4);
  color: var(--red);
}

.stance-pill.neutral {
  background: var(--orange-bg);
  border-color: rgba(255, 152, 0, 0.4);
  color: var(--orange);
}

.conviction-pill {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.coach-exec-summary {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.25);
  padding: 16px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--gold);
}

/* ============ 3 Macro Pillars Grid ============ */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.pillar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 16px;
  transition: all 0.2s ease;
}

.pillar-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-2px);
}

.pillar-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pillar-content {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ============ Tactical Game Plan Card ============ */
.tactical-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px;
}

.tactical-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.tactical-item {
  background: var(--bg-secondary);
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.tactical-item-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.tactical-item-val {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.tactical-stance-box {
  background: rgba(255, 215, 0, 0.05);
  border: 1px dashed rgba(255, 215, 0, 0.3);
  padding: 14px;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ============ Traps & Psychology Grid ============ */
.traps-psychology-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.traps-card {
  background: rgba(255, 82, 82, 0.04);
  border: 1px solid rgba(255, 82, 82, 0.2);
  border-radius: var(--radius);
  padding: 18px;
}

.traps-list {
  list-style: none;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trap-item {
  font-size: 0.84rem;
  color: #ff8a80;
  line-height: 1.5;
  display: flex;
  gap: 8px;
}

.trap-item::before {
  content: '⚠️';
  font-size: 0.8rem;
}

.psychology-card {
  background: radial-gradient(ellipse at bottom right, rgba(68, 138, 255, 0.08), transparent 70%), var(--bg-card);
  border: 1px solid rgba(68, 138, 255, 0.25);
  border-radius: var(--radius);
  padding: 18px;
}

.psychology-text {
  font-size: 0.9rem;
  color: #b3e5fc;
  line-height: 1.65;
  margin-top: 10px;
  font-style: italic;
}

/* ============ Weekly Table & Ranges ============ */
.battlefield-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.battlefield-table th {
  text-align: left;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color);
}

.battlefield-table td {
  padding: 10px 12px;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.range-box-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: var(--bg-secondary);
  padding: 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  margin-top: 12px;
  text-align: center;
}

.range-val {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 800;
}

/* ============ Toast Notification ============ */
.toast-notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--gold);
  color: #000;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  z-index: 9999;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.toast-notice.show {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .pillars-grid { grid-template-columns: 1fr; }
  .traps-psychology-grid { grid-template-columns: 1fr; }
  .scenarios-container { grid-template-columns: 1fr; }
}

/* ============ Human-Grade Macro Sections ============ */
.fed-verdict-card {
  background: linear-gradient(135deg, rgba(22, 24, 33, 0.95), rgba(20, 35, 25, 0.6));
  border: 1px solid rgba(0, 230, 118, 0.3);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0, 230, 118, 0.08);
}

.fed-badge-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.fed-basis-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.3);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--green);
  margin-bottom: 10px;
  line-height: 1.5;
}

.fed-rationale-text {
  font-size: 0.92rem;
  color: var(--text-primary);
  line-height: 1.65;
}

.historical-pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px;
}

.brutal-truth-alert {
  background: linear-gradient(135deg, rgba(255, 152, 0, 0.08), rgba(255, 82, 82, 0.05));
  border: 1px solid rgba(255, 152, 0, 0.3);
  border-left: 4px solid var(--orange);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  margin-top: 12px;
  font-size: 0.92rem;
  color: #ffe0b2;
  line-height: 1.65;
}

.upcoming-playbook-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius);
  padding: 20px;
}

.scenarios-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 14px;
}

.scenario-col {
  padding: 16px;
  border-radius: var(--radius-sm);
  line-height: 1.6;
  font-size: 0.88rem;
}

.scenario-hot {
  background: rgba(255, 82, 82, 0.06);
  border: 1px solid rgba(255, 82, 82, 0.3);
  color: #ffcdd2;
}

.scenario-cool {
  background: rgba(0, 230, 118, 0.06);
  border: 1px solid rgba(0, 230, 118, 0.3);
  color: #c8e6c9;
}

.knee-jerk-warning {
  background: rgba(255, 215, 0, 0.05);
  border: 1px dashed rgba(255, 215, 0, 0.3);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin-top: 14px;
  font-size: 0.84rem;
  color: #fff9c4;
  line-height: 1.55;
}

.verdict-hero-card {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.12), rgba(22, 24, 33, 0.95));
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 4px 25px rgba(255, 215, 0, 0.15);
}

.prob-meter-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
}

.prob-bar-outer {
  flex: 1;
  height: 14px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
}

.prob-bar-fill-bull {
  background: var(--green);
  height: 100%;
  transition: width 0.5s ease;
}

.prob-bar-fill-bear {
  background: var(--red);
  height: 100%;
  transition: width 0.5s ease;
}

/* ============ Multi-TF Chart Controls ============ */
.chart-controls {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 2px 0;
  scrollbar-width: thin;
}

.chart-tf-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.chart-tf-btn:hover {
  background: rgba(255, 215, 0, 0.12);
  color: var(--gold);
  border-color: rgba(255, 215, 0, 0.3);
}

.chart-tf-btn.active {
  background: var(--gold);
  color: #0d0e15;
  border-color: var(--gold);
  font-weight: 700;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.35);
}

/* ============ Calendar Countdown Banner ============ */
.cal-warroom-btn {
  background: rgba(255, 59, 48, 0.15);
  border: 1px solid rgba(255, 59, 48, 0.4);
  color: #ff5252;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.cal-warroom-btn:hover {
  background: #ff5252;
  color: #fff;
  box-shadow: 0 0 10px rgba(255, 82, 82, 0.4);
}

.calendar-countdown-banner {
  background: linear-gradient(135deg, rgba(255, 152, 0, 0.12), rgba(22, 24, 33, 0.95));
  border: 1px solid rgba(255, 152, 0, 0.35);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin: 10px 12px 6px 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.cal-countdown-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  margin-bottom: 4px;
}

.cal-countdown-label {
  color: var(--text-muted);
}

.cal-countdown-name {
  color: var(--orange);
  font-weight: 700;
}

.cal-countdown-clock {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
  margin: 4px 0;
}

.cal-countdown-prob {
  font-size: 0.7rem;
  color: var(--green);
  font-weight: 600;
}

/* ============ Upcoming Event Playbook Enhancements ============ */
.upcoming-timer-badge {
  background: rgba(255, 152, 0, 0.15);
  border: 1px solid rgba(255, 152, 0, 0.4);
  color: var(--orange);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
}

.upcoming-prob-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin: 12px 0;
}

.prob-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.prob-title-badge {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--green);
  text-shadow: 0 0 10px rgba(0, 230, 118, 0.25);
}

.prob-consensus {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.upcoming-prob-bar {
  display: flex;
  height: 24px;
  border-radius: 6px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.up-bar-cool {
  background: linear-gradient(90deg, #00b0ff, #00e676);
  color: #06150a;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.6s ease;
}

.up-bar-hot {
  background: linear-gradient(90deg, #ff9100, #ff5252);
  color: #1a0303;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.6s ease;
}

.why-container {
  background: rgba(255, 215, 0, 0.04);
  border-left: 3px solid var(--gold);
  padding: 12px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 14px 0;
}

.why-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 8px;
}

.why-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.why-item {
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.55;
}

.target-impact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 14px 0;
}

.target-card {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  border: 1px solid;
}

.target-card.target-cool {
  background: rgba(0, 230, 118, 0.06);
  border-color: rgba(0, 230, 118, 0.3);
}

.target-card.target-hot {
  background: rgba(255, 82, 82, 0.06);
  border-color: rgba(255, 82, 82, 0.3);
}

.target-label {
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.target-cool .target-label { color: var(--green); }
.target-hot .target-label { color: var(--red); }

.target-value {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.target-cool .target-value { color: #b9f6ca; }
.target-hot .target-value { color: #ffcdd2; }

.target-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ============ VIEW 3: LIVE NEWS RELEASE WAR ROOM ============ */
.warroom-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.warroom-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid rgba(255, 59, 48, 0.25);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.warroom-title-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.warroom-beacon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ff3b30;
  box-shadow: 0 0 15px #ff3b30, 0 0 30px #ff3b30;
  animation: beaconGlow 1.2s infinite alternate;
}

@keyframes beaconGlow {
  0% { transform: scale(0.9); opacity: 0.6; }
  100% { transform: scale(1.15); opacity: 1; }
}

.warroom-title {
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: 1px;
  color: #fff;
}

.warroom-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.warroom-price-badge {
  text-align: right;
  background: rgba(255, 215, 0, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.25);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
}

.warroom-price-label {
  display: block;
  font-size: 0.65rem;
  color: var(--gold);
  letter-spacing: 1px;
  font-weight: 700;
}

.warroom-price-val {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 900;
  color: #fff;
}

.warroom-hero-card {
  background: linear-gradient(135deg, rgba(26, 20, 30, 0.9), rgba(13, 14, 21, 0.98));
  border: 2px solid rgba(255, 59, 48, 0.35);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  box-shadow: 0 6px 30px rgba(255, 59, 48, 0.1);
}

.warroom-event-meta {
  margin-bottom: 20px;
}

.warroom-event-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: 20px;
  margin-bottom: 8px;
}

.warroom-event-tag.red {
  background: rgba(255, 59, 48, 0.2);
  color: #ff5252;
  border: 1px solid rgba(255, 59, 48, 0.4);
}

.warroom-event-title {
  font-size: 1.8rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.5px;
  margin: 4px 0;
}

.warroom-event-time {
  font-size: 0.88rem;
  color: var(--orange);
  font-family: var(--font-mono);
}

/* Giant Clock */
.warroom-clock-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 24px 0 18px 0;
}

.clock-unit {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 14px 18px;
  border-radius: var(--radius);
  min-width: 90px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.6);
}

.clock-digit {
  display: block;
  font-family: var(--font-mono);
  font-size: 2.8rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 2px;
  line-height: 1;
}

.clock-digit.red {
  color: #ff5252;
  text-shadow: 0 0 15px rgba(255, 82, 82, 0.5);
}

.clock-colon {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-muted);
}

.clock-sub {
  display: block;
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 600;
  letter-spacing: 1px;
}

.warroom-status-badge {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.warroom-status-badge.waiting {
  background: rgba(255, 152, 0, 0.15);
  border: 1px solid rgba(255, 152, 0, 0.4);
  color: var(--orange);
}

.warroom-status-badge.released {
  background: rgba(0, 230, 118, 0.2);
  border: 1px solid rgba(0, 230, 118, 0.5);
  color: #69f0ae;
  animation: pulseGreen 1s infinite alternate;
}

@keyframes pulseGreen {
  0% { box-shadow: 0 0 10px rgba(0, 230, 118, 0.3); }
  100% { box-shadow: 0 0 25px rgba(0, 230, 118, 0.7); }
}

.warroom-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-wr-action {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-wr-action.primary {
  background: linear-gradient(135deg, #00c853, #00e676);
  color: #06150a;
}
.btn-wr-action.primary:hover {
  box-shadow: 0 0 15px rgba(0, 230, 118, 0.5);
  transform: translateY(-1px);
}

.btn-wr-action.warning {
  background: linear-gradient(135deg, #d50000, #ff5252);
  color: #fff;
}
.btn-wr-action.warning:hover {
  box-shadow: 0 0 15px rgba(255, 82, 82, 0.5);
  transform: translateY(-1px);
}

.btn-wr-action.secondary {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}
.btn-wr-action.secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Board Grid */
.warroom-board-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 16px;
}

.board-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
}

.board-card.actual {
  border: 2px solid var(--gold);
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.08), rgba(22, 24, 33, 0.95));
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.15);
}

.board-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.board-value {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  margin: 6px 0;
}

.board-value.orange { color: var(--orange); }
.board-value.pulse {
  color: var(--gold);
  font-size: 1.5rem;
}

.board-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Verdict Banner */
.warroom-verdict-card {
  background: linear-gradient(135deg, rgba(0, 230, 118, 0.12), rgba(22, 24, 33, 0.98));
  border: 2px solid var(--green);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 4px 30px rgba(0, 230, 118, 0.2);
}

.warroom-verdict-card.hot {
  background: linear-gradient(135deg, rgba(255, 82, 82, 0.12), rgba(22, 24, 33, 0.98));
  border-color: var(--red);
  box-shadow: 0 4px 30px rgba(255, 82, 82, 0.2);
}

.verdict-banner-header {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--green);
  margin-bottom: 8px;
}

.warroom-verdict-card.hot .verdict-banner-header {
  color: var(--red);
}

.verdict-gold-dir {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  margin: 8px 0;
}

.verdict-macro-reason {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Guide Card */
.warroom-guide-card {
  padding: 20px;
}

.guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.guide-step {
  display: flex;
  gap: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 14px;
  border-radius: var(--radius-sm);
}

.step-num {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--gold);
}

.step-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.step-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

@media (max-width: 900px) {
  .warroom-clock-wrapper {
    gap: 6px;
  }
  .clock-unit {
    min-width: 65px;
    padding: 10px 8px;
  }
  .clock-digit {
    font-size: 1.8rem;
  }
  .warroom-board-grid {
    grid-template-columns: 1fr;
  }
  .guide-grid {
    grid-template-columns: 1fr;
  }
  .target-impact-grid {
    grid-template-columns: 1fr;
  }
}

/* ============ VIEW 4: FULL-OPTION TRADINGVIEW PRO CHART ROOM ============ */
.chart-switch-view-btn {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 152, 0, 0.3));
  border: 1px solid rgba(255, 215, 0, 0.5);
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.chart-switch-view-btn:hover {
  background: var(--gold);
  color: #06070a;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.4);
}

.fullchart-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: calc(100vh - 120px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.fullchart-wrapper:fullscreen {
  border-radius: 0;
  padding: 12px;
  min-height: 100vh;
  background: #0d0e15;
}

/* Ticker Tape */
.fullchart-ticker-tape {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  scrollbar-width: thin;
}

.tape-item {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-size: 0.8rem;
  padding-right: 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.tape-item:last-child {
  border-right: none;
}

.tape-item.live-pulse {
  position: relative;
}

.tape-sym {
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
}

.tape-val {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #fff;
}

.tape-chg {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
}

.tape-chg.up {
  background: rgba(0, 230, 118, 0.15);
  color: var(--green);
}

.tape-chg.down {
  background: rgba(255, 82, 82, 0.15);
  color: var(--red);
}

/* Toolbar */
.fullchart-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 4px 0;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.toolbar-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-right: 2px;
}

.tb-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tb-btn:hover {
  background: rgba(255, 215, 0, 0.12);
  color: var(--gold);
  border-color: rgba(255, 215, 0, 0.35);
}

.tb-btn.active {
  background: var(--gold);
  color: #06070a;
  border-color: var(--gold);
  font-weight: 800;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.35);
}

.tb-btn.highlight {
  background: linear-gradient(135deg, rgba(0, 230, 118, 0.2), rgba(0, 176, 255, 0.2));
  border-color: rgba(0, 230, 118, 0.4);
  color: #b9f6ca;
}

.tb-btn.highlight:hover {
  background: var(--green);
  color: #06150a;
  box-shadow: 0 0 15px rgba(0, 230, 118, 0.4);
}

/* TradingView Container & Fullscreen Edge-to-Edge Styles */
body.fullchart-mode .app-container {
  max-width: 100% !important;
  width: 100% !important;
  padding: 6px 14px 14px 14px !important;
}

body.fullchart-mode .header {
  margin-bottom: 8px !important;
  padding: 8px 18px !important;
}

.dashboard-view#view-fullchart {
  width: 100%;
}

.fullchart-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: calc(100vh - 140px);
  height: calc(100vh - 140px);
  background: #0f1118;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
}

.fullchart-wrapper:fullscreen {
  border-radius: 0;
  padding: 8px;
  min-height: 100vh;
  height: 100vh;
  background: #0d0e15;
}

.fullchart-lw-container {
  flex: 1 1 auto;
  min-height: 720px !important;
  height: calc(100vh - 200px) !important;
  width: 100% !important;
  background: #0f111a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
}

.fullchart-wrapper:fullscreen .fullchart-lw-container {
  height: calc(100vh - 120px) !important;
  min-height: calc(100vh - 120px) !important;
}

body.zen-chart-mode .fullchart-lw-container {
  height: calc(100vh - 90px) !important;
  min-height: calc(100vh - 90px) !important;
}

/* Pro Tools Toolbar */
.pro-tools-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  background: rgba(18, 20, 30, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
}

/* AI Fibonacci Intelligent Swing Status Bar */
.fib-status-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 27, 75, 0.8));
  border: 1px solid rgba(56, 189, 248, 0.28);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  border-radius: var(--radius-sm);
  padding: 7px 14px;
  margin-top: -4px;
  transition: all 0.3s ease;
}

.fib-status-bar.hidden {
  display: none !important;
}

.fib-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.74rem;
  font-family: var(--font-mono);
  color: #94a3b8;
}

.fib-status-pill .fib-status-icon {
  font-size: 0.85rem;
}

.fib-status-pill .fib-status-label {
  color: #cbd5e1;
  font-weight: 600;
}

.fib-status-pill .fib-status-points {
  color: #38bdf8;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.12);
  padding: 3px 9px;
  border-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.fib-status-pill.ote .fib-status-target {
  color: #f59e0b;
  font-weight: 800;
  background: rgba(245, 158, 11, 0.12);
  padding: 3px 9px;
  border-radius: 4px;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.fib-status-pill.sweet .fib-status-sweet {
  color: #22d3ee;
  font-weight: 800;
  background: rgba(34, 211, 238, 0.12);
  padding: 3px 9px;
  border-radius: 4px;
  border: 1px solid rgba(34, 211, 238, 0.3);
}

.pro-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 5px 12px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.pro-tool-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.pro-tool-btn.active {
  background: rgba(255, 215, 0, 0.15);
  color: var(--gold);
  border-color: rgba(255, 215, 0, 0.5);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

.pro-tool-btn.fib.active {
  background: linear-gradient(135deg, rgba(192, 132, 252, 0.22), rgba(34, 211, 238, 0.22));
  color: #38bdf8;
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.pro-tool-btn.trend.active {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.22), rgba(234, 88, 12, 0.28));
  color: #fb923c;
  border-color: #fb923c;
  box-shadow: 0 0 12px rgba(249, 115, 22, 0.25);
}

.pro-tool-btn.sr.active {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.22), rgba(16, 185, 129, 0.28));
  color: #4ade80;
  border-color: #4ade80;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.25);
}

.pro-tool-btn.news.active {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.22), rgba(220, 38, 38, 0.28));
  color: #f87171;
  border-color: #f87171;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.25);
}

.fullchart-tf-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  padding: 4px 9px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-mono);
  transition: all 0.2s ease;
}

.fullchart-tf-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.fullchart-tf-btn.active {
  background: var(--gold);
  color: #06070a;
  border-color: var(--gold);
  font-weight: 800;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.35);
}

/* Zen Pro Mode (Hide headers for maximum 96vh chart real estate) */
body.zen-chart-mode .header,
body.zen-chart-mode .view-nav,
body.zen-chart-mode .fullchart-ticker-tape,
body.zen-chart-mode .fullchart-macro-hud {
  display: none !important;
}

body.zen-chart-mode .app-container {
  max-width: 100vw !important;
  width: 100vw !important;
  padding: 0 !important;
  margin: 0 !important;
}

body.zen-chart-mode .fullchart-wrapper {
  min-height: 100vh !important;
  height: 100vh !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 4px 6px !important;
}

body.zen-chart-mode .tradingview-full-container {
  min-height: calc(100vh - 46px) !important;
  height: calc(100vh - 46px) !important;
}

/* Terminal Chart Feed Toggle & Embedded TV */
.chart-mode-toggle {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 2px;
  gap: 3px;
}

.chart-mode-pill {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.chart-mode-pill:hover {
  color: #fff;
}

.chart-mode-pill.active {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.25), rgba(255, 179, 0, 0.35));
  color: var(--gold);
  border: 1px solid rgba(255, 215, 0, 0.4);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.25);
}

#tv-terminal-container {
  width: 100%;
  height: 480px;
  position: relative;
  background: #131722;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

#tradingview_terminal_widget,
#tradingview_terminal_widget > div,
#tradingview_terminal_widget iframe {
  width: 100% !important;
  height: 100% !important;
  min-height: 480px !important;
  border: none !important;
  display: block !important;
}

/* Bottom HUD */
.fullchart-macro-hud {
  display: flex;
  align-items: center;
  gap: 16px;
  overflow-x: auto;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  scrollbar-width: thin;
}

.hud-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  white-space: nowrap;
}

.hud-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.hud-val {
  font-size: 0.85rem;
  font-weight: 800;
  color: #fff;
}

.hud-val.green { color: var(--green); }
.hud-val.gold { color: var(--gold); }
.hud-val.orange { color: var(--orange); }

.hud-sep {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
}

/* Terminal Chart Bar Countdown */
.terminal-bar-countdown {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  margin-right: 4px;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
  white-space: nowrap;
}

/* Full-Option Canvas Wrapper */
.fullchart-canvas-wrapper {
  position: relative;
  width: 100%;
}

/* Floating White Bar-Close Countdown Badge */
.chart-bar-countdown-badge {
  position: absolute;
  top: 14px;
  right: 75px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(15, 17, 26, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6), 0 0 10px rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  padding: 5px 12px;
  border-radius: 20px;
  pointer-events: auto;
  user-select: none;
}

.countdown-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 8px #ffffff;
  animation: pulseWhite 1.5s infinite;
}

@keyframes pulseWhite {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.countdown-tf-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #cbd5e1;
  font-weight: 600;
}

.countdown-time-val {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 900;
  color: #ffffff !important;
  letter-spacing: 0.5px;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

/* Floating Future News Preview Ribbon */
.chart-future-news-badge {
  position: absolute;
  top: 14px;
  left: 20px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.88), rgba(15, 23, 42, 0.92));
  border: 1px solid rgba(168, 85, 247, 0.4);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.73rem;
  font-family: var(--font-mono);
  color: #e2e8f0;
  pointer-events: auto;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chart-future-news-badge:hover {
  border-color: #c084fc;
  box-shadow: 0 0 12px rgba(192, 132, 252, 0.35);
  transform: translateY(-1px);
}

/* Left-Side Price Labels Overlay (โซนถูกใช้ไปแล้ว / เกรด A, B, C) */
.chart-left-labels-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 15;
  overflow: hidden;
}

.chart-left-tag {
  position: absolute;
  left: 14px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 17, 26, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(6px);
  padding: 3px 9px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  transition: top 0.05s ease-out;
}

.chart-left-tag.used {
  background: rgba(25, 20, 24, 0.92);
  border-color: rgba(248, 113, 113, 0.45);
  color: #f87171;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.chart-left-tag.unmitigated {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(56, 189, 248, 0.45);
  color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}

.chart-left-tag.fib-0,
.chart-left-tag.fib-1 {
  background: rgba(20, 24, 33, 0.88);
  border-color: rgba(148, 163, 184, 0.35);
  color: #cbd5e1;
}

.future-news-icon {
  font-size: 0.85rem;
}

.future-news-text {
  font-weight: 700;
  color: #f1f5f9;
}

/* Glassmorphic Right-Click Context Menu */
.chart-context-menu {
  position: fixed;
  z-index: 99999;
  display: none;
  background: rgba(15, 17, 26, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7), 0 0 15px rgba(255, 215, 0, 0.1);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-sm);
  padding: 6px;
  min-width: 220px;
  user-select: none;
  animation: fadeInMenu 0.15s ease-out;
}

@keyframes fadeInMenu {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.context-menu-header {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 10px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 4px;
}

.context-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-xs);
  font-size: 0.76rem;
  font-weight: 600;
  color: #e2e8f0;
  cursor: pointer;
  transition: all 0.15s ease;
}

.context-menu-item:hover {
  background: rgba(255, 215, 0, 0.12);
  color: var(--gold);
}

.context-menu-icon {
  font-size: 0.85rem;
  width: 18px;
  text-align: center;
}

.context-menu-text {
  flex: 1;
}

.context-menu-hint {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.context-menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 4px 0;
}





