/* 반응형(가로/세로) - 명세서 9장 확정: CSS 미디어 쿼리로 처리, 별도 JS 프레임워크 없음 */

:root {
  --bg: #0b1220;
  --card: #141c2e;
  --text: #e6e9ef;
  --muted: #8b93a7;
  --accent: #3b82f6;
  --above: #22c55e;
  --mid: #94a3b8;
  --below: #ef4444;
  --border: #24304a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 8px;
}

.topbar a { color: var(--text); text-decoration: none; margin-right: 12px; }
.topbar a:hover { color: var(--accent); }

/* 관리자 메뉴 묶음 - "관리자: " 접두어를 매번 반복하는 대신 라벨 하나로 묶어서
   상단 네비게이션이 항목 늘어날수록 지저분해지는 걸 막는다 (2026-09-26 정리). */
.nav-admin-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-left: 12px;
  margin-left: 4px;
  border-left: 1px solid var(--border);
}
.nav-admin-group .muted { font-size: 12px; margin-right: 2px; }
.nav-admin-group a { margin-right: 0; }

main { padding: 16px; max-width: 1100px; margin: 0 auto; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
}

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; }
th { color: var(--muted); font-weight: 600; }

.badge { padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.above { background: rgba(34,197,94,0.15); color: var(--above); }
.badge.mid { background: rgba(148,163,184,0.15); color: var(--mid); }
.badge.below { background: rgba(239,68,68,0.15); color: var(--below); }

input[type="number"], input[type="text"], input[type="password"] {
  background: #0f1626;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 6px;
  width: 100%;
}

button {
  background: var(--accent);
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}
button:hover { opacity: 0.9; }
button.secondary { background: transparent; border: 1px solid var(--border); color: var(--text); }
button.danger { background: var(--below); }

.error { color: var(--below); font-size: 13px; margin-top: 4px; }
.muted { color: var(--muted); font-size: 13px; }

/* 회의 비교 화면: "이번 집계에 사용된 영상" 목록 (명세서 6장 "영상 식별 정보" 확정) */
details > summary { cursor: pointer; color: var(--accent); font-size: 13px; padding: 4px 0; }
.video-detail-list { list-style: none; margin: 8px 0 0; padding: 0; }
.video-detail-list li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--border); }
.video-detail-list li:last-child { border-bottom: none; }
.video-detail-list img { border-radius: 6px; flex-shrink: 0; }

/* 콜 수 입력 화면: 영상 썸네일 (2026-09-26 확정 - PC/모바일 모두 표시) */
.video-cell { display: flex; align-items: center; gap: 8px; }
.video-thumb { width: 96px; height: 54px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }

/* 인앱 알림 배너 (2026-09-26 확정: 출연자 재지정 시 이전 지정자에게 알림) */
#notification-banner:empty { display: none; }
.notification-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #2a2210; border: 1px solid #6b5510; color: #f3d98a;
  padding: 10px 16px; font-size: 14px;
}

.login-wrap {
  display: flex; align-items: center; justify-content: center; min-height: 100vh;
}
.login-box { width: 320px; max-width: 90vw; }

/* 세로(모바일) 화면에서는 표를 카드형 스크롤로 - 업로드 캘린더(.calendar-table)는
   달력 그리드 모양을 유지해야 해서 이 변환에서 제외한다(2026-10-09 추가). */
@media (max-width: 640px) {
  table:not(.calendar-table),
  table:not(.calendar-table) thead,
  table:not(.calendar-table) tbody,
  table:not(.calendar-table) th,
  table:not(.calendar-table) td,
  table:not(.calendar-table) tr { display: block; }
  table:not(.calendar-table) thead { display: none; }
  table:not(.calendar-table) tr { margin-bottom: 12px; border: 1px solid var(--border); border-radius: 8px; padding: 8px; }
  table:not(.calendar-table) td { border: none; padding: 4px 0; }
  table:not(.calendar-table) td::before { content: attr(data-label); color: var(--muted); display: inline-block; width: 110px; }

  .calendar-table { font-size: 11px; }
  .calendar-table th, .calendar-table td { padding: 4px 2px; }
}
