@charset "UTF-8";

/*DateInput 관련*/
.datepicker-input { caret-color: transparent; }
.react-datepicker__calendar-icon { top: 50%; right: 4px; transform: translateY(-50%); pointer-events: none; }
.react-datepicker-popper { z-index: 9999 !important; }

/* DatePicker 헤더 색상 */
.react-datepicker__header,
.react-datepicker__header--custom {
  background: var(--primary-100) !important;
  border-bottom-color: var(--primary-500) !important;
}

/* DatePicker 폰트 색상 */
.react-datepicker__current-month,
.react-datepicker__day-name,
.react-datepicker-year-header {
  color: var(--primary-800) !important;
}

/* 헤더 안 select를 텍스트처럼 보이게 */
.datepicker-custom-header{ display: flex; justify-content: center;}
.datepicker-custom-header select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: transparent;
  border: 0;
  padding: 1px 6px;
  font: inherit;
  color: inherit;
  cursor: pointer;
  outline: none;
  text-align: center;
}

/**DatePicker 버튼 색상*/
.datepicker-custom-header button {
  border: none;
  background: var(--primary-100);
}

/* 연도 트리거 & 월 select 너비 통일 */
.datepicker-custom-header .datepicker-year-trigger,
.datepicker-custom-header select {
  font: inherit;
  width: 80px;
  box-sizing: border-box;
  text-align: center;
}

/**DatePicker 삼각형 포인터 제거*/
.react-datepicker__triangle {
  display: none !important;
}

/* 선택 포커스 색상 */
.react-datepicker__day--selected,
.react-datepicker__day--keyboard-selected,
.react-datepicker__month-text--selected,
.react-datepicker__month-text--keyboard-selected,
.react-datepicker__year-text--selected,
.react-datepicker__year-text--keyboard-selected,
.react-datepicker__quarter-text--selected,
.react-datepicker__quarter-text--keyboard-selected {
  background: var(--primary-500) !important;
  color: #ffffff !important;
}

/* 주말 색상: 일/토 - 이번 달 날짜에만 적용*/
.react-datepicker__week,
.react-datepicker__day:not(.react-datepicker__day--outside-month):nth-child(1) {
  color: #ec221f !important; /* 일요일 */
}
.react-datepicker__week,
.react-datepicker__day:not(.react-datepicker__day--outside-month):nth-child(7) {
  color: #725de6 !important; /* 토요일 */
}

/* 연도 선택 별도 팝업 */
.datepicker-custom-header { position: relative; }   /* 팝업 anchor */

.datepicker-year-popup-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: transparent;
}
.datepicker-year-popup {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10001;
  width: 240px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
  padding: 10px;
}
.datepicker-year-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px 8px;
  font-weight: 600;
  color: var(--primary-800);
}
.datepicker-year-popup-header button {
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 2px 8px;
}
.datepicker-year-popup-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}
.datepicker-year-cell {
  background: transparent;
  border: 0;
  padding: 10px 0;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}
.datepicker-year-cell:hover {
  background: rgba(0, 0, 0, 0.06);
}
.datepicker-year-cell.is-selected {
  background: var(--primary-500) !important;
  color: #ffffff;
  font-weight: 600;
}
.react-datepicker__day--outside-month{
  color: var(--gray-200);
}

/*추가 css 정의*/
.whitespace-pre-line { white-space: pre-line; }

