/* ============================================================
   Tournament Bracket Manager — styles.css
   Version: 3.15.16
   Theme: Clean professional light — high contrast, easy to read
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=DM+Mono:wght@400;500&display=swap');

*, *:before, *:after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Brand */
  --primary:        #2563eb;
  --primary-dark:   #1d4ed8;
  --primary-light:  #eff6ff;
  --primary-border: #bfdbfe;

  /* Semantic */
  --success:        #059669;
  --success-bg:     #ecfdf5;
  --success-border: #a7f3d0;
  --warning:        #d97706;
  --warning-bg:     #fffbeb;
  --warning-border: #fcd34d;
  --danger:         #dc2626;
  --danger-bg:      #fef2f2;
  --danger-border:  #fecaca;

  /* Neutrals — much brighter, easy to read */
  --gray-50:   #f8fafc;
  --gray-100:  #f1f5f9;
  --gray-200:  #e2e8f0;
  --gray-300:  #cbd5e1;
  --gray-400:  #94a3b8;
  --gray-500:  #64748b;
  --gray-600:  #475569;
  --gray-700:  #334155;
  --gray-800:  #1e293b;
  --gray-900:  #0f172a;

  /* Surface */
  --surface:        #ffffff;
  --surface-raised: #ffffff;
  --bg:             #f1f5f9;

  /* Bracket sections */
  --winners-bg:     #eff6ff;
  --winners-border: #93c5fd;
  --losers-bg:      #fefce8;
  --losers-border:  #fcd34d;
  --finals-bg:      #f0fdf4;
  --finals-border:  #86efac;

  /* Misc */
  --radius:     6px;
  --radius-lg:  10px;
  --shadow:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md:  0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.05);
  --shadow-lg:  0 10px 25px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
}

/* ── Base ───────────────────────────────────────────────── */
body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--gray-800);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── App Shell ──────────────────────────────────────────── */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
.app-main {
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 24px;
}

/* ── Header ─────────────────────────────────────────────── */
.app-header {
  background: var(--gray-900);
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  height: 56px;
  gap: 32px;
}
.app-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -.01em;
}
.logo-icon { font-size: 20px; }

.main-nav { display: flex; gap: 4px; }
.nav-link {
  padding: 6px 14px;
  border-radius: var(--radius);
  text-decoration: none;
  color: rgba(255,255,255,.65);
  font-size: 14px;
  font-weight: 500;
  transition: all .15s;
}
.nav-link:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
}
.nav-link.active {
  background: var(--primary);
  color: #fff;
}

.version-badge {
  margin-left: auto;
  font-size: 11px;
  color: rgba(255,255,255,.4);
  background: rgba(255,255,255,.08);
  padding: 2px 8px;
  border-radius: 10px;
  font-family: 'DM Mono', monospace;
}

/* ── Footer ─────────────────────────────────────────────── */
.app-footer {
  text-align: center;
  padding: 16px 24px;
  font-size: 12px;
  color: var(--gray-400);
  border-top: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  background: var(--bg);
}

/* ── Page Header ────────────────────────────────────────── */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}
.page-header h1 {
  font-size: 26px;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -.02em;
  line-height: 1.2;
}
.subtitle {
  color: var(--gray-500);
  font-size: 14px;
  margin-top: 3px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.progress-text { font-size: 13px; color: var(--gray-500); }

/* ── Sections ───────────────────────────────────────────── */
.section { margin-top: 32px; }
.section h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: 14px;
  letter-spacing: -.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section h2::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 16px;
  background: var(--primary);
  border-radius: 2px;
  flex-shrink: 0;
}
.sub-section { margin-top: 20px; }
.sub-section h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 8px;
}

