/* HR ZIP admin — payroll section (from my-hr payroll UI, scoped) */
.admin-payroll .pcs-subtitle { margin-top:24px; font-size:1rem; }
.admin-payroll .pcs-policy { margin:18px 0; padding:20px; border:1px solid #e2e8ec; border-radius:12px; min-width:0; }
.admin-payroll .pcs-policy legend { padding:0 8px; font-weight:700; color:#4a657a; font-size:.9rem; }
.admin-payroll .pcs-policy > .pcs-grid + .pcs-grid { margin-top:20px; }
.admin-payroll .pcs-policy-details { margin-top:20px; border-top:1px solid #e2e8ec; padding-top:16px; }
.admin-payroll .pcs-policy-details summary { cursor:pointer; font-weight:600; font-size:.86rem; color:#4a657a; }
.admin-payroll .pcs-policy-details .pcs-grid { margin-top:16px; }
.admin-payroll .pcs-policy-confirm { display:flex; align-items:center; gap:8px; font-size:.82rem; color:#5c6b73; margin-top:18px; }
.admin-payroll .pcs-policy-actions { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:14px; }
.admin-payroll .pcs-policy-actions .pcs-policy-confirm { margin:0; }
.admin-payroll .pcs-field--wide { grid-column:1 / -1; }
.admin-payroll .itt-hi-tax-inp--accent { width:110px; min-width:110px; }
@media(max-width:720px) { .admin-payroll .pcs-policy { padding:14px; } .admin-payroll .pcs-policy-actions { flex-wrap:wrap; } }
.admin-payroll {
  --gradient-point: linear-gradient(to bottom, #597184 0%, #4a657a 50%, #3b586e 100%);
  --gradient-point-hover: linear-gradient(to bottom, #6b8699 0%, #587489 50%, #466175 100%);
  --color-primary: #4a657a;
  --color-text: #1a2b33;
  --color-muted: #5c6b73;
  --color-border: #e2e8ec;
  color: var(--color-text);
  font-family: "Noto Sans KR", sans-serif;
  box-sizing: border-box;
}
.admin-payroll *,
.admin-payroll *::before,
.admin-payroll *::after { box-sizing: border-box; }
.admin-payroll .main--pcs,
.admin-payroll .main--coldef {
  padding: 0;
  overflow: visible;
  width: 100%;
  flex: none;
}
.admin-payroll .panel { padding: 0; border: none; background: transparent; box-shadow: none; }
.admin-payroll .panel__head { display: none; }

/* ═══════════════════════════════════════════
   payroll-common-settings.css
   ═══════════════════════════════════════════ */

.main--pcs {
  flex: 1;
  width: 100%;
  overflow-y: auto;
  padding: 28px 32px 48px;
  box-sizing: border-box;
}

.pcs-page {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

/* ── 탭 ── */
.pcs-tabs__bar {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  padding: 4px;
  background: #f0f4f7;
  border-radius: 10px;
  border: 1px solid var(--color-border);
}

.pcs-tabs__tab {
  flex: 1;
  max-width: 200px;
  padding: 10px 16px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-muted);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.pcs-tabs__tab:hover {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.6);
}

.pcs-tabs__tab--active {
  color: var(--color-text);
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.pcs-tabs__panel[hidden] {
  display: none !important;
}

.pcs-tabs__panel:not([hidden]) {
  display: block;
}

.pcs-desc--inline {
  margin: 0 0 18px;
  max-width: 52rem;
}

.pcs-header {
  margin-bottom: 20px;
}

.pcs-title {
  margin: 0 0 6px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
}

.pcs-desc {
  margin: 0;
  font-size: 0.86rem;
  color: var(--color-muted);
  line-height: 1.55;
}

.pcs-status {
  margin: 0 0 16px;
  font-size: 0.85rem;
  color: var(--color-muted);
  min-height: 1.4em;
}

.pcs-status--error { color: #c62828; }
.pcs-status--ok { color: #2e7d32; }

.pcs-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 22px 24px 24px;
  margin-bottom: 18px;
}

.pcs-card__title {
  margin: 0 0 16px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
}

.pcs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 20px;
}

@media (max-width: 720px) {
  .pcs-grid { grid-template-columns: 1fr; }
}

.pcs-field { margin: 0; }

.pcs-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.pcs-input {
  width: 100%;
  box-sizing: border-box;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--color-text);
  background: #f9fafb;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.pcs-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(35, 103, 131, 0.12);
  background: #fff;
}

.pcs-hint {
  margin: 4px 0 0;
  font-size: 0.72rem;
  color: var(--color-muted);
  line-height: 1.4;
}

.pcs-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.pcs-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s;
}

.pcs-btn--secondary {
  background: #f0f4f7;
  color: var(--color-text);
  border-color: var(--color-border);
}

.pcs-btn--secondary:hover { background: #e2eaf0; }

.pcs-btn--primary {
  background: var(--gradient-point);
  color: #fff;
}

.pcs-btn--primary:hover { background: var(--gradient-point-hover); }

.pcs-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── 간이세액표 탭 ── */
.pcs-file {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  font-size: 0.82rem;
  border: 1px dashed #c4cdd4;
  border-radius: 8px;
  background: #fafbfc;
}

.itt-upload-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px 20px;
}

.itt-upload-row .pcs-field {
  flex: 0 0 auto;
}

.itt-field-file {
  flex: 1 1 220px;
  min-width: 180px;
}

.itt-upload-actions {
  flex: 0 0 auto;
  padding-bottom: 2px;
}

.itt-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
}

.itt-card-head__title {
  margin: 0;
  padding: 0;
  border: none;
}

.itt-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.itt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.itt-table th,
.itt-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #eef2f5;
}

.itt-table th {
  font-weight: 600;
  color: #374151;
  background: #f8fafb;
  white-space: nowrap;
}

.itt-table tbody tr:last-child td {
  border-bottom: none;
}

.itt-table--dense th,
.itt-table--dense td {
  padding: 6px 8px;
  font-size: 0.72rem;
}

.itt-list-td--center {
  text-align: center;
}

.itt-list-actions {
  white-space: nowrap;
}

.itt-link-btn {
  margin: 0 4px;
  padding: 0;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-primary);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.itt-link-btn:hover {
  color: #355569;
}

.itt-link-btn--ok {
  color: #2e7d32;
}

.itt-link-btn--danger {
  color: #c62828;
}

.itt-list-empty {
  text-align: center;
  color: var(--color-muted);
  padding: 28px 16px !important;
}

.itt-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}

.itt-badge--on {
  background: #e8f5e9;
  color: #2e7d32;
}

.itt-badge--off {
  background: #f3f4f6;
  color: #6b7280;
}

.itt-preview-card {
  margin-top: 18px;
}

.itt-preview-scroll {
  max-height: 420px;
  overflow: auto;
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.itt-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.72);
}

.itt-loading-overlay[hidden] {
  display: none !important;
}

.itt-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e2eaf0;
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: pcs-itt-spin 0.75s linear infinite;
}

@keyframes pcs-itt-spin {
  to { transform: rotate(360deg); }
}

.itt-alert {
  padding: 14px 16px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 0.84rem;
  line-height: 1.5;
}

.itt-alert--error {
  background: #ffebee;
  border: 1px solid #ffcdd2;
  color: #b71c1c;
}

.itt-alert--warn {
  background: #fff8e1;
  border: 1px solid #ffe082;
  color: #6d4c41;
}

.itt-alert__title {
  margin: 0 0 6px;
  font-weight: 700;
}

.itt-alert__text {
  margin: 0;
  font-size: 0.8rem;
}

/* 고소득자 세금계산 표 */
.itt-hi-tax-wrap {
  overflow-x: auto;
  margin-top: 4px;
}

.itt-hi-tax-table {
  min-width: 100%;
  table-layout: fixed;
}

.itt-hi-tax-th--range {
  width: 22%;
  min-width: 11rem;
}

.itt-hi-tax-range,
.itt-hi-tax-formula {
  vertical-align: top;
  font-size: 0.86rem;
  line-height: 1.75;
  color: var(--color-text);
}

.itt-hi-tax-range {
  white-space: normal;
}

.itt-hi-tax-range span {
  margin: 0 0.15em;
}

.itt-hi-tax-formula {
  word-break: keep-all;
}

.itt-hi-tax-inp {
  display: inline-block;
  width: 4.25rem;
  max-width: 100%;
  padding: 4px 6px;
  margin: 0 0.12em 2px;
  font-size: 0.84rem;
  text-align: right;
  vertical-align: baseline;
  box-sizing: border-box;
}

.itt-hi-tax-inp--wide {
  width: 6.25rem;
}

.itt-hi-tax-inp--accent {
  color: #c62828;
  font-weight: 600;
  border-color: rgba(198, 40, 40, 0.45);
}

.itt-hi-tax-inp--accent:focus {
  outline-color: #c62828;
}

.itt-hit-save-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px 24px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--color-border);
}