.justify-start { justify-content: flex-start !important; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.align-start { align-items: start !important; }
.self-start { align-self: start !important; }

.gap-10 { gap: 10px !important; }
.gap-16 { gap: 16px !important; }
.grow-1 { flex-grow: 1 !important; }
.z-index-1 { z-index: 1 !important; }
.border-b-slate {
  border-style: solid;
  border-width: 0;
  border-bottom-width: 1px;
  border-bottom-color: var(--table-t-br);
}
.ml-auto { margin-left: auto !important; }
.pt-6 { padding-top: 6px !important; }
.mb-6 { margin-bottom: 6px !important; }
.b-0 { border: 0 !important; }
.p-0 { padding: 0 !important; }
.shadow-none { box-shadow: none !important; }
.bold { font-weight: bold; }
.border-r-8 { border-radius: 8px;}
.quick-tag:hover {
    background-color: rgba(var(--orange-500-rgb)) !important;
}

.pb-2 { padding-bottom: 2px; }
.pt-2 { padding-top: 2px; }
.table.sample th, .table.sample td { height: 34px !important; color: var(--slate-500) !important; }

.min-w-0 { min-width: 0 !important;}

/* ============================================================
   재무현황 (FactBook) 화면 전용
   ============================================================ */

/* Dashboard — 지표 pivot 표 */
.fin-dashboard-scroll {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
  /* 가로 스크롤바 시각적으로 잘 보이게 */
  scrollbar-width: thin;
  scrollbar-color: #9ca3af #f3f4f6;
}
.fin-dashboard-scroll::-webkit-scrollbar { height: 10px; width: 10px; }
.fin-dashboard-scroll::-webkit-scrollbar-track { background: #f3f4f6; }
.fin-dashboard-scroll::-webkit-scrollbar-thumb { background: #9ca3af; border-radius: 5px; }
.fin-dashboard-scroll::-webkit-scrollbar-thumb:hover { background: #6b7280; }

.fin-dashboard-table {
  /* max-content 로 컬럼 합산이 화면 폭을 넘어가야 가로 스크롤이 활성화됨 */
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
  color: #1f2937;
}
.fin-dashboard-table thead th {
  position: sticky;
  top: 0;
  background: #f3f4f6;
  border-bottom: 1px solid #e5e7eb;
  padding: 6px 8px;
  font-weight: 600;
  z-index: 2;
}
/* 좌측 2개 컬럼 가로 스크롤에도 고정 — 라벨 항상 보이게 */
.fin-dashboard-th-group {
  text-align: left; width: 90px; min-width: 90px;
  position: sticky; left: 0; z-index: 4;
  box-shadow: 2px 0 3px -1px rgba(0,0,0,0.08);
}
.fin-dashboard-th-item  {
  text-align: left; width: 180px; min-width: 180px;
  position: sticky; left: 90px; z-index: 4;
  box-shadow: 2px 0 3px -1px rgba(0,0,0,0.08);
}
.fin-dashboard-th-ym    { text-align: right; font-family: monospace; min-width: 100px; }

.fin-dashboard-row-group td.fin-dashboard-td-group {
  background: #eff6ff;
  color: #1e3a8a;
  font-weight: 600;
  padding: 6px 8px;
  border-bottom: 1px solid #dbeafe;
  font-size: 11px;
  position: sticky; left: 0; z-index: 3;
}

.fin-dashboard-row-item { border-bottom: 1px solid #f1f5f9; }
.fin-dashboard-row-item:nth-child(even) { background: #fafbfc; }
.fin-dashboard-row-item:hover { background: #f8fafc; }

.fin-dashboard-td-classify {
  padding: 6px 8px;
  color: #6b7280;
  font-size: 11px;
  background: inherit;
  position: sticky; left: 0; z-index: 1;
  box-shadow: 2px 0 3px -1px rgba(0,0,0,0.08);
}
.fin-dashboard-row-item:nth-child(even) .fin-dashboard-td-classify { background: #fafbfc; }
.fin-dashboard-row-item:not(:nth-child(even)) .fin-dashboard-td-classify { background: #ffffff; }
.fin-dashboard-td-name {
  padding: 6px 8px;
  color: #111827;
  background: inherit;
  position: sticky; left: 90px; z-index: 1;
  box-shadow: 2px 0 3px -1px rgba(0,0,0,0.08);
}
.fin-dashboard-row-item:nth-child(even) .fin-dashboard-td-name { background: #fafbfc; }
.fin-dashboard-row-item:not(:nth-child(even)) .fin-dashboard-td-name { background: #ffffff; }

/* 트리 계층 — 자산/부채/자본 등 부모 항목 강조 */
.fin-dashboard-row-item.is-parent .fin-dashboard-td-name {
  font-weight: 700;
  color: #0f172a;
  background: #f1f5f9;
}
.fin-dashboard-row-item.is-parent .fin-dashboard-td-value {
  font-weight: 700;
  background: #f1f5f9;
}
.fin-dashboard-row-item.is-parent .fin-dashboard-td-classify {
  background: #f1f5f9;
}

/* 자식 항목 — 들여쓰기 + 작고 옅게 */
.fin-dashboard-row-item.is-child .fin-dashboard-td-name {
  padding-left: 24px;
  color: #475569;
  font-size: 12px;
}
.fin-dashboard-td-tree {
  display: inline-block;
  color: #94a3b8;
  font-size: 11px;
  margin-right: 6px;
  margin-left: -12px;
}

.fin-dashboard-td-value {
  padding: 6px 8px;
  text-align: right;
  font-family: monospace;
}
.fin-dashboard-cell-empty { color: #d1d5db; }
.fin-dashboard-cell-pos   { color: #047857; }
.fin-dashboard-cell-neg   { color: #b91c1c; }

.fin-dashboard-footnote {
  font-size: 11px;
  color: #6b7280;
  line-height: 1.6;
}
.fin-dashboard-footnote p { margin: 0; }

/* Graph — 지표 선택 + SVG */
.fin-graph-indicator-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 16px;
}
.fin-graph-indicator-col { min-width: 0; }
.fin-graph-indicator-group {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid #e5e7eb;
}
.fin-graph-indicator-col .f-check {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fin-graph-indicator-col .f-check label { font-size: 12px; }

.fin-graph-svg-wrap { width: 100%; overflow-x: auto; }
.fin-graph-svg      { background: #fff; }
.fin-graph-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 380px;
  color: #64748b;
  font-size: 13px;
}

/* Graph — 4분할 recharts 그리드 */
.fin-graph-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  background: #fff;
  padding: 8px;
  width: 100%;
}

/* Graph — 4분할 패널 박스 */
.fin-graph-panel {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px;
}
.fin-graph-panel-title {
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 4px;
}

/* Graph — 차트 + 지표 선택 좌/우 레이아웃 */
.fin-graph-chart-row {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.fin-graph-chart-area {
  flex: 1;
  min-width: 0;
}
.fin-graph-side {
  width: 220px;
  flex-shrink: 0;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 12px 14px;
}
.fin-graph-side-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid #e5e7eb;
}
.fin-graph-side-count {
  font-size: 11px;
  color: #6b7280;
  font-weight: 500;
}
.fin-graph-side-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fin-graph-side-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  color: #374151;
  transition: background 0.12s ease;
}
.fin-graph-side-row:hover {
  background: #f3f4f6;
}
.fin-graph-side-row.active {
  background: #fff;
  color: #111827;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.fin-graph-side-row input[type="checkbox"] {
  margin: 0;
  flex-shrink: 0;
}
.fin-graph-side-color {
  display: inline-block;
  width: 14px;
  height: 4px;
  border-radius: 2px;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.05);
}
.fin-graph-side-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fin-graph-side-help {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed #e5e7eb;
  font-size: 10px;
  color: #64748b;
  text-align: center;
}

/* 상태 배지 — 업로드/승인 공통 */
.fin-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
}
.fin-status-draft     { background: #f3f4f6; color: #4b5563; }
.fin-status-submitted { background: #dbeafe; color: #1e40af; }
.fin-status-approved  { background: #d1fae5; color: #065f46; }
.fin-status-rejected  { background: #fee2e2; color: #991b1b; }

.fin-reject-reason { color: #b91c1c; font-size: 11px; }
.fin-approve-info  { color: #6b7280; font-size: 11px; }
.fin-action-group  { display: inline-flex; gap: 4px; }

/* 반려 사유 입력 popup */
.fin-reject-popup        { padding: 8px 4px; }
.fin-reject-popup-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
  gap: 4px;
}

/* ============================================================
   재고관리 (USIM/단말) 화면 전용
   ============================================================ */

/* 공통 chip — 카테고리/상태/채널 배지 */
.inv-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}
.inv-chip-blue    { background: #dbeafe; color: #1e40af; }
.inv-chip-emerald { background: #d1fae5; color: #065f46; }
.inv-chip-purple  { background: #ede9fe; color: #5b21b6; }
.inv-chip-cyan    { background: #cffafe; color: #155e75; }
.inv-chip-yellow  { background: #fef9c3; color: #854d0e; }
.inv-chip-rose    { background: #ffe4e6; color: #9f1239; }
.inv-chip-orange  { background: #ffedd5; color: #9a3412; }
.inv-chip-gray    { background: #e5e7eb; color: #374151; }
.inv-chip-amber   { background: #fef3c7; color: #92400e; }
.inv-chip-red     { background: #fee2e2; color: #991b1b; }

/* 인라인 보조 텍스트 */
.inv-muted { color: #6b7280; font-size: 11px; }

/* 액션 버튼 그룹 (테이블 셀 내) */
.inv-action-group { display: inline-flex; gap: 4px; align-items: center; }

/* ===== USIM 요약/상세 표 (광폭 pivot) ===== */
.inv-sim-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
  max-height: 600px;
}

.inv-sim-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 11.5px;
  color: #1f2937;
}

.inv-sim-table thead tr {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f3f4f6;
}
.inv-sim-table thead th {
  border-bottom: 1px solid #e5e7eb;
  padding: 5px 6px;
  font-weight: 600;
  text-align: center;
}
.inv-sim-th-label {
  text-align: left !important;
  background: #f3f4f6;
  min-width: 110px;
}
.inv-sim-th-grp {
  border-left: 2px solid;
  font-weight: 700;
}

/* 컬럼 그룹별 색조 */
.inv-sim-grp-init   { background: #eff6ff; border-left-color: #93c5fd; }
.inv-sim-grp-now    { background: #ecfdf5; border-left-color: #6ee7b7; }
.inv-sim-grp-amt    { background: #fefce8; border-left-color: #fde68a; }
.inv-sim-grp-acct   { background: #eef2ff; border-left-color: #a5b4fc; }
.inv-sim-grp-ord    { background: #fef3c7; border-left-color: #fcd34d; }
.inv-sim-grp-sales  { background: #fff1f2; border-left-color: #fda4af; }
.inv-sim-grp-newch  { background: #fff1f2; border-left-color: #fda4af; }
.inv-sim-grp-updch  { background: #fdf4ff; border-left-color: #f0abfc; }
.inv-sim-grp-trend  { background: #fff7ed; border-left-color: #fdba74; }
.inv-sim-grp-telco  { background: #f5f3ff; border-left-color: #c4b5fd; }

.inv-sim-unk        { color: #92400e; }    /* 미분류 강조 */

.inv-sim-table tbody td {
  padding: 4px 6px;
  border-bottom: 1px solid #f1f5f9;
}
.inv-sim-td-label {
  text-align: left;
  white-space: nowrap;
}
.inv-sim-td-muted { color: #6b7280; font-size: 10.5px; }
.inv-sim-td-indent { padding-left: 22px; color: #475569; }
.inv-sim-td-num {
  text-align: right;
  font-family: monospace;
}

.inv-sim-acct-ok   { color: #059669; }
.inv-sim-acct-diff { color: #dc2626; }

/* group row 강조 */
.inv-sim-row-total td {
  background: #dbeafe;
  font-weight: 700;
  border-top: 2px solid #60a5fa;
  border-bottom: 2px solid #60a5fa;
}
.inv-sim-row-cat td {
  background: #f3f4f6;
  font-weight: 600;
}
.inv-sim-row-model:hover td { background: #f0f9ff; }

.inv-sim-empty {
  text-align: center;
  color: #64748b;
  padding: 48px 0;
}

/* USIM detail page — bizDays 정보 우측 표시 */
.inv-sim-bizdays {
  font-size: 12px;
  color: #6b7280;
}

/* USIM 요약 KPI 카드 그리드 */
.inv-sim-kpi-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 10px;
}
.inv-sim-kpi {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 12px;
  background: #fff;
}
.inv-sim-kpi.accent {
  border-color: #93c5fd;
  background: #eff6ff;
}
.inv-sim-kpi-label {
  font-size: 11px;
  color: #6b7280;
}
.inv-sim-kpi-value {
  margin-top: 4px;
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}
.inv-sim-kpi.accent .inv-sim-kpi-value { color: #1d4ed8; }

@media (max-width: 1280px) {
  .inv-sim-kpi-grid { grid-template-columns: repeat(4, minmax(120px, 1fr)); }
}
@media (max-width: 768px) {
  .inv-sim-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

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

.-ml-2 {
    margin-left: -2px;
}

/* ============================================================
   재고관리 Phase 2 — 단말 영역 (summary / detail / rds / sales)
   ============================================================ */

/* 업로드 popup 안내 문구 */
.inv-upload-popup-hint {
  margin-top: 8px;
  padding: 8px 10px;
  font-size: 11.5px;
  color: #475569;
  background: #f1f5f9;
  border-left: 3px solid #94a3b8;
  border-radius: 4px;
}

/* 재고현황(요약) 표 — 폴더/스마트폰 subtotal + 합계 */
.inv-sum-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
}
.inv-sum-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
  color: #1f2937;
}
.inv-sum-th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f3f4f6;
  padding: 6px 8px;
  font-weight: 600;
  font-size: 11.5px;
  border-right: 1px solid #e5e7eb;
  border-bottom: 1px solid #d1d5db;
  text-align: center;
}
.inv-sum-table tbody td {
  padding: 5px 8px;
  border-bottom: 1px solid #f1f5f9;
  border-right: 1px solid #f1f5f9;
}
.inv-sum-td-label  { text-align: left; white-space: nowrap; }
.inv-sum-td-num    { text-align: right; font-family: monospace; }
.inv-sum-row-model:hover td { background: #f8fafc; }
.inv-sum-row-sub td {
  background: #eff6ff;
  font-weight: 600;
}
.inv-sum-row-total td {
  background: #fef3c7;
  font-weight: 700;
  border-top: 1px solid #fcd34d;
  border-bottom: 1px solid #fcd34d;
}
.inv-sum-empty { text-align: center; color: #64748b; padding: 40px 0; }

/* RDS / Sales — 광폭 list 표 + 탭 */
.inv-rds-tabs { display: inline-flex; gap: 4px; }
.inv-rds-tab {
  padding: 6px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  background: #fff;
  font-size: 12px;
  color: #4b5563;
  cursor: pointer;
  transition: background 0.15s ease;
}
.inv-rds-tab:hover { background: #f3f4f6; }
.inv-rds-tab.active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
  font-weight: 600;
}

.inv-rds-table-wrap {
  width: 100%;
  overflow-x: auto;
  max-height: 600px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
}
.inv-rds-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 11.5px;
}
.inv-rds-th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f3f4f6;
  padding: 6px 8px;
  font-weight: 600;
  border-bottom: 1px solid #d1d5db;
  white-space: nowrap;
  text-align: left;
}
.inv-rds-td {
  padding: 4px 8px;
  border-bottom: 1px solid #f1f5f9;
  white-space: nowrap;
}
.inv-rds-td-muted { color: #6b7280; }
.inv-rds-row:hover td { background: #f8fafc; }
.inv-rds-empty { text-align: center; color: #64748b; padding: 40px 0; }


/* ============================================================
   MonthCalendar (shared/ui/calendar/MonthCalendar.tsx)
   영업일수 화면 + 향후 다른 캘린더성 화면에서 재사용
   ============================================================ */

.inv-cal-wrap {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
  padding: 12px;
}

/* 헤더 네비 — 이전/다음/제목 + 헤더 우측 */
.inv-cal-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
  position: relative;
}
.inv-cal-nav-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #fff;
  color: #374151;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.inv-cal-nav-btn:hover:not(:disabled) { background: #f3f4f6; }
.inv-cal-nav-btn:disabled { color: #cbd5e1; cursor: not-allowed; }
.inv-cal-nav-title {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  min-width: 130px;
  text-align: center;
}
.inv-cal-header-right {
  position: absolute;
  right: 0;
}

/* 그리드 */
.inv-cal-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}
.inv-cal-th {
  padding: 6px 4px;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  --bg-opacity: 1;
  background-color: rgba(var(--gray-100-rgb), var(--bg-opacity, 1));
  color: var(--black);
  border-bottom: 1px solid #e5e7eb;
}
.inv-cal-td {
  vertical-align: top;
  border: 1px solid #f1f5f9;
  padding: 6px;
  min-width: 110px;
  height: 86px;
  background: #fff;
  transition: background 0.15s ease;
}
.inv-cal-td-empty {
  --bg-opacity: 1;
  background-color: rgba(var(--gray-50-rgb), var(--bg-opacity, 1));
}
.inv-cal-td-clickable { cursor: pointer; }
.inv-cal-td-clickable:hover { background: #f1f5f9; }

.inv-cal-cell {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 2px;
}
.inv-cal-cell-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.inv-cal-day {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
}
.inv-cal-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #e5e7eb;
  color: #4b5563;
  font-family: monospace;
  font-weight: 600;
}
.inv-cal-badge-accent {
  --bg-opacity: 1;
  background-color: rgba(var(--orange-200-rgb), var(--bg-opacity, 1));
  color: #9a3412;
}
.inv-cal-sub {
  font-size: 11px;
  color: #b91c1c;
  font-weight: 500;
  line-height: 1.3;
  margin-top: 2px;
}
.inv-cal-footer {
  margin-top: auto;
  font-size: 11px;
  color: #475569;
}
.inv-cal-day-type {
  font-size: 11px;
  color: #475569;
}
.inv-cal-modified {
  color: #9a3412;
  font-weight: 500;
}

.inv-cal-empty {
  text-align: center;
  padding: 56px 16px;
  color: #94a3b8;
  font-size: 13px;
}

/* 요일/공휴일 색조 — 헤더(th)와 셀(td) 모두 같은 클래스로 톤 적용 */
.inv-tone-weekday { background: #ffffff; color: #111827; }
.inv-tone-saturday {
  --bg-opacity: 1;
  background-color: rgba(var(--blue-50-rgb), var(--bg-opacity, 1));
  color: #1e40af;
}
.inv-tone-sunday {
  --bg-opacity: 1;
  background-color: rgba(var(--red-50-rgb), var(--bg-opacity, 1));
  color: #b91c1c;
}
.inv-tone-holiday {
  --bg-opacity: 1;
  background-color: rgba(var(--red-100-rgb), var(--bg-opacity, 1));
  color: #991b1b;
}

th.inv-tone-saturday, th.inv-tone-sunday {
  --bg-opacity: 1;
  background-color: rgba(var(--gray-100-rgb), var(--bg-opacity, 1));
  font-weight: 600;
}
th.inv-tone-saturday { color: var(--blue-500); }
th.inv-tone-sunday   { color: var(--red-500); }

th.diagonal { position: relative; min-width: 120px; height: 60px; }
th.diagonal::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top right, transparent 49.3%, var(--slate-300) 49.7%, var(--slate-300) 50.3%, transparent 50.7%); pointer-events: none; }

/* ============================================================
   전자세금계산서 (etax-invoice)
   ============================================================ */

/* Stub placeholder */
.etax-stub {
  padding: 60px 20px;
  text-align: center;
  color: #64748b;
  font-size: 14px;
  background: #f9fafb;
  border: 1px dashed #e5e7eb;
  border-radius: 6px;
}

/* KPI 카드 그리드 (Summary 화면) */
.etax-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
@media (min-width: 1024px) {
  .etax-kpi-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
.etax-kpi-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 14px 16px;
}
.etax-kpi-label {
  font-size: 11px;
  color: #6b7280;
  margin-bottom: 6px;
}
.etax-kpi-value {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  font-family: monospace;
}
.etax-kpi-accent-blue .etax-kpi-value { color: #1d4ed8; }
.etax-kpi-accent-cyan .etax-kpi-value { color: #0e7490; }
.etax-kpi-accent-red  .etax-kpi-value { color: #b91c1c; }

/* 상세보기 + 액션 팝업 (list 화면) */
.etax-detail-popup {
  padding: 4px 8px 8px;
}
.etax-detail-info {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 14px;
  font-size: 13px;
}
.etax-detail-info hr {
  margin: 8px -16px;
  border: none;
  border-top: 1px solid #e5e7eb;
}
.etax-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
}
.etax-detail-row-highlight {
  font-weight: 700;
  font-size: 14px;
  color: #111827;
}
.etax-detail-row-label {
  color: #6b7280;
  font-size: 12px;
}
.etax-detail-row-value {
  color: #111827;
}
.etax-detail-mono {
  font-family: monospace;
  font-size: 12px;
}
.etax-detail-result {
  font-size: 11px;
  color: #6b7280;
}

.etax-detail-section-title {
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  margin: 10px 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.etax-detail-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
}
.etax-detail-actions {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 8px 14px 12px;
  margin-bottom: 12px;
}
.etax-detail-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 4px;
  border-top: 1px dashed #e5e7eb;
  margin-top: 8px;
}

/* 발급번호 inline link (issue/reverse-issue 목록) */
.etax-issue-id-link {
  background: none;
  border: none;
  padding: 0;
  color: #2563eb;
  cursor: pointer;
  font-family: monospace;
  font-size: 12px;
}
.etax-issue-id-link:hover {
  text-decoration: underline;
}

/* 행별 액션 버튼 그룹 (issue 목록) */
.etax-issue-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
}

/* ==== 작성/수정 폼 팝업 (issue + reverse-issue 공유) ==== */
.etax-form-popup {
  padding: 4px 4px 0;
}
.etax-form-issue-type {
  padding: 6px 12px;
  background: #fef3c7;
  color: #92400e;
  border-radius: 4px;
  font-size: 12px;
  margin-bottom: 10px;
}
.etax-form-party-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.etax-form-party {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 10px 12px;
}
.etax-form-party-supplier { border-left: 4px solid #2563eb; }
.etax-form-party-buyer    { border-left: 4px solid #dc2626; }
.etax-form-party .f-input + .f-input,
.etax-form-party .f-input-wrapper + .f-input-wrapper { margin-top: 6px; }
.etax-form-party > div + div { margin-top: 6px; }
.etax-form-party legend {
  font-size: 11px;
  font-weight: 700;
  padding: 0 6px;
  color: #1f2937;
}
.etax-form-meta-row {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}
.etax-form-items-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.etax-form-items-title {
  font-size: 13px;
  font-weight: 700;
  color: #1f2937;
}
.etax-form-items-table {
  width: 100%;
  border: 1px solid #e5e7eb;
  font-size: 11px;
  border-collapse: collapse;
}
.etax-form-items-table thead tr {
  background: #f3f4f6;
}
.etax-form-items-table th,
.etax-form-items-table td {
  padding: 4px 6px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
}
.etax-form-items-table th {
  font-size: 11px;
  font-weight: 600;
  color: #374151;
}
.etax-form-items-no {
  text-align: center;
  color: #6b7280;
  font-size: 11px;
}
.etax-form-items-amt {
  text-align: right;
  font-family: monospace;
  font-size: 11px;
}
.etax-form-items-input {
  width: 100%;
  padding: 3px 6px;
  border: 1px solid #e5e7eb;
  border-radius: 3px;
  font-size: 11px;
  background: #ffffff;
}
.etax-form-items-num {
  text-align: right;
}
.etax-form-items-del {
  background: none;
  border: none;
  color: #f87171;
  cursor: pointer;
  font-size: 16px;
  padding: 0;
}
.etax-form-items-del:hover { color: #dc2626; }
.etax-form-totals {
  display: flex;
  justify-content: flex-end;
  gap: 24px;
  padding: 10px 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-top: none;
  font-size: 12px;
  font-family: monospace;
}
.etax-form-totals-final {
  color: #1d4ed8;
  font-weight: 700;
  font-size: 14px;
}
.etax-form-actions {
  display: flex;
  align-items: center;
  padding: 12px 4px 0;
  border-top: 1px solid #e5e7eb;
  margin-top: 14px;
}

/* ============================================================
   홈 대시보드 (탭 없을 때 / 대표·임원 시각용)
   ============================================================ */
.dashboard-home {
  flex: 1;
  width: 100%;
  padding: 24px 32px;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 200px);
  overflow-y: auto;
}

/* 헤더 */
.dashboard-home-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}
.dashboard-home-greeting {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 4px;
}
.dashboard-home-greeting strong { color: #1d4ed8; font-weight: 600; }
.dashboard-home-title {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}
.dashboard-home-sub {
  font-size: 13px;
  color: #6b7280;
}
.dashboard-home-sub b { color: #1f2937; font-weight: 600; }
.dashboard-home-now {
  text-align: right;
}
.dashboard-home-now-label {
  font-size: 10px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
}
.dashboard-home-now-date {
  font-size: 14px;
  color: #374151;
  font-weight: 500;
}

/* KPI 카드 4개 row */
.dashboard-home-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
@media (max-width: 1100px) {
  .dashboard-home-kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.dashboard-home-kpi {
  position: relative;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 18px 20px;
  overflow: hidden;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.dashboard-home-kpi:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.dashboard-home-kpi::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
}
.dashboard-home-kpi-primary::before { background: linear-gradient(90deg, #1d4ed8, #3b82f6); }
.dashboard-home-kpi-accent::before  { background: linear-gradient(90deg, #7c3aed, #a855f7); }
.dashboard-home-kpi-success::before { background: linear-gradient(90deg, #047857, #10b981); }
.dashboard-home-kpi-danger::before  { background: linear-gradient(90deg, #b91c1c, #ef4444); }
.dashboard-home-kpi-neutral::before { background: linear-gradient(90deg, #6b7280, #9ca3af); }

.dashboard-home-kpi-label {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
  margin-bottom: 8px;
}
.dashboard-home-kpi-value {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 28px;
  font-weight: 700;
  color: #111827;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.dashboard-home-kpi-success .dashboard-home-kpi-value { color: #047857; }
.dashboard-home-kpi-danger  .dashboard-home-kpi-value { color: #b91c1c; }
.dashboard-home-kpi-accent  .dashboard-home-kpi-value { color: #7c3aed; }
.dashboard-home-kpi-primary .dashboard-home-kpi-value { color: #1d4ed8; }

.dashboard-home-kpi-arrow {
  font-size: 16px;
  margin-right: 2px;
}
.dashboard-home-kpi-arrow.up   { color: #10b981; }
.dashboard-home-kpi-arrow.down { color: #ef4444; }
.dashboard-home-kpi-unit {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
  margin-left: 4px;
}
.dashboard-home-kpi-hint {
  margin-top: 6px;
  font-size: 11px;
  color: #64748b; /* 웹접근성(1.4.3): #9ca3af(2.54:1) → slate-500(4.76:1) */
}

/* 공지사항 위젯 */
.dashboard-home-notice {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px 20px 8px;
  margin-bottom: 16px;
}
.dashboard-home-notice-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 6px;
}
.dashboard-home-notice-more {
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 12px;
  color: #6b7280;
}
.dashboard-home-notice-more:hover { color: #1d4ed8; }
.dashboard-home-notice-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.dashboard-home-notice-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
  cursor: pointer;
}
.dashboard-home-notice-item:last-child { border-bottom: none; }
.dashboard-home-notice-item:hover .dashboard-home-notice-text { color: #1d4ed8; }
.dashboard-home-notice-pin {
  flex: none;
  font-size: 10px;
  font-weight: 700;
  color: #b91c1c;
  background: #fef2f2;
  padding: 2px 7px;
  border-radius: 999px;
}
.dashboard-home-notice-text {
  flex: 1;
  min-width: 0;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dashboard-home-notice-date {
  flex: none;
  font-size: 11px;
  color: #64748b;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
}

/* 위젯 2단 (즐겨찾기 + 나의 업무) */
.dashboard-home-widgets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
@media (max-width: 1100px) {
  .dashboard-home-widgets { grid-template-columns: 1fr; }
}
.dashboard-home-panel {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 260px;
}
.dashboard-home-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}
.dashboard-home-panel-count {
  font-size: 11px;
  color: #475569; /* 웹접근성(1.4.3): #f3f4f6 배경 위 #6b7280 미달 → slate-600 */
  font-weight: 500;
  background: #f3f4f6;
  padding: 2px 10px;
  border-radius: 999px;
}
.dashboard-home-panel-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  color: #64748b;
  font-size: 13px;
  line-height: 1.8;
}
.dashboard-home-panel-empty-hint {
  font-size: 11px;
  color: #64748b;
}

/* 즐겨찾기 카드 그리드 */
.dashboard-home-fav-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 16px 20px;
}
@media (max-width: 1400px) {
  .dashboard-home-fav-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.dashboard-home-fav-card {
  display: block;
  text-align: left;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.dashboard-home-fav-card:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  box-shadow: 0 2px 6px rgba(29, 78, 216, 0.08);
}
.dashboard-home-fav-name {
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dashboard-home-fav-card:hover .dashboard-home-fav-name { color: #1d4ed8; }
.dashboard-home-fav-path {
  margin-top: 4px;
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 나의 업무 목록 */
.dashboard-home-task-list {
  padding: 8px 0;
  margin: 0;
  list-style: none;
}
.dashboard-home-task {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
}
.dashboard-home-task:last-child { border-bottom: none; }
.dashboard-home-task-status {
  flex: none;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}
.dashboard-home-task-status.s-todo        { background: #f3f4f6; color: #4b5563; }
.dashboard-home-task-status.s-in_progress { background: #eff6ff; color: #1d4ed8; }
.dashboard-home-task-status.s-done        { background: #ecfdf5; color: #047857; }
.dashboard-home-task-status.s-cancelled   { background: #f3f4f6; color: #64748b; }
.dashboard-home-task-title {
  flex: 1;
  min-width: 0;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dashboard-home-task-priority {
  flex: none;
  font-size: 10px;
  font-weight: 700;
  color: #b91c1c;
  background: #fef2f2;
  padding: 2px 7px;
  border-radius: 999px;
}
.dashboard-home-task-due {
  flex: none;
  font-size: 11px;
  color: #64748b;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
}
.dashboard-home-task-due.today   { color: #b45309; font-weight: 700; }
.dashboard-home-task-due.overdue { color: #b91c1c; font-weight: 700; }

/* 시스템 현황 위젯 */
.dashboard-home-status {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px 20px 16px;
  margin-bottom: 16px;
}
.dashboard-home-status-title {
  font-size: 12px;
  color: #6b7280;
  font-weight: 600;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.dashboard-home-status-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 900px) {
  .dashboard-home-status-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.dashboard-home-status-item {
  background: #f9fafb;
  border-radius: 8px;
  padding: 10px 14px;
}
.dashboard-home-status-label {
  font-size: 11px;
  color: #6b7280;
}
.dashboard-home-status-value {
  margin-top: 2px;
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
}
.dashboard-home-status-value.danger { color: #b91c1c; }
.dashboard-home-status-unit {
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  margin-left: 3px;
}

/* 푸터 안내 */
.dashboard-home-foot {
  font-size: 11px;
  color: #64748b;
  padding: 0 4px;
}

/* 분개/역분개 invoice 선택 팝업 */
.etax-journal-picker {
  padding: 4px;
}
.etax-journal-picker-help {
  padding: 10px 14px;
  background: #eff6ff;
  color: #1e40af;
  border-left: 4px solid #2563eb;
  border-radius: 4px;
  font-size: 12px;
  margin-bottom: 12px;
}
.etax-journal-picker-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
  margin-top: 12px;
}

/* ============================================================
   공통 Tag — 상태/구분 배지 (PASS 대상/통과, 역할, 채널 등)
   shared/ui/feedback/Tag.tsx
   ============================================================ */

/** 태그 */
.tag {
  padding: 1px 5px 1px 5px;
  margin-right: 5px;
  border-radius: 8px 8px 8px 8px;
}

/* 폭 고정 (PASS 38 / 그 외 60) — 카드·헤더 정렬용 */
.tag-narrow { min-width: 38px; }
.tag-wide   { min-width: 60px; }

.tag-primary {
  background: var(--primary-100) !important;
  border: 1px solid var(--primary-300);
  color: var(--primary-900);
}

.tag-success {
  background: var(--success-100) !important;
  border: 1px solid var(--success-300);
  color: var(--success-900);
}

.tag-danger {
  background: var(--danger-100) !important;
  border: 1px solid var(--danger-300);
  color: var(--danger-900);
}

.tag-warning {
  background: var(--warning-100) !important;
  border: 1px solid var(--warning-300);
  color: var(--warning-900);
}

.tag-info {
  background: var(--info-100) !important;
  border: 1px solid var(--info-300);
  color: var(--info-900);
}

.tag-gray {
  background: var(--gray-100) !important;
  border: 1px solid var(--gray-300);
  color: var(--gray-900);
}

.tag-red {
  background: var(--red-100) !important;
  border: 1px solid var(--red-300);
}

.tag-orange {
  background: var(--orange-100) !important;
  border: 1px solid var(--orange-300);
  color: var(--orange-900);
}

.tag-yellow {
  background: var(--yellow-100) !important;
  border: 1px solid var(--yellow-300);
  color: var(--yellow-900);
}

.tag-green {
  background: var(--green-100) !important;
  border: 1px solid var(--green-300);
  color: var(--green-900);
}

.tag-blue {
  background: var(--blue-100) !important;
  border: 1px solid var(--blue-300);
  color: var(--blue-900);
}

.tag-purple {
  background: var(--purple-100) !important;
  border: 1px solid var(--purple-300);
  color: var(--purple-900);
}

.tag-pink {
  background: var(--pink-100) !important;
  border: 1px solid var(--pink-300);
  color: var(--pink-900);
}


/* ============================================================
   디지털프로모션 전용 (dpromotion-summary 정산 대시보드 등)
   유틸 클래스(bg/padding/radius)는 그대로 두고, 디자인시스템에
   유틸이 없는 속성(테두리/그리드/baseline 등)만 클래스로 분리.
   ============================================================ */
/* 합계 박스 — 강조 테두리 (2px primary) */
.dp-sumbox { border: 2px solid var(--primary-500); }
.dp-sum-label { font-size: 16px; white-space: nowrap; }
.dp-nowrap { white-space: nowrap; }

/* 사은품군 소계 박스 — 점선 테두리 */
.dp-subbox {
  border: 1px dashed var(--slate-300, #cbd5e1);
  border-radius: 6px;
}

/* 정산 카드 — 실선 테두리 (테두리 색은 br-slate-200 유틸과 병용) */
.dp-card { border: 1px solid; border-radius: 6px; }
.dp-card-foot { border-top: 1px solid; }

/* 카드 반응형 그리드 (auto-fill) */
.dp-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.dp-card-grid-wide { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* 섹션 헤더 — 제목/카운트 baseline 정렬 */
.dp-section-head { align-items: baseline; }

/* KIND 상세 팝업 — 3 섹션을 내용 높이대로 상단 정렬 (그리드 stretch 로 섹션이 늘어나 생기는 과도한 여백 제거) */
.page-grid-wrap.dp-detail-grid { align-content: start; }

/* KIND 상세 팝업 — PASS 단계 한 줄에 5개 고정 그리드 */
.dp-pass-stages { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px 12px; padding: 8px 4px; }
/* KIND 상세 팝업 — PASS 단계 셀 (그리드 1fr 이 폭 결정, 내용 넘침 방지로 min-width 0) */
.dp-pass-stage-cell { min-width: 0; }
/* KIND 상세 팝업 — 미대상 사유 구분선 */
.dp-fail-reason { padding: 4px 8px; border-top: 1px dashed #ddd; }

/* KIND 상세 팝업 — PASS 단계 판정 체크박스.
   통과(✓)=info 채움 / 탈락(✕)=danger 채움 / 해당없음(—)=회색 박스(조건 미등록이라 검사 안 함). */
.dp-pass-check {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  border: 1.5px solid var(--gray-300);
  color: var(--gray-400);
}
.dp-pass-check.is-pass {
  background: var(--info-600);
  border-color: var(--info-600);
  color: var(--white);
}
.dp-pass-check.is-fail {
  background: var(--danger-600);
  border-color: var(--danger-600);
  color: var(--white);
}

/* 보정 팝업 — 회차분할 안내 리스트 */
.dp-notice-list { margin: 0; padding-left: 16px; font-size: 13px; line-height: 1.7; }

/* 통합통계 — 프로모션 선택 드롭다운 (디자인시스템에 팝오버 유틸이 없어 클래스로 분리) */
.dp-kind-filter { position: relative; display: inline-block; }
.dp-kind-filter-panel {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  right: 0;
  width: 280px;
  max-height: 400px;
  overflow-y: auto;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
}
/* 상단 고정 바 — 전체 선택 + 선택 개수 */
.dp-kind-filter-bar {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--slate-50);
  border-bottom: 1px solid var(--slate-100);
}
.dp-kind-filter-count { font-size: 12px; color: var(--slate-500); font-variant-numeric: tabular-nums; }
.dp-kind-filter-body { padding: 10px 14px 12px; }
.dp-kind-filter-cat { margin-bottom: 12px; }
.dp-kind-filter-cat:last-child { margin-bottom: 0; }
/* 유형은 한 줄에 하나씩 세로 나열 — 라벨 길이와 무관하게 정렬 유지 */
.dp-kind-filter-kinds { padding-left: 20px; margin-top: 6px; display: flex; flex-direction: column; gap: 6px; }
/* 부모(전체/구분) 체크박스 라벨 강조 */
.dp-kind-filter-parent em { font-weight: 600; }

/* position: relative 유틸 (공통) — absolute 자식(예: nodata-wrap)의 기준 컨테이너 */
.relative { position: relative; }

/* 업로드 안내 텍스트 박스 — 여백만 */
.dp-notice { padding: 14px 4px; }

/* 조회결과 헤더 우측 액션 — 내용폭 inline-flex 로 page-head-right 우측정렬 유지 (K프로모션 패턴) */
.dp-head-actions { display: inline-flex; align-items: center; gap: 6px; }

/* 메모 셀 — 텍스트(생략) + 수정 버튼 한 줄 */
.dp-memo-row { justify-content: space-between; gap: 6px; }
.dp-memo-text { flex: 1; text-align: left; }

/* 혜택 폼 — 좌 등록폼(4) : 우 목록(8) 분할 */
.dp-benefit-split { display: flex; gap: 16px; align-items: flex-start; width: 100%; }
.dp-benefit-form-col { flex: 4 1 0; min-width: 0; }
.dp-benefit-list-col { flex: 1 1 0; min-width: 0; position: relative; }
.dp-benefit-list-col.is-editable { flex: 8 1 0; }
.dp-benefit-formbtns { display: flex; align-items: center; margin-top: 8px; }
.dp-benefit-formbtns-right { margin-left: auto; display: flex; gap: 4px; }

/* 유형선택 템플릿 — 카테고리 라벨 고정폭(버튼 시작 위치 정렬) */
.dp-cat-label { width: 64px; flex-shrink: 0; align-self: center; }

/* 보정 팝업 — 고정높이 모달 안 그리드 상단 정렬 */
.page-grid-wrap.dp-modal-grid { height: auto; align-content: start; }

/* 기간 입력 — 시작일 ~ 종료일 한 줄 */
.dp-date-range { display: flex; align-items: center; gap: 5px; }

/* 검색 추가 바 — 검색 입력군(좌) + 추가 액션군(우) 한 줄, 좁으면 줄바꿈 */
.dp-search-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
/* 추가 액션군(구분/그룹 셀렉트 + 선택 추가) — 우측으로 밀어 검색군과 분리 */
.dp-search-actions { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }

/* 메뉴관리 - 미사용 메뉴 빨간글씨 */
.tree ul li div.remove {
  color:  var(--red-600) !important; /* 웹접근성(1.4.3): red-500(3.76) → red-600(4.83) */
}

/** 페이징 css */
.paging-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.paging-wrap {
  display: flex;
  justify-content: flex-end;
}

.flex-1 {
  flex: 1;
}

/* 디지털프로모션 등록 화면 - "등록 항목" 섹션 토글 칩 */
.dp-section-toggle {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 10px 14px;
  margin-bottom: 12px;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: 8px;
}
.dp-section-toggle-label { font-size: 13px; font-weight: 600; color: var(--slate-700, #334155); }
.dp-section-toggle-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.dp-section-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  font-size: 13px;
  line-height: 1;
  border: 1px solid var(--slate-300);
  border-radius: 999px;
  background: var(--white);
  color: var(--slate-500);
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}
.dp-section-chip:hover { border-color: var(--primary-300); }
.dp-section-chip.on {
  background: var(--primary-100);
  border-color: var(--primary-500);
  color: var(--primary-800);
  font-weight: 600;
}