* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); scroll-behavior: smooth; }
body { min-height: 100vh; margin: 0; color: var(--text); background: var(--bg); font: 14px/1.5 var(--font-body); }
a { color: var(--text-strong); }
button, input, select, textarea { font: inherit; }
main { width: min(100% - 40px, 1240px); margin: 0 auto; padding: 30px 0 56px; }
/* 굵기를 600 으로 못 박는다. 브라우저 기본 bold(=700)는 실린 굵기가 아니라서 가짜 굵게로 뭉갠다. */
h1, h2, h3 { color: var(--text-strong); font-family: var(--font-display); font-weight: 600; }
h1 { margin: 0 0 20px; font-size: clamp(28px, 4vw, 38px); line-height: 1.08; letter-spacing: -.035em; }
h2 { margin: 0 0 var(--space-5); font-size: 18px; }
strong, b { font-weight: 600; }
.heading, .actions, .filters { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-4); }
/* `space-between` 은 **둘**을 위한 것이다. 여기 자식은 셋(제목 묶음 + 버튼 둘)이라
   버튼끼리 고르게 벌어졌다 — `.form-section-title` 과 같은 병이다(ui-sweep `spread-actions`).
   제목이 남는 공간을 먹으면 버튼은 오른쪽에 `gap` 만큼만 떨어져 묶인다. */
.heading { margin-bottom: var(--space-7); }
.heading > :first-child { margin-right: auto; }
.card, .filters, .actions form { padding: var(--space-card); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.narrow { width: min(100%, 420px); margin: 8vh auto 0; padding: var(--space-card); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
form:not(.inline) label { display: flex; flex-direction: column; gap: 6px; color: var(--text-muted); font-size: 12px; }
.inline { display: inline; }
input, select, textarea { width: 100%; min-height: 38px; padding: var(--space-4) var(--space-5); border: 1px solid var(--line-strong); border-radius: var(--radius-control); outline: 0; background: var(--surface); color: var(--text-strong); }
input:focus, select:focus, textarea:focus { border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 8%, transparent); }
textarea { min-height: 86px; resize: vertical; }
button, .button { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: var(--space-4) var(--space-5); border: 1px solid var(--line-strong); border-radius: var(--radius-control); background: var(--surface); color: var(--text-strong); font-weight: 600; text-decoration: none; cursor: pointer; }
button:hover, .button:hover { border-color: var(--accent); background: var(--accent-soft); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--space-5); margin-bottom: var(--space-section); }
.filters { margin-bottom: var(--space-5); align-items: flex-end; }
.filters > button, .filters > .button { min-height: 38px; padding-block: 0; } /* 라벨은 글자+선택칸 두 줄이라 가운데 맞춤이면 버튼이 뜬다 — 밑에 붙이고 선택칸 높이(38px)와 같게 */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
table { width: 100%; min-width: 720px; margin: 0; border-collapse: collapse; }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { background: var(--surface); color: var(--text-muted); font: 500 12px/1.3 var(--font-mono); letter-spacing: .03em; }
td { color: var(--text); font-size: 12px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: color-mix(in srgb, var(--text-strong) 2%, transparent); }
.details { display: grid; grid-template-columns: 9rem 1fr; }
.details dt, .details dd { margin: 0; padding: 9px; border-bottom: 1px solid var(--line); }
.empty, [role="alert"] { padding: 14px 16px; border-left: 3px solid var(--warn); border-radius: 7px; background: color-mix(in srgb, var(--warn) 8%, transparent); }
.help, .muted { color: var(--text-muted); }
.badge { display: inline-flex; align-items: center; gap: 6px; min-height: 23px; padding: 3px 8px; border: 1px solid var(--line-strong); border-radius: 99px; color: var(--text-muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge::before { width: 5px; height: 5px; border-radius: 50%; background: currentColor; content: ""; }
.badge.wait { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 28%, transparent); background: color-mix(in srgb, var(--warn) 6%, transparent); }
.badge.done { color: var(--good); border-color: color-mix(in srgb, var(--good) 28%, transparent); background: color-mix(in srgb, var(--good) 6%, transparent); }
.badge.cancel { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 28%, transparent); background: color-mix(in srgb, var(--bad) 6%, transparent); }
.badge.progress { color: var(--text-strong); background: color-mix(in srgb, var(--text-strong) 4%, transparent); }
@media (max-width: 820px) { main { width: min(100% - 28px, 1240px); padding-top: 22px; } }
@media (max-width: 640px) { .details { grid-template-columns: 7rem 1fr; } }
