/* HC 콜비전 화면 공통 — 검정 바탕, 한눈에 상태가 보이게 */
:root {
  --bg: #07080a;
  --panel: #101216;
  --panel-2: #171a20;
  --line: #23272f;
  --text: #f2f4f7;
  --muted: #8b93a1;
  --accent: #4f8cff;
  --ok: #2fd47a;
  --warn: #ffb020;
  --bad: #ff5a5f;
  --radius: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.02em; }
button, input, select { font: inherit; color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.mono { font-variant-numeric: tabular-nums; font-family: ui-monospace, "SF Mono", Consolas, monospace; }

/* 버튼·입력 */
.btn {
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  padding: 10px 16px; border-radius: 10px; cursor: pointer; transition: background .15s, border-color .15s;
}
.btn:hover { background: #1e222a; border-color: #343a46; }
.btn:focus-visible, .input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn.primary:hover { background: #3d7af0; }
.btn.danger { color: var(--bad); }
.btn.small { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: default; }
.input {
  width: 100%; background: #0b0d10; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
}
.input::placeholder { color: #555c69; }
label.field { display: block; margin-bottom: 14px; }
label.field span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }

/* 상태 점·알약 */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); margin-right: 7px; vertical-align: 1px; }
.dot.ok { background: var(--ok); box-shadow: 0 0 10px #2fd47a88; }
.dot.warn { background: var(--warn); }
.dot.bad { background: var(--bad); box-shadow: 0 0 10px #ff5a5f88; }
.pill { display: inline-flex; align-items: center; padding: 3px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: #1b1f27; color: var(--muted); }
.pill.live { background: #0f2e1f; color: var(--ok); }
.pill.connecting { background: #2c2410; color: var(--warn); }
.pill.hold { background: #1a2440; color: #8fb3ff; }
.pill.off { background: #2a1517; color: var(--bad); }

/* 로그인 */
.center { min-height: 100%; display: grid; place-items: center; padding: 24px; }
.login-card { width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 34px 30px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -0.02em; }
.brand i { width: 28px; height: 28px; border-radius: 9px; background: linear-gradient(135deg, #4f8cff, #7b5cff); display: inline-block; }
.login-card h1 { font-size: 22px; margin: 22px 0 6px; }
.login-card p { margin: 0 0 22px; color: var(--muted); font-size: 14px; }
.msg { min-height: 22px; font-size: 13.5px; color: var(--bad); margin-top: 12px; }

/* 룸 화면(키오스크) */
.room { position: fixed; inset: 0; background: #000; overflow: hidden; }
.room video#remote { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.room video#local {
  position: absolute; right: 24px; bottom: 24px; width: 18vw; max-width: 260px; min-width: 140px; aspect-ratio: 16/9;
  object-fit: cover; border-radius: 12px; border: 1px solid #ffffff2e; background: #111; transform: scaleX(-1);
}
.room .topbar {
  position: absolute; left: 0; right: 0; top: 0; padding: 18px 24px; display: flex; justify-content: space-between; align-items: center;
  background: linear-gradient(#000000b0, transparent); z-index: 3; font-size: 14px;
}
.room .cam { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: #00000080; }
.room .cam.on { color: var(--bad); }
.room .cam.on::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--bad); animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.room .stage { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; z-index: 2; background: radial-gradient(1200px 600px at 50% 40%, #131722, #000 70%); }
.room .stage .big { font-size: clamp(54px, 9vw, 120px); font-weight: 800; letter-spacing: -0.04em; }
.room .stage h1 { font-size: clamp(22px, 2.6vw, 34px); margin-top: 10px; }
.room .stage p { color: var(--muted); font-size: clamp(15px, 1.4vw, 19px); margin: 10px 0 0; }
.spinner { width: 54px; height: 54px; border-radius: 50%; border: 4px solid #ffffff22; border-top-color: var(--accent); animation: spin 1s linear infinite; margin: 0 auto 22px; }
@keyframes spin { to { transform: rotate(360deg); } }
.room .tools { position: absolute; left: 24px; bottom: 24px; z-index: 4; display: flex; gap: 8px; opacity: .0; transition: opacity .2s; }
.room:hover .tools { opacity: 1; }

/* 관리자 */
.shell { max-width: 1180px; margin: 0 auto; padding: 22px 22px 60px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; background: var(--panel); border: 1px solid var(--line); padding: 4px; border-radius: 12px; overflow-x: auto; }
.tabs button { border: 0; background: transparent; color: var(--muted); padding: 8px 15px; border-radius: 9px; cursor: pointer; white-space: nowrap; }
.tabs button.on { background: var(--panel-2); color: var(--text); font-weight: 600; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-bottom: 18px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.card .k { font-size: 13px; color: var(--muted); }
.card .v { font-size: 26px; font-weight: 800; margin-top: 4px; letter-spacing: -0.02em; }
.pair { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pair + .pair { margin-top: 12px; }
.pair h3 { font-size: 16px; }
.rooms { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.roomchip { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 13.5px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 500; font-size: 13px; }
.form-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.notice { background: #10203a; border: 1px solid #244579; color: #cfe0ff; border-radius: 12px; padding: 14px 16px; margin-top: 14px; font-size: 14px; white-space: pre-wrap; }
.section-title { font-size: 17px; margin: 26px 0 12px; }
.empty { color: var(--muted); padding: 26px; text-align: center; }
@media (max-width: 640px) { .shell { padding: 16px 14px 50px; } .card .v { font-size: 22px; } }
.btn.block { width: 100%; }
