/* =========================================================
   STOCK ANALYTICS PRO – Designsystem
   Global AI-Powered Investment & Trading Intelligence
   ========================================================= */

:root {
  /* Dunkles Theme (Standard) */
  --bg: #080b12;
  --bg-elev: #0e1320;
  --bg-elev-2: #141b2b;
  --bg-hover: #1a2335;
  --border: #1e2941;
  --border-strong: #2b3a58;
  --text: #e8edf7;
  --text-dim: #93a1bb;
  --text-faint: #5f6d86;

  --accent: #3b82f6;
  --accent-soft: rgba(59, 130, 246, 0.14);
  --accent-strong: #60a5fa;

  --up: #16c784;
  --up-soft: rgba(22, 199, 132, 0.13);
  --down: #ea3943;
  --down-soft: rgba(234, 57, 67, 0.13);
  --warn: #f0a02a;
  --warn-soft: rgba(240, 160, 42, 0.14);
  --neutral: #7c8aa5;

  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.25);
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar-w: 244px;
  --topbar-h: 62px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", "Consolas", ui-monospace, monospace;
  --transition: 160ms cubic-bezier(0.4, 0, 0.2, 1);
}

html[data-theme="light"] {
  --bg: #f4f6fa;
  --bg-elev: #ffffff;
  --bg-elev-2: #f8fafc;
  --bg-hover: #eef2f8;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0d1526;
  --text-dim: #5a6880;
  --text-faint: #8b98ad;

  --accent-soft: rgba(59, 130, 246, 0.1);
  --up: #0d9c68;
  --down: #d92b35;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition), color var(--transition);
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent-soft); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

/* ===================== Layout ===================== */

.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-elev);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  z-index: 60;
  transition: transform var(--transition);
}

.brand {
  display: flex; align-items: center; gap: 11px;
  padding: 18px 18px 16px;
  border-bottom: 1px solid var(--border);
}
.brand-mark {
  width: 34px; height: 34px; flex-shrink: 0;
  border-radius: 9px;
  background: linear-gradient(135deg, #3b82f6, #16c784);
  display: grid; place-items: center;
  font-weight: 800; font-size: 15px; color: #fff; letter-spacing: -0.5px;
}
.brand-text strong { display: block; font-size: 13.5px; letter-spacing: 0.2px; font-weight: 700; }
.brand-text span { display: block; font-size: 10px; color: var(--text-faint); letter-spacing: 0.3px; text-transform: uppercase; }

.nav { flex: 1; overflow-y: auto; padding: 10px 10px 20px; }
.nav-group-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.9px;
  color: var(--text-faint); padding: 14px 10px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  color: var(--text-dim); font-size: 13px; font-weight: 500;
  transition: background var(--transition), color var(--transition);
  width: 100%; text-align: left;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }
.nav-item .ico { width: 16px; text-align: center; font-size: 13px; opacity: 0.9; }
.nav-item .badge {
  margin-left: auto; font-size: 10px; font-weight: 700;
  background: var(--bg-elev-2); color: var(--text-faint);
  padding: 1px 6px; border-radius: 10px;
}

.sidebar-foot { padding: 12px; border-top: 1px solid var(--border); }
.user-chip {
  display: flex; align-items: center; gap: 10px; padding: 8px;
  border-radius: var(--radius-sm); background: var(--bg-elev-2);
}
.avatar {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff;
}
.user-chip .meta { min-width: 0; }
.user-chip .meta strong { display: block; font-size: 12px; }
.user-chip .meta span { display: block; font-size: 10px; color: var(--text-faint); }

.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }

/* ===================== Topbar ===================== */

.topbar {
  height: var(--topbar-h);
  background: color-mix(in srgb, var(--bg-elev) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px;
  padding: 0 20px;
  position: sticky; top: 0; z-index: 40;
}
.icon-btn {
  width: 34px; height: 34px; border-radius: var(--radius-sm);
  display: grid; place-items: center; color: var(--text-dim);
  border: 1px solid transparent; transition: all var(--transition);
}
.icon-btn:hover { background: var(--bg-hover); color: var(--text); border-color: var(--border); }
.menu-toggle { display: none; }

.search-wrap { flex: 1; max-width: 460px; position: relative; }
.search-input {
  width: 100%; height: 38px; padding: 0 12px 0 36px;
  background: var(--bg-elev-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  outline: none; transition: all var(--transition);
}
.search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-input::placeholder { color: var(--text-faint); }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-faint); font-size: 13px; pointer-events: none; }

