/* ═══════════════════════════════════════════════
   FOREX MAP — Design System
   Aesthetic: terminal-luxe / financial dark
═══════════════════════════════════════════════ */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}

:root {
  /* Colors */
  --ink:       #030710;
  --deep:      #060c1a;
  --panel:     #09101f;
  --card:      #0d1527;
  --hover:     #111d33;
  --line:      #162035;
  --line2:     #1d2c48;

  --acc:       #00d4ff;
  --acc-dim:   rgba(0,212,255,.12);
  --acc-glow:  rgba(0,212,255,.25);
  --gain:      #00e676;
  --loss:      #ff3d5a;
  --mid:       #fbbf24;
  --warn:      #f97316;

  --txt:       #dce8ff;
  --txt2:      #5a7399;
  --txt3:      #2a3f5e;

  --font-mono: 'Space Mono', monospace;
  --font-disp: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;

  --r:         5px;
  --r2:        9px;
  --sh:        0 12px 48px rgba(0,0,0,.9);

  /* Layout */
  --hdr:       56px;
  --fc:        44px;
  --tick:      30px;
  --mobnav:    60px;
  --sbL:       240px;
  --sbR:       272px;
}

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--ink);
  color: var(--txt);
  font-family: var(--font-body);
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 3px }
::-webkit-scrollbar-track { background: transparent }
::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 2px }

/* ══ HEADER ══ */
.header {
  height: var(--hdr);
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 14px;
  position: relative;
  z-index: 1100;
  flex-shrink: 0;
}

/* subtle scanline texture on header */
.header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,.06) 2px, rgba(0,0,0,.06) 4px);
  pointer-events: none;
}

.hdr-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

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

.logo-mark {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--acc), #0080ff);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 20px var(--acc-glow);
}

.logo-diamond {
  font-size: 16px;
  color: var(--ink);
  font-weight: 700;
}

.logo-words {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo-top {
  font-family: var(--font-disp);
  font-size: 15px;
  font-weight: 800;
  color: var(--txt);
  letter-spacing: 3px;
}

.logo-bot {
  font-family: var(--font-disp);
  font-size: 10px;
  font-weight: 600;
  color: var(--acc);
  letter-spacing: 4px;
}

.hdr-divider {
  width: 1px;
  height: 28px;
  background: var(--line2);
}

.tagline {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--txt3);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.hdr-search {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 0 12px;
  min-width: 0;
}

.search-wrap {
  position: relative;
  width: clamp(180px, 32vw, 360px);
}

.search-ico {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--txt3);
  font-size: 15px;
  pointer-events: none;
}

.search-bar {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line2);
  color: var(--txt);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 7px 12px 7px 32px;
  border-radius: var(--r2);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.search-bar:focus {
  border-color: var(--acc);
  box-shadow: 0 0 0 3px var(--acc-dim);
}

.search-bar::placeholder { color: var(--txt3) }

.search-drop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--panel);
  border: 1px solid var(--line2);
  border-radius: var(--r2);
  max-height: 240px;
  overflow-y: auto;
  z-index: 3500;
  display: none;
  box-shadow: var(--sh);
}

.search-drop.open { display: block }

.s-res {
  padding: 9px 14px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  transition: background .1s;
  font-size: 13px;
}

.s-res:hover { background: var(--hover) }
.s-res:last-child { border-bottom: none }
.s-code { color: var(--acc); font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 1px }

.hdr-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.lang-sel {
  display: flex;
  gap: 2px;
  background: var(--card);
  border: 1px solid var(--line2);
  border-radius: var(--r2);
  padding: 3px;
}

.lang-btn {
  background: none;
  border: none;
  color: var(--txt3);
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 4px 7px;
  border-radius: 5px;
  cursor: pointer;
  transition: all .15s;
  letter-spacing: .5px;
}

.lang-btn:hover { color: var(--txt); background: var(--hover) }
.lang-btn.active { color: var(--ink); background: var(--acc); font-weight: 700 }

.live-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--txt2);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  background: var(--card);
  border: 1px solid var(--line2);
  padding: 5px 10px;
  border-radius: 20px;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gain);
  box-shadow: 0 0 8px var(--gain);
  animation: blink 2s infinite;
}

.live-timer { color: var(--acc); font-size: 9px }

/* ══ FORECAST BAR ══ */
.forecast-bar {
  height: var(--fc);
  display: none;
  align-items: center;
  padding: 0 16px;
  gap: 14px;
  background: linear-gradient(90deg, rgba(249,115,22,.08), rgba(251,191,36,.04));
  border-bottom: 1px solid rgba(249,115,22,.2);
  flex-shrink: 0;
  z-index: 1050;
}

.forecast-bar.active { display: flex }
.fc-left { display: flex; align-items: center; gap: 10px; min-width: 130px }
.fc-badge { background: var(--warn); color: #000; font-family: var(--font-mono); font-size: 9px; font-weight: 700; padding: 3px 9px; border-radius: 20px; letter-spacing: 1px }
.fc-hour-label { font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--warn) }
.fc-slider-wrap { flex: 1; display: flex; align-items: center; gap: 8px }
.fc-h { font-size: 9px; color: var(--txt3); font-family: var(--font-mono) }
.fc-slider { flex: 1; -webkit-appearance: none; height: 3px; background: linear-gradient(90deg,var(--warn) var(--pct,0%),var(--line2) var(--pct,0%)); border-radius: 2px; outline: none; cursor: pointer }
.fc-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--warn); border: 2px solid var(--ink); cursor: pointer; box-shadow: 0 0 8px rgba(249,115,22,.6) }
.fc-right { display: flex; align-items: center; gap: 7px }
.fc-play-btn { background: var(--warn); color: #000; border: none; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 10px; transition: transform .15s }
.fc-play-btn:hover { transform: scale(1.1) }
.fc-close-btn { background: transparent; border: 1px solid rgba(249,115,22,.35); color: var(--warn); font-family: var(--font-mono); font-size: 10px; padding: 5px 11px; border-radius: var(--r); cursor: pointer; transition: all .15s }
.fc-close-btn:hover { background: rgba(249,115,22,.1) }

/* ══ MAIN LAYOUT ══ */
.main-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
  height: calc(100dvh - var(--hdr) - var(--tick));
}

body.forecast-active .main-layout {
  height: calc(100dvh - var(--hdr) - var(--fc) - var(--tick));
}

/* ══ SIDEBARS ══ */
.sidebar {
  flex-shrink: 0;
  background: var(--panel);
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.sidebar-left {
  width: var(--sbL);
  border-right: 1px solid var(--line);
}

.sidebar-right {
  width: var(--sbR);
  border-left: 1px solid var(--line);
}

.sb-block {
  padding: 12px 13px;
  border-bottom: 1px solid var(--line);
}

.sb-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--txt3);
  text-transform: uppercase;
  margin-bottom: 10px;
}

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

.sb-dot.acc  { background: var(--acc) }
.sb-dot.gain { background: var(--gain) }
.sb-dot.loss { background: var(--loss) }
.sb-dot.warn { background: var(--warn) }

.sim-badge {
  font-size: 8px;
  color: var(--txt3);
  background: var(--card);
  border: 1px solid var(--line2);
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: .5px;
  margin-left: auto;
  font-family: var(--font-body);
  text-transform: lowercase;
  font-weight: 400;
}

.view-controls { padding: 10px 12px }
.view-toggle-row { display: flex; gap: 4px }

.view-btn {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--line2);
  color: var(--txt2);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 1px;
  padding: 7px 4px;
  border-radius: var(--r);
  cursor: pointer;
  transition: all .15s;
}

.view-btn.active,
.view-btn:hover {
  background: var(--acc);
  color: var(--ink);
  border-color: var(--acc);
  font-weight: 700;
}

.fc-mode-btn {
  flex: 1;
  background: var(--card);
  border: 1px solid rgba(249,115,22,.3);
  color: var(--warn);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 1px;
  padding: 7px 4px;
  border-radius: var(--r);
  cursor: pointer;
  transition: all .15s;
}

.fc-mode-btn:hover,
.fc-mode-btn.active {
  background: rgba(249,115,22,.12);
  border-color: var(--warn);
}

/* ══ RANKINGS ══ */
.rank-list { display: flex; flex-direction: column; gap: 2px }

.rank-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 8px;
  background: var(--card);
  border-radius: var(--r);
  cursor: pointer;
  transition: all .15s;
  border-left: 2px solid transparent;
}

.rank-item:hover {
  background: var(--hover);
  border-left-color: var(--acc);
  transform: translateX(2px);
}

.rank-item.strong { border-left-color: var(--gain) }
.rank-item.weak   { border-left-color: var(--loss) }

.ri-l { display: flex; flex-direction: column; gap: 1px }
.ri-code { font-family: var(--font-mono); font-size: 11px; font-weight: 700 }
.ri-name { font-size: 10px; color: var(--txt2) }
.ri-r { display: flex; flex-direction: column; align-items: flex-end; gap: 1px }
.ri-rate { font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--txt) }
.ri-sub { font-size: 9px; color: var(--txt3) }

/* ══ LEGEND ══ */
.legend { display: flex; flex-direction: column; gap: 6px }

.leg-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  color: var(--txt2);
  font-family: var(--font-body);
}

.leg-sw {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

.leg-sw.green  { background: var(--gain) }
.leg-sw.yellow { background: var(--mid) }
.leg-sw.red    { background: var(--loss) }
.leg-sw.grey   { background: #192840 }

/* ══ STATS ══ */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px }

.stat-box {
  background: var(--card);
  border: 1px solid var(--line2);
  border-radius: var(--r);
  padding: 8px 9px;
}

.stat-lbl {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--txt3);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.stat-val {
  font-family: var(--font-disp);
  font-size: 18px;
  font-weight: 700;
  color: var(--txt);
  line-height: 1;
}

.stat-val.g { color: var(--gain) }
.stat-val.r { color: var(--loss) }

/* ══ INDICES ══ */
.indices-list { display: flex; flex-direction: column; gap: 3px }

.idx-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  background: var(--card);
  border-radius: var(--r);
  border-left: 2px solid var(--line2);
  transition: border-left-color .3s;
}

.idx-item.up   { border-left-color: var(--gain) }
.idx-item.dn   { border-left-color: var(--loss) }
.idx-item.flat { border-left-color: var(--mid) }
.idx-l { display: flex; flex-direction: column; gap: 1px }
.idx-name  { font-family: var(--font-mono); font-size: 10px; font-weight: 700; color: var(--txt) }
.idx-region{ font-size: 9px; color: var(--txt3) }
.idx-r { display: flex; flex-direction: column; align-items: flex-end; gap: 1px }
.idx-val{ font-family: var(--font-mono); font-size: 10px; font-weight: 700; color: var(--txt) }
.idx-chg{ font-family: var(--font-mono); font-size: 9px; font-weight: 700 }
.idx-chg.up  { color: var(--gain) }
.idx-chg.dn  { color: var(--loss) }
.idx-chg.flat{ color: var(--mid) }

/* ══ MAP ══ */
.map-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-width: 0;
}

#map {
  width: 100%;
  height: 100%;
  background: #030b18;
}

/* ocean gradient overlay at edges */
.map-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 400;
  background:
    linear-gradient(to right, var(--panel) 0%, transparent 40px),
    linear-gradient(to left,  var(--panel) 0%, transparent 40px),
    linear-gradient(to bottom, var(--panel) 0%, transparent 40px),
    linear-gradient(to top,   var(--panel) 0%, transparent 40px);
}