/* ── Utility ────────────────────────────────────────────── */
.loading {
  text-align: center;
  padding: 48px;
  color: var(--gray-400);
  font-size: 15px;
}
.error-message {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: #991b1b;
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.empty-state {
  text-align: center;
  padding: 48px 32px;
  color: var(--gray-400);
  background: var(--surface);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
}
.muted { color: var(--gray-500); }
.help-text { font-size: 13px; color: var(--gray-500); margin-top: 8px; }

/* ── Back button ────────────────────────────────────────── */
.btn-back {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  padding: 4px 0;
  margin-bottom: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-back:hover { color: var(--primary-dark); text-decoration: underline; }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--gray-700);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
  font-family: inherit;
}
.btn:hover { background: var(--gray-50); border-color: var(--gray-400); color: var(--gray-900); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-sm { padding: 5px 11px; font-size: 13px; }
.btn-lg { padding: 10px 24px; font-size: 15px; }
.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-700);
  border-color: var(--gray-300);
}
.btn-secondary:hover { background: var(--gray-200); border-color: var(--gray-400); }

/* ── Forms ──────────────────────────────────────────────── */
.form-card {
  background: var(--surface);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.form-card h3 {
  margin-bottom: 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-800);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group.full-width { grid-column: 1 / -1; }
.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.form-group input,
.form-group select,
.form-group textarea {
  padding: 8px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  color: var(--gray-800);
  background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.form-group textarea { min-height: 80px; resize: vertical; }
.form-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-200);
}
.form-section h3 { margin-bottom: 12px; }
.form-actions { display: flex; gap: 12px; margin-top: 16px; }
.inline-form { display: flex; gap: 8px; margin-top: 8px; }
.inline-form input {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 13px;
  font-family: inherit;
}

