@charset "UTF-8";
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&display=swap');

/* 홍보 사이트와 같은 다크 토큰 */
:root {
  color-scheme: dark;
  --bg: #09090b; --bg-2: #0b0f19; --panel: #111114; --panel-2: #16161a;
  --line: rgba(255,255,255,.08); --line-2: rgba(255,255,255,.05); --line-3: rgba(255,255,255,.14);
  --ink: #fafafa; --ink-2: #a1a1aa; --ink-3: #71717a; --ink-4: #52525b;
  --accent: #22d3ee; --accent-hi: #67e8f9; --accent-soft: rgba(34,211,238,.10); --accent-line: rgba(34,211,238,.35);
  --on-accent: #041318; --ok: #34d399; --warn: #fbbf24; --err: #f87171;
  --sans: 'Pretendard', -apple-system, 'SF Pro Display', BlinkMacSystemFont, 'Malgun Gothic', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, 'Pretendard', monospace;
  --ease: cubic-bezier(.4,0,.2,1); --t: all .3s var(--ease);
  --inset: inset 0 1px 0 0 rgba(255,255,255,.05);
}
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body { background: var(--bg); }
body { font-family: var(--sans); font-size: 14px; line-height: 1.6; color: var(--ink); letter-spacing: -0.011em; word-break: keep-all; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
.mono { font-family: var(--mono); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* 레이아웃 */
.top { position: sticky; top: 0; z-index: 50; height: 60px; display: flex; align-items: center; gap: 16px; padding: 0 24px; border-bottom: 1px solid var(--line); background: rgba(9,9,11,.75); backdrop-filter: blur(16px); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.03em; color: var(--ink); }
.brand i { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--panel-2); border: 1px solid var(--line-3); color: var(--accent); font-style: normal; }
.brand small { font-family: var(--mono); font-size: 11px; color: var(--ink-4); font-weight: 400; }
.top .sp { flex: 1; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 28px 24px 80px; }
.grid2 { display: grid; grid-template-columns: 360px 1fr; gap: 16px; align-items: start; }
.stack { display: grid; gap: 16px; }

/* 카드 */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--inset); }
.card > .hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line-2); }
.card > .hd h2 { font-size: 15px; font-weight: 700; letter-spacing: -0.02em; }
.card > .bd { padding: 18px; }
.label { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.label b { color: var(--accent); font-weight: 600; }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 16px; background: var(--panel); box-shadow: var(--inset); margin-bottom: 16px; overflow: hidden; }
.kpi { padding: 18px 20px; border-left: 1px solid var(--line-2); }
.kpi:first-child { border-left: 0; }
.kpi b { display: block; font-family: var(--mono); font-size: 22px; font-weight: 600; letter-spacing: -0.04em; margin-top: 6px; }
.kpi span { font-size: 12px; color: var(--ink-3); }

/* 버튼 · 입력 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 9px; font-size: 13px; font-weight: 600; border: 1px solid var(--line); background: rgba(255,255,255,.03); color: var(--ink); box-shadow: var(--inset); transition: var(--t); white-space: nowrap; }
.btn:hover { background: rgba(255,255,255,.06); border-color: var(--line-3); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.pri { background: var(--accent); color: var(--on-accent); border-color: var(--accent); box-shadow: inset 0 1px 0 rgba(255,255,255,.45); }
.btn.pri:hover { background: var(--accent-hi); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 8px 24px -8px rgba(34,211,238,.6); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn.danger:hover { color: var(--err); border-color: rgba(248,113,113,.4); }
.btn.block { width: 100%; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=time], textarea, select {
  width: 100%; height: 38px; padding: 0 12px; border-radius: 9px; font-size: 14px; outline: none; transition: var(--t);
  background: rgba(255,255,255,.025); border: 1px solid var(--line); box-shadow: var(--inset); }
textarea { height: auto; min-height: 140px; padding: 10px 12px; resize: vertical; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: var(--ink-4); }
input:hover, textarea:hover, select:hover { border-color: var(--line-3); }
input:focus, textarea:focus, select:focus { border-color: var(--accent-line); box-shadow: 0 0 0 4px rgba(34,211,238,.08); }
select option { background: var(--panel-2); }
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field > span { font-size: 12px; color: var(--ink-2); font-weight: 600; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row > .grow { flex: 1; min-width: 120px; }
.switch { position: relative; width: 38px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid var(--line-3); transition: var(--t); cursor: pointer; }
.switch i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--ink-2); transition: var(--t); }
.switch input:checked + i { background: var(--accent); border-color: var(--accent); }
.switch input:checked + i::after { left: 18px; background: var(--on-accent); }

/* 배지 */
.tag { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; font-family: var(--mono); font-size: 11px; font-weight: 600; border: 1px solid var(--line); color: var(--ink-2); background: rgba(255,255,255,.02); white-space: nowrap; }
.tag.ok { color: var(--ok); border-color: rgba(52,211,153,.3); background: rgba(52,211,153,.06); }
.tag.warn { color: var(--warn); border-color: rgba(251,191,36,.3); background: rgba(251,191,36,.06); }
.tag.err { color: var(--err); border-color: rgba(248,113,113,.3); background: rgba(248,113,113,.06); }
.tag.acc { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-4); flex: none; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(52,211,153,.15); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .4; } }