/* map status pill */
.map-controls {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 600;
  pointer-events: none;
}

.map-status {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(9,16,31,.85);
  border: 1px solid var(--line2);
  border-radius: 20px;
  padding: 5px 12px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--txt2);
  letter-spacing: 1px;
  backdrop-filter: blur(6px);
  white-space: nowrap;
}

.ms-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--acc);
  animation: blink 2s infinite;
}

/* loading overlay */
.loading-over {
  position: absolute;
  inset: 0;
  background: rgba(3,7,16,.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 800;
  transition: opacity .6s;
  backdrop-filter: blur(4px);
}

.loading-over.gone {
  opacity: 0;
  pointer-events: none;
}

.loading-inner { text-align: center }

.loading-ring {
  width: 40px;
  height: 40px;
  border: 2px solid var(--line2);
  border-top-color: var(--acc);
  border-radius: 50%;
  animation: spinRing .7s linear infinite;
  margin: 0 auto 12px;
}

.loading-label {
  font-family: var(--font-disp);
  font-size: 13px;
  font-weight: 700;
  color: var(--txt);
  letter-spacing: 2px;
}

.loading-sub {
  font-size: 11px;
  color: var(--txt3);
  margin-top: 4px;
  font-family: var(--font-body);
}

/* Leaflet overrides */
.leaflet-control-zoom {
  border: 1px solid var(--line2) !important;
  border-radius: var(--r2) !important;
  overflow: hidden;
  box-shadow: none !important;
}

.leaflet-control-zoom a {
  background: var(--card) !important;
  color: var(--txt2) !important;
  border-bottom: 1px solid var(--line) !important;
  font-size: 16px !important;
  line-height: 26px !important;
  width: 26px !important;
  height: 26px !important;
  transition: all .15s !important;
}

.leaflet-control-zoom a:hover {
  background: var(--hover) !important;
  color: var(--acc) !important;
}

.leaflet-control-zoom-out { border-bottom: none !important }

.map-tooltip {
  background: rgba(6,12,26,.95) !important;
  border: 1px solid var(--line2) !important;
  border-radius: var(--r) !important;
  color: var(--txt) !important;
  font-family: var(--font-body) !important;
  font-size: 12px !important;
  padding: 6px 11px !important;
  box-shadow: 0 6px 24px rgba(0,0,0,.7) !important;
  pointer-events: none !important;
}

.map-tooltip::before { display: none !important }
.map-tip strong { display: block; font-weight: 600; color: var(--txt) }
.map-tip span { color: var(--acc); font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 1px }

/* ══ CONVERTER ══ */
.conv-block { padding: 12px 13px }
.conv-body { display: flex; flex-direction: column; gap: 9px }
.conv-amount-row { display: flex; flex-direction: column; gap: 4px }

.conv-lbl {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--txt3);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.conv-amt-input {
  background: var(--card);
  border: 1px solid var(--line2);
  color: var(--txt);
  font-family: var(--font-mono);
  font-size: 15px;
  padding: 8px 11px;
  border-radius: var(--r);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}

.conv-amt-input:focus {
  border-color: var(--acc);
  box-shadow: 0 0 0 3px var(--acc-dim);
}

.conv-amt-input.big { font-size: 20px; padding: 10px 13px }

.conv-pair { display: flex; align-items: flex-end; gap: 6px }
.conv-pair.vertical { flex-direction: column }
.conv-side { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0 }

.conv-select {
  background: var(--card);
  border: 1px solid var(--line2);
  color: var(--txt);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 7px 9px;
  border-radius: var(--r);
  outline: none;
  cursor: pointer;
  width: 100%;
  transition: border-color .15s;
}

.conv-select:focus { border-color: var(--acc) }
.conv-select.big-sel { font-size: 14px; padding: 9px 11px }

.swap-btn {
  background: var(--hover);
  border: 1px solid var(--line2);
  color: var(--acc);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  flex-shrink: 0;
  transition: all .15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.swap-btn:hover { background: var(--acc); color: var(--ink) }
.swap-btn.wide { width: 100%; border-radius: var(--r); height: 36px; font-size: 12px }

.conv-go-btn {
  background: linear-gradient(90deg, var(--acc), #0080ff);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 9px;
  border: none;
  border-radius: var(--r);
  cursor: pointer;
  letter-spacing: 1.5px;
  transition: opacity .15s;
}

.conv-go-btn:hover { opacity: .85 }
.conv-go-btn.big { font-size: 13px; padding: 12px }

.conv-result {
  display: none;
  background: var(--card);
  border: 1px solid var(--line2);
  border-radius: var(--r);
  padding: 11px 13px;
  border-left: 3px solid var(--acc);
}

.conv-result.show { display: block }
.cr-main { font-family: var(--font-disp); font-size: 22px; font-weight: 700; color: var(--gain) }
.conv-result.big .cr-main { font-size: 28px }
.cr-label { font-size: 10px; color: var(--txt3); margin-top: 2px }
.cr-rate  { font-family: var(--font-mono); font-size: 11px; color: var(--txt2); margin-top: 4px }
.cr-inv   { font-size: 10px; color: var(--txt3); margin-top: 2px }

.conv-table { display: none; flex-direction: column; gap: 2px; margin-top: 2px }
.conv-table.show { display: flex }
.ct-title { font-family: var(--font-mono); font-size: 8px; color: var(--txt3); letter-spacing: 1.5px; margin-bottom: 4px; text-transform: uppercase }
.ct-row { display: flex; justify-content: space-between; padding: 5px 9px; background: var(--card); border-radius: var(--r); font-size: 11px; border-left: 2px solid var(--line2) }
.ct-row:first-of-type { border-left-color: var(--acc) }
.ct-l { color: var(--txt3); font-family: var(--font-body) }
.ct-v { color: var(--txt); font-family: var(--font-mono); font-weight: 700 }

/* ══ QUOTE PANEL ══ */
.quote-empty { text-align: center; padding: 24px 8px }
.qe-icon { font-size: 28px; color: var(--line2); margin-bottom: 10px }
.qe-text { font-size: 12px; color: var(--txt3); font-family: var(--font-body) }

.quote-card { animation: fadeUp .3s ease }
.qc-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 10px }
.qc-country { font-family: var(--font-disp); font-size: 15px; font-weight: 700; color: var(--txt) }
.qc-curr { font-size: 11px; color: var(--txt3); margin-top: 2px }
.qc-code {
  display: inline-block;
  background: linear-gradient(90deg, var(--acc), #0080ff);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--r);
  letter-spacing: 2px;
}

.quote-section-label {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--txt3);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.quote-tbl { width: 100%; border-collapse: collapse; font-size: 11px; margin-bottom: 8px }
.quote-tbl th { background: var(--card); color: var(--txt3); font-family: var(--font-mono); font-size: 8px; letter-spacing: 1px; padding: 5px 7px; text-align: left; border-bottom: 1px solid var(--line) }
.quote-tbl td { padding: 6px 7px; border-bottom: 1px solid var(--line) }
.quote-tbl tr:last-child td { border-bottom: none }
.quote-tbl tr:hover td { background: var(--hover) }
.td-label { color: var(--txt3); font-family: var(--font-body) }
.td-val { color: var(--txt); font-family: var(--font-mono); font-weight: 700; text-align: right }

.quote-meta-row { display: flex; justify-content: space-between; font-size: 10px; padding: 4px 0; border-bottom: 1px solid var(--line) }
.quote-meta-row:last-of-type { border-bottom: none; margin-bottom: 6px }
.qm-label { color: var(--txt3); font-family: var(--font-body) }
.qm-val { color: var(--txt2); font-family: var(--font-mono); font-weight: 700 }

.qc-fc-note { font-size: 9px; color: var(--warn); background: rgba(249,115,22,.07); border: 1px solid rgba(249,115,22,.2); border-radius: var(--r); padding: 4px 8px; text-align: center; display: none; margin-bottom: 8px }
.qc-fc-note.show { display: block }

.qc-conv-btn {
  display: block;
  width: 100%;
  text-align: center;
  background: transparent;
  border: 1px solid var(--acc);
  color: var(--acc);
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 7px;
  border-radius: var(--r);
  cursor: pointer;
  transition: all .15s;
  letter-spacing: 1px;
  margin-top: 6px;
}

.qc-conv-btn:hover { background: var(--acc); color: var(--ink) }

/* ══ CHART ══ */
.chart-section { padding: 10px 13px }
.chart-wrap { position: relative; height: 100px }
.chart-wrap canvas { width: 100% !important; height: 100% !important }

/* ══ TICKER ══ */
.ticker-bar {
  height: var(--tick);
  background: var(--ink);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  overflow: hidden;
  flex-shrink: 0;
}

.ticker-lbl {
  padding: 0 12px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 2px;
  color: var(--ink);
  background: var(--acc);
  height: 100%;
  display: flex;
  align-items: center;
  font-weight: 700;
  flex-shrink: 0;
}

.ticker-track { flex: 1; overflow: hidden }
.ticker-tape { display: flex; white-space: nowrap; animation: ticker 90s linear infinite }

.tk-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  border-right: 1px solid var(--line);
}

.tk-code { font-family: var(--font-mono); font-size: 10px; color: var(--txt); font-weight: 700; letter-spacing: 1px }
.tk-rate { font-family: var(--font-mono); font-size: 10px; color: var(--txt2) }

/* ══ POPUP (country on click) ══ */
.cpopup {
  position: fixed;
  bottom: calc(var(--tick) + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: min(340px, calc(100vw - 24px));
  background: var(--panel);
  border: 1px solid var(--line2);
  border-radius: var(--r2);
  box-shadow: var(--sh);
  z-index: 900;
  animation: popIn .2s ease;
  overflow: hidden;
}

.cpopup::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--acc), #0080ff);
}

.cpopup.hidden { display: none }

.cp-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px 10px;
  border-bottom: 1px solid var(--line);
}

