/* Personal ledger: a self-contained light workspace, independent of the
   terminal theme selected by the session. Shared registration styles remain
   unchanged on the comparator. */
.bj-page {
  color-scheme: light;
  --bg: #f3f6fa;
  --surface-1: #fff;
  --surface-2: #f7f9fc;
  --surface-3: #edf2f8;
  --surface-hover: #edf3fb;
  --surface-sel: #e5eefc;
  --border: #dce3ed;
  --border-strong: #b8c6d9;
  --text: #19304f;
  --text-2: #52637a;
  --text-3: #5c6d83;
  --accent: #315ca5;
  --accent-weak: #eaf1fc;
  --pos: #176c48;
  --pos-bg: #eaf7f0;
  --pos-border: #badfc9;
  --warn: #805814;
  --warn-bg: #fff5de;
  --warn-border: #edd6a2;
  --neg: #b33442;
  --neg-bg: #fff0f1;
  --neg-border: #edc5cc;
  --info-bg: #edf3fb;
  --scrollbar: #c2ccda;
  --skeleton: linear-gradient(90deg, #edf2f8 25%, #e2e9f2 37%, #edf2f8 63%);
  --shadow-1: 0 1px 3px #213e6010;
  --shadow-2: 0 12px 32px #213e6020;
  --fs-md: 15px;
  --fs-sm: 13px;
  --fs-xs: 13px;
  --control-h: 38px;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  height: auto;
  font-size: 15px;
  line-height: 1.5;
}
.bj-page .topbar {
  height: auto;
  min-height: 64px;
  padding: 12px clamp(18px, 3vw, 48px);
  gap: 26px;
  background: #fff;
  box-shadow: 0 1px 0 #19304f04;
}
.bj-page .brand { color: #19304f; font-size: 15px; gap: 9px; }
.bj-page .brand .mark { width: 24px; height: 24px; background: #315ca5; border-radius: 7px; }
.bj-page .navlinks { gap: 6px; }
.bj-page .navlinks a { padding: 8px 12px; font-size: 14px; border-radius: 7px; white-space: nowrap; }
.bj-page .navlinks a[aria-current="page"] { background: #eaf1fc; color: #244f97; font-weight: 700; }
.bj-page #betsAccount { min-width: 0; }
.bj-page #betsAccount .chip { max-width: 260px; overflow: hidden; text-overflow: ellipsis; font-size: 13px; padding: 3px 9px; background: #f3f6fa; color: #52637a; border-color: #dce3ed; }
.bj-page #betsAccount .btn { height: 32px; font-size: 13px; }
.bj-skip { position: fixed; top: -70px; left: 16px; z-index: 1000; padding: 10px 16px; background: white; border: 2px solid #315ca5; border-radius: 6px; }
.bj-skip:focus { top: 8px; }
.bj-page .bj-main { max-width: 1488px; padding: 30px 32px 48px; margin: 0 auto; }
.bj-page .bj-heading { align-items: center; gap: 24px; margin-bottom: 24px; }
.bj-page .bj-main h1 { font-size: clamp(25px, 2.4vw, 30px); font-weight: 750; letter-spacing: -.025em; line-height: 1.25; margin: 0 0 8px; }
.bj-page .bj-subtitle { color: #52637a; font-size: 14px; max-width: 68ch; margin: 0; }
.bj-page .bj-heading-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.bj-page .bj-main button, .bj-page .bj-main select, .bj-page .bj-main input, .bj-page .bj-main .bj-export, .bj-page .bj-heading-actions a {
  border: 1px solid #cbd6e5;
  border-radius: 7px;
  padding: 9px 12px;
  min-height: 40px;
  background: #fff;
  color: #284b7b;
  font-size: 14px;
  line-height: 1.4;
}
.bj-page .bj-heading-actions a { display: inline-flex; align-items: center; text-decoration: none; font-weight: 600; white-space: nowrap; }
.bj-page .bj-main button:hover:not(:disabled), .bj-page .bj-main .bj-export:hover { background: #f0f5fc; border-color: #9eafd0; }
.bj-page .bj-main button:disabled { opacity: .5; cursor: not-allowed; }
.bj-page .bj-primary { background: #315ca5 !important; color: #fff !important; border-color: #315ca5 !important; }
.bj-page .bj-primary:hover { background: #244b90 !important; }
.bj-page .bj-summary { gap: 16px; margin: 0 0 24px; }
.bj-page .bj-stat { padding: 18px 20px; border: 1px solid #dce3ed; border-radius: 11px; box-shadow: var(--shadow-1); }
.bj-page .bj-stat small { font-size: 13px; line-height: 1.5; color: #52637a; }
.bj-page .bj-stat small:first-child { font-size: 14px; font-weight: 600; }
.bj-page .bj-stat strong { margin: 6px 0; font-size: clamp(24px, 2.2vw, 29px); color: #19304f; font-weight: 750; line-height: 1.25; font-variant-numeric: tabular-nums; }
.bj-page .bj-stat--positive strong { color: #176c48; }
.bj-page .bj-stat--negative strong { color: #b33442; }
.bj-page .bj-filters { display: grid; grid-template-columns: minmax(180px, 1.8fr) minmax(145px, 1fr) minmax(155px, 1fr) minmax(140px, .85fr) minmax(140px, .85fr) auto; gap: 12px; background: #fff; padding: 18px 20px; border: 1px solid #dce3ed; border-radius: 11px; margin: 0 0 24px; }
.bj-page .bj-filters .bj-field:first-child { min-width: 0; }
.bj-page .bj-field { gap: 6px; font-size: 13px; }
.bj-page .bj-field > span { color: #415775; font-weight: 600; }
.bj-page .bj-filters input, .bj-page .bj-filters select { height: 40px; width: 100%; }
.bj-page .bj-main input::placeholder { color: #64738a; opacity: 1; }
.bj-page .bj-filter-reset { color: #52637a !important; }
.bj-page .bj-register { background: #fff; border: 1px solid #dce3ed; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-1); }
.bj-page .bj-register-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 22px 14px; }
.bj-page .bj-register-heading h2 { font-size: 18px; font-weight: 700; }
.bj-page .bj-register-heading > span { color: #52637a; font-size: 13px; }
.bj-page .bj-register > .bj-filters { margin: 0 22px 18px; padding: 15px; background: #f7f9fc; border-color: #e2e8f1; border-radius: 8px; }
.bj-page .bj-register > .bj-error { margin-inline: 22px; }
.bj-page .bj-register-count { font-variant-numeric: tabular-nums; }
.bj-page .bj-list-tools { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0 22px 15px; flex-wrap: wrap; }
.bj-page .bj-status { margin: 0; color: #52637a; font-size: 13px; }
.bj-page .bj-explanation { max-width: 660px; color: #52637a; font-size: 13px; }
.bj-page .bj-explanation summary { cursor: pointer; color: #315ca5; text-decoration: underline; text-underline-offset: 3px; }
.bj-page .bj-explanation p { padding-top: 8px; line-height: 1.6; }
.bj-page .bj-list-head, .bj-page .bj-row { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(330px, .75fr) 164px; gap: 24px; }
.bj-page .bj-list-head { padding: 11px 22px; background: #f6f8fc; border-block: 1px solid #e2e8f1; font-size: 13px; color: #52637a; font-weight: 650; }
.bj-page .bj-list { gap: 0; }
.bj-page .bj-row { background: #fff; border: 0; border-radius: 0; padding: 20px 22px; border-bottom: 1px solid #e5ebf3; align-items: center; box-shadow: none; }
.bj-page .bj-row:last-child { border-bottom: 0; }
.bj-page .bj-row:hover { background: #fbfcff; }
.bj-page .bj-row-detail, .bj-page .bj-row-numbers { min-width: 0; }
.bj-page .bj-row-top { align-items: flex-start; flex-wrap: wrap; justify-content: flex-start; gap: 7px 12px; }
.bj-page .bj-event { font-size: 16px; font-weight: 700; line-height: 1.4; color: #19304f; overflow-wrap: anywhere; }
.bj-page .bj-book { display: inline-block; font-size: 13px; font-weight: 700; color: #315ca5; }
.bj-page .bj-row-context { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.bj-page .bj-row-context > span + span::before { content: "\00b7"; margin-right: 8px; color: #5c6d83; }
.bj-page .bj-market { font-size: 14px; font-weight: 600; color: #284567; line-height: 1.5; margin: 6px 0 4px; overflow-wrap: anywhere; }
.bj-page .bj-meta { font-size: 13px; line-height: 1.5; color: #5c6d83; overflow-wrap: anywhere; }
.bj-page .bj-row-detail > .bj-meta { margin-top: 3px; }
.bj-page .bj-financial { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; font-size: 16px; font-variant-numeric: tabular-nums; }
.bj-page .bj-financial small { font-size: 13px; color: #52637a; line-height: 1.4; min-height: 2.8em; margin-bottom: 5px; }
.bj-page .bj-financial b { font-size: 17px; font-weight: 700; line-height: 1.4; white-space: nowrap; }
.bj-page .bj-row-numbers > .bj-meta { margin-top: 12px; padding-top: 9px; border-top: 1px solid #e5ebf3; }
.bj-page .bj-result { display: inline-flex; align-items: center; border-radius: 5px; padding: 3px 8px; background: #edf2f8; color: #445b78; border: 1px solid #d8e2ef; font-size: 13px; line-height: 1.5; font-weight: 600; }
.bj-page .bj-result--won, .bj-page .bj-result--half-won { background: #eaf7f0; color: #176c48; border-color: #c4e5d3; }
.bj-page .bj-result--lost, .bj-page .bj-result--half-lost { background: #fff0f1; color: #b33442; border-color: #f0ccd2; }
.bj-page .bj-result--review { background: #fff5de; color: #805814; border-color: #edd6a2; }
.bj-page .bj-result--void, .bj-page .bj-result--cancelled { background: #f1f3f6; color: #586578; border-color: #dce1e8; }
.bj-page .bj-actions { flex-direction: column; align-items: stretch; gap: 7px; margin: 0; }
.bj-page .bj-actions button { font-size: 13px; padding: 7px 10px; min-height: 36px; }
.bj-page .bj-actions button + button { border-color: transparent; background: transparent; color: #63738a; font-weight: 400; }
.bj-page .bj-actions button + button:hover:not(:disabled) { border-color: #edc5cc; color: #a43241; background: #fff5f6; }
.bj-page .bj-profit-positive { color: #176c48; }
.bj-page .bj-profit-negative { color: #b33442; }
.bj-page .bj-pagination { margin: 0; padding: 16px 22px; border-top: 1px solid #e5ebf3; font-size: 13px; color: #52637a; }
.bj-page .bj-pagination button { font-size: 13px; min-height: 36px; padding: 7px 12px; }
.bj-page .bj-empty { padding: 48px 24px; border: 0; border-radius: 0; color: #19304f; }
.bj-page .bj-empty strong { font-size: 18px; }
.bj-page .bj-empty p { max-width: 56ch; margin: 10px auto 18px; }
.bj-page .bj-hint { font-size: 13px; color: #52637a; }
.bj-page .bj-error { font-size: 14px; padding: 12px 16px; border: 1px solid #edc5cc; background: #fff0f1; border-radius: 8px; margin-bottom: 16px; }
.bj-page .bj-dialog { font-size: 14px; width: min(480px, calc(100vw - 24px)); }
.bj-page .bj-dialog .bj-field, .bj-page .bj-dialog .bj-check, .bj-page .bj-dialog .bj-options, .bj-page .bj-context { font-size: 13px; }
.bj-page .bj-dialog input:not([type="checkbox"]), .bj-page .bj-dialog select { min-height: 38px; height: auto; }
.bj-page .bj-dialog .bj-field > span { font-weight: 500; }
.bj-page #loginGate .modal { border-radius: 12px; }
.bj-page #loginGate .modal > header, .bj-page #loginGate .modal > .body, .bj-page #loginGate .modal > footer { padding: 18px 20px; }
.bj-page #loginGate h2 { font-size: 19px; }
.bj-page #loginGate .field { gap: 6px; }
.bj-page #loginGate .field > label { text-transform: none; letter-spacing: 0; color: #415775; }
.bj-page .bj-main :focus-visible, .bj-page .bj-dialog :focus-visible, .bj-page .topbar :focus-visible { outline: 3px solid #5b80be; outline-offset: 3px; }
@media (max-width: 1180px) {
  .bj-page .bj-main { padding: 24px; }
  .bj-page .bj-filters { grid-template-columns: minmax(180px, 1.5fr) 1fr 1fr; }
  .bj-page .bj-list-head, .bj-page .bj-row { grid-template-columns: minmax(240px, 1fr) minmax(285px, .9fr) 142px; gap: 18px; }
  .bj-page .bj-financial { gap: 10px; }
  .bj-page .bj-financial b { font-size: 15px; }
}
@media (max-width: 940px) {
  .bj-page .topbar { gap: 14px; padding: 12px 20px; flex-wrap: wrap; }
  .bj-page .brand { font-size: 14px; }
  .bj-page .navlinks a { font-size: 13px; padding: 8px; }
  .bj-page #betsAccount .chip { max-width: 180px; }
  .bj-page .bj-heading { align-items: flex-start; }
  .bj-page .bj-heading-actions { flex-direction: column; align-items: stretch; }
  .bj-page .bj-summary { gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bj-page .bj-list-head { display: none; }
  .bj-page .bj-row { grid-template-columns: minmax(240px, 1fr) minmax(240px, .9fr); align-items: start; gap: 16px 24px; }
  .bj-page .bj-actions { grid-column: 1 / -1; flex-direction: row; justify-content: flex-end; padding-top: 12px; border-top: 1px solid #edf1f7; }
  .bj-page .bj-actions button { min-height: 38px; padding-inline: 16px; }
  .bj-page .bj-row-top { flex-direction: column; }
}
@media (max-width: 640px) {
  .bj-page .topbar { padding: 10px 14px; gap: 8px 12px; }
  .bj-page .topbar .brand .label { display: inline; }
  .bj-page .topbar .grow { display: none; }
  .bj-page .topbar .navlinks { order: 3; width: 100%; flex: auto; justify-content: flex-start; gap: 5px; }
  .bj-page .topbar .navlinks a { font-size: 13px; padding: 7px 10px; }
  .bj-page #betsAccount { margin-left: auto; }
  .bj-page #betsAccount .chip { display: none; }
  .bj-page .bj-main { padding: 22px 14px 32px; }
  .bj-page .bj-heading { display: block; margin-bottom: 20px; }
  .bj-page .bj-heading-actions { margin-top: 16px; flex-direction: row; flex-wrap: wrap; }
  .bj-page .bj-heading-actions a { font-size: 13px; }
  .bj-page .bj-main h1 { font-size: 26px; }
  .bj-page .bj-summary { gap: 10px; margin-bottom: 18px; }
  .bj-page .bj-stat { padding: 14px; }
  .bj-page .bj-stat strong { font-size: 23px; }
  .bj-page .bj-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 14px; gap: 12px; margin-bottom: 18px; }
  .bj-page .bj-filters .bj-field { min-width: 0; }
  .bj-page .bj-filters .bj-field:first-child { grid-column: 1 / -1; }
  .bj-page .bj-filters input, .bj-page .bj-filters select { font-size: 13px; padding-inline: 8px; }
  .bj-page .bj-filter-reset { grid-column: 1 / -1; }
  .bj-page .bj-register-heading { padding: 17px 16px 10px; }
  .bj-page .bj-register > .bj-filters { margin: 0 14px 16px; padding: 12px; }
  .bj-page .bj-register > .bj-error { margin-inline: 14px; }
  .bj-page .bj-register-heading h2 { font-size: 17px; }
  .bj-page .bj-list-tools { padding: 0 16px 16px; }
  .bj-page .bj-row { grid-template-columns: minmax(0, 1fr); padding: 18px 16px; gap: 14px; }
  .bj-page .bj-row-top { flex-direction: row; }
  .bj-page .bj-row-numbers { padding: 12px; background: #f6f8fc; border: 1px solid #e4eaf3; border-radius: 7px; }
  .bj-page .bj-financial { max-width: none; gap: 8px; }
  .bj-page .bj-financial b { font-size: 15px; white-space: normal; overflow-wrap: anywhere; }
  .bj-page .bj-financial small { font-size: 13px; }
  .bj-page .bj-actions { padding-top: 0; border-top: 0; flex-wrap: wrap; }
  .bj-page .bj-actions button { flex: 1; }
  .bj-page .bj-pagination { padding: 14px 12px; gap: 8px; flex-wrap: wrap; }
  .bj-page .bj-pagination button { padding-inline: 9px; }
  .bj-page .bj-pagination > span { font-size: 13px; }
}
/* Singole / Multiple: tabs and the multiples register (same light workspace as above). */
.bj-page .bj-pane[hidden], .bj-page .bjm-legs[hidden] { display: none !important; }
.bj-page .bj-tabs { display: flex; gap: 6px; margin: 0 0 22px; border-bottom: 1px solid #dce3ed; overflow-x: auto; }
.bj-page .bj-main button.bj-tab { border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: transparent; padding: 10px 18px; min-height: 44px; font-size: 15px; font-weight: 600; color: #52637a; margin-bottom: -1px; white-space: nowrap; }
.bj-page .bj-main button.bj-tab:hover:not(:disabled) { background: #f0f5fc; border-color: transparent; }
.bj-page .bj-main button.bj-tab.is-active { color: #244f97; border-bottom-color: #315ca5; font-weight: 700; }
.bj-page .bjm-item { border-bottom: 1px solid #e5ebf3; }
.bj-page .bjm-item:last-child { border-bottom: 0; }
.bj-page .bjm-item > .bj-row { border-bottom: 0; }
.bj-page .bjm-filters { grid-template-columns: minmax(180px, 280px) auto; align-items: end; }
.bj-page .bjm-filters .bj-filter-reset { justify-self: start; }
.bj-page .bjm-legs { display: grid; margin: 0 22px 20px; border: 1px solid #e2e8f1; border-radius: 8px; background: #f7f9fc; overflow: hidden; }
.bj-page .bjm-leg { display: grid; grid-template-columns: minmax(220px, 1.4fr) 92px minmax(190px, 1fr) minmax(240px, 1.1fr); gap: 18px; padding: 16px; border-bottom: 1px solid #e2e8f1; align-items: start; }
.bj-page .bjm-leg-event b { font-size: 14px; line-height: 1.5; color: #19304f; overflow-wrap: anywhere; }
.bj-page .bjm-leg-event .bj-meta { margin-top: 3px; }
.bj-page .bjm-leg-odds small { display: block; font-size: 13px; color: #52637a; margin-bottom: 4px; }
.bj-page .bjm-leg-odds b { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bj-page .bjm-leg-result, .bj-page .bjm-leg-lay { display: grid; gap: 8px; justify-items: start; min-width: 0; }
.bj-page .bjm-leg-result .bj-field, .bj-page .bjm-leg-lay .bj-field { width: 100%; min-width: 0; }
.bj-page .bjm-leg-result select, .bj-page .bjm-leg-lay input { width: 100%; min-width: 0; }
.bj-page .bjm-leg-lay { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bj-page .bjm-leg-lay > .bj-meta { grid-column: 1 / -1; }
.bj-page .bjm-warn { color: #805814; }
.bj-page .bjm-legs-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 16px; }
.bj-page .bjm-legs-actions .bj-meta { margin: 0; }
@media (max-width: 1180px) {
  .bj-page .bjm-leg { grid-template-columns: minmax(200px, 1fr) minmax(200px, 1fr); }
  .bj-page .bjm-leg-odds { grid-column: 2; grid-row: 1; }
}
@media (max-width: 640px) {
  .bj-page .bjm-filters { grid-template-columns: minmax(0, 1fr); }
  .bj-page .bjm-legs { margin: 0 14px 16px; }
  .bj-page .bjm-leg { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .bj-page .bjm-leg-odds { grid-column: auto; grid-row: auto; }
  .bj-page .bj-main button.bj-tab { padding-inline: 14px; font-size: 14px; }
}