/* 알림 */
.alert { padding: 12px 14px; border-radius: 12px; font-size: 13px; margin-bottom: 16px; border: 1px solid rgba(251,191,36,.25); background: rgba(251,191,36,.06); color: #fde68a; }
.alert.err { border-color: rgba(248,113,113,.3); background: rgba(248,113,113,.06); color: #fecaca; }

/* 슬롯 목록 */
.slot { display: block; width: 100%; text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line-2); transition: var(--t); }
.slot:last-child { border-bottom: 0; }
.slot:hover { background: rgba(255,255,255,.02); }
.slot.sel { background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent); }
.slot .nm { font-weight: 700; font-size: 15px; letter-spacing: -0.02em; display: flex; align-items: center; gap: 8px; }
.slot .cp { font-family: var(--mono); font-size: 11px; color: var(--ink-3); margin: 4px 0 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot .meta { display: flex; gap: 6px; flex-wrap: wrap; }

/* 대기글 */
.q { display: grid; gap: 0; }
.q li { list-style: none; display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line-2); }
.q li:first-child { border-top: 0; }
.q .n { font-family: var(--mono); font-size: 11px; color: var(--ink-4); text-align: center; }
.q .t { min-width: 0; }
.q .t b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q .t small { font-size: 12px; color: var(--ink-3); }
.q .acts { display: flex; gap: 4px; }
.empty { padding: 28px 0; text-align: center; color: var(--ink-3); font-size: 13px; }

/* 기록 */
.logs { max-height: 360px; overflow: auto; font-family: var(--mono); font-size: 12px; line-height: 1.9; }
.logs div { display: grid; grid-template-columns: 112px 1fr; gap: 10px; padding: 0 2px; border-bottom: 1px solid var(--line-2); }
.logs time { color: var(--ink-4); }
.logs span { color: var(--ink-2); font-family: var(--sans); font-size: 13px; letter-spacing: -0.01em; }

/* 연결 코드 */
.code { font-family: var(--mono); font-size: 30px; font-weight: 600; letter-spacing: .12em; text-align: center; padding: 16px; border-radius: 12px; border: 1px dashed var(--accent-line); background: var(--accent-soft); color: var(--accent); margin: 10px 0 6px; }
.steps { counter-reset: s; display: grid; gap: 10px; }
.steps li { list-style: none; display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: 13px; color: var(--ink-2); }
.steps li::before { counter-increment: s; content: counter(s); width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-family: var(--mono); font-size: 11px; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line); }

/* 로그인 */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; position: relative; overflow: hidden; }
.auth::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(var(--line-2) 1px, transparent 1px), linear-gradient(90deg, var(--line-2) 1px, transparent 1px); background-size: 48px 48px; -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 40%, #000, transparent 75%); mask-image: radial-gradient(ellipse 50% 50% at 50% 40%, #000, transparent 75%); }
.auth .card { position: relative; width: 100%; max-width: 380px; }
.auth h1 { font-size: 22px; letter-spacing: -0.035em; margin: 10px 0 4px; }
.err-msg { color: var(--err); font-size: 13px; min-height: 20px; margin-top: 8px; }

/* 토스트 */
#toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; transition: var(--t); z-index: 200; padding: 10px 16px; border-radius: 10px; background: rgba(24,24,27,.95); border: 1px solid var(--line-3); font-size: 13px; box-shadow: 0 20px 40px -20px #000; pointer-events: none; max-width: 90vw; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
#toast.err { border-color: rgba(248,113,113,.5); color: #fecaca; }

/* 표 (관리자) */
table.tb { width: 100%; border-collapse: collapse; font-size: 13px; }
.tb th, .tb td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tb th { font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--ink-3); letter-spacing: .04em; text-transform: uppercase; }
.tb tr:hover td { background: rgba(255,255,255,.015); }

/* 모달 */
.modal { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 20px; background: rgba(0,0,0,.6); backdrop-filter: blur(4px); }
.modal .card { width: 100%; max-width: 460px; max-height: 90vh; overflow: auto; }

@media (max-width: 900px) {
  .grid2 { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi:nth-child(3) { border-left: 0; }
  .kpi:nth-child(n+3) { border-top: 1px solid var(--line-2); }
  .wrap { padding: 20px 16px 60px; }
  .top { padding: 0 16px; }
  .brand small { display: none; }
  .tb-wrap { overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