.itt-hit-save-row .pcs-field {
  margin: 0;
  min-width: 12rem;
}

.itt-hit-save-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.itt-alert code {
  font-size: 0.85em;
  padding: 1px 4px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 4px;
}

/* ── 공휴일 등록 ── */
.pch-add-grid {
  margin-bottom: 4px;
}

.pcs-field--date-parts .pch-date-parts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}

.pch-date-part {
  width: 5.5rem;
  min-width: 4.5rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.pch-date-sep {
  font-size: 0.88rem;
  color: #64748b;
  margin-right: 4px;
}

.pch-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.pch-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.pch-table th,
.pch-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
}

.pch-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #475569;
}

.pch-table tbody tr:last-child td {
  border-bottom: none;
}

.pch-list-empty {
  text-align: center;
  color: var(--color-muted);
  padding: 20px 12px !important;
}

.pch-dow--sun {
  color: #dc2626;
}

.pch-dow--sat {
  color: #2563eb;
}

.pch-table th.pch-table-th--action,
.pch-table td.pch-table-td--action {
  width: 6.5rem;
  text-align: center;
  white-space: nowrap;
}

.pch-btn-del {
  padding: 6px 14px;
  font-size: 0.8rem;
  color: #b91c1c;
  border-color: #fecaca;
  background: #fef2f2;
}

