* { font-family: 'Sarabun', sans-serif; }

.tab-btn {
  padding: .75rem 1rem;
  color: #ecfdf5;
  font-weight: 600;
  border-bottom: 3px solid transparent;
  transition: all .2s;
}
.tab-btn:hover { background: rgba(255,255,255,.1); }
.tab-btn.active { background: rgba(255,255,255,.15); border-bottom-color: #fbbf24; }

.group-card {
  background: #fff;
  border-radius: .75rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  overflow: hidden;
}
.group-card.newbie  { border-top: 4px solid #f97316; }
.group-card.general { border-top: 4px solid #10b981; }

.match-row { transition: background .2s; }
.match-row:hover { background: #f8fafc; }

.badge { display: inline-block; padding: .2rem .5rem; border-radius: .375rem; font-size: .75rem; font-weight: 600; }
.badge-newbie  { background: #fed7aa; color: #9a3412; }
.badge-general { background: #a7f3d0; color: #065f46; }
.badge-done       { background: #dcfce7; color: #166534; }
.badge-pending    { background: #fef3c7; color: #92400e; }
.badge-exhibition { background: linear-gradient(135deg, #FFD700, #B8860B); color: #4A3000; border: none; }
.badge-guest      { background: #dbeafe; color: #1e40af; }

.bracket-match {
  display: flex;
  flex-direction: column;
  border: 1px solid #cbd5e1;
  border-radius: .5rem;
  background: #fff;
  min-width: 300px;
  max-width: 380px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.bracket-team {
  padding: .6rem .75rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: .5rem;
  min-height: 64px;          /* ← ทำให้สูงเท่ากันทุกใบ */
}
.bracket-team:last-of-type { border-bottom: none; }
.bracket-team.winner {
  background: linear-gradient(to right, #ecfdf5, #d1fae5);
  font-weight: 600;
}
.bracket-team.winner .text-emerald-700 {
  color: #065f46;
}
.bracket-team.empty {
  background: #fafafa;
}

.group-card tbody tr:first-child.bg-emerald-50 { border-left: 3px solid #10b981; }

@media (max-width: 640px) {
  .group-card td, .group-card th { padding: .4rem .5rem; }
}
@media print {
  nav, .no-print { display: none !important; }
}