/* 원천세 · 공통 부품 · 부가세 — styles.css 에서 잘라 낸 조각. 자른 순서대로 읽힌다 · 순서를 바꾸면 생김새가 바뀐다 */
.monthly-focus-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}
.monthly-focus-card.compact {
  padding: 10px 12px;
}
.task-state-button {
  width: 100%;
  min-width: 0;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #c9d8ea;
  background: #fff;
  color: var(--text);
  cursor: pointer;
}
.task-state-button.is-active {
  border-color: #7fb2eb;
  background: #e8f3ff;
  color: #0f4f91;
}
.tax-board-head,
.vat-board-head {
  align-items: flex-start;
}
.tax-board-intro {
  display: grid;
  gap: 10px;
}
.tax-board-intro .meta-line {
  margin: 0;
}
.withholding-cycle-help {
  margin: -2px 0 0;
  color: #64748b;
  font-size: 12px;
}
.withholding-cycle-help span {
  display: inline-flex;
  margin-right: 5px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #e8f3ff;
  color: #0f5fa8;
  font-weight: 800;
}
.withholding-workflow-wrap {
  max-height: calc(100vh - 330px);
  min-height: 320px;
  overflow: auto;
  border: 1px solid #cbd8e6;
  border-radius: 14px;
  background: #fff;
}
.withholding-workflow-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  color: #26374d;
  font-size: 12px;
}
.withholding-workflow-table th,
.withholding-workflow-table td {
  min-width: 82px;
  height: 43px;
  padding: 6px;
  border-right: 1px solid #d7e0ea;
  border-bottom: 1px solid #d7e0ea;
  background: #fff;
  text-align: center;
  vertical-align: middle;
}
.withholding-workflow-table thead th {
  color: #31445c;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.withholding-workflow-table thead tr:first-child th {
  position: sticky;
  z-index: 6;
  top: 0;
  height: 38px;
  background: #eaf1f8;
}
.withholding-workflow-table thead tr:nth-child(2) th {
  position: sticky;
  z-index: 5;
  top: 38px;
  height: 42px;
  background: #f5f8fb;
}
.withholding-workflow-table thead .withholding-group-prepare { background: #e7f2ff; }
.withholding-workflow-table thead .withholding-group-income { background: #eef7f7; }
.withholding-workflow-table thead .withholding-group-tax { background: #fff7e5; }
.withholding-workflow-table thead .withholding-group-filing { background: #f1efff; }
.withholding-workflow-table thead .withholding-group-wage_simple,
.withholding-workflow-table thead .withholding-group-business_simple,
.withholding-workflow-table thead .withholding-group-daily_worker { background: #fff1dc; }
.withholding-workflow-table tbody tr:hover td,
.withholding-workflow-table tbody tr:hover th { background: #f7fbff; }
.withholding-workflow-table tbody tr.is-complete td,
.withholding-workflow-table tbody tr.is-complete th { background: #f2fbf6; }
.withholding-sticky-no,
.withholding-sticky-client,
.withholding-sticky-type {
  position: sticky;
  z-index: 3;
}
.withholding-sticky-no {
  left: 0;
  width: 48px;
  min-width: 48px !important;
}
.withholding-sticky-client {
  left: 48px;
  width: 220px;
  min-width: 220px !important;
  text-align: left !important;
}
.withholding-sticky-type {
  left: 268px;
  width: 86px;
  min-width: 86px !important;
}
.withholding-workflow-table thead .withholding-sticky-no,
.withholding-workflow-table thead .withholding-sticky-client,
.withholding-workflow-table thead .withholding-sticky-type { z-index: 9; }
.withholding-sticky-client strong {
  display: block;
  overflow: hidden;
  color: #17263a;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.withholding-sticky-client small,
.withholding-sticky-type small {
  display: block;
  margin-top: 4px;
  color: #7a899c;
  font-size: 10px;
  font-weight: 500;
}
.withholding-type-pill {
  display: inline-flex;
  justify-content: center;
  min-width: 42px;
  padding: 4px 7px;
  border-radius: 999px;
  font-weight: 800;
}
.withholding-type-pill.monthly { background: #e4f1ff; color: #1268bd; }
.withholding-type-pill.half { background: #fff2d8; color: #9a5b00; }
.withholding-state-button {
  display: inline-grid;
  width: 58px;
  min-height: 29px;
  place-items: center;
  padding: 4px 6px;
  border: 1px solid #c8d3df;
  border-radius: 7px;
  background: #fff;
  color: #94a3b8;
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}
.withholding-state-button:hover { border-color: #4c91d6; box-shadow: 0 0 0 2px rgba(40,120,200,.1); }
.withholding-state-button.is-done { border-color: #54a477; background: #e9f8ef; color: #197044; }
.withholding-state-button.is-none { border-color: #b6bec8; background: #eef1f4; color: #687481; }
.withholding-amount-cell { position: relative; min-width: 118px !important; padding: 7px 8px !important; }
.withholding-amount-cell input {
  width: 100%; min-width: 100px; height: 34px; padding: 0 25px 0 8px; border: 1px solid #cbd8e7; border-radius: 7px;
  background: #fff; color: #15385e; text-align: right; font-variant-numeric: tabular-nums; font-weight: 700;
}
.withholding-amount-cell input:focus { border-color: #4c91d6; outline: 2px solid rgba(76,145,214,.14); }
.withholding-amount-cell span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: #7b8998; font-size: 11px; pointer-events: none; }
.withholding-date-cell { min-width: 126px !important; padding: 6px !important; }
.withholding-date-cell > div { position: relative; display: grid; grid-template-columns: minmax(0,1fr) 30px; gap: 3px; }
.withholding-date-cell input[type="text"] { width: 100%; min-width: 0; height: 34px; padding: 0 5px; border: 1px solid #cbd8e7; border-radius: 7px; color: #15385e; text-align: center; font-family: inherit; font-size: 12.5px; font-weight: 700; line-height: 1; }
.withholding-date-cell input[type="text"]:focus { border-color: #4c91d6; outline: 2px solid rgba(76,145,214,.14); }
.withholding-date-cell button { width: 30px; height: 32px; padding: 0; border: 1px solid #cbd8e7; border-radius: 7px; background: #f4f8fc; color: #1769b0; cursor: pointer; }
.withholding-native-date { position: absolute; right: 0; bottom: 0; width: 1px !important; height: 1px !important; padding: 0 !important; border: 0 !important; opacity: 0; pointer-events: none; }
.withholding-na { background: #f4f5f7 !important; color: #a5adb7; }
.withholding-memo-head,
.withholding-memo-cell { min-width: 190px !important; }
.withholding-memo-cell input {
  width: 100%;
  min-width: 172px;
  padding: 7px 8px;
  border: 1px solid #ccd6e2;
  border-radius: 7px;
  background: #fffef7;
  color: #34445a;
  font: inherit;
}
.withholding-memo-cell input:focus { border-color: #4c91d6; outline: 2px solid rgba(76,145,214,.14); }
.withholding-workflow-table tfoot th,
.withholding-workflow-table tfoot td {
  height: 32px;
  background: #f5f7fa;
  color: #536277;
  font-size: 11px;
  font-weight: 800;
}
.withholding-workflow-table tfoot tr:last-child th,
.withholding-workflow-table tfoot tr:last-child td { background: #eaf2fb; color: #155eaa; }
.withholding-workflow-wrap.is-core-view .withholding-workflow-table {
  width: 100%;
  min-width: 1142px;
  table-layout: fixed;
}
.withholding-workflow-wrap.is-core-view .withholding-workflow-table th,
.withholding-workflow-wrap.is-core-view .withholding-workflow-table td { min-width: 54px; padding: 5px 4px; }
.withholding-workflow-wrap.is-core-view .withholding-col-no { width: 36px; }
.withholding-workflow-wrap.is-core-view .withholding-col-client { width: 130px; }
.withholding-workflow-wrap.is-core-view .withholding-col-type { width: 55px; }
.withholding-workflow-wrap.is-core-view col[class*="withholding-col-"][class$="_income"],
.withholding-workflow-wrap.is-core-view .withholding-col-income_tax,
.withholding-workflow-wrap.is-core-view .withholding-col-local_income_tax,
.withholding-workflow-wrap.is-core-view .withholding-col-employee_resident_tax { width: 86px; }
.withholding-workflow-wrap.is-core-view .withholding-col-closing { width: 50px; }
.withholding-workflow-wrap.is-core-view .withholding-col-electronic_filing { width: 55px; }
.withholding-workflow-wrap.is-core-view .withholding-col-payment_notice_sent { width: 125px; }
.withholding-workflow-wrap.is-core-view .withholding-col-memo { width: 89px; }
.withholding-workflow-wrap.is-core-view .withholding-sticky-no { width: 36px; min-width: 36px !important; }
.withholding-workflow-wrap.is-core-view .withholding-sticky-client { left: 36px; width: 130px; min-width: 130px !important; }
.withholding-workflow-wrap.is-core-view .withholding-sticky-type { left: 166px; width: 55px; min-width: 55px !important; }
.withholding-workflow-wrap.is-core-view .withholding-amount-cell { min-width: 0 !important; }
.withholding-workflow-wrap.is-core-view .withholding-amount-cell input { min-width: 0; height: 34px; padding-left: 4px; font-size: 12px; }
.withholding-workflow-wrap.is-core-view .withholding-date-cell { min-width: 0 !important; }
.withholding-workflow-wrap.is-core-view .withholding-state-button { width: 50px; padding-inline: 3px; }
.withholding-workflow-wrap.is-core-view .withholding-memo-head,
.withholding-workflow-wrap.is-core-view .withholding-memo-cell { width: 89px; min-width: 89px !important; }
.withholding-workflow-wrap.is-core-view .withholding-memo-cell input { min-width: 0; }
.withholding-workflow-wrap.is-overview-view {
  overflow-x: hidden;
  overflow-y: auto;
}
.withholding-workflow-wrap.is-overview-view .withholding-workflow-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}
.withholding-workflow-wrap.is-overview-view .withholding-workflow-table th,
.withholding-workflow-wrap.is-overview-view .withholding-workflow-table td {
  min-width: 0;
  padding: 5px 4px;
  font-size: 11.5px;
}
.withholding-workflow-wrap.is-overview-view .withholding-overview-cell { font-weight: 600; }
.withholding-workflow-wrap.is-overview-view .withholding-overview-cell small { font-size: 10px; }
.withholding-workflow-wrap.is-overview-view .withholding-workflow-table thead th {
  overflow: hidden;
  text-overflow: ellipsis;
}
.withholding-workflow-wrap.is-overview-view .withholding-col-no { width: 30px; }
.withholding-workflow-wrap.is-overview-view .withholding-col-client { width: 120px; }
.withholding-workflow-wrap.is-overview-view .withholding-col-type { width: 46px; }
.withholding-workflow-wrap.is-overview-view col[class*="withholding-col-"][class$="_income"],
.withholding-workflow-wrap.is-overview-view .withholding-col-income_tax,
.withholding-workflow-wrap.is-overview-view .withholding-col-local_income_tax,
.withholding-workflow-wrap.is-overview-view .withholding-col-employee_resident_tax { width: 84px; }
.withholding-workflow-wrap.is-overview-view .withholding-col-closing { width: 52px; }
.withholding-workflow-wrap.is-overview-view .withholding-col-electronic_filing { width: 60px; }
.withholding-workflow-wrap.is-overview-view .withholding-col-payment_notice_sent { width: 92px; }
.withholding-workflow-wrap.is-overview-view .withholding-col-wage_simple_filed,
.withholding-workflow-wrap.is-overview-view .withholding-col-business_simple_filed,
.withholding-workflow-wrap.is-overview-view .withholding-col-daily_simple_filed { width: 92px; }
.withholding-workflow-wrap.is-overview-view .withholding-col-memo { width: 96px; }
.withholding-workflow-wrap.is-overview-view .withholding-sticky-no { width: 30px; min-width: 30px !important; }
.withholding-workflow-wrap.is-overview-view .withholding-sticky-client { left: 30px; width: 120px; min-width: 120px !important; }
.withholding-workflow-wrap.is-overview-view .withholding-sticky-type { left: 150px; width: 46px; min-width: 46px !important; }
.withholding-workflow-wrap.is-overview-view .withholding-type-pill {
  min-width: 36px;
  padding: 3px 4px;
  font-size: 9px;
}
.withholding-overview-cell {
  overflow: hidden;
  background: #fff;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: default;
  user-select: text;
}
.withholding-overview-cell.is-amount { text-align: right; font-variant-numeric: tabular-nums; }
.withholding-overview-cell.is-amount.is-zero { text-align: center; color: #8793a1; }
.withholding-overview-cell.is-amount small { margin-left: 2px; color: #78889a; font-size: 8px; }
.withholding-overview-cell.is-date { font-size: 8px !important; letter-spacing: -.3px; }
.withholding-overview-cell.is-state { font-weight: 800; }
.withholding-overview-cell.is-state.is-done { background: #eaf8ef; color: #197044; }
.withholding-overview-cell.is-state.is-none { background: #f0f2f5; color: #687481; }
.withholding-overview-cell.withholding-no-filing {
  background: #f3f5f7;
  color: #8793a1;
  font-size: 8px !important;
  font-weight: 700;
}
.withholding-overview-cell.is-memo { text-align: left; color: #596b7e; }
.withholding-grid-cell {
  position: relative;
  padding: 0 !important;
  cursor: cell;
  outline: none;
  user-select: none;
}
.withholding-grid-cell.is-selected { z-index: 4; box-shadow: inset 0 0 0 2px #1976d2; }
.withholding-grid-cell.is-editing { box-shadow: inset 0 0 0 2px #0b57a4; }
.withholding-workflow-table tbody th,
.withholding-workflow-table tbody td {
  height: 35px;
  padding-block: 3px;
}
.withholding-workflow-table tbody .withholding-grid-cell input[type="text"] {
  min-height: 34px;
  padding-block: 3px;
}
.withholding-sticky-client strong {
  line-height: 1.2;
}
.withholding-linked-amount-cell {
  min-width: 112px !important;
  padding: 0 7px !important;
  background: #f4f8fc;
  text-align: right;
  cursor: default;
}
.withholding-linked-amount-cell strong {
  font-size: 12px;
  color: #1d344d;
}
.withholding-linked-amount-cell > span {
  margin-left: 4px;
  color: #6f7f91;
  font-size: 10px;
}
.withholding-grid-cell input[type="text"] {
  width: 100%;
  min-width: 0;
  height: 100%;
  min-height: 42px;
  padding: 5px 8px;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: #15385e;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
}
.withholding-grid-cell input[readonly] { cursor: cell; }
.withholding-grid-cell.is-editing input { cursor: text; user-select: text; background: #fff; }
.withholding-amount-cell { padding: 0 !important; }
.withholding-amount-cell input { padding-right: 20px !important; text-align: right; }
.withholding-amount-cell.is-zero input { padding-right: 8px !important; text-align: center; color: #8793a1; }
.withholding-amount-cell.is-zero input::placeholder { color: #8793a1; opacity: 1; }
.withholding-amount-cell.is-zero.is-editing input { text-align: right; color: #26374d; }
.withholding-amount-cell > span { right: 5px; }
.withholding-date-cell { padding: 0 !important; }
.withholding-date-cell > div { height: 100%; grid-template-columns: minmax(0,1fr) 25px; gap: 0; }
.withholding-date-cell input[type="text"] { height: 100%; min-height: 42px; border: 0; border-radius: 0; padding: 4px; }
.withholding-date-cell button { width: 25px; height: 100%; min-height: 42px; border: 0; border-left: 1px solid #d7e0ea; border-radius: 0; background: #f7fafc; }
.withholding-date-cell button svg { display: block; width: 16px; height: 16px; margin: auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.withholding-state-cell { font-size: 11px; font-weight: 800; }
.withholding-state-cell > span { display: grid; min-height: 42px; place-items: center; }
.withholding-state-cell.is-done { background: #eaf8ef; color: #197044; }
.withholding-state-cell.is-none { background: #f0f2f5; color: #687481; }
.withholding-state-cell.is-pending { color: #a4afbc; }
.withholding-memo-cell { padding: 0 !important; }
.withholding-memo-cell input { min-width: 0; border: 0; border-radius: 0; background: transparent; }
.withholding-memo-cell.is-editing input { background: #fffef7; }
.tax-toolbar,
.vat-toolbar {
  justify-content: flex-end;
  align-items: flex-end;
  gap: 14px;
}
.tax-toolbar label,
.vat-toolbar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}
.tax-toolbar select,
.vat-toolbar select {
  min-width: 96px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7fafc;
}
.tax-toolbar .search-inline,
.vat-toolbar .search-inline {
  flex-wrap: nowrap;
  align-items: flex-end;
}
.tax-toolbar .search-inline input,
.vat-toolbar .search-inline input {
  width: 340px;
  min-width: 340px;
  padding: 12px 14px;
}
.vat-client-list {
  gap: 18px;
}
.vat-client-card {
  gap: 12px;
  background: linear-gradient(180deg, #fbfdff, #f6faff);
}
.vat-client-top {
  align-items: center;
  margin-bottom: 0;
}
.vat-client-summary {
  display: grid;
  justify-items: end;
  gap: 6px;
}
.vat-client-summary strong {
  font-size: 20px;
}
.vat-period-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.vat-card-grid {
  display: grid;
  grid-template-columns: minmax(230px, 300px) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}
.vat-period-card {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
}
.vat-period-card.is-active {
  border-color: #bfd9f6;
  background: #f8fbff;
}
.vat-period-card.is-complete {
  border-color: #bbf7d0;
  background: #f3fcf6;
}
.vat-period-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.vat-action-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.vat-state-button {
  min-width: 84px;
  padding: 8px 12px;
  border-radius: 999px;
  border-color: #c9d8ea;
  background: #f8fbff;
}
.vat-state-button.is-active {
  border-color: #7fb2eb;
  background: #e8f3ff;
  color: #0f4f91;
}
.vat-check-item {
  padding: 6px 10px;
  border-radius: 999px;
  background: #f8fbff;
}
.vat-period-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.vat-memo-panel {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}
.vat-memo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.vat-memo-view {
  min-height: 64px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #f8fbff;
  line-height: 1.45;
  white-space: pre-wrap;
}
.vat-memo-view.empty {
  color: var(--muted);
}
.vat-memo-input {
  width: 100%;
  min-height: 64px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fbff;
  font: inherit;
  resize: vertical;
}
.vat-list-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}
.vat-client-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.vat-client-table th {
  text-align: left;
  padding: 12px 14px;
  background: #f8fbff;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.vat-client-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.vat-client-row:last-child td {
  border-bottom: none;
}
.vat-client-row {
  cursor: pointer;
}
.vat-client-row:hover {
  background: #f8fbff;
}
.vat-client-row.is-selected {
  background: #f3f8ff;
}
.vat-select-cell {
  width: 36px;
}
.vat-select-cell input {
  width: 16px;
  height: 16px;
}
.vat-row-note {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}
.vat-row-note.is-error {
  color: #dc2626;
}
.vat-saved-path {
  word-break: break-all;
}
.vat-batch-bar {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 2400;
  transform: translateY(16px) scale(0.92);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.18s ease;
}
.vat-batch-bar.is-visible {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}
.vat-batch-bar .primary-button {
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.22);
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 15px;
}
.vat-batch-bar .primary-button.is-stoppable {
  background: #dc2626;
}
.vat-batch-bar .primary-button.is-stoppable:hover {
  background: #b91c1c;
}
.agent-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--warn-bg);
  color: var(--warn-text);
  padding: 12px 14px;
  border-radius: 12px;
  margin: 0 0 18px;
}
.agent-banner.hidden {
  display: none;
}
/* ★이 프로젝트에는 전역 .hidden 규칙이 없다 — 쓰는 자리마다 따로 적는다.
   적어 두지 않으면 「감췄다」고 부른 버튼이 그대로 보인다. */
.agent-banner .ghost-button.hidden,
#agent-install-modal .ghost-button.hidden {
  display: none;
}
/* 설치 안내 팝업 — 순서대로 따라 하면 끝나게. 글이 길면 아무도 안 읽는다. */
.agent-install-steps {
  margin: 12px 0 16px;
  padding-left: 20px;
  display: grid;
  gap: 6px;
  line-height: 1.7;
}
.agent-install-steps b { font-weight: 700; }
.home-agent-panel .status-text { margin: 0 0 12px; line-height: 1.6; }
.agent-banner.is-ready {
  background: var(--success-bg);
  color: var(--success-text);
}
/* 확인 불가 — 초록(정상)도 경고색(문제)도 아니다. 대조를 못 했다는 사실만 알린다. */
.agent-banner.is-unknown {
  background: #eef1f5;
  color: #43506b;
}
.agent-banner-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.agent-banner-text strong {
  font-weight: 700;
}
.agent-banner-text span {
  font-size: 12px;
  opacity: 0.85;
}
.agent-banner-text span:empty {
  display: none;
}
.vat-classification-banner {
  background: var(--warn-bg);
  color: var(--warn-text);
  padding: 10px 14px;
  border-radius: 12px;
  margin: 0 0 12px;
  font-weight: 600;
}
.vat-classification-banner.hidden {
  display: none;
}
.vat-filing-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: #f1f5f9;
  color: #475569;
}
.vat-doc-chip-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 260px;
}
.vat-doc-chip {
  min-width: 0;
  cursor: default;
}
.status-error {
  background: #fee2e2;
  color: #dc2626;
}
.tax-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  min-height: 18px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}
.tax-pending {
  background: #f8fafc;
  color: transparent;
  border: 1px solid #dbe4ee;
}
.tax-progress {
  background: var(--progress-bg);
  color: var(--progress-text);
  border: 1px solid #bfdbfe;
}
.tax-done {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid #bbf7d0;
}
.remarks-cell {
  min-width: 220px;
  white-space: normal;
  line-height: 1.45;
}
.meta-line, .note-line { margin: 6px 0; color: var(--muted); font-size: 14px; }
.note-list { margin: 12px 0 0; padding-left: 18px; }
.note-list li { margin-bottom: 8px; }
.note-form { display: flex; gap: 10px; margin-top: 14px; }
.note-form input { flex: 1; }

.status-badge {
  display: inline-block; padding: 6px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700;
}
.status-progress { background: var(--progress-bg); color: var(--progress-text); }
.status-wait { background: var(--warn-bg); color: var(--warn-text); }
.status-done { background: var(--success-bg); color: var(--success-text); }

.modal.hidden { display: none; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
}
/* ★모달은 화면을 덮으라고 만든 것인데 사이드바(1200)·상단바(1250)보다 아래(30)라
   왼쪽이 사이드바에 가려지고 있었다(2026-09-01 실측: 모달 카드 left=180, 사이드바 right=256).
   ★배경 하나만 올린다 — .modal-shell(31)과 #credit-detail-close(35)는 이 배경이 만드는
   쌓임 맥락 ★안에 있어 상대 순서가 그대로 따라온다. 여러 곳을 올리면 그 관계가 깨진다.
   ★1300인 까닭: 사이드바 1200·상단바 1250 위. 그 위의 전역 오버레이는 ★안 건드린다
   (부가세 일괄바 2400 · 관리자 문구편집 5000) — 그것들은 모달보다 위에 있어야 한다. */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1300;
    background: rgba(15, 23, 42, 0.45);
    overflow: hidden;
    overscroll-behavior: contain;
    touch-action: none;
  }
.modal-backdrop.hidden {
    display: none;
  }
.modal-shell {
    position: fixed;
    left: 50%;
    top: 72px;
    transform: translateX(-50%);
    width: min(920px, calc(100vw - 128px));
    height: min(820px, calc(100vh - 104px));
    max-height: calc(100vh - 104px);
    z-index: 31;
    overflow: visible;
}
.modal-card {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    padding: 20px;
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow);
}
.modal-card .panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex: 0 0 auto;
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--line);
}
.modal-drag-handle {
    cursor: move;
    user-select: none;
    flex: 0 0 auto;
}
.modal-body {
    display: grid;
    gap: 14px;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-right: 8px;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    align-content: start;
    scrollbar-gutter: stable;
}
#credit-detail-close {
    position: absolute;
    top: 0;
    right: 0;
    transform: translateX(calc(100% + 14px));
    z-index: 35;
    min-width: 84px;
    background: #fff;
    box-shadow: var(--shadow);
    white-space: nowrap;
}
.modal-open,
html.modal-open,
body.modal-open {
    overflow: hidden;
    height: 100%;
}
.popup-section {
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: visible;
    background: #fff;
}
.popup-section-title {
  padding: 12px 16px;
  color: #fff;
  font-weight: 700;
}
.popup-section-body {
  padding: 14px 16px;
  background: #fff;
  overflow: visible;
}
.popup-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.popup-row:last-of-type {
  border-bottom: 0;
}
.popup-label {
  color: var(--muted);
}
.popup-value {
  color: var(--text);
  white-space: pre-wrap;
  font-weight: 500;
}
