/* ==========================================================================
   남양주 피클볼 클럽 (NPC) 분기대회 스마트 매니저 - tournament.css
   ========================================================================== */

:root {
  --bg-main: #1f242d;
  --bg-card: #2b303c;
  --bg-card-sub: #363c4a;
  --bg-card-border: rgba(255, 255, 255, 0.12);

  --color-blue-team: #3b82f6;
  --color-blue-bg: rgba(59, 130, 246, 0.15);
  --color-blue-border: rgba(59, 130, 246, 0.4);

  --color-white-team: #f59e0b;
  --color-white-bg: rgba(245, 158, 11, 0.15);
  --color-white-border: rgba(245, 158, 11, 0.4);

  --primary-emerald: #10b981;
  --primary-rose: #f43f5e;
  --primary-cyan: #38bdf8;
  --primary-amber: #f59e0b;

  --text-primary: #f8fafc;
  --text-secondary: #e2e8f0;
  --text-muted: #94a3b8;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;

  --font-sans: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.5;
  min-height: 100vh;
}

/* 웹 전용 컨테이너 */
.app-shell {
  max-width: 900px;
  margin: 0 auto;
  padding: 14px 16px 60px 16px;
}

/* 인쇄 전용 영역 기본 숨김 */
.print-only-container {
  display: none;
}

/* 1. 글로벌 헤더 */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-back-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.header-title-box {
  display: flex;
  flex-direction: column;
}

.badge-mini {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--primary-cyan);
}