.search-results {
  position: absolute; top: 44px; left: 0; right: 0;
  background: var(--bg-elev); border: 1px solid var(--border-strong);
  border-radius: var(--radius); box-shadow: var(--shadow);
  max-height: 340px; overflow-y: auto; display: none; z-index: 50;
}
.search-results.open { display: block; }
.search-result {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; width: 100%; text-align: left;
  border-bottom: 1px solid var(--border);
}
.search-result:last-child { border-bottom: none; }
.search-result:hover { background: var(--bg-hover); }
.search-result .sym { font-weight: 700; font-size: 12px; font-family: var(--mono); min-width: 62px; }
.search-result .nm { flex: 1; font-size: 12.5px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-empty { padding: 14px; color: var(--text-faint); font-size: 12.5px; text-align: center; }

.topbar-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.market-status {
  display: flex; align-items: center; gap: 7px;
  font-size: 11.5px; color: var(--text-dim);
  padding: 5px 10px; border-radius: 20px;
  background: var(--bg-elev-2); border: 1px solid var(--border);
  white-space: nowrap;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--neutral); flex-shrink: 0; }
.dot.open { background: var(--up); box-shadow: 0 0 0 3px var(--up-soft); animation: pulse 2.4s infinite; }
.dot.closed { background: var(--down); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.45; } }

.bell-wrap { position: relative; }
.bell-count {
  position: absolute; top: 2px; right: 2px;
  min-width: 15px; height: 15px; padding: 0 4px;
  background: var(--down); color: #fff; font-size: 9.5px; font-weight: 700;
  border-radius: 8px; display: grid; place-items: center;
  border: 2px solid var(--bg-elev);
}
.notif-panel {
  position: absolute; top: 44px; right: 0; width: 330px;
  background: var(--bg-elev); border: 1px solid var(--border-strong);
  border-radius: var(--radius); box-shadow: var(--shadow);
  display: none; z-index: 50; overflow: hidden;
}
.notif-panel.open { display: block; }
.notif-head {
  padding: 11px 14px; border-bottom: 1px solid var(--border);
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-dim);
}
.notif-item { padding: 11px 14px; border-bottom: 1px solid var(--border); display: flex; gap: 10px; }
.notif-item:last-child { border-bottom: none; }
.notif-item .tag {
  font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  padding: 2px 6px; border-radius: 4px; height: fit-content; white-space: nowrap;
}
.tag.up { background: var(--up-soft); color: var(--up); }
.tag.down { background: var(--down-soft); color: var(--down); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.info { background: var(--accent-soft); color: var(--accent-strong); }
.notif-item .txt { font-size: 12.5px; color: var(--text-dim); }
.notif-item .txt strong { color: var(--text); display: block; font-size: 12.5px; margin-bottom: 1px; }
.notif-item .txt time { font-size: 10.5px; color: var(--text-faint); }

/* ===================== Content ===================== */

.content { padding: 22px 24px 60px; max-width: 1600px; width: 100%; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: 21px; font-weight: 700; letter-spacing: -0.3px; }
.page-head p { color: var(--text-dim); font-size: 13px; margin-top: 3px; max-width: 780px; }

.data-stamp {
  display: flex; align-items: center; gap: 7px;
  font-size: 11px; color: var(--text-faint);
  font-family: var(--mono);
}
.data-stamp .dot { width: 6px; height: 6px; }

.section { margin-bottom: 26px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 11px; }
.section-head h2 { font-size: 14px; font-weight: 700; letter-spacing: 0.1px; }
.section-head .sub { font-size: 11.5px; color: var(--text-faint); font-weight: 400; margin-left: 8px; }

.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-pad { padding: 16px; }
.card-head {
  padding: 13px 16px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.card-head h3 { font-size: 13px; font-weight: 700; }
.card-head .hint { font-size: 11px; color: var(--text-faint); }

.grid { display: grid; gap: 14px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); }

/* ===================== KPI ===================== */

.kpi { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 15px; }
.kpi .label { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.6px; font-weight: 600; }
.kpi .value { font-size: 23px; font-weight: 700; font-family: var(--mono); letter-spacing: -0.8px; margin-top: 7px; }
.kpi .foot { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 11.5px; color: var(--text-faint); }

.chg { font-family: var(--mono); font-weight: 600; font-size: 12.5px; }
.chg.up { color: var(--up); }
.chg.down { color: var(--down); }
.chg.flat { color: var(--neutral); }

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px;
  padding: 3px 8px; border-radius: 20px;
}
.pill.up { background: var(--up-soft); color: var(--up); }
.pill.down { background: var(--down-soft); color: var(--down); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.info { background: var(--accent-soft); color: var(--accent-strong); }
.pill.mute { background: var(--bg-elev-2); color: var(--text-faint); }

/* ===================== Index strip ===================== */

.index-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 10px; }
.index-card {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 11px 12px;
  transition: border-color var(--transition), transform var(--transition);
  text-align: left; width: 100%;
}
.index-card:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.index-card .nm { font-size: 12px; font-weight: 700; }
.index-card .reg { font-size: 10px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.5px; }
.index-card .val { font-family: var(--mono); font-size: 15px; font-weight: 600; margin: 7px 0 3px; }
.index-card .row { display: flex; align-items: center; justify-content: space-between; }

