:root {
  color-scheme: light;
  --accent: #145846;
  --on-accent: #fff;
  --ink: #172d24;
  --muted: #475952;
  --paper: #fff;
  --canvas: #f4f6f2;
  --line: #dce4dc;
  --input-line: #75877e;
  --soft: #eaf2eb;
  --danger: #9d2d24;
  --warning-bg: #fff2d9;
  --warning-ink: #654008;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", "Noto Sans CJK KR", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  line-height: 1.5;
  font-synthesis: none;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; display: grid; grid-template-columns: 224px minmax(0, 1fr); min-height: 100vh; }
:where(a, button, input, select, textarea):focus-visible { outline: 3px solid #1b71c7; outline-offset: 2px; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button, input, select, textarea, .button { min-height: 44px; min-width: 44px; border: 1px solid var(--input-line); border-radius: 7px; padding: 8px 12px; background: var(--paper); }
input, textarea, select { max-width: 100%; width: 100%; }
input[type=file] { padding: 0 8px 0 0; }
input::file-selector-button { min-height: 44px; border: 0; border-right: 1px solid var(--input-line); background: var(--soft); padding: 0 10px; margin-right: 8px; font: inherit; color: inherit; cursor: pointer; }
textarea { resize: vertical; }
button, select, .button { cursor: pointer; }
button:disabled, select:disabled { cursor: default; background: var(--soft); color: var(--muted); }
button:hover:not(:disabled), .button:hover { border-color: var(--ink); box-shadow: inset 0 0 0 1px currentColor; }
.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 650; }
button.danger { color: var(--danger); }
.button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.skip { position: fixed; z-index: 5; left: 12px; top: 8px; min-height: 44px; background: var(--paper); padding: 10px; transform: translateY(-150%); }
.skip:focus { transform: translateY(0); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.85rem, 3.5vw, 2.65rem); line-height: 1.18; letter-spacing: -.055em; }
h2 { font-size: 1.22rem; letter-spacing: -.035em; }
h3 { font-size: 1rem; }
small, .muted { color: var(--muted); }
.sidebar { background: #172e26; color: #f6faf6; display: flex; flex-direction: column; align-self: start; position: sticky; top: 0; min-height: 100vh; padding: 30px 16px 20px; }
.brand { display: flex; gap: 12px; align-items: center; margin: 0 4px 32px; overflow-wrap: anywhere; }
.brand-mark { display: grid; flex: 0 0 40px; width: 40px; height: 40px; place-items: center; background: var(--accent); color: var(--on-accent); border: 1px solid #89a297; border-radius: 9px; font-weight: 800; }
.brand small { display: block; color: #c7d9cf; letter-spacing: .09em; }
.sidebar nav { display: grid; gap: 4px; }
.sidebar nav a { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 8px 12px; text-decoration: none; border: 1px solid transparent; border-radius: 7px; }
.sidebar nav a:hover, .sidebar nav a[aria-current] { background: #294940; border-color: #57766b; }
.sidebar nav a[aria-current] { box-shadow: inset 3px 0 #8ed3a9; font-weight: 700; }
.sample-tag { color: #d4e3dc; font-size: .86rem; margin: auto 4px 0; padding-top: 24px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px clamp(16px, 3vw, 44px); border-bottom: 1px solid var(--line); background: var(--paper); }
#breadcrumb { font-weight: 650; }
.actor { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .9rem; }
.actor select { width: auto; color: var(--ink); }
main { max-width: 1440px; padding: 24px clamp(16px, 3vw, 44px) 52px; margin: auto; overflow-wrap: anywhere; }
#notice:not(:empty) { padding: 10px 14px; margin-bottom: 16px; background: var(--soft); border-left: 3px solid var(--accent); }
#notice.error:not(:empty) { background: #faeeeb; color: var(--danger); border-color: var(--danger); }
.page-head { margin: 10px 0 26px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head p { margin-top: 6px; color: var(--muted); }
.stack { display: grid; gap: 16px; }
.panel { min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: clamp(14px, 2.1vw, 24px); }
.panel > h2, .panel > p { margin-bottom: 12px; }
.panel.flush { padding: 0; }
.table-head { display: flex; gap: 12px; flex-wrap: wrap; align-items: baseline; justify-content: space-between; padding: 15px 18px; }
.table-scroll { overflow-x: auto; max-width: 100%; }
table { width: 100%; border-collapse: collapse; text-align: left; font-variant-numeric: tabular-nums; }
th, td { padding: 9px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
thead th { background: #f0f4ef; color: var(--muted); font-size: .86rem; font-weight: 650; white-space: nowrap; }
tbody tr:hover { background: #f8faf7; }
td a, .back { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; font-weight: 650; text-underline-offset: 4px; }
.nowrap { white-space: nowrap; }
.pill { display: inline-block; font-size: .86rem; padding: 3px 8px; border-radius: 5px; color: var(--muted); background: var(--soft); }
.pill.warn { background: var(--warning-bg); color: var(--warning-ink); }
.filters { display: grid; grid-template-columns: minmax(170px, 2fr) minmax(120px, 1fr) minmax(120px, 1fr) auto; gap: 12px; align-items: end; }
label.field { display: grid; gap: 5px; font-size: .91rem; font-weight: 630; }
.field :is(input, select, textarea) { font-size: 1rem; font-weight: 400; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(155px, 100%), 1fr)); gap: 12px; align-items: end; }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); gap: 1px; margin: 0; background: var(--line); padding: 0; overflow: hidden; }
.metrics div { background: var(--paper); padding: 14px 16px; }
.metrics dt { color: var(--muted); font-size: .9rem; }
.metrics dd { font-size: 1.12rem; font-weight: 720; margin: 5px 0 0; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; gap: 16px; }
.record { border-block-start: 1px solid var(--line); padding: 10px 0; }
.record:first-child { border-block-start: 0; }
.record p, .message-text { white-space: pre-wrap; }
.clean-list { list-style: none; padding: 0; margin: 0; }
.list-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.empty { padding: 14px 0; color: var(--muted); }
.table-scroll .empty { padding: 16px; }
@media (max-width: 1020px) {
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 740px) {
  body { display: block; }
  .sidebar { position: static; min-height: auto; padding: 12px 16px; display: grid; gap: 8px; }
  .brand { margin: 0; }
  .sidebar nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .sidebar nav a { width: auto; }
  .sample-tag { margin: 0; padding: 0; }
  .toolbar { flex-wrap: wrap; }
  main { padding-top: 12px; }
  .filters { grid-template-columns: minmax(0, 1fr); }
  .customer-table { display: block; }
  .customer-table thead { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
  .customer-table tbody { display: grid; }
  .customer-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 8px 12px; border-top: 1px solid var(--line); }
  .customer-table td { border: 0; padding: 4px 2px; white-space: normal; }
  .customer-table td[data-title]::before { content: attr(data-title); display: block; font-size: .82rem; color: var(--muted); }
}
.panel-note { padding: 0 18px; color: var(--muted); }
.preview { border: 1px solid var(--line); background: var(--canvas); padding: 14px; border-radius: 7px; }
.preview h3 { margin-bottom: 10px; }
.cycle-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 14px; }
.cycle-form { border: 1px solid var(--line); border-radius: 7px; padding: 12px; }
