/* BDO 대시보드 — CHZZK(치지직) 스타일
   배경 #141418 · 민트 #00ffa3 · 옐로 #ffd400 · 오렌지 #ff9f1a · 레드 #ff4d4d
   radius 12px · 13px sans */
:root {
  --bg: #141418;
  --panel: #1c1c22;
  --panel2: #232329;
  --text: #ffffff;
  --muted: #8b8b95;
  --line: #2a2a31;
  --accent: #00ffa3;
  --yellow: #ffd400;
  --green: #00ffa3;
  --red: #ff4d4d;
  --orange: #ff9f1a;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font: 14px/1.45 "Pretendard", "Noto Sans KR", system-ui, sans-serif; }
#root { max-width: 620px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }

/* ── 상단 ── */
.top {
  position: sticky; top: 0; z-index: 5;
  background: rgba(20, 20, 24, .96); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  padding: 12px 14px 0;
}
.brand { font-weight: 800; font-size: 17px; letter-spacing: -.01em; margin-bottom: 10px; }
.brand::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: 2px; box-shadow: 0 0 8px var(--accent); }
.tabs { display: flex; gap: 2px; }
.tabs button {
  flex: 1; padding: 10px 0 9px; border: 0; background: transparent;
  color: var(--muted); font-size: 14px; font-weight: 700; cursor: pointer;
  border-bottom: 2px solid transparent; border-radius: 0;
}
.tabs button.on { color: var(--accent); border-bottom-color: var(--accent); }

.banner { background: #3a2f10; color: var(--yellow); padding: 8px 14px; font-size: 13px; border-bottom: 1px solid var(--line); }
.banner.err { background: #3a1a1c; color: var(--red); }
.hidden { display: none; }

/* ── 본문 ── */
main { flex: 1; padding: 14px; display: flex; flex-direction: column; gap: 14px; }
.loading, .empty { color: var(--muted); text-align: center; padding: 30px 0; font-size: 13px; }

/* ── 카드 ── */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.card h3 {
  margin: 0; padding: 11px 14px; font-size: 13px; font-weight: 700; color: var(--text);
  letter-spacing: -.01em; border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
}
.card h3 .n {
  color: #000; background: var(--accent); font-weight: 800; font-size: 12px;
  border-radius: 20px; padding: 1px 9px; min-width: 24px; text-align: center;
}
.row { padding: 11px 14px; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; }
.row:last-child { border-bottom: 0; }
.row .main { min-width: 0; }
.row .t { font-weight: 700; word-break: break-word; font-size: 14px; }
.row .s { color: var(--muted); font-size: 13px; margin-top: 3px; word-break: break-word; }
.row .time { color: var(--orange); font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 13px; }
.mono { font-family: ui-monospace, Consolas, monospace; background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: 13px; color: var(--yellow); }
.badge { font-size: 12px; padding: 2px 10px; border-radius: 10px; background: var(--panel2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; text-decoration: none; }
.badge.on { color: #000; background: var(--accent); border-color: transparent; font-weight: 700; }
.badge.off { color: var(--muted); }

/* ── 설정 ── */
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 14px; border-bottom: 1px solid var(--line); }
.set-row:last-child { border-bottom: 0; }
.set-row .lbl { font-weight: 700; }
.set-row .sub { color: var(--muted); font-size: 12px; margin-top: 3px; }
.switch { border: 0; border-radius: 20px; padding: 8px 16px; font-weight: 800; font-size: 13px; cursor: pointer; color: #000; background: var(--red); min-width: 64px; }
.switch.on { background: var(--accent); }
.switch:disabled { opacity: .5; cursor: default; }
select.lead { background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 14px; }

/* ── 검색 ── */
.sbar { display: flex; gap: 8px; }
.seg { display: flex; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { border: 0; background: transparent; color: var(--muted); padding: 10px 12px; font-size: 13px; font-weight: 700; cursor: pointer; }
.seg button.on { background: var(--accent); color: #000; }
.sbar input { flex: 1; min-width: 0; background: var(--panel2); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 10px 12px; font-size: 15px; }
.sbar input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(0, 255, 163, .18); }
.sbar button.go { border: 0; border-radius: 10px; background: var(--accent); color: #000; font-weight: 800; padding: 0 18px; cursor: pointer; }
.res { cursor: pointer; }
.res:hover { background: var(--panel2); }
.back { background: none; border: 0; color: var(--accent); font-size: 13px; cursor: pointer; padding: 4px 0; font-weight: 700; }
.links { display: flex; gap: 8px; padding: 11px 14px; flex-wrap: wrap; }
.links a { color: #000; background: var(--accent); text-decoration: none; border-radius: 8px; padding: 8px 14px; font-size: 13px; font-weight: 800; cursor: pointer; }
.mats { color: var(--text); }
.mats b { display: block; margin-top: 8px; color: var(--accent); }
.foot { color: var(--muted); font-size: 12px; text-align: center; padding: 8px 14px 16px; }