/* ===================== Tables ===================== */

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
thead th {
  text-align: left; padding: 9px 14px;
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.7px;
  color: var(--text-faint); border-bottom: 1px solid var(--border);
  white-space: nowrap; background: var(--bg-elev);
  position: sticky; top: 0; z-index: 5;
}
thead th.num, td.num { text-align: right; }
tbody td { padding: 10px 14px; border-bottom: 1px solid var(--border); }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background var(--transition); }
tbody tr.clickable:hover { background: var(--bg-hover); cursor: pointer; }
.sym-cell { display: flex; flex-direction: column; }
.sym-cell strong { font-family: var(--mono); font-size: 12.5px; font-weight: 700; }
.sym-cell span { font-size: 11px; color: var(--text-faint); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td.mono { font-family: var(--mono); }

/* ===================== Buttons / inputs ===================== */

.btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 14px; border-radius: var(--radius-sm);
  background: var(--bg-elev-2); border: 1px solid var(--border-strong);
  color: var(--text); font-size: 12.5px; font-weight: 600;
  transition: all var(--transition); white-space: nowrap;
}
.btn:hover { background: var(--bg-hover); border-color: var(--text-faint); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 11.5px; }
.btn.ghost { background: transparent; border-color: var(--border); }
.btn.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); }

.seg { display: inline-flex; background: var(--bg-elev-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 2px; gap: 2px; }
.seg button {
  padding: 5px 11px; border-radius: 6px; font-size: 11.5px; font-weight: 600;
  color: var(--text-dim); transition: all var(--transition); white-space: nowrap;
}
.seg button:hover { color: var(--text); }
.seg button.active { background: var(--bg-hover); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,0.2); }

.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 11px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; }
.field input, .field select {
  height: 34px; padding: 0 10px; background: var(--bg-elev-2);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); outline: none; transition: all var(--transition); width: 100%;
}
.field input:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-faint) 50%), linear-gradient(135deg, var(--text-faint) 50%, transparent 50%); background-position: calc(100% - 15px) 15px, calc(100% - 10px) 15px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 28px; }

.range-row { display: flex; align-items: center; gap: 10px; }
input[type="range"] { -webkit-appearance: none; appearance: none; height: 4px; background: var(--border-strong); border-radius: 3px; flex: 1; outline: none; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 15px; height: 15px; border-radius: 50%; background: var(--accent); cursor: pointer; border: 2px solid var(--bg-elev); }
input[type="range"]::-moz-range-thumb { width: 15px; height: 15px; border-radius: 50%; background: var(--accent); cursor: pointer; border: 2px solid var(--bg-elev); }

.check-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-dim); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }

/* ===================== Charts ===================== */

.chart-box { width: 100%; height: 300px; position: relative; }
.chart-box.tall { height: 380px; }
.chart-box svg { display: block; width: 100%; height: 100%; overflow: visible; }

.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-dim); }
.chart-legend .lg { display: flex; align-items: center; gap: 6px; }
.chart-legend .sw { width: 10px; height: 3px; border-radius: 2px; }

.tooltip {
  position: absolute; pointer-events: none; z-index: 20;
  background: var(--bg-elev-2); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 8px 10px; font-size: 11.5px;
  box-shadow: var(--shadow); font-family: var(--mono); white-space: nowrap;
  opacity: 0; transition: opacity 120ms;
}
.tooltip.show { opacity: 1; }
.tooltip .row { display: flex; justify-content: space-between; gap: 14px; }
.tooltip .row span:first-child { color: var(--text-faint); }

/* ===================== Bars / meters ===================== */

.meter { height: 6px; background: var(--bg-elev-2); border-radius: 4px; overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 4px; transition: width 400ms cubic-bezier(0.4,0,0.2,1); }
.meter.up > i { background: var(--up); }
.meter.down > i { background: var(--down); }
.meter.warn > i { background: var(--warn); }
.meter.accent > i { background: var(--accent); }