.cp-info { flex: 1; min-width: 0 }
.cp-name { font-family: var(--font-disp); font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.cp-curr { font-size: 11px; color: var(--txt3); margin-top: 1px }

.cp-code-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  background: linear-gradient(90deg, var(--acc), #0080ff);
  padding: 4px 10px;
  border-radius: var(--r);
  letter-spacing: 2px;
  flex-shrink: 0;
}

.cp-close {
  background: none;
  border: none;
  color: var(--txt3);
  font-size: 14px;
  cursor: pointer;
  padding: 3px 5px;
  line-height: 1;
  flex-shrink: 0;
  transition: color .15s;
}

.cp-close:hover { color: var(--txt) }

.cp-body { padding: 10px 14px 13px }
.cp-rates { display: flex; flex-direction: column; gap: 3px; margin-bottom: 9px }

.cp-rate-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  padding: 6px 10px;
  background: var(--card);
  border-radius: var(--r);
  border-left: 2px solid var(--line2);
}

.cp-rate-row:first-child { border-left-color: var(--acc) }
.cp-rl { color: var(--txt3); font-family: var(--font-body) }
.cp-rv { color: var(--txt); font-family: var(--font-mono); font-weight: 700 }

.cp-conv-btn {
  display: block;
  width: 100%;
  text-align: center;
  background: linear-gradient(90deg, var(--acc), #0080ff);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 9px;
  border: none;
  border-radius: var(--r);
  cursor: pointer;
  letter-spacing: 1.5px;
  transition: opacity .15s;
}

.cp-conv-btn:hover { opacity: .85 }

/* ══ MOBILE NAV ══ */
.mob-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--mobnav);
  background: var(--panel);
  border-top: 1px solid var(--line);
  z-index: 2100;
  justify-content: space-around;
  align-items: center;
}

.mn-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--txt3);
  font-family: var(--font-mono);
  font-size: 8px;
  padding: 6px 10px;
  cursor: pointer;
  transition: color .15s;
  flex: 1;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.mn-btn svg { stroke: currentColor; transition: stroke .15s }
.mn-btn.active { color: var(--acc) }

.mob-panel {
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: var(--hdr) 0 var(--mobnav) 0;
  background: var(--deep);
  z-index: 1600;
  overflow: hidden;
}

.mob-panel.hidden { display: none }

.mp-hdr {
  padding: 12px 15px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--txt2);
}

.mp-body { flex: 1; overflow-y: auto; padding: 14px 15px }
.mp-sub { font-family: var(--font-mono); font-size: 9px; font-weight: 700; letter-spacing: 2px; margin-bottom: 9px; text-transform: uppercase }
.gain-col { color: var(--gain) }
.loss-col { color: var(--loss) }

/* ══ ANIMATIONS ══ */
@keyframes pulse    { 0%,100%{ opacity:1 } 50%{ opacity:.4 } }
@keyframes blink    { 0%,100%{ opacity:1 } 50%{ opacity:.2 } }
@keyframes spinRing { to{ transform:rotate(360deg) } }
@keyframes ticker   { 0%{ transform:translateX(0) } 100%{ transform:translateX(-50%) } }
@keyframes popIn    { from{ opacity:0;transform:translateX(-50%) translateY(12px) } to{ opacity:1;transform:translateX(-50%) translateY(0) } }
@keyframes fadeUp   { from{ opacity:0;transform:translateY(8px) } to{ opacity:1;transform:translateY(0) } }
@keyframes spin     { to{ transform:rotate(360deg) } }

