/* 친절한 하스비 — HRMaster(hass-hrmaster) 디자인 체계 적용.
   따뜻한 무채색 바탕 + HASS CI 블루(#1E95D4) 강조, 올라온 면(카드·버튼)과 들어간 면(입력칸).
   CSP가 style-src 'self'라 외부 글꼴·인라인 스타일 없이 이 파일만으로 그린다. */

:root {
  color-scheme: light;
  --bg: #efebe4;
  --surface: #f3f0ea;
  --surface-2: #ebe7df;
  --line: rgba(120, 104, 80, .13);
  --line-strong: rgba(120, 104, 80, .22);
  --edge: rgba(255, 255, 255, .55);
  --text: #1f2328;
  --text-dim: #5f6066;
  --text-mute: #787774;
  --ink: #111;
  --brand: #1e95d4;
  --brand-dark: #1673a6;
  --brand-deep: #176c98;
  --brand-deep-hover: #135c83;
  --brand-soft: #dfecf3;
  --ok: #346538;
  --ok-bg: #e9efe4;
  --warn: #956400;
  --warn-bg: #f6efdc;
  --danger: #9f2f2d;
  --danger-bg: #f6e7e5;
  --hi: rgba(255, 255, 255, .9);
  --lo: rgba(150, 132, 104, .30);
  --raise-1: 3px 3px 7px var(--lo), -3px -3px 7px var(--hi);
  --raise-2: 6px 6px 14px var(--lo), -6px -6px 14px var(--hi);
  --raise-3: 10px 10px 24px rgba(150, 132, 104, .34), -8px -8px 20px var(--hi);
  --inset: inset 3px 3px 6px var(--lo), inset -3px -3px 6px var(--hi);
  --brand-glow: 4px 4px 10px rgba(23, 108, 152, .30), -4px -4px 10px var(--hi);
  --topbar-bg: rgba(239, 235, 228, .85);
  --radius: 18px;
  --chat-width: 820px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --font: "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕",
    "Noto Sans KR", system-ui, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #1b1f25;
    --surface: #22272e;
    --surface-2: #181b20;
    --line: rgba(255, 255, 255, .07);
    --line-strong: rgba(255, 255, 255, .14);
    --edge: rgba(255, 255, 255, .04);
    --text: #d6dae0;
    --text-dim: #a5acb6;
    --text-mute: #8a929d;
    --ink: #f2f4f6;
    --brand: #3aa9e4;
    --brand-dark: #74c3ee;
    --brand-deep: #1f86bd;
    --brand-deep-hover: #2394d0;
    --brand-soft: rgba(58, 169, 228, .14);
    --ok: #9bd8a5;
    --ok-bg: #212923;
    --warn: #ebc877;
    --warn-bg: #2a2620;
    --danger: #f3a6a3;
    --danger-bg: #2c2224;
    --hi: rgba(255, 255, 255, .045);
    --lo: rgba(0, 0, 0, .5);
    --raise-3: 12px 12px 26px rgba(0, 0, 0, .55), -8px -8px 20px rgba(255, 255, 255, .04);
    --brand-glow: 4px 4px 10px rgba(0, 0, 0, .45), -4px -4px 10px var(--hi);
    --topbar-bg: rgba(27, 31, 37, .86);
  }
}

/* ---------- 기본 ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { color: var(--ink); text-wrap: balance; word-break: keep-all; }
p { word-break: keep-all; }
a { color: var(--brand-dark); }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
code { font-family: var(--mono); font-size: 13px; }
.muted { color: var(--text-mute); }
.help { font-size: 12.5px; color: var(--text-mute); line-height: 1.7; margin: 10px 0 0; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- 버튼: 캡슐 + 누르면 들어감 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 8px 18px; margin: 0;
  border: 1px solid var(--edge); border-radius: 999px;
  background: var(--surface); color: var(--text);
  box-shadow: var(--raise-1);
  font-size: 13.5px; font-weight: 600; line-height: 1.2; white-space: nowrap;
  text-decoration: none; cursor: pointer;
  transition: box-shadow .15s, background-color .15s, color .15s;
}
.btn:hover { color: var(--ink); text-decoration: none; box-shadow: 4px 4px 10px var(--lo), -4px -4px 10px var(--hi); }
.btn:active:not(:disabled) { box-shadow: var(--inset); }
.btn.primary { background: var(--brand-deep); border-color: var(--brand-deep); color: #fff; box-shadow: var(--brand-glow); }
.btn.primary:hover { background: var(--brand-deep-hover); border-color: var(--brand-deep-hover); color: #fff; }
.btn.primary:active:not(:disabled) { box-shadow: inset 3px 3px 7px rgba(0, 0, 0, .28), inset -2px -2px 5px rgba(255, 255, 255, .12); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-dim); }
.btn.ghost:hover { background: var(--surface); box-shadow: var(--raise-1); color: var(--ink); }
.btn.sm { min-height: 34px; padding: 5px 14px; font-size: 12.5px; }
.btn.block { width: 100%; min-height: 48px; font-size: 15px; }
.btn:disabled { box-shadow: var(--inset); background: var(--surface-2); border-color: transparent; color: var(--text-mute); cursor: not-allowed; }

/* ---------- 입력칸: 안으로 들어간 홈 ---------- */
.field { margin-bottom: 18px; }
.field > label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--text); }
.input {
  display: block; width: 100%; min-height: 46px; padding: 11px 14px;
  border: 1px solid transparent; border-radius: 12px;
  background: var(--surface-2); color: var(--text);
  box-shadow: var(--inset); outline: none;
  font-size: 14.5px;
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: var(--text-mute); opacity: .8; }
.input:focus { border-color: rgba(30, 149, 212, .55); box-shadow: var(--inset), 0 0 0 3px rgba(30, 149, 212, .14); }
.input[type="file"] { padding: 10px 12px; min-height: 0; }

/* ---------- 알림 ---------- */
.notice {
  margin: 0 0 20px; padding: 12px 16px;
  background: var(--surface); border: 1px solid var(--edge); border-left: 4px solid var(--brand);
  border-radius: 14px; box-shadow: var(--raise-1);
  font-size: 13.5px; line-height: 1.7; color: var(--text);
}
.notice--error { background: var(--danger-bg); border-left-color: var(--danger); color: var(--danger); }
.notice--ok { background: var(--ok-bg); border-left-color: #5a8a5e; color: var(--ok); }
.notice--warn { background: var(--warn-bg); border-left-color: #c79a2b; color: var(--warn); }
.notice b, .notice strong { color: inherit; }

/* ---------- 로그인·가입: 소개(좌) + 입력(우), 한 장의 카드 ---------- */
.auth-wrap {
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 28px;
  background:
    radial-gradient(800px 480px at 12% 8%, rgba(30, 149, 212, .06), transparent 70%),
    radial-gradient(640px 420px at 92% 96%, rgba(120, 119, 116, .05), transparent 70%),
    var(--bg);
}
.auth-card {
  width: 100%; max-width: 1040px;
  display: grid; grid-template-columns: 1.1fr 1fr;
  background: var(--surface); border: 1px solid var(--edge); border-radius: var(--radius);
  box-shadow: var(--raise-3); overflow: hidden;
  animation: rise .7s var(--ease) both;
}
.auth-card--single { max-width: 520px; grid-template-columns: 1fr; }
.auth-intro { display: flex; flex-direction: column; min-width: 0; padding: 48px 52px 36px; border-right: 1px solid var(--line); }
.auth-brand img { display: block; width: 200px; height: auto; }
.auth-intro-copy { margin: 56px 0 36px; }
.eyebrow {
  display: inline-block; margin-bottom: 18px;
  font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-dark);
}
.auth-intro-copy h1 { margin: 0 0 20px; font-size: clamp(30px, 3.2vw, 40px); line-height: 1.3; font-weight: 700; letter-spacing: -.045em; }
.auth-intro-copy > p { margin: 0; max-width: 34ch; font-size: 15px; line-height: 1.85; color: var(--text-dim); }
.auth-steps { list-style: none; margin: 0 0 24px; padding: 0; border-top: 1px solid var(--line); }
.auth-step { display: flex; align-items: baseline; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.auth-step .step-no { font: 500 12px/1 var(--mono); letter-spacing: .04em; color: var(--brand); }
.auth-step strong { font-size: 14px; font-weight: 600; color: var(--ink); }
.auth-step p { margin: 2px 0 0; font-size: 13px; color: var(--text-mute); }
.auth-intro-foot { margin-top: auto; font-size: 12px; color: var(--text-mute); }

.auth-panel { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 56px 52px 40px; }
.auth-card--single .auth-panel { padding: 44px 44px 36px; }
.auth-panel .auth-brand { margin-bottom: 28px; }
.auth-panel .auth-brand img { width: 150px; }
.auth-badge {
  align-self: flex-start; margin-bottom: 14px; padding: 4px 12px; border-radius: 999px;
  background: var(--warn-bg); color: var(--warn); font-size: 12px; font-weight: 600;
  box-shadow: 2px 2px 4px rgba(150, 132, 104, .22), -2px -2px 4px var(--hi);
}
.auth-title { margin: 0 0 10px; font-size: 26px; font-weight: 700; letter-spacing: -.04em; }
.auth-sub { margin: 0 0 32px; font-size: 14px; line-height: 1.8; color: var(--text-dim); }
.form-section {
  margin: 26px 0 14px; padding-top: 18px; border-top: 1px solid var(--line);
  font-size: 11.5px; font-weight: 600; letter-spacing: .08em; color: var(--brand-dark);
}
.form-section:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.auth-panel form .btn.block { margin-top: 10px; }
.auth-links { margin: 18px 0 0; font-size: 13px; line-height: 1.8; color: var(--text-mute); }
.auth-links a { font-weight: 600; }
.auth-foot { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.8; color: var(--text-mute); }

/* ---------- 상단 바 (채팅·관리자 공용) ---------- */
.app-topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  min-height: 64px; padding: 10px 28px;
  background: var(--topbar-bg);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.app-brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; text-decoration: none; }
.app-brand:hover { text-decoration: none; }
.app-brand img { display: block; width: 84px; height: auto; flex: none; }
.app-brand-text { padding-left: 10px; border-left: 1px solid var(--line-strong); font-size: 14px; font-weight: 700; color: var(--ink); letter-spacing: -.02em; line-height: 1.3; }
.app-brand-text small { display: block; margin-top: 1px; font-size: 11px; font-weight: 500; color: var(--text-mute); }
.app-spacer { flex: 1; }
.app-user { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 13px; color: var(--text-dim); }
.app-user-name { color: var(--ink); font-weight: 600; }
.app-user-detail { color: var(--text-mute); }
.app-actions { display: flex; align-items: center; gap: 8px; }
.app-actions form { margin: 0; }

/* ---------- 채팅 ---------- */
.chat-app {
  height: 100vh; height: 100dvh;
  display: flex; flex-direction: column; overflow: hidden;
}
.chat-app .app-topbar { position: relative; flex: none; }
.chat-pad { padding-left: max(20px, calc((100% - var(--chat-width)) / 2)); padding-right: max(20px, calc((100% - var(--chat-width)) / 2)); }

.hb-chat-body {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 2px;
  padding-top: 28px; padding-bottom: 12px;
  scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
}
.hb-msg-row { display: flex; gap: 12px; margin: 8px 0; max-width: 100%; animation: rise .45s var(--ease) both; }
.hb-msg-row.hb-msg-bot { justify-content: flex-start; }
.hb-msg-row.hb-msg-user { justify-content: flex-end; }

.hb-msg-avatar {
  width: 38px; height: 38px; flex: none; align-self: flex-start;
  border-radius: 50%; overflow: hidden; background: #fff;
  box-shadow: var(--raise-1);
}
.hb-msg-avatar img { display: block; width: 100%; height: 100%; object-fit: contain; padding: 4px; }

.hb-msg-col { display: flex; flex-direction: column; min-width: 0; max-width: 80%; }
.hb-msg-row.hb-msg-user .hb-msg-col { align-items: flex-end; }
.hb-msg-name { margin: 0 0 6px 4px; font-size: 12px; font-weight: 600; color: var(--text-mute); }
.hb-bubble-wrap { display: flex; align-items: flex-end; gap: 6px; min-width: 0; max-width: 100%; }

.hb-bubble {
  min-width: 0; max-width: 100%;
  padding: 12px 16px; border-radius: 16px;
  font-size: 14.5px; line-height: 1.7; overflow-wrap: anywhere; word-break: keep-all;
}
.hb-bubble > :first-child { margin-top: 0; }
.hb-bubble > :last-child { margin-bottom: 0; }
.hb-bubble p { margin: 0 0 8px; }
.hb-bubble h4, .hb-bubble h5, .hb-bubble h6 { margin: 14px 0 6px; font-size: 14.5px; font-weight: 700; color: inherit; }
.hb-bubble hr { border: 0; border-top: 1px solid var(--line-strong); margin: 12px 0; }
.hb-bubble ul { margin: 4px 0 8px; padding-left: 20px; }
.hb-bubble li { margin: 3px 0; }
.hb-bubble-bot { background: var(--surface); border: 1px solid var(--edge); border-top-left-radius: 6px; box-shadow: var(--raise-1); color: var(--text); }
.hb-bubble-user { background: var(--brand-deep); color: #fff; border-top-right-radius: 6px; box-shadow: var(--brand-glow); white-space: pre-wrap; }
.hb-bubble-failed { background: var(--danger-bg); color: var(--danger); border-top-left-radius: 6px; box-shadow: var(--raise-1); }
.hb-bubble .msg__caution { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-mute); }

.hb-msg-table-wrap { overflow-x: auto; margin: 10px 0; border-radius: 12px; box-shadow: var(--inset); background: var(--surface-2); }
.hb-msg-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.hb-msg-table th, .hb-msg-table td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.hb-msg-table th { font-size: 12px; font-weight: 600; color: var(--text-mute); }
.hb-msg-table tr:last-child td { border-bottom: 0; }

.hb-typing-bubble {
  display: inline-flex; gap: 5px; padding: 15px 18px;
  border-radius: 16px; border-top-left-radius: 6px;
  background: var(--surface); border: 1px solid var(--edge); box-shadow: var(--raise-1);
}
.hb-typing-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-mute); opacity: .5; animation: hb-typing 1.2s infinite ease-in-out; }
.hb-typing-dot:nth-child(2) { animation-delay: .15s; }
.hb-typing-dot:nth-child(3) { animation-delay: .3s; }
@keyframes hb-typing { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

/* 근거 조항: 말풍선 아래 들어간 홈 */
.hb-citation-card {
  margin-top: 10px; padding: 12px 16px;
  background: var(--surface-2); border-radius: 14px; box-shadow: var(--inset);
  font-size: 12.5px; color: var(--text);
}
.hb-citation-title { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font-size: 12px; font-weight: 700; color: var(--brand-dark); }
.hb-citation-item { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; padding: 7px 0; border-top: 1px solid var(--line); }
.hb-citation-item:first-of-type { border-top: 0; }
.hb-citation-doc { font-weight: 600; color: var(--brand-dark); white-space: nowrap; }
.hb-citation-text { color: var(--text-dim); line-height: 1.65; }
.hb-citation-toggle {
  margin: 0; padding: 0; border: 0; background: none; cursor: pointer;
  font-size: 12px; font-weight: 600; color: var(--brand-dark); text-decoration: underline; white-space: nowrap;
}
.hb-citation-toggle:hover { color: var(--ink); }

.hb-msg-actions { display: flex; gap: 10px; margin-top: 6px; padding-left: 4px; }
.hb-action-link {
  display: inline-flex; align-items: center; gap: 3px; margin: 0; padding: 3px 6px;
  border: 0; border-radius: 8px; background: none; cursor: pointer;
  font-size: 12px; color: var(--text-mute);
}
.hb-action-link:hover { color: var(--danger); }
.hb-action-link.hb-reported { color: var(--danger); font-weight: 600; }
.hb-action-link:disabled { cursor: default; opacity: .75; }

/* 추천 질문 칩 */
.hb-quick-replies { flex: none; display: flex; gap: 8px; overflow-x: auto; padding-top: 10px; padding-bottom: 6px; scrollbar-width: none; }
.hb-quick-replies::-webkit-scrollbar { display: none; }
.hb-quick-chip {
  flex: none; min-height: 34px; margin: 0; padding: 6px 14px;
  border: 1px solid var(--edge); border-radius: 999px;
  background: var(--surface); color: var(--text); box-shadow: var(--raise-1);
  font-size: 12.5px; font-weight: 600; white-space: nowrap; cursor: pointer;
  transition: box-shadow .15s, color .15s;
}
.hb-quick-chip:hover { color: var(--brand-dark); box-shadow: var(--inset); }

/* 입력창 */
.hb-chat-inputbar { flex: none; display: flex; align-items: flex-end; gap: 10px; margin: 0; padding-top: 8px; padding-bottom: 6px; }
/* 테두리 없음: chat.js가 높이를 scrollHeight로 맞추는데, 테두리가 있으면 그만큼 모자라 스크롤바가 생긴다 */
.hb-chat-textarea {
  flex: 1; min-height: 48px; max-height: 120px; resize: none;
  padding: 13px 18px; border: 0; border-radius: 16px;
  background: var(--surface-2); box-shadow: var(--inset); outline: none;
  font-size: 14.5px; line-height: 1.45; color: var(--text);
  scrollbar-width: thin;
}
.hb-chat-textarea::placeholder { color: var(--text-mute); opacity: .8; }
.hb-chat-textarea:focus { box-shadow: var(--inset), 0 0 0 2px rgba(30, 149, 212, .55), 0 0 0 5px rgba(30, 149, 212, .12); }
.hb-send-btn { flex: none; min-width: 84px; min-height: 48px; }
.hb-disclaimer { flex: none; margin: 0; padding-top: 4px; padding-bottom: calc(12px + env(safe-area-inset-bottom)); font-size: 12px; text-align: center; color: var(--text-mute); }

/* ---------- 관리자 ---------- */
.admin-content { padding: 40px 36px 96px; }
.admin-inner { max-width: 1100px; margin: 0 auto; }
.admin-inner > * { animation: rise .6s var(--ease) both; }
.page-head { margin-bottom: 28px; }
.page-head h1 { margin: 0 0 6px; font-size: 30px; font-weight: 700; letter-spacing: -.045em; line-height: 1.3; }
.page-head p { margin: 0; font-size: 14px; line-height: 1.8; color: var(--text-dim); }

.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-bottom: 24px; }
.stat { padding: 22px 24px; background: var(--surface); border: 1px solid var(--edge); border-radius: var(--radius); box-shadow: var(--raise-2); }
.stat-label { font-size: 12px; font-weight: 500; color: var(--text-mute); }
.stat-value { display: block; margin-top: 6px; font-size: 32px; font-weight: 700; letter-spacing: -.04em; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat--alert .stat-value { color: var(--danger); }

.card { margin-bottom: 24px; background: var(--surface); border: 1px solid var(--edge); border-radius: var(--radius); box-shadow: var(--raise-2); overflow: hidden; }
.card-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.card-head h2 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.02em; }
.card-head .sub { font-size: 12px; color: var(--text-mute); }
.card-body { padding: 24px; }
.card-body > :first-child { margin-top: 0; }
.card-body > :last-child { margin-bottom: 0; }
.card-body > p { margin: 0 0 16px; font-size: 13.5px; line-height: 1.8; color: var(--text-dim); }
.card-body > p.help { margin: 10px 0 0; font-size: 12.5px; color: var(--text-mute); }
.card-body > p.muted { color: var(--text-mute); }
.card-body.tight { padding: 0; }
.count {
  display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 7px;
  border-radius: 999px; background: var(--brand-deep); color: #fff;
  font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.count--zero { background: var(--surface-2); color: var(--text-mute); box-shadow: var(--inset); }

.inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.inline-form .field { flex: 1; min-width: 220px; margin-bottom: 0; }
.inline-form .btn { min-height: 46px; }

.credential-box { margin-bottom: 20px; }
.credential-box p { margin: 4px 0; }
.credential-box code { padding: 2px 8px; border-radius: 6px; background: var(--surface); color: var(--ink); font-size: 14px; user-select: all; }

.account-results { list-style: none; margin: 18px 0 0; padding: 0; }
.account-results li { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.account-results li:last-child { border-bottom: 0; }
.account-results form { margin: 0; }

.avatar-preview { display: block; width: 72px; height: 72px; margin: 0 0 18px; padding: 6px; border-radius: 50%; object-fit: contain; background: #fff; box-shadow: var(--raise-1); }

.table-scroll { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th, table.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; }
table.tbl thead th { background: var(--surface-2); font-size: 11.5px; font-weight: 600; letter-spacing: .02em; color: var(--text-mute); white-space: nowrap; }
table.tbl tbody tr:last-child td { border-bottom: 0; }
table.tbl tbody tr:hover { background: rgba(255, 255, 255, .35); }
table.tbl td.num, table.tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.tbl th:first-child, table.tbl td:first-child { padding-left: 24px; }
table.tbl th:last-child, table.tbl td:last-child { padding-right: 24px; }

.entry { margin-bottom: 10px; background: var(--surface); border: 1px solid var(--edge); border-radius: 14px; box-shadow: var(--raise-1); font-size: 14px; }
.entry:last-child { margin-bottom: 0; }
.entry--flagged { border-left: 4px solid var(--danger); }
.entry summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; padding: 12px 16px; cursor: pointer; list-style-position: inside; }
.entry[open] summary { border-bottom: 1px solid var(--line); }
.entry__body { padding: 14px 16px 16px; }
.entry__body p { margin: 0 0 6px; font-size: 13px; color: var(--text-dim); }
.entry__body pre {
  margin: 0 0 14px; padding: 12px 14px; white-space: pre-wrap; overflow-wrap: anywhere;
  border-radius: 12px; background: var(--surface-2); box-shadow: var(--inset);
  font: 13px/1.7 var(--font); color: var(--text);
}
.entry__body .entry__reason { color: var(--danger); }
.badge {
  display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px;
  background: var(--surface-2); color: var(--text-dim);
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
  box-shadow: 2px 2px 4px rgba(150, 132, 104, .22), -2px -2px 4px var(--hi);
}

/* ---------- 반응형 ---------- */
@media (max-width: 860px) {
  .auth-wrap { padding: 24px 20px; }
  .auth-card { grid-template-columns: 1fr; max-width: 560px; }
  .auth-intro { padding: 32px; border-right: 0; border-bottom: 1px solid var(--line); }
  .auth-intro-copy { margin: 32px 0 8px; }
  .auth-steps, .auth-intro-foot { display: none; }
  .auth-panel { padding: 36px 32px; }
  .app-topbar { padding: 10px 20px; gap: 12px; }
  .app-user-detail { display: none; }
  .admin-content { padding: 28px 20px 80px; }
  .page-head h1 { font-size: 25px; }
  .stat-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
}
@media (max-width: 560px) {
  .auth-wrap { padding: 16px 12px; }
  .auth-intro { padding: 26px 24px; }
  .auth-brand img { width: 168px; }
  .auth-intro-copy h1 { font-size: 27px; }
  .auth-intro-copy > p { font-size: 13.5px; }
  .auth-panel, .auth-card--single .auth-panel { padding: 30px 24px; }
  .auth-sub { margin-bottom: 24px; }
  .app-topbar { padding: 8px 14px; gap: 8px; }
  .app-brand img { width: 64px; }
  .app-brand-text small { display: none; }
  .app-user { display: none; }
  .hb-msg-col { max-width: 86%; }
  .hb-msg-avatar { width: 32px; height: 32px; }
  .hb-send-btn { min-width: 64px; }
  .card-head, .card-body:not(.tight) { padding-left: 18px; padding-right: 18px; }
  .btn, .btn.sm { min-height: 44px; }
}
@media (prefers-color-scheme: dark) {
  .auth-brand img, .app-brand img { filter: brightness(1.15); }
  table.tbl tbody tr:hover { background: rgba(255, 255, 255, .03); }
  .badge { box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
