/* ===== COMPETITIONS PAGE — Tip Offs v2 ===== */

/* ── Page wrapper ─────────────────────────────────────────────── */
.comps-page-wrap {
  min-height: calc(100vh - 64px);
  background: var(--bg);
}

.comps-body {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

/* ── Top action bar ───────────────────────────────────────────── */
.comps-topbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 64px;
  z-index: 50;
}

.comps-topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
}

/* View tabs (Browse / My Competitions) */
.comps-view-tabs {
  display: flex;
  gap: 0;
  height: 100%;
}

.comps-view-tab {
  padding: 0 20px;
  min-height: 52px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.comps-view-tab:hover { color: var(--primary); }
.comps-view-tab.active {
  color: var(--primary);
  border-bottom-color: var(--accent);
  font-weight: 700;
}

.comps-topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ── Filter bar ───────────────────────────────────────────────── */
.comps-filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.comps-search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.comps-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  pointer-events: none;
}

.comps-search-input {
  width: 100%;
  padding: 9px 12px 9px 36px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  background: var(--card);
  color: var(--text);
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.comps-search-input:focus { border-color: var(--primary); }

.comps-filter-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  background: var(--bg);
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.filter-pill:hover, .filter-pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.filter-select {
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s;
}
.filter-select:focus { border-color: var(--primary); }

/* ── Results bar ──────────────────────────────────────────────── */
.comps-results-bar {
  margin-bottom: 16px;
}
.comps-results-count {
  font-size: 13px;
  color: var(--text3);
  font-weight: 500;
}

/* ── Empty state ──────────────────────────────────────────────── */
.comps-empty {
  text-align: center;
  padding: 60px 24px;
  background: var(--card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}
.comps-empty-icon { font-size: 52px; margin-bottom: 16px; }
.comps-empty h3 { font-size: 20px; font-weight: 800; color: var(--text); margin: 0 0 8px; }
.comps-empty p  { font-size: 14px; color: var(--text2); margin: 0 0 24px; }

/* ── Comp code badge (My Competitions cards) ──────────────────── */
.comp-code-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--text2);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 1px;
  font-family: monospace;
}

/* ── Competition Detail ───────────────────────────────────────── */
.comp-breadcrumb {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}

.comp-back-btn {
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.15s;
}
.comp-back-btn:hover { color: var(--accent); }

.comp-breadcrumb-sep {
  font-size: 13px;
  color: var(--text3);
  margin: 0 6px;
}

.comp-breadcrumb-name {
  font-size: 13px;
  color: var(--text2);
  font-weight: 500;
}

/* Comp detail header (navy gradient) */
.comp-detail-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
  padding: 32px 0;
}

.comp-detail-header-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.comp-detail-info { flex: 1; min-width: 0; }

.comp-detail-sport-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.comp-detail-name {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 900;
  color: #fff;
  margin: 0 0 12px;
  line-height: 1.2;
}

.comp-detail-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.comp-meta-pill {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.12);
  padding: 4px 10px;
  border-radius: 12px;
}

/* Aside: join code box */
.comp-code-box {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius);
  padding: 14px 20px;
  text-align: center;
  flex-shrink: 0;
  backdrop-filter: blur(4px);
}
.comp-code-label {
  font-size: 10px;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 4px;
  font-weight: 700;
}
.comp-code-value {
  font-size: 24px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 4px;
  font-family: monospace;
}

/* ── Detail tabs bar ──────────────────────────────────────────── */
.comp-detail-tabs-bar {
  background: var(--card);
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 116px;
  z-index: 40;
}

.comp-detail-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.comp-detail-tabs::-webkit-scrollbar { display: none; }

.comp-detail-tab {
  padding: 14px 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
.comp-detail-tab:hover  { color: var(--primary); }
.comp-detail-tab.active { color: var(--primary); border-bottom-color: var(--accent); font-weight: 700; }

/* ── Detail tab panels ────────────────────────────────────────── */
.detail-tab-panel { display: none; }
.detail-tab-panel.active { display: block; }

/* ── Round selector ───────────────────────────────────────────── */
.round-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.round-selector label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text2);
}

/* ── Tipper ladder table ──────────────────────────────────────── */
.tipper-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.tipper-table th {
  font-size: 11px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 12px;
  border-bottom: 2px solid var(--border);
  background: var(--bg);
  white-space: nowrap;
  text-align: right;
}
.tipper-table th:first-child { text-align: center; width: 40px; }
.tipper-table th:nth-child(2) { text-align: left; }
.tipper-table td {
  padding: 11px 12px;
  text-align: right;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.tipper-table td:first-child { text-align: center; }
.tipper-table td:nth-child(2) { text-align: left; }
.tipper-table tr:last-child td { border-bottom: none; }
.tipper-table tr:hover td { background: #f7f9ff; }
.tipper-row-me td { background: rgba(229,0,34,0.04); }

.rank-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--text2);
}
.rank-circle.rank-top3 {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.tipper-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  overflow: hidden;
  flex-shrink: 0;
  vertical-align: middle;
}
.tipper-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.tipper-name { font-weight: 600; color: var(--text); }

/* ── Member list ──────────────────────────────────────────────── */
.member-list { display: grid; gap: 10px; }

.member-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.member-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  flex-shrink: 0;
  overflow: hidden;
}
.member-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

.member-info { flex: 1; min-width: 0; }
.member-name { font-size: 14px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.member-role { font-size: 11px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.3px; font-weight: 600; margin-top: 2px; }

.role-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
  flex-shrink: 0;
  text-transform: capitalize;
}
.role-owner  { background: #fef3c7; color: #92400e; }
.role-admin  { background: #dbeafe; color: #1d4ed8; }
.role-member { background: var(--bg); color: var(--text2); }

/* ── Invite chips ─────────────────────────────────────────────── */
.invite-input-row {
  display: flex;
  gap: 10px;
}

.invite-email-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  min-height: 10px;
}

.invite-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-light);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
}
.invite-chip button {
  background: none;
  border: none;
  color: var(--accent-dark);
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  line-height: 1;
  display: flex;
  align-items: center;
}

.invite-link-row {
  display: flex;
  gap: 10px;
}

/* ── Wall ─────────────────────────────────────────────────────── */
.wall-compose {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  align-items: flex-end;
}

.wall-textarea {
  flex: 1;
  padding: 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  resize: none;
  min-height: 60px;
  outline: none;
  transition: border-color 0.15s;
  background: var(--card);
  color: var(--text);
}
.wall-textarea:focus { border-color: var(--primary); }

.wall-post-btn { white-space: nowrap; }

.wall-posts { display: grid; gap: 14px; }

.wall-post {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.wall-post-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.post-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
  overflow: hidden;
}
.post-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

.post-author { font-size: 13px; font-weight: 700; color: var(--text); }
.post-time   { font-size: 11px; color: var(--text3); margin-left: auto; }

.wall-post-body {
  padding: 14px 16px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.wall-post-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px 12px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.react-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text2);
  transition: background 0.1s, border-color 0.1s;
}
.react-btn:hover { background: var(--border); }
.react-btn.reacted { background: var(--accent-light); color: var(--accent-dark); border-color: var(--accent); }

.reply-btn {
  background: none;
  border: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.1s, color 0.1s;
}
.reply-btn:hover { background: var(--bg); color: var(--primary); }

.delete-btn {
  background: none;
  border: none;
  font-size: 12px;
  color: #dc2626;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  margin-left: auto;
  transition: background 0.1s;
}
.delete-btn:hover { background: #fef2f2; }

.replies-container {
  padding: 0 16px 12px 56px;
  display: grid;
  gap: 8px;
}

.reply-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  padding: 10px 12px;
}

.reply-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.reply-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary-light);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.reply-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

.reply-author { font-size: 12px; font-weight: 700; color: var(--text); }
.reply-time   { font-size: 10px; color: var(--text3); margin-left: auto; }
.reply-body   { font-size: 13px; color: var(--text2); line-height: 1.5; white-space: pre-wrap; word-break: break-word; }

.reply-compose {
  display: flex;
  gap: 8px;
  padding: 0 16px 12px 56px;
  margin-top: 4px;
}

/* ── Settings form helpers ────────────────────────────────────── */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}

.form-label-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}

.form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  background: var(--card);
  color: var(--text);
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.form-input:focus { border-color: var(--primary); }

.danger-zone {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 2px solid #fca5a5;
}
.danger-zone-title { font-size: 14px; font-weight: 800; color: #b91c1c; margin: 0 0 6px; }
.danger-zone-desc  { font-size: 13px; color: var(--text2); margin: 0 0 14px; }

/* ── Loading state ────────────────────────────────────────────── */
.loading-state {
  text-align: center;
  padding: 40px 24px;
  color: var(--text3);
  font-size: 14px;
}

/* ── Save messages ────────────────────────────────────────────── */
.save-msg { font-size: 13px; }
.save-msg.success { color: #16a34a; }
.save-msg.error   { color: #dc2626; }

/* ── Badges ───────────────────────────────────────────────────── */
.badge-you {
  font-size: 10px;
  background: var(--accent-light);
  color: var(--accent-dark);
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 700;
}

/* ── Card helper ──────────────────────────────────────────────── */
.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

/* ── Modal ────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
}
.modal-overlay.show { display: flex; }

.modal-box {
  background: var(--card);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: modalIn 0.2s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(-8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 8px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
}

.join-code-input {
  text-align: center;
  font-size: 20px;
  font-family: monospace;
  letter-spacing: 4px;
  text-transform: uppercase;
  font-weight: 700;
  padding: 14px;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 900px) {
  .comp-detail-header-inner { flex-direction: column; gap: 16px; }
  .comp-detail-tabs-bar { top: 52px; }
}

@media (max-width: 640px) {
  .comps-topbar-inner { flex-wrap: wrap; padding: 8px 16px; min-height: auto; }
  .comps-view-tabs { width: 100%; }
  .comps-view-tab  { min-height: 40px; padding: 0 14px; }
  .comps-topbar-actions { display: none; }
  .comps-body { padding: 16px 16px 40px; }
  .comps-filter-bar { gap: 8px; }
  .comps-search-wrap { min-width: 100%; order: -1; }
  .reply-compose, .replies-container { padding-left: 16px; }
  .comp-detail-tabs-bar { top: 40px; }
  .modal-box { padding: 24px 20px; }
}

/* ── Private / locked competition cards ─────────────────────────── */
.comp-lock-badge { font-size: 13px; margin-left: 4px; vertical-align: middle; }
.comp-grid-card.comp-locked .comp-grid-card-top { position: relative; }
.comp-grid-card.comp-locked { opacity: 0.96; }

/* ── Tipping link + hover round menu (competition detail header) ─── */
.comp-tipping-wrap { position: relative; display: inline-block; }
.comp-tipping-btn { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.comp-tipping-btn .chev { font-size: 11px; opacity: 0.85; }

.comp-tipping-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 230px;
  background: #fff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.16);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s;
  z-index: 60;
}
/* Bridge the gap so hover doesn't drop when moving cursor to the menu */
.comp-tipping-wrap::after { content: ''; position: absolute; top: 100%; right: 0; width: 100%; height: 8px; }
.comp-tipping-wrap:hover .comp-tipping-menu,
.comp-tipping-menu:hover { opacity: 1; visibility: visible; transform: translateY(0); }

.comp-tipping-head {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--text3, #9ca3af); padding: 6px 10px 4px;
}
.comp-tipping-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 10px; border-radius: 7px; font-size: 13px; font-weight: 600;
  color: var(--text, #1e293b); text-decoration: none; transition: background 0.1s;
}
.comp-tipping-item:hover { background: var(--bg, #f4f6f9); }
.comp-tipping-item.current { color: var(--primary, #00385D); }
.comp-tipping-item .cur-tag {
  font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.4px;
  background: var(--accent, #E50022); color: #fff; padding: 2px 7px; border-radius: 10px;
}
.comp-tipping-loading, .comp-tipping-empty { padding: 12px 10px; font-size: 12px; color: var(--text3, #9ca3af); }

/* "Contact organiser to join" button on private competition cards */
.comp-contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.14);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 16px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.comp-contact-btn:hover { background: rgba(255,255,255,0.26); border-color: rgba(255,255,255,0.6); }

/* ── "Who Tipped What" round ladder grid ──────────────────────── */
.tl-filters { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.tl-filter { display: flex; flex-direction: column; gap: 4px; }
.tl-filter label { font-size: 12px; font-weight: 700; color: var(--text2, #64748b); }
.tl-filter select {
  padding: 9px 30px 9px 12px; border: 1.5px solid var(--border, #e2e8f0); border-radius: 20px;
  font-size: 13px; font-weight: 600; color: var(--text, #1e293b); background: #fff; min-width: 150px; cursor: pointer;
}
.tl-filter select:disabled { color: var(--text2, #64748b); cursor: default; }

.tl-banner {
  background: #dbeafe; border-radius: 8px; padding: 16px 20px; margin-bottom: 18px; color: #1e3a8a;
}
.tl-banner strong { font-size: 18px; display: block; margin-bottom: 2px; }
.tl-banner div { font-size: 13px; color: #3b5b8a; }

.tl-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.tl-title { font-size: 22px; font-weight: 900; color: #1a1a1a; }
.tl-sub   { font-size: 13px; color: var(--text2, #64748b); margin-top: 2px; }
.tl-search { flex: 1; min-width: 240px; max-width: 380px; }
.tl-search input {
  width: 100%; padding: 11px 16px; border: 1.5px solid var(--border, #e2e8f0); border-radius: 8px;
  font-size: 14px; outline: none; box-sizing: border-box;
}
.tl-search input:focus { border-color: var(--primary, #00385D); }

.tl-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.tl-card { display: flex; align-items: center; gap: 14px; background: var(--bg, #f4f6f9); border: 1px solid var(--border, #e2e8f0); border-radius: 10px; padding: 16px 18px; }
.tl-card-ic { font-size: 26px; opacity: 0.8; }
.tl-card-lbl { font-size: 13px; font-weight: 700; color: var(--text2, #64748b); }
.tl-card-val { font-size: 22px; font-weight: 900; color: #1a1a1a; }
.tl-card-sub { font-size: 12px; font-weight: 600; color: var(--text2, #64748b); }

.tl-grid-wrap { overflow-x: auto; border: 1px solid var(--border, #e2e8f0); border-radius: 10px; }
.tl-grid { border-collapse: collapse; width: 100%; font-size: 13px; }
.tl-grid thead th {
  background: #f7f8fa; font-size: 11px; font-weight: 800; color: #6b7280; text-transform: uppercase;
  padding: 8px 6px; border-bottom: 2px solid #e5e7eb; white-space: nowrap; position: sticky; top: 0;
}
.tl-grid th.tl-rank, .tl-grid td.tl-rank { width: 34px; text-align: center; color: #6b7280; font-weight: 700; }
.tl-grid th.tl-tipper, .tl-grid td.tl-tipper { text-align: left; min-width: 140px; position: sticky; left: 0; background: #fff; z-index: 1; }
.tl-grid thead th.tl-tipper { background: #f7f8fa; }
.tl-grid .tl-gh { display: flex; flex-direction: column; align-items: center; line-height: 1.25; }
.tl-grid .tl-gh span:first-child { color: var(--primary, #00385D); }
.tl-grid th.tl-gcol { text-align: center; min-width: 42px; }
.tl-grid th.tl-score, .tl-grid td.tl-score { text-align: right; min-width: 64px; padding-right: 12px; color: var(--primary, #00385D); font-weight: 800; }
.tl-grid td.tl-total { color: #1a1a1a; }

.tl-grid tbody tr { border-bottom: 1px solid #f0f2f5; }
.tl-grid tbody tr:hover { background: #f7f9ff; }
.tl-grid tbody tr:hover .tl-tipper { background: #f7f9ff; }
.tl-grid tbody tr.tl-me { background: #eef4ff; }
.tl-grid tbody tr.tl-me .tl-tipper { background: #eef4ff; }
.tl-grid td { padding: 9px 6px; vertical-align: middle; }
.tl-grid td.tl-tipper { display: table-cell; }
.tl-tipper .tl-av {
  display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px;
  border-radius: 50%; background: var(--primary, #00385D); color: #fff; font-size: 9px; font-weight: 800; margin-right: 8px; vertical-align: middle;
}
.tl-tipper .tl-uname { font-weight: 700; color: var(--primary, #00385D); }

.tl-cell { text-align: center; white-space: nowrap; }
.tl-flag { display: inline-flex; width: 18px; height: 13px; border-radius: 2px; overflow: hidden; border: 1px solid rgba(0,0,0,0.12); vertical-align: middle; }
.tl-flag span { flex: 1; }
.tl-mark { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border-radius: 50%; font-size: 10px; font-weight: 800; color: #fff; margin-left: 3px; vertical-align: middle; }
.tl-mark.ok { background: #16a34a; }
.tl-mark.no { background: #dc2626; }
.tl-dash { color: #cbd5e1; }
.tl-paren { font-size: 10px; color: #9ca3af; font-weight: 600; }
.tl-empty { text-align: center; padding: 30px; color: var(--text2, #64748b); }

/* ── Results Tab ──────────────────────────────────────────────────── */
.res-list { display: flex; flex-direction: column; gap: 24px; padding: 4px 0 20px; }
.res-round-header {
  font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text2, #64748b); padding: 0 0 8px; border-bottom: 2px solid var(--border, #e5e7eb);
  margin-bottom: 10px;
}
.res-card {
  background: #fff; border: 1px solid var(--border, #e5e7eb); border-radius: 10px;
  padding: 14px 16px; margin-bottom: 8px;
}
.res-card--done { border-left: 3px solid var(--primary, #00385D); }
.res-teams {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.res-team { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; flex: 1; }
.res-team--away { justify-content: flex-end; text-align: right; }
.res-score {
  font-size: 22px; font-weight: 900; color: var(--primary, #00385D);
  display: flex; align-items: center; gap: 6px; white-space: nowrap;
}
.res-score--pending { font-size: 14px; color: var(--text2, #64748b); font-weight: 600; }
.res-score-sep { color: var(--text3, #9ca3af); font-weight: 400; }
.res-meta { font-size: 11px; color: var(--text3, #9ca3af); margin-top: 6px; }
.res-events-row {
  display: flex; gap: 8px; margin-top: 10px; padding-top: 10px;
  border-top: 1px dashed var(--border, #e5e7eb);
}
.res-events-team { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.res-events-team--away { align-items: flex-end; text-align: right; }
.res-event { font-size: 12px; color: var(--text2, #555); }
.res-event-type { font-weight: 700; color: var(--primary, #00385D); }
.res-event-pts { color: var(--text3, #9ca3af); }
