:root {
    --fx-bg: #0d1117;
    --fx-panel: #151b23;
    --fx-panel-2: #1b222c;
    --fx-border: #262f3b;
    --fx-muted: #8b96a5;
    --fx-up: #2ebd85;
    --fx-down: #f0616d;
    --fx-accent: #4c8dff;
    --fx-warn: #f2b84b;
}

body {
    background: var(--fx-bg);
    font-size: .925rem;
}

.num, .table td.num, .table th.num {
    font-variant-numeric: tabular-nums;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    text-align: right;
    white-space: nowrap;
}

/* ---------- Navigacija ---------- */
.fx-nav {
    background: rgba(13, 17, 23, .92);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--fx-border);
}
.brand-mark {
    display: inline-grid; place-items: center;
    width: 30px; height: 30px; border-radius: 8px;
    background: linear-gradient(135deg, var(--fx-accent), #7c5cff);
    color: #fff;
}
.fx-nav .nav-link.active { color: #fff; }

/* ---------- Paneli ---------- */
.panel {
    background: var(--fx-panel);
    border: 1px solid var(--fx-border);
    border-radius: 12px;
}
.panel-header {
    display: flex; align-items: center; justify-content: space-between; gap: .75rem;
    padding: .85rem 1rem;
    border-bottom: 1px solid var(--fx-border);
}
.panel-header h2, .panel-header h3 {
    font-size: .95rem; font-weight: 600; margin: 0;
}
.panel-body { padding: 1rem; }

.kpi { padding: 1rem 1.1rem; }
.kpi .label { color: var(--fx-muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.kpi .value { font-size: 1.55rem; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; }
.kpi .sub { color: var(--fx-muted); font-size: .8rem; }

/* ---------- Tabele ---------- */
.table-fx {
    --bs-table-bg: transparent;
    --bs-table-hover-bg: var(--fx-panel-2);
    margin: 0;
}
.table-fx th {
    color: var(--fx-muted); font-weight: 500; font-size: .75rem;
    text-transform: uppercase; letter-spacing: .04em;
    border-bottom-color: var(--fx-border);
    white-space: nowrap;
}
.table-fx td { border-bottom-color: var(--fx-border); vertical-align: middle; }
.table-fx tr:last-child td { border-bottom: 0; }
.table-fx a.pair-link { color: inherit; text-decoration: none; font-weight: 600; }
.table-fx a.pair-link:hover { color: var(--fx-accent); }

/* ---------- Trend / ocena ---------- */
.trend { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; font-size: .85rem; }
.trend.up { background: rgba(46, 189, 133, .15); color: var(--fx-up); }
.trend.down { background: rgba(240, 97, 109, .15); color: var(--fx-down); }
.trend.flat { background: rgba(139, 150, 165, .12); color: var(--fx-muted); }

.score {
    display: inline-flex; align-items: center; gap: .4rem; min-width: 70px;
}
.score .bar { flex: 1; height: 6px; border-radius: 3px; background: var(--fx-panel-2); overflow: hidden; }
.score .bar > span { display: block; height: 100%; border-radius: 3px; }
.score-high .bar > span { background: var(--fx-up); }
.score-mid .bar > span { background: var(--fx-accent); }
.score-low .bar > span { background: var(--fx-warn); }
.score-none .bar > span { background: #3a4452; }
.score .n { font-variant-numeric: tabular-nums; font-size: .8rem; width: 22px; text-align: right; }

.text-success { color: var(--fx-up) !important; }
.text-danger { color: var(--fx-down) !important; }

/* ---------- Kartice priložnosti ---------- */
.opp-card {
    background: var(--fx-panel);
    border: 1px solid var(--fx-border);
    border-radius: 12px;
    padding: 1rem;
    height: 100%;
    position: relative;
    transition: border-color .15s;
}
.opp-card:hover { border-color: #3a4a60; }
.opp-card.has-signal { border-color: rgba(76, 141, 255, .55); box-shadow: 0 0 0 1px rgba(76, 141, 255, .25) inset; }
.opp-card .sym { font-size: 1.1rem; font-weight: 700; letter-spacing: .02em; }
.opp-card .price { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.opp-card .levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-top: .75rem; }
.opp-card .levels div { background: var(--fx-panel-2); border-radius: 8px; padding: .4rem .5rem; }
.opp-card .levels .k { font-size: .7rem; color: var(--fx-muted); text-transform: uppercase; }
.opp-card .levels .v { font-variant-numeric: tabular-nums; font-family: ui-monospace, Consolas, monospace; font-size: .85rem; }
.opp-card .note { color: var(--fx-muted); font-size: .8rem; margin-top: .6rem; }
.opp-card a.stretched-link { z-index: 1; }

/* ---------- Novice / koledar ---------- */
.list-fx { list-style: none; margin: 0; padding: 0; }
.list-fx li { padding: .6rem 1rem; border-bottom: 1px solid var(--fx-border); }
.list-fx li:last-child { border-bottom: 0; }
.list-fx a { color: inherit; text-decoration: none; }
.list-fx a:hover { color: var(--fx-accent); }
.ccy-tag { font-size: .68rem; padding: .1rem .35rem; border-radius: 4px; background: var(--fx-panel-2); color: var(--fx-muted); border: 1px solid var(--fx-border); }

.impact { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.impact-high { background: var(--fx-down); }
.impact-med { background: var(--fx-warn); }
.impact-low { background: #59636f; }

.scroll-list { max-height: 460px; overflow-y: auto; }

#chart { height: 480px; }

pre.run-log {
    background: var(--fx-bg); border: 1px solid var(--fx-border); border-radius: 8px;
    padding: .75rem; font-size: .78rem; max-height: 360px; overflow: auto; white-space: pre-wrap;
}

/* ---------- Pametno osveževanje ---------- */
@keyframes liveFlash { from { background: rgba(76, 141, 255, .35); } to { background: transparent; } }
.live-flash { animation: liveFlash 1.2s ease-out; border-radius: 4px; }
#live-ind { white-space: nowrap; }