/* ── Stats Grid ─────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: box-shadow .15s, transform .15s;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-number {
  font-size: 34px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  font-family: 'DM Mono', monospace;
}
.stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ── Status Badges ──────────────────────────────────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
  color: #fff;
}

/* ── Tables ─────────────────────────────────────────────── */
.table-container { overflow-x: auto; border-radius: var(--radius-lg); }
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  font-size: 14px;
}
.data-table th {
  background: var(--gray-100);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gray-500);
  font-weight: 700;
  padding: 11px 14px;
  text-align: left;
  border-bottom: 2px solid var(--gray-200);
  white-space: nowrap;
}
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background .1s; }
.data-table tbody tr:hover { background: var(--gray-50); }
.row-completed { background: var(--success-bg) !important; }
.row-not-needed { background: var(--gray-50) !important; opacity: .75; }
.status-not_needed  { color: var(--warning); font-style: italic; font-size: 13px; }
.status-if_necessary { color: var(--warning); font-style: italic; font-size: 13px; }
.winner-cell { font-weight: 700; color: var(--success); }
.score-cell { font-weight: 600; font-family: 'DM Mono', monospace; white-space: nowrap; min-width: 80px; text-align: center; }
.data-table th:nth-child(4) { min-width: 80px; text-align: center; }
.data-table td:nth-child(6):not(:last-child) { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-dot { font-size: 12px; }

/* ── Tournament name in table ───────────────────────────── */
.data-table .tournament-name {
  font-weight: 600;
  color: var(--gray-900);
  font-size: 14px;
}
.data-table .tournament-meta {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 2px;
}

/* ── Two-column layout ──────────────────────────────────── */
.two-column { display: grid; grid-template-columns: 300px 1fr; gap: 24px; }
.list {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}
.list-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer;
  transition: background .12s;
  color: var(--gray-700);
  font-size: 14px;
}
.list-item:hover { background: var(--gray-50); }
.list-item.active { background: var(--primary); color: #fff; }
.list-item.active .muted { color: rgba(255,255,255,.7); }

/* ── Tag list ───────────────────────────────────────────── */
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.tag {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  color: var(--gray-600);
}

/* ── Bracket container ──────────────────────────────────── */
.bracket-container {
  background: var(--surface);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
  overflow-x: auto;
}
.bracket-title { text-align: center; margin-bottom: 24px; }
.bracket-title h2 { font-size: 18px; color: var(--gray-900); }
.bracket-title p { color: var(--gray-500); font-size: 14px; margin-top: 4px; }
.bracket-display { display: flex; flex-direction: column; gap: 32px; }
.bracket-section-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius);
  display: inline-block;
  margin-bottom: 12px;
}
.winners-title { background: var(--winners-bg); color: #1e40af; border: 1px solid var(--winners-border); }
.losers-title  { background: var(--losers-bg);  color: #92400e; border: 1px solid var(--losers-border); }
.finals-title  { background: var(--finals-bg);  color: #166534; border: 1px solid var(--finals-border); }
.bracket-rounds { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px; }
.bracket-round  { min-width: 200px; }
.round-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gray-400);
  margin-bottom: 8px;
  font-weight: 600;
}
.round-games { display: flex; flex-direction: column; gap: 8px; }
.finals-section { text-align: center; }
.finals-rounds { justify-content: center; }

/* ── Game cards ─────────────────────────────────────────── */
.game-card {
  background: var(--surface);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .15s;
  width: 200px;
  overflow: hidden;
}
.game-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.game-card-completed { border-color: var(--success-border); }
.game-card-scheduled { border-color: var(--primary-border); }
.game-card-if_necessary { border-color: var(--warning-border); border-style: dashed; }
.losers-card { border-left: 3px solid var(--losers-border); }
.final-card  { border-left: 3px solid var(--finals-border); width: 240px; }
.conditional-card { opacity: .82; }
.game-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  font-size: 11px;
}
.game-number { font-weight: 700; color: var(--gray-600); }
.conditional-label { color: var(--warning); font-style: italic; font-size: 10px; }
.game-venue {
  color: var(--gray-400);
  margin-left: auto;
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 80px;
}
.game-team {
  display: flex;
  align-items: center;
  padding: 6px 8px;
  gap: 6px;
  font-size: 13px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
}
.game-team:last-of-type { border-bottom: none; }
.team-source { font-size: 10px; color: var(--gray-400); min-width: 20px; }
.team-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-score { font-weight: 700; font-family: 'DM Mono', monospace; min-width: 20px; text-align: right; }
.team-winner { background: var(--success-bg); font-weight: 600; }
.team-winner .team-name { color: var(--success); }
.game-schedule {
  padding: 3px 8px;
  font-size: 10px;
  color: var(--gray-400);
  background: var(--gray-50);
  border-top: 1px solid var(--gray-100);
}

