/* 리버스M 콘솔 테마(출처: 배달인 admin.css 2026-10-31, 포인트 색만 금색으로) · 원래 주석: 배달인 운영툴 테마 — 어두운 운영 콘솔(09-17 "좀 까리하게" → 같은 날 "모던하고 세련되게" 다시 다듬음).
   왼쪽 고정 사이드바 + 유리 질감 패널 + 주황 포인트(앱과 같은 브랜드색).
   - 인라인 스타일 금지(CSP style-src 'self') — 여기에만 쓴다.
   - 색은 아래 변수로만 쓸 것(화면에서 색 코드를 직접 쓰지 않는다).
   - 파일을 바꾸면 주소가 바뀐다(web.static_url 해시) — 캐시를 걱정해 이름을 바꿀 필요 없다.
   (10-10 전 화면 정리) 입력칸·버튼 높이 하나(--control-h) · 라벨 안내는 라벨 줄에 · 처리 폼은 접는 칩(.actions) ·
   긴 화면 설명은 접는 안내(details.help) · 대시보드 카드 모양은 .cards 안에서만. */
:root {
  color-scheme: dark;
  --bg: #0b0c11;
  --bg-2: #0f1117;            /* 입력칸·안쪽 칸 */
  --surface: #13151d;          /* 패널 */
  --surface-2: #181b25;        /* 패널 위 강조 */
  --surface-3: #1f2330;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.13);
  --text: #eceef4;
  --text-2: #b8bfcd;
  --muted: #7c8497;
  --accent: #d9a441;
  --accent-2: #f0c674;
  --accent-grad: linear-gradient(135deg, #f0c674 0%, #c8892c 100%);
  --accent-soft: rgba(217, 164, 65, 0.13);
  --accent-line: rgba(217, 164, 65, 0.38);
  --violet: #8f82ff;
  --danger: #ff6b76;
  --danger-soft: rgba(255, 107, 118, 0.12);
  --danger-line: rgba(255, 107, 118, 0.34);
  --warn: #f6c453;
  --warn-soft: rgba(246, 196, 83, 0.12);
  --warn-line: rgba(246, 196, 83, 0.32);
  --ok: #3fd49a;
  --ok-soft: rgba(63, 212, 154, 0.12);
  --ok-line: rgba(63, 212, 154, 0.32);
  --info: #6aaeff;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 12px 32px -16px rgba(0, 0, 0, 0.7);
  --glass: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.008));
  --sidebar-w: 232px;
  --control-h: 2.375rem;       /* 입력칸·셀렉트·버튼 공통 높이(38px) — 한 줄에 놓이면 바닥이 맞는다 */
  --control-h-sm: 2rem;        /* 표 안·칩 */
  --mono: ui-monospace, "JetBrains Mono", "Cascadia Mono", "D2Coding", Consolas, monospace;
  font-family: "Pretendard Variable", "Pretendard", "SUIT", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--text); font-size: 14.5px; line-height: 1.6; min-height: 100vh;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  background:
    radial-gradient(1100px 560px at 90% -15%, rgba(217, 164, 65, 0.09), transparent 62%),
    radial-gradient(900px 520px at 20% 115%, rgba(143, 130, 255, 0.06), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
a { color: var(--accent-2); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--text); }
h1 { font-size: 1.5rem; font-weight: 800; margin: 0 0 0.3rem; letter-spacing: -0.025em; line-height: 1.3; }
h1 .muted { font-weight: 600; }
h2 { font-size: 0.98rem; font-weight: 700; margin: 0; letter-spacing: -0.01em; }
h2 .small, h2 a.small { font-weight: 500; margin-left: 0.4rem; }
code { font-family: var(--mono); font-size: 0.86em; padding: 0.08rem 0.35rem; border-radius: 6px; background: var(--surface-3); color: var(--text-2); }
p { margin: 0.5rem 0; }
strong { font-weight: 700; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }
::selection { background: rgba(217, 164, 65, 0.3); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 입력·버튼 — 높이는 --control-h 하나 ---------- */
button, input, select, textarea { font: inherit; color: inherit; }
input, select, textarea {
  width: 100%; height: var(--control-h); padding: 0 0.75rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--bg-2); color: var(--text); font-size: 0.9rem; font-weight: 400; line-height: 1.4;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
textarea { height: auto; min-height: 4.5rem; padding: 0.55rem 0.75rem; line-height: 1.55; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: rgba(255, 255, 255, 0.2); }
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); background: var(--surface); }
input[readonly] { color: var(--muted); }
input[type=radio], input[type=checkbox] { width: auto; height: auto; padding: 0; margin: 0; accent-color: var(--accent); flex: none; }
input[type=file] { height: var(--control-h); padding: 0.17rem 0.3rem; }
input[type=file]::file-selector-button {
  height: var(--control-h-sm); margin-right: 0.7rem; padding: 0 0.8rem; border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--surface-3); color: var(--text); font: inherit; font-size: 0.84rem; font-weight: 600; cursor: pointer;
}
select { appearance: none; padding-right: 2.2rem; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 55%, calc(100% - 12px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; flex: none;
  height: var(--control-h); padding: 0 1rem; border: 1px solid transparent; border-radius: var(--radius-sm);
  font-size: 0.88rem; font-weight: 700; line-height: 1; white-space: nowrap; cursor: pointer;
  color: #1b0c01; background: var(--accent-grad);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.22) inset, 0 4px 14px -8px rgba(217, 164, 65, 0.7);
  transition: transform 0.08s ease, filter 0.15s ease, box-shadow 0.15s ease;
}
button:hover { filter: brightness(1.07); }
button:active { transform: translateY(1px); }
/* 보조 동작(검색·취소 등) */
button.ghost, button.secondary { background: var(--surface-3); color: var(--text); border-color: var(--line-strong); box-shadow: none; }
button.ghost:hover, button.secondary:hover { filter: brightness(1.18); }
/* 되돌리기 어려운 동작(내리기·잠그기·회수·지우기 등) — 주황 기본 버튼과 구분한다 */
button.danger { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-line); box-shadow: none; }
button.danger:hover { filter: brightness(1.25); }
button.sm { height: var(--control-h-sm); padding: 0 0.75rem; font-size: 0.82rem; }
button.link { height: auto; background: none; border: 0; box-shadow: none; color: var(--muted); padding: 0; font-weight: 500; }
button.link:hover { color: var(--text); filter: none; }
/* 링크를 버튼 모양으로(업체 관리·정산표 같은 이동) */
a.btn {
  display: inline-flex; align-items: center; gap: 0.35rem; height: var(--control-h-sm); padding: 0 0.8rem;
  border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface-3); color: var(--text);
  font-size: 0.84rem; font-weight: 600; white-space: nowrap;
}
a.btn:hover { border-color: var(--accent-line); color: var(--text); }
form.inline { display: inline; }
details { margin-top: 0.5rem; }
summary { cursor: pointer; color: var(--text-2); font-weight: 600; padding: 0.3rem 0; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "›"; display: inline-block; width: 1rem; color: var(--muted); transition: transform 0.15s ease; }
details[open] > summary::before { transform: rotate(90deg); }
fieldset { margin: 0; padding: 0.75rem 0.9rem 0.9rem; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); }
legend { padding: 0 0.35rem; font-size: 0.82rem; font-weight: 600; color: var(--text-2); }