.spin { animation: spin .7s linear infinite }

/* ════════════════════
   RESPONSIVE
════════════════════ */

@media(min-width:1400px) {
  :root { --sbL:268px; --sbR:296px }
  .stat-val { font-size:20px }
}

@media(max-width:1280px) {
  :root { --sbL:220px; --sbR:250px }
}

@media(max-width:1100px) {
  .sidebar-right { display: none }
  :root { --sbL:220px }
}

@media(max-width:900px) {
  :root { --sbL:196px }
  .sb-indices { display: none }
  .tagline { display: none }
  .logo-top { font-size: 13px }
  .logo-bot { font-size: 9px }
}

@media(max-width:768px) {
  .sidebar-left, .sidebar-right { display: none }
  .mob-nav { display: flex }
  .ticker-bar { display: none }
  .tagline { display: none }
  .hdr-divider { display: none }
  .main-layout { height: calc(100dvh - var(--hdr) - var(--mobnav)) }
  body.forecast-active .main-layout { height: calc(100dvh - var(--hdr) - var(--fc) - var(--mobnav)) }
  .cpopup { bottom: calc(var(--mobnav) + 8px) }
  .header { padding: 0 12px; gap: 10px }
  .hdr-right { gap: 8px }
  .live-badge span:not(.live-dot):not(.live-timer) { display: none }
  .map-wrap::before { display: none }
}

@media(max-width:480px) {
  :root { --hdr: 50px; --mobnav: 56px }
  .hdr-search { display: none }
  .lang-sel { display: none }
  .logo-top { font-size: 12px; letter-spacing: 2px }
  .logo-bot { font-size: 8px }
  .mn-btn { font-size: 7px; gap: 2px }
  .mn-btn svg { width: 18px; height: 18px }
}

@media(max-width:360px) {
  :root { --hdr: 46px }
  .logo-mark { width: 28px; height: 28px }
  .logo-diamond { font-size: 13px }
}
