/* BCP Tracker: base tokens, layout and shared components. Page-specific CSS lives in pages-*.css. */

:root {
  color-scheme: light;
  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-2: #f7f9fb;
  --surface-3: #edf1f5;
  --border: #e2e7ee;
  --border-strong: #ccd5e0;
  --fg: #0f172a;
  --fg-2: #475569;
  --fg-3: #64748b;
  --accent: #c64f08;
  --accent-hover: #ad4507;
  --accent-fg: #ffffff;
  --accent-soft: rgba(198, 79, 8, 0.1);
  --accent-text: #b04607;
  --pos: #15803d;
  --pos-soft: rgba(21, 128, 61, 0.1);
  --neg: #dc2626;
  --neg-soft: rgba(220, 38, 38, 0.09);
  --warn: #b45309;
  --warn-soft: rgba(217, 119, 6, 0.12);
  --info: #1d63c9;
  --info-soft: rgba(29, 99, 201, 0.1);
  --focus: #2563eb;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 4px 16px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.18);
  --backdrop: rgba(15, 23, 42, 0.45);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --sidebar-w: 232px;
  --topbar-h: 56px;
  --tabbar-h: 64px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b0f14;
    --surface: #121821;
    --surface-2: #161e28;
    --surface-3: #1d2733;
    --border: #232e3c;
    --border-strong: #34445a;
    --fg: #e8edf3;
    --fg-2: #a7b3c1;
    --fg-3: #7d8a99;
    --accent: #ff7a1a;
    --accent-hover: #ff8f3d;
    --accent-fg: #1c0d00;
    --accent-soft: rgba(255, 122, 26, 0.14);
    --accent-text: #ff9a4d;
    --pos: #34c77b;
    --pos-soft: rgba(52, 199, 123, 0.13);
    --neg: #f26363;
    --neg-soft: rgba(242, 99, 99, 0.13);
    --warn: #f5b942;
    --warn-soft: rgba(245, 185, 66, 0.14);
    --info: #6aa8ff;
    --info-soft: rgba(106, 168, 255, 0.13);
    --focus: #6aa8ff;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 20px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.55);
    --backdrop: rgba(0, 0, 0, 0.6);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0f14;
  --surface: #121821;
  --surface-2: #161e28;
  --surface-3: #1d2733;
  --border: #232e3c;
  --border-strong: #34445a;
  --fg: #e8edf3;
  --fg-2: #a7b3c1;
  --fg-3: #7d8a99;
  --accent: #ff7a1a;
  --accent-hover: #ff8f3d;
  --accent-fg: #1c0d00;
  --accent-soft: rgba(255, 122, 26, 0.14);
  --accent-text: #ff9a4d;
  --pos: #34c77b;
  --pos-soft: rgba(52, 199, 123, 0.13);
  --neg: #f26363;
  --neg-soft: rgba(242, 99, 99, 0.13);
  --warn: #f5b942;
  --warn-soft: rgba(245, 185, 66, 0.14);
  --info: #6aa8ff;
  --info-soft: rgba(106, 168, 255, 0.13);
  --focus: #6aa8ff;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 20px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.55);
  --backdrop: rgba(0, 0, 0, 0.6);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 650; }
h1 { font-size: 22px; letter-spacing: -0.01em; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
p { margin: 0; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
::selection { background: var(--accent-soft); }

.boot { display: grid; place-items: center; min-height: 100vh; color: var(--fg-3); }

/* ---------- utilities ---------- */
.muted { color: var(--fg-3); }
.dim { color: var(--fg-2); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); font-size: 0.92em; }
.num, .tabular { font-variant-numeric: tabular-nums; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.warn-text { color: var(--warn); }
.strong { font-weight: 650; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.right { text-align: right; }
.center { text-align: center; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.spacer { flex: 1; }

.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.stack-lg { display: flex; flex-direction: column; gap: 24px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row-nowrap { display: flex; align-items: center; gap: 8px; min-width: 0; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
@media (max-width: 960px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- app shell ---------- */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px 12px;
  background: var(--surface);
  border-right: 1px solid var(--border);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 8px 16px;
  font-weight: 700; font-size: 15px; letter-spacing: -0.01em; color: var(--fg);
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffb27a 0, var(--accent) 55%, #b84a06 100%);
  box-shadow: inset -2px -3px 0 rgba(0, 0, 0, 0.12);
  flex: none;
}
.brand small { display: block; font-size: 11px; font-weight: 500; color: var(--fg-3); letter-spacing: 0; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  min-height: 40px; padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--fg-2); font-weight: 550;
}
.nav a:hover { background: var(--surface-3); color: var(--fg); text-decoration: none; }
.nav a.active { background: var(--accent-soft); color: var(--accent-text); }
.nav a .count {
  margin-left: auto; min-width: 20px; padding: 0 6px;
  border-radius: 999px; background: var(--warn-soft); color: var(--warn);
  font-size: 11px; font-weight: 700; text-align: center; line-height: 20px;
}
.nav-cta { margin: 8px 0 12px; }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 4px; padding-top: 12px; border-top: 1px solid var(--border); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px 10px; min-width: 0; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--surface-3); color: var(--fg-2); font-weight: 700; font-size: 12px;
}

.main-wrap { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; }
.main {
  width: 100%; max-width: 1280px;
  margin: 0 auto;
  padding: 24px 28px 48px;
}
.tabbar { display: none; }

@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  .topbar {
    position: sticky; top: 0; z-index: 30;
    display: flex; align-items: center; gap: 8px;
    height: calc(var(--topbar-h) + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 12px 0 16px;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
  }
  .topbar .brand { padding: 0; }
  .main { padding: 16px 16px calc(var(--tabbar-h) + 24px + env(safe-area-inset-bottom)); }
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    display: grid; grid-template-columns: repeat(5, 1fr);
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
  }
  .tabbar a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    color: var(--fg-3); font-size: 11px; font-weight: 600; position: relative;
  }
  .tabbar a:hover { text-decoration: none; }
  .tabbar a.active { color: var(--accent-text); }
  .tabbar a.tab-cta span.tab-plus {
    width: 46px; height: 46px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--accent); color: var(--accent-fg);
    box-shadow: var(--shadow);
    margin-top: -10px;
  }
  .tabbar a .dot {
    position: absolute; top: 8px; left: calc(50% + 8px);
    width: 8px; height: 8px; border-radius: 50%; background: var(--warn);
  }
  h1 { font-size: 20px; }
}

/* ---------- page head ---------- */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.page-head .sub { color: var(--fg-3); margin-top: 4px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--fg-3); font-weight: 550; margin-bottom: 8px; min-height: 32px; }
.back-link:hover { color: var(--fg); text-decoration: none; }

