/* ─── Match Results Browser v2 — 2026-05-12 Phase 4 ──────────────── */

/* Match card — distinct from ticket cards: row-heavy, score-prominent. */
.mr-card {
  display: flex; flex-direction: column;
  gap: 8px;
  padding: 10px 14px;
  background: var(--ta-pane);
  border: 1px solid var(--ta-border);
  border-radius: var(--ta-radius, 8px);
  transition: border-color .12s, transform .08s;
}
.mr-card:hover { border-color: var(--ta-border-hi); transform: translateY(-1px); }

/* State accent bar via border-left */
.mr-card.mr-finished { border-left: 3px solid var(--ta-text-dim, #555); }
.mr-card.mr-live     { border-left: 3px solid var(--ta-live, #ff5870); box-shadow: 0 0 0 1px rgba(255,88,112,.18); }
.mr-card.mr-pre      { border-left: 3px solid var(--ta-pre, #5a8cff); }

.mr-card-head {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--ta-text-2);
}
.mr-state-pill {
  font-family: var(--ta-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  padding: 2px 8px;
  border-radius: var(--ta-radius-pill, 10px);
  background: var(--ta-card-elev);
  border: 1px solid var(--ta-border);
}
.mr-state-pill.mr-finished { color: var(--ta-text-3, #aaa); }
.mr-state-pill.mr-live     {
  color: var(--ta-live, #ff5870);
  border-color: var(--ta-live-border, rgba(255,88,112,.4));
  background: rgba(255,88,112,.08);
  animation: mr-live-pulse 1.8s ease-in-out infinite;
}
.mr-state-pill.mr-pre {
  color: var(--ta-pre, #5a8cff);
  border-color: var(--ta-pre-border, rgba(90,140,255,.4));
  background: rgba(90,140,255,.06);
}
@keyframes mr-live-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,88,112,.0); }
  50%      { box-shadow: 0 0 0 4px rgba(255,88,112,.15); }
}

.mr-card-time { font-family: var(--ta-mono); font-weight: 700; color: var(--ta-text); }
.mr-card-id {
  font-family: var(--ta-mono);
  font-size: 10px;
  color: var(--ta-text-dim);
  padding: 1px 6px;
  background: var(--ta-card-elev);
  border-radius: 4px;
}
.mr-card-sport {
  font-size: 11px;
  font-weight: 700;
  color: var(--ta-text-3);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.mr-card-tournament {
  font-size: 11px;
  color: var(--ta-text-2);
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mr-card-spacer { flex: 1; }
.mr-ended-pill, .mr-live-pill {
  font-family: var(--ta-mono);
  font-size: 10px;
  padding: 2px 7px;
  border-radius: var(--ta-radius-pill, 10px);
  background: var(--ta-card-elev);
  border: 1px solid var(--ta-border);
  color: var(--ta-text-3);
}
.mr-live-pill { color: var(--ta-live, #ff5870); border-color: var(--ta-live-border, rgba(255,88,112,.4)); }

.mr-card-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  padding: 4px 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ta-text);
}
.mr-team {
  text-align: center;
  word-break: break-word;
  line-height: 1.25;
}
.mr-team-home { text-align: right; }
.mr-team-away { text-align: left; }
.mr-vs {
  font-size: 11px;
  font-weight: 600;
  color: var(--ta-text-dim);
  font-family: var(--ta-mono);
}
.mr-score {
  font-family: var(--ta-mono);
  font-size: 22px;
  font-weight: 800;
  color: var(--ta-text);
  padding: 2px 14px;
  background: var(--ta-card-elev);
  border-radius: 8px;
  border: 1px solid var(--ta-border-hi);
  min-width: 72px;
  text-align: center;
}
.mr-card.mr-live .mr-score { color: var(--ta-live, #ff5870); }

.mr-card-foot {
  display: flex; justify-content: flex-end; gap: 6px;
  padding-top: 4px;
  border-top: 1px solid var(--ta-line, var(--ta-border));
}

/* Grid wrap defaults (no internal scroll in fullscreen) */
.mr-grid-wrap {
  display: flex; flex-direction: column; gap: 4px;
  padding: 8px 14px 24px;
}
.mr-card-list { display: flex; flex-direction: column; gap: 6px; }
.mr-load-more {
  text-align: center; padding: 10px;
  font-size: 11px; color: var(--ta-text-3);
  font-family: var(--ta-mono);
}

/* Filter form mods specific to this page */
.mr-filter-form { padding: 8px 14px; }
.mr-filter-form .at-search-row { display: flex; align-items: center; gap: 8px; padding: 0 0 6px; }
.mr-filter-form .at-search-row .ta-input { flex: 1; }

/* ─── Match Detail Drawer v2 — POWERFUL CSS ──────────────────────── */
.md-root { position: fixed; inset: 0; z-index: 1000; }
.md-root.hidden { display: none; }
.md-backdrop {
  position: absolute; inset: 0;
  background: rgba(8, 12, 18, 0.85);
  backdrop-filter: blur(6px);
}
.md-panel {
  position: absolute;
  top: 16px; right: 16px; bottom: 16px; left: 16px;
  background: #0c1118;
  border: 1px solid #1d2632;
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.75);
  display: flex; flex-direction: column;
  overflow: hidden;
  font-family: "SF Mono", ui-monospace, monospace;
  color: #cad5e2;
  font-size: 12px;
}
body.md-open { overflow: hidden; }

/* ─── Header ──────────────────────────────────────────────────── */
.md-head {
  display: flex; align-items: center; gap: 18px;
  padding: 14px 18px;
  border-bottom: 1px solid #1d2632;
  background: linear-gradient(180deg, #131a23 0%, #0c1118 100%);
  position: relative;
}
.md-close {
  background: transparent; color: #6c7d92; border: 1px solid #283549;
  border-radius: 4px; width: 28px; height: 28px;
  cursor: pointer; font-size: 14px;
}
.md-close:hover { color: #fff; border-color: #4a5d7a; }
.md-head-left { display: flex; flex-direction: column; gap: 4px; }
.md-state-badge {
  font-weight: 700; font-size: 10px; letter-spacing: 0.05em;
  padding: 2px 7px; border-radius: 3px;
  display: inline-block;
}
.md-state-fin  { background: #2a4d33; color: #6efbb1; }
.md-state-live { background: #4d2a2a; color: #ff8a8a; animation: live-pulse 1.5s ease-in-out infinite; }
.md-state-pre  { background: #2d3548; color: #8fa2c7; }
@keyframes live-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.6; } }
.md-id { font-size: 10px; color: #6c7d92; font-family: monospace; }

.md-head-mid { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.md-teams { font-size: 16px; font-weight: 600; color: #e6edf6; letter-spacing: -0.01em; }
.md-sport-line { font-size: 11px; color: #8fa2c7; }
.md-tournament, .md-country { color: #6c7d92; }

.md-head-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.md-score {
  font-size: 28px; font-weight: 800; color: #ffe35a;
  font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
  text-shadow: 0 0 16px rgba(255, 227, 90, 0.3);
}
.md-ended { font-size: 10px; color: #6c7d92; }
.md-rec-badges { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.md-badge {
  font-size: 9px; padding: 2px 5px; border-radius: 2px;
  font-weight: 600; letter-spacing: 0.04em;
}
.md-badge.ok { background: #2a4d3d; color: #5ee0a8; }
.md-badge.dim { background: #1c232e; color: #5d6d83; }

/* ─── Score chart ─────────────────────────────────────────────── */
.md-chart-wrap {
  background: #131a23;
  border-bottom: 1px solid #1d2632;
  padding: 8px 18px 4px;
}
.md-chart-legend {
  display: flex; gap: 14px; align-items: center;
  font-size: 10px; color: #8fa2c7;
  padding-bottom: 4px;
}
.md-legend-item { display: flex; align-items: center; gap: 4px; }
.md-legend-swatch { display: inline-block; width: 14px; height: 6px; border-radius: 1px; }
.md-line-home-swatch { background: #6efbb1; }
.md-line-away-swatch { background: #ffb866; }
.md-band-live-swatch { background: rgba(110, 251, 177, 0.06); border: 1px solid rgba(110,251,177,0.2); }
.md-band-ht-swatch { background: rgba(255, 227, 90, 0.08); border: 1px solid rgba(255,227,90,0.2); }
.md-legend-hint { color: #4a566a; margin-left: auto; font-style: italic; }

.md-chart-svg { width: 100%; height: 90px; display: block; }
.md-band-live { fill: rgba(110, 251, 177, 0.04); }
.md-band-ht   { fill: rgba(255, 227, 90, 0.06); }
.md-band-other { fill: rgba(140, 170, 200, 0.02); }
.md-line { fill: none; stroke-width: 2; }
.md-line-home { stroke: #6efbb1; stroke-linejoin: round; }
.md-line-away { stroke: #ffb866; stroke-linejoin: round; }
.md-grid-line { stroke: #1d2632; stroke-width: 1; stroke-dasharray: 2 3; }
.md-grid-label { fill: #4a566a; font-size: 9px; font-family: monospace; text-anchor: end; }
.md-band-label { fill: #6c7d92; font-size: 9px; text-anchor: middle; opacity: 0.6; }
.md-time-tick { fill: #4a566a; font-size: 9px; text-anchor: middle; }
.md-goal-dot { cursor: pointer; }
.md-goal-dot.home { fill: #6efbb1; stroke: #0c1118; stroke-width: 1.5; }
.md-goal-dot.away { fill: #ffb866; stroke: #0c1118; stroke-width: 1.5; }
.md-goal-dot:hover { r: 7; }
.md-cursor-line { stroke: #ff5a5a; stroke-width: 1.5; stroke-dasharray: 3 2; opacity: 0.8; }

/* ─── Insights bar ────────────────────────────────────────────── */
.md-insights {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 18px;
  background: #0e1521;
  border-bottom: 1px solid #1d2632;
  overflow-x: auto;
}
.md-insights-title {
  font-size: 10px; color: #6c7d92; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding-right: 6px; border-right: 1px solid #1d2632;
  margin-right: 4px; flex-shrink: 0;
}
.md-insight {
  display: flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 4px;
  font-size: 11px; cursor: pointer;
  border: 1px solid transparent;
  background: #161e2a;
  color: #cad5e2;
  white-space: nowrap;
  font-family: inherit;
}
.md-insight:hover { border-color: #4a5d7a; }
.md-insight-info { background: #1c2a3d; color: #6ec8ff; border-color: rgba(110,200,255,0.2); }
.md-insight-warn { background: #2d2818; color: #ffb866; border-color: rgba(255,184,102,0.3); }
.md-insight-danger { background: #2d1818; color: #ff8a8a; border-color: rgba(255,138,138,0.4); animation: insight-pulse 2s ease-in-out infinite; }
@keyframes insight-pulse { 0%,100% { box-shadow: 0 0 0 rgba(255,138,138,0.4); } 50% { box-shadow: 0 0 12px rgba(255,138,138,0.4); } }
.md-insight-icon { font-size: 13px; }
.md-insight-text { font-size: 11px; }

/* ─── Tabs ────────────────────────────────────────────────────── */
.md-tabs {
  display: flex; gap: 0; border-bottom: 1px solid #1d2632;
  background: #0a0e14;
  overflow-x: auto;
}
.md-tab {
  background: transparent; border: 0; cursor: pointer;
  color: #6c7d92; padding: 10px 18px;
  display: flex; align-items: center; gap: 6px;
  border-bottom: 2px solid transparent;
  font-family: inherit; font-size: 12px;
  white-space: nowrap;
}
.md-tab:hover { color: #b8c5d6; background: #131923; }
.md-tab.active {
  color: #ffe35a; border-bottom-color: #ffe35a;
  background: #131923;
}
.md-tab-icon { font-size: 14px; }
.md-tab-count {
  background: #283549; color: #cad5e2;
  padding: 1px 6px; border-radius: 8px;
  font-size: 10px; font-weight: 600;
}

/* ─── Body / cards ────────────────────────────────────────────── */
.md-body { flex: 1; overflow: auto; }
.md-tab-body { padding: 16px; }

.md-loading { padding: 40px; text-align: center; color: #6c7d92; }
.md-error { padding: 20px; color: #ff8a8a; background: #2a1818; margin: 12px; border-radius: 4px; }
.md-empty { padding: 40px; text-align: center; color: #6c7d92; font-style: italic; }

.md-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }
.md-card {
  background: #131923; border: 1px solid #1d2632;
  border-radius: 6px; padding: 12px 14px;
}
.md-wide-card { grid-column: 1 / -1; }
.md-card-title {
  font-size: 11px; color: #ffe35a; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  margin-bottom: 10px;
  padding-bottom: 6px; border-bottom: 1px solid #1d2632;
}
.md-kv { width: 100%; border-collapse: collapse; }
.md-kv th, .md-kv td { text-align: left; padding: 4px 6px; vertical-align: top; }
.md-kv th { color: #6c7d92; font-weight: 400; width: 40%; font-size: 11px; }
.md-kv td { color: #cad5e2; font-size: 11px; }
.md-dim { color: #4a566a; }

.md-pills { display: flex; gap: 4px; flex-wrap: wrap; }
.md-pill {
  background: #283549; color: #cad5e2;
  padding: 1px 6px; border-radius: 3px;
  font-size: 10px;
}
.md-pill-pending  { background: #2d3548; color: #8fa2c7; }
.md-pill-won      { background: #2a4d33; color: #6efbb1; }
.md-pill-lost     { background: #4d2a2a; color: #ff8a8a; }
.md-pill-void     { background: #3d3a2a; color: #d4c068; }
.md-pill-green    { background: #2a4d33; color: #6efbb1; }
.md-pill-amber    { background: #4d3d2a; color: #ffb866; }
.md-pill-red      { background: #4d2a2a; color: #ff8a8a; }
.md-pill-stale    { background: #3d2a4d; color: #c897ff; }

/* ─── Key moments list ────────────────────────────────────────── */
.md-moments-list {
  display: flex; gap: 6px; flex-wrap: wrap;
  max-height: 180px; overflow: auto;
}
.md-moment {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 4px;
  background: #1c232e; border: 1px solid #283549;
  cursor: pointer; font-family: inherit; font-size: 11px;
  color: #cad5e2;
}
.md-moment:hover { border-color: #ffe35a; }
.md-moment-time { color: #6c7d92; font-size: 10px; }
.md-moment-icon { font-size: 13px; }
.md-moment-goal_home { background: rgba(110, 251, 177, 0.10); border-color: rgba(110,251,177,0.4); color: #6efbb1; }
.md-moment-goal_away { background: rgba(255, 184, 102, 0.10); border-color: rgba(255,184,102,0.4); color: #ffb866; }
.md-moment-yellow { background: rgba(255, 227, 90, 0.06); border-color: rgba(255,227,90,0.3); color: #ffe35a; }
.md-moment-red { background: rgba(255, 90, 90, 0.10); border-color: rgba(255,90,90,0.5); color: #ff5a5a; }
.md-moment-period { background: rgba(140, 170, 200, 0.06); border-color: rgba(140,170,200,0.3); color: #8fa2c7; }

/* ─── Health strip ────────────────────────────────────────────── */
.md-health-svg { width: 100%; height: 28px; }
.md-health-seg { cursor: pointer; }
.md-health-seg:hover { opacity: 0.8; }
.md-health-ok    { fill: #2a4d33; }
.md-health-loss  { fill: #4d2a2a; }
.md-health-amber { fill: #4d3d2a; }
.md-health-red   { fill: #4d2a2a; }
.md-health-stale { fill: #3d2a4d; }
.md-health-dark  { fill: #1c232e; }

/* ─── Tables ──────────────────────────────────────────────────── */
.md-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.md-table thead th {
  background: #0a0e14; color: #6c7d92;
  text-align: left; padding: 6px 8px;
  border-bottom: 1px solid #1d2632; font-weight: 600;
  position: sticky; top: 0;
}
.md-table tbody td { padding: 5px 8px; border-bottom: 1px solid #131923; }
.md-table tbody tr:hover { background: #131923; }
.md-table tbody tr { transition: background 0.1s; }
.md-row-btn {
  background: #283549; color: #cad5e2; border: 0;
  border-radius: 3px; padding: 2px 8px; cursor: pointer;
  font-family: inherit; font-size: 11px; margin-right: 3px;
}
.md-row-btn:hover { background: #ffe35a; color: #0a0e14; }

.md-tickets-table .md-ticket-row { cursor: default; }
.md-signals-table .md-sig-row { cursor: pointer; }
.md-signals-table .md-sig-state_change { color: #8fa2c7; }
.md-signals-table .md-sig-score_change { background: rgba(110, 251, 177, 0.05); }
.md-signals-table .md-sig-vendor_goal { background: rgba(110, 251, 177, 0.15); font-weight: 600; }
.md-signals-table .md-sig-vendor_red { background: rgba(255, 138, 138, 0.15); }
.md-signals-table .md-sig-vendor_yellow { background: rgba(255, 184, 102, 0.10); }
.md-signals-table .md-sig-signal_loss { background: rgba(200, 151, 255, 0.15); }

.md-code-inline {
  background: #0a0e14; color: #8fa2c7;
  padding: 1px 4px; border-radius: 2px;
  font-size: 10px; max-width: 380px;
  display: inline-block; overflow: hidden; text-overflow: ellipsis;
}

/* ─── Toolbar ─────────────────────────────────────────────────── */
.md-toolbar {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 12px;
}
.md-toolbar-info { color: #6c7d92; font-size: 11px; flex: 1; }
.md-input {
  background: #0a0e14; border: 1px solid #283549;
  color: #cad5e2; padding: 5px 8px;
  border-radius: 3px; font-family: inherit; font-size: 11px;
  width: 320px;
}
.md-input:focus { outline: none; border-color: #ffe35a; }

.md-tl-row .md-tl-score { font-weight: 700; color: #ffe35a; }

/* ─── Replay tab ──────────────────────────────────────────────── */
.md-tab-replay {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: auto auto auto;
  gap: 14px;
}
.md-replay-scoreboard {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: space-around;
  padding: 18px;
  background: linear-gradient(180deg, #1a2330 0%, #131923 100%);
  border: 1px solid #283549; border-radius: 8px;
  font-family: "SF Mono", monospace;
}
.md-rb-time { font-size: 14px; color: #6c7d92; }
.md-rb-period { font-size: 16px; color: #ffe35a; font-weight: 700; }
.md-rb-score { font-size: 36px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.md-rb-state { font-size: 12px; color: #8fa2c7; }
.md-rb-tm { font-size: 12px; color: #6c7d92; }

.md-replay-stats {
  background: #131923; border: 1px solid #1d2632; border-radius: 6px;
  padding: 12px;
}
.md-rs-row { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px dotted #1d2632; }
.md-rs-row:last-child { border-bottom: 0; }
.md-rs-k { color: #6c7d92; font-size: 11px; }
.md-rs-v { color: #cad5e2; font-size: 11px; font-weight: 600; }

.md-replay-scrubber {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: #0a0e14; border: 1px solid #1d2632; border-radius: 6px;
}
.md-rb-btn {
  background: #283549; color: #cad5e2; border: 0;
  border-radius: 3px; width: 32px; height: 28px; cursor: pointer;
  font-size: 12px;
}
.md-rb-btn:hover { background: #3a4860; color: #fff; }
.md-rb-play { background: #ffe35a; color: #0a0e14; }
.md-rb-play:hover { background: #fff170; }
.md-rb-track-wrap { flex: 1; position: relative; height: 28px; }
.md-rb-range { width: 100%; position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; }
.md-rb-markers { position: absolute; top: -2px; left: 0; right: 0; height: 28px; pointer-events: none; }
.md-marker {
  position: absolute; top: -8px; transform: translateX(-50%);
  width: 16px; height: 16px;
  background: #ffe35a; color: #0a0e14;
  border: 1px solid #0a0e14; border-radius: 50%;
  font-size: 9px; font-weight: 700;
  cursor: pointer; pointer-events: auto;
  display: flex; align-items: center; justify-content: center;
  z-index: 3;
}
.md-marker:hover { transform: translateX(-50%) scale(1.4); z-index: 4; }
.md-marker-goal_home { background: #6efbb1; }
.md-marker-goal_away { background: #ffb866; }
.md-marker-yellow { background: #ffe35a; }
.md-marker-red { background: #ff5a5a; color: #fff; }
.md-marker-period { background: #8fa2c7; color: #fff; }
.md-marker-corner_home, .md-marker-corner_away { background: #6c7d92; color: #cad5e2; opacity: 0.6; }
.md-rb-pos { color: #6c7d92; font-size: 11px; min-width: 180px; text-align: right; font-variant-numeric: tabular-nums; }

.md-replay-stats-live {
  grid-column: 1 / -1;
  background: #131923; border: 1px solid #1d2632; border-radius: 6px;
  padding: 12px;
}
.md-rsl-title {
  font-size: 11px; color: #ffe35a; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  margin-bottom: 10px;
}
.md-stats-table th { color: #6c7d92; width: 50%; padding: 3px 6px; font-size: 11px; }
.md-stats-table td { color: #cad5e2; padding: 3px 6px; font-size: 11px; }
/* ─── Rezultatet smart cards CSS ──────────────────────────────── */
.mr-health-pill {
  font-size: 9px; font-weight: 700; letter-spacing: 0.04em;
  padding: 2px 6px; border-radius: 3px;
}
.mr-health-red    { background: #4d2a2a; color: #ff8a8a; animation: live-pulse 1.5s ease-in-out infinite; }
.mr-health-amber  { background: #4d3d2a; color: #ffb866; }
.mr-health-stale  { background: #3d2a4d; color: #c897ff; }
.mr-health-dark   { background: #2d3548; color: #8fa2c7; }
.mr-health-green  { background: #2a4d33; color: #6efbb1; }
@keyframes live-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.55; } }

.mr-ticket-pill {
  background: #1c2a3d; color: #6ec8ff; border: 1px solid rgba(110,200,255,0.3);
  font-size: 10px; font-weight: 700; letter-spacing: 0.04em;
  padding: 2px 7px; border-radius: 3px;
  cursor: pointer; font-family: inherit;
}
.mr-ticket-pill:hover { background: #6ec8ff; color: #0a0e14; }
.mr-ticket-pill.has-pending {
  background: #3d2a18; color: #ffb866;
  border-color: rgba(255,184,102,0.5);
  animation: live-pulse 2s ease-in-out infinite;
}

.mr-stake-pill {
  background: rgba(255, 227, 90, 0.10); color: #ffe35a;
  border: 1px solid rgba(255, 227, 90, 0.3);
  font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 3px;
}
.mr-stake-pill.big {
  background: rgba(255, 138, 138, 0.15); color: #ff8a8a;
  border-color: rgba(255,138,138,0.4);
}

.mr-override-pill {
  background: rgba(110, 200, 255, 0.10); color: #6ec8ff;
  font-size: 9px; font-weight: 700; letter-spacing: 0.04em;
  padding: 2px 6px; border-radius: 3px;
}

.mr-ungraded-pill {
  background: #4d2a2a; color: #ff8a8a;
  font-size: 9px; font-weight: 700; letter-spacing: 0.04em;
  padding: 2px 6px; border-radius: 3px;
  animation: live-pulse 2s ease-in-out infinite;
}
/* ─── Shared "Rezultatet e Ndeshjes" table CSS ──────────────────── */
.mres-wrap {
  background: #131923; border: 1px solid #1d2632;
  border-radius: 6px; padding: 12px 14px;
  margin-bottom: 12px;
  font-family: "SF Mono", ui-monospace, monospace;
}
.mres-head {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid #1d2632;
}
.mres-title {
  font-size: 12px; color: #ffe35a; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  flex: 1;
}
.mres-source {
  font-size: 9px; padding: 2px 6px; border-radius: 3px;
  font-weight: 700; letter-spacing: 0.05em;
}
.mres-source-match_results { background: #2a4d33; color: #6efbb1; }
.mres-source-admin_override { background: #4d3d2a; color: #ffb866; }
.mres-settled { font-size: 10px; color: #6c7d92; }
.mres-empty { padding: 16px; text-align: center; color: #6c7d92; font-style: italic; font-size: 11px; }

.mres-primary-row {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  margin-bottom: 12px;
}
.mres-primary-cell {
  background: #0a0e14; border: 1px solid #283549;
  border-radius: 6px; padding: 10px 12px;
  text-align: center;
}
.mres-primary-label {
  font-size: 9px; color: #6c7d92;
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.mres-primary-value {
  font-size: 22px; font-weight: 800; color: #ffe35a;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.mres-table {
  width: 100%; border-collapse: collapse;
  font-size: 11px;
}
.mres-table th, .mres-table td {
  padding: 5px 8px;
  border-bottom: 1px dotted #1d2632;
}
.mres-table th {
  text-align: left; color: #8fa2c7; font-weight: 400; width: 60%;
}
.mres-table td {
  text-align: right; color: #cad5e2; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.mres-row-sec td { color: #ffe35a; }

/* When embedded inline in ticket drawer matches tab (compact) */
.td-mres-inline { background: #0a0e14; border-radius: 4px; padding: 8px 10px; margin: 6px 0; }
.td-mres-inline .mres-head { padding-bottom: 5px; margin-bottom: 6px; }
.td-mres-inline .mres-title { font-size: 10px; }
.td-mres-inline .mres-primary-cell { padding: 6px 8px; }
.td-mres-inline .mres-primary-value { font-size: 16px; }
.td-mres-inline .mres-table th, .td-mres-inline .mres-table td { padding: 3px 6px; font-size: 10px; }
/* ─── Story Mode CSS ─────────────────────────────────────────── */
.sm-wrap { padding: 12px 16px; }

.sm-toolbar {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 14px;
  background: #0a0e14; border: 1px solid #1d2632; border-radius: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.sm-summary { color: #cad5e2; font-size: 11px; flex: 1; min-width: 280px; }
.sm-summary strong { color: #ffe35a; }
.sm-filter-pills { display: flex; gap: 4px; flex-wrap: wrap; }
.sm-filter-pill {
  background: #1c232e; color: #8fa2c7; border: 1px solid #283549;
  padding: 3px 9px; border-radius: 12px; font-size: 11px; cursor: pointer;
  font-family: inherit;
}
.sm-filter-pill:hover { background: #283549; color: #fff; }
.sm-filter-pill.active { background: #ffe35a; color: #0a0e14; border-color: #ffe35a; }

.sm-list { display: flex; flex-direction: column; gap: 2px; }
.sm-item {
  display: grid;
  grid-template-columns: 70px 28px 1fr 80px;
  gap: 10px; align-items: center;
  padding: 8px 12px;
  background: #131923; border: 1px solid #1d2632; border-radius: 4px;
  cursor: pointer;
  transition: background 0.1s, border-color 0.1s;
}
.sm-item:hover { background: #1a2333; border-color: #4a5d7a; }

.sm-time {
  font-family: "SF Mono", monospace; font-size: 11px;
  color: #8fa2c7; font-variant-numeric: tabular-nums;
}
.sm-icon { font-size: 18px; text-align: center; }
.sm-text { min-width: 0; }
.sm-label { font-size: 12px; color: #e6edf6; font-weight: 500; }
.sm-sublabel { font-size: 10px; color: #6c7d92; margin-top: 2px; }
.sm-ago { font-size: 10px; color: #4a566a; text-align: right; font-variant-numeric: tabular-nums; }

.sm-sev-info    { border-left: 3px solid #6ec8ff; }
.sm-sev-success { border-left: 3px solid #6efbb1; background: rgba(110, 251, 177, 0.04); }
.sm-sev-warn    { border-left: 3px solid #ffb866; background: rgba(255, 184, 102, 0.04); }
.sm-sev-danger  { border-left: 3px solid #ff8a8a; background: rgba(255, 138, 138, 0.06); }
.sm-sev-op      { border-left: 3px solid #ffe35a; background: rgba(255, 227, 90, 0.06); }
.sm-sev-dim     { border-left: 3px solid #4a566a; opacity: 0.78; }

.sm-sev-success .sm-icon, .sm-sev-success .sm-label { color: #6efbb1; }
.sm-sev-danger .sm-icon, .sm-sev-danger .sm-label { color: #ff8a8a; }
.sm-sev-warn .sm-icon, .sm-sev-warn .sm-label { color: #ffb866; }
.sm-sev-op .sm-icon, .sm-sev-op .sm-label { color: #ffe35a; }

/* Sport-aware chart empty state */
.md-chart-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 18px 14px;
  color: #6c7d92; text-align: center;
}
.md-chart-empty-icon { font-size: 24px; margin-bottom: 6px; }
.md-chart-empty-msg { font-size: 11px; max-width: 600px; line-height: 1.5; }
/* ─── Match Override CSS ─────────────────────────────────────── */
.mo-toggle {
  background: rgba(255, 138, 138, 0.10); color: #ff8a8a;
  border: 1px solid rgba(255, 138, 138, 0.4);
  font-family: inherit; font-size: 11px; font-weight: 600;
  padding: 4px 10px; border-radius: 4px; cursor: pointer;
  letter-spacing: 0.04em;
  transition: all 0.15s;
}
.mo-toggle:hover { background: #ff8a8a; color: #0a0e14; }
.mo-toggle.active { background: #ff8a8a; color: #0a0e14; }

.mo-form {
  background: linear-gradient(180deg, #1a2330 0%, #131923 100%);
  border-bottom: 1px solid #4d2a2a;
  border-top: 1px solid rgba(255, 138, 138, 0.3);
  padding: 14px 18px;
  font-family: "SF Mono", monospace; color: #cad5e2;
  animation: mo-slide-down 0.2s ease-out;
}
@keyframes mo-slide-down {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.mo-form-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
  border-bottom: 1px solid #1d2632; padding-bottom: 6px;
}
.mo-title {
  font-size: 12px; color: #ff8a8a; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
}
.mo-close {
  background: transparent; color: #6c7d92; border: 1px solid #283549;
  width: 22px; height: 22px; border-radius: 3px;
  cursor: pointer; font-size: 12px;
}
.mo-close:hover { color: #fff; }

.mo-form-grid {
  display: grid; gap: 12px; grid-template-columns: 1fr 1fr 2fr;
  margin-bottom: 10px;
}
.mo-ff { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.mo-label { font-size: 10px; color: #8fa2c7; letter-spacing: 0.04em; }
.mo-input {
  background: #0a0e14; color: #cad5e2;
  border: 1px solid #283549;
  padding: 6px 8px; border-radius: 3px;
  font-family: inherit; font-size: 12px;
  outline: none;
}
.mo-input:focus { border-color: #ffe35a; }
.mo-input.mo-err { border-color: #ff5a5a; animation: mo-shake 0.3s; }
@keyframes mo-shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.mo-input-wide { width: 100%; }

.mo-affected {
  padding: 8px 10px;
  background: rgba(255, 184, 102, 0.08);
  border: 1px solid rgba(255, 184, 102, 0.25);
  border-radius: 4px;
  font-size: 11px; color: #ffb866;
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.mo-aff-icon { font-size: 14px; }
.mo-aff-text strong { color: #fff; }
.mo-aff-dim { color: #6c7d92; font-style: italic; }

.mo-actions {
  display: flex; justify-content: flex-end; gap: 8px;
}
.mo-cancel, .mo-submit {
  font-family: inherit; font-size: 12px;
  padding: 6px 14px; border-radius: 3px;
  cursor: pointer; border: 1px solid #283549;
  background: transparent; color: #cad5e2;
}
.mo-cancel:hover { border-color: #4a5d7a; }
.mo-submit {
  background: #ff8a8a; color: #0a0e14;
  border-color: #ff8a8a; font-weight: 700;
}
.mo-submit:hover { background: #ff5a5a; }
.mo-submit:disabled { opacity: 0.6; cursor: wait; }

.mo-flash {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #131923; color: #cad5e2;
  border: 1px solid #283549; border-radius: 6px;
  padding: 10px 16px; font-family: "SF Mono", monospace; font-size: 12px;
  z-index: 9999;
  box-shadow: 0 12px 32px rgba(0,0,0,0.6);
  transition: opacity 0.3s;
}
.mo-flash-success { background: #2a4d33; color: #6efbb1; border-color: #6efbb1; }
.mo-flash-danger  { background: #4d2a2a; color: #ff8a8a; border-color: #ff8a8a; }
/* ─── Real-time pulse animations ──────────────────────────────── */
.rt-pulse {
  animation: rt-pulse-anim 2.4s ease-out;
  position: relative;
}
@keyframes rt-pulse-anim {
  0%   { box-shadow: 0 0 0 0 rgba(255, 227, 90, 0.7); }
  50%  { box-shadow: 0 0 0 12px rgba(255, 227, 90, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 227, 90, 0); }
}
.rt-pulse-end { animation: rt-pulse-end-anim 2.4s ease-out; }
@keyframes rt-pulse-end-anim {
  0% { box-shadow: 0 0 0 0 rgba(110, 251, 177, 0.8); }
  100% { box-shadow: 0 0 0 16px rgba(110, 251, 177, 0); }
}
.rt-pulse-override { animation: rt-pulse-override-anim 2.4s ease-out; }
@keyframes rt-pulse-override-anim {
  0% { box-shadow: 0 0 0 0 rgba(110, 200, 255, 0.8); }
  100% { box-shadow: 0 0 0 16px rgba(110, 200, 255, 0); }
}
.rt-pulse-settled-won { animation: rt-pulse-won-anim 2.4s ease-out; }
@keyframes rt-pulse-won-anim {
  0% { box-shadow: 0 0 0 0 rgba(110, 251, 177, 0.8); }
  100% { box-shadow: 0 0 0 16px rgba(110, 251, 177, 0); }
}
.rt-pulse-settled-lost { animation: rt-pulse-lost-anim 2.4s ease-out; }
@keyframes rt-pulse-lost-anim {
  0% { box-shadow: 0 0 0 0 rgba(255, 138, 138, 0.8); }
  100% { box-shadow: 0 0 0 16px rgba(255, 138, 138, 0); }
}

.rt-toast {
  position: fixed; bottom: 24px; right: 24px;
  background: #131923; color: #cad5e2;
  border: 1px solid #283549; border-radius: 6px;
  padding: 10px 16px; font-family: "SF Mono", monospace; font-size: 12px;
  z-index: 9999;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  transition: transform 0.4s, opacity 0.4s;
  animation: rt-toast-in 0.3s ease-out;
}
@keyframes rt-toast-in {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
.rt-toast-out { transform: translateX(100%); opacity: 0; }
/* ─── Manual-settlement card badge + drawer banner ─────────────── */
.mr-manual-pill {
  background: rgba(255, 184, 102, 0.15); color: #ffb866;
  border: 1px solid rgba(255, 184, 102, 0.5);
  font-size: 9px; font-weight: 700; letter-spacing: 0.05em;
  padding: 2px 7px; border-radius: 3px;
  text-transform: uppercase;
}

/* Manual-settlement banner inside drawer Rezultatet table */
.mres-manual-banner {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(255, 184, 102, 0.10) 0%, rgba(255, 184, 102, 0.04) 100%);
  border: 1px solid rgba(255, 184, 102, 0.4);
  border-radius: 6px;
  margin-bottom: 12px;
}
.mres-manual-icon {
  font-size: 28px;
  filter: drop-shadow(0 0 8px rgba(255, 184, 102, 0.5));
}
.mres-manual-text { flex: 1; }
.mres-manual-title {
  font-size: 13px; color: #ffb866; font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.mres-manual-sub {
  font-size: 11px; color: #cad5e2;
}
.mres-manual-sub strong { color: #ffe35a; }
.mres-manual-reason {
  margin-top: 6px;
  font-size: 11px; color: #8fa2c7;
  font-style: italic;
  border-left: 2px solid rgba(255, 184, 102, 0.4);
  padding: 3px 0 3px 8px;
}

.mres-source-manual { border-left: 3px solid #ffb866; padding-left: 10px; }
.mres-source-manual_settlement { background: #4d3d2a; color: #ffb866; }

/* Timeline panel */
.mres-timeline-wrap { margin-top: 14px; padding: 10px 12px; background: #0a0e14; border: 1px solid #1d2632; border-radius: 6px; }
.mres-timeline-title { font-size: 11px; color: #ffe35a; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 8px; }
.mres-timeline-list { display: flex; flex-direction: column; gap: 3px; }
.mres-tl-row { display: grid; grid-template-columns: 50px 24px 1fr 1.5fr; gap: 8px; padding: 5px 8px; border-radius: 3px; font-size: 11px; align-items: center; background: #131923; }
.mres-tl-row.mres-tl-home { border-left: 3px solid #6efbb1; }
.mres-tl-row.mres-tl-away { border-left: 3px solid #ffb866; }
.mres-tl-row.mres-tl-goal { background: rgba(110, 251, 177, 0.08); }
.mres-tl-row.mres-tl-red { background: rgba(255, 138, 138, 0.10); }
.mres-tl-row.mres-tl-yellow { background: rgba(255, 227, 90, 0.06); }
.mres-tl-row.mres-tl-penalty_scored, .mres-tl-row.mres-tl-penalty_missed { background: rgba(200, 151, 255, 0.08); }
.mres-tl-minute { font-weight: 700; color: #ffe35a; font-variant-numeric: tabular-nums; font-size: 12px; }
.mres-tl-icon { font-size: 14px; text-align: center; }
.mres-tl-kind { color: #cad5e2; font-weight: 600; }
.mres-tl-player { color: #8fa2c7; }
.mres-tl-row.mres-tl-goal .mres-tl-kind { color: #6efbb1; }
.mres-tl-row.mres-tl-red .mres-tl-kind { color: #ff8a8a; }
.mres-dim { color: #4a566a; font-style: italic; }
