:root{
  --e-bg:#0b0f14;
  --e-surface:#0f141a;
  --e-surface-2:#121922;
  --e-border:#1a2330;
  --e-text:#e6edf7;
  --e-muted:#98a9bb;
  --e-accent:#22c55e;
  --e-accent-600:#16a34a;
  --e-radius:12px;
}

/* Scope to dashboard panel to avoid conflicts */
.panel.echelon{ background: transparent; }
.echelon-wrap{ padding: 14px 18px 28px; }
.echelon-toolbar{ display:flex; align-items:center; justify-content: space-between; margin-bottom: 14px; }
.echelon-title{ display:flex; align-items:center; gap:10px; font-weight:800; }
.echelon-title .dot{ width:10px; height:10px; border-radius:50%; background: var(--e-accent); box-shadow:0 0 8px rgba(34,197,94,.65); }
.echelon-title h2{ margin:0; font-size:18px; }
.echelon-sub{ color: var(--e-muted); font-size:12px; }

.echelon-filters{ display:flex; gap:8px; }
.echelon-chip{ padding:6px 10px; border-radius:9999px; border:1px solid var(--e-border); background: #0b0f14; color: var(--e-muted); font-weight:600; cursor:pointer; }
.echelon-chip.active{ color: var(--e-text); background:#0f141a; border-color:#223041; }

/* Stats row */
.echelon-stats{ display:grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 14px; }
.stat-card{ background: var(--e-surface); border:1px solid var(--e-border); border-radius: var(--e-radius); padding: 14px; }
.stat-card .label{ color: var(--e-muted); font-size:12px; margin-bottom:6px; display:flex; align-items:center; gap:8px; }
.stat-card .value{ font-weight:900; font-size: 20px; }
.stat-card .delta{ color: var(--e-accent); font-weight:700; font-size:12px; }
.stat-card.purple .label i{ color:#8b5cf6; }
.stat-card.blue .label i{ color:#60a5fa; }
.stat-card.orange .label i{ color:#f59e0b; }

/* Big chart */
.echelon-chart{ background: var(--e-surface); border:1px solid var(--e-border); border-radius: var(--e-radius); padding: 14px; margin-bottom: 14px; }
.echelon-chart .head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.echelon-chart .title{ font-weight:800; }
.chart-placeholder{ height: 320px; border-radius: 10px; background: linear-gradient(180deg, rgba(34,197,94,0.18), rgba(34,197,94,0.02)); box-shadow: inset 0 0 0 1px rgba(34,197,94,0.18); position: relative; overflow:hidden; }
.chart-placeholder::after{ content:''; position:absolute; inset:0; background: radial-gradient(1200px 200px at 70% 120%, rgba(34,197,94,0.2), transparent 60%); pointer-events:none; }

/* Bottom cards */
.echelon-grid-2{ display:grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.echelon-card{ background: var(--e-surface); border:1px solid var(--e-border); border-radius: var(--e-radius); padding: 14px; }
.echelon-card .title{ font-weight:800; margin-bottom:8px; }

/* Market share list */
.share-list{ display:flex; flex-direction:column; gap:10px; }
.share-item{ display:grid; grid-template-columns: 120px 1fr 64px; align-items:center; gap:10px; }
.share-name{ font-weight:700; font-size:12px; color: var(--e-text); letter-spacing:.3px; opacity:.9; }
.share-bar{ height:8px; background: rgba(255,255,255,0.06); border:1px solid var(--e-border); border-radius:999px; overflow:hidden; }
.share-bar span{ display:block; height:100%; background: linear-gradient(90deg, var(--e-accent), rgba(34,197,94,0.25)); border-radius:999px; box-shadow: 0 0 10px rgba(34,197,94,0.35) inset; }
.share-value{ font-weight:800; font-size:12px; color: var(--e-text); opacity:.9; text-align:right; }

/* Dashboard Split Layout */
.dashboard-split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.dashboard-left, .dashboard-right {
  background: var(--e-surface);
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
}

/* Market Sessions Styles */
.market-sessions-container {
  padding: 20px;
  height: 100%;
  background: rgba(8,10,12,0.6);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.02) inset;
}

.sessions-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.sessions-header h3 {
  color: var(--e-text);
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.sessions-live {
  background: rgba(0,255,133,0.15);
  color: #00FF85;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(0,255,133,0.4);
  box-shadow: 0 0 12px rgba(0,255,133,0.25);
}

/* World Map */
.world-map-container {
  background: radial-gradient(120% 120% at 50% 0%, #0a0a0a 0%, #0e1114 50%, #0a0a0a 100%);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 18px;
  position: relative;
  height: 200px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
}

.world-map-container::after{
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  pointer-events: none;
  /* subtle green hazes to mimic mockup glow */
  background:
    radial-gradient(30% 50% at 22% 58%, rgba(0,255,133,0.10), transparent 60%),
    radial-gradient(28% 48% at 82% 50%, rgba(0,255,133,0.08), transparent 60%);
}

.world-map {
  position: relative;
  width: 100%;
  height: 100%;
  filter: contrast(0.98) brightness(0.92);
  background: url('/images/world-map-real.svg') center/cover no-repeat;
}

.market-point {
  position: absolute;
  width: 12px;
  height: 12px;
  cursor: pointer;
  z-index: 2;
}

.point-dot {
  width: 10px;
  height: 10px;
  background: #666;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
}

.point-glow {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: all 0.3s ease;
}

/* Market Point Positions (adjusted for the realistic map) */
.ny-point { top: 47%; left: 23%; }
.london-point { top: 36%; left: 56%; }
.paris-point { top: 38%; left: 57%; }
.tokyo-point { top: 42%; left: 86%; }

/* Active Session Styles */
.market-point.active .point-dot {
  background: #00FF85;
  box-shadow: 0 0 15px rgba(0,255,133,0.8);
}

.market-point.active .point-glow {
  background: radial-gradient(circle, rgba(0,255,133,0.4) 0%, transparent 70%);
  opacity: 1;
  animation: pulse-glow 2s infinite;
}

/* Decorative connection lines overlay */
.map-lines{
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.map-lines path{
  fill: none;
  stroke: rgba(0,255,133,0.18);
  stroke-width: 0.7;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(0,255,133,0.18));
}

@keyframes pulse-glow {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.3; }
}

/* Session Cards */
.sessions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.session-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s ease;
  position: relative;
}

.session-card.active {
  border-color: rgba(0,255,133,0.35);
  box-shadow: 0 0 0 1px rgba(0,255,133,0.15) inset, 0 0 18px rgba(0,255,133,0.25);
}

.session-flag {
  font-size: 20px;
  line-height: 1;
}

.session-info {
  flex: 1;
}

.session-name {
  font-weight: 700;
  color: #e5eff9;
  font-size: 15px;
  margin-bottom: 4px;
}

.session-time {
  font-size: 12px;
  letter-spacing: 0.4px;
  color: rgba(235,241,248,0.65);
}

/* We hide the dot to match the mockup style */
.session-status { display: none; }

.session-card.active .session-status {
  background: #00FF85;
  box-shadow: 0 0 10px rgba(0,255,133,0.8);
  animation: pulse 2s infinite;
}

.session-card.active .session-name {
  color: #00FF85;
}

.session-card.active .session-time {
  color: rgba(0,255,133,0.85);
}

/* Next Session Row */
.next-session-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px 0 16px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
}
.next-label{
  color: rgba(235,241,248,0.65);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .4px;
}
.next-value{
  color: #e5eff9;
  font-weight: 700;
  font-size: 13px;
}
.next-value .next-name{ color:#e5eff9; }
.next-value .next-countdown{ color:#00FF85; font-weight:800; }
.next-value .next-open{ color: rgba(235,241,248,0.58); margin-left: 6px; }

/* Responsive */
@media (max-width: 1180px){ .echelon-stats{ grid-template-columns: repeat(3, 1fr); } .echelon-grid-2{ grid-template-columns: 1fr; } }
@media (max-width: 768px) {
  .echelon-stats { grid-template-columns: repeat(2, 1fr); }
  .echelon-grid-2 { grid-template-columns: 1fr; }
  .dashboard-split-layout { 
    grid-template-columns: 1fr; 
    gap: 16px;
  }
  .sessions-grid { 
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px){ .echelon-stats{ grid-template-columns: repeat(2, 1fr); } }