/* ---------- card ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  min-width: 0;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.card-head h2 { font-size: 15px; }
.card-head .sub { color: var(--fg-3); font-size: 12px; }
.card-body { padding: 16px 18px; }
.card-body.flush { padding: 0; }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--border); }
.card.warn { border-color: color-mix(in srgb, var(--warn) 45%, var(--border)); }
.card.accent { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
@media (max-width: 600px) {
  .card-head { padding: 12px 14px; }
  .card-body { padding: 14px; }
  .card-foot { padding: 12px 14px; }
}

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  min-width: 0;
}
.kpi-label { color: var(--fg-3); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.kpi-value { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin-top: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-sub { color: var(--fg-3); font-size: 12px; margin-top: 2px; }
@media (max-width: 600px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 12px; }
  .kpi-value { font-size: 19px; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 8px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--fg);
  font-weight: 600; line-height: 1.2;
  cursor: pointer; white-space: nowrap;
  text-decoration: none;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.btn:hover { background: var(--surface-3); text-decoration: none; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--fg-2); }
.btn-ghost:hover { background: var(--surface-3); color: var(--fg); }
.btn-danger { color: var(--neg); border-color: color-mix(in srgb, var(--neg) 40%, var(--border)); }
.btn-danger:hover { background: var(--neg-soft); }
.btn-success { background: var(--pos); border-color: var(--pos); color: #fff; }
.btn-success:hover { filter: brightness(1.08); background: var(--pos); }
.btn-sm { min-height: 32px; padding: 4px 10px; font-size: 13px; }
.btn-lg { min-height: 48px; padding: 10px 18px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; padding: 0; }
.btn-icon.btn-sm { width: 32px; }
.btn .spinner { width: 14px; height: 14px; }

/* ---------- badges & tags ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 8px;
  border-radius: 999px;
  font-size: 12px; font-weight: 650; white-space: nowrap;
  background: var(--surface-3); color: var(--fg-2);
}
.badge-win { background: var(--pos-soft); color: var(--pos); }
.badge-loss { background: var(--neg-soft); color: var(--neg); }
.badge-void { background: var(--surface-3); color: var(--fg-2); }
.badge-open { background: var(--info-soft); color: var(--info); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-rejected { background: var(--neg-soft); color: var(--neg); }
.badge-partial { background: var(--warn-soft); color: var(--warn); }
.badge-muted { background: var(--surface-3); color: var(--fg-3); }
.badge-accent { background: var(--accent-soft); color: var(--accent-text); }

.platform-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; white-space: nowrap;
}
.platform-tag::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--c, var(--fg-3)); flex: none;
}

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table th {
  text-align: left; font-size: 12px; font-weight: 600; color: var(--fg-3);
  text-transform: uppercase; letter-spacing: 0.03em;
  padding: 10px 12px; border-bottom: 1px solid var(--border);
  white-space: nowrap; background: var(--surface-2);
}
.table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table th:first-child, .table td:first-child { padding-left: 18px; }
.table th:last-child, .table td:last-child { padding-right: 18px; }
.table .num, .table th.num { text-align: right; white-space: nowrap; }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr.clickable:hover td { background: var(--surface-2); }
.table tfoot td { font-weight: 650; background: var(--surface-2); border-top: 1px solid var(--border); border-bottom: none; }
.table-compact td { padding-top: 7px; padding-bottom: 7px; }

/* ---------- mobile list ---------- */
.list { display: flex; flex-direction: column; }
.list-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  color: inherit; min-width: 0;
}
.list-item:last-child { border-bottom: none; }
a.list-item:hover, .list-item.clickable:hover { background: var(--surface-2); text-decoration: none; cursor: pointer; }
.list-item .main-col { flex: 1; min-width: 0; }
.list-item .title { font-weight: 600; }
.list-item .meta { color: var(--fg-3); font-size: 12px; }
@media (max-width: 600px) { .list-item { padding: 12px 14px; } }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-size: 12px; font-weight: 650; color: var(--fg-2); }
.field-label .req { color: var(--neg); margin-left: 2px; }
.hint { font-size: 12px; color: var(--fg-3); }
.error-text { font-size: 12px; color: var(--neg); }
.input, .select, .textarea {
  width: 100%; min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--fg);
  font-size: 15px;
}
@media (min-width: 901px) { .input, .select, .textarea { font-size: 14px; } }
.input:hover, .select:hover, .textarea:hover { border-color: var(--fg-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent); }
.input.invalid, .select.invalid { border-color: var(--neg); }
.input.num { text-align: right; font-variant-numeric: tabular-nums; }
.textarea { min-height: 80px; resize: vertical; }
.input-group { display: flex; align-items: stretch; }
.input-group .input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group .addon {
  display: grid; place-items: center; padding: 0 12px;
  border: 1px solid var(--border-strong); border-left: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--surface-2); color: var(--fg-3); font-weight: 600;
}
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

/* segmented control */
.seg {
  display: inline-flex; padding: 3px; gap: 2px;
  background: var(--surface-3); border-radius: var(--radius-sm);
  max-width: 100%; overflow-x: auto;
}
.seg button {
  min-height: 34px; padding: 4px 12px;
  border: none; border-radius: 5px; background: transparent;
  color: var(--fg-2); font-weight: 600; cursor: pointer; white-space: nowrap;
}
.seg button:hover { color: var(--fg); }
.seg button.active { background: var(--surface); color: var(--fg); box-shadow: var(--shadow-sm); }
.seg button .count { margin-left: 6px; color: var(--fg-3); font-weight: 600; }

/* toolbar (filters) */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar .input, .toolbar .select { width: auto; min-width: 140px; }
.toolbar .search { position: relative; flex: 1; min-width: 200px; }
.toolbar .search .input { width: 100%; padding-left: 36px; }
.toolbar .search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--fg-3); pointer-events: none; }
@media (max-width: 600px) { .toolbar .input, .toolbar .select { flex: 1; min-width: 0; } }

/* ---------- misc ---------- */
.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 40px 20px; text-align: center; color: var(--fg-3);
}
.empty .empty-title { color: var(--fg); font-weight: 650; font-size: 15px; }
.empty svg { color: var(--fg-3); opacity: 0.7; }

.progress { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.progress.done > span { background: var(--pos); }
.progress.over > span { background: var(--warn); }

.dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; }
.dl dt { color: var(--fg-3); }
.dl dd { margin: 0; font-weight: 550; min-width: 0; }

.callout {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--radius);
  background: var(--info-soft); color: var(--fg);
}
.callout svg { flex: none; margin-top: 1px; color: var(--info); }
.callout.warn { background: var(--warn-soft); }
.callout.warn svg { color: var(--warn); }
.callout.error { background: var(--neg-soft); }
.callout.error svg { color: var(--neg); }
.callout.success { background: var(--pos-soft); }
.callout.success svg { color: var(--pos); }

.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  min-height: 220px; padding: 24px;
  border: 2px dashed var(--border-strong); border-radius: var(--radius-lg);
  background: var(--surface-2); color: var(--fg-2); text-align: center; cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-soft); }

.kbd {
  display: inline-block; padding: 1px 6px; border-radius: 4px;
  border: 1px solid var(--border-strong); border-bottom-width: 2px;
  font-family: var(--mono); font-size: 11px; color: var(--fg-2); background: var(--surface);
}

.spinner {
  display: inline-block; width: 18px; height: 18px;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: spin 0.7s linear infinite; opacity: 0.8;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 48px 16px; color: var(--fg-3); }
.skeleton { background: linear-gradient(90deg, var(--surface-3), var(--surface-2), var(--surface-3)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { to { background-position: -200% 0; } }

.divider { height: 1px; background: var(--border); border: none; margin: 0; }

/* ---------- toast ---------- */
.toasts {
  position: fixed; z-index: 100; right: 16px; bottom: 16px;
  display: flex; flex-direction: column; gap: 8px; align-items: flex-end;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: 10px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 10px 14px; border-radius: var(--radius);
  background: var(--fg); color: var(--bg);
  box-shadow: var(--shadow-lg); font-weight: 550;
  animation: toast-in 0.18s ease-out;
}
.toast.success svg { color: var(--pos); }
.toast.error { background: var(--neg); color: #fff; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }
@media (max-width: 900px) {
  /* top on phones: the bottom is taken by the tab bar and bottom-sheet modals */
  .toasts { left: 16px; right: 16px; top: calc(var(--topbar-h) + 8px + env(safe-area-inset-top)); bottom: auto; align-items: stretch; }
  .toast { max-width: none; }
}

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center; padding: 16px;
  background: var(--backdrop);
  animation: fade-in 0.12s ease-out;
}
@keyframes fade-in { from { opacity: 0; } }
.modal {
  width: min(520px, 100%); max-height: calc(100vh - 32px);
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
}
.modal.wide { width: min(760px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 0; }
.modal-head h2 { font-size: 17px; }
.modal-body { padding: 16px 18px; overflow-y: auto; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 0 18px 16px; flex-wrap: wrap; }
.modal-error { margin: 0 18px 12px; }
@media (max-width: 600px) {
  .modal-backdrop { place-items: end stretch; padding: 0; }
  .modal { width: 100%; max-height: 92vh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .modal-actions .btn { flex: 1; }
}

/* ---------- login ---------- */
.auth-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }

/* ---------- aktuálna proxy (vždy viditeľná: sidebar na desktope, topbar na mobile) ---------- */

.proxy-chip {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  margin: 0 8px 10px; padding: 6px 10px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface-2);
  font-size: 12px; line-height: 1.2; white-space: nowrap; overflow: hidden;
  font-variant-numeric: tabular-nums;
}
.proxy-chip .proxy-flag { font-size: 15px; line-height: 1; }
.proxy-chip .proxy-ip { font-weight: 650; color: var(--fg); overflow: hidden; text-overflow: ellipsis; }
.proxy-chip .proxy-ip.muted { font-weight: 400; color: var(--fg-3); }
.proxy-chip .proxy-cc { color: var(--fg-3); font-weight: 700; letter-spacing: .04em; }
.proxy-chip .proxy-sep { color: var(--fg-3); opacity: .6; }
.proxy-chip .proxy-row1 { display: flex; align-items: center; gap: 5px; width: 100%; }
.proxy-chip .proxy-row2 {
  display: block; width: 100%; color: var(--fg-3); font-size: 11px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.proxy-chip { padding: 7px 10px; }
.topbar .proxy-chip { margin: 0; padding: 4px 8px; font-size: 11px; }
.topbar .proxy-chip .proxy-ip { max-width: 92px; }

@media (max-width: 420px) {
  .proxy-chip .proxy-cc { display: none; }
}

/* ---------- chip + tlačidlo „overiť online“ ---------- */
.proxy-wrap { display: flex; align-items: center; gap: 6px; margin: 0 8px 10px; }
.proxy-wrap .proxy-chip { margin: 0; flex: 1 1 auto; min-width: 0; }
.proxy-wrap .proxy-check { flex: 0 0 auto; width: 30px; height: 30px; padding: 0; display: grid; place-items: center; }
.proxy-wrap .proxy-check.spin svg { animation: proxy-spin .9s linear infinite; }
@keyframes proxy-spin { to { transform: rotate(360deg); } }
.proxy-wrap.proxy-online .proxy-chip { border-color: #2f9e44; box-shadow: 0 0 0 2px rgba(47,158,68,.15); }
.proxy-wrap.proxy-offline .proxy-chip { border-color: #e03131; box-shadow: 0 0 0 2px rgba(224,49,49,.15); }
.topbar .proxy-wrap { margin: 0; }

/* ---------- panel: 1 účet = 1 riadok s jeho proxy ---------- */
.proxy-list { margin: 4px 8px 10px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.proxy-list-head { display: flex; align-items: center; justify-content: space-between; padding: 7px 10px; font-size: 12px; font-weight: 700; color: var(--fg-2); border-bottom: 1px solid var(--border); }
.proxy-list-link { font-size: 11px; font-weight: 600; color: var(--accent-text); text-decoration: none; }
.proxy-list-body { max-height: 260px; overflow-y: auto; }
.proxy-list-row { display: flex; flex-direction: column; gap: 1px; padding: 6px 10px; text-decoration: none; color: inherit; border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent); }
.proxy-list-row:last-child { border-bottom: none; }
.proxy-list-row:hover { background: var(--surface-3, rgba(0,0,0,.04)); }
.proxy-list-line1 { display: flex; align-items: center; gap: 5px; font-size: 12px; font-variant-numeric: tabular-nums; }
.proxy-list-flag { font-size: 13px; line-height: 1; }
.proxy-list-sess { font-weight: 700; color: var(--fg); }
.proxy-list-cc { font-size: 10px; font-weight: 800; letter-spacing: .04em; color: var(--fg-3); }
.proxy-list-line2 { display: flex; gap: 5px; align-items: baseline; font-size: 11px; color: var(--fg-3); }
.proxy-list-broker { font-weight: 700; }
.proxy-list-acc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proxy-list-empty { padding: 8px 10px; font-size: 11px; color: var(--fg-3); }

/* ---------- inbox nových zápasov (dashboard) ---------- */
.inbox-list { display: flex; flex-direction: column; }
.inbox-item { display: flex; align-items: center; gap: 10px; padding: 9px 4px; text-decoration: none; color: inherit;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent); }
.inbox-item:last-child { border-bottom: none; }
.inbox-odds { min-width: 52px; font-weight: 800; font-variant-numeric: tabular-nums; }
.inbox-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.inbox-title { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-meta { font-size: 12px; color: var(--fg-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-when { font-size: 11px; color: var(--fg-3); white-space: nowrap; }
.inbox-item.new { border-radius: 8px; }
@keyframes inbox-blink {
  0%, 100% { background: transparent; box-shadow: none; }
  50% { background: var(--accent-soft, rgba(198,79,8,.14)); box-shadow: 0 0 0 2px var(--accent-soft, rgba(198,79,8,.2)); }
}

/* ---------- automatické podanie (zbalené) ---------- */
.auto-bet-card { padding: 10px 14px; }
.auto-bet-card[open] { padding-bottom: 14px; }
.auto-bet-summary { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; cursor: pointer; list-style: none; }
.auto-bet-summary::-webkit-details-marker { display: none; }
.auto-bet-summary::after { content: '▾'; margin-left: auto; color: var(--fg-3); transition: transform .15s; }
.auto-bet-card[open] .auto-bet-summary::after { transform: rotate(180deg); }
.auto-bet-card[open] .auto-bet-summary { margin-bottom: 10px; }
.auto-bet-grid { display: grid; grid-template-columns: minmax(120px, 1fr) 110px minmax(120px, 1fr); gap: 10px; }
@media (max-width: 640px) {
  .auto-bet-grid { grid-template-columns: 1fr; }
  .auto-bet-card .row { justify-content: stretch; }
  .auto-bet-card .btn-primary { width: 100%; }
}

/* ---------- Brokeri: karty brokeroch s účtami ---------- */
.broker-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 14px; }
.bk-card { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.bk-head { display: flex; align-items: flex-start; gap: 10px; }
.bk-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; margin-top: 7px; }
.bk-title { flex: 1; min-width: 0; }
.bk-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.bk-stat { background: var(--surface); padding: 9px 12px; min-width: 0; overflow: hidden; }
.bk-stat-v { font-size: 16px; font-weight: 750; font-variant-numeric: tabular-nums; }
.bk-stat-l { font-size: 11px; color: var(--fg-3); text-transform: uppercase; letter-spacing: .04em; margin-top: 1px; }
.bk-accounts { display: flex; flex-direction: column; gap: 6px; }
.bk-acc { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.bk-acc:hover { background: var(--surface-3, rgba(0,0,0,.03)); }
.bk-acc-main { flex: 1; min-width: 0; }
.bk-acc-name { font-weight: 650; text-decoration: none; color: inherit; }
.bk-acc-name:hover { text-decoration: underline; }
.bk-acc-bal { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bk-acc-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.bk-empty { padding: 14px; text-align: center; color: var(--fg-3); font-size: 13px; border: 1px dashed var(--border); border-radius: 10px; }
@media (max-width: 520px) {
  .bk-acc { flex-wrap: wrap; }
  .bk-acc-actions { width: 100%; }
  .bk-stats { grid-template-columns: repeat(3, 1fr); }
  .bk-stat-v { font-size: 14px; }
}

/* ---------- správca okien ---------- */
.bk-windows { padding: 12px 14px; }
.bk-wins { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.bk-win { display: grid; grid-template-columns: 80px 140px 1fr 70px auto; gap: 8px; align-items: center;
  padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); font-size: 13px; }
.bk-win-broker { font-weight: 700; }
.bk-win-acc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-win-url { color: var(--fg-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-win-age { text-align: right; }
.bk-win-actions { display: flex; gap: 4px; justify-content: flex-end; }
@media (max-width: 720px) {
  .bk-win { grid-template-columns: 70px 1fr; grid-auto-rows: auto; }
  .bk-win-url { grid-column: 1 / -1; }
  .bk-win-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .bk-win-age { display: none; }
}

/* ---------- karty na detaile účtu (proxy / prihlásenie) ---------- */
.acct-card { padding: 14px 16px; }
.acct-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.acct-card-head h2 { margin: 0; font-size: 16px; line-height: 1.2; }
.acct-card-sub { font-size: 12px; color: var(--fg-3); margin-top: 2px; }
.acct-proxy-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.acct-proxy-flag { font-size: 16px; line-height: 1; }
.acct-proxy-sess { font-family: ui-monospace, monospace; font-weight: 700; font-size: 13px; }
.acct-pill { font-size: 10px; font-weight: 800; letter-spacing: .04em; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--border); color: var(--fg-2); }
.acct-cred-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.acct-cred-id { min-width: 0; }
.acct-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- plávajúci panel: živé Chrome okná ---------- */
.bdock { position: fixed; right: 16px; bottom: 74px; width: 290px; z-index: 70;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,.18); overflow: hidden; }
.bdock-head { display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; font-size: 12px; font-weight: 700; color: var(--fg-2);
  border-bottom: 1px solid var(--border); background: var(--surface-2); }
.bdock-link { font-size: 11px; color: var(--accent-text); text-decoration: none; }
.bdock-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent); }
.bdock-row:last-child { border-bottom: none; }
.bdock-thumb { width: 84px; height: 48px; object-fit: cover; border-radius: 6px;
  border: 1px solid var(--border); cursor: zoom-in; background: #000; flex: 0 0 auto; }
.bdock-meta { flex: 1; min-width: 0; }
.bdock-acc { font-size: 12px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bdock-act { font-size: 11px; color: var(--fg-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bdock-x { border: none; background: transparent; color: var(--fg-3); font-size: 16px;
  line-height: 1; cursor: pointer; padding: 2px 4px; border-radius: 6px; }
.bdock-x:hover { background: var(--surface-3, rgba(0,0,0,.06)); color: var(--fg); }
.bdock-spin { width: 14px; height: 14px; border-radius: 50%; flex: 0 0 auto;
  border: 2px solid var(--border); border-top-color: var(--accent, #c64f08); animation: bdock-spin .8s linear infinite; }
@keyframes bdock-spin { to { transform: rotate(360deg); } }
.bdock-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.62); z-index: 90;
  display: flex; align-items: center; justify-content: center; padding: 24px; }
.bdock-live { background: var(--surface); border-radius: 12px; overflow: hidden; max-width: 92vw; }
.bdock-live-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.bdock-live-head .btn { margin-left: auto; }
.bdock-live-img { display: block; width: min(88vw, 1200px); height: auto; background: #000; }

/* ---------- /okna: živé náhľady ---------- */
.win-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.win-card { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.win-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.win-acc { display: flex; align-items: center; gap: 7px; min-width: 0; }
.windows-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.win-shot-wrap { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: #000; }
.win-shot { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.win-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.win-proc { padding: 18px 10px; text-align: center; border: 1px dashed var(--border); border-radius: 10px; }
.win-jobs { display: flex; flex-direction: column; gap: 6px; }
.win-job { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-2); }
.win-job-age { margin-left: auto; }
.win-empty { padding: 44px 20px; text-align: center; display: grid; gap: 8px; justify-items: center; }
.win-empty-ic { color: var(--fg-3); }
.win-empty-t { font-weight: 700; font-size: 16px; }

/* ---------- účet v karte brokera: 2 riadky (údaje / akcie) ---------- */
.bk-acc { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: center; }
.bk-acc-main { min-width: 0; }
.bk-acc-bal { font-weight: 750; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.bk-acc-actions { grid-column: 1 / -1; display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 520px) {
  .bk-acc-actions { justify-content: flex-start; }
}

/* ---------- sidebar proxy: 1. riadok účet, 2. riadok proxy ---------- */
.proxy-list-line1 { font-size: 12.5px; font-weight: 700; color: var(--fg); }
.proxy-list-broker { font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--fg-3); }
.proxy-list-line2 { font-size: 11.5px; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.proxy-list-sess { font-weight: 600; color: var(--fg-2); }

/* ---------- filter krajín ako vlajocky (multiselect) ---------- */
.cc-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--fg-2);
  font-size: 12px; font-weight: 650; cursor: pointer; line-height: 1.2; }
.cc-chip:hover { background: var(--surface-2); }
.cc-chip.on { border-color: var(--accent, #c64f08); color: var(--accent-text, #c64f08);
  background: var(--accent-soft, rgba(198,79,8,.12)); }
.cc-flag { font-size: 13px; line-height: 1; }
.cc-n { font-size: 10px; font-weight: 700; color: var(--fg-3); }
.cc-chip.on .cc-n { color: var(--accent-text, #c64f08); }
.cc-reset { border-style: dashed; color: var(--fg-3); }

/* ---------- Nové zápasy (dashboard) — modernejší vzhľad ---------- */
.inbox-card { padding: 14px 16px 10px; }
.inbox-head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.inbox-head-ic { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px;
  border-radius: 9px; background: var(--accent-soft, rgba(198,79,8,.12)); color: var(--accent-text, #c64f08); flex: 0 0 auto; }
.inbox-head-t { flex: 1; min-width: 0; }
.inbox-head-t h2 { margin: 0; font-size: 17px; line-height: 1.2; }
.inbox-head-sub { font-size: 12px; color: var(--fg-3); margin-top: 1px; }
.inbox-head-link { font-size: 12px; font-weight: 600; color: var(--accent-text, #c64f08); text-decoration: none; }
.inbox-list { display: flex; flex-direction: column; gap: 4px; padding-top: 8px; }
.inbox-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 10px 10px; border-radius: 10px; text-decoration: none; color: inherit;
  border: 1px solid transparent; transition: background .12s, border-color .12s; }
.inbox-item:hover { background: var(--surface-2); border-color: var(--border); }
.inbox-item + .inbox-item { margin-top: 0; }
.inbox-odds { min-width: 54px; padding: 4px 8px; text-align: center; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-family: ui-monospace, monospace; font-weight: 800; font-size: 13px; font-variant-numeric: tabular-nums; }
.inbox-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.inbox-title { display: flex; align-items: center; gap: 6px; font-weight: 650; font-size: 14px; min-width: 0; }
.inbox-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent, #c64f08); flex: 0 0 auto;
  animation: inbox-pulse 1.4s ease-in-out infinite; }
@keyframes inbox-pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.75); } }
.inbox-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--fg-3); min-width: 0; }
.inbox-chip { font-size: 11px; font-weight: 650; padding: 1px 7px; border-radius: 999px;
  background: var(--surface-3, rgba(0,0,0,.05)); color: var(--fg-2); }
.inbox-right { display: flex; align-items: center; gap: 8px; }
.inbox-when { font-size: 11px; color: var(--fg-3); white-space: nowrap; }
.inbox-arrow { color: var(--fg-3); font-size: 18px; line-height: 1; transition: transform .12s, color .12s; }
.inbox-item:hover .inbox-arrow { transform: translateX(2px); color: var(--accent-text, #c64f08); }
.inbox-item.new { background: color-mix(in srgb, var(--accent-soft, rgba(198,79,8,.12)) 55%, transparent); }
.inbox-item.new .inbox-odds { border-color: var(--accent, #c64f08); color: var(--accent-text, #c64f08); }
.inbox-list .small.muted { padding: 14px 6px; }
@media (max-width: 560px) {
  .inbox-item { grid-template-columns: auto minmax(0, 1fr); }
  .inbox-right { grid-column: 2; justify-content: flex-start; }
}

/* ---------- účet v karte brokera (viac účtov pod sebou) ---------- */
.bk-account-list { display: flex; flex-direction: column; gap: 6px; }
.bk-acc { display: flex; flex-direction: column; gap: 5px; padding: 9px 11px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.bk-acc:hover { border-color: color-mix(in srgb, var(--accent, #c64f08) 35%, var(--border)); }
.bk-acc-top { display: flex; align-items: center; gap: 7px; min-width: 0; }
.bk-acc-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.bk-acc-name { font-weight: 700; text-decoration: none; color: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-acc-name:hover { text-decoration: underline; }
.bk-acc-flag { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  color: var(--fg-3); border: 1px solid var(--border); border-radius: 999px; padding: 0 6px; }
.bk-acc-bal { margin-left: auto; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bk-acc-meta { font-size: 11.5px; color: var(--fg-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-acc-actions { display: flex; gap: 5px; flex-wrap: wrap; }
/* viac účtov pod brokerom: scroll, aby karta nebola nekonečná */
.bk-accounts { max-height: 340px; overflow-y: auto; padding-right: 2px; }
.bk-accounts::-webkit-scrollbar { width: 6px; }
.bk-accounts::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.bk-count { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--fg-2); }

/* login (meno) v paneli Proxy — aby sa dali účty rozlíšiť */
.proxy-list-login { font-size: 11px; color: var(--fg-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

/* ---------- akcie účtu v karte brokera: 3 rovnaké tlačidlá s ikonou ---------- */
.bk-acc-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 2px; }
.bk-acc-actions .btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 6px 6px; font-size: 11.5px; font-weight: 650; white-space: nowrap;
  border-radius: 8px; min-width: 0; }
.bk-acc-actions .btn svg { flex: 0 0 auto; opacity: .85; }
.bk-acc-actions .btn:hover svg { opacity: 1; }
@media (max-width: 420px) {
  .bk-acc-actions { grid-template-columns: 1fr; }
}

/* štatistiky brokera: hlavná hodnota + malý doplnok (krypto) */
.bk-stat-v { font-size: 16px; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.bk-stat-sub { font-size: 10.5px; font-weight: 650; color: var(--fg-3); font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.bk-stats { align-items: stretch; }

/* .bk-acc je flex-column, ale zdedil align-items:center → deti sa centrujú; chceme plnú šírku */
.bk-acc { align-items: stretch; }
.bk-acc-top { justify-content: flex-start; }
.bk-acc > * { width: 100%; }

/* akcie v detaile účtu: ikony + rovnomerné rozostupy */
.ov-detail-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ov-detail-actions .btn { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ov-detail-actions .btn svg { opacity: .8; flex: 0 0 auto; }
.ov-detail-actions .btn:hover svg { opacity: 1; }
.ov-detail-actions .ov-act-main { font-weight: 700; }

/* karty v detaile účtu: obsah nesmie byť nalepený na okraj */
.card > .card-body > .card-head, .card > .card-body:first-child { padding-top: 16px; }
.card > .ov-cq-foot, .card > .more-foot { padding: 10px 18px 14px; }
/* prázdne stavy a tabuľky v kartách majú vnútorný odstup */
.card > .table-wrap { padding: 0; }
.card > .ov-empty, .card > .empty-state { padding: 18px; }

/* ---------- /stavky ---------- */
.bets-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-top: 12px; }
.bets-tile { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.bets-tile-v { font-size: 20px; font-weight: 750; font-variant-numeric: tabular-nums; line-height: 1.15; }
.bets-tile-l { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--fg-3); margin-top: 4px; }
.bets-tile-s { font-size: 12px; color: var(--fg-2); margin-top: 2px; }
.bets-table td { vertical-align: top; }
.bets-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.bets-acc { font-weight: 650; text-decoration: none; color: inherit; white-space: nowrap; }
.bets-acc:hover, .bets-match:hover { text-decoration: underline; }
.bets-match { font-weight: 650; text-decoration: none; color: inherit; }

/* ---------- mini zoznam aktívnych stávok na dashboarde ---------- */
.bets-mini { display: flex; flex-direction: column; }
.bets-mini-row { display: flex; align-items: center; gap: 10px; padding: 9px 18px; text-decoration: none; color: inherit;
  border-top: 1px solid color-mix(in srgb, var(--border) 60%, transparent); }
.bets-mini-row:hover { background: var(--surface-2); }
.bets-odds { min-width: 52px; text-align: center; padding: 3px 7px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface-2); font-family: ui-monospace, monospace; font-weight: 800; font-size: 12.5px; }
.bets-mini-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.bets-mini-title { font-weight: 650; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bets-mini-meta { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--fg-3); }
.bets-mini-pot { white-space: nowrap; }

/* ---------- OTP priamo v paneli okien (pulzujúce) ---------- */
.bdock-otp { background: color-mix(in srgb, var(--accent, #c64f08) 12%, transparent);
  border-left: 3px solid var(--accent, #c64f08); animation: bdock-otp-pulse 1.6s ease-in-out infinite; }
@keyframes bdock-otp-pulse {
  0%, 100% { box-shadow: inset 0 0 0 0 rgba(198,79,8,0); background: color-mix(in srgb, var(--accent, #c64f08) 8%, transparent); }
  50% { box-shadow: inset 0 0 0 2px rgba(198,79,8,.35); background: color-mix(in srgb, var(--accent, #c64f08) 18%, transparent); }
}
.bdock-otp-ic { font-size: 18px; line-height: 1; }
.bdock-otp-hint { font-size: 11px; font-weight: 700; color: var(--accent-text, #c64f08); margin-top: 1px; }
.bdock-otp-line { display: flex; gap: 6px; margin-top: 6px; }
.bdock-otp-input { flex: 1; min-width: 0; padding: 5px 8px; border-radius: 7px; border: 1px solid var(--border);
  background: var(--surface); color: var(--fg); font-family: ui-monospace, monospace; font-size: 13px; letter-spacing: .12em; }
.bdock-otp-input:focus { outline: 2px solid var(--accent, #c64f08); outline-offset: 1px; }
.bdock-otp-btn { flex: 0 0 auto; }

/* ---------- panel Proxy v sidebare: natiahne sa až po používateľa (spodok) ---------- */
.sidebar > * { flex-shrink: 0; }
.sidebar .proxy-list { flex: 1 1 auto; min-height: 120px; display: flex; flex-direction: column; margin-bottom: 8px; }
.sidebar .proxy-list-body { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; }
.sidebar .proxy-list-body::-webkit-scrollbar { width: 8px; }
.sidebar .proxy-list-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.sidebar-foot { margin-top: 0; }

/* kompaktnejšie riadky, aby sa do panelu vmestili všetky účty */
.sidebar .proxy-list-row { padding: 5px 10px; gap: 0; }
.sidebar .proxy-list-line1 { font-size: 12px; line-height: 1.25; }
.sidebar .proxy-list-login { font-size: 10.5px; line-height: 1.25; }
.sidebar .proxy-list-line2 { font-size: 11px; line-height: 1.3; }
.sidebar .proxy-list-flag { font-size: 12px; }
.sidebar .proxy-list-head { padding: 5px 10px; font-size: 11.5px; }
.sidebar .proxy-list-row { padding: 4px 10px; }
.sidebar .proxy-list-row { padding: 3.5px 10px; }

/* Nastavenia v spodnej časti sidebaru (medzi menom a odhlásením) */
.sidebar .foot-link { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 9px;
  color: var(--fg-2); text-decoration: none; font-weight: 600; font-size: 13px; }
.sidebar .foot-link:hover { background: var(--surface-2); color: var(--fg); }
.sidebar .foot-link[data-active="1"], .sidebar .foot-link.active { background: var(--accent-soft, rgba(198,79,8,.12)); color: var(--accent-text, #c64f08); }
.sidebar .foot-link svg { opacity: .85; }

/* ---------- živý Chrome: väčšie okno + resize úchyt ---------- */
.bdock-live {
  position: relative;
  width: min(94vw, 1480px);
  max-width: 96vw;
  max-height: 92vh;
  overflow: hidden;
  resize: both;
  min-width: 420px;
  min-height: 280px;
  border-radius: 12px;
  background: #0b0e13;
  box-shadow: 0 24px 64px rgba(0,0,0,.55);
}
.bdock-live.full { width: 98vw; height: 94vh; max-width: 98vw; max-height: 94vh; }
.bdock-live-head { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--border); background: var(--surface); }
.bdock-live-head .btn { margin-left: 0; }
.bdock-live-head > strong { margin-right: auto; }
.bdock-live-url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 34vw; }
.bdock-live-canvas { max-height: calc(92vh - 46px); object-fit: contain; }

/* ---------- Pipeline board ---------- */
.pipe-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: start; }
@media (max-width: 1100px) { .pipe-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 640px) { .pipe-grid { grid-template-columns: 1fr; } }
.pipe-col { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.pipe-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--surface); border-bottom: 1px solid var(--border); }
.pipe-head-t { font-weight: 750; font-size: 14px; }
.pipe-count { font-size: 11px; font-weight: 800; color: #fff; border-radius: 999px; padding: 1px 8px; }
.pipe-hint { margin-left: auto; font-size: 11px; }
.pipe-body { display: flex; flex-direction: column; gap: 8px; padding: 10px; min-height: 90px; max-height: 68vh; overflow-y: auto; }
.pipe-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 9px 10px; display: grid; gap: 6px; }
.pipe-card:hover { border-color: color-mix(in srgb, var(--accent,#c64f08) 40%, var(--border)); }
.pipe-card-top { display: flex; align-items: center; gap: 6px; }
.pipe-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.pipe-title { font-weight: 650; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.pipe-odds { font-family: ui-monospace, monospace; font-weight: 800; font-size: 12px; }
.pipe-meta { display: flex; gap: 6px; flex-wrap: wrap; font-size: 11.5px; color: var(--fg-3); }
.pipe-chip { background: var(--surface-3, rgba(0,0,0,.05)); border-radius: 999px; padding: 0 7px; color: var(--fg-2); font-weight: 600; }
.pipe-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pipe-empty { padding: 14px; text-align: center; color: var(--fg-3); font-size: 12px; }

/* ---------- Podávanie: karta účtu ---------- */
.tk-place-row { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--surface); margin-bottom: 10px; }
.tk-place-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tk-place-nav { display: flex; align-items: center; gap: 8px; }
.tk-place-grid { display: grid; grid-template-columns: 150px 120px 1fr auto; gap: 10px; align-items: end; margin-top: 10px; }
.tk-place-drift { align-self: center; padding-top: 18px; }
.tk-place-submit { display: flex; align-items: flex-end; }
.tk-place-status { display: flex; align-items: center; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }
.tk-place-status-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--fg-3); margin-right: 2px; }
.tk-st { background: transparent; border: 1px solid var(--border); color: var(--fg-2); }
.tk-st:hover { background: var(--surface-2); }
.tk-ok { color: #2f9e44; border-color: color-mix(in srgb, #2f9e44 35%, var(--border)); }
.tk-ok:hover { background: color-mix(in srgb, #2f9e44 10%, transparent); }
.tk-bad { color: #d64545; border-color: color-mix(in srgb, #d64545 35%, var(--border)); }
.tk-bad:hover { background: color-mix(in srgb, #d64545 10%, transparent); }
@media (max-width: 720px) { .tk-place-grid { grid-template-columns: 1fr 1fr; } .tk-place-submit { grid-column: 1 / -1; } }

/* ---------- Podávanie: stav „podávam…" ---------- */
.tk-place-pending { display: flex; align-items: center; gap: 10px; padding: 10px 2px; color: var(--fg-2); }
.tk-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--accent, #c64f08); animation: tk-spin .8s linear infinite; }
@keyframes tk-spin { to { transform: rotate(360deg); } }
.tk-place-row.busy { border-color: color-mix(in srgb, var(--accent,#c64f08) 45%, var(--border)); background: color-mix(in srgb, var(--accent,#c64f08) 4%, var(--surface)); }

/* ---------- Stats / event log ---------- */
.stats-cards { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)) 2fr; gap: 10px; margin-bottom: 6px; }
@media (max-width: 900px) { .stats-cards { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.stats-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.stats-card-v { font-size: 22px; font-weight: 800; line-height: 1.1; }
.stats-card-v.small { font-size: 12px; font-weight: 600; }
.stats-card-l { font-size: 11.5px; color: var(--fg-3); text-transform: uppercase; letter-spacing: .04em; margin-top: 2px; }
.stats-lvl { font-size: 10.5px; font-weight: 800; text-transform: uppercase; border: 1px solid; border-radius: 999px; padding: 1px 7px; }
.log-msg { font-family: ui-monospace, monospace; white-space: pre-wrap; word-break: break-word; }
.log-detail { white-space: pre-wrap; word-break: break-word; margin: 4px 0 0; max-height: 220px; overflow: auto; background: var(--surface-2); padding: 8px; border-radius: 8px; }

/* Osirotené okná po reštarte — len upozornenie, nie karta okna */
.win-orphan { padding: 10px 14px; border-style: dashed; background: color-mix(in srgb, #c98a00 6%, var(--surface)); }

/* ---------- hromadné obnovenie zostatkov ---------- */
.ov-pick {
  width: 16px; height: 16px; margin: 0; flex: none;
  accent-color: var(--accent); cursor: pointer;
}
tr.picked, .list-item.picked { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.ov-bulk-actions { margin-left: auto; gap: 8px; }
.ov-bulk-actions .btn:disabled { opacity: .5; cursor: default; }

/* ---------- 2FA dock (pravý dolný roh) ---------- */
.otp-dock {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 9500;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  width: min(360px, calc(100vw - 24px));
  max-height: min(80vh, 720px);
  overflow-y: auto;
  padding: 2px;
  scrollbar-width: thin;
}
.otp-card {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 12px 14px 10px;
  animation: otp-in .18s ease-out;
}
@keyframes otp-in {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: none; }
}
.otp-card.otp-flash { animation: otp-flash .8s ease-out; }
@keyframes otp-flash {
  0%, 100% { box-shadow: var(--shadow-lg); }
  40% { box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-lg); }
}
.otp-head { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 6px; }
.otp-badge {
  font-size: 11px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase;
  color: var(--accent-text); background: var(--accent-soft);
  border-radius: 999px; padding: 2px 8px; white-space: nowrap;
}
.otp-title {
  font-size: 14px; line-height: 1.25; min-width: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  word-break: break-word;
}
.otp-x {
  margin-left: auto; flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 6px; border: 1px solid transparent;
  background: none; color: var(--fg-3); cursor: pointer;
}
.otp-x:hover { background: var(--surface-3); color: var(--fg); }
.otp-hint { margin: 0 0 8px; font-size: 12.5px; color: var(--fg-2); line-height: 1.35; }
.otp-form { display: flex; gap: 8px; align-items: stretch; }
.otp-input {
  flex: 1 1 auto; min-width: 0;
  font: 600 20px/1 var(--mono); letter-spacing: 6px; text-align: center;
  padding: 9px 10px; border-radius: var(--radius);
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--fg);
}
.otp-input:focus { outline: 2px solid var(--focus); outline-offset: 1px; background: var(--surface); }
.otp-foot { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.otp-channel { margin-left: auto; font-size: 11px; color: var(--fg-3); text-transform: uppercase; letter-spacing: .04em; }
.otp-msg { font-size: 12px; min-height: 15px; color: var(--fg-3); }
.otp-msg.bad { color: var(--neg); }
.otp-msg.ok { color: var(--pos); }
@media (max-width: 640px) {
  .otp-dock { right: 8px; left: 8px; bottom: 72px; width: auto; }
}

/* akcie v tabuľke stávok — vždy v jednom riadku, vpravo */
.bets-table td.bets-actions { text-align: right; white-space: nowrap; width: 1%; }
.bets-actions-in { display: inline-flex; gap: 4px; align-items: center; flex-wrap: nowrap; }
.bets-actions-in .btn { padding: 2px 8px; line-height: 1.3; }

/* proxy tabuľka: akcie vpravo pokope, hlavička sedí s riadkami */
.proxy-actions { text-align: right; white-space: nowrap; }
.proxy-actions .btn { margin-left: 4px; }

/* ---------- inbox (Nové zápasy) — tabuľka so zoradením a stránkovaním ---------- */
.inbox-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.inbox-search { max-width: 260px; }
.inbox-table-host { margin: 8px -2px 0; }
.inbox-table { width: 100%; }
.inbox-table th { padding: 6px 8px; white-space: nowrap; }
.inbox-th {
  background: none; border: 0; padding: 0; font: inherit; color: var(--fg-3);
  cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
  text-transform: uppercase; letter-spacing: .04em; font-size: 11px; font-weight: 700;
}
.inbox-th:hover { color: var(--fg); }
.inbox-th.on { color: var(--accent-text); }
.inbox-sort { font-size: 9px; }
.inbox-table td { padding: 8px; vertical-align: middle; }
.inbox-table tr.new { background: var(--accent-soft); }
.inbox-odds { font-variant-numeric: tabular-nums; font-weight: 750; }
.inbox-title-link { color: inherit; text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.inbox-title-link:hover { text-decoration: underline; }
.inbox-pager {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding-top: 10px; margin-top: 6px; border-top: 1px solid var(--border);
}
@media (max-width: 720px) {
  .inbox-tools { width: 100%; margin-left: 0; }
  .inbox-search { max-width: none; flex: 1; }
}
.inbox-head-link { white-space: nowrap; }
.inbox-table td:nth-child(4) { max-width: 220px; }

/* ---------- Emaily (IMAP náhľad) ---------- */
.mail-card { padding: 0; overflow: hidden; }
.mail-toolbar {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.mail-toolbar .input { max-width: 320px; }
.mail-split { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; min-height: 520px; }
.mail-list { border-right: 1px solid var(--border); overflow-y: auto; max-height: 70vh; }
.mail-item {
  display: grid; grid-template-columns: 10px 1fr auto; gap: 8px; align-items: start;
  width: 100%; text-align: left; padding: 10px 12px; background: none; border: 0;
  border-bottom: 1px solid var(--border); cursor: pointer; color: inherit; font: inherit;
}
.mail-item:hover { background: var(--surface-2); }
.mail-item.active { background: var(--accent-soft); }
.mail-item.unread .mail-subject { font-weight: 700; }
.mail-item.unread .mail-from { font-weight: 700; }
.mail-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; background: transparent; }
.mail-item.unread .mail-dot { background: var(--accent); }
.mail-item-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mail-from { font-size: 12.5px; color: var(--fg-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-subject { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-snippet { font-size: 11.5px; color: var(--fg-3); min-height: 14px; }
.mail-when { font-size: 11.5px; color: var(--fg-3); white-space: nowrap; }
.mail-preview { overflow-y: auto; max-height: 70vh; }
.mail-msg { padding: 16px 20px; }
.mail-msg-head { border-bottom: 1px solid var(--border); padding-bottom: 12px; margin-bottom: 14px; }
.mail-msg-head h2 { margin: 0 0 6px; font-size: 18px; }
.mail-msg-meta { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.mail-body {
  white-space: pre-wrap; word-break: break-word; font: 13.5px/1.55 var(--font);
  color: var(--fg); margin: 0;
}
.mail-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 60px 20px; color: var(--fg-3); text-align: center;
}
@media (max-width: 900px) {
  .mail-split { grid-template-columns: 1fr; }
  .mail-list { border-right: 0; border-bottom: 1px solid var(--border); max-height: 45vh; }
}

/* HTML náhľad mailu v iframe + nástroje */
.mail-tools { display: flex; gap: 6px; align-items: center; flex: none; }
.mail-html { width: 100%; border: 0; display: block; background: #fff; border-radius: 6px; min-height: 160px; }

/* ---------- karty s 2FA kódmi (pravý horný roh) ---------- */
.otp-codes {
  position: fixed; right: 16px; top: 16px; z-index: 9600;
  display: flex; flex-direction: column; gap: 10px;
  width: min(340px, calc(100vw - 24px));
  max-height: min(70vh, 640px); overflow-y: auto;
}
.otp-code-card {
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: 12px 14px; animation: otp-in .18s ease-out;
}
.otp-code-row { display: flex; align-items: center; gap: 8px; margin: 4px 0 8px; }
.otp-code-value {
  flex: 1; text-align: center; cursor: pointer; user-select: all;
  font: 700 34px/1.15 var(--mono); letter-spacing: 8px; padding: 8px 6px 8px 14px;
  border-radius: var(--radius); background: var(--accent-soft); color: var(--accent-text);
  border: 1px dashed color-mix(in srgb, var(--accent) 45%, transparent);
}
.otp-code-value:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.otp-code-value:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.otp-code-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.otp-code-left { font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .otp-codes { right: 8px; left: 8px; top: 8px; width: auto; }
  .otp-code-value { font-size: 28px; letter-spacing: 6px; }
}

/* ---------- panel s postupom (pravý dolný roh) ---------- */
.run-dock {
  position: fixed; right: 16px; bottom: 16px; z-index: 9500;
  display: flex; flex-direction: column-reverse; gap: 10px;
  width: min(360px, calc(100vw - 24px));
  pointer-events: none;
}
.run-card {
  pointer-events: auto;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: 12px 14px; animation: run-in .18s ease-out;
}
.run-card.run-out { opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; }
.run-card.is-done { border-color: color-mix(in srgb, var(--pos) 55%, var(--border-strong)); }
.run-card.is-fail { border-color: color-mix(in srgb, var(--neg) 55%, var(--border-strong)); }
.run-head { display: flex; align-items: center; gap: 8px; }
.run-title { flex: 1; min-width: 0; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.run-state {
  font: 700 10.5px/1 var(--font); letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 7px; border-radius: 999px; background: var(--surface-2); color: var(--fg-3);
}
.run-state.done { background: color-mix(in srgb, var(--pos) 18%, transparent); color: var(--pos); }
.run-state.fail { background: color-mix(in srgb, var(--neg) 16%, transparent); color: var(--neg); }
.run-x { background: none; border: 0; color: var(--fg-3); cursor: pointer; padding: 2px; display: flex; }
.run-x:hover { color: var(--fg); }
.run-bar { height: 3px; border-radius: 2px; background: var(--surface-2); margin: 9px 0 8px; overflow: hidden; }
.run-bar-fill { display: block; height: 100%; width: 0; background: var(--accent); transition: width .25s ease; }
.run-card.is-done .run-bar-fill { background: var(--pos); }
.run-sub { display: block; margin-bottom: 8px; }
.run-rows { display: flex; flex-direction: column; gap: 6px; }
.run-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.run-row-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.run-row-detail { flex: none; }
.run-row-state { flex: none; font-variant-numeric: tabular-nums; }
.run-ico { width: 16px; height: 16px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.run-ico.ok { background: color-mix(in srgb, var(--pos) 18%, transparent); color: var(--pos); }
.run-ico.err { background: color-mix(in srgb, var(--neg) 16%, transparent); color: var(--neg); }
.run-ico.wait { border: 1.5px solid var(--border-strong); }
.run-spin {
  width: 14px; height: 14px; border-radius: 50%; flex: none; display: inline-block;
  border: 2px solid color-mix(in srgb, var(--accent) 25%, transparent);
  border-top-color: var(--accent); animation: run-spin .7s linear infinite;
}
@keyframes run-spin { to { transform: rotate(360deg); } }
@keyframes run-in { from { opacity: 0; transform: translateY(8px); } }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
/* na mobile hore, pod lištou — dole je tab bar */
@media (max-width: 900px) {
  .run-dock { left: 12px; right: 12px; top: calc(var(--topbar-h) + 8px + env(safe-area-inset-top)); bottom: auto; width: auto; }
}
/* keď beží panel s postupom, toasty sa posunú vyššie, aby sa neprekrývali */
@media (min-width: 901px) {
  body.has-run .toasts { bottom: calc(24px + var(--run-h, 140px)); }
}

/* upozornenie na ručné zápisy podaní */
.bets-note {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px; margin-bottom: 10px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--warn, #c47f17) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--warn, #c47f17) 35%, transparent);
  color: var(--fg); font-size: 13px;
}
.bets-note svg { color: var(--warn, #c47f17); flex: none; margin-top: 1px; }
.toast.warn { background: var(--warn, #c47f17); color: #fff; }
.bdock-live-row { cursor: pointer; }
.bdock-live-row:hover { background: var(--surface-2); }
/* akcie v tabuľke stávok: nikdy nezalamovať, nech sa „Podať" neodreže */
.bets-table .bets-actions-in { display: flex; gap: 6px; align-items: center; flex-wrap: nowrap; }
.bets-table th:last-child, .bets-table td.bets-actions { min-width: 170px; }
/* na užších oknách schovaj menej dôležité stĺpce, aby sa „Podať" vmestilo bez scrollu */
@media (max-width: 1500px) {
  .bets-table .col-when, .bets-table .col-profit { display: none; }
  /* skryjeme málo dôležité stĺpce a ostatné stiahneme, nech sa „Podať" vmestí */
  .bets-table { table-layout: auto; width: 100%; }
  .bets-table th:nth-child(3), .bets-table td:nth-child(3) { max-width: 250px; }
  .bets-table th:nth-child(5), .bets-table td:nth-child(5) { max-width: 170px; }
  .bets-table td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bets-table th:last-child, .bets-table td.bets-actions { white-space: nowrap; min-width: 170px; }
}
}
}
.bets-table th:last-child, .bets-table td.bets-actions { min-width: 172px; }
/* zúž zápas a výber — POZOR: <td> nesmie dostať display:inline-block,
   inak vypadne z tabuľkového layoutu a bunka sa posunie vyššie */
.bets-table td:nth-child(3) .bets-match { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bets-table td:nth-child(5) { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* stiahni zápas/výber a akcie, nech tabuľka stávok sedí bez scrollu */
.bets-table .bets-match { max-width: 200px; }
.bets-table th:nth-child(5), .bets-table td:nth-child(5) { max-width: 130px; }
.bets-table th:last-child, .bets-table td.bets-actions { min-width: 150px; }
.bets-table td:nth-child(3) .bets-match { max-width: 168px; }
.bets-verify { margin: 0 0 8px 2px; }