.hbar { display: grid; grid-template-columns: 132px 1fr 52px; align-items: center; gap: 10px; font-size: 12px; }
.hbar .nm { color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .vl { text-align: right; font-family: var(--mono); font-size: 11.5px; color: var(--text-dim); }

.score-ring { display: flex; align-items: center; gap: 18px; }
.ring { position: relative; width: 118px; height: 118px; flex-shrink: 0; }
.ring svg { transform: rotate(-90deg); }
.ring .center {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
}
.ring .center strong { font-size: 26px; font-weight: 700; font-family: var(--mono); letter-spacing: -1px; display: block; }
.ring .center span { font-size: 10px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.7px; }

.score-detail { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 9px; }
.score-line { display: grid; grid-template-columns: 140px 1fr 46px; align-items: center; gap: 10px; font-size: 11.5px; }
.score-line .nm { color: var(--text-dim); }
.score-line .w { font-size: 10px; color: var(--text-faint); }
.score-line .vl { text-align: right; font-family: var(--mono); font-weight: 600; }

/* ===================== Signals / scenario ===================== */

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tab {
  padding: 9px 15px; font-size: 12.5px; font-weight: 600; color: var(--text-dim);
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
  transition: all var(--transition); border-radius: 6px 6px 0 0;
}
.tab:hover { color: var(--text); background: var(--bg-hover); }
.tab.active { color: var(--accent-strong); border-bottom-color: var(--accent); }

.cards-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.scen { border: 1px solid var(--border); border-radius: var(--radius); padding: 15px; background: var(--bg-elev); }
.scen .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.scen .top h4 { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.scen .price { font-family: var(--mono); font-size: 24px; font-weight: 700; letter-spacing: -0.8px; }
.scen .vs { font-size: 11.5px; color: var(--text-faint); margin-top: 2px; }
.scen ul { list-style: none; margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.scen li { font-size: 11.5px; color: var(--text-dim); display: flex; justify-content: space-between; gap: 12px; }
.scen li span:last-child { font-family: var(--mono); color: var(--text); }

.notice {
  display: flex; gap: 10px; padding: 11px 13px;
  border-radius: var(--radius-sm); font-size: 12px; line-height: 1.5;
  border: 1px solid var(--border);
}
.notice.info { background: var(--accent-soft); border-color: rgba(59,130,246,0.3); color: var(--text-dim); }
.notice.warn { background: var(--warn-soft); border-color: rgba(240,160,42,0.3); color: var(--text-dim); }
.notice .ic { flex-shrink: 0; }

.kv { display: flex; flex-direction: column; gap: 1px; }
.kv-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 12.5px; }
.kv-row:last-child { border-bottom: none; }
.kv-row .k { color: var(--text-dim); }
.kv-row .v { font-family: var(--mono); font-weight: 600; }

.news-item { display: flex; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--border); }
.news-item:last-child { border-bottom: none; }
.news-item .body { flex: 1; min-width: 0; }
.news-item h4 { font-size: 13px; font-weight: 600; margin-bottom: 4px; line-height: 1.4; }
.news-item p { font-size: 12px; color: var(--text-dim); line-height: 1.55; }
.news-item .meta { display: flex; align-items: center; gap: 9px; margin-top: 8px; flex-wrap: wrap; font-size: 10.5px; color: var(--text-faint); }
.news-item .impact { padding-left: 4px; border-left: 3px solid transparent; }
.news-item .impact.pos { border-left-color: var(--up); }
.news-item .impact.neg { border-left-color: var(--down); }
.news-item .impact.neu { border-left-color: var(--neutral); }

.cal-row { display: grid; grid-template-columns: 62px 1fr 78px 92px; gap: 12px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--border); font-size: 12px; }
.cal-row:last-child { border-bottom: none; }
.cal-row .tm { font-family: var(--mono); color: var(--text-dim); font-size: 11.5px; }
.cal-row .imp { justify-self: end; }

.empty { padding: 34px 18px; text-align: center; color: var(--text-faint); font-size: 12.5px; }

/* ===================== Sidebar overlay (mobil) ===================== */

.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  z-index: 55; display: none; backdrop-filter: blur(2px);
}
.overlay.show { display: block; }

.footer-note {
  margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--border);
  font-size: 11px; color: var(--text-faint); line-height: 1.7;
}
.footer-note strong { color: var(--text-dim); }

/* ===================== Responsive ===================== */

@media (max-width: 1250px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .g-main { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 980px) {
  .g-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .cards-3 { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 820px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .menu-toggle { display: grid; }
  .content { padding: 16px 14px 50px; }
  .g-2, .g-3, .g-4 { grid-template-columns: minmax(0,1fr); }
  .market-status .txt-full { display: none; }
  .page-head h1 { font-size: 18px; }
  .cal-row { grid-template-columns: 54px 1fr 62px; }
  .cal-row .imp { display: none; }
  .hbar { grid-template-columns: 96px 1fr 48px; }
  .score-ring { flex-direction: column; align-items: stretch; }
  .ring { align-self: center; }
}
@media print {
  .sidebar, .topbar, .overlay { display: none !important; }
  .main { margin-left: 0; }
  body { background: #fff; color: #000; }
}