.pch-btn-del:hover {
  background: #fee2e2;
  border-color: #f87171;
}

.pch-btn-del:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.main--coldef {
  flex: 1;
  width: 100%;
  overflow-y: auto;
  padding: 28px 32px 48px;
  box-sizing: border-box;
}

.coldef-page {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

/* 헤더 */
.coldef-page__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.coldef-page__title {
  margin: 0 0 4px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
}

.coldef-page__desc {
  margin: 0;
  font-size: 0.86rem;
  color: var(--color-muted);
  line-height: 1.55;
}

.coldef-status {
  margin: 8px 0 12px;
  font-size: 0.85rem;
  color: var(--color-muted);
  min-height: 1.4em;
}
.coldef-status--error { color: #c62828; }
.coldef-status--ok { color: #2e7d32; }

/* 범례 */
.coldef-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

/* 헤더 액션 그룹 */
.coldef-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* 버튼 */
.coldef-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.coldef-btn--primary {
  background: var(--gradient-point);
  color: #fff;
}
.coldef-btn--primary:hover { background: var(--gradient-point-hover); }
.coldef-btn--secondary {
  background: #f0f4f7;
  color: var(--color-text);
  border-color: var(--color-border);
}
.coldef-btn--secondary:hover { background: #e2eaf0; }
.coldef-btn--danger {
  background: #e53935;
  color: #fff;
}
.coldef-btn--danger:hover { background: #b71c1c; }
.coldef-btn--sm {
  padding: 5px 11px;
  font-size: 0.8rem;
}
.coldef-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* 순서 저장 버튼 (비활성 = 회색, 활성 = 강조색) */
.coldef-btn--save-order {
  background: #f0f4f7;
  color: var(--color-muted);
  border-color: var(--color-border);
}
.coldef-btn--save-order.is-dirty {
  background: #e65100;
  color: #fff;
  border-color: transparent;
  animation: coldef-pulse 1.6s ease infinite;
}
.coldef-btn--save-order.is-dirty:hover { background: #bf360c; }

@keyframes coldef-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(230,81,0,0); }
  50%       { box-shadow: 0 0 0 5px rgba(230,81,0,0.25); }
}

/* 뱃지 */
.coldef-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}
.coldef-badge--basic      { background: #e3f2fd; color: #1565c0; }
.coldef-badge--calc       { background: #fff8e1; color: #f57f17; }
.coldef-badge--earn       { background: #e8f5e9; color: #2e7d32; }
.coldef-badge--earn_total { background: #c8e6c9; color: #1b5e20; border: 1px solid #a5d6a7; }
.coldef-badge--ded        { background: #fbe9e7; color: #bf360c; }
.coldef-badge--ded_total  { background: #ffccbc; color: #bf360c; border: 1px solid #ffab91; }
.coldef-badge--net_total  { background: #f3e5f5; color: #6a1b9a; border: 1px solid #ce93d8; }
/* 이전 total 키도 유지 (마이그레이션 전 데이터 대비) */
.coldef-badge--total      { background: #f3e5f5; color: #6a1b9a; }

.coldef-tax {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid;
}
.coldef-tax--taxable    { background: #fff3e0; color: #e65100; border-color: #ffcc02; }
.coldef-tax--nontaxable { background: #e8f5e9; color: #1b5e20; border-color: #a5d6a7; }

/* 임금성 Y / N */
.coldef-wage {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  padding: 2px 8px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 6px;
  border: 1px solid transparent;
  letter-spacing: 0.02em;
}
.coldef-wage--y {
  background: #e3f2fd;
  color: #0d47a1;
  border-color: #90caf9;
}
.coldef-wage--n {
  background: #fce4ec;
  color: #880e4f;
  border-color: #f48fb1;
}

/* 통상임금 Y / N (지급 항목) */
.coldef-ordinary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  padding: 2px 8px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 6px;
  border: 1px solid transparent;
  letter-spacing: 0.02em;
}
.coldef-ordinary--y {
  background: #ede7f6;
  color: #4527a0;
  border-color: #b39ddb;
}
.coldef-ordinary--n {
  background: #eceff1;
  color: #455a64;
  border-color: #b0bec5;
}

.coldef-earn-kind-detail {
  display: inline-block;
  margin-left: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #5b6b7c;
}

/* 지급 고정급 / 변동급 (목록·범례) */
.coldef-earn-kind {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid transparent;
}
.coldef-earn-kind--fixed {
  background: #e8f5e9;
  color: #1b5e20;
  border-color: #a5d6a7;
}
.coldef-earn-kind--variable {
  background: #fff3e0;
  color: #e65100;
  border-color: #ffcc80;
}

.coldef-scope {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
}
.coldef-scope--employee {
  background: #e3f2fd;
  color: #1565c0;
  border-color: #90caf9;
}
.coldef-scope--freelancer {
  background: #f3e5f5;
  color: #6a1b9a;
  border-color: #ce93d8;
}
.coldef-scope--common {
  background: #eceff1;
  color: #37474f;
  border-color: #b0bec5;
}

/* 테이블 */
.coldef-table-wrap {
  width: 100%;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow-x: auto;
  box-shadow: 0 1px 8px rgba(0,0,0,0.04);
}

.coldef-table {
  width: 100%;
  min-width: 880px;
  max-width: none;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.coldef-table th,
.coldef-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
  text-align: left;
}
.coldef-table tr:last-child td { border-bottom: none; }

.coldef-table thead th {
  background: #f0f4f7;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
}

/* 열 너비 — 헤더·본문 정렬 (고정 픽셀 + 열 이름은 나머지) */
.coldef-col--handle { width: 40px; max-width: 40px; }
.coldef-col--num { width: 52px; max-width: 52px; }
.coldef-col--name { width: auto; min-width: 140px; }
.coldef-col--cat { width: 120px; }
.coldef-col--scope { width: 118px; }
.coldef-col--tax { width: 100px; }
.coldef-col--wage { width: 92px; }
.coldef-col--ordinary { width: 88px; }
.coldef-col--earnkind { width: 88px; }
.coldef-col--actions { width: 158px; }

.coldef-th-handle { padding: 0 !important; }
.coldef-th-num,
.coldef-td-num {
  text-align: center;
  color: var(--color-muted);
  font-size: 0.83rem;
}
.coldef-th-name,
.coldef-td-name {
  text-align: left;
  word-break: break-word;
}
.coldef-th-cat,
.coldef-td-cat,
.coldef-th-tax,
.coldef-td-tax,
.coldef-th-wage,
.coldef-td-wage,
.coldef-th-ordinary,
.coldef-td-ordinary,
.coldef-th-earnkind,
.coldef-td-earnkind {
  text-align: center;
}
.coldef-th-actions {
  text-align: center;
}

.coldef-table tbody tr { transition: background 0.1s; }
.coldef-table tbody tr:hover { background: #f7fafc; }

/* 드래그 핸들 셀 */
.coldef-drag-handle-cell {
  width: 32px;
  padding: 0 !important;
  text-align: center;
}
.coldef-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 100%;
  min-height: 42px;
  cursor: grab;
  color: #ccc;
  transition: color 0.15s;
  user-select: none;
}
.coldef-drag-handle:hover,
.coldef-drag-handle:active { color: var(--color-primary); }
.coldef-drag-handle:active { cursor: grabbing; }

/* 드래그 중인 행 */
.coldef-table tbody tr.coldef-dragging {
  opacity: 0.4;
}

/* 드롭 위치 표시 */
.coldef-table tbody tr.coldef-drag-over-top {
  box-shadow: inset 0 3px 0 0 var(--color-primary);
}
.coldef-table tbody tr.coldef-drag-over-bot {
  box-shadow: inset 0 -3px 0 0 var(--color-primary);
}

.coldef-table .coldef-col-name {
  font-weight: 600;
  color: var(--color-text);
  font-family: monospace;
  font-size: 0.88rem;
}

.coldef-table__actions {
  white-space: nowrap;
  text-align: center;
  vertical-align: middle;
}
.coldef-table__actions .actions-wrap {
  display: inline-flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}

.coldef-empty {
  text-align: center;
  padding: 32px !important;
  color: var(--color-muted);
  font-size: 0.88rem;
}

/* 키 역할 뱃지 */
.coldef-key-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  vertical-align: middle;
  margin-left: 5px;
}
.coldef-key-badge--workplace {
  background: #e3f2fd;
  color: #0d47a1;
  border: 1px solid #90caf9;
}
.coldef-key-badge--employee {
  background: #fce4ec;
  color: #880e4f;
  border: 1px solid #f48fb1;
}

/* 추가/수정 다이얼로그 */
.coldef-dialog {
  border: none;
  border-radius: 16px;
  padding: 0;
  box-shadow: 0 8px 40px rgba(0,0,0,0.16);
  max-width: 480px;
  width: 94%;
}
.coldef-dialog::backdrop { background: rgba(0,0,0,0.4); }

.coldef-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 16px;
  border-bottom: 1px solid var(--color-border);
}
.coldef-dialog__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
}
.coldef-dialog__close {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--color-muted);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.coldef-dialog__close:hover { color: var(--color-text); }

.coldef-dialog__form {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.coldef-form-field {}
.coldef-form-field__label {
  display: block;
  margin-bottom: 5px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-muted);
}
.coldef-required { color: #e53935; }
.coldef-form-field__input,
.coldef-form-field__select {
  width: 100%;
  padding: 9px 12px;
  font-family: inherit;
  font-size: 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.15s;
  background: #fff;
}
.coldef-form-field__input:focus,
.coldef-form-field__select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(44,103,129,0.12);
}
.coldef-form-field__select--scroll {
  min-height: 9.5rem;
  padding: 4px 0;
}
.coldef-form-field__select--scroll option {
  padding: 6px 12px;
}
.coldef-form-field__input--sm { max-width: 120px; }
.coldef-form-field__hint {
  margin: 5px 0 0;
  font-size: 0.76rem;
  color: var(--color-muted);
  line-height: 1.45;
}

.coldef-radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  align-items: center;
  margin-top: 4px;
}
.coldef-radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
}
.coldef-radio input {
  width: 16px;
  height: 16px;
  accent-color: var(--color-primary);
}

.coldef-dialog__status {
  margin: 0;
  font-size: 0.83rem;
  color: #c62828;
  min-height: 1.2em;
}

.coldef-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

/* 삭제 다이얼로그 */
.coldef-del-dialog {
  border: none;
  border-radius: 16px;
  padding: 0;
  box-shadow: 0 8px 40px rgba(0,0,0,0.16);
  max-width: 360px;
  width: 92%;
}
.coldef-del-dialog::backdrop { background: rgba(0,0,0,0.4); }
.coldef-del-dialog__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 30px 26px 24px;
  text-align: center;
}
.coldef-del-dialog__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}
.coldef-del-dialog__msg {
  margin: 0;
  font-size: 0.86rem;
  color: var(--color-muted);
  line-height: 1.6;
}
.coldef-del-dialog__actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

/* ── 급여대장 양식 미리보기 ─────────────────────────────── */
.coldef-preview {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 2px dashed var(--color-border);
}

.coldef-preview__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.coldef-preview__title {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
}

.coldef-preview__desc {
  margin: 0;
  font-size: 0.82rem;
  color: var(--color-muted);
}

.coldef-preview__scroll {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: 0 1px 8px rgba(0,0,0,0.04);
}

.coldef-preview__table {
  border-collapse: collapse;
  font-size: 0.82rem;
  white-space: nowrap;
  min-width: 100%;
}

/* 카테고리 그룹 헤더 행 */
.coldef-preview__table .cat-row th {
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
  border-right: 2px solid #fff;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.coldef-preview__table .cat-row th:last-child { border-right: none; }

/* 카테고리별 색상 */
.cat-basic      { background: #e3f2fd; color: #1565c0; }
.cat-calc       { background: #fff8e1; color: #e65100; }
.cat-earn       { background: #e8f5e9; color: #2e7d32; }
.cat-earn_total { background: #c8e6c9; color: #1b5e20; }
.cat-ded        { background: #fbe9e7; color: #bf360c; }
.cat-ded_total  { background: #ffccbc; color: #7f2200; }
.cat-net_total  { background: #f3e5f5; color: #6a1b9a; }
.cat-total      { background: #f3e5f5; color: #6a1b9a; }

/* 열 이름 헤더 행 */
.coldef-preview__table .col-row th {
  padding: 8px 12px;
  background: #f7fafc;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--color-text);
  text-align: center;
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.coldef-preview__table .col-row th:last-child { border-right: none; }

/* 샘플 데이터 행 */
.coldef-preview__table tbody td {
  padding: 9px 12px;
  text-align: center;
  border-right: 1px solid var(--color-border);
  color: var(--color-muted);
  font-size: 0.8rem;
}
.coldef-preview__table tbody td:last-child { border-right: none; }
.coldef-preview__table tbody tr:nth-child(even) td { background: #f9fbfc; }

/* 열 경계선 (카테고리 구분) */
.col-boundary {
  border-left: 2px solid rgba(0,0,0,0.12) !important;
}


/* dialogs appended near body — keep same tokens */
dialog.coldef-dialog,
dialog.coldef-del-dialog {
  --gradient-point: linear-gradient(to bottom, #597184 0%, #4a657a 50%, #3b586e 100%);
  --gradient-point-hover: linear-gradient(to bottom, #6b8699 0%, #587489 50%, #466175 100%);
  --color-primary: #4a657a;
  --color-text: #1a2b33;
  --color-muted: #5c6b73;
  --color-border: #e2e8ec;
  font-family: "Noto Sans KR", sans-serif;
}