/* ── Modal ──────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(15,23,42,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
  backdrop-filter: blur(2px);
}
.modal {
  background: var(--surface);
  border-radius: 12px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-200);
}
.modal-header h2 { font-size: 17px; font-weight: 700; color: var(--gray-900); }
.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--gray-400);
  padding: 4px 8px;
  border-radius: var(--radius);
  transition: all .12s;
}
.modal-close:hover { background: var(--gray-100); color: var(--gray-700); }
.modal-body { padding: 20px; }
.game-matchup {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding: 16px;
  background: var(--gray-50);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
}
.matchup-team { flex: 1; text-align: center; }
.matchup-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--gray-400);
  font-weight: 600;
  letter-spacing: .04em;
  margin-bottom: 4px;
}
.matchup-name { font-weight: 700; font-size: 15px; color: var(--gray-900); }
.matchup-seed  { font-size: 12px; color: var(--gray-400); }
.matchup-vs    { font-weight: 700; color: var(--gray-300); font-size: 14px; }
.result-display {
  text-align: center;
  padding: 16px;
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.result-team { font-size: 15px; padding: 4px 0; color: var(--gray-700); }
.result-winner { font-weight: 700; color: var(--success); }
.result-winner-label { margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--gray-600); }
.score-input { display: flex; align-items: flex-end; gap: 16px; justify-content: center; margin-bottom: 16px; }
.score-team { text-align: center; }
.score-team label { display: block; font-size: 12px; font-weight: 600; color: var(--gray-600); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .04em; }
.score-field {
  width: 80px;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  padding: 8px;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius);
  font-family: 'DM Mono', monospace;
  color: var(--gray-900);
}
.score-field:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.score-separator { font-size: 24px; font-weight: 700; color: var(--gray-300); padding-bottom: 8px; }

/* ── Filter Bar ─────────────────────────────────────────── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.filter-search {
  flex: 1;
  min-width: 200px;
  padding: 8px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  color: var(--gray-800);
  transition: border-color .15s;
  background: var(--gray-50);
}
.filter-search:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); background: #fff; }
.filter-search::placeholder { color: var(--gray-400); }
.filter-select {
  padding: 8px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  background: var(--gray-50);
  color: var(--gray-700);
  min-width: 150px;
  cursor: pointer;
}
.filter-select:focus { outline: none; border-color: var(--primary); }

/* ── Hamburger Menu ─────────────────────────────────────── */
.hamburger-btn {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: rgba(255,255,255,.7);
  padding: 6px 10px;
  border-radius: var(--radius);
  transition: background .15s;
  margin-left: 12px;
  line-height: 1;
}
.hamburger-btn:hover { background: rgba(255,255,255,.1); color: #fff; }
.hb-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.45);
  z-index: 998;
}
.hb-overlay.open { display: block; }
.hb-menu {
  position: fixed;
  top: 0; right: -320px;
  width: 300px;
  height: 100vh;
  background: var(--surface);
  box-shadow: -4px 0 24px rgba(0,0,0,.15);
  z-index: 999;
  transition: right .25s ease;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.hb-menu.open { right: 0; }
.hb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--gray-900);
  border-bottom: 1px solid rgba(255,255,255,.08);
  min-height: 56px;
}
.hb-user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}
.hb-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: rgba(255,255,255,.5);
  padding: 4px 8px;
  border-radius: var(--radius);
  transition: all .15s;
  line-height: 1;
}
.hb-close:hover { background: rgba(255,255,255,.1); color: #fff; }
.hb-nav { display: flex; flex-direction: column; padding: 8px 0; }
.hb-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700);
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  transition: background .12s;
  text-align: left;
  width: 100%;
  font-family: inherit;
}
.hb-link:hover { background: var(--gray-50); color: var(--primary); }
.hb-divider { height: 1px; background: var(--gray-200); margin: 4px 16px; }
.hb-logout { color: var(--danger); }
.hb-logout:hover { background: var(--danger-bg); color: var(--danger); }

/* ── Role badges ────────────────────────────────────────── */
.user-role-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.role-admin       { background: #dc2626; color: #fff; }
.role-manager     { background: var(--primary); color: #fff; }
.role-scorekeeper { background: var(--success); color: #fff; }
.role-viewer      { background: var(--gray-400); color: #fff; }

/* ── Tournament detail breadcrumb ───────────────────────── */
.tournament-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 4px;
}
.tournament-breadcrumb a,
.tournament-breadcrumb button {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  padding: 0;
  font-family: inherit;
}
.tournament-breadcrumb a:hover,
.tournament-breadcrumb button:hover { text-decoration: underline; }
.tournament-breadcrumb span { color: var(--gray-300); }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .main-nav       { display: none; }
  .version-badge  { display: none; }
  .header-content { justify-content: space-between; }
  .hamburger-btn  { margin-left: auto; }
  .app-main       { padding: 16px 12px; }
  .stats-grid     { grid-template-columns: repeat(2, 1fr); }
  .two-column,
  .form-grid      { grid-template-columns: 1fr; }
  .filter-bar     { flex-direction: column; }
  .filter-search,
  .filter-select  { width: 100%; min-width: unset; }
  .page-header h1 { font-size: 22px; }
}