/* 아스콧 정산 — 화면 스타일 (빌드 도구 없이 이 파일 하나로 관리, 인라인 스타일 없음) */

:root {
  --bg: #f3f5f9;
  --surface: #ffffff;
  --surface-2: #f7f8fb;
  --surface-3: #eef1f6;
  --border: #e5e9f0;
  --border-strong: #d0d7e2;
  --text: #0f172a;
  --text-2: #475467;
  --muted: #8691a4;

  --primary: #3456e0;
  --primary-600: #2944c4;
  --primary-700: #2238a3;
  --primary-50: #eef2ff;
  --primary-100: #dde5ff;
  --violet: #7a4ad8;
  --violet-600: #6536c4;
  --violet-50: #f4effe;
  --green: #0a8754;
  --green-50: #e7f6ef;
  --red: #d33a3a;
  --red-50: #fdeeee;
  --amber: #b76a00;
  --amber-50: #fff5e1;
  --sky: #0b77ad;
  --sky-50: #e7f4fb;
  --slate-50: #eff2f7;

  --side-bg: #0c1426;
  --side-bg-2: #131d33;
  --side-text: #a6b0c3;
  --side-muted: #66728a;
  --side-w: 248px;

  --radius-lg: 16px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 14px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 18px 48px rgba(15, 23, 42, 0.18);
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Malgun Gothic", "맑은 고딕", system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------- 기본 ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img,
svg {
  vertical-align: middle;
}

button {
  font: inherit;
}

code,
.mono {
  font-family: var(--mono);
  font-size: 12.5px;
}

kbd {
  font-family: var(--mono);
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.icon {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.logo {
  width: 30px;
  height: 30px;
  flex: none;
  color: var(--primary);
  stroke: none;
  border-radius: 9px;
  box-shadow: 0 4px 12px rgba(52, 86, 224, 0.35);
}

.logo-lg {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

/* ---------- 레이아웃 ---------- */

.main {
  min-width: 0;
}

.with-shell .main {
  margin-left: var(--side-w);
}

.page {
  max-width: 1360px;
  margin: 0 auto;
  padding: 28px 32px 72px;
}

.page-center {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.page-head .muted {
  margin: 6px 0 0;
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}

.h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.h1-count {
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  margin-left: 4px;
}

.h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 12.5px;
}

.nowrap {
  white-space: nowrap;
}

.inline {
  display: inline;
}

.text-red {
  color: var(--red);
}

.text-amber {
  color: var(--amber);
  font-weight: 600;
}

.neg {
  color: var(--red);
}

.zero {
  color: var(--muted);
}

.hint {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.hint .icon {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
}

.link-plain {
  color: inherit;
}

.link-muted {
  color: var(--text-2);
}

.link-button {
  background: none;
  border: 0;
  padding: 0;
  color: var(--primary);
  cursor: pointer;
}

.link-button:hover {
  text-decoration: underline;
}

.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ---------- 사이드바 ---------- */

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: var(--side-w);
  display: flex;
  flex-direction: column;
  background: var(--side-bg);
  color: var(--side-text);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 18px 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}

.brand:hover {
  text-decoration: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text b {
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.brand-text small {
  font-size: 11.5px;
  color: var(--side-muted);
  font-weight: 600;
  letter-spacing: 0.08em;
}

.side-close {
  display: none;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--side-text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.side-close .icon {
  width: 20px;
  height: 20px;
}

.side-search {
  position: relative;
  margin: 4px 14px 10px;
}

.side-search .icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--side-muted);
}

.side-search input {
  width: 100%;
  height: 36px;
  padding: 0 34px 0 34px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--side-bg-2);
  color: #e8ecf4;
  font: inherit;
  font-size: 13px;
}

.side-search input::placeholder {
  color: var(--side-muted);
}

.side-search input:focus {
  outline: none;
  border-color: rgba(125, 150, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(52, 86, 224, 0.3);
}

.side-search kbd {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--side-muted);
  font-size: 11px;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 10px 16px;
  flex: 1;
}

.side-label {
  margin: 14px 10px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--side-muted);
}

.side-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  height: 38px;
  padding: 0 10px;
  border-radius: 9px;
  color: var(--side-text);
  font-weight: 550;
  font-size: 14px;
}

.side-nav a .icon {
  width: 18px;
  height: 18px;
  color: var(--side-muted);
}

.side-nav a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  text-decoration: none;
}

.side-nav a.active {
  background: rgba(99, 125, 255, 0.16);
  color: #fff;
}

.side-nav a.active .icon {
  color: #9cb0ff;
}

.side-nav a.active::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #7f98ff;
}

.side-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #dfe5f1;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.side-badge-warn {
  background: #f5a524;
  color: #3a2300;
}

.side-only-mobile {
  display: none !important;
}

.side-foot {
  padding: 12px 14px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.me {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.me-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}

.me-text b {
  color: #fff;
  font-size: 13.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.me-text small {
  color: var(--side-muted);
  font-size: 11.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.me-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 10px;
}

.me-actions form {
  margin: 0;
  display: flex;
}

.me-actions a,
.me-actions button {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: var(--side-text);
  font-size: 12.5px;
  cursor: pointer;
}

.me-actions a:hover,
.me-actions button:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  text-decoration: none;
}

.avatar {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #5b77f0, #3456e0);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}

.avatar-sm {
  width: 28px;
  height: 28px;
  font-size: 12px;
}

.avatar-dark {
  background: #1f2a44;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 35;
  background: rgba(8, 13, 25, 0.5);
}

.mobilebar {
  display: none;
}

.demo-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--amber-50);
  color: #7a4700;
  border-bottom: 1px solid #f4dca6;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
}