/* ---------- 글자·알림 ---------- */
.muted { color: var(--muted); }
.small { font-size: 0.8rem; }
.hint { color: var(--muted); font-size: 0.84rem; }
.lead { color: var(--muted); margin: 0 0 1rem; font-size: 0.92rem; }
.nowrap { white-space: nowrap; }
.error, .notice, .warn { margin: 0.6rem 0; padding: 0.65rem 0.9rem; border-radius: var(--radius-sm); border: 1px solid transparent; }
.error { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-line); }
.notice { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }
.warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }

/* 화면 설명 — 한 줄(.lead)만 늘 보이고 나머지는 눌러서 편다(10-10 "쓸데없는 설명이 바로 노출"). */
details.help { margin: 0 0 0.8rem; }
.lead + details.help { margin: -0.6rem 0 1rem; }
details.help > summary { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.1rem 0; font-size: 0.8rem; color: var(--muted); }
details.help > summary::before { content: "ⓘ"; width: auto; transform: none; }
details.help > summary:hover { color: var(--text-2); }
details.help[open] > summary { color: var(--text-2); }
.help-body { margin-top: 0.4rem; padding: 0.75rem 0.95rem; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); color: var(--text-2); font-size: 0.86rem; line-height: 1.7; }
.help-body p { margin: 0.25rem 0; }
.help-body p:first-child { margin-top: 0; }
.help-body p:last-child { margin-bottom: 0; }

/* ---------- 로그인 흐름 ---------- */
.auth {
  position: relative; max-width: 408px; margin: 10vh auto; padding: 2.2rem 2rem 1.8rem;
  background: var(--glass), var(--surface);
  border: 1px solid var(--line-strong); border-radius: 22px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 40px 90px -30px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(0, 0, 0, 0.4);
}
.auth::before {
  content: ""; display: block; width: 159px; height: 66px; margin-bottom: 1rem;
  background: url("logo.png") no-repeat left center / contain; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}
.auth h1 { font-size: 1.4rem; }
.auth > p:not(.hint):not(.error) { color: var(--text-2); }
.auth button[type=submit] { width: 100%; height: 2.75rem; margin-top: 0.2rem; }

/* 폼: 라벨 글자와 (안내)는 한 줄, 입력칸은 그 아래. 예전엔 라벨이 세로 flex라 (안내)가 따로 한 줄을 먹었다. */
.stack { display: flex; flex-direction: column; gap: 0.8rem; margin: 0.9rem 0; }
.stack > button, .stack > .row { align-self: flex-start; }
.stack .stack { margin: 0; }
.stack label, .filters label, .cfg-form label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text-2); }
.filters label { font-size: 0.78rem; color: var(--muted); }
:is(.stack, .filters, .cfg-form) label > :is(input:not([type=radio]):not([type=checkbox]), select, textarea) { display: block; margin-top: 0.35rem; }
label .muted, label .hint { font-weight: 500; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.8rem 1rem; }
/* 폼 안의 두세 칸 줄: (안내) 길이가 달라도 입력칸 바닥을 맞춘다 */
form .split { align-items: end; }
label.check-line { display: flex; align-items: center; gap: 0.5rem; height: var(--control-h); font-weight: 500; color: var(--text); }

.qr { display: flex; justify-content: center; margin: 1.2rem 0; }
/* QR은 인증 앱이 읽어야 해서 흰 바탕을 유지한다. */
.qr svg { width: 280px; max-width: 100%; height: auto; background: #fff; padding: 12px; border-radius: 16px; box-shadow: 0 12px 40px -12px rgba(0, 0, 0, 0.8); }
/* 휴대폰으로 등록: 키·이름 눌러서 복사(admin.js). iPhone은 otpauth 링크를 암호 앱으로 보내 Google OTP 바로 추가 버튼은 뺐다(09-17). */
.steps { margin: 0.3rem 0 0.6rem; padding-left: 1.3rem; color: var(--text-2); font-size: 0.9rem; }
.steps li { margin: 0.25rem 0; }
.copy-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.copy-row code.secret { cursor: pointer; user-select: all; -webkit-user-select: all; }
.copy-done { color: var(--ok); }
.offscreen { position: fixed; left: -9999px; top: 0; opacity: 0; }
.secret, code.secret { display: inline-block; padding: 0.5rem 0.75rem; background: var(--bg-2); border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); letter-spacing: 0.08em; word-break: break-all; color: var(--accent-2); font-size: 0.95rem; }

/* ---------- 로그인 뒤 틀: 사이드바 + 본문 ---------- */
.app { display: flex; min-height: 100vh; }
/* 메뉴 24개가 900px 높이 화면에서 스크롤 없이 들어가게 줄 높이를 줄였다(10-10). */
.sidebar {
  position: sticky; top: 0; height: 100vh; flex: 0 0 var(--sidebar-w); width: var(--sidebar-w);
  display: flex; flex-direction: column; gap: 0.3rem; padding: 0.8rem 0.7rem 0.65rem;
  background: linear-gradient(180deg, rgba(20, 22, 30, 0.85), rgba(13, 14, 19, 0.85));
  border-right: 1px solid var(--line); backdrop-filter: blur(14px);
}
.brand { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.65rem; padding: 0.15rem 0.5rem 0.35rem; color: var(--text); } /* 두 게임 로고(146px) + 글자가 안 들어가면 글자를 아래 줄로 */
.brand:hover { color: var(--text); }
/* 게임 타이틀 로고(로그인 화면 title_rebirth, 10-31 사용자 「R 아이콘 촌스러워」) */
.brand-logo { height: 40px; width: auto; flex: none; display: block; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 0.98rem; font-weight: 800; letter-spacing: -0.02em; }
.brand-text small { font-size: 0.7rem; color: var(--muted); font-weight: 600; letter-spacing: 0.02em; }

.menu { flex: 1; display: flex; flex-direction: column; gap: 1px; overflow-y: auto; scrollbar-width: thin; }
.menu .group { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.1em; color: var(--muted); margin: 0.55rem 0.7rem 0.15rem; opacity: 0.8; }
.menu .group:first-child { margin-top: 0.1rem; }
.menu a {
  position: relative; display: flex; align-items: center; gap: 0.6rem;
  padding: 0.3rem 0.7rem; border-radius: 8px; color: var(--text-2); font-size: 0.86rem; font-weight: 500; line-height: 1.3;
  transition: background 0.15s ease, color 0.15s ease;
}
.menu a:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }
.menu a.active { background: linear-gradient(90deg, var(--accent-soft), rgba(217, 164, 65, 0.02)); color: var(--text); font-weight: 700; box-shadow: inset 0 0 0 1px rgba(217, 164, 65, 0.16); }
.menu a.active::before { content: ""; position: absolute; left: -0.7rem; top: 22%; bottom: 22%; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.icon { width: 18px; height: 18px; flex: none; }
.menu a .icon { width: 16px; height: 16px; color: var(--muted); transition: color 0.15s ease; }
.menu a:hover .icon { color: var(--text-2); }
.menu a.active .icon { color: var(--accent); }

.who { display: flex; align-items: center; gap: 0.55rem; padding: 0.45rem 0.5rem; border-radius: 12px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); }
.avatar { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 50%; background: linear-gradient(135deg, var(--surface-3), #2a2f3f); color: var(--text); font-weight: 700; font-size: 0.82rem; border: 1px solid var(--line-strong); }
.who-text { display: flex; flex-direction: column; align-items: flex-start; gap: 0.05rem; min-width: 0; flex: 1; }
.who-text strong { font-size: 0.84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.who-actions { margin-left: auto; display: inline-flex; align-items: center; gap: 0.1rem; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; height: auto; padding: 0.4rem; background: transparent; border: 0; color: var(--muted); box-shadow: none; border-radius: 9px; }
.icon-button:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); box-shadow: none; filter: none; }
.role { font-size: 0.66rem; font-weight: 700; padding: 0.05rem 0.45rem; border-radius: 999px; background: var(--surface-3); color: var(--muted); border: 1px solid var(--line); }
.role-root { background: var(--accent-soft); color: var(--accent-2); border-color: var(--accent-line); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.banners { padding: 1rem 2rem 0; max-width: 1360px; width: 100%; margin: 0 auto; }
.banner { margin: 0 0 0.5rem; padding: 0.7rem 0.9rem; border-radius: var(--radius-sm); border: 1px solid transparent; }
.banner-warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.banner-danger { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-line); font-weight: 700; }
.content { flex: 1; width: 100%; max-width: 1360px; margin: 0 auto; padding: 1.7rem 2rem 3rem; animation: rise 0.25s ease-out both; }
@keyframes rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
/* 상세 화면 맨 위 "← 목록" */
.content > p:first-child:has(> a:only-child) { margin: 0 0 0.3rem; font-size: 0.86rem; }

/* ---------- 카드·패널 ---------- */
.card, .panel { background: var(--glass), var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
/* 목록 안의 작은 상자(기간·예외 인원·보낸 기록 등) — 글자가 그냥 이어지는 블록이다. */
.card { position: relative; display: block; padding: 0.75rem 1rem; margin: 0.5rem 0; border-radius: var(--radius-sm); box-shadow: none; }
.card > p:first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card.muted { background: transparent; border-style: dashed; color: var(--muted); }
/* 대시보드 숫자 카드 — 세로 flex는 여기서만(다른 화면의 .card에 걸리면 문장이 단어마다 줄을 바꿨다, 10-10 크루 개설 화면) */
.cards { list-style: none; padding: 0; margin: 1.1rem 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0.85rem; }
.cards > .card { display: flex; flex-direction: column; margin: 0; padding: 1rem 1.1rem 0.95rem; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: border-color 0.18s ease, transform 0.18s ease; }
.cards > .card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.card h2 { font-size: 0.8rem; color: var(--text-2); font-weight: 600; }
/* .num은 <p>라 아래 `.cards > .card p`보다 구체적이어야 한다(10-10 한 번 작게 나왔다) */
.cards > .card .num { font-size: 2.1rem; font-weight: 800; margin: 0.2rem 0 0.15rem; color: var(--text); letter-spacing: -0.04em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.cards > .card .num.alert { color: var(--danger); }
.cards > .card .num.hot { color: var(--accent-2); }
.cards > .card:has(.num.alert) { border-color: var(--danger-line); background: radial-gradient(420px 160px at 100% 0%, var(--danger-soft), transparent 70%), var(--glass), var(--surface); }
.cards > .card:has(.num.hot) { border-color: var(--accent-line); background: radial-gradient(420px 160px at 100% 0%, var(--accent-soft), transparent 70%), var(--glass), var(--surface); }
.cards > .card p { margin: 0.25rem 0; font-size: 0.84rem; color: var(--muted); }
.cards > .card > a { margin-top: auto; padding-top: 0.45rem; font-size: 0.85rem; font-weight: 600; }
.panel { padding: 1.05rem 1.25rem; margin: 0.9rem 0; }
.panel > :last-child { margin-bottom: 0; }
.panel > h2 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.2rem 0.4rem; margin-bottom: 0.7rem; }
.panel > h2 .badge { align-self: center; }
.panel h3 { font-size: 0.88rem; margin: 1.1rem 0 0.5rem; color: var(--text-2); }
.panel > p { color: var(--text-2); }
.plan { padding-left: 1.1rem; margin: 0.4rem 0; }
.plan li { margin: 0.3rem 0; color: var(--text-2); }
.plan li::marker { color: var(--muted); }
/* 두 칸 배치(라이더 상세 등) — 좁으면 한 칸 */
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 0 0.9rem; align-items: start; }

/* ---------- 처리 칩: 누르면 그 자리에 폼이 펼쳐진다(10-10 — 폼이 다 펼쳐져 화면이 수천 px였다) ----------
   ⚠ details 안쪽에 flex/grid를 걸지 말 것(09-22 실측) — 바깥 .actions만 flex다. */
.actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0.5rem; margin-top: 0.8rem; }
.actions > details { margin: 0; }
.actions > details > summary {
  display: inline-flex; align-items: center; gap: 0.35rem; height: var(--control-h-sm); padding: 0 0.8rem;
  border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface-3); color: var(--text); font-size: 0.84rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.actions > details > summary::before { content: none; }
.actions > details > summary::after { content: "▾"; font-size: 0.7rem; color: var(--muted); transition: transform 0.15s ease; }
.actions > details > summary:hover { border-color: var(--accent-line); }
.actions > details > summary.danger { color: var(--danger); }
.actions > details > summary.primary { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-2); }
.actions > details[open] { flex: 1 1 100%; padding: 0.7rem 0.9rem 0.85rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--bg-2); }
.actions > details[open] > summary { border-color: var(--accent-line); background: var(--accent-soft); }
.actions > details[open] > summary::after { transform: rotate(180deg); }
.actions > details > .stack { margin: 0.75rem 0 0; }
.actions > details > .filters { margin: 0.75rem 0 0; }
.actions > details > p { margin: 0.6rem 0 0; }
.actions > a.btn, .actions > form { align-self: flex-start; }

/* ---------- 표·필터 ---------- */
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.6rem; margin: 0.9rem 0 0.8rem; }
.filters select, .filters input { width: auto; min-width: 11rem; }
/* 체크박스 하나짜리 필터(지도 제보 "신고된 것만") — 입력칸과 같은 높이로 줄을 맞춘다. */
.filters label.toggle { display: inline-flex; align-items: center; gap: 0.4rem; height: var(--control-h); color: var(--text-2); font-size: 0.84rem; }
.filters label.toggle input { min-width: 0; }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel .table-wrap { box-shadow: none; background: var(--bg-2); border-radius: var(--radius-sm); }
/* 긴 이력 표 — 화면을 끝없이 늘리지 않고 표 안에서 스크롤 */
.table-wrap.scroll { max-height: 26rem; overflow: auto; }
.table-wrap.scroll thead th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); }
table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
th, td { text-align: left; padding: 0.55rem 0.8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; background: rgba(255, 255, 255, 0.02); white-space: nowrap; }
td { color: var(--text-2); font-variant-numeric: tabular-nums; }
td strong, td a { color: var(--text); }
td a:hover { color: var(--accent-2); }
tbody tr { transition: background 0.12s ease; }
tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
tbody tr:last-child td { border-bottom: 0; }
tr.highlight { background: var(--accent-soft); }
tr.total td { background: rgba(255, 255, 255, 0.025); }
/* 표 안의 작은 폼(사유 + 버튼) */
td :is(input:not([type=radio]):not([type=checkbox]), select) { height: var(--control-h-sm); font-size: 0.84rem; }
td button { height: var(--control-h-sm); padding: 0 0.75rem; font-size: 0.82rem; }
td .filters { margin: 0; gap: 0.4rem; }
td .filters label { font-size: 0.74rem; }
td .filters input { min-width: 9rem; }
td form.inline { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.35rem; }
td form.inline input { min-width: 9rem; }
/* 감사 로그 "내용"(JSON) — 좁은 칸에 글자 단위로 꺾여 줄이 수십 줄이 됐다(10-10). 두 줄로 자르고 전체는 툴팁. */
.detail { font-family: var(--mono); font-size: 0.76rem; color: var(--muted); word-break: break-all; }
td.detail { min-width: 14rem; max-width: 26rem; }
td.reason { min-width: 12rem; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.empty { text-align: center; color: var(--muted); padding: 2rem; }

/* ---------- 배지 ---------- */
.badge { display: inline-flex; align-items: center; font-size: 0.7rem; font-weight: 700; padding: 0.1rem 0.55rem; border-radius: 999px; background: var(--surface-3); color: var(--text-2); border: 1px solid var(--line); white-space: nowrap; line-height: 1.6; vertical-align: 0.1em; }
.badge-danger, .badge-fail { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-line); }
.badge-accent { background: var(--accent-soft); color: var(--accent-2); border-color: var(--accent-line); }
.badge-ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }
.badge-warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.badge-muted { background: transparent; color: var(--muted); }
.badges { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.5rem; }

/* ---------- 신고 처리 ---------- */
.content-title { font-size: 1.12rem; margin: 0.3rem 0; }
.content-body { white-space: pre-wrap; word-break: break-word; margin: 0.5rem 0 0.9rem; padding: 0.8rem 1rem; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--text); }
.parent { border-left: 3px solid var(--line-strong); padding-left: 0.9rem; }
.parent p { margin: 0.2rem 0; }
.images { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.images img { width: 160px; height: 160px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); }
.images figure { margin: 0; }
.choices { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.choices legend { padding: 0; font-size: 0.82rem; font-weight: 600; color: var(--text-2); margin-bottom: 0.4rem; }
.choice, .stack label.choice { display: flex; flex-direction: row; gap: 0.6rem; align-items: flex-start; padding: 0.65rem 0.85rem; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; background: var(--bg-2); color: var(--text); font-size: 0.88rem; font-weight: 500; transition: border-color 0.15s ease, background 0.15s ease; }
.choice input { margin-top: 0.25rem; }
.choice:hover { border-color: var(--line-strong); }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px rgba(217, 164, 65, 0.08); }
/* 짧은 선택지(1일·3일·7일, 프로·VIP)는 가로로 — 한 줄씩 큰 카드로 쌓여 화면이 길어졌다(10-10). */
.choices.inline { flex-direction: row; flex-wrap: wrap; }
.choices.inline .choice { align-items: center; padding: 0 0.9rem; height: var(--control-h); }
.choices.inline .choice input { margin-top: 0; }

/* ---------- 대시보드 ---------- */
.section-title { font-size: 0.74rem; color: var(--muted); font-weight: 700; letter-spacing: 0.1em; margin: 1.6rem 0 0.2rem; }
.server-strip { display: flex; align-items: center; gap: 0.6rem; padding: 0.75rem 1rem; margin: 0.9rem 0; border-radius: 12px; border: 1px solid var(--line); background: var(--glass), var(--surface); color: var(--text); box-shadow: var(--shadow); transition: border-color 0.15s ease; }
.server-strip:hover { color: var(--text); border-color: var(--line-strong); }
.server-strip .small { margin-left: auto; }
.server-ok { border-color: var(--ok-line); background: linear-gradient(90deg, var(--ok-soft), transparent 55%), var(--surface); }
.server-fail { border-color: var(--danger-line); background: linear-gradient(90deg, var(--danger-soft), transparent 60%), var(--surface); }
.server-warn { border-color: var(--warn-line); background: linear-gradient(90deg, var(--warn-soft), transparent 60%), var(--surface); }

/* ---------- 화면 머리(제목 + 오른쪽 도구) ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 0.6rem 1rem; margin-bottom: 1rem; }
.page-head .lead { margin-bottom: 0; }
.page-head + details.help { margin-top: -0.5rem; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.segmented { display: inline-flex; flex-wrap: wrap; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 2px; margin: 0 0 1rem; }
.page-head .segmented, .page-head .filters { margin: 0; }
.segmented a { padding: 0.32rem 0.85rem; border-radius: 9px; color: var(--muted); font-size: 0.84rem; font-weight: 600; }
.segmented a:hover { color: var(--text); }
.segmented a.active { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 2px 8px rgba(0, 0, 0, 0.4); }
.pulse { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 0.35rem; vertical-align: 1px; }
.pulse-ok { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft), 0 0 10px var(--ok); }
.pulse-warn { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-soft), 0 0 10px var(--warn); }
.pulse-fail { background: var(--danger); box-shadow: 0 0 0 4px var(--danger-soft), 0 0 12px var(--danger); animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.35; } }

/* ---------- 서버 상태 ---------- */
.checks { list-style: none; padding: 0; margin: 1rem 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 0.6rem; }
.check { position: relative; padding: 0.7rem 0.85rem 0.65rem; border-radius: 12px; background: var(--glass), var(--surface); border: 1px solid var(--line); }
.check-top { display: flex; align-items: center; gap: 0.5rem; font-size: 0.86rem; }
.check-detail { font-size: 0.82rem; margin: 0.2rem 0 0.1rem; color: var(--text-2); }
.dot-status { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.check-ok .dot-status { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.check-warn { border-color: var(--warn-line); background: linear-gradient(135deg, var(--warn-soft), transparent 65%), var(--surface); }
.check-warn .dot-status { background: var(--warn); box-shadow: 0 0 8px var(--warn); }
.check-fail { border-color: var(--danger-line); background: linear-gradient(135deg, var(--danger-soft), transparent 65%), var(--surface); }
.check-fail .dot-status { background: var(--danger); box-shadow: 0 0 8px var(--danger); }

/* 숫자 칸 — 다섯 개가 4+1로 꺾이지 않게 칸을 좁혔다(10-10). */
.stats { list-style: none; padding: 0; margin: 1rem 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0.6rem; }
.stats li { padding: 0.75rem 0.95rem; border-radius: 12px; background: var(--glass), var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 0.1rem; box-shadow: var(--shadow); min-width: 0; }
.panel .stats li { background: var(--bg-2); box-shadow: none; }
.stats span { font-size: 0.74rem; color: var(--muted); font-weight: 600; }
.stats strong { font-size: 1.45rem; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.3; }
.stats em { font-style: normal; font-size: 0.76rem; color: var(--muted); }

.charts { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 0.8rem; margin: 1rem 0; }
.chart-card { margin: 0; padding: 0.85rem 0.95rem 0.55rem; border-radius: var(--radius); background: var(--glass), var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.chart-card figcaption { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.8rem; color: var(--muted); font-weight: 600; margin-bottom: 0.35rem; }
.chart-card figcaption strong { font-size: 1.1rem; color: var(--text); font-variant-numeric: tabular-nums; }
.chart { display: block; width: 100%; height: auto; }
.chart .grid { stroke: rgba(255, 255, 255, 0.06); stroke-width: 1; stroke-dasharray: 3 4; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--mono); }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.chart .dot { fill: var(--accent); }
.chart .stop-top { stop-color: var(--accent); stop-opacity: 0.32; }
.chart .stop-bottom { stop-color: var(--accent); stop-opacity: 0; }
/* 그래프 한 장 + 표 — 그래프를 화면 폭으로 늘리면 축 글자까지 같이 커진다(10-10 수입 통계). */
.chart-split { display: grid; grid-template-columns: minmax(300px, 460px) minmax(0, 1fr); gap: 0.9rem; align-items: start; margin: 1rem 0; }
.chart-split:not(:has(> .chart-card)) { display: block; }

/* ---------- 수입 통계 ---------- */
.split > .panel { margin: 0; }
.split:has(> .panel) { margin: 0.9rem 0; gap: 0.9rem; }
.bands { list-style: none; padding: 0; margin: 0.6rem 0 0; display: flex; flex-direction: column; gap: 0.35rem; }
.bands li { display: flex; justify-content: space-between; padding: 0.5rem 0.8rem; border-radius: 9px; background: var(--bg-2); border: 1px solid var(--line); }
.bands strong { font-variant-numeric: tabular-nums; }
.hours { list-style: none; padding: 0; margin: 0.4rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 0.25rem 1rem; }
.hours li { display: flex; align-items: center; gap: 0.55rem; padding: 0.3rem 0; border-bottom: 1px dashed var(--line); }
.hours .h { font-family: var(--mono); color: var(--muted); width: 2.6rem; flex: none; }
.hours meter { width: 70px; height: 8px; flex: none; }
.hours meter::-webkit-meter-bar { background: var(--bg-2); border: 1px solid var(--line); border-radius: 4px; }
.hours meter::-webkit-meter-optimum-value { background: var(--accent-grad); border-radius: 4px; }
.hours meter::-moz-meter-bar { background: var(--accent); }

/* ---------- 문의함 ---------- */
.message { padding: 0.7rem 0.9rem; margin: 0.6rem 0; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); }
.message-staff { border-color: var(--accent-line); background: var(--accent-soft); margin-left: 2rem; }
.message .content-body { margin: 0.2rem 0 0; }

/* ---------- 버그제보 ---------- */
.ticket > h2 a { color: var(--text); }
.ticket > h2 a:hover { color: var(--accent-2); }
.runs { margin: 0.6rem 0 0; }
.runs > details { margin: 0; padding: 0.35rem 0.7rem; border-bottom: 1px solid var(--line); }
.runs > details:last-child { border-bottom: 0; }
.runs > details > summary { font-weight: 500; font-size: 0.86rem; }
.runs-box { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-2); }

/* ---------- 운영 설정 (09-22 "아래로 주르륵, 흰 글자만" → 왼쪽 영역 목록 + 오른쪽 묶음 표) ---------- */
.cfg-top { display: flex; flex-wrap: wrap; align-items: stretch; gap: 0.8rem; margin: 0.4rem 0 1rem; }
.cfg-stats { display: flex; gap: 0.6rem; }
.cfg-stat { display: flex; flex-direction: column; justify-content: center; min-width: 9rem; padding: 0.55rem 1rem; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: 0.8rem; font-weight: 600; }
.cfg-stat:hover { border-color: var(--line-strong); color: var(--text-2); }
.cfg-stat.active { border-color: var(--accent-line); background: var(--accent-soft); }
.cfg-stat .num { font-size: 1.45rem; font-weight: 800; color: var(--text); line-height: 1.2; font-variant-numeric: tabular-nums; }
.cfg-stat .num.hot { color: var(--accent-2); }
.cfg-search { flex: 1 1 22rem; display: flex; gap: 0.5rem; align-items: center; }
.cfg-search input { flex: 1; }

.cfg { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 1rem; align-items: start; }
.cfg-nav { position: sticky; top: 1rem; display: flex; flex-direction: column; gap: 2px; padding: 0.6rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); max-height: calc(100vh - 2rem); overflow-y: auto; }
/* 영역 제목 — 회색 작은 글씨라 묻혔다(09-22 사용자) → 밝게·크게, 접었다 펼 수 있게. */
.cfg-secbox { margin: 0; border-top: 1px solid var(--line); }
.cfg-secbox:first-of-type { border-top: 0; }
.cfg-sec { display: flex; align-items: center; justify-content: space-between; gap: 0.4rem; margin: 0; padding: 0.5rem 0.6rem; border-radius: 8px; font-size: 0.9rem; font-weight: 800; color: var(--text); }
.cfg-sec::before { content: "›"; width: 0.9rem; color: var(--accent); font-weight: 700; transition: transform 0.15s ease; }
.cfg-secbox[open] > .cfg-sec::before { transform: rotate(90deg); }
.cfg-sec > span:first-of-type { flex: 1; }
.cfg-sec:hover { background: var(--surface-3); }
.cfg-seccount { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.72rem; font-weight: 600; color: var(--muted); }
.cfg-secbox > a { margin-left: 0.9rem; }
/* 영역 = 묶음이 하나뿐일 때(콜 판단): 제목 자리가 곧 링크다. */
.cfg-sec-link::before { content: "•"; width: 0.9rem; color: var(--accent); }
.cfg-sec-link.active { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.cfg-nav a { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; padding: 0.4rem 0.6rem; border-radius: 8px; color: var(--text-2); font-size: 0.86rem; }
.cfg-nav a:hover { background: var(--surface-3); color: var(--text); }
.cfg-nav a.active { background: var(--accent-soft); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); font-weight: 700; }
.cfg-count { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--muted); font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.cfg-dot { padding: 0 0.45rem; border-radius: 999px; background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent-2); font-size: 0.68rem; font-weight: 800; line-height: 1.2rem; white-space: nowrap; }

.cfg-body { margin: 0; padding: 0.4rem 1.3rem 0.6rem; }
.cfg-title { font-size: 1.1rem; font-weight: 800; padding: 0.8rem 0 0.6rem; border-bottom: 1px solid var(--line); }
.cfg-row { display: grid; grid-template-columns: minmax(0, 1fr) 13rem 7rem; gap: 1rem; align-items: start; padding: 0.9rem 0; border-top: 1px solid var(--line); }
.cfg-title + .cfg-row { border-top: 0; }
.cfg-row.changed { box-shadow: inset 3px 0 0 var(--accent); padding-left: 0.9rem; margin-left: -0.9rem; }
.cfg-name { min-width: 0; }
.cfg-label { font-size: 0.96rem; font-weight: 700; color: var(--text); display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.cfg-help { margin: 0.25rem 0 0; font-size: 0.82rem; line-height: 1.55; color: var(--muted); }
.cfg-help strong { color: var(--text-2); }
.cfg-meta { margin: 0.3rem 0 0; font-size: 0.75rem; color: var(--accent-2); }
.cfg-value { display: flex; flex-direction: column; align-items: flex-start; gap: 0.3rem; }
.cfg-num { font-size: 1.5rem; font-weight: 800; line-height: 1.1; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.cfg-num small { font-size: 0.8rem; font-weight: 600; color: var(--muted); margin-left: 0.2rem; }
.cfg-row.changed .cfg-num { color: var(--accent-2); }
.cfg-range { font-size: 0.72rem; color: var(--muted); }
.cfg-edit { margin: 0; }
.cfg-edit > summary { display: inline-flex; align-items: center; justify-content: center; width: 100%; height: var(--control-h-sm); padding: 0 0.8rem; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface-3); color: var(--text); font-size: 0.84rem; }
.cfg-edit > summary::before { content: none; }
.cfg-edit > summary:hover { border-color: var(--accent-line); }
.cfg-edit[open] > summary { border-color: var(--accent); background: var(--accent-soft); }
/* 펼치면 줄 전체 폭으로 내려가 폼을 넓게 보여 준다(버튼은 오른쪽에 그대로). */
/* ⚠ details 안쪽은 브라우저가 따로 감싸서 flex를 걸면 폼 폭이 줄어든다(09-22 실측) — 블록으로 둔다. */
.cfg-edit[open] { grid-column: 1 / -1; text-align: right; }
.cfg-edit[open] > summary { width: 7rem; }
.cfg-edit[open] > .cfg-form { margin-top: 0.6rem; text-align: left; }
.cfg-form { display: grid; grid-template-columns: 10rem minmax(0, 1fr) auto; gap: 0.7rem; align-items: end; padding: 0.9rem; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--accent-line); }
.cfg-history { margin-top: 1.4rem; }
.cfg-history > summary { color: var(--text); }

/* ---------- 좁은 화면: 사이드바가 위 가로 줄로 ---------- */
@media (max-width: 1100px) {
  .chart-split { grid-template-columns: 1fr; }
  .chart-split .chart-card { max-width: 520px; }
}
@media (max-width: 860px) {
  .app { flex-direction: column; }
  .sidebar { position: sticky; z-index: 10; height: auto; width: auto; flex: none; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0.4rem; padding: 0.6rem 0.8rem; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 0.2rem 0.3rem; }
  .brand-text small { display: none; }
  .who { order: 2; margin-left: auto; padding: 0.3rem 0.4rem; background: transparent; border: 0; }
  .who-text { display: none; }
  .menu { order: 3; flex: 1 0 100%; flex-direction: row; overflow-x: auto; gap: 0.25rem; padding-bottom: 0.2rem; scrollbar-width: none; }
  .menu::-webkit-scrollbar { display: none; }
  .table-wrap table { min-width: 720px; }
  .menu .group { display: none; }
  .menu a { white-space: nowrap; padding: 0.45rem 0.65rem; }
  .menu a.active::before { display: none; }
  .content { padding: 1.3rem 1rem 2.4rem; }
  .banners { padding: 0.8rem 1rem 0; }
  .auth { margin: 1rem; padding: 1.8rem 1.4rem; }
  .cols { grid-template-columns: 1fr; }
  .cfg { grid-template-columns: 1fr; }
  .cfg-nav { position: static; flex-direction: row; flex-wrap: wrap; max-height: none; }
  .cfg-sec { display: none; }
  .cfg-row { grid-template-columns: 1fr; gap: 0.6rem; }
  .cfg-form { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