.header-title-box h1 {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-action-icon {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 11px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-action-icon:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.btn-print {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #a7f3d0;
}

.btn-share {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fef08a;
}

/* 2. 실시간 청백 스코어보드 전광판 */
.live-scoreboard-card {
  background: linear-gradient(145deg, #242934, #1b1e26);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
}

.scoreboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.status-live-dot {
  width: 8px;
  height: 8px;
  background-color: #ef4444;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  box-shadow: 0 0 8px #ef4444;
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.scoreboard-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  flex: 1;
}

.match-progress-badge {
  background: rgba(255, 255, 255, 0.1);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: #cbd5e1;
}

.scoreboard-body {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.team-score-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 8px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: all 0.3s;
}

.team-score-box.team-blue {
  background: var(--color-blue-bg);
  border-color: var(--color-blue-border);
}

.team-score-box.team-white {
  background: var(--color-white-bg);
  border-color: var(--color-white-border);
}

.team-badge {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: 12px;
  margin-bottom: 4px;
}

.team-blue .team-badge {
  background: var(--color-blue-team);
  color: #ffffff;
}

.team-white .team-badge {
  background: var(--color-white-team);
  color: #1e293b;
}

.team-captain-select-wrapper {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 2px 8px;
  margin-bottom: 6px;
  transition: all 0.2s;
}

.team-captain-select-wrapper:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.35);
}

.captain-crown-icon {
  font-size: 11px;
}

.captain-select {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  font-family: inherit;
  padding: 1px 0;
}

.captain-select option {
  background: #1e2430;
  color: #fff;
  font-size: 12px;
}

.roster-captain-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

.roster-captain-select {
  background: #1e2430;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fbbf24;
  font-weight: 700;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 6px;
  outline: none;
  cursor: pointer;
}

.badge-captain-crown {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.btn-make-captain {
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: #fde68a;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-make-captain:hover {
  background: rgba(251, 191, 36, 0.25);
  color: #fff;
}

.score-display {
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -1px;
}

.team-blue .score-display {
  color: #60a5fa;
  text-shadow: 0 0 20px rgba(96, 165, 250, 0.4);
}

.team-white .score-display {
  color: #fbbf24;
  text-shadow: 0 0 20px rgba(251, 191, 36, 0.4);
}

.score-subtext {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 4px;
}

.versus-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.vs-text {
  font-size: 16px;
  font-weight: 900;
  color: #64748b;
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 10px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.score-bar-track {
  height: 8px;
  background: #1e2430;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  width: 100%;
}

.score-bar-blue {
  background: linear-gradient(90deg, #2563eb, #60a5fa);
  height: 100%;
  transition: width 0.4s ease;
}

.score-bar-white {
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
  height: 100%;
  transition: width 0.4s ease;
}

/* 3. 탭 네비게이션 */
.nav-tabs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 16px;
  background: var(--bg-card);
  padding: 5px;
  border-radius: var(--radius-md);
  border: 1px solid var(--bg-card-border);
}

.nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.nav-tab .tab-icon {
  font-size: 16px;
}

.nav-tab .tab-name {
  font-size: 11px;
  font-weight: 700;
}

.nav-tab.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* 공통 카드 스타일 */
.card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 14px;
}

.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.card-header-row h3 {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}

.section-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.5;
}

.tag-counter {
  font-size: 12px;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.15);
  color: #7dd3fc;
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

/* 필터 바 */
.filter-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.court-filter-chips {
  display: flex;
  gap: 6px;
}

.court-chip {
  padding: 6px 12px;
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.court-chip.active {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #ffffff;
}

/* 매치 리스트 & 카드 */
.match-list-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.match-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.match-card:hover {
  border-color: rgba(255, 255, 255, 0.25);
}

.match-card.finished {
  background: rgba(43, 48, 60, 0.85);
  border-left: 4px solid var(--primary-emerald);
}

.match-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 12px;
}

.match-badge-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.match-no-badge {
  background: #475569;
  color: #fff;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 11px;
}

.match-type-badge {
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 11px;
}

.match-type-badge.type-남복 {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.match-type-badge.type-여복 {
  background: rgba(244, 63, 94, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(244, 63, 94, 0.4);
}

.match-type-badge.type-혼복 {
  background: rgba(168, 85, 247, 0.2);
  color: #d8b4fe;
  border: 1px solid rgba(168, 85, 247, 0.4);
}

.match-rating-badge {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
}

.match-court-badge {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 11px;
}

/* 매치 대결 구도 그리드 */
.match-battle-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.battle-team-side {
  padding: 10px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.2s;
}

.battle-team-side.side-blue {
  background: var(--color-blue-bg);
  border: 1px solid var(--color-blue-border);
}

.battle-team-side.side-white {
  background: var(--color-white-bg);
  border: 1px solid var(--color-white-border);
}

.battle-team-side.winner {
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
  border-color: var(--primary-emerald) !important;
}

.players-name-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.player-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.player-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.player-rating-sub {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.battle-center-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.score-inputs-pair {
  display: flex;
  align-items: center;
  gap: 6px;
}

.score-input {
  width: 44px;
  height: 38px;
  background: #1a1e27;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  text-align: center;
}

.score-input:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
}

.score-colon {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-muted);
}

/* 원클릭 승패 빠른 버튼 */
.quick-win-buttons {
  display: flex;
  gap: 4px;
}

.btn-win-tag {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-win-blue {
  background: #2563eb;
  color: #fff;
}

.btn-win-blue:hover {
  background: #1d4ed8;
}

.btn-win-white {
  background: #d97706;
  color: #fff;
}

.btn-win-white:hover {
  background: #b45309;
}

.btn-win-clear {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

/* TAB 2: 팀 로스터 & 출석 체크 */
.teams-roster-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

@media (max-width: 640px) {
  .teams-roster-grid {
    grid-template-columns: 1fr;
  }
}

.team-roster-card {
  padding: 14px;
}

.team-roster-card.card-blue {
  border-top: 4px solid var(--color-blue-team);
}

.team-roster-card.card-white {
  border-top: 4px solid var(--color-white-team);
}

.team-roster-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.team-roster-header h4 {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}

.rating-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: 10px;
}

.player-chips-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.player-chip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  font-size: 13px;
}

.player-info-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gender-dot {
  font-size: 10px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
}

.gender-dot.M {
  background: rgba(59, 130, 246, 0.25);
  color: #93c5fd;
}

.gender-dot.F {
  background: rgba(244, 63, 94, 0.25);
  color: #fca5a5;
}

.player-name-text {
  font-weight: 700;
  color: #fff;
}

.player-actions-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-rating {
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
}

.badge-rating.A { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }
.badge-rating.B { background: rgba(245, 158, 11, 0.2); color: #fde68a; }
.badge-rating.C { background: rgba(16, 185, 129, 0.2); color: #a7f3d0; }

.btn-trade {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 4px;
  color: var(--text-secondary);
  font-size: 11px;
  padding: 2px 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-trade:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.btn-exclude {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-exclude:hover {
  background: rgba(239, 68, 68, 0.28);
  color: #fff;
}

.btn-restore {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-restore:hover {
  background: rgba(16, 185, 129, 0.3);
  color: #fff;
}

.excluded-chip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px dashed rgba(245, 158, 11, 0.4);
  border-radius: 6px;
  font-size: 13px;
  transition: all 0.2s;
}

.excluded-chip-row:hover {
  background: rgba(0, 0, 0, 0.35);
}

/* 47명 출석 체크 그리드 */
.members-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.member-check-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 13px;
}

.member-check-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.member-check-item.checked {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
}

.member-check-item input[type="checkbox"] {
  accent-color: var(--primary-emerald);
  cursor: pointer;
}

/* TAB 3: 자동 대진 생성기 설정 폼 */
.config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.config-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.config-field label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.config-field input,
.config-field select {
  padding: 9px 12px;
  background: #1a1e27;
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 13px;
  font-family: inherit;
}

.generator-action-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.btn-generate-big {
  flex: 1;
  padding: 14px;
  font-size: 15px;
  font-weight: 800;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-generate-big:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.6);
}

/* 분석 리포트 카드 */
.analysis-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.stat-metric-box {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-metric-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.stat-metric-val {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}

/* TAB 4: 식순, 찬조, 체크리스트 */
.sequence-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sequence-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.seq-num-badge {
  background: #3b82f6;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  min-width: 26px;
  text-align: center;
}

.seq-content {
  flex: 1;
}

.seq-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}

.seq-desc {
  font-size: 12px;
  color: var(--text-muted);
}

.seq-person {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary-amber);
  margin-top: 4px;
}

/* 찬조 테이블 */
.sponsor-table-wrapper {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.data-table th,
.data-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.data-table th {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 12px;
}

.data-table td {
  color: var(--text-primary);
}

/* 체크리스트 */
.checklist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}

.checklist-item input[type="checkbox"] {
  accent-color: var(--primary-cyan);
}

/* 모달 */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.open {
  display: flex;
}

.modal-dialog {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 420px;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
}

.modal-header {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
}

.modal-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.form-group input,
.form-group select {
  padding: 9px 12px;
  background: #1a1e27;
  border: 1px solid var(--bg-card-border);
  border-radius: 6px;
  color: #fff;
  font-family: inherit;
}

.modal-footer {
  padding: 12px 18px;
  background: rgba(0, 0, 0, 0.15);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* 버튼 공통 */
.btn-primary {
  background: #3b82f6;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary:hover {
  background: #2563eb;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 6px;
}

.btn-xs {
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  cursor: pointer;
}

.btn-xs.btn-highlight {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  color: #7dd3fc;
}

/* 푸터 */
.app-footer {
  text-align: center;
  padding: 24px 0 10px 0;
  font-size: 12px;
  color: var(--text-muted);
}

.app-footer .copyright {
  font-size: 11px;
  color: #64748b;
  margin-top: 4px;
}

/* ==========================================================================
   프린트 전용 공식 결과지 스타일 (@media print)
   '결과지 출력용.xlsx' 서식을 1:1 완벽하게 A4 한 장에 맞춤
   ========================================================================== */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt !important;
    font-family: 'Malgun Gothic', 'Pretendard', sans-serif !important;
  }

  .app-shell {
    display: none !important;
  }

  .print-only-container {
    display: block !important;
    padding: 10mm;
    margin: 0 auto;
    width: 100%;
    max-width: 210mm;
  }

  .print-sheet-title {
    text-align: center;
    font-size: 18pt;
    font-weight: 900;
    margin-bottom: 14px;
    letter-spacing: 2px;
    border-bottom: 2px solid #000;
    padding-bottom: 8px;
  }

  .print-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    font-size: 9.5pt;
  }

  .print-table th,
  .print-table td {
    border: 1px solid #333333;
    padding: 4px 6px;
    line-height: 1.3;
  }

  .print-table th {
    background-color: #f1f5f9 !important;
    font-weight: 800;
  }

  .print-table .col-no { width: 5%; }
  .print-table .col-type { width: 8%; font-weight: 700; }
  .print-table .col-blue { width: 33%; font-weight: 600; }
  .print-table .col-score { width: 13%; font-weight: 800; font-size: 11pt; }
  .print-table .col-white { width: 33%; font-weight: 600; }
  .print-table .col-court { width: 8%; }

  .print-total-row {
    font-weight: 900;
    background-color: #f8fafc !important;
    font-size: 11pt;
  }
}