/* ---------- 카드 ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  margin-bottom: 18px;
}

.card-flush {
  padding: 0;
  overflow: hidden;
}

.card-flush .table-wrap {
  margin: 0;
  padding: 0;
}

.card-pad {
  padding: 16px 20px 0;
}

.card-pad-x {
  margin: 0 20px 12px;
}

.card-flush > .card-head.card-pad {
  margin-bottom: 12px;
}

.card-narrow {
  max-width: 440px;
  width: 100%;
}

.card-form {
  max-width: 820px;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.card-head .muted {
  margin: 3px 0 0;
}

.head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.title-with-icon {
  display: flex;
  align-items: center;
  gap: 10px;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

/* ---------- 버튼 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 15px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s, border-color 0.12s, color 0.12s, box-shadow 0.12s;
  text-decoration: none;
}

.btn:hover {
  background: var(--surface-2);
  border-color: #c2cbd8;
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible,
.input:focus-visible,
.tab:focus-visible,
.chip:focus-visible,
.pill:focus-visible,
.seg:focus-within,
.check-box:focus-within,
.radio-card:focus-within {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 1px 2px rgba(52, 86, 224, 0.3);
}

.btn-primary:hover {
  background: var(--primary-600);
  border-color: var(--primary-600);
}

.btn-violet {
  background: var(--violet);
  border-color: var(--violet);
  color: #fff;
  box-shadow: 0 1px 2px rgba(122, 74, 216, 0.3);
}

.btn-violet:hover {
  background: var(--violet-600);
  border-color: var(--violet-600);
}

.btn-dark {
  background: #1b2438;
  border-color: #1b2438;
  color: #fff;
}

.btn-dark:hover {
  background: #0f1729;
  border-color: #0f1729;
}

.btn-primary-soft {
  background: var(--primary-50);
  border-color: var(--primary-100);
  color: var(--primary-700);
}

.btn-primary-soft:hover {
  background: var(--primary-100);
  border-color: #c7d3ff;
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-2);
}

.btn-ghost:hover {
  background: var(--surface-3);
  border-color: transparent;
  color: var(--text);
}

.btn-warn {
  background: #c46d00;
  border-color: #c46d00;
  color: #fff;
}

.btn-warn:hover {
  background: #a95e00;
  border-color: #a95e00;
}

.btn-danger-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--red);
}

.btn-danger-ghost:hover {
  background: var(--red-50);
  border-color: transparent;
}

.btn-soft {
  background: var(--primary-50);
  border-color: transparent;
  color: var(--primary-700);
}

.btn-soft:hover {
  background: var(--primary-100);
  border-color: transparent;
}

.btn-glass {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-sm {
  height: 34px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 9px;
}

.btn-xs {
  height: 28px;
  padding: 0 9px;
  font-size: 12.5px;
  border-radius: 7px;
  gap: 4px;
}

.btn-xs .icon {
  width: 14px;
  height: 14px;
}

.btn-icon {
  padding: 0;
  width: 28px;
}

.btn-block {
  width: 100%;
  height: 46px;
  font-size: 15px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
}

.icon-btn:hover {
  background: var(--surface-2);
  text-decoration: none;
}

.icon-btn .icon {
  width: 18px;
  height: 18px;
}

/* ---------- 입력 ---------- */

.input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  transition: border-color 0.12s, box-shadow 0.12s;
}

.input::placeholder {
  color: #a3acbb;
}

textarea.input {
  height: auto;
  min-height: 64px;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.5;
}

.input:hover {
  border-color: #b9c3d2;
}

.input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(52, 86, 224, 0.16);
}

.input:disabled {
  background: var(--surface-2);
  color: var(--muted);
}

.input[type="number"] {
  font-variant-numeric: tabular-nums;
}

.input-sm {
  height: 34px;
  width: auto;
  min-width: 124px;
  font-size: 13px;
  border-radius: 9px;
}

select.input {
  appearance: none;
  padding-right: 32px;
  background-image: url("../img/select-arrow.cb35708c09dc.svg");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px 16px;
}

.form-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fs {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.fs + .fs {
  margin-top: 4px;
}

.fs-title {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 0;
  margin: 0 0 12px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}

.fs-title::after {
  content: "";
  flex: 1;
  height: 1px;
  margin-left: 4px;
  background: var(--border);
}

.fs-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-50);
  color: var(--primary);
  font-size: 11.5px;
  font-weight: 800;
}

.slot-form[data-kind="fake"] .fs-num {
  background: var(--violet-50);
  color: var(--violet);
}

.fs-note {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--green);
}

.fs-note .icon {
  width: 14px;
  height: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field-wide {
  grid-column: 1 / -1;
}

.field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}

.req {
  color: var(--red);
}

.field-error {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--red);
  font-size: 12.5px;
  font-weight: 600;
}

.field-error .icon {
  width: 14px;
  height: 14px;
}

.has-error .input {
  border-color: var(--red);
  background: #fffafa;
}

.affix {
  position: relative;
  display: flex;
  align-items: center;
}

.affix .input {
  padding-right: 42px;
}

.affix-unit {
  position: absolute;
  right: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  pointer-events: none;
}

.money-echo {
  min-height: 18px;
  color: var(--primary-700);
  font-size: 12.5px;
  font-weight: 600;
}

.field-wide.field-check .field-label-spacer {
  display: none;
}

.check-box {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  font-weight: 500;
}

.check-box input,
.radio-card input,
.table .check input,
.seg input {
  accent-color: var(--primary);
}

.check-box input {
  width: 17px;
  height: 17px;
  margin: 0;
}

.check-box:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-50);
  color: var(--primary-700);
}

.segmented {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 11px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  width: 100%;
}

.seg {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--text-2);
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  white-space: nowrap;
}

.seg input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.seg:has(input:checked),
.seg.is-on {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-md);
}

.seg:hover {
  color: var(--text);
  text-decoration: none;
}

.segmented-sm {
  width: auto;
  margin-left: auto;
}

.segmented-sm .seg {
  height: 28px;
  font-size: 13px;
}

.radios {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.radio-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  line-height: 1.45;
}

.radio-card input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  flex: none;
}

.radio-card:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-50);
  box-shadow: inset 0 0 0 1px var(--primary);
}

.radio-card:hover {
  border-color: #b9c3d2;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.form-actions .muted {
  margin-right: auto;
}

.inline-form {
  margin: 0;
}

.end-preview {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 10px 0 0;
  color: var(--text-2);
  font-size: 13px;
}

.end-preview .icon {
  color: var(--primary);
}

/* ---------- 알림 상자 ---------- */

.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 11px;
  font-size: 13.5px;
  line-height: 1.5;
  margin: 0 0 16px;
  border: 1px solid transparent;
}

.alert > .icon {
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

.form .alert {
  margin: 0;
}

.alert-error {
  background: var(--red-50);
  border-color: #f6caca;
  color: #97201f;
}

.alert-info {
  background: var(--primary-50);
  border-color: var(--primary-100);
  color: #213b99;
}

.alert-warn {
  background: var(--amber-50);
  border-color: #f4dca6;
  color: #6d4200;
}

.info-box {
  margin: 0;
  padding: 12px 14px;
  border-radius: 11px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.info-row {
  display: flex;
  gap: 12px;
  font-size: 13.5px;
}

.info-row dt {
  flex: none;
  width: 76px;
  color: var(--muted);
}

.info-row dd {
  margin: 0;
  min-width: 0;
}

.explain {
  padding: 12px 14px;
  border-radius: 11px;
  background: var(--surface-2);
  font-size: 13px;
  color: var(--text-2);
}

.explain p {
  margin: 0 0 4px;
}

.explain p:last-child {
  margin: 0;
}

.calc-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px 16px;
  padding: 14px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f1f4ff 0%, #f7f5ff 100%);
  border: 1px solid var(--primary-100);
}

.calc-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.calc-cell span {
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
}

.calc-cell b {
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.calc-preview .hint {
  grid-column: 1 / -1;
}

/* ---------- 월 바 ---------- */

.month-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding: 12px 14px;
  margin-bottom: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.month-nav,
.month-status,
.month-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.month-actions {
  margin-left: auto;
  flex-wrap: wrap;
}

.month-actions form {
  margin: 0;
}

.month-form {
  margin: 0;
}

.month-input {
  width: 150px;
  height: 36px;
  font-weight: 700;
}

.month-label {
  min-width: 110px;
  text-align: center;
  font-size: 15px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}

.status .icon {
  width: 14px;
  height: 14px;
}

.status-open {
  background: var(--green-50);
  color: var(--green);
}

.status-closed {
  background: #1b2438;
  color: #fff;
}

.status-paid {
  background: var(--green-50);
  color: var(--green);
}

/* ---------- 요약 카드 ---------- */

.kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.kpis:has(> .kpi:nth-child(4):last-child) {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.kpi-feature {
  background: linear-gradient(160deg, #fffaf0 0%, #ffffff 70%);
  border-color: #f2dfb5;
}

.kpi-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.kpi-icon {
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.kpi-icon .icon {
  width: 17px;
  height: 17px;
}

.kpi-blue {
  background: var(--primary-50);
  color: var(--primary);
}

.kpi-green {
  background: var(--green-50);
  color: var(--green);
}

.kpi-amber {
  background: #ffefcc;
  color: #b06400;
}

.kpi-violet {
  background: var(--violet-50);
  color: var(--violet);
}

.kpi-slate {
  background: var(--slate-50);
  color: #52607a;
}

.kpi-red {
  background: var(--red-50);
  color: var(--red);
}

.kpi-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}

.kpi-value {
  font-size: 23px;
  font-weight: 780;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.kpi-value small,
.pay-amount small,
.payout-amount small,
.sheet-payout small,
.pay-breakdown small {
  font-size: 0.55em;
  font-weight: 600;
  margin-left: 2px;
  color: var(--muted);
  letter-spacing: 0;
}

.kpi-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  min-width: 0;
}

.kpi-foot > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delta {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 20px;
  padding: 0 6px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.delta .icon {
  width: 12px;
  height: 12px;
  stroke-width: 2.4;
}

.delta-up {
  background: var(--green-50);
  color: var(--green);
}

.delta-down {
  background: var(--red-50);
  color: var(--red);
}

/* ---------- 시작하기 ---------- */

.onboarding {
  background: linear-gradient(135deg, #f3f6ff 0%, #fbf9ff 100%);
  border-color: var(--primary-100);
}

.onboarding-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.onboarding-head .muted {
  margin: 2px 0 0;
}

.onboarding-icon {
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 16px rgba(52, 86, 224, 0.35);
}

.onboarding-icon .icon {
  width: 22px;
  height: 22px;
}

.onboarding-progress {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

progress {
  appearance: none;
  width: 120px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
  color: var(--primary);
}

progress::-webkit-progress-bar {
  background: var(--surface-3);
  border-radius: 999px;
}

progress::-webkit-progress-value {
  background: var(--primary);
  border-radius: 999px;
}

progress::-moz-progress-bar {
  background: var(--primary);
  border-radius: 999px;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.step-mark {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--primary-100);
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 800;
}

.step.is-done .step-mark {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.step-mark .icon {
  width: 14px;
  height: 14px;
  stroke-width: 2.6;
}

.step-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.step-text span {
  color: var(--muted);
  font-size: 12.5px;
}

.step.is-done .step-text b {
  color: var(--muted);
  text-decoration: line-through;
}

.step .btn {
  align-self: flex-start;
}

.flow {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.flow li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.flow li div {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

.flow li span:not(.flow-num) {
  color: var(--muted);
  font-size: 12.5px;
}

.flow-num {
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1b2438;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
}

/* ---------- 직원 화면 요약 ---------- */

.pay-hero {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 2fr);
  gap: 18px;
  margin-bottom: 18px;
}

.pay-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 22px 24px;
  border-radius: var(--radius-lg);
  background: radial-gradient(120% 140% at 0% 0%, #4d6cf0 0%, #2c47c9 55%, #22379f 100%);
  color: #fff;
  box-shadow: 0 12px 30px rgba(44, 71, 201, 0.28);
}

.pay-label {
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}

.pay-amount {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.pay-main .pay-amount small {
  color: rgba(255, 255, 255, 0.75);
}

.pay-main .pay-amount.neg {
  color: #ffd2d2;
}

.pay-main .pay-amount.zero {
  color: rgba(255, 255, 255, 0.85);
}

.pay-status {
  margin-bottom: 6px;
}

.pay-main .status-open,
.pay-main .status-closed,
.pay-main .status-paid {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.pay-breakdown {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.pay-breakdown div {
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}

.pay-breakdown dt {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 600;
}

.pay-breakdown dd {
  margin: 4px 0 0;
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.team-list,
.admin-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.team-list li,
.admin-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--border);
}

.team-list li:last-child,
.admin-list li:last-child {
  border-bottom: 0;
}

.team-bonus {
  margin-left: auto;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  color: var(--green);
}

.team-bonus.neg {
  color: var(--red);
}

.admin-toggle {
  margin: 0 0 0 auto;
}

.person {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

/* ---------- 표 ---------- */

.table-wrap {
  overflow-x: auto;
  margin: 0 -22px;
  padding: 0 22px;
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}

.table th,
.table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 650;
  border-bottom: 1px solid var(--border);
}

.card-flush .table th:first-child,
.card-flush .table td:first-child {
  padding-left: 20px;
}

.card-flush .table th:last-child,
.card-flush .table td:last-child {
  padding-right: 20px;
}

.table tbody tr {
  transition: background 0.1s;
}

.table tbody tr:hover {
  background: #fafbfe;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table tfoot th {
  background: var(--surface-2);
  border-top: 1px solid var(--border-strong);
  border-bottom: 0;
  font-weight: 750;
}

.table .left {
  text-align: left;
}

.table .num {
  text-align: right;
}

.table .check {
  width: 36px;
  padding-right: 0;
}

.table .check input {
  width: 16px;
  height: 16px;
  margin: 0;
  vertical-align: middle;
}

.table-compact th,
.table-compact td {
  padding: 9px 10px;
}

.col-strong {
  font-weight: 750;
  background: #fffbf1;
}

.table thead th.col-strong,
.table tfoot th.col-strong {
  background: #fdf1d8;
  color: #6e4400;
}

.table td.col-strong {
  font-size: 14.5px;
}

.cell-title {
  font-weight: 650;
  color: var(--text);
}

.cell-title .pf {
  margin-right: 6px;
}

.cell-sub {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.4;
}

.cell-clip {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cell-memo {
  margin-top: 3px;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  color: var(--amber);
}

.link-icon {
  display: inline-flex;
  vertical-align: -3px;
  color: var(--primary);
}

.link-icon .icon {
  width: 14px;
  height: 14px;
}

.row-refunded td {
  background: #fcfcfd;
  color: var(--text-2);
}

.row-refunded .cell-title {
  color: var(--text-2);
}

.row-muted td,
.row-muted {
  color: var(--muted);
}

.row-empty:hover {
  background: none !important;
}

.row-empty td {
  white-space: normal;
}

.actions-col {
  width: 1%;
}

.row-actions {
  display: flex;
  gap: 2px;
  justify-content: flex-end;
  align-items: center;
}

.row-actions form {
  margin: 0;
}

.lock-note {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--muted);
}

.lock-note .icon {
  width: 14px;
  height: 14px;
}

.stack-label {
  display: none;
}

.state {
  font-weight: 650;
}

.state-green {
  color: var(--green);
}

.state-amber {
  color: var(--amber);
}

.state-red {
  color: var(--red);
}

.state-sky {
  color: var(--sky);
}

.state-muted {
  color: var(--muted);
}

/* 작업 목록: 칸을 좁게, 관리 버튼은 가로 스크롤해도 오른쪽에 붙어 있게 */
.table-slots th,
.table-slots td {
  padding-left: 9px;
  padding-right: 9px;
}

.table-slots .actions-col {
  position: sticky;
  right: 0;
  z-index: 2;
  background: var(--surface);
  box-shadow: -10px 0 12px -12px rgba(15, 23, 42, 0.25);
}

.table-slots thead .actions-col {
  z-index: 3;
  background: var(--surface-2);
}

.table-slots .actions-col:has(details[open]) {
  z-index: 20;
}

.table-slots tbody tr:hover .actions-col {
  background: #fafbfe;
}

.table-slots .row-refunded .actions-col {
  background: #fcfcfd;
}

.table-logs td.log-text {
  white-space: normal;
  min-width: 260px;
}

.changes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin-top: 4px;
}

.changes span {
  font-size: 12px;
  color: var(--text-2);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 7px;
}

.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-top: 1px solid var(--border);
}

/* ---------- 배지 ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  background: var(--surface-3);
  color: var(--text-2);
  white-space: nowrap;
}

.badge .icon {
  width: 12px;
  height: 12px;
}

.badge-green {
  background: var(--green-50);
  color: var(--green);
}

.badge-red {
  background: var(--red-50);
  color: var(--red);
}

.badge-sky {
  background: var(--sky-50);
  color: var(--sky);
}

.badge-amber {
  background: var(--amber-50);
  color: var(--amber);
}

.badge-muted {
  background: #eef0f4;
  color: var(--muted);
}

.badge-dark {
  background: #1b2438;
  color: #fff;
}

.badge-action {
  min-width: 70px;
  justify-content: center;
}

.act-create,
.act-restore,
.act-payout {
  background: var(--green-50);
  color: var(--green);
}

.act-update,
.act-order,
.act-policy {
  background: var(--amber-50);
  color: var(--amber);
}

.act-delete,
.act-refund,
.act-unrefund,
.act-reveal,
.act-unpay {
  background: var(--red-50);
  color: var(--red);
}

.act-close,
.act-reopen {
  background: #1b2438;
  color: #fff;
}

.act-export {
  background: var(--sky-50);
  color: var(--sky);
}

.pf {
  display: inline-flex;
  align-items: center;
  height: 19px;
  padding: 0 6px;
  margin-right: 6px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 750;
  vertical-align: 1px;
}

.pf-naver {
  background: #e2f6e8;
  color: #0a8a3a;
}

.pf-coupang {
  background: #fdebe6;
  color: #c9391f;
}

.kind-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  vertical-align: 1px;
}

.kind-reward {
  background: var(--primary);
}

.kind-fake {
  background: var(--violet);
}

.pill {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid transparent;
  white-space: nowrap;
  background: none;
}

button.pill {
  cursor: pointer;
}

.pill-pending {
  background: var(--amber-50);
  color: var(--amber);
  border-color: #f2d9a6;
}

.pill-done {
  background: var(--green-50);
  color: var(--green);
  border-color: #bfe4d2;
}

button.pill:hover {
  filter: brightness(0.96);
}

.chip-paid {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #bfe4d2;
  background: var(--green-50);
  color: var(--green);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.chip-paid .icon {
  width: 14px;
  height: 14px;
  stroke-width: 2.4;
}

.chip-paid:hover {
  background: #d9f0e5;
}

.pay-progress {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 12.5px;
  white-space: nowrap;
}

.pay-progress b {
  color: var(--text);
  margin-right: 1px;
}

.pay-progress.is-done {
  background: var(--green-50);
  color: var(--green);
}

.pay-progress.is-done b {
  color: var(--green);
}

.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.chip b {
  font-variant-numeric: tabular-nums;
}

.chip.is-on {
  background: #1b2438;
  border-color: #1b2438;
  color: #fff;
}

/* ---------- 더 보기 메뉴 ---------- */

.menu {
  position: relative;
}

.menu > summary {
  list-style: none;
}

.menu > summary::-webkit-details-marker {
  display: none;
}

.menu[open] > summary {
  background: var(--surface-3);
}

.menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 60;
  min-width: 190px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
}

.menu-list a,
.menu-list button {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  border: 0;
  background: none;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
}

.menu-list a:hover,
.menu-list button:hover {
  background: var(--surface-2);
  text-decoration: none;
}

.menu-list .icon {
  color: var(--muted);
}

.menu-warn,
.menu-warn .icon {
  color: var(--amber) !important;
}

.menu-danger,
.menu-danger .icon {
  color: var(--red) !important;
}

.menu-note {
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12.5px;
  white-space: normal;
}

/* ---------- 탭 / 필터 ---------- */

.tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--surface-3);
}

.tab {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 9px;
  border: 0;
  background: transparent;
  color: var(--text-2);
  font-weight: 650;
  cursor: pointer;
}

.tab .count {
  display: inline-block;
  min-width: 22px;
  margin-left: 6px;
  padding: 0 7px;
  border-radius: 999px;
  background: #dfe4ec;
  color: var(--text-2);
  font-size: 12px;
  line-height: 20px;
  text-align: center;
}

.tab.is-on {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-md);
}

.tab[data-tab="reward"].is-on .count {
  background: var(--primary);
  color: #fff;
}

.tab[data-tab="fake"].is-on .count {
  background: var(--violet);
  color: #fff;
}

.filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.filters.card {
  padding: 12px 14px;
}

.filter-search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 220px;
  max-width: 320px;
}

.filter-search .icon {
  position: absolute;
  left: 11px;
  color: var(--muted);
  pointer-events: none;
}

.filter-search .input {
  width: 100%;
  padding-left: 34px;
}

.bulkbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 20px 12px;
  padding: 8px 10px 8px 14px;
  border-radius: 12px;
  background: #1b2438;
  color: #fff;
}

.bulkbar span {
  margin-right: auto;
}

.bulkbar .btn:not(.btn-primary) {
  background: rgba(255, 255, 255, 0.1);
  border-color: transparent;
  color: #fff;
}

.bulkbar .btn:not(.btn-primary):hover {
  background: rgba(255, 255, 255, 0.18);
}

/* ---------- 곧 끝나는 작업 / 이력 ---------- */

.exp-list,
.timeline,
.rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.exp-list {
  max-height: 340px;
  overflow-y: auto;
  margin: 0 -6px;
  padding: 0 6px;
}

.exp-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}

.exp-list li:last-child {
  border-bottom: 0;
}

.exp-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.exp-text {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exp-sub {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dday {
  flex: none;
  min-width: 46px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  background: var(--surface-3);
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.dday-today {
  background: var(--red);
  color: #fff;
}

.dday-soon {
  background: var(--amber-50);
  color: var(--amber);
}

.timeline li {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 0 0 14px;
}

.timeline li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 14px;
  bottom: 0;
  width: 2px;
  background: var(--surface-3);
}

.tl-dot {
  flex: none;
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--border-strong);
}

.tl-create,
.tl-restore,
.tl-payout {
  background: var(--green);
}

.tl-update,
.tl-order,
.tl-policy {
  background: #e3a008;
}

.tl-delete,
.tl-refund,
.tl-unrefund,
.tl-unpay,
.tl-reveal {
  background: var(--red);
}

.tl-close,
.tl-reopen {
  background: #1b2438;
}

.tl-export {
  background: var(--sky);
}

.tl-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
}

.tl-text {
  font-size: 13.5px;
  line-height: 1.45;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tl-time {
  font-size: 12px;
  color: var(--muted);
}

.empty-line {
  padding: 22px 0 !important;
  justify-content: center;
  text-align: center;
  color: var(--muted);
}

.empty-line::after {
  display: none;
}

.history {
  margin-top: 18px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.history summary {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-weight: 650;
  color: var(--text-2);
}

.history .timeline {
  margin-top: 12px;
}

.history .tl-text {
  -webkit-line-clamp: unset;
}

/* ---------- 빈 화면 ---------- */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 34px 16px;
  text-align: center;
  color: var(--muted);
  white-space: normal;
}

.empty-state > .icon {
  width: 34px;
  height: 34px;
  padding: 7px;
  margin-bottom: 4px;
  border-radius: 12px;
  background: var(--surface-3);
  color: var(--text-2);
  box-sizing: content-box;
}

.empty-state b {
  color: var(--text);
  font-size: 15px;
}

.empty-state span {
  max-width: 420px;
  font-size: 13px;
}

.empty-state .btn {
  margin-top: 8px;
}

.empty-state-lg {
  padding: 46px 16px;
}

.empty-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ---------- 모달 ---------- */

.modal {
  width: min(780px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0;
  border: 0;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  background: var(--surface);
  color: var(--text);
}

.modal[open] {
  animation: modal-in 0.16s ease-out;
}

.modal::backdrop {
  background: rgba(10, 16, 30, 0.5);
  backdrop-filter: blur(2px);
}

.modal-shell {
  position: relative;
  padding: 24px 26px 22px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.modal-close .icon {
  width: 20px;
  height: 20px;
}

.modal-close:hover {
  background: var(--surface-3);
  color: var(--text);
}

.modal-title {
  margin: 0 44px 18px 0;
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

@keyframes modal-in {
  from {
    transform: translateY(8px) scale(0.99);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

.choose-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.choose {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--surface-2);
}

.choose:hover {
  text-decoration: none;
  border-color: var(--primary);
  background: var(--primary-50);
}

.choose b {
  font-size: 17px;
}

.choose span:last-child {
  color: var(--muted);
  font-size: 13px;
}

.choose-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-bottom: 4px;
}

.choose-icon .icon {
  width: 22px;
  height: 22px;
}

.choose-reward .choose-icon {
  background: var(--primary);
}

.choose-fake .choose-icon {
  background: var(--violet);
}

.choose-fake:hover {
  border-color: var(--violet);
  background: var(--violet-50);
}

.payout-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.payout-summary div {
  display: flex;
  flex-direction: column;
}

.payout-amount {
  margin-left: auto;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.payout-summary + .hint {
  margin-bottom: 14px;
}

/* ---------- 알림 ---------- */

.toasts {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 12px 14px;
  border-radius: 12px;
  background: #1b2438;
  color: #fff;
  box-shadow: var(--shadow-lg);
  font-weight: 550;
  animation: toast-in 0.2s ease-out;
  pointer-events: auto;
}

.toast > .icon {
  width: 18px;
  height: 18px;
}

.toast-success > .icon {
  color: #5fe0a5;
}

.toast-error {
  background: #8d1f1f;
}

.toast-close {
  margin-left: auto;
  width: 26px;
  height: 26px;
  flex: none;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: inherit;
  opacity: 0.7;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.toast-close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
}

@keyframes toast-in {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

/* ---------- 떠 있는 등록 버튼 (휴대폰) ---------- */

.fab {
  display: none;
}

/* ---------- 로그인 ---------- */

.page-auth {
  max-width: none;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px 28px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.auth-brand div {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.auth-brand b {
  font-size: 19px;
}

.auth-brand span {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 600;
}

.auth-card .alert {
  margin: 0;
}

.auth-card .input {
  height: 46px;
  font-size: 15px;
}

.auth-card .btn-block {
  margin-top: 4px;
  height: 46px;
}

.auth-foot {
  margin-top: 14px;
  text-align: center;
}

.auth-foot form {
  margin: 0;
}

.auth-foot a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ---------- 계정 안내 (임시 비밀번호) ---------- */

.account-notice {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.kv-list {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 20px;
}

.kv-list div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.kv-list dt {
  font-size: 12px;
  color: var(--text-3);
}

.kv-list dd {
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.temp-pass {
  display: inline-block;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--primary);
  background: var(--primary-50);
  border-radius: 10px;
  padding: 6px 14px;
  user-select: all;
}

@media (max-width: 760px) {
  .kv-list {
    grid-template-columns: 1fr;
  }
}

/* ---------- 리포트 ---------- */

.legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--text-2);
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lg {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.lg-received {
  background: #b9c8ff;
}

.lg-profit {
  background: var(--green);
}

.lg-payout {
  background: #f0a92b;
}

.chart-wrap {
  margin: 0 0 12px;
  overflow-x: auto;
}

.chart {
  display: block;
  width: 100%;
  min-width: 520px;
  height: auto;
  font-family: var(--font);
}

.chart-grid {
  stroke: var(--border);
  stroke-width: 1;
}

.chart-axis {
  stroke: var(--border-strong);
  stroke-width: 1;
}

.chart-tick,
.chart-label {
  fill: var(--muted);
  font-size: 11px;
}

.chart-label {
  font-weight: 600;
  fill: var(--text-2);
}

.chart-bar {
  transition: opacity 0.12s;
}

.chart-bar:hover {
  opacity: 0.8;
}

.bar-received {
  fill: #b9c8ff;
}

.bar-profit {
  fill: var(--green);
}

.bar-payout {
  fill: #f0a92b;
}

.bar-neg {
  fill: var(--red);
}

.rank-list li {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.rank-list li:last-child {
  border-bottom: 0;
}

.rank {
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 800;
}

.rank-list li:nth-child(-n + 3) .rank {
  background: var(--primary);
  color: #fff;
}

.rank-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.rank-line,
.rank-sub {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.rank-line b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-value {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.rank-sub {
  font-size: 12px;
  color: var(--muted);
}

.rank-body progress {
  width: 100%;
  height: 6px;
}

/* ---------- 검색 ---------- */

.search-hero {
  padding: 18px 20px;
}

.search-box {
  position: relative;
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.search-box > .icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.search-box .input {
  height: 46px;
  padding-left: 42px;
  font-size: 15px;
}

.search-box .btn {
  height: 46px;
  padding: 0 20px;
}

/* ---------- 정책 ---------- */

.policy-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: start;
}

.policy-form {
  gap: 0;
}

.policy-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.policy-group:first-of-type {
  padding-top: 2px;
}

.policy-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.policy-head .hint {
  margin-top: 2px;
}

.policy-form .form-actions {
  border-top: 0;
  padding-top: 18px;
}

.policy-aside {
  position: sticky;
  top: 20px;
}

.calc-steps {
  margin: 12px 0 14px;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.calc-steps li {
  position: relative;
  display: flex;
  flex-direction: column;
  padding-left: 32px;
  counter-increment: step;
}

.calc-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-50);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.calc-steps span {
  color: var(--muted);
  font-size: 12.5px;
}

/* ---------- 정산서 ---------- */

.sheet {
  max-width: 900px;
  margin: 0 auto 22px;
  padding: 36px 40px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
}

.sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--text);
}

.sheet-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sheet-brand div {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.sheet-brand b {
  font-size: 22px;
  letter-spacing: -0.03em;
}

.sheet-brand span {
  font-size: 13px;
  color: var(--text-2);
  font-weight: 600;
}

.sheet-brand .logo {
  width: 40px;
  height: 40px;
  box-shadow: none;
}

.sheet-meta,
.sheet-person {
  margin: 0;
  display: grid;
  gap: 4px 16px;
}

.sheet-meta {
  grid-template-columns: auto auto;
  font-size: 13px;
}

.sheet-meta div,
.sheet-person div {
  display: contents;
}

.sheet-meta dt,
.sheet-person dt {
  color: var(--muted);
}

.sheet-meta dd,
.sheet-person dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}

.sheet-person {
  grid-template-columns: repeat(3, auto 1fr);
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}

.sheet-person dd {
  text-align: left;
}

.sheet-summary {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.sheet-payout {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 20px;
  border-radius: 12px;
  background: var(--primary-50);
  border: 1px solid var(--primary-100);
}

.sheet-payout span {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-700);
}

.sheet-payout strong {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

.sheet-calc {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  font-size: 13.5px;
}

.sheet-calc th,
.sheet-calc td {
  padding: 5px 0;
}

.sheet-calc th {
  text-align: left;
  font-weight: 500;
  color: var(--text-2);
}

.sheet-calc th small {
  margin-left: 6px;
  color: var(--muted);
  font-size: 12px;
}

.sheet-calc td {
  text-align: right;
  font-weight: 600;
}

.sheet-calc .sep th,
.sheet-calc .sep td {
  border-top: 1px dashed var(--border-strong);
  font-weight: 700;
  color: var(--text);
}

.sheet-calc .sum th,
.sheet-calc .sum td {
  border-top: 2px solid var(--text);
  padding-top: 8px;
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}

.sheet-section {
  padding-top: 20px;
}

.sheet-h {
  margin: 0 0 10px;
  font-size: 14.5px;
  font-weight: 750;
}

.sheet-h small {
  margin-left: 6px;
  color: var(--muted);
  font-weight: 500;
  font-size: 12.5px;
}

.sheet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.sheet-table th,
.sheet-table td {
  padding: 7px 8px;
  border-bottom: 1px solid var(--border);
}

.sheet-table thead th {
  background: var(--surface-2);
  color: var(--text-2);
  font-weight: 650;
  border-bottom: 1px solid var(--border-strong);
}

.sheet-table tfoot th {
  font-weight: 750;
  border-top: 1px solid var(--border-strong);
  border-bottom: 0;
}

.sheet-table .left {
  text-align: left;
}

.sheet-table .num {
  text-align: right;
  white-space: nowrap;
}

.sheet-flag {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  color: var(--red);
  white-space: nowrap;
}

.sheet-none {
  margin: 20px 0 0;
  color: var(--muted);
}

.sheet-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--muted);
}

/* ---------- HTMX 요청 중 ---------- */

.htmx-request.btn,
.htmx-request.pill,
form.htmx-request {
  opacity: 0.6;
  pointer-events: none;
}

/* ---------- 중간 화면 ---------- */

@media (max-width: 1280px) {
  .kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .kpis:has(> .kpi:nth-child(4):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pay-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  .with-shell .main {
    margin-left: 0;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: none;
  }

  .sidebar.is-open {
    transform: none;
    box-shadow: var(--shadow-lg);
  }

  .side-close {
    display: inline-flex;
  }

  .mobilebar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    height: 56px;
    padding: 0 10px;
    background: var(--side-bg);
    color: #fff;
  }

  .mobilebar .brand {
    margin-right: auto;
  }

  .mobilebar .logo {
    width: 28px;
    height: 28px;
    box-shadow: none;
  }

  .mobilebar-btn {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  .mobilebar-btn:hover {
    background: rgba(255, 255, 255, 0.08);
  }

  .mobilebar-btn .icon {
    width: 22px;
    height: 22px;
  }

  .side-search {
    display: none;
  }

  .side-only-mobile {
    display: flex !important;
  }

  .page {
    padding: 22px 20px 64px;
  }

  .policy-layout {
    grid-template-columns: 1fr;
  }

  .policy-aside {
    position: static;
  }

}

@media (max-width: 900px) {
  .grid-2 {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .page-head {
    flex-direction: column;
    align-items: stretch;
  }

  .card-head {
    flex-wrap: wrap;
  }

  .pay-breakdown {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sheet-summary {
    grid-template-columns: 1fr;
  }

  .sheet-person {
    grid-template-columns: repeat(2, auto 1fr);
  }

  .flow {
    grid-template-columns: 1fr;
  }
}

/* ---------- 휴대폰 ---------- */

@media (max-width: 760px) {
  body {
    font-size: 14.5px;
  }

  .page {
    padding: 16px 14px 96px;
  }

  .h1 {
    font-size: 22px;
  }

  .hide-mobile {
    display: none !important;
  }

  .card {
    padding: 16px;
    border-radius: 14px;
    margin-bottom: 14px;
  }

  .card-flush {
    padding: 0;
  }

  .card-pad {
    padding: 14px 14px 0;
  }

  .card-pad-x {
    margin: 0 14px 12px;
  }

  .table-wrap {
    margin: 0 -16px;
    padding: 0 16px;
  }

  .month-bar {
    padding: 10px;
    gap: 10px;
    border-radius: 14px;
  }

  .month-nav {
    width: 100%;
  }

  .month-form {
    flex: 1;
  }

  .month-input {
    width: 100%;
  }

  .month-actions {
    margin-left: 0;
    width: 100%;
  }

  .month-actions .btn,
  .month-actions form {
    flex: 1;
  }

  .month-actions form .btn {
    width: 100%;
  }

  .segmented-sm {
    margin-left: 0;
    width: 100%;
  }

  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
  }

  .kpis:has(> .kpi:nth-child(4):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kpi {
    padding: 13px;
    border-radius: 14px;
    gap: 4px;
  }

  .kpi-feature {
    grid-column: 1 / -1;
    order: -1;
  }

  .kpi-icon {
    width: 26px;
    height: 26px;
    border-radius: 8px;
  }

  .kpi-value {
    font-size: 19px;
  }

  .kpi-feature .kpi-value {
    font-size: 24px;
  }

  .kpi-foot {
    flex-wrap: wrap;
    gap: 4px;
  }

  .kpi-foot > span:first-child {
    white-space: normal;
  }

  .onboarding-head {
    flex-wrap: wrap;
  }

  .onboarding-progress {
    margin-left: 0;
    width: 100%;
  }

  .onboarding-progress progress {
    flex: 1;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .step {
    flex-direction: row;
    align-items: center;
  }

  .step .btn {
    align-self: center;
  }

  .pay-main {
    padding: 20px;
  }

  .pay-amount {
    font-size: 34px;
  }

  .pay-breakdown {
    gap: 8px;
  }

  .pay-breakdown div {
    padding: 11px 12px;
  }

  .pay-breakdown dd {
    font-size: 16px;
  }

  .form-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .form-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .form-grid-3 .field-date {
    grid-column: 1 / -1;
    order: 1;
  }

  .form-grid-3 .field-wide {
    order: 2;
  }

  .form-grid-3 .hint {
    font-size: 12px;
  }

  .field-check .field-label-spacer {
    display: none;
  }

  .input {
    font-size: 16px;
    height: 44px;
  }

  .input-sm {
    height: 38px;
    font-size: 14px;
  }

  .filters {
    gap: 6px;
  }

  .filters .input-sm {
    flex: 1 1 45%;
    min-width: 0;
  }

  .filter-search {
    flex: 1 1 100%;
    max-width: none;
  }

  .tabs {
    flex: 1;
    min-width: 0;
  }

  .tab {
    flex: 1;
    justify-content: center;
    padding: 0 8px;
  }

  #slots > .card-head {
    flex-wrap: nowrap;
    align-items: center;
  }

  .bulkbar {
    margin: 0 14px 12px;
    flex-wrap: wrap;
  }

  /* 표를 2열 카드 목록으로 */
  .table-stack thead {
    display: none;
  }

  .table-stack,
  .table-stack tbody,
  .table-stack tfoot {
    display: block;
    width: 100%;
  }

  .table-stack tr {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px 14px;
    margin: 0 0 10px;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow-xs);
  }

  .card-flush .table-stack {
    padding: 12px 12px 2px;
  }

  .table-stack tbody tr:hover {
    background: var(--surface);
  }

  .table-stack td,
  .table-stack th {
    display: block;
    min-width: 0;
    padding: 0 !important;
    border: 0;
    text-align: left !important;
    white-space: normal;
    background: none;
    font-weight: inherit;
  }

  .table-stack td[data-label]::before,
  .table-stack th[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 1px;
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 600;
  }

  .table-stack .cell-head {
    grid-column: 1 / -1;
    order: -1;
    padding: 0 34px 10px 0 !important;
    border-bottom: 1px dashed var(--border);
    font-size: 15px;
  }

  .table-stack .cell-head::before {
    display: none !important;
  }

  .table-stack .cell-head .cell-clip,
  .table-stack .cell-head .cell-memo {
    max-width: none;
    white-space: normal;
  }

  .table-stack .stack-wide,
  .table-stack .row-empty td {
    grid-column: 1 / -1;
  }

  .table-stack .stack-strong,
  .table-stack td.col-strong {
    font-size: 17px;
    font-weight: 800;
    background: none;
  }

  .table-stack .cell-sub,
  .table-stack .nowrap {
    white-space: normal;
  }

  .table-stack td.check {
    position: absolute;
    top: 12px;
    right: 12px;
    width: auto;
  }

  .table-stack td.check input {
    width: 20px;
    height: 20px;
  }

  .table-stack td.actions-col {
    position: static;
    grid-column: 1 / -1;
    order: 99;
    width: auto;
    padding-top: 10px !important;
    border-top: 1px solid var(--border);
    box-shadow: none;
    background: none !important;
  }

  .table-stack .row-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px;
  }

  .table-stack .row-actions .btn {
    height: 36px;
    padding: 0 12px;
    font-size: 13px;
  }

  .table-stack .btn-icon {
    width: auto;
    background: var(--surface-3);
  }

  .table-stack .stack-label {
    display: inline;
  }

  .table-stack .lock-note {
    width: auto;
    gap: 4px;
  }

  .table-stack .lock-note .sr-only {
    position: static;
    width: auto;
    height: auto;
    clip: auto;
    overflow: visible;
  }

  .table-stack .menu {
    margin-left: auto;
  }

  .table-stack tfoot tr {
    background: var(--surface-3);
    border-color: transparent;
    box-shadow: none;
  }

  .table-stack tfoot th,
  .table-stack tfoot th.col-strong {
    border: 0;
    background: none;
    color: inherit;
  }

  .table-stack tfoot .cell-head {
    border-bottom: 1px dashed var(--border-strong);
  }

  .table-stack .hide-stack {
    display: none;
  }

  .table-stack .row-empty {
    display: block;
    border-style: dashed;
    box-shadow: none;
  }

  .table-stack td .person {
    justify-content: flex-start;
  }

  .timeline li {
    padding-bottom: 12px;
  }

  .modal {
    width: 100%;
    max-width: 100%;
    margin: auto 0 0;
    max-height: 94vh;
    max-height: 94dvh;
    border-radius: 20px 20px 0 0;
  }

  .modal[open] {
    animation: sheet-in 0.2s ease-out;
  }

  .modal-shell {
    padding: 20px 16px calc(18px + env(safe-area-inset-bottom));
  }

  .modal-title {
    font-size: 18px;
  }

  .form-actions {
    position: sticky;
    bottom: calc(-18px - env(safe-area-inset-bottom));
    margin: 0 -16px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: var(--surface);
  }

  .form-actions .btn {
    flex: 1;
    height: 46px;
  }

  .policy-form .form-actions {
    position: static;
    margin: 0;
    padding: 16px 0 0;
    flex-wrap: wrap;
  }

  .form-actions .muted {
    flex-basis: 100%;
  }

  .choose-grid {
    grid-template-columns: 1fr;
  }

  .toasts {
    left: 12px;
    right: 12px;
    bottom: auto;
    top: 66px;
    max-width: none;
  }

  .fab {
    position: fixed;
    right: 16px;
    bottom: calc(18px + env(safe-area-inset-bottom));
    z-index: 25;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: #fff;
    box-shadow: 0 10px 26px rgba(52, 86, 224, 0.45);
  }

  .fab .icon {
    width: 26px;
    height: 26px;
    stroke-width: 2.2;
  }

  .search-box .btn {
    padding: 0 14px;
  }

  .sheet {
    padding: 20px 16px;
    border-radius: 12px;
  }

  .sheet-head {
    flex-direction: column;
    gap: 12px;
  }

  .sheet-meta {
    width: 100%;
  }

  .sheet-person {
    grid-template-columns: auto 1fr;
  }

  .sheet-table {
    min-width: 560px;
  }

  .flow li {
    padding: 10px 12px;
  }

}

@keyframes sheet-in {
  from {
    transform: translateY(24px);
    opacity: 0.4;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- 인쇄 ---------- */

@page {
  size: A4;
  margin: 12mm;
}

@media print {
  body {
    background: #fff;
    font-size: 12px;
  }

  .sidebar,
  .sidebar-backdrop,
  .mobilebar,
  .demo-banner,
  .toasts,
  .fab,
  .modal,
  .no-print,
  .month-actions,
  .actions-col,
  .row-actions,
  .filters,
  .head-actions,
  .bulkbar {
    display: none !important;
  }

  .with-shell .main {
    margin-left: 0;
  }

  .page {
    max-width: none;
    padding: 0;
  }

  .card,
  .kpi,
  .month-bar {
    box-shadow: none;
    break-inside: avoid;
  }

  .sheet {
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    break-after: page;
  }

  .sheet:last-of-type {
    break-after: auto;
  }

  .sheet-table {
    min-width: 0;
  }

  .sheet-table tr,
  .sheet-summary {
    break-inside: avoid;
  }

  .table-wrap {
    overflow: visible;
    margin: 0;
    padding: 0;
  }

  .sheet-payout {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .sheet-summary {
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 20px;
    padding: 14px 0;
  }

  .sheet-person {
    grid-template-columns: repeat(3, auto 1fr);
    padding: 12px 0;
  }

  .sheet-payout strong {
    font-size: 24px;
  }

  .sheet-head {
    flex-direction: row;
    padding-bottom: 12px;
  }

  .sheet-meta {
    width: auto;
  }

  .sheet-section {
    padding-top: 14px;
    break-inside: avoid-page;
  }

  .sheet-h {
    break-after: avoid;
  }

  .sheet-calc th,
  .sheet-calc td {
    padding: 3px 0;
  }

  .sheet-table th,
  .sheet-table td {
    padding: 5px 6px;
  }
}
