/* ── Fonts ──────────────────────────────────────────────────────────────── */
/* Inter — latin */
@font-face {
  font-family: "Site Font";
  src: url("/static/fonts/inter-eng.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                 U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
                 U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Inter — cyrillic */
@font-face {
  font-family: "Site Font";
  src: url("/static/fonts/inter-russ.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* ── Reset & tokens — Silver Way "Ice" ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* surfaces */
  --bg:      #2A3F52;   /* page / main area           */
  --s1:      #22364A;   /* header, sidebar, slip, menus */
  --s2:      #304961;   /* cards, inputs               */
  --s3:      #385571;   /* odds buttons, raised        */
  --s4:      #41607C;   /* hover on raised             */
  --border:  #3D5973;
  --line:    rgba(173, 205, 230, .10);   /* hairline separators */

  /* text: light, slightly blue silver */
  --text:        #D3E0EA;
  --text-strong: #EAF1F6;
  --muted:       #8FA6BA;
  --faint:       #6A8399;

  /* accent: ice blue */
  --accent:      #8EC9F2;
  --accent2:     #A9D6F6;
  --accent-ink:  #14283A;
  --accent-soft: rgba(142, 201, 242, .14);
  --accent-line: rgba(142, 201, 242, .45);

  /* status */
  --green:       #7FD8B0;
  --green-soft:  rgba(127, 216, 176, .14);
  --red:         #F29A9A;
  --red-soft:    rgba(242, 154, 154, .14);
  --yellow:      #F2CF8A;
  --yellow-soft: rgba(242, 207, 138, .14);

  --radius:    10px;
  --radius-sm: 8px;
  --radius-lg: 14px;
  --shadow:    0 12px 32px rgba(9, 20, 31, .38);
  --shadow-sm: 0 4px 14px rgba(9, 20, 31, .28);
  --ease:      cubic-bezier(.2, .7, .2, 1);
  --header-h:  62px;   /* header +10% (2026-10-11) */
}

html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Site Font", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
::selection { background: rgba(142, 201, 242, .30); color: var(--text-strong); }

button { cursor: pointer; border: none; outline: none; background: none; font-size: inherit; color: inherit; touch-action: manipulation; }
button, input, select, textarea { font-family: inherit; }
a { touch-action: manipulation; }

/* keyboard focus — visible, but never on mouse click */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
/* text fields have their own focus border + glow — a second ring around them looked doubled */
input:not([type="checkbox"]):not([type="radio"]):focus-visible, textarea:focus-visible, select:focus-visible { outline: none; }

input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }

/* thin scrollbars everywhere */
* { scrollbar-width: thin; scrollbar-color: var(--s3) transparent; }
*::-webkit-scrollbar { width: 6px; height: 6px; }
*::-webkit-scrollbar-thumb { background: var(--s3); border-radius: 3px; }
*::-webkit-scrollbar-track { background: transparent; }

/* ── Motion ─────────────────────────────────────────────────────────────── */
@keyframes sw-fade  { from { opacity: 0; } to { opacity: 1; } }
@keyframes sw-pop   { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes sw-drop  { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes sw-sheet { from { opacity: .6; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes sw-toast { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ── Icons ──────────────────────────────────────────────────────────────── */
.ic {
  display: inline-block;
  width: 1.15em; height: 1.15em;
  vertical-align: -0.2em;
  flex: 0 0 auto;
  -webkit-user-select: none; user-select: none;
}
.ic-lg { width: 40px; height: 40px; vertical-align: middle; }
.ic-xl { width: 48px; height: 48px; vertical-align: middle; }
.lang-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px; padding: 1px 5px; border-radius: 5px;
  background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; letter-spacing: .5px;
}

/* ── Announcement banners ───────────────────────────────────────────────── */
.ann-overlay {
  position: fixed; inset: 0; background: rgba(12, 22, 32, .66);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; z-index: 3000; padding: 20px;
  animation: sw-fade .18s ease;
}
.ann-modal {
  background: var(--s1); border: 1px solid var(--border); border-radius: 16px;
  max-width: 460px; width: 100%; max-height: 90vh; overflow: auto; position: relative;
  box-shadow: var(--shadow);
  animation: sw-pop .24s var(--ease);
}
.ann-close {
  position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 50%;
  background: rgba(20, 34, 48, .7); display: flex; align-items: center; justify-content: center; z-index: 2;
  transition: background .15s;
}
.ann-close:hover { background: rgba(20, 34, 48, .9); }
.ann-close .ic { width: 16px; height: 16px; }
.ann-modal-img { width: 100%; display: block; border-radius: 16px 16px 0 0; }
.ann-modal-text { padding: 16px 18px; font-size: 15px; line-height: 1.6; color: var(--text); white-space: pre-wrap; }

/* ── Inputs ─────────────────────────────────────────────────────────────── */
input {
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--s2);
  color: var(--text-strong); font-size: 14px; padding: 10px 12px; outline: none; width: 100%;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input::placeholder { color: var(--faint); }
input:hover { border-color: #4A6884; }
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* show/hide password */
.pw-wrap { position: relative; display: block; width: 100%; }
.pw-wrap input { padding-right: 44px; }
.pw-wrap input::-ms-reveal, .pw-wrap input::-ms-clear { display: none; }   /* Edge's own eye — avoid two */
.pw-eye { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); width: 32px; height: 32px;
          border-radius: 8px; color: var(--muted); display: flex; align-items: center; justify-content: center;
          transition: color .15s, background .15s; }
.pw-eye:hover { color: var(--text-strong); background: var(--s3); }
.pw-eye:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.pw-eye svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ── Login overlay ──────────────────────────────────────────────────────── */
.login-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background:
    radial-gradient(900px 520px at 50% -8%, rgba(142, 201, 242, .12), transparent 62%),
    var(--bg);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.login-box {
  background: var(--s1);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 36px 32px 30px;
  width: 380px;
  display: flex; flex-direction: column; gap: 20px;
  box-shadow: var(--shadow);
  animation: sw-pop .32s var(--ease);
}
#loginForm, #registerForm, #forgotForm { display: flex; flex-direction: column; gap: 16px; }
.login-brand { display: flex; align-items: center; gap: 10px; justify-content: center; }
.login-logo  { width: 48px; height: 48px; border-radius: 12px; background: var(--accent);
               display: flex; align-items: center; justify-content: center;
               font-weight: 800; font-size: 16px; color: var(--accent-ink); }
.login-name  { font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
.login-brand-logo { height: 60px; width: auto; display: block; }
.login-title { font-size: 18px; font-weight: 600; text-align: center; color: var(--text-strong); }
.login-form  { display: flex; flex-direction: column; gap: 12px; }
.login-error { color: var(--red); font-size: 13px; text-align: center; }
.btn-login {
  width: 100%; padding: 12px; border-radius: var(--radius);
  background: var(--accent); color: var(--accent-ink);
  font-size: 15px; font-weight: 700; letter-spacing: .01em;
  transition: background .15s, transform .1s, opacity .15s;
}
.btn-login:hover    { background: var(--accent2); }
.btn-login:active   { transform: scale(.985); }
.btn-login:disabled { opacity: .55; cursor: default; transform: none; }
.login-hint   { font-size: 12px; color: var(--muted); text-align: center; line-height: 1.5; }

/* ── Shared buttons ─────────────────────────────────────────────────────── */
.btn-primary {
  padding: 9px 18px; border-radius: var(--radius);
  background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 600;
  transition: background .15s, transform .1s; border: none; cursor: pointer;
}
.btn-primary:hover    { background: var(--accent2); }
.btn-primary:active   { transform: scale(.98); }
.btn-primary:disabled { opacity: .5; cursor: default; transform: none; }

.btn-ghost {
  padding: 9px 16px; border-radius: var(--radius);
  background: transparent; border: 1px solid var(--border);
  color: var(--text); font-size: 13px; transition: background .15s, border-color .15s, color .15s; cursor: pointer;
}
.btn-ghost:hover { background: var(--s2); border-color: #4A6884; color: var(--text-strong); }
.login-switch { font-size: 13px; color: var(--muted); text-align: center; }
.login-switch a { color: var(--accent); text-decoration: none; }
.login-switch a:hover { text-decoration: underline; }
.login-success { color: var(--green); font-size: 13px; text-align: center; }

/* ── Header ─────────────────────────────────────────────────────────────── */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  background: var(--s1);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; padding: 0 20px; gap: 20px;
}
.header-brand { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.header-logo  { width: 32px; height: 32px; border-radius: 8px; background: var(--accent);
                display: flex; align-items: center; justify-content: center;
                font-weight: 800; font-size: 11px; color: var(--accent-ink); letter-spacing: -.5px; }
.header-name  { font-size: 17px; font-weight: 700; letter-spacing: -.3px; }
.header-name  span { color: var(--accent); }
.brand-logo   { height: 38px; width: auto; display: block; }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.balance-label { color: var(--muted); font-size: 13.75px; }
.balance-val   { color: var(--text-strong); font-weight: 600; font-size: 15.4px; min-width: 106px;
                 font-variant-numeric: tabular-nums; margin-right: 6px; }

.slip-toggle-btn {
  display: flex; align-items: center; gap: 6px;
  background: var(--s2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 6px 12px;
  color: var(--text); font-size: 13px; transition: border-color .15s;
}
.slip-toggle-btn:hover { border-color: var(--accent-line); }
.slip-badge {
  background: var(--accent); color: var(--accent-ink); border-radius: 10px;
  padding: 1px 6px; font-size: 11px; font-weight: 700;
}
.header-username { font-size: 13px; color: var(--muted); }

/* secondary header actions: quiet until hovered */
.hdr-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 13px; border-radius: var(--radius); font-size: 14.3px; font-weight: 500;
  border: 1px solid transparent; background: transparent; color: var(--muted);
  transition: background .15s, color .15s, border-color .15s;
}
.hdr-btn:hover { background: var(--s2); color: var(--text-strong); }
/* primary action */
.hdr-deposit { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.hdr-deposit:hover { background: var(--accent2); color: var(--accent-ink); }
.hdr-withdraw { border-color: var(--border); color: var(--text); }
.hdr-withdraw:hover { border-color: #4A6884; }
.hdr-session:hover   { color: var(--accent); }
.hdr-session.sess-plus  { color: var(--green); border-color: rgba(127, 216, 176, .35); }
.hdr-session.sess-minus { color: var(--red);   border-color: rgba(242, 154, 154, .35); }

/* Session modal content */
.sess-summary {
  display: flex; gap: 22px; flex-wrap: wrap;
  background: var(--s2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px;
}
.sess-stat { display: flex; flex-direction: column; gap: 2px; }
.sess-stat-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.sess-stat-val   { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sess-stat-val.plus  { color: var(--green); }
.sess-stat-val.minus { color: var(--red); }
.sess-stat-val.neutral { color: var(--text-strong); }
.sess-commission-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--radius);
  font-size: 12px; font-weight: 600; margin-bottom: 10px;
}
.sess-commission-badge.free { background: var(--green-soft);  color: var(--green);  border: 1px solid rgba(127, 216, 176, .35); }
.sess-commission-badge.paid { background: var(--yellow-soft); color: var(--yellow); border: 1px solid rgba(242, 207, 138, .35); }
.sess-no-bets { color: var(--muted); font-size: 13px; text-align: center; padding: 18px; line-height: 1.6; }
.sess-bets-title { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em;
                   color: var(--muted); margin-bottom: 6px; }

.btn-logout-top {
  background: transparent; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 6px 10px; color: var(--muted); font-size: 13px; transition: .15s;
}
.btn-logout-top:hover { border-color: var(--red); color: var(--red); }

/* ── App layout ─────────────────────────────────────────────────────────── */
.app-shell { display: flex; flex-direction: column; height: 100vh; }
.app-layout {
  margin-top: var(--header-h);
  display: grid;
  grid-template-columns: 228px 1fr 312px;
  height: calc(100vh - var(--header-h));
  overflow: hidden;
}

/* ── Sidebar ────────────────────────────────────────────────────────────── */
.sidebar {
  background: var(--s1);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.sport-tabs {
  display: flex; flex-direction: column; gap: 2px;
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
}
.sport-tab {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 13.5px; font-weight: 500;
  text-align: left;
  transition: background .15s, color .15s;
}
.sport-tab:hover  { background: var(--s2); color: var(--text-strong); }
.sport-tab.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.sidebar-search {
  display: flex; align-items: center; gap: 8px;
  margin: 10px 10px 6px; padding: 2px 10px;
  background: var(--s2); border: 1px solid transparent; border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
}
.sidebar-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-ico { width: 15px; height: 15px; color: var(--faint); flex-shrink: 0; }
.sidebar-search input {
  padding: 6px 2px; font-size: 13px; border: none; background: transparent;
  color: var(--text); box-shadow: none;
}
.sidebar-search input:focus, .sidebar-search input:hover { border-color: transparent; box-shadow: none; }

.leagues-list { flex: 1; overflow-y: auto; padding: 4px 8px 12px; }

.league-item {
  padding: 8px 12px; border-radius: var(--radius-sm);
  font-size: 13px; cursor: pointer; color: var(--muted);
  transition: background .12s, color .12s;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.league-item:hover  { background: var(--s2); color: var(--text-strong); }
.league-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
/* own (exclusive) leagues */
.league-item.exclusive {
  color: var(--text);
  display: flex; align-items: center; gap: 8px;
  box-shadow: inset 2px 0 0 var(--accent);
}
.league-item.exclusive:hover  { background: var(--s2); }
.league-item.exclusive.active { background: var(--accent-soft); color: var(--accent); }
.excl-badge {
  margin-left: auto; flex: 0 0 auto;
  background: var(--accent-soft); color: var(--accent);
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .4px; padding: 2px 7px; border-radius: 999px;
}

.s-placeholder { padding: 16px; color: var(--muted); font-size: 13px; }

/* ── Main area ──────────────────────────────────────────────────────────── */
.main-area { overflow-y: auto; background: var(--bg); }
.main-empty { display: flex; align-items: center; justify-content: center;
              height: 100%; color: var(--muted); font-size: 15px; padding: 24px; text-align: center; }

.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 14px;
  color: var(--muted); font-size: 13px; margin: 14px 16px 6px;
  transition: .15s; width: fit-content;
}
.back-btn:hover { color: var(--text-strong); background: var(--s2); }

/* ── Match cards ────────────────────────────────────────────────────────── */
.matches-header {
  padding: 16px 18px 6px;
  font-size: 13px; color: var(--muted);
  display: flex; align-items: center; gap: 8px;
}
.matches-count { font-weight: 600; color: var(--text-strong); }

.match-card {
  background: var(--s2);
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  margin: 10px 16px;
  overflow: hidden;
  transition: border-color .18s, box-shadow .18s;
}
.match-card:hover { border-color: var(--line); box-shadow: var(--shadow-sm); }

.match-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
  gap: 10px;
}
.match-teams { font-size: 14px; font-weight: 600; flex: 1; min-width: 0; color: var(--text-strong);
               white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match-head:hover .match-teams { color: var(--accent); }
.match-time  { font-size: 12px; color: var(--muted); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.match-live-badge {
  background: var(--red); color: #3A1A1F; border-radius: 5px;
  padding: 2px 7px; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; flex-shrink: 0;
}
.match-type-badge {
  background: var(--accent-soft); color: var(--accent); border-radius: 5px;
  padding: 2px 7px; font-size: 11px; font-weight: 600; flex-shrink: 0; margin-left: 4px;
}
.match-markets { padding: 0 16px 14px; }

/* ── Markets & odds ─────────────────────────────────────────────────────── */
.market-block { margin-top: 12px; }
.market-name  { font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
                color: var(--muted); margin-bottom: 7px; font-weight: 500; }

.ml-row { display: flex; gap: 6px; }
.ml-btn {
  flex: 1; padding: 8px 6px; border-radius: var(--radius-sm);
  background: var(--s3); border: 1px solid transparent;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  cursor: pointer; font-size: 12px;
  transition: background .15s, border-color .15s, transform .08s;
}
.ml-btn:hover  { background: var(--s4); }
.ml-btn:active { transform: scale(.97); }
.ml-btn.active { background: var(--accent); border-color: var(--accent); }
.ml-btn.active .ml-lbl, .ml-btn.active .ml-odds { color: var(--accent-ink); }
.ml-btn.locked { opacity: .45; cursor: default; transform: none; }
.ml-lbl  { color: var(--muted); font-size: 11px; }
.ml-odds { font-weight: 700; font-size: 14px; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.ml-odds.locked { color: var(--muted); }

.lines-tbl  { width: 100%; border-collapse: collapse; table-layout: fixed; }
.lines-tbl th {
  font-size: 11.5px; color: var(--muted); font-weight: 500;
  text-align: center; padding: 6px 8px;
  border-bottom: 1px solid var(--line);
}
.lines-tbl td { padding: 3px 4px; width: 50%; }
.lines-tbl tr:not(:last-child) td { border-bottom: 1px solid var(--line); }

/* Event detail */
.event-head   { padding: 14px 18px 6px; }
.event-teams  { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; color: var(--text-strong); letter-spacing: -.2px; }
.event-time   { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }

/* Direct WS connection indicator on a live match */
.live-conn { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; margin-top: 4px; }
.lc-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.lc-dot.ok   { background: var(--green); animation: lc-pulse 1.8s infinite; }
.lc-dot.wait { background: var(--accent); animation: lc-blink 1s infinite; }
@keyframes lc-blink { 50% { opacity: .25; } }
@keyframes lc-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(127, 216, 176, .55); }
  70%  { box-shadow: 0 0 0 6px rgba(127, 216, 176, 0); }
  100% { box-shadow: 0 0 0 0 rgba(127, 216, 176, 0); }
}

/* YouTube stream for own-league matches */
#streamBlock:empty { display: none; }
.stream-embed {
  position: relative; width: 100%; max-width: 760px; margin: 8px 16px 4px;
  aspect-ratio: 16 / 9; background: #0E1A26; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--line);
}
.stream-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.stream-banner {
  display: flex; align-items: center; gap: 12px; margin: 8px 16px 4px;
  max-width: 760px; padding: 12px 16px; border-radius: var(--radius-lg);
  background: var(--accent-soft); border: 1px solid var(--accent-line);
}
.stream-banner-ic { font-size: 24px; line-height: 1; }
.stream-banner-t  { font-size: 13.5px; font-weight: 600; color: var(--text-strong); }
.stream-banner-s  { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
@media (max-width: 768px) {
  .stream-embed, .stream-banner { margin-left: 10px; margin-right: 10px; }
}

/* Period tabs: pills */
.period-tabs-wrap {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding: 10px 16px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px;
}
.period-tab {
  padding: 6px 14px; font-size: 12px; font-weight: 600;
  color: var(--muted); border-radius: 999px;
  transition: background .15s, color .15s; white-space: nowrap;
}
.period-tab:hover  { color: var(--text-strong); background: var(--s2); }
.period-tab.active { color: var(--accent-ink); background: var(--accent); }

.markets-wrap { padding: 4px 16px 18px; }

/* Show more / hide */
.show-more-btn {
  display: block; width: 100%; padding: 8px; margin-top: 4px;
  background: transparent; border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted); font-size: 12px; text-align: center;
  cursor: pointer; transition: .15s;
}
.show-more-btn:hover { color: var(--text-strong); background: var(--s2); border-style: solid; }

.out-btn {
  display: flex; flex-direction: column; align-items: center;
  padding: 6px 8px; border-radius: var(--radius-sm);
  background: var(--s3); border: 1px solid transparent;
  cursor: pointer; width: 100%; font-size: 12px;
  transition: background .15s, border-color .15s, transform .08s;
}
.out-btn:hover  { background: var(--s4); }
.out-btn:active { transform: scale(.97); }
.out-btn.active { background: var(--accent); border-color: var(--accent); }
.out-btn.active .out-lbl, .out-btn.active .out-odds { color: var(--accent-ink); }
.out-btn.locked { opacity: .45; cursor: default; transform: none; }
.out-lbl  { color: var(--muted); font-size: 11px; white-space: nowrap; }
.out-odds { font-weight: 700; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.out-odds.locked { color: var(--muted); }

.out-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }

/* ── Bet slip ───────────────────────────────────────────────────────────── */
.betslip-col {
  background: var(--s1);
  border-left: 1px solid var(--line);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.betslip-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 14px; border-bottom: 1px solid var(--line);
}
.betslip-title { font-weight: 600; font-size: 15px; color: var(--text-strong); }
.betslip-cnt {
  background: var(--accent); color: var(--accent-ink); border-radius: 10px;
  min-width: 22px; text-align: center;
  padding: 1px 7px; font-size: 12px; font-weight: 700;
}
.betslip-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }
.betslip-empty { padding: 40px 20px; color: var(--muted); font-size: 13px;
                 text-align: center; line-height: 1.7; }

.slip-item { border-bottom: 1px solid var(--line); padding: 16px 18px; animation: sw-drop .2s var(--ease); }
.slip-teams  { font-size: 12px; color: var(--muted); margin-bottom: 6px;
               white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slip-market { font-size: 13px; font-weight: 600; margin-bottom: 2px; color: var(--text-strong); }
.slip-odds-line { display: flex; align-items: center; justify-content: space-between; }
.slip-odds   { font-size: 20px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.slip-remove { color: var(--faint); font-size: 18px; line-height: 1; width: 28px; height: 28px; border-radius: 50%;
               display: inline-flex; align-items: center; justify-content: center; transition: color .12s, background .12s; }
.slip-remove:hover { color: var(--red); background: var(--red-soft); }

.slip-amount-wrap { margin-top: 12px; position: relative; }
.slip-amount-wrap input { padding-right: 56px; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.slip-currency { position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
                 color: var(--muted); font-size: 12px; pointer-events: none; }
.slip-potential { margin-top: 10px; font-size: 12.5px; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.slip-potential strong { color: var(--green); font-variant-numeric: tabular-nums; }

.slip-footer { padding: 14px 18px 18px; border-top: 1px solid var(--line); }
.place-bet-btn {
  width: 100%; padding: 12px; border-radius: var(--radius);
  background: var(--accent); color: var(--accent-ink);
  font-size: 15px; font-weight: 700;
  transition: background .15s, transform .1s, opacity .15s;
}
.place-bet-btn:hover    { background: var(--accent2); }
.place-bet-btn:active   { transform: scale(.985); }
.place-bet-btn:disabled { opacity: .5; cursor: default; transform: none; }

.slip-msg { font-size: 12px; margin-top: 8px; text-align: center; min-height: 16px; }
.slip-msg.ok  { color: var(--green); }
.slip-msg.err { color: var(--red); }

@keyframes flash-odds {
  0%   { color: var(--yellow); }
  100% { color: var(--accent); }
}
.odds-changed { animation: flash-odds .8s ease; }

/* ── Toast ──────────────────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--s1); border: 1px solid var(--border);
  color: var(--text-strong); border-radius: 12px;
  padding: 11px 18px; font-size: 14px; z-index: 9000;
  box-shadow: var(--shadow);
  max-width: calc(100vw - 32px);
  animation: sw-toast .24s var(--ease);
}
.toast.hidden { display: none; }
.toast.toast-err { border-color: rgba(242, 154, 154, .55); color: var(--red); }
.toast.toast-ok  { border-color: rgba(127, 216, 176, .55); color: var(--green); }

/* ── Modal ──────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(12, 22, 32, .62);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 16px;
  animation: sw-fade .18s ease;
}
.modal {
  background: var(--s1); border: 1px solid var(--border); border-radius: 18px;
  padding: 24px; width: 420px; max-height: 90vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 16px;
  box-shadow: var(--shadow);
  animation: sw-pop .24s var(--ease);
}
.modal-wide { width: 500px; }
.modal-title { font-size: 17px; font-weight: 600; color: var(--text-strong); display: flex; align-items: center; gap: 8px; }
.modal-footer { display: flex; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); margin-top: 4px; }

/* Modal tabs: segmented */
.modal-tabs { display: flex; gap: 4px; padding: 4px; background: var(--s2); border-radius: 999px; width: fit-content; }
.mtab {
  padding: 6px 16px; font-size: 13px; font-weight: 500; color: var(--muted);
  border-radius: 999px; transition: background .15s, color .15s;
}
.mtab:hover  { color: var(--text-strong); }
.mtab.active { color: var(--accent-ink); background: var(--accent); }

/* Deposit */
.dep-wallet-block {
  background: var(--s2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.dep-network { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.dep-address-wrap { display: flex; align-items: center; gap: 8px; width: 100%; }
.dep-address {
  font-size: 12px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--text-strong);
  word-break: break-all; flex: 1;
}
.btn-copy {
  padding: 5px 9px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--s3); color: var(--muted); font-size: 14px; cursor: pointer; flex-shrink: 0;
  transition: .15s;
}
.btn-copy:hover { border-color: var(--accent-line); color: var(--accent); }
.dep-qr { background: #fff; border-radius: 10px; padding: 8px; display: inline-block; }
.dep-qr canvas, .dep-qr img { display: block; }
.dep-steps { display: flex; flex-direction: column; gap: 12px; }
.dep-step  { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--muted); }
.dep-amt-wrap { display: flex; gap: 8px; }
.dep-amt-wrap input { flex: 1; }
.dep-success { color: var(--green); font-size: 14px; font-weight: 500; text-align: center; padding: 8px; }
.dep-hint { font-size: 12px; color: var(--muted); line-height: 1.55; margin-top: 8px; }

/* Sign-up: terms checkbox */
.reg-agree { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: var(--muted); line-height: 1.45; text-align: left; cursor: pointer; }
.reg-agree input { width: 16px; height: 16px; margin-top: 1px; accent-color: var(--accent); cursor: pointer; flex-shrink: 0; box-shadow: none; }
.reg-agree a { color: var(--accent); }

/* Verification (KYC) */
.vf-reason { background: var(--yellow-soft); border: 1px solid rgba(242, 207, 138, .4); border-radius: var(--radius); padding: 10px 12px; font-size: 13px; margin-bottom: 12px; line-height: 1.5; }
.vf-reason b { color: var(--yellow); }
.vf-hint { font-size: 12.5px; color: var(--muted); line-height: 1.6; margin-bottom: 12px; }
.vf-drop { border: 2px dashed var(--border); border-radius: var(--radius-lg); padding: 24px 14px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.vf-drop:hover, .vf-drop.dragover { border-color: var(--accent); background: var(--accent-soft); }
.vf-drop-ic { font-size: 26px; color: var(--accent); margin-bottom: 6px; }
.vf-drop-inner { font-size: 13px; color: var(--muted); }
.vf-browse { color: var(--accent); text-decoration: underline; }
.vf-files { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.vf-file { display: flex; align-items: center; gap: 10px; background: var(--s2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; font-size: 12.5px; animation: sw-drop .2s var(--ease); }
.vf-file .vf-file-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vf-file .vf-file-size { color: var(--muted); font-size: 11px; }
.vf-file .vf-file-del { color: var(--red); cursor: pointer; background: none; border: none; font-size: 16px; line-height: 1; }
.vf-badge { display: inline-block; font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 999px; vertical-align: middle; }
.vf-badge.ok   { background: var(--green-soft);  color: var(--green); }
.vf-badge.wait { background: var(--accent-soft); color: var(--accent); }
.vf-badge.need { background: var(--yellow-soft); color: var(--yellow); }
.vf-status-line { font-size: 13.5px; line-height: 1.6; }
.vf-status-line .big { font-size: 15px; font-weight: 700; }
.dep-pay-amount {
  display: flex; align-items: center; gap: 8px; justify-content: center;
  font-size: 16px; margin: 4px 0 2px; text-align: center; color: var(--text);
}
.dep-pay-amount b { color: var(--accent); font-size: 21px; font-variant-numeric: tabular-nums; }
.dep-waiting {
  display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--s2);
  font-size: 12.5px; color: var(--muted); line-height: 1.45;
}
.dep-spinner {
  flex-shrink: 0; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--border); border-top-color: var(--accent);
  animation: dep-spin .8s linear infinite;
}
@keyframes dep-spin { to { transform: rotate(360deg); } }

.wd-balance { font-size: 13px; color: var(--muted); }
.wd-balance strong { color: var(--text-strong); font-variant-numeric: tabular-nums; }

.wd-breakdown {
  background: var(--s2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 11px 13px;
  display: flex; flex-direction: column; gap: 6px; font-size: 12px;
}
.wd-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.wd-row-label { color: var(--muted); }
.wd-row-val   { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.wd-row-val.free    { color: var(--green); }
.wd-row-val.charged { color: var(--yellow); }
.wd-row-val.result  { color: var(--text-strong); font-size: 13px; }
.wd-divider { border: none; border-top: 1px solid var(--line); margin: 2px 0; }

/* Mini table (history in modals) */
.mini-table { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.mini-table th {
  padding: 7px 8px; text-align: left; font-weight: 500;
  color: var(--muted); font-size: 11px; border-bottom: 1px solid var(--line);
  text-transform: uppercase; letter-spacing: .04em;
}
.mini-table td { padding: 8px; border-bottom: 1px solid var(--line); }
.mini-table tr:last-child td { border-bottom: none; }
.td-loading { color: var(--muted); text-align: center; padding: 16px !important; }

/* ── Global search ──────────────────────────────────────────────────────── */
.global-search-wrap { position: relative; flex: 1; max-width: 396px; min-width: 160px; }
.global-search-input-row {
  display: flex; align-items: center; gap: 8px;
  background: var(--s2); border: 1px solid transparent;
  border-radius: var(--radius-sm); padding: 1px 13px;   /* same look as the leagues search */
  transition: border-color .15s, box-shadow .15s;
}
.global-search-wrap:focus-within .global-search-input-row { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.global-search-input-row input { border: none; background: transparent; padding: 8px 2px; font-size: 14.3px; width: 100%; color: var(--text-strong); }
.global-search-input-row input:focus, .global-search-input-row input:hover { border: none; box-shadow: none; }

.global-search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 300;
  background: var(--s1); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
  max-height: 420px; overflow-y: auto; padding: 4px;
  animation: sw-drop .16s var(--ease);
}
.search-result-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; cursor: pointer; transition: background .12s;
  border-radius: var(--radius-sm);
}
.search-result-item:hover { background: var(--s2); }
.sr-sport    { font-size: 16px; flex-shrink: 0; }
.sr-body     { flex: 1; min-width: 0; }
.sr-teams    { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-strong); }
.sr-league   { font-size: 11px; color: var(--muted); }
.sr-meta     { font-size: 11px; color: var(--muted); flex-shrink: 0; text-align: right; }
.sr-live     { background: var(--red); color: #3A1A1F; border-radius: 4px; padding: 1px 5px; font-size: 10px; font-weight: 800; }
.search-result-empty { padding: 14px; text-align: center; color: var(--muted); font-size: 13px; }
.search-result-scanning { padding: 10px 14px; color: var(--muted); font-size: 12px; text-align: center; }

/* ── History view ───────────────────────────────────────────────────────── */
.history-wrap { padding: 18px; }
.history-summary {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px; margin-bottom: 20px;
}
.hist-stat { background: var(--s2); border: 1px solid transparent; border-radius: var(--radius-lg); padding: 14px 16px; }
.hist-stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 4px; }
.hist-stat-val   { font-size: 20px; font-weight: 700; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.hist-stat-val.plus  { color: var(--green); }
.hist-stat-val.minus { color: var(--red); }
.hist-stat-val.blue  { color: var(--accent); }

.session-card {
  background: var(--s2); border: 1px solid transparent;
  border-radius: var(--radius-lg); margin-bottom: 10px; overflow: hidden;
  transition: border-color .15s;
}
.session-card.open { border-color: var(--accent-line); }
.session-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 13px 16px; cursor: pointer; transition: background .12s;
}
.session-head:hover { background: var(--s3); }
.session-num { font-size: 12px; color: var(--muted); min-width: 24px; }
.session-status { padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.sess-open     { background: var(--accent-soft); color: var(--accent); }
.sess-closed-p { background: var(--green-soft);  color: var(--green); }
.sess-closed-m { background: var(--red-soft);    color: var(--red); }
.sess-closed-n { background: var(--s3); color: var(--muted); }
.session-pnl   { font-size: 16px; font-weight: 700; min-width: 90px; font-variant-numeric: tabular-nums; }
.session-meta  { font-size: 12px; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; flex: 1; }
.session-cashback { font-size: 12px; color: var(--green); font-weight: 600; margin-left: auto; }
.session-toggle { color: var(--muted); font-size: 18px; flex-shrink: 0; transition: transform .2s; }
.session-card.open .session-toggle { transform: rotate(180deg); }

.session-bets { border-top: 1px solid var(--line); }
.session-bets table { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.session-bets th {
  padding: 8px 14px; text-align: left; font-weight: 500;
  color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
  border-bottom: 1px solid var(--line);
}
.session-bets td { padding: 9px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.session-bets tr:last-child td { border-bottom: none; }
.session-bets tr:hover td { background: var(--s3); }

.bet-status-won  { color: var(--green); font-weight: 600; }
.bet-status-lost { color: var(--red); }
.bet-status-pend { color: var(--yellow); }
.bet-status-canc { color: var(--muted); }

/* ── TOTP ───────────────────────────────────────────────────────────────── */
.totp-label { font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.totp-hint  { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.totp-hint a { color: var(--accent); text-decoration: none; }
.totp-hint a:hover { text-decoration: underline; }

/* ── Utility ────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── Mobile — hidden on desktop ─────────────────────────────────────────── */
.mobile-nav        { display: none; }
.mob-account-panel { display: none; }
.sidebar-backdrop  { display: none; }

/* ── Tablet: narrower side columns ──────────────────────────────────────── */
@media (max-width: 1180px) and (min-width: 769px) {
  .app-layout { grid-template-columns: 200px 1fr 280px; }
  .balance-label { display: none; }
  .hdr-btn { padding: 8px 10px; }
}

/* ── Mobile (≤ 768px) ───────────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --mobile-nav-h: 60px; }

  .header { padding: 0 10px; gap: 8px; }
  .brand-logo { height: 33px; }
  .header-name { font-size: 13px; }
  .balance-label { display: none; }
  .balance-val { min-width: 0; font-size: 14.3px; margin-right: 0; }
  .global-search-wrap { flex: 1; max-width: none; min-width: 0; }
  .global-search-input-row { padding: 0 12px; }
  .hdr-btn, .header-username, .btn-logout-top, .slip-toggle-btn { display: none; }
  .hdr-support:not(.hidden) { display: inline-flex; padding: 5px 10px; font-size: 12px; }
  .login-box { width: 100%; max-width: 380px; padding: 28px 20px 24px; border-radius: 16px; }
  .login-brand-logo { height: 53px; }

  /* single column */
  .app-layout {
    display: block;
    height: calc(100vh - var(--header-h) - var(--mobile-nav-h));
    overflow: hidden;
  }
  .main-area { height: 100%; overflow-y: auto; }

  /* sidebar: slide-in from the left */
  .sidebar {
    position: fixed;
    top: var(--header-h); left: 0;
    width: 272px;
    height: calc(100vh - var(--header-h) - var(--mobile-nav-h));
    z-index: 250;
    transform: translateX(-100%);
    transition: transform .28s var(--ease);
    box-shadow: 8px 0 28px rgba(9, 20, 31, .5);
    border-right: 1px solid var(--border);
  }
  .sidebar.mob-open { transform: translateX(0); }

  /* bet slip: bottom sheet */
  .betslip-col {
    position: fixed;
    bottom: var(--mobile-nav-h); left: 0; right: 0;
    height: 65vh; max-height: 80vh;
    z-index: 250;
    border-left: none;
    border-top: 1px solid var(--border);
    border-radius: 18px 18px 0 0;
    transform: translateY(100%);
    transition: transform .3s var(--ease);
    box-shadow: 0 -10px 28px rgba(9, 20, 31, .45);
    display: flex !important;
  }
  .betslip-col.mob-open { transform: translateY(0); }

  .sidebar-backdrop {
    display: block;
    position: fixed; inset: 0;
    background: rgba(12, 22, 32, .55);
    z-index: 240; opacity: 0; pointer-events: none;
    transition: opacity .25s;
  }
  .sidebar-backdrop.visible { opacity: 1; pointer-events: all; }

  /* bottom navigation */
  .mobile-nav {
    display: flex;
    position: fixed; bottom: 0; left: 0; right: 0;
    height: var(--mobile-nav-h);
    padding-bottom: env(safe-area-inset-bottom, 0);
    background: var(--s1); border-top: 1px solid var(--line);
    z-index: 300;
  }
  .mob-nav-btn {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 3px;
    color: var(--muted); font-size: 10.5px; font-weight: 500;
    background: none; border: none; cursor: pointer;
    position: relative; transition: color .15s;
    -webkit-tap-highlight-color: transparent;
  }
  .mob-nav-ico { font-size: 22px; line-height: 1; }
  .mob-nav-btn.active { color: var(--accent); }
  .mob-slip-badge {
    position: absolute; top: 6px; right: calc(50% - 22px);
    background: var(--accent); color: var(--accent-ink);
    border-radius: 9px; padding: 0 5px;
    font-size: 10px; font-weight: 800;
    min-width: 17px; height: 17px; line-height: 17px; text-align: center;
  }

  /* account panel */
  .mob-account-panel {
    display: block;
    position: fixed; bottom: var(--mobile-nav-h); left: 0; right: 0;
    background: var(--s1); border-top: 1px solid var(--border);
    border-radius: 18px 18px 0 0;
    padding: 10px 16px 16px;
    z-index: 250;
    transform: translateY(100%);
    transition: transform .3s var(--ease);
    box-shadow: 0 -10px 28px rgba(9, 20, 31, .45);
    max-height: calc(100vh - var(--header-h) - var(--mobile-nav-h));
    overflow-y: auto;
  }
  .mob-account-panel.mob-open { transform: translateY(0); }
  .mob-acc-handle { width: 40px; height: 4px; background: var(--s3); border-radius: 2px; margin: 0 auto 14px; }
  .mob-acc-username { font-size: 12px; color: var(--muted); text-align: center; margin-bottom: 2px; }
  .mob-acc-balance {
    font-size: 28px; font-weight: 700; color: var(--text-strong);
    text-align: center; margin-bottom: 16px; letter-spacing: -.3px; font-variant-numeric: tabular-nums;
  }
  .mob-acc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
  .mob-acc-btn {
    padding: 12px 8px; border-radius: var(--radius);
    background: var(--s2); border: 1px solid transparent;
    color: var(--text); font-size: 12.5px; font-weight: 500;
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    cursor: pointer; transition: background .15s, transform .08s;
    -webkit-tap-highlight-color: transparent;
  }
  .mob-acc-btn:active { transform: scale(.97); background: var(--s3); }
  .mob-acc-btn .ico { font-size: 20px; }
  .mob-acc-btn.deposit  { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
  .mob-acc-btn.withdraw { border-color: var(--border); }
  .mob-logout-row { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }
  .mob-logout-btn {
    width: 100%; padding: 11px; border-radius: var(--radius);
    background: transparent; border: 1px solid var(--border);
    color: var(--muted); font-size: 13px; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .mob-logout-btn:active { color: var(--red); border-color: var(--red); }

  /* no horizontal overflow */
  body { overflow-x: hidden; }
  .main-area { overflow-x: hidden; }
  .markets-wrap, .match-markets { overflow-x: hidden; }
  .out-lbl { white-space: normal; }
  .out-btn { max-width: 100%; min-width: 0; }
  .ml-btn  { min-width: 0; }
  .lines-tbl td { overflow: hidden; max-width: 0; }

  /* compact match cards */
  .match-card { margin: 8px 10px; border-radius: 12px; }
  .match-head { padding: 10px 12px; }
  .match-markets { padding: 0 12px 12px; }
  .match-teams { font-size: 13.5px; }
  .matches-header { padding: 12px 12px 4px; }
  .event-head { padding: 12px 12px 4px; }
  .markets-wrap { padding: 4px 10px 16px; }

  /* modals become bottom sheets */
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal, .modal-wide {
    width: 100%; max-width: none;
    border-radius: 20px 20px 0 0; max-height: 92vh;
    padding: 22px 18px calc(18px + env(safe-area-inset-bottom, 0));
    animation: sw-sheet .28s var(--ease);
  }

  .history-wrap { padding: 12px 10px; }
  .history-summary { grid-template-columns: 1fr 1fr; gap: 8px; }
  .hist-stat-val { font-size: 16px; }

  .period-tabs-wrap { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; padding: 8px 10px; }
  .period-tab { white-space: nowrap; }
  .session-bets { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  .toast { bottom: calc(var(--mobile-nav-h) + 14px); }
}

/* ── Live betting ───────────────────────────────────────────────────────── */
.live-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .15s, border-color .15s;
  background: var(--red-soft);
  border: 1px solid rgba(242, 154, 154, .22);
  color: var(--red);
  font-weight: 600;
  margin-bottom: 6px;
}
.live-btn:hover  { background: rgba(242, 154, 154, .2); }
.live-btn.active { background: rgba(242, 154, 154, .22); border-color: rgba(242, 154, 154, .55); }

.live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--red);
  flex-shrink: 0;
  animation: livePulse 1.4s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .4; transform: scale(1.35); }
}

.live-event-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.live-event-row {
  background: var(--s2);
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.live-event-row:hover  { background: var(--s3); }
.live-event-row.active { border-color: var(--accent-line); }
.live-event-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.live-league-name  { font-size: 11px; color: var(--muted); flex: 1; }
.live-state-badge {
  font-size: 10px; padding: 1px 7px; border-radius: 999px;
  background: var(--red-soft); color: var(--red);
  border: 1px solid rgba(242, 154, 154, .3);
}
.live-teams { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; color: var(--text-strong); }
.live-score {
  font-size: 13px; font-weight: 700; color: var(--accent);
  background: var(--accent-soft); padding: 2px 9px;
  border-radius: 6px; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.live-elapsed { font-size: 11px; color: var(--red); font-variant-numeric: tabular-nums; }
.live-group-title {
  font-size: 11px; color: var(--muted); text-transform: uppercase;
  letter-spacing: .06em; padding: 10px 0 4px; font-weight: 600;
}
.live-no-events  { color: var(--muted); font-size: 13px; padding: 24px 0; text-align: center; }
.live-connecting { color: var(--muted); font-size: 13px; padding: 24px 0; text-align: center; }

/* live odds change */
.odds-up   { color: var(--green) !important; transition: color .3s; }
.odds-down { color: var(--red)   !important; transition: color .3s; }
@keyframes flash-btn-up {
  0%   { background: rgba(127, 216, 176, .32); border-color: var(--green); }
  70%  { background: rgba(127, 216, 176, .32); border-color: var(--green); }
  100% { background: var(--s3); border-color: transparent; }
}
@keyframes flash-btn-down {
  0%   { background: rgba(242, 154, 154, .30); border-color: var(--red); }
  70%  { background: rgba(242, 154, 154, .30); border-color: var(--red); }
  100% { background: var(--s3); border-color: transparent; }
}
.ml-btn.odds-flash-up,   .out-btn.odds-flash-up   { animation: flash-btn-up   5s ease; }
.ml-btn.odds-flash-down, .out-btn.odds-flash-down { animation: flash-btn-down 5s ease; }

/* live event detail */
.live-detail-wrap   { padding: 14px 18px; }
.live-back-btn      { margin-bottom: 12px; font-size: 12px; padding: 4px 12px; }
.live-detail-header { margin-bottom: 16px; }
.live-detail-meta   { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.live-detail-teams  { font-size: 19px; font-weight: 700; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--text-strong); }
.live-period-title {
  font-size: 11px; color: var(--muted); text-transform: uppercase;
  letter-spacing: .06em; padding: 12px 0 4px; font-weight: 600;
  border-top: 1px solid var(--line); margin-top: 8px;
}
.live-market-block { margin-bottom: 10px; }
.live-market-name  { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; font-weight: 500; }
.live-outcome-btn  { min-width: 80px !important; max-width: 140px; flex: 1 1 80px; }
.live-outcome-btn .out-label { font-size: 11px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* ── Respect "reduce motion" ────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Profile menu: support badge, avatar dot, divider ───────────────────── */
.profile-btn { position: relative; }
.pm-dot { position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%;
          background: var(--accent); box-shadow: 0 0 0 2px var(--s1); }
.pm-badge { margin-left: auto; min-width: 18px; height: 18px; padding: 0 6px; border-radius: 9px;
            background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700;
            display: inline-flex; align-items: center; justify-content: center; }
.profile-sep { height: 1px; background: var(--line); margin: 4px 6px; }
.mob-dot { position: absolute; top: 8px; right: calc(50% - 16px); width: 8px; height: 8px; border-radius: 50%;
           background: var(--accent); box-shadow: 0 0 0 2px var(--s1); }
.mob-acc-btn { position: relative; }
.mob-acc-badge { position: absolute; top: 8px; right: 10px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
                 background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700;
                 display: inline-flex; align-items: center; justify-content: center; }
.mob-acc-grid > .mob-acc-btn:last-child:nth-child(odd) { grid-column: 1 / -1; }
.mob-cookie-link { display: block; margin: 12px auto 0; color: var(--faint); font-size: 12px; text-decoration: underline; }

/* ── Support ────────────────────────────────────────────────────────────── */
.modal.sup-modal { width: 560px; padding: 0; gap: 0; max-height: 86vh; overflow: hidden; display: flex; flex-direction: column; }
.sup-head { display: flex; align-items: center; gap: 8px; padding: 16px 16px 14px 20px; border-bottom: 1px solid var(--line); }
.sup-head .modal-title { flex: 1; min-width: 0; }
#supTitleText { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sup-back, .sup-x { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; color: var(--muted); font-size: 16px;
                    display: inline-flex; align-items: center; justify-content: center; transition: background .15s, color .15s; }
.sup-back:hover, .sup-x:hover { background: var(--s2); color: var(--text-strong); }
.sup-body { padding: 18px 20px 20px; overflow-y: auto; flex: 1; min-height: 0; }

.sup-intro { display: flex; gap: 16px; align-items: center; justify-content: space-between;
             font-size: 13px; color: var(--muted); line-height: 1.55; margin-bottom: 16px; }
.sup-intro .btn-primary { flex-shrink: 0; }
.sup-items { display: flex; flex-direction: column; gap: 8px; }
.sup-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 12px 14px;
            border-radius: 12px; background: var(--s2); transition: background .15s; }
.sup-item:hover { background: var(--s3); }
.sup-item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sup-item-subj { font-weight: 600; color: var(--text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sup-item.unread .sup-item-subj { color: var(--accent); }
.sup-item-meta { font-size: 12px; color: var(--muted); }
.sup-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.sup-status { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.sup-status.wait   { background: var(--yellow-soft); color: var(--yellow); }
.sup-status.ok     { background: var(--accent-soft); color: var(--accent); }
.sup-status.closed { background: var(--s3); color: var(--muted); }
.sup-empty { text-align: center; color: var(--muted); padding: 30px 10px; font-size: 13.5px; }
.sup-note  { font-size: 11.5px; color: var(--faint); text-align: center; margin-top: 16px; }

.sup-lbl { display: block; font-size: 12px; color: var(--muted); margin: 0 0 6px; }
.sup-lbl + input { margin-bottom: 14px; }
.sup-ta { width: 100%; resize: none; border: 1px solid var(--border); border-radius: var(--radius); background: var(--s2);
          color: var(--text-strong); font: inherit; font-size: 14px; line-height: 1.5; padding: 10px 12px; outline: none;
          transition: border-color .15s, box-shadow .15s; }
.sup-ta::placeholder { color: var(--faint); }
.sup-ta:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.sup-new-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

.sup-thread { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.sup-meta { padding: 9px 20px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line);
            display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sup-msgs { flex: 1; min-height: 220px; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; }
.sup-msg { max-width: 82%; padding: 10px 13px; border-radius: 14px; font-size: 14px; line-height: 1.5; }
.sup-msg.from-me    { align-self: flex-end; background: var(--accent-soft); border: 1px solid rgba(142, 201, 242, .22); border-bottom-right-radius: 4px; }
.sup-msg.from-admin { align-self: flex-start; background: var(--s2); border-bottom-left-radius: 4px; }
.sup-msg-who  { font-size: 11px; color: var(--accent); font-weight: 600; margin-bottom: 3px; }
.sup-msg-body { white-space: pre-wrap; word-break: break-word; color: var(--text-strong); }
.sup-msg-time { font-size: 10.5px; color: var(--faint); margin-top: 4px; text-align: right; }
.sup-compose { display: flex; gap: 8px; align-items: flex-end; padding: 12px 20px 10px; border-top: 1px solid var(--line); }
.sup-compose .sup-ta { flex: 1; max-height: 140px; }
.sup-send { height: 44px; flex-shrink: 0; }
.sup-closed { margin: 0 20px 12px; padding: 10px 12px; border-radius: var(--radius); background: var(--s2);
              font-size: 12.5px; color: var(--muted); text-align: center; }
.sup-close-ticket { align-self: center; margin: 2px auto 14px; font-size: 12px; color: var(--faint); text-decoration: underline; }
.sup-close-ticket:hover { color: var(--muted); }

/* attachments */
.sup-att-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.sup-attach-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: var(--radius);
                  border: 1px dashed var(--border); color: var(--text); font-size: 13px; transition: border-color .15s, background .15s; }
.sup-attach-btn:hover { border-color: var(--accent); background: var(--s2); }
.sup-attach-btn svg, .sup-clip svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8;
                                     stroke-linecap: round; stroke-linejoin: round; }
.sup-att-hint { font-size: 11.5px; color: var(--faint); }
.sup-clip { width: 44px; height: 44px; flex-shrink: 0; border-radius: var(--radius); color: var(--muted);
            display: inline-flex; align-items: center; justify-content: center; transition: background .15s, color .15s; }
.sup-clip:hover { background: var(--s2); color: var(--text-strong); }
.sup-clip svg { width: 19px; height: 19px; }

.sup-atts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 10px; }
.sup-atts-compose { margin: 0; padding: 10px 20px 0; border-top: 1px solid var(--line); }
.sup-atts-compose + .sup-compose { border-top: 0; }
.sup-chip, .sup-msg-file { position: relative; display: flex; align-items: center; gap: 8px; min-width: 0; padding: 6px 8px;
            border-radius: 10px; background: var(--s2); border: 1px solid var(--border); overflow: hidden; }
.sup-chip img { width: 34px; height: 34px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.sup-ext { width: 34px; height: 34px; border-radius: 6px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
           background: var(--s4); color: var(--accent); font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }
.sup-chip-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; text-align: left; }
.sup-chip-name { font-size: 12.5px; color: var(--text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sup-chip-sub { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sup-chip.err { border-color: rgba(242, 154, 154, .45); grid-column: 1 / -1; }
.sup-chip.err .sup-chip-sub { color: var(--red); white-space: normal; }
.sup-chip-x { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; font-size: 11px; color: var(--muted); }
.sup-chip-x:hover { background: var(--s4); color: var(--text-strong); }
.sup-chip-bar { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--accent); transition: width .2s; }

.sup-msg-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; margin-top: 6px; min-width: 200px; }
.sup-msg-imgs:first-child { margin-top: 0; }
.sup-msg-img { display: block; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--s3); }
.sup-msg-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s, opacity .2s; }
.sup-msg-img img:not([src]) { opacity: 0; }
.sup-msg-img:hover img { transform: scale(1.03); }
.sup-msg-img.broken { display: flex; align-items: center; justify-content: center; }
.sup-msg-img.broken::after { content: 'Unavailable'; font-size: 11px; color: var(--faint); }
.sup-msg-files { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.sup-msg-files:first-child { margin-top: 0; }
.sup-msg-file { width: 100%; max-width: 280px; transition: border-color .15s; }
.sup-msg-file:hover { border-color: var(--accent); }
.sup-msg.from-me .sup-msg-file { background: rgba(20, 40, 58, .35); }

.sup-modal.sup-dropping { box-shadow: 0 0 0 2px var(--accent), var(--shadow, 0 20px 50px rgba(0,0,0,.35)); }

.sup-lb { position: fixed; inset: 0; z-index: 3500; background: rgba(12, 22, 32, .92); display: flex; flex-direction: column;
          align-items: center; justify-content: center; padding: 56px 16px 16px; animation: sw-fade .15s ease-out; }
.sup-lb.hidden { display: none; }
.sup-lb img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.4); }
.sup-lb-bar { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 8px; padding: 10px 12px 10px 18px; }
.sup-lb-name { flex: 1; min-width: 0; color: var(--text-strong); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sup-lb-btn { padding: 7px 12px; border-radius: var(--radius); background: var(--s3); color: var(--text-strong); font-size: 13px; }
.sup-lb-btn:hover { background: var(--s4); }
.sup-lb-x { width: 34px; height: 34px; padding: 0; border-radius: 50%; }

@media (max-width: 768px) {
  .modal.sup-modal { padding: 0 0 env(safe-area-inset-bottom, 0); max-height: 90vh; }
  .sup-intro { flex-direction: column; align-items: stretch; }
  .sup-msgs { min-height: 34vh; }
  .sup-atts-compose { padding: 10px 14px 0; }
  .sup-compose { gap: 4px; }
}

/* ── Cookie consent ─────────────────────────────────────────────────────── */
.cc {
  position: fixed; z-index: 4000; left: 20px; bottom: 20px;
  width: min(420px, calc(100vw - 32px));
  background: var(--s1); border: 1px solid var(--border); border-radius: 18px;
  box-shadow: var(--shadow); padding: 18px 18px 14px;
  animation: sw-pop .3s var(--ease);
}
.cc-title { font-weight: 700; color: var(--text-strong); font-size: 15px; margin-bottom: 6px; }
.cc-text { font-size: 13px; color: var(--muted); line-height: 1.55; margin: 0 0 14px; }
.cc-text a { color: var(--accent); }
.cc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
/* Reject and Accept look exactly the same on purpose (equal prominence) */
.cc-btn { padding: 10px 12px; border-radius: var(--radius); background: var(--s3); color: var(--text-strong);
          font-size: 13.5px; font-weight: 600; transition: background .15s, transform .08s; }
.cc-btn:hover { background: var(--s4); }
.cc-btn:active { transform: scale(.98); }
.cc-save { width: 100%; margin-top: 2px; }
.cc-link { display: block; margin: 10px auto 0; font-size: 12.5px; color: var(--muted); text-decoration: underline; }
.cc-prefs { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.cc-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px;
          padding: 10px 12px; border-radius: 12px; background: var(--s2); cursor: pointer; }
.cc-row-text { display: flex; flex-direction: column; gap: 1px; }
.cc-row-text b { color: var(--text-strong); font-size: 13.5px; font-weight: 600; }
.cc-row-text small { color: var(--muted); font-size: 12px; }
.cc-check { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.cc-switch { width: 38px; height: 22px; border-radius: 11px; background: var(--s4); position: relative; flex-shrink: 0; transition: background .2s; }
.cc-switch i { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
               background: var(--text-strong); transition: transform .2s var(--ease); }
.cc-check:checked + .cc-switch, .cc-switch.on { background: var(--accent); }
.cc-check:checked + .cc-switch i, .cc-switch.on i { transform: translateX(16px); background: #fff; }
.cc-check:focus-visible + .cc-switch { outline: 2px solid var(--accent); outline-offset: 2px; }
.cc-switch.disabled { opacity: .55; }
@media (max-width: 768px) {
  .cc { left: 12px; right: 12px; width: auto; bottom: calc(var(--mobile-nav-h, 0px) + 12px); }
  .lp-body .cc, .cc-page .cc { bottom: 12px; }
}

/* YouTube stream placeholder until "Media" is allowed */
.stream-consent { margin: 8px 16px 4px; max-width: 760px; padding: 20px 18px; border-radius: var(--radius-lg);
                  background: var(--s2); border: 1px solid var(--line); text-align: center; }
.stream-consent-t { font-weight: 600; color: var(--text-strong); font-size: 14px; }
.stream-consent-s { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.stream-consent-a { display: flex; gap: 16px; justify-content: center; align-items: center; margin-top: 14px; }
.stream-consent-a a { color: var(--muted); font-size: 12.5px; }
@media (max-width: 768px) { .stream-consent { margin-left: 10px; margin-right: 10px; } }

/* ── Phones: input text 16px — smaller text makes iPhone zoom the page in when a field gets focus ── */
@media (max-width: 768px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), textarea, select { font-size: 16px !important; }
}