/* =========================================================================
   Alışverişler — mobil öncelikli tema (Bootstrap 5.3 üzerine)
   ========================================================================= */

:root {
  --app-max: 720px;
  --radius: 18px;
  --radius-sm: 12px;
  --nav-h: 62px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);

  --bg: #eef2f0;
  --surface: #ffffff;
  --surface-2: #f5f8f6;
  --surface-3: #e9efec;
  --text: #0f1f19;
  --muted: #5b6b64;
  --border: #dfe7e3;
  --brand: #0e9f6e;
  --brand-600: #0b8a5f;
  --brand-700: #08724e;
  --brand-soft: #dcf3e9;
  --gold: #c98a0c;
  --gold-soft: #fbf0d6;
  --pos: #0b8f62;
  --neg: #dc3c42;
  --pos-soft: #dff4ea;
  --neg-soft: #fde7e8;
  --shadow: 0 1px 2px rgba(15, 31, 25, .05), 0 6px 18px rgba(15, 31, 25, .07);
  --shadow-lg: 0 10px 30px rgba(15, 31, 25, .16);
  --felt: radial-gradient(120% 140% at 0% 0%, #13a672 0%, #0c7c55 45%, #085b3e 100%);
  --felt-ink: #ffffff;

  --bs-body-bg: var(--bg);
  --bs-body-color: var(--text);
  --bs-body-font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bs-border-color: var(--border);
  --bs-secondary-color: var(--muted);
  --bs-tertiary-bg: var(--surface-2);
  --bs-link-color: var(--brand-600);
  --bs-link-hover-color: var(--brand-700);
  --bs-link-color-rgb: 11, 138, 95;
  --bs-primary: var(--brand);
  --bs-primary-rgb: 14, 159, 110;
  --bs-emphasis-color: var(--text);
}

[data-bs-theme="dark"] {
  --bg: #0a110e;
  --surface: #111b17;
  --surface-2: #16221d;
  --surface-3: #1b2a24;
  --text: #e6efeb;
  --muted: #8da197;
  --border: #22322b;
  --brand: #2fc48c;
  --brand-600: #27ad7b;
  --brand-700: #1f9168;
  --brand-soft: #123327;
  --gold: #f0b83c;
  --gold-soft: #372c12;
  --pos: #3ddc9b;
  --neg: #ff6f7a;
  --pos-soft: #10302499;
  --neg-soft: #3a191e99;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 22px rgba(0, 0, 0, .28);
  --shadow-lg: 0 14px 34px rgba(0, 0, 0, .5);
  --felt: radial-gradient(120% 140% at 0% 0%, #0f8a5e 0%, #0a5e41 45%, #06402c 100%);

  --bs-body-bg: var(--bg);
  --bs-body-color: var(--text);
  --bs-border-color: var(--border);
  --bs-secondary-color: var(--muted);
  --bs-tertiary-bg: var(--surface-2);
  --bs-link-color: var(--brand);
  --bs-link-hover-color: #5fe0ac;
  --bs-link-color-rgb: 47, 196, 140;
  --bs-emphasis-color: var(--text);
}

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  padding-bottom: calc(var(--nav-h) + var(--safe-b) + 24px);
  -webkit-tap-highlight-color: transparent;
}

a { text-decoration: none; }

.tnum, .amt, .scoreboard, .kpi-value, .sc-timer { font-variant-numeric: tabular-nums; }

/* ---------- Üst çubuk ---------- */

.app-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: var(--felt);
  background-attachment: fixed;
  color: var(--felt-ink);
  padding-top: var(--safe-t);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .12);
}
.app-header.flat { box-shadow: none; }
.app-header-inner {
  max-width: var(--app-max);
  margin: 0 auto;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -.01em;
  padding-left: 6px;
}
.brand img { filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .25)); }
.brand:hover { color: #fff; }
.hdr-title {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hdr-spacer { flex: 1; }
.hdr-actions { display: flex; align-items: center; gap: 2px; }
.hdr-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: transparent;
  border: 0;
  font-size: 1.35rem;
  flex: 0 0 auto;
}
.hdr-btn:hover, .hdr-btn:focus-visible { background: rgba(255, 255, 255, .14); color: #fff; }
.hdr-btn:active { background: rgba(255, 255, 255, .22); }

/* ---------- Sayfa gövdesi ---------- */

.app-main {
  max-width: var(--app-max);
  margin: 0 auto;
  padding: 16px 14px 8px;
}
.app-main.flush { padding-top: 0; }

.page-title { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; margin: 4px 2px 14px; }
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 22px 4px 10px;
}
.section-title .count { color: var(--text); opacity: .6; }
.muted { color: var(--muted) !important; }
.small-muted { color: var(--muted); font-size: .85rem; }

/* ---------- Kartlar ---------- */

.card-app {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  overflow: hidden;
}
.card-app > .card-pad, .card-pad { padding: 16px; }
.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 10px;
}
.card-head h2 {
  font-size: 1.02rem;
  font-weight: 800;
  margin: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-head h2 .count {
  font-size: .75rem;
  background: var(--surface-3);
  color: var(--muted);
  border-radius: 999px;
  padding: 2px 8px;
  font-weight: 700;
}
.card-foot { padding: 12px 16px 16px; }
.hint { font-size: .85rem; color: var(--muted); margin: 0 16px 10px; display: flex; gap: 6px; align-items: center; }

.empty {
  text-align: center;
  padding: 36px 20px;
  color: var(--muted);
}
.empty i { font-size: 2.4rem; display: block; margin-bottom: 8px; opacity: .6; }
.empty strong { display: block; color: var(--text); font-size: 1.05rem; margin-bottom: 4px; }

/* ---------- Butonlar ve formlar ---------- */

.btn { border-radius: var(--radius-sm); font-weight: 650; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-sm { min-height: 34px; border-radius: 10px; font-size: .85rem; padding: 4px 12px; }
.btn-lg { min-height: 54px; font-size: 1.05rem; border-radius: 15px; }
.btn-primary {
  --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand-600); --bs-btn-hover-border-color: var(--brand-600);
  --bs-btn-active-bg: var(--brand-700); --bs-btn-active-border-color: var(--brand-700);
  --bs-btn-disabled-bg: var(--brand); --bs-btn-disabled-border-color: var(--brand);
  --bs-btn-color: #fff; --bs-btn-hover-color: #fff; --bs-btn-active-color: #fff; --bs-btn-disabled-color: #fff;
}
[data-bs-theme="dark"] .btn-primary { --bs-btn-color: #04150e; --bs-btn-hover-color: #04150e; --bs-btn-active-color: #04150e; --bs-btn-disabled-color: #04150e; }
.btn-outline-primary {
  --bs-btn-color: var(--brand-600); --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand); --bs-btn-hover-border-color: var(--brand); --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: var(--brand-600); --bs-btn-active-border-color: var(--brand-600); --bs-btn-active-color: #fff;
}
.btn-soft {
  background: var(--surface-3);
  color: var(--text);
  border: 1px solid transparent;
}
.btn-soft:hover, .btn-soft:focus-visible { background: var(--border); color: var(--text); }
.btn-ghost { background: transparent; border: 0; color: var(--brand-600); }
.btn-ghost:hover { background: var(--brand-soft); color: var(--brand-700); }
[data-bs-theme="dark"] .btn-ghost { color: var(--brand); }
.btn-whatsapp { background: #25d366; color: #fff; border: 0; }
.btn-whatsapp:hover, .btn-whatsapp:active { background: #1ebe5b !important; color: #fff !important; }
.btn-danger-soft { background: var(--neg-soft); color: var(--neg); border: 0; }
.btn-danger-soft:hover { background: var(--neg); color: #fff; }
.btn-on-felt { background: rgba(255, 255, 255, .95); color: #075c3e; border: 0; font-weight: 750; }
.btn-on-felt:hover, .btn-on-felt:active { background: #fff !important; color: #054a31 !important; }
.btn-felt-ghost { background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .25); }
.btn-felt-ghost:hover, .btn-felt-ghost:active { background: rgba(255, 255, 255, .24) !important; color: #fff !important; }

.form-control, .form-select {
  background-color: var(--surface);
  border-color: var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  min-height: 48px;
  font-size: 1rem;
}
.form-control:focus, .form-select:focus {
  background-color: var(--surface);
  color: var(--text);
  border-color: var(--brand);
  box-shadow: 0 0 0 .22rem color-mix(in srgb, var(--brand) 22%, transparent);
}
.form-label { font-weight: 700; font-size: .9rem; margin-bottom: 6px; }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-switch .form-check-input { width: 3em; height: 1.6em; margin-top: 0; }
.form-switch { display: flex; align-items: center; gap: 12px; padding-left: 0; min-height: 44px; }
.form-switch .form-check-input { margin-left: 0; flex: 0 0 auto; }

.alert { border-radius: var(--radius-sm); }
.alert-soft-danger { background: var(--neg-soft); color: var(--neg); border: 0; }
.alert-soft-warning { background: var(--gold-soft); color: var(--gold); border: 0; }

/* Segment düğmesi (Poker / Rulet, filtreler) */
.segmented {
  display: flex;
  background: var(--surface-3);
  border-radius: 14px;
  padding: 4px;
  gap: 4px;
}
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label, .segmented a {
  flex: 1;
  text-align: center;
  padding: 9px 10px;
  border-radius: 10px;
  font-weight: 700;
  font-size: .92rem;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.segmented input:checked + label, .segmented a.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}
.segmented input:focus-visible + label { outline: 2px solid var(--brand); }

/* Yatay kaydırılan filtre çipleri */
.chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 2px 4px;
  margin: 0 -14px 10px;
  padding-inline: 14px;
}
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 650;
  font-size: .9rem;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
}
.chip.active, .chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip .n { opacity: .6; font-weight: 700; }

.search-box { position: relative; margin-bottom: 12px; }
.search-box i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-box input { padding-left: 40px; border-radius: 14px; }

/* ---------- Avatar ---------- */

.avatar {
  --size: 40px;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  flex: 0 0 auto;
  object-fit: cover;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 750;
  font-size: calc(var(--size) * .38);
  line-height: 1;
  color: #fff;
  background: hsl(var(--h, 160) 42% 44%);
  letter-spacing: .01em;
  user-select: none;
}
[data-bs-theme="dark"] .avatar { background: hsl(var(--h, 160) 38% 36%); }
img.avatar { background: var(--surface-3); }
.avatar-xs { --size: 22px; }
.avatar-sm { --size: 30px; }
.avatar-md { --size: 44px; }
.avatar-lg { --size: 60px; }
.avatar-xl { --size: 96px; }
.avatar-stack { display: inline-flex; align-items: center; padding-left: 8px; }
.avatar-stack .avatar { margin-left: -8px; box-shadow: 0 0 0 2px var(--surface); }
.avatar-stack .more {
  margin-left: 4px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--muted);
}

/* ---------- Tutarlar ---------- */

.amt { font-weight: 750; white-space: nowrap; }
.amt.pos { color: var(--pos); }
.amt.neg { color: var(--neg); }
.amt.zero { color: var(--muted); }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 750;
  font-size: .9rem;
  white-space: nowrap;
}
.pill.pos { background: var(--pos-soft); color: var(--pos); }
.pill.neg { background: var(--neg-soft); color: var(--neg); }
.pill.zero { background: var(--surface-3); color: var(--muted); }

.badge-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .02em;
  white-space: nowrap;
}
.badge-state.closed { background: var(--surface-3); color: var(--muted); }
.badge-state.open { background: var(--brand-soft); color: var(--brand-700); }
[data-bs-theme="dark"] .badge-state.open { color: var(--brand); }
.badge-state.live { background: #e5484d; color: #fff; }

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
  position: relative;
}
.live-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid currentColor;
  opacity: 0;
  animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(.4); opacity: .8; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* ---------- Oyun listesi ---------- */

.month-title {
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  margin: 20px 4px 8px;
}
.game-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  margin-bottom: 10px;
  color: var(--text);
  transition: transform .12s ease, box-shadow .12s ease;
}
.game-card:active { transform: scale(.985); }
.game-card:hover { color: var(--text); box-shadow: var(--shadow-lg); }
.gc-top { display: flex; align-items: center; gap: 12px; }
.gc-date {
  width: 50px;
  height: 54px;
  border-radius: 14px;
  background: var(--surface-3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  line-height: 1;
}
.gc-date .d { font-size: 1.3rem; font-weight: 800; }
.gc-date .m { font-size: .7rem; font-weight: 800; text-transform: uppercase; color: var(--muted); margin-top: 3px; letter-spacing: .04em; }
.game-card.is-live .gc-date { background: var(--felt); color: #fff; }
.game-card.is-live .gc-date .m { color: rgba(255, 255, 255, .8); }
.gc-main { flex: 1; min-width: 0; }
.gc-name { font-weight: 750; font-size: 1.04rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gc-meta { color: var(--muted); font-size: .84rem; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gc-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}
.gc-winner { font-size: .86rem; color: var(--muted); display: flex; align-items: center; gap: 6px; min-width: 0; }
.gc-winner span.name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); font-weight: 650; }
.gc-winner .bi-trophy-fill { color: var(--gold); }
.gc-pot { font-size: .8rem; color: var(--muted); white-space: nowrap; }

.fab {
  position: fixed;
  z-index: 1020;
  right: max(16px, calc((100vw - var(--app-max)) / 2 + 16px));
  bottom: calc(var(--nav-h) + var(--safe-b) + 16px);
  height: 56px;
  padding: 0 22px 0 18px;
  border-radius: 28px;
  background: var(--brand);
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1rem;
  box-shadow: 0 10px 26px color-mix(in srgb, var(--brand) 45%, transparent);
  border: 0;
}
.fab i { font-size: 1.4rem; }
.fab:hover, .fab:active { color: #fff; background: var(--brand-600); }
[data-bs-theme="dark"] .fab, [data-bs-theme="dark"] .fab:hover { color: #04150e; }

/* ---------- Oyun sayfası: üst bölüm ---------- */

.hero {
  background: var(--felt);
  background-attachment: fixed;
  color: #fff;
  margin: 0 -14px 16px;
  padding: 6px 18px 20px;
  border-radius: 0 0 26px 26px;
  box-shadow: 0 12px 26px rgba(8, 91, 62, .22);
  position: relative;
  overflow: hidden;
}
.hero::before {
  /* hafif çip deseni */
  content: "";
  position: absolute;
  right: -60px;
  top: -40px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 18px dashed rgba(255, 255, 255, .07);
  pointer-events: none;
}
.hero-kicker { font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; opacity: .82; }
.hero-title { font-size: 1.55rem; font-weight: 850; letter-spacing: -.02em; margin: 2px 0 10px; line-height: 1.15; word-break: break-word; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: .82rem;
  font-weight: 650;
  color: #fff;
}
button.hero-chip { cursor: pointer; }
.hero-chip .bi-star-fill { color: #ffd166; }
.hero-chip.conn.off { background: rgba(0, 0, 0, .25); opacity: .85; }
.hero-chip.conn .live-dot { color: #7dffc4; }
.hero-chip.conn.off .live-dot { color: #ffb4b4; }
.hero-chip.conn.off .live-dot::after { animation: none; }

.session-box {
  margin-top: 16px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 18px;
  padding: 14px;
  backdrop-filter: blur(6px);
}
.sb-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sb-label { font-size: .78rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.sb-label .live-dot { color: #7dffc4; }
.sc-timer { font-size: 1.05rem; font-weight: 800; background: rgba(0, 0, 0, .2); border-radius: 10px; padding: 3px 10px; }
.sb-pot { display: flex; align-items: baseline; gap: 8px; margin: 10px 0 12px; flex-wrap: wrap; }
.sb-pot strong { font-size: 2.1rem; font-weight: 850; letter-spacing: -.02em; line-height: 1; }
.sb-pot small { opacity: .85; font-weight: 650; }
.sb-actions { display: flex; gap: 8px; }
.sb-actions .btn { flex: 1; }
.session-box.idle { text-align: center; }
.session-box.idle p { margin: 4px 0 12px; opacity: .9; font-size: .92rem; }
.hero-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.hero-summary > div { background: rgba(255, 255, 255, .12); border-radius: 14px; padding: 10px 12px; }
.hero-summary small { display: block; opacity: .8; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.hero-summary b { font-size: 1.15rem; font-weight: 800; display: block; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Oyuncu satırları ---------- */

.player-list { list-style: none; margin: 0; padding: 0 6px 6px; }
.player-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  border-radius: 14px;
  min-height: 64px;
  transition: background .12s ease;
}
.player-row:hover { background: var(--surface-2); }
.player-row:active { background: var(--surface-3); }
.player-row.flash { animation: rowflash 1.4s ease-out; }
@keyframes rowflash {
  0% { background: color-mix(in srgb, var(--brand) 28%, transparent); }
  100% { background: transparent; }
}
.pr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pr-name { font-weight: 700; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-sub { font-size: .83rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-sub b { color: var(--text); font-weight: 750; }
.pr-right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.pr-right small { font-size: .7rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.pr-add {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex: 0 0 auto;
}
[data-bs-theme="dark"] .pr-add { color: var(--brand); }
.pr-tag { font-size: .7rem; font-weight: 800; color: var(--gold); background: var(--gold-soft); border-radius: 6px; padding: 1px 6px; margin-left: 6px; vertical-align: 2px; }

/* ---------- Seans tablosu ---------- */

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.scoreboard { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .92rem; }
.scoreboard th, .scoreboard td {
  padding: 10px 12px;
  text-align: right;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
.scoreboard thead th {
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.scoreboard th:first-child, .scoreboard td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  text-align: left;
  background: var(--surface);
  max-width: 44vw;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 1px 0 0 var(--border);
}
.scoreboard thead th:first-child { background: var(--surface-2); }
.scoreboard td.total, .scoreboard th.total { background: var(--surface-2); font-weight: 800; }
.scoreboard td.open, .scoreboard th.open { background: color-mix(in srgb, var(--brand) 8%, var(--surface)); }
.scoreboard td .buy { color: var(--muted); font-weight: 650; }
.scoreboard tfoot td, .scoreboard tfoot th { font-size: .8rem; color: var(--muted); border-bottom: 0; font-weight: 700; }
.scoreboard .cell-empty { color: var(--border); }
.scoreboard .name-cell { display: flex; align-items: center; gap: 8px; }

/* ---------- Hesaplaşma ---------- */

.transfer-list { list-style: none; margin: 0; padding: 0 12px; }
.transfer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border);
}
.transfer:last-child { border-bottom: 0; }
.transfer .who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.transfer .who span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 650; font-size: .93rem; }
.transfer .arrow { color: var(--muted); font-size: 1.1rem; }
.transfer .how { font-weight: 850; font-size: 1.02rem; white-space: nowrap; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-row .btn { flex: 1 1 auto; }

/* ---------- Son hareketler / kayıtlar ---------- */

.feed { list-style: none; margin: 0; padding: 0 16px 8px; }
.feed li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.feed li:last-child { border-bottom: 0; }
.feed .ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--surface-3);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.feed .ico.k-HarcamaKaydet { background: var(--brand-soft); color: var(--brand-600); }
.feed .ico.k-HarcamaGeriAl { background: var(--neg-soft); color: var(--neg); }
.feed .ico.k-SeansKapatBitir, .feed .ico.k-OyunuBitir { background: var(--gold-soft); color: var(--gold); }
.feed .txt { flex: 1; min-width: 0; font-size: .9rem; line-height: 1.35; }
.feed .meta { font-size: .76rem; color: var(--muted); margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.feed .meta a { color: var(--muted); font-weight: 650; }
.day-title { font-size: .78rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 18px 4px 8px; }

/* ---------- İstatistik ---------- */

.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.kpi small { display: block; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.kpi-value { font-size: 1.35rem; font-weight: 850; letter-spacing: -.01em; margin-top: 4px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .sub { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.kpi.wide { grid-column: span 2; }
a.kpi, a.kpi:hover { color: var(--text); }
a.kpi:active { transform: scale(.985); }

.rank-list { list-style: none; margin: 0; padding: 0 6px 6px; }
.rank-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  color: var(--text);
}
.rank-row:hover { background: var(--surface-2); color: var(--text); }
.rank-no {
  width: 26px;
  text-align: center;
  font-weight: 850;
  color: var(--muted);
  font-size: .95rem;
  flex: 0 0 auto;
}
.rank-row:nth-child(1) .rank-no { color: #d4a017; }
.rank-row:nth-child(2) .rank-no { color: #9aa7b0; }
.rank-row:nth-child(3) .rank-no { color: #b8733a; }
.rank-main { flex: 1; min-width: 0; }
.rank-main .n { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.rank-main .s { font-size: .8rem; color: var(--muted); }
.chart-box { position: relative; padding: 4px 12px 14px; }
.chart-box canvas { width: 100% !important; }

/* ---------- Oyuncu seçimi (yeni oyun, düzenleme) ---------- */

.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.pick { position: relative; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 6px 10px;
  border-radius: 16px;
  border: 2px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  text-align: center;
  font-size: .82rem;
  font-weight: 650;
  line-height: 1.2;
  min-height: 104px;
  user-select: none;
  transition: border-color .12s ease, background .12s ease, transform .1s ease;
}
.pick label:active { transform: scale(.96); }
.pick label .nm { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.pick input:checked + label { border-color: var(--brand); background: var(--brand-soft); }
.pick input:checked + label::after {
  content: "\F633"; /* bi-check-lg */
  font-family: "bootstrap-icons";
  position: absolute;
  top: 6px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: .95rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pick input:disabled + label { opacity: .9; cursor: not-allowed; }
.pick .lock { position: absolute; top: 6px; left: 8px; color: var(--gold); font-size: .85rem; }
.pick-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.pick-count { font-weight: 800; }

.sticky-submit {
  position: sticky;
  bottom: calc(var(--nav-h) + var(--safe-b) + 10px);
  z-index: 5;
  padding-top: 10px;
}
.sticky-submit .btn { box-shadow: var(--shadow-lg); }

/* ---------- Alttan açılan panel (alım, menü) ---------- */

.offcanvas.sheet {
  --bs-offcanvas-height: auto;
  --bs-offcanvas-bg: var(--surface);
  --bs-offcanvas-color: var(--text);
  max-height: 92dvh;
  max-width: var(--app-max);
  margin: 0 auto;
  border-radius: 24px 24px 0 0;
  border: 0 !important;
  padding-bottom: var(--safe-b);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .25);
}
.sheet .grabber { width: 42px; height: 5px; border-radius: 3px; background: var(--border); margin: 10px auto 2px; }
.sheet .offcanvas-header { padding: 8px 18px 4px; }
.sheet .offcanvas-body { padding: 8px 18px 18px; overflow-y: auto; }
.sheet-title { font-size: 1.15rem; font-weight: 800; margin: 0; }
.sheet-player { display: flex; align-items: center; gap: 12px; }
.sheet-player .t { flex: 1; min-width: 0; }
.sheet-player .t strong { display: block; font-size: 1.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-player .t span { color: var(--muted); font-size: .88rem; }

.amount-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0 10px; }
.amount-btn {
  height: 54px;
  border-radius: 14px;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
  font-size: 1.1rem;
}
.amount-btn.selected { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-700); }
[data-bs-theme="dark"] .amount-btn.selected { color: var(--brand); }
.amount-input { position: relative; }
.amount-input input { text-align: center; font-size: 1.5rem; font-weight: 800; height: 60px; border-radius: 16px; padding-right: 40px; }
.amount-input .cur { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-weight: 800; color: var(--muted); font-size: 1.2rem; }

.menu-list { list-style: none; margin: 0; padding: 0; }
.menu-list button, .menu-list a {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 8px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-weight: 650;
  font-size: 1rem;
  border-radius: 12px;
  text-align: left;
}
.menu-list button:hover, .menu-list a:hover { background: var(--surface-2); color: var(--text); }
.menu-list i { font-size: 1.25rem; color: var(--muted); width: 26px; text-align: center; }
.menu-list .danger, .menu-list .danger i { color: var(--neg); }
.menu-list li + li { border-top: 1px solid var(--border); }

.history { list-style: none; margin: 0; padding: 0; }
.history li { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--border); font-size: .92rem; }
.history li:last-child { border-bottom: 0; }
.history .tm { color: var(--muted); width: 46px; flex: 0 0 auto; }
.history .am { font-weight: 800; }
.history .by { color: var(--muted); font-size: .8rem; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history li.undone .am { text-decoration: line-through; color: var(--muted); }

/* Seans bitirme satırları */
.co-row { display: grid; grid-template-columns: minmax(0, 1fr) 128px; gap: 8px 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.co-row:last-child { border-bottom: 0; }
.co-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.co-who .t { min-width: 0; }
.co-who strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .98rem; }
.co-who small { color: var(--muted); font-size: .8rem; }
.co-in { position: relative; }
.co-in input { text-align: right; font-weight: 800; font-size: 1.1rem; height: 50px; padding-right: 44px; }
.co-in .fill {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 0;
  background: var(--surface-3);
  color: var(--muted);
  font-size: .95rem;
}
.co-net { grid-column: 1 / -1; font-size: .8rem; margin-top: -4px; padding-left: 50px; color: var(--muted); }
.co-summary {
  position: sticky;
  bottom: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 12px 16px calc(12px + var(--safe-b));
}
.co-status { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; font-weight: 700; font-size: .95rem; }
.co-status .ok { color: var(--pos); }
.co-status .bad { color: var(--neg); }

/* ---------- Modallar ---------- */

.modal-content { background: var(--surface); color: var(--text); border: 0; border-radius: 22px; }
.modal-header, .modal-footer { border-color: var(--border); }
.modal-title { font-weight: 800; }
@media (max-width: 575.98px) {
  .modal-fullscreen-sm-down .modal-content { border-radius: 0; }
}
.confirm-title { font-weight: 800; margin-bottom: 6px; }

/* ---------- Bildirimler ---------- */

.toast-stack {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--nav-h) + var(--safe-b) + 14px);
  z-index: 1095;
  width: min(92vw, 480px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.app-toast {
  pointer-events: auto;
  background: #16241e;
  color: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
  animation: toast-in .22s ease-out;
  font-weight: 600;
  font-size: .94rem;
}
[data-bs-theme="dark"] .app-toast { background: #243a31; }
.app-toast.error { background: #b4232a; }
.app-toast i { font-size: 1.15rem; }
.app-toast .msg { flex: 1; min-width: 0; }
.app-toast .act { background: none; border: 0; color: #7dffc4; font-weight: 800; padding: 4px 6px; white-space: nowrap; }
.app-toast.hide { animation: toast-out .2s ease-in forwards; }
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toast-out { to { transform: translateY(12px); opacity: 0; } }

/* ---------- Alt menü ---------- */

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1030;
  max-width: var(--app-max);
  margin: 0 auto;
  height: calc(var(--nav-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  display: flex;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-top: 1px solid var(--border);
}
.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 700;
  position: relative;
}
.bottom-nav a i { font-size: 1.35rem; line-height: 1; }
.bottom-nav a.active { color: var(--brand-600); }
[data-bs-theme="dark"] .bottom-nav a.active { color: var(--brand); }
.bottom-nav a.active::before {
  content: "";
  position: absolute;
  top: 0;
  width: 28px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: currentColor;
}
@media (min-width: 760px) {
  .bottom-nav { border: 1px solid var(--border); border-bottom: 0; border-radius: 18px 18px 0 0; }
}

/* ---------- Giriş sayfası ---------- */

.auth-body {
  background: var(--felt);
  background-attachment: fixed;
  min-height: 100dvh;
  padding: calc(var(--safe-t) + 24px) 18px calc(var(--safe-b) + 24px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-wrap { width: 100%; max-width: 400px; }
.auth-logo { text-align: center; color: #fff; margin-bottom: 22px; }
.auth-logo img { width: 84px; height: 84px; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .35)); }
.auth-logo h1 { font-size: 2rem; font-weight: 850; letter-spacing: -.02em; margin: 12px 0 2px; }
.auth-logo p { opacity: .85; margin: 0; }
.auth-card { background: var(--surface); border-radius: 24px; padding: 22px; box-shadow: 0 20px 50px rgba(0, 0, 0, .3); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 52px; }
.pw-wrap button { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 40px; border: 0; background: transparent; color: var(--muted); font-size: 1.15rem; }

/* ---------- Profil ---------- */

.profile-head { text-align: center; padding: 22px 16px 18px; }
.profile-head .avatar-xl { box-shadow: 0 0 0 4px var(--surface), 0 8px 20px rgba(0, 0, 0, .15); }
.profile-head h2 { font-size: 1.35rem; font-weight: 800; margin: 12px 0 2px; }
.photo-btn { position: relative; display: inline-block; }
.photo-btn .cam {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 3px var(--surface);
}
.list-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  color: var(--text);
  border-top: 1px solid var(--border);
  font-weight: 650;
}
.list-link:first-child { border-top: 0; }
.list-link:hover { background: var(--surface-2); color: var(--text); }
.list-link i.lead { font-size: 1.2rem; color: var(--muted); width: 24px; text-align: center; }
.list-link .end { margin-left: auto; color: var(--muted); }

/* Yükleniyor */
.btn .spinner-border { width: 1.1rem; height: 1.1rem; border-width: .16em; }
.is-busy { pointer-events: none; opacity: .7; }
.refreshing { opacity: .65; transition: opacity .15s ease; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.section-title.live { color: var(--neg); }

/* ---------- İstatistik filtresi (tarih aralığı + oyun seçimi) ---------- */

.filter-card { padding: 12px 14px; }
.filter-dates { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.filter-dates label { display: block; min-width: 0; margin: 0; }
.filter-dates label span {
  display: block;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  margin-bottom: 4px;
}
.filter-dates input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 6px 10px;
  font-size: .95rem;
  text-align: left;
}
[data-bs-theme="dark"] input[type="date"] { color-scheme: dark; }
.filter-actions { display: flex; gap: 8px; margin-top: 10px; }
.game-pick-btn { flex: 1; min-width: 0; justify-content: flex-start; }
.game-pick-btn span { flex: 1; min-width: 0; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.active-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .88rem;
  font-weight: 650;
  color: var(--brand-700);
  background: var(--brand-soft);
  border-radius: 12px;
  padding: 4px 6px 4px 12px;
  margin: -4px 0 14px;
}
[data-bs-theme="dark"] .active-filter { color: var(--brand); }
.active-filter span { flex: 1; min-width: 0; }

.game-quick { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.game-options { list-style: none; margin: 0; padding: 0; }
.game-options li { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--border); }
.game-options li:last-child { border-bottom: 0; }
.game-options input { width: 1.45em; height: 1.45em; flex: 0 0 auto; margin: 0; }
.game-options label { flex: 1; min-width: 0; padding: 11px 0; cursor: pointer; display: flex; flex-direction: column; }
.game-options .gn { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-options .gd { font-size: .8rem; color: var(--muted); }
.game-options input:disabled + label { opacity: .5; cursor: default; }
.sheet-foot { padding: 12px 18px; border-top: 1px solid var(--border); }

/* ---------- Aşağı çek-yenile (ana ekrana eklenmiş uygulama; bkz. site.js) ---------- */

.ptr {
  position: fixed;
  left: 50%;
  top: calc(var(--safe-t) + 8px); /* üst çubuğun arkasında bekler, çekildikçe altından çıkar */
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--brand-600);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  z-index: 1029;
  opacity: 0;
  transform: translate(-50%, 0);
  pointer-events: none;
  will-change: transform, opacity;
}
[data-bs-theme="dark"] .ptr { color: var(--brand); }
.ptr.settle { transition: transform .22s ease, opacity .22s ease; }
.ptr i { display: block; line-height: 1; }
.ptr .spinner-border { display: none; width: 1.3rem; height: 1.3rem; border-width: .16em; }
.ptr.busy i { display: none; }
.ptr.busy .spinner-border { display: block; }

@media (display-mode: standalone) {
  /* Android'in kendi çek-yenilemesi bizimkiyle çakışmasın. Tarayıcı sekmesinde dokunulmaz: orada tarayıcınınki çalışır. */
  html, body { overscroll-behavior-y: contain; }
}
