/* ============================================================
   FEROCIA SPORTS CENTER — TOURNAMENT STYLES
   Completely separate from main app styles
   ============================================================ */

/* ─── LAYOUT ──────────────────────────────────────────────── */
#t-content { padding: 0; }

.t-loading { text-align:center; padding:48px; color:#6b7a99; font-size:13px; font-weight:600; }
.t-empty   { text-align:center; padding:40px; color:#6b7a99; font-size:13px; font-weight:500; }
.t-empty-sm{ color:#6b7a99; font-size:13px; font-weight:500; padding:12px 0; }
.t-hint    { font-size:11px; color:#6b7a99; font-weight:500; }

/* ─── HEADER BAR ──────────────────────────────────────────── */
/* ── TOURNAMENT DETAIL PAGE ─────────────────────────────── */
.td-header{background:white;border:0.5px solid #e0e7f5;border-radius:12px;padding:20px 28px;display:flex;align-items:center;justify-content:space-between;gap:20px;box-shadow:0 1px 4px rgba(23,76,204,0.06);}
.td-identity{flex:1;}
.td-name{font-family:'Bebas Neue',sans-serif;font-size:30px;color:#0d1f4a;letter-spacing:1px;line-height:1;margin-bottom:4px;}
.td-date{font-size:12px;font-weight:600;color:#6b7a99;display:flex;align-items:center;gap:5px;}
.td-meta{display:flex;align-items:center;gap:16px;flex-shrink:0;}
.td-meta-item{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;}
.td-meta-val{font-family:'Bebas Neue',sans-serif;font-size:22px;color:#0d1f4a;line-height:1;}
.td-meta-lbl{font-size:9px;font-weight:700;letter-spacing:.5px;text-transform:uppercase;color:#6b7a99;}
.td-meta-sep{width:1px;height:36px;background:#e0e7f5;flex-shrink:0;}
.td-status-chip{font-size:9px;font-weight:800;letter-spacing:.5px;text-transform:uppercase;padding:3px 10px;border-radius:99px;}
.td-action-bar{background:white;border:0.5px solid #e0e7f5;border-radius:12px;padding:10px 20px;display:flex;align-items:center;gap:8px;justify-content:flex-end;box-shadow:0 1px 4px rgba(23,76,204,0.06);}
/* Division tabs */
.td-div-tab{display:flex;flex-direction:column;align-items:flex-start;padding:12px 16px;border-radius:10px;border:0.5px solid #e0e7f5;background:#f8f9ff;min-width:160px;transition:all .15s;}
.td-div-tab.active{background:#174CCC;border-color:#174CCC;box-shadow:0 4px 14px rgba(23,76,204,0.25);}
.td-div-tab-name{font-size:12px;font-weight:800;color:#0d1f4a;margin-bottom:4px;}
.td-div-tab.active .td-div-tab-name{color:white;}
.td-div-tab-intel{font-size:10px;font-weight:600;color:#6b7a99;line-height:1.5;margin-bottom:4px;}
.td-div-tab.active .td-div-tab-intel{color:rgba(255,255,255,0.75);}
.td-div-status-pill{display:inline-block;font-size:8px;font-weight:800;letter-spacing:.5px;text-transform:uppercase;padding:2px 7px;border-radius:99px;}
/* Setup progression steps */
.td-step-icon{width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:13px;z-index:1;border:2px solid #e0e7f5;background:white;position:relative;}
.td-step-icon.done{background:#24BC96;border-color:#24BC96;color:white;}
.td-step-icon.current{background:#174CCC;border-color:#174CCC;color:white;font-size:10px;font-weight:800;}
.td-step-icon.locked{background:#f4f5f8;border-color:#e0e7f5;}
.td-step-lbl{font-size:9px;font-weight:700;color:#6b7a99;margin-top:6px;text-align:center;letter-spacing:.3px;}
.td-step-lbl.done{color:#24BC96;}
.td-step-lbl.current{color:#174CCC;font-weight:800;}
.td-step-lbl.locked{color:#b0bbd6;}
.td-step-conn{background:#e0e7f5;flex:1;height:2px;margin-top:-16px;}
.td-step-conn.done{background:#24BC96;}

.t-phase-card {
  background:#fff; border:0.5px solid #d6dff5; border-radius:12px;
  padding:20px 24px; margin-bottom:16px;
}
.t-phase-disabled { opacity:.5; pointer-events:none; }
.t-phase-header {
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom:16px; flex-wrap:wrap; gap:8px;
}
.t-phase-title {
  display:flex; align-items:center; gap:10px;
  font-size:14px; font-weight:800; color:#0d1f4a;
}
.t-phase-num {
  width:28px; height:28px; background:#174CCC; color:#fff;
  border-radius:50%; display:flex; align-items:center; justify-content:center;
  font-size:13px; font-weight:800; flex-shrink:0;
}
.t-team-count    { font-size:11px; color:#6b7a99; font-weight:600; background:#f4f6fc; padding:3px 10px; border-radius:99px; }
.t-progress-label{ font-size:11px; color:#6b7a99; font-weight:600; }

/* ─── PROGRESS BAR ────────────────────────────────────────── */
.t-progress-bar {
  height:6px; background:#f4f6fc; border-radius:99px; margin-bottom:16px; overflow:hidden;
}
.t-progress-fill { height:100%; background:linear-gradient(90deg,#174CCC,#24BC96); border-radius:99px; transition:width .4s; }

/* ─── TEAMS GRID ──────────────────────────────────────────── */
.t-teams-grid { display:flex; flex-direction:column; gap:8px; }
.t-team-chip {
  display:flex; align-items:center; gap:12px;
  padding:10px 14px; background:#f4f6fc; border-radius:8px;
  border:0.5px solid #d6dff5;
}
.t-team-seed {
  width:28px; height:28px; background:#174CCC; color:#fff;
  border-radius:50%; display:flex; align-items:center; justify-content:center;
  font-size:12px; font-weight:800; flex-shrink:0;
}
.t-team-info { flex:1; }
.t-team-name    { font-size:13px; font-weight:700; color:#0d1f4a; }
.t-team-players { font-size:11px; color:#6b7a99; font-weight:500; margin-top:2px; }

/* ─── ROUND ROBIN GRID ────────────────────────────────────── */
.t-rr-grid { display:flex; flex-direction:column; gap:12px; margin-bottom:20px; }
.t-round-block { }
.t-round-label  { font-size:10px; font-weight:800; letter-spacing:1.5px; text-transform:uppercase; color:#6b7a99; margin-bottom:6px; }
.t-round-matches{ display:flex; flex-direction:column; gap:4px; }

.t-match-row {
  display:flex; align-items:center; gap:12px;
  padding:10px 14px; border-radius:8px; cursor:pointer;
  transition:all .15s; border:0.5px solid transparent;
}
.t-match-pending { background:#f4f6fc; border-color:#d6dff5; }
.t-match-pending:hover { border-color:#174CCC; background:#e8f0ff; }
.t-match-done   { background:#fff; border-color:#d6dff5; }
.t-match-done:hover { border-color:#174CCC; }
.t-match-court  { font-size:10px; font-weight:800; color:#6b7a99; width:24px; flex-shrink:0; }
.t-match-teams  { flex:1; display:flex; align-items:center; gap:8px; }
.t-match-team   { font-size:13px; font-weight:600; color:#0d1f4a; }
.t-match-vs     { font-size:10px; color:#6b7a99; font-weight:700; }
.t-winner       { color:#24BC96; font-weight:800; }
.t-match-score  { display:flex; align-items:center; gap:4px; min-width:60px; justify-content:flex-end; }
.t-score        { font-size:14px; font-weight:800; color:#6b7a99; }
.t-score-win    { color:#174CCC; }
.t-score-sep    { font-size:12px; color:#6b7a99; }
.t-score-pending{ font-size:13px; color:#d6dff5; }

.t-bye-row   { display:flex; align-items:center; gap:8px; padding:6px 14px; }
.t-bye-label { font-size:9px; font-weight:800; letter-spacing:1px; background:#fde8d8; color:#F26024; padding:2px 8px; border-radius:99px; }
.t-bye-team  { font-size:12px; color:#6b7a99; }

/* ─── STANDINGS TABLE ─────────────────────────────────────── */
.t-standings-table { margin-top:20px; border-top:1.5px solid #d6dff5; padding-top:16px; }
.t-standings-title { font-size:11px; font-weight:800; letter-spacing:1.5px; text-transform:uppercase; color:#6b7a99; margin-bottom:12px; }
.t-table { width:100%; border-collapse:collapse; font-size:13px; }
.t-table th { text-align:left; padding:8px 12px; font-size:10px; font-weight:800; color:#6b7a99; text-transform:uppercase; letter-spacing:.5px; border-bottom:1.5px solid #d6dff5; }
.t-table td { padding:10px 12px; border-bottom:0.5px solid #d6dff5; }
.t-table tr:last-child td { border-bottom:none; }
.t-row-qualify { background:#f4f6fc; }
.t-rank { display:inline-flex; align-items:center; justify-content:center; width:26px; height:26px; border-radius:50%; font-size:12px; font-weight:800; background:#f4f6fc; color:#6b7a99; }
.t-rank-1 { background:#FFD700; color:#7a5800; }
.t-rank-2 { background:#C0C0C0; color:#555; }
.t-rank-3 { background:#CD7F32; color:#fff; }
.t-team-cell  { font-weight:700; color:#0d1f4a; }
.t-win-cell   { color:#24BC96; font-weight:700; }
.t-loss-cell  { color:#F26024; font-weight:700; }
.t-diff-cell  { font-weight:700; }
.t-diff-pos   { color:#24BC96; }
.t-diff-neg   { color:#F26024; }

/* ─── STANDINGS PREVIEW ───────────────────────────────────── */
.t-standings-preview { }
.t-standing-preview-row { display:flex; align-items:center; gap:10px; padding:8px 0; border-bottom:0.5px solid #d6dff5; }
.t-standing-preview-row:last-child { border-bottom:none; }
.t-seed-badge { width:24px; height:24px; border-radius:50%; background:#174CCC; color:#fff; font-size:11px; font-weight:800; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.t-standing-name   { flex:1; font-size:13px; font-weight:700; color:#0d1f4a; }
.t-standing-record { font-size:12px; color:#6b7a99; font-weight:600; }

/* ─── BRACKET ─────────────────────────────────────────────── */
.t-bracket { overflow-x:auto; }
.t-bracket-rounds {
  display:flex; gap:24px; padding:20px 0; min-width:max-content;
}
.t-bracket-col {
  display:flex; flex-direction:column; gap:16px; min-width:200px;
}
.t-bracket-round-label {
  font-size:10px; font-weight:800; letter-spacing:1.5px; text-transform:uppercase;
  color:#174CCC; text-align:center; margin-bottom:4px;
}
.t-bracket-match {
  border:1.5px solid #d6dff5; border-radius:10px; overflow:hidden;
  cursor:pointer; transition:all .15s; background:#fff;
}
.t-bracket-match:hover { border-color:#174CCC; box-shadow:0 2px 12px rgba(23,76,204,.12); }
.t-bracket-done { border-color:#d6dff5; }
.t-bracket-team {
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 14px; font-size:13px; font-weight:600; color:#0d1f4a;
  transition:background .15s;
}
.t-bracket-winner { background:#e8f0ff; color:#174CCC; font-weight:800; }
.t-bracket-tbd    { color:#d6dff5; font-style:italic; }
.t-bracket-score  { font-size:16px; font-weight:800; color:#6b7a99; }
.t-bracket-score-win { color:#174CCC; }
.t-bracket-divider{ height:1px; background:#d6dff5; }

/* ─── PODIUM ──────────────────────────────────────────────── */
.t-podium {
  display:flex; justify-content:center; align-items:flex-end;
  gap:16px; margin-bottom:32px; flex-wrap:wrap;
}
.t-podium-slot  { display:flex; flex-direction:column; align-items:center; gap:6px; flex:1; max-width:180px; }
.t-podium-crown { font-size:24px; }
.t-podium-medal { font-size:32px; }
.t-podium-team  { font-size:14px; font-weight:800; text-align:center; color:#0d1f4a; }
.t-champion     { color:#174CCC; font-size:16px; }
.t-podium-label { font-size:11px; font-weight:700; color:#6b7a99; text-transform:uppercase; letter-spacing:.5px; }
.t-podium-players { font-size:11px; font-weight:600; color:#6b7a99; text-align:center; line-height:1.4; max-width:140px; }
.t-podium-bar   { width:100%; border-radius:8px 8px 0 0; }
.t-bar-gold   { background:linear-gradient(180deg,rgba(255,215,0,.5),rgba(255,215,0,.15)); border:1.5px solid rgba(255,215,0,.7); height:80px; }
.t-bar-silver { background:linear-gradient(180deg,rgba(150,150,150,.4),rgba(150,150,150,.1)); border:1.5px solid rgba(150,150,150,.6); height:60px; }
.t-bar-bronze { background:linear-gradient(180deg,rgba(205,127,50,.5),rgba(205,127,50,.15)); border:1.5px solid rgba(205,127,50,.5); height:44px; }

/* ─── SCORE MODAL ─────────────────────────────────────────── */

/* ─── FORMS ───────────────────────────────────────────────── */
.t-card { background:#fff; border:0.5px solid #d6dff5; border-radius:12px; padding:24px; margin-bottom:16px; }
.t-form-group { display:flex; flex-direction:column; gap:6px; margin-bottom:16px; }
.t-form-row   { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.t-label      { font-size:10px; font-weight:800; letter-spacing:.8px; text-transform:uppercase; color:#6b7a99; }
.t-input      { padding:10px 14px; border:0.5px solid #d6dff5; border-radius:6px; font-size:14px; font-family:'Montserrat',sans-serif; color:#0d1f4a; outline:none; transition:border-color .15s; }
.t-input:focus{ border-color:#174CCC; box-shadow:0 0 0 3px rgba(23,76,204,.1); }
.t-checkbox-group { display:flex; flex-direction:column; gap:10px; }
.t-checkbox-label { display:flex; align-items:center; gap:10px; font-size:13px; font-weight:600; cursor:pointer; }
.t-select-sm  { padding:6px 10px; border:0.5px solid #d6dff5; border-radius:6px; font-size:12px; font-family:'Montserrat',sans-serif; font-weight:600; outline:none; }
.t-form-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:20px; }

/* ─── MODAL ───────────────────────────────────────────────── */
.t-modal-bg {
  display:none; position:fixed; inset:0; background:rgba(13,31,74,.5);
  backdrop-filter:blur(4px); z-index:500; align-items:center; justify-content:center; padding:16px;
}
.t-modal-bg.t-modal-open { display:flex; }
.t-modal {
  background:#fff; border-radius:16px; padding:28px; width:100%; max-width:500px;
  max-height:90vh; overflow-y:auto;
  box-shadow:0 20px 60px rgba(13,31,74,.3);
  position:relative;
}
.t-modal-title { font-size:16px; font-weight:800; color:#0d1f4a; margin-bottom:20px; }

/* ─── SINGLES GAME ROWS ───────────────────────────────────── */
.t-singles-header {
  display:grid; grid-template-columns:1fr auto 1fr;
  gap:8px; align-items:center; margin-bottom:8px;
}
.t-singles-player-col {
  font-size:13px; font-weight:800; color:#0d1f4a; text-align:center;
}
.t-game-row {
  display:grid; grid-template-columns:60px 1fr auto 1fr;
  gap:8px; align-items:center; margin-bottom:8px;
}
.t-game-label {
  font-size:10px; font-weight:800; letter-spacing:.5px;
  text-transform:uppercase; color:#6b7a99;
}
.t-game-score {
  text-align:center; font-size:20px; font-weight:800;
  border:2px solid #d6dff5; border-radius:8px; padding:8px 4px;
  font-family:'Montserrat',sans-serif; color:#174CCC; outline:none; width:100%;
  transition:border-color .15s;
}
.t-game-score:focus { border-color:#174CCC; }
.t-game-sep {
  font-size:14px; font-weight:700; color:#6b7a99; text-align:center;
}

/* ─── FORFEIT ─────────────────────────────────────────────── */
.t-forfeit-check-label {
  display:flex; align-items:center; gap:6px; cursor:pointer;
  font-size:12px; font-weight:700; color:#F26024;
  margin-top:8px; padding:6px 10px;
  background:#fde8d8; border-radius:6px;
  text-transform:uppercase; letter-spacing:.5px;
}
.t-forfeit-check-label input[type=checkbox] {
  width:14px; height:14px; cursor:pointer; accent-color:#F26024;
}
.t-forfeit-badge {
  display:inline-block; font-size:9px; font-weight:800; letter-spacing:1px;
  text-transform:uppercase; padding:2px 6px; border-radius:4px;
  background:#fde8d8; color:#F26024; margin-left:6px; vertical-align:middle;
}

/* ─── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width:600px) {

  .t-form-row { grid-template-columns:1fr; }
  .t-bracket-col { min-width:160px; }
  .t-bracket-team { font-size:11px; padding:8px 10px; }
}

/* ─── GROUPS ──────────────────────────────────────────────── */
.t-group-block {
  background:#f9fbfe; border:1px solid #d6dff5; border-radius:8px;
  padding:14px; margin-bottom:14px;
}
.t-group-block:last-child { margin-bottom:0; }
.t-group-header {
  display:flex; align-items:center; gap:10px; margin-bottom:10px;
  padding-bottom:8px; border-bottom:1px solid #d6dff5;
}
.t-group-badge {
  display:inline-block; font-size:11px; font-weight:800;
  letter-spacing:1px; text-transform:uppercase; color:#fff;
  background:#174CCC; padding:4px 10px; border-radius:99px;
}
.t-group-team-count {
  font-size:11px; font-weight:700; color:#6b7a99;
}
.t-group-rr-grid { margin-bottom:8px; }

.t-group-tag {
  display:inline-block; font-size:10px; font-weight:700;
  background:#e8f0ff; color:#174CCC; padding:2px 8px;
  border-radius:99px; margin-left:6px;
}
