/* ===== 기본 리셋 & 폰트 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Noto Sans KR', sans-serif; font-size: 13px; background: #d0d0d0; display: flex; height: 100vh; overflow: hidden; }

/* 거래명세서 제목만 궁서체, 나머지 본문은 기본 폰트 */
#doc-title {
  font-family: '궁서', 'GungsuhChe', 'Gungsuh', serif !important;
}

/* ===== 사이드바 ===== */
#sidebar { width: 220px; min-width: 220px; background: #2c3e50; color: #ecf0f1; display: flex; flex-direction: column; overflow: hidden; }
.sidebar-header { padding: 14px 12px 8px; }
.sidebar-header h2 { font-size: 13px; margin-bottom: 8px; }
#btn-add-company { width: 100%; padding: 7px; background: #27ae60; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 12px; }
#btn-add-company:hover { background: #229954; }
.sidebar-search { padding: 6px 12px; }
#company-search { width: 100%; padding: 6px 8px; border-radius: 4px; border: none; font-size: 12px; }
#company-list { flex: 1; min-height: 60px; overflow-y: auto; list-style: none; padding: 4px 0; }
#company-list li { padding: 8px 12px; cursor: pointer; font-size: 12px; border-bottom: 1px solid #34495e; display: flex; justify-content: space-between; align-items: center; }
#company-list li:hover { background: #34495e; }
#company-list li.active { background: #2980b9; }
#company-list li .del-company { color: #e74c3c; font-size: 14px; cursor: pointer; padding: 0 4px; display: none; }
#company-list li:hover .del-company { display: inline; }
.sidebar-footer { padding: 10px 12px; border-top: 1px solid #34495e; display: flex; flex-direction: column; gap: 6px; }
.sidebar-footer button { width: 100%; padding: 7px; background: #8e44ad; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 11px; }
.sidebar-footer button:hover { background: #7d3c98; }

/* ===== 차량번호 관리 패널 (사이드바 내부) ===== */
#vehicle-panel {
  border-top: 1px solid #34495e;
  padding: 8px 0 4px;
  flex-shrink: 0;
  max-height: 180px;
  display: flex;
  flex-direction: column;
}
.vehicle-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px 6px;
  font-size: 11px;
  color: #bdc3c7;
  font-weight: 600;
}
#btn-add-vehicle {
  padding: 3px 8px;
  background: #e67e22;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
}
#btn-add-vehicle:hover { background: #ca6f1e; }
#vehicle-list {
  list-style: none;
  overflow-y: auto;
  flex: 1;
  padding: 0 8px;
}
.vehicle-empty {
  font-size: 11px;
  color: #7f8c8d;
  padding: 6px 4px;
  text-align: center;
}
.vehicle-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 4px;
  border-bottom: 1px solid #34495e;
  font-size: 11px;
  color: #ecf0f1;
}
.vehicle-item:hover { background: #34495e; border-radius: 3px; }
.vehicle-no { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vehicle-fuel-badge {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 8px;
  font-weight: 600;
  white-space: nowrap;
  background: #555;
  color: #fff;
}
.fuel-badge-경유   { background: #2980b9; }
.fuel-badge-휘발유 { background: #27ae60; }
.fuel-badge-등유   { background: #8e44ad; }
.fuel-badge-요소수 { background: #e67e22; }
.fuel-badge-기타   { background: #7f8c8d; }
.btn-vehicle-edit,
.btn-vehicle-del {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  padding: 1px 3px;
  opacity: 0;
  transition: opacity 0.15s;
}
.vehicle-item:hover .btn-vehicle-edit,
.vehicle-item:hover .btn-vehicle-del { opacity: 1; }
.btn-vehicle-del { color: #e74c3c; }

/* ===== 차량번호 등록/수정 모달 ===== */
#vehicle-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  align-items: center;
  justify-content: center;
}
#vehicle-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
}
#vehicle-modal-box {
  position: relative;
  background: #fff;
  border-radius: 10px;
  padding: 24px 28px 20px;
  min-width: 300px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  z-index: 1;
}
#vehicle-modal-box h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
  color: #2c3e50;
}
.vehicle-form { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.vehicle-form-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.vehicle-form-row label {
  width: 60px;
  font-size: 12px;
  font-weight: 600;
  color: #555;
  flex-shrink: 0;
}
#vehicle-no-input {
  flex: 1;
  padding: 7px 10px;
  border: 1.5px solid #bdc3c7;
  border-radius: 5px;
  font-size: 13px;
  font-family: inherit;
}
#vehicle-no-input:focus {
  border-color: #3498db;
  outline: none;
}
#vehicle-fuel-select {
  flex: 1;
  padding: 7px 8px;
  border: 1.5px solid #bdc3c7;
  border-radius: 5px;
  font-size: 12px;
  font-family: inherit;
  background: #fff;
}
#vehicle-fuel-select:focus { border-color: #3498db; outline: none; }
.vehicle-modal-btns {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
#btn-vehicle-confirm {
  padding: 8px 20px;
  background: #27ae60;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
#btn-vehicle-confirm:hover { background: #229954; }
#btn-vehicle-cancel {
  padding: 8px 16px;
  background: #bdc3c7;
  color: #333;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 13px;
}
#btn-vehicle-cancel:hover { background: #95a5a6; }

/* ===== 툴바 차량번호 선택 드롭다운 ===== */
.toolbar-vehicle-label {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #e67e22;
  border-radius: 4px;
  padding: 2px 4px 2px 6px;
  cursor: pointer;
  position: relative;
}
.toolbar-vehicle-icon {
  font-size: 13px;
  line-height: 1;
}
.toolbar-vehicle-select {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  max-width: 130px;
}
.toolbar-vehicle-select option {
  background: #fff;
  color: #333;
  font-weight: normal;
}

/* ===== 메인 컨텐츠 ===== */
#main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

/* ===== 메인 탭 (거래명세서 / 외상장부) ===== */
#main-tabs {
  display: flex;
  gap: 0;
  background: #1a252f;
  padding: 0 12px;
  border-bottom: 2px solid #2980b9;
  flex-shrink: 0;
}
.main-tab {
  padding: 9px 22px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: #95a5a6;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
  letter-spacing: 0.5px;
}
.main-tab:hover { color: #ecf0f1; }
.main-tab.active { color: #fff; border-bottom: 3px solid #2980b9; background: rgba(41,128,185,0.12); }

/* ===== 메인 패널 공통 ===== */
.main-panel { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-height: 0; }

/* ===== 외상장부 패널 ===== */
#panel-credit { background: #f4f6f8; overflow: auto; padding: 0; }

#credit-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: #fff;
  border-bottom: 1px solid #ddd;
  flex-shrink: 0;
}
#credit-toolbar h2 { font-size: 16px; font-weight: 700; color: #2c3e50; }
.credit-toolbar-right { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.credit-toolbar-right label { display: flex; align-items: center; gap: 4px; color: #555; }
#credit-year-select { padding: 4px 8px; border: 1px solid #ccc; border-radius: 4px; font-size: 12px; }
#btn-credit-refresh { padding: 5px 12px; background: #27ae60; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 11px; }
#btn-credit-print   { padding: 5px 12px; background: #3498db; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 11px; }

/* 요약 카드 */
#credit-summary-cards {
  display: flex;
  gap: 12px;
  padding: 14px 20px;
  flex-shrink: 0;
}
.credit-card {
  flex: 1;
  background: #fff;
  border-radius: 8px;
  padding: 14px 18px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.credit-card.total  { border-left: 4px solid #2980b9; }
.credit-card.supply { border-left: 4px solid #27ae60; }
.credit-card.tax    { border-left: 4px solid #e67e22; }
.credit-card-label { font-size: 11px; color: #888; font-weight: 500; }
.credit-card-value { font-size: 18px; font-weight: 800; color: #2c3e50; }

/* 외상장부 테이블 */
#credit-table-wrapper { flex: 1; overflow: auto; padding: 0 20px 20px; }
#credit-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  font-size: 13px;
  border-radius: 6px;
  overflow: hidden;
}
#credit-table th {
  background: #2c3e50;
  color: #fff;
  font-weight: 600;
  padding: 10px 14px;
  text-align: center;
  font-size: 12px;
  white-space: nowrap;
}
#credit-table td {
  padding: 8px 14px;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
}
#credit-table tbody tr:hover { background: #f0f7ff; }
#credit-table tbody tr.company-header-row td {
  background: #ddeeff;
  font-weight: 700;
  color: #1a3a5c;
  border-top: 3px solid #2980b9;
  border-bottom: 1px solid #aed6f1;
  font-size: 13px;
}
#credit-table tbody tr.sheet-row td {
  background: #fff;
  font-size: 12px;
}
#credit-table tbody tr.sheet-row:hover td {
  background: #f0f7ff;
}
/* 거래처 구분선 행 */
#credit-table tbody tr.company-sep-row td {
  height: 8px;
  background: #ecf0f1;
  border-top: 2px solid #bdc3c7;
  border-bottom: 2px solid #bdc3c7;
  padding: 0;
}
#credit-table tfoot td {
  background: #2c3e50;
  color: #fff;
  font-weight: 700;
  padding: 10px 14px;
  border-top: 2px solid #1a252f;
}
.credit-amount  { text-align: right; font-weight: 600; color: #154360; }
.credit-supply  { text-align: right; color: #196f3d; }
.credit-tax     { text-align: right; color: #784212; }
.credit-note    { text-align: center; }
.credit-name         { font-weight: 600; }
.credit-sheet        { color: #555; font-size: 11px; }
.credit-zero         { color: #bbb; }
/* 월 라벨 셀 */
.credit-month-indent { width: 14px; padding: 0 !important; }
.credit-month-label  { font-weight: 700; font-size: 12px; color: #555; text-align: center; min-width: 44px; }
.credit-month-active { color: #1a5276 !important; }

/* ===== 외상장부 서브탭 ===== */
#credit-sub-tabs {
  display: flex;
  gap: 0;
  background: #ecf0f1;
  border-bottom: 2px solid #bdc3c7;
  padding: 0 20px;
  flex-shrink: 0;
}
.credit-sub-tab {
  padding: 8px 22px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: #7f8c8d;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
}
.credit-sub-tab:hover  { color: #2c3e50; }
.credit-sub-tab.active { color: #2980b9; border-bottom-color: #2980b9; }

/* ===== 월 선택 바 ===== */
#credit-month-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.month-bar-label {
  font-size: 12px;
  font-weight: 600;
  color: #555;
  white-space: nowrap;
}
#credit-month-btns {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.credit-month-btn {
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #bdc3c7;
  border-radius: 14px;
  background: #fff;
  color: #555;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.credit-month-btn:hover  { background: #d6eaf8; border-color: #2980b9; color: #1a5276; }
.credit-month-btn.active { background: #2980b9; border-color: #2980b9; color: #fff; font-weight: 700; }

/* 공통 뷰 */
.credit-view { flex: 1; overflow: auto; padding: 0 20px 20px; display: flex; flex-direction: column; }

/* 연간/월별 테이블 래퍼 */
#credit-table-wrapper, #credit-monthly-wrapper { flex: 1; overflow: auto; }

/* 연간 거래처 행 */
#credit-table tbody tr.company-annual-row td {
  background: #fff;
  font-size: 13px;
}
#credit-table tbody tr.company-annual-row:hover td {
  background: #f0f7ff;
}

/* 월별 테이블 — 연간 테이블과 동일한 스타일 공유 */
#credit-monthly-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  font-size: 12px;
}
#credit-monthly-table th {
  background: #2c3e50;
  color: #fff;
  font-weight: 600;
  padding: 9px 10px;
  text-align: center;
  white-space: nowrap;
  font-size: 11px;
  border: 1px solid #34495e;
}
#credit-monthly-table th.month-col { background: #1a252f; font-size: 12px; }
#credit-monthly-table td {
  padding: 7px 10px;
  border: 1px solid #e8e8e8;
  vertical-align: middle;
  white-space: nowrap;
}
#credit-monthly-table tr.monthly-total-row td {
  background: #d6eaf8;
  font-weight: 700;
  border-top: 2px solid #2980b9;
}
#credit-monthly-table tfoot td {
  background: #2c3e50;
  color: #fff;
  font-weight: 700;
  padding: 9px 10px;
  border: 1px solid #34495e;
}
#credit-monthly-table tr:hover:not(.monthly-total-row) td { background: #f0f7ff; }

/* 유종별 셀 */
.fuel-col-amount  { text-align: right; color: #154360; font-weight: 600; padding-right: 8px !important; }
.fuel-col-qty     { text-align: right; color: #555; font-weight: 500; padding-right: 6px !important; }
.fuel-col-qty-head{ text-align: right; color: #1a5276; font-weight: 600; font-size: 11px; padding-right: 6px !important; }
.fuel-col-supply  { text-align: right; color: #1d6a3a; font-weight: 600; padding-right: 6px !important; background: #f0faf4 !important; }
.fuel-col-tax     { text-align: right; color: #7d5a00; font-weight: 600; padding-right: 6px !important; background: #fffbf0 !important; }
.fuel-col-empty   { text-align: center; color: #ccc; }
.credit-note-cell { font-size: 10px; color: #555; max-width: 200px; white-space: normal; line-height: 1.4; }

/* 거래처별 뷰 - 유종 그룹 헤더 */
.fuel-th-group {
  background: #1f618d !important;
  color: #fff !important;
  border-left: 2px solid #154360 !important;
  border-right: 2px solid #154360 !important;
  text-align: center !important;
  font-size: 11px !important;
}
.fuel-th { background: #2e86c1 !important; color: #fff !important; }
.fuel-th-sub { background: #2980b9 !important; color: #fff !important; font-size: 10px !important; font-weight: 600 !important; }
/* 공급가액 서브헤더: 녹색 계열 */
.fuel-th-supply { background: #1e8449 !important; color: #fff !important; }
/* 세액 서브헤더: 황금 계열 */
.fuel-th-tax    { background: #b7950b !important; color: #fff !important; }

/* 월별 뷰 - 거래처 그룹 헤더 */
.monthly-company-header {
  background: #34495e !important;
  color: #fff !important;
  border-right: 2px solid #1a252f !important;
  font-size: 12px !important;
}
.monthly-total-header { background: #1a252f !important; color: #fff !important; }

/* 비고란에 유종 정보 표시 강조 */
.credit-note-fuel-main { color: #1a5276; font-weight: 700; }
.credit-note-fuel-other { color: #196f3d; }

/* ===== 인쇄: 외상장부 ===== */
@media print {
  /* 거래명세서 인쇄 시 외상장부 패널 완전 숨김 */
  #panel-credit { display: none !important; }
  #main-tabs, #credit-toolbar, #credit-summary-cards, #credit-sub-tabs,
  #credit-month-bar, #fuel-summary-actions, .row-resize-handle { display: none !important; }
  /* 차량번호 관련 UI 인쇄 숨김 */
  #vehicle-panel, .toolbar-vehicle-label, #vehicle-modal { display: none !important; }
}

/* ===== 툴바 ===== */
#toolbar { background: #fff; border-bottom: 1px solid #ccc; padding: 8px 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.toolbar-left { display: flex; align-items: center; gap: 8px; }
.toolbar-title { font-weight: 700; font-size: 14px; color: #2c3e50; }
#company-name-input { padding: 5px 8px; border: 1px solid #ccc; border-radius: 4px; font-size: 12px; width: 160px; }
#btn-save-name { padding: 5px 10px; background: #27ae60; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 11px; }
.toolbar-right { display: flex; gap: 5px; flex-wrap: wrap; }
.toolbar-right button { padding: 5px 9px; font-size: 11px; border: none; border-radius: 4px; cursor: pointer; font-weight: 500; }
.btn-edit { background: #3498db; color: white; }
.btn-edit:hover { background: #2980b9; }
.btn-merge { background: #e67e22; color: white; }
.btn-merge:hover { background: #d35400; }
.btn-split { background: #95a5a6; color: white; }
.btn-split:hover { background: #7f8c8d; }
.btn-preview { background: #9b59b6; color: white; }
.btn-preview:hover { background: #8e44ad; }
.btn-print { background: #27ae60; color: white; }
.btn-print:hover { background: #229954; }
.btn-pdf { background: #e74c3c; color: white; }
.btn-pdf:hover { background: #c0392b; }

/* ===== 시트 탭 ===== */
#sheet-tabs { background: #f0f0f0; border-bottom: 1px solid #ccc; display: flex; align-items: center; padding: 0 8px; overflow-x: auto; white-space: nowrap; }
#tab-list { display: flex; gap: 2px; }
.sheet-tab { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; font-size: 11px; border: 1px solid #ccc; border-bottom: none; border-radius: 4px 4px 0 0; cursor: pointer; background: #e8e8e8; }
.sheet-tab.active { background: #fff; border-bottom: 1px solid #fff; margin-bottom: -1px; font-weight: 600; }
.sheet-tab .del-tab { color: #e74c3c; font-size: 13px; padding: 0 2px; display: none; }
.sheet-tab:hover .del-tab { display: inline; }
#btn-add-sheet { padding: 5px 10px; margin-left: 8px; background: #27ae60; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 11px; }

/* ===== 편집 패널 ===== */
#edit-panel { background: #fef9e7; border-bottom: 1px solid #f0ca4d; padding: 6px 12px; display: flex; flex-direction: column; gap: 5px; }
.panel-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.panel-row > label { font-size: 11px; font-weight: 600; color: #7d6608; min-width: 80px; }
.panel-item { display: flex; align-items: center; gap: 4px; }
.panel-item .sub-label { font-size: 10px; color: #555; }
.col-width-row { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.col-width-item { display: flex; align-items: center; gap: 2px; font-size: 10px; }
.col-width-item label { color: #555; white-space: nowrap; }
.col-width-item input { width: 52px; padding: 2px 4px; border: 1px solid #ccc; border-radius: 3px; font-size: 10px; }

/* 날짜 형식 선택 */
.panel-date-format { border-left: 1px solid #e0c84d; padding-left: 10px; margin-left: 4px; }
#date-format-select {
  padding: 2px 6px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 11px;
  background: #fff;
  cursor: pointer;
  color: #333;
}
#date-format-select:focus { outline: 1px solid #e67e22; border-color: #e67e22; }
/* 날짜 셀 스타일 */
#items-table td.date-cell { text-align: center; color: #1a3a5c; }

/* ===== 단위 드롭다운 ===== */
#items-table td.unit-cell {
  padding: 0;
  text-align: center;
}
.unit-select {
  width: 100%;
  height: 100%;
  min-height: 22px;
  border: none;
  background: transparent;
  font-size: 11px;
  font-family: inherit;
  text-align: center;
  text-align-last: center;   /* Firefox 가운데 정렬 */
  cursor: pointer;
  outline: none;
  appearance: none;          /* 기본 화살표 제거 */
  -webkit-appearance: none;
  padding: 0 2px;
  color: #1a1a1a;
}
.unit-select:focus { background: #e8f4ff; }
/* 인쇄 시 select 테두리·배경 숨김 */
@media print {
  .unit-select {
    -webkit-appearance: none;
    appearance: none;
    border: none !important;
    background: transparent !important;
    font-size: 10px;
  }
}

/* ===== 품명(name) 셀 드롭다운 ===== */
#items-table td.name-cell {
  padding: 0;
  text-align: center;
}
.name-select {
  width: 100%;
  height: 100%;
  min-height: 22px;
  border: none;
  background: transparent;
  font-size: inherit;
  font-family: inherit;
  text-align: center;
  text-align-last: center;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  padding: 0 4px;
  color: #1a1a1a;
}
.name-select:focus { background: #e8f4ff; }
/* 빈 값(선택 없음) → 회색 플레이스홀더 느낌 */
.name-select option[value=""] { color: #aaa; }
@media print {
  .name-select {
    -webkit-appearance: none;
    appearance: none;
    border: none !important;
    background: transparent !important;
  }
}

/* ===== 차량번호 선택 셀 (car_select 타입) ===== */
.car-select-cell {
  padding: 0 !important;
  text-align: center;
}
.car-select {
  width: 100%;
  height: 100%;
  min-height: 22px;
  border: none;
  background: transparent;
  font-size: inherit;
  font-family: inherit;
  text-align: center;
  text-align-last: center;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  padding: 0 2px;
  color: #1a1a1a;
}
.car-select:focus { background: #fff8e8; }
.car-select option[value=""] { color: #aaa; }
@media print {
  .car-select {
    -webkit-appearance: none;
    appearance: none;
    border: none !important;
    background: transparent !important;
  }
}

/* ===== 문서 스크롤 래퍼 ===== */
#doc-wrapper {
  flex: 1;
  overflow: auto;
  padding: 20px;
  background: #d0d0d0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ===== A4 문서 ===== */
#document-area {
  width: 794px;
  min-height: 1123px;
  background: white;
  margin: 0 auto;
  padding: 14px 16px;  /* 기본값, applyPageMargin()이 override */
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
  position: relative;
}

/* ===== 페이지 반복 헤더 행 ===== */
#items-tbody tr.page-repeat-header td {
  background: #e8edf2 !important;
  font-weight: 700;
  font-size: 10px;
  text-align: center;
  border: 1px solid #aaa !important;
  color: #1a2a3a;
  padding: 3px 2px;
  cursor: default;
}

/* ===== 페이지 spacer 행 (여백) ===== */
#items-tbody tr.page-spacer-row td {
  background: #f8f8f8 !important;
  border-left: 1px solid #ccc !important;
  border-right: 1px solid #ccc !important;
  border-top: none !important;
  border-bottom: 2px dashed #e74c3c !important;
}
/* 페이지 상·하단 여백 행 — 흰 배경, 테두리 없음 */
#items-tbody tr.page-bottom-margin td,
#items-tbody tr.page-top-margin td {
  background: white !important;
  border: none !important;
}

/* ===== 페이지 구분선 ===== */
.page-break-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  border-top: 2px dashed #e74c3c;
  z-index: 10;
  pointer-events: none;
}
.page-break-line::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: -8px;
  height: 14px;
  background: rgba(231,76,60,0.06);
}
.page-break-label {
  position: absolute;
  right: 6px;
  top: -18px;
  background: #e74c3c;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  white-space: nowrap;
  pointer-events: none;
  letter-spacing: 0.3px;
}

/* ===== 거래명세서 제목 (최상단 단독 줄) ===== */
#doc-title-row {
  text-align: center;
  padding: 8px 0 6px;
  border-bottom: 2px solid #000;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
#doc-title {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 12px;
  color: #000;
  font-family: '궁서', 'GungsuhChe', 'Gungsuh', serif;
}
/* #doc-subtitle 제거됨 */

/* ===== 상단 정보 영역 ===== */
#doc-top {
  display: flex;
  gap: 0;
  border: 1.5px solid #000;
  margin-bottom: 6px;
  min-height: 110px;
}

/* 공급받는자 영역 - 정확히 50% */
#receiver-section {
  width: 50%;
  flex: 0 0 50%;
  padding: 10px 14px;
  border-right: 1.5px solid #000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
  box-sizing: border-box;
}
#receiver-date-row { font-size: 13px; text-align: left; }
.date-part { cursor: pointer; border-bottom: 1px solid #999; min-width: 30px; display: inline-block; text-align: center; }
.date-part:hover { background: #e8f4f8; }
#receiver-name-row { font-size: 16px; font-weight: 700; text-align: left; border-bottom: 1.5px solid #000; padding-bottom: 5px; }
.guiha { font-weight: 700; }
#receiver-confirm-row { font-size: 11px; color: #444; text-align: left; }
#receiver-vehicle-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  margin-top: 3px;
  padding: 2px 0;
}
.vehicle-row-label {
  font-weight: 600;
  color: #555;
  font-size: 11px;
}
#recv-vehicle-no {
  font-weight: 700;
  font-size: 12px;
  color: #2c3e50;
}
.vehicle-fuel-tag {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 8px;
  font-weight: 600;
  background: #7f8c8d;
  color: #fff;
}

/* 공급자 영역 - 정확히 50% */
#supplier-section {
  display: flex;
  width: 50%;
  flex: 0 0 50%;
  box-sizing: border-box;
}

/* 공급자 세로 글씨 - 확실한 세로 표시 */
#supplier-vertical-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 26px;
  min-width: 26px;
  background: #f0f0f0;
  border-right: 1px solid #888;
  font-weight: 700;
  font-size: 13px;
  padding: 6px 0;
  gap: 0;
}
#supplier-vertical-label span {
  display: block;
  width: 100%;
  text-align: center;
  line-height: 1.8;
  font-size: 13px;
  font-weight: 700;
}

#supplier-table { flex: 1; border-collapse: collapse; font-size: 11px; }
#supplier-table td { border: 0.5px solid #aaa; padding: 4px 6px; }
.supplier-label { background: #f0f0f0; font-weight: 700; white-space: nowrap; width: 54px; text-align: center; font-size: 10px; }
.supplier-value { background: #fff; }

/* ===== 합계 금액 섹션 ===== */
#total-section {
  border: 1.5px solid #000;
  display: flex;
  align-items: stretch;
  margin-bottom: 4px;
  min-height: 72px;
}
#total-label-block {
  background: #e8e8e8;
  border-right: 1.5px solid #000;
  padding: 6px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 100px;
  gap: 5px;
}
.total-main-label {
  font-family: '궁서', 'GungsuhChe', 'Gungsuh', serif;
  font-weight: 900;
  font-size: 20px;
  white-space: nowrap;
  letter-spacing: 3px;
  color: #1a1a1a;
}
.total-sub-label {
  font-family: '궁서', 'GungsuhChe', 'Gungsuh', serif;
  font-size: 11px;
  color: #333;
  white-space: nowrap;
  font-weight: 700;
  background: #d0d0d0;
  padding: 2px 7px;
  border-radius: 3px;
  letter-spacing: 1px;
}
/* 합계 금액 오른쪽: 한글+원 (위) / ￦숫자 (아래) */
#total-amount-block {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  padding: 6px 18px;
  gap: 4px;
}
#total-hangul-row {
  display: flex;
  align-items: baseline;
  gap: 3px;
  justify-content: flex-end;
}
#total-hangul-text {
  font-family: '궁서', 'GungsuhChe', 'Gungsuh', serif;
  font-size: 22px;
  font-weight: 700;
  color: #000;
  letter-spacing: 1px;
  white-space: nowrap;
}
#total-won-text {
  font-family: '궁서', 'GungsuhChe', 'Gungsuh', serif;
  font-size: 22px;
  font-weight: 700;
  color: #000;
  white-space: nowrap;
}
#total-number-row {
  display: flex;
  justify-content: flex-end;
}
#total-number-text {
  font-family: '궁서', 'GungsuhChe', 'Gungsuh', serif;
  font-size: 16px;
  font-weight: 900;
  color: #1a1a1a;
  letter-spacing: 1px;
  white-space: nowrap;
}

/* ===== 리사이저 바 ===== */
#col-resizer-bar {
  display: flex;
  height: 7px;
  background: #d0e8ff;
  cursor: col-resize;
  position: relative;
  border: 1px solid #a8ccee;
  margin-bottom: 0;
}
.col-resize-handle {
  position: absolute;
  top: 0; bottom: 0;
  width: 6px;
  background: #2980b9;
  cursor: col-resize;
  z-index: 10;
  transform: translateX(-3px);
  border-radius: 2px;
}
.col-resize-handle:hover, .col-resize-handle.dragging { background: #e74c3c; }

/* ===== 품목 테이블 ===== */
#table-scroll-wrapper {
  overflow: hidden;   /* 테이블 테두리가 래퍼 밖으로 삐져나오지 않게 */
  width: 100%;
}
#items-table {
  border-collapse: collapse;
  width: 100%;   /* document-area 내부 폭에 딱 맞춤 */
  table-layout: fixed;
  box-sizing: border-box;
}
#items-table th, #items-table td {
  border: 1px solid #888;
  padding: 2px 4px;
  font-size: 11px;
  vertical-align: middle;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-align: center;
}
/* 비고 열 - 줄바꿈 허용, overflow hidden으로 끝선 맞춤 */
#items-table td[data-key="note"] {
  white-space: normal;
  word-break: break-word;
  overflow: hidden;        /* 끝선이 삐져나오지 않게 */
  text-overflow: clip;
  text-align: left;
  padding: 2px 5px;
}
#items-table th {
  background: #e8e8e8;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  position: relative;
}
#items-table th.selected-col-header { background: #bde0ff; }
#items-table td.editable-cell { cursor: text; }
#items-table td.editable-cell:focus { outline: 2px solid #2980b9; background: #e8f4ff; }
#items-table td.selected-for-merge { background: #ffe0b2 !important; outline: 2px solid #e67e22; }
#items-table td.merge-mode-active { cursor: crosshair !important; }
#items-table td.number-cell { text-align: right; padding-right: 5px; }
/* 금액 수동 입력 셀 — 연한 노란 배경으로 구분 */
#items-table td[data-manual="true"] { background: #fffbe6; }
#items-table td[data-manual="true"]:focus { outline: 2px solid #f39c12; background: #fff3cd; }

/* 행 리사이저 핸들 */
.row-resize-handle {
  display: block;
  height: 4px;
  background: transparent;
  cursor: row-resize;
  position: absolute;
  bottom: 0; left: 0; right: 0;
}
.row-resize-handle:hover { background: #2980b9; }
#items-table td { position: relative; }

/* ===== 유류 합계 섹션 ===== */
#fuel-summary-section {
  margin-top: 6px;
  border: 1.5px solid #000;
}
#fuel-summary-table { border-collapse: collapse; width: 100%; }
#fuel-summary-table th, #fuel-summary-table td {
  border: 1px solid #888;
  padding: 4px 8px;
  font-size: 11px;
  text-align: center;
}
#fuel-summary-table th { background: #e8e8e8; font-weight: 700; }
.fuel-label { background: #f5f5f5; font-weight: 600; position: relative; }
.fuel-qty, .fuel-amount { text-align: right; padding-right: 8px; }
.del-fuel-row {
  display: none;
  position: absolute;
  right: 4px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  color: #e74c3c; cursor: pointer;
  font-size: 12px; padding: 0 2px;
}
tr:hover .del-fuel-row { display: inline-block; }
.fuel-label-edit { cursor: pointer; }
.fuel-label-edit:hover { text-decoration: underline; color: #2980b9; }
#fuel-summary-actions {
  display: flex; gap: 8px;
  padding: 5px 8px;
  background: #fafafa;
  border-top: 1px solid #ccc;
}
#fuel-summary-actions button {
  padding: 4px 10px; font-size: 11px;
  border: none; border-radius: 3px; cursor: pointer;
}
#btn-add-fuel-row { background: #27ae60; color: white; }
#btn-auto-calc-fuel { background: #3498db; color: white; }

/* ===== 병합 가이드 ===== */
#merge-guide {
  position: fixed; top: 60px; left: 50%;
  transform: translateX(-50%);
  z-index: 200; pointer-events: none;
}
#merge-guide-box {
  background: #fff3cd; border: 2px solid #e67e22;
  border-radius: 8px; padding: 10px 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  text-align: center; display: flex; align-items: center; gap: 12px;
  pointer-events: all;
}
#merge-guide-box p { margin: 0; font-size: 13px; font-weight: 600; color: #d35400; }
#merge-guide-box button { padding: 6px 14px; border: none; border-radius: 4px; cursor: pointer; font-size: 12px; }
#btn-do-merge { background: #e67e22; color: white; }
#btn-cancel-merge { background: #95a5a6; color: white; }
#document-area.merge-mode { outline: 3px dashed #e67e22; }

/* ===== 모달 ===== */
.modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 300; display: flex; align-items: center; justify-content: center; }
.modal-box { background: white; border-radius: 8px; padding: 20px 24px; min-width: 320px; max-width: 500px; box-shadow: 0 4px 20px rgba(0,0,0,0.3); }
.modal-box h3 { margin-bottom: 12px; font-size: 15px; }
.modal-box p { font-size: 12px; color: #555; margin-bottom: 12px; }
#del-col-checkboxes { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
#del-col-checkboxes label { display: flex; align-items: center; gap: 4px; font-size: 12px; background: #f5f5f5; padding: 4px 8px; border-radius: 4px; cursor: pointer; }
.modal-btns { display: flex; gap: 8px; justify-content: flex-end; }
.modal-btns button { padding: 7px 16px; border: none; border-radius: 4px; cursor: pointer; }
#btn-confirm-del-col { background: #e74c3c; color: white; }
#btn-cancel-del-col, #btn-close-template-modal { background: #95a5a6; color: white; }
#template-name-input { padding: 6px 10px; border: 1px solid #ccc; border-radius: 4px; margin: 0 8px; font-size: 12px; width: 180px; }
#btn-confirm-template-save { padding: 6px 12px; background: #27ae60; color: white; border: none; border-radius: 4px; cursor: pointer; }
#template-list { list-style: none; margin: 10px 0; max-height: 200px; overflow-y: auto; }
#template-list li { padding: 6px 10px; border: 1px solid #ddd; border-radius: 4px; margin-bottom: 6px; display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
#template-list li button { padding: 3px 8px; font-size: 11px; border: none; border-radius: 3px; cursor: pointer; }
.btn-load-template { background: #3498db; color: white; }
.btn-del-template { background: #e74c3c; color: white; margin-left: 4px; }

/* ===== 인쇄 미리보기 ===== */
#preview-modal {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  z-index: 400; display: flex; flex-direction: column; align-items: center;
}
#preview-overlay {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.88);
}
#preview-container {
  position: relative; z-index: 10;
  display: flex; flex-direction: column; align-items: center;
  width: 100%; height: 100%; overflow: auto; padding: 12px 16px;
  gap: 10px;
}
#preview-toolbar {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 10px;
  background: #2c3e50; color: white;
  padding: 8px 18px; border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  width: 794px; box-sizing: border-box;
}
#preview-scale-info { font-size: 12px; color: #adb5bd; flex: 1; }
#preview-toolbar button {
  padding: 6px 16px; font-size: 12px; font-weight: 600;
  border: none; border-radius: 5px; cursor: pointer; transition: opacity 0.15s;
}
#preview-toolbar button:hover { opacity: 0.85; }
#btn-preview-print { background: #27ae60; color: white; }
#btn-preview-close { background: #7f8c8d; color: white; }
/* A4 미리보기 프레임 */
#preview-a4 {
  flex-shrink: 0;
  background: white;
  width: 794px;
  height: 1123px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
}
#preview-a4 iframe {
  width: 100%; height: 100%; border: none; display: block;
}
/* 구버전 호환: preview-content 클론 방식 (미사용) */
#preview-content { transform-origin: top left; }

/* ===== PDF 미리보기 모달 ===== */
#pdf-preview-modal {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  z-index: 500; display: flex; align-items: center; justify-content: center;
}
#pdf-preview-overlay {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.90);
}
#pdf-preview-container {
  position: relative; z-index: 10;
  display: flex; flex-direction: column; align-items: center;
  width: 100%; height: 100%; overflow: hidden;
  padding: 12px 16px; gap: 10px;
}
#pdf-preview-toolbar {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 10px;
  background: #1a252f; color: white;
  padding: 8px 18px; border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
  width: 100%; max-width: 860px; box-sizing: border-box;
}
#pdf-preview-info { font-size: 13px; color: #ecf0f1; flex: 1; font-weight: 600; }
#pdf-preview-toolbar button {
  padding: 7px 18px; font-size: 12px; font-weight: 700;
  border: none; border-radius: 5px; cursor: pointer;
  transition: opacity 0.15s;
}
#pdf-preview-toolbar button:hover { opacity: 0.85; }
#btn-pdf-preview-save  { background: #e74c3c; color: white; }
#btn-pdf-preview-close { background: #7f8c8d; color: white; }
/* 스크롤 영역 */
#pdf-preview-scroll {
  flex: 1; overflow: auto; width: 100%;
  display: flex; justify-content: center;
  padding: 0 0 20px;
}
/* 실제 미리보기 페이지 — canvas/img 들어가는 영역 */
#pdf-preview-page {
  background: white;
  box-shadow: 0 4px 24px rgba(0,0,0,0.55);
  display: block;
  /* 크기는 JS에서 동적 설정 */
}
#pdf-preview-page img {
  display: block; width: 100%; height: auto;
}

/* ===== PDF 미리보기 버튼 (툴바) ===== */
.btn-pdf-preview {
  padding: 5px 10px; font-size: 11px; font-weight: 600;
  border: none; border-radius: 4px; cursor: pointer;
  background: #8e44ad; color: white;
}
.btn-pdf-preview:hover { background: #7d3c98; }

/* ===================================================
   글꼴 서식 툴바 팝업  #font-toolbar
=================================================== */
#font-toolbar {
  position: fixed;
  z-index: 99999;
  background: #fff;
  border: 1px solid #c0c8d4;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.18);
  padding: 5px 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  user-select: none;
  min-width: 0;
}
#font-toolbar select {
  height: 26px;
  border: 1px solid #d0d8e0;
  border-radius: 4px;
  font-size: 11px;
  padding: 0 4px;
  background: #f8fafc;
  cursor: pointer;
  outline: none;
  color: #2c3e50;
}
#ft-font-family { width: 110px; }
#ft-font-size   { width: 52px; }
#font-toolbar select:hover { border-color: #3498db; }

.ft-btn {
  width: 26px; height: 26px;
  border: 1px solid #d0d8e0;
  border-radius: 4px;
  background: #f8fafc;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  color: #2c3e50;
  transition: background 0.12s, border-color 0.12s;
  flex-shrink: 0;
}
.ft-btn:hover  { background: #e3eeff; border-color: #3498db; }
.ft-btn.active { background: #d0e8ff; border-color: #2980b9; color: #1a5276; }

.ft-divider {
  width: 1px; height: 20px;
  background: #d0d8e0;
  margin: 0 2px;
  flex-shrink: 0;
}

/* 색상 버튼 */
.ft-color-label {
  position: relative;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px;
  border: 1px solid #d0d8e0;
  border-radius: 4px;
  background: #f8fafc;
  flex-shrink: 0;
  overflow: hidden;
}
.ft-color-label:hover { border-color: #3498db; background: #e3eeff; }
.ft-color-icon {
  font-size: 13px; font-weight: 700; pointer-events: none;
  color: #2c3e50;
}
.ft-bg-icon { color: #e67e22; }
.ft-color-label input[type="color"] {
  position: absolute;
  opacity: 0;
  width: 100%; height: 100%;
  top: 0; left: 0;
  cursor: pointer;
  border: none; padding: 0;
}

/* ===== 편집 가능 요소 ===== */
.editable { cursor: pointer; min-width: 20px; display: inline-block; border-bottom: 1px dashed #aaa; }
.editable:hover { background: #e8f4ff; border-bottom-color: #3498db; }
.editable.editing { border: 1px solid #2980b9; background: #fff; outline: none; padding: 1px 3px; }

/* ===== 인쇄 스타일 ===== */
@media print {
  *, *::before, *::after {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    box-sizing: border-box !important;
  }
  @page { size: A4 portrait; margin: 8mm; }
  body { background: white !important; display: block; margin: 0; padding: 0; }
  /* UI 요소 숨김 */
  #sidebar, #toolbar, #sheet-tabs, #edit-panel, #main-tabs,
  #col-resizer-bar, .row-resize-handle, #fuel-summary-actions,
  #merge-guide, .modal, #preview-modal, #pdf-preview-modal,
  .del-fuel-row, .fuel-label-edit,
  .page-break-line, .page-break-label,
  #cell-context-menu, #font-toolbar { display: none !important; }
  /* spacer 행 인쇄 시 점선 제거 */
  #items-tbody tr.page-spacer-row td {
    border-bottom: none !important;
    background: white !important;
  }
  /* 상·하단 여백 행 인쇄 시 배경 흰색, 테두리 없음 */
  #items-tbody tr.page-bottom-margin td,
  #items-tbody tr.page-top-margin td {
    background: white !important;
    border: none !important;
  }
  /* 반복 헤더 행 인쇄 시도 배경/테두리 유지 */
  #items-tbody tr.page-repeat-header td {
    background: #e8edf2 !important;
    border: 1px solid #000 !important;
    font-weight: 700 !important;
  }
  #main-content { display: block; }
  #doc-wrapper { padding: 0; overflow: visible; background: white; }
  /* 문서 영역: 용지 전체 너비 – zoom 리셋 */
  #document-area {
    margin: 0 !important;
    padding: 3mm 4mm !important;
    box-shadow: none !important;
    width: 100% !important;
    min-height: auto !important;
    background: white !important;
    transform: none !important;
  }
  /* 견적서도 동일 */
  #quote-document-area {
    transform: none !important;
  }
  /* 테이블 래퍼 — overflow:hidden으로 비고 끝선 클립 */
  #table-scroll-wrapper {
    overflow: hidden !important;
    width: 100% !important;
  }
  /* 품목 테이블 */
  #items-table {
    width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
  }
  /* 모든 셀 */
  #items-table th, #items-table td {
    border: 1px solid #000 !important;
    padding: 2px 3px !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
  }
  /* 비고 열: 줄바꿈 허용하되 셀 넘침 방지 */
  #items-table td[data-key="note"] {
    white-space: normal !important;
    word-break: break-word !important;
    overflow: hidden !important;
    text-overflow: clip !important;
    text-align: left !important;
  }
  /* 상단/합계/유류 영역 테두리 */
  #doc-top { border: 1.5px solid #000 !important; display: flex !important; }
  #total-section { border: 1.5px solid #000 !important; display: flex !important; min-height: 72px !important; }
  #total-amount-block { display: flex !important; flex-direction: column !important; align-items: flex-end !important; padding: 6px 18px !important; }
  #total-hangul-row { display: flex !important; align-items: baseline !important; justify-content: flex-end !important; }
  #total-number-row  { display: flex !important; justify-content: flex-end !important; }
  #fuel-summary-section { border: 1.5px solid #000 !important; }
  #supplier-table td { border: 0.5px solid #888 !important; }
  #doc-title-row { border-bottom: 2px solid #000 !important; }
  /* 수신·공급자 영역 50:50 */
  #receiver-section { width: 50% !important; flex: 0 0 50% !important; border-right: 1.5px solid #000 !important; }
  #supplier-section { width: 50% !important; flex: 0 0 50% !important; display: flex !important; }
  /* editable 밑줄 제거 */
  .editable { border-bottom: none !important; }
  /* 단위 select는 텍스트로 표시 */
  select.unit-select { -webkit-appearance: none; appearance: none; border: none !important; background: transparent !important; text-align: center; }
}

/* =====================================================
   견적서 패널
===================================================== */
#panel-quote {
  background: #f0f4f8;
  overflow: hidden;
  flex-direction: column;
}

/* 툴바 */
#quote-toolbar {
  background: #fff;
  border-bottom: 1px solid #ccc;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}
#quote-company-name-input {
  padding: 5px 8px; border: 1px solid #ccc; border-radius: 4px;
  font-size: 12px; width: 160px;
}
#btn-quote-save-name {
  padding: 5px 10px; background: #27ae60; color: white;
  border: none; border-radius: 4px; cursor: pointer; font-size: 11px;
}

/* 시트 탭 */
#quote-sheet-tabs {
  background: #f0f0f0; border-bottom: 1px solid #ccc;
  display: flex; align-items: center; padding: 0 8px;
  overflow-x: auto; white-space: nowrap; flex-shrink: 0;
}
#quote-tab-list { display: flex; gap: 2px; }
#btn-quote-add-sheet {
  padding: 5px 10px; margin-left: 8px; background: #27ae60;
  color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 11px;
}

/* 문서 래퍼 */
#quote-doc-wrapper {
  flex: 1;
  overflow: auto;
  background: #d0d0d0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 문서 영역 (A4) */
#quote-document-area {
  background: #fff;
  width: 794px;
  min-height: 1123px;
  padding: 12px 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-family: 'Noto Sans KR', sans-serif;
}

/* 제목 행 */
#quote-title-row {
  text-align: center;
  border-bottom: 2px solid #000;
  padding: 5px 0 4px;
}
#quote-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 6px;
  color: #1a1a1a;
}

/* 상단 수신자+공급자 영역 */
#quote-doc-top {
  display: flex;
  border: 1.5px solid #333;
  min-height: 130px;
}
#quote-receiver-section {
  flex: 1;
  padding: 8px 12px;
  border-right: 1.5px solid #333;
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
}
#quote-receiver-date-row { font-size: 12px; color: #333; }
#quote-receiver-name-row { font-size: 16px; font-weight: 700; }
#quote-receiver-confirm-row { font-size: 12px; color: #555; margin-top: 4px; }
.q-editable {
  cursor: pointer;
  border-bottom: 1px dashed #aaa;
  min-width: 20px;
  display: inline-block;
  padding: 0 2px;
}
.q-editable:hover { background: #e8f4ff; border-bottom-color: #3498db; }

#quote-supplier-section {
  flex: 1;
  display: flex;
  align-items: stretch;
}
#quote-supplier-vertical-label {
  writing-mode: vertical-rl;
  text-orientation: upright;
  background: #ecf0f1;
  padding: 4px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  border-right: 1px solid #bbb;
}
#quote-supplier-table {
  flex: 1;
  border-collapse: collapse;
  font-size: 11px;
}
#quote-supplier-table td { border: 0.5px solid #bbb; padding: 3px 5px; }
#quote-supplier-table .supplier-label {
  background: #ecf0f1; font-weight: 600;
  width: 56px; text-align: center; color: #444;
}
#quote-supplier-table .supplier-value { color: #222; }
.q-sup-editable { cursor: pointer; }
.q-sup-editable:hover { background: #e8f4ff; }

/* 합계 금액 영역 */
#quote-total-section {
  display: flex;
  border: 1.5px solid #333;
  align-items: stretch;
  min-height: 72px;
}
#quote-total-label-block {
  background: #2c3e50;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 6px 14px;
  min-width: 110px;
  gap: 5px;
}
#quote-total-label-block .total-main-label {
  font-family: '궁서', 'GungsuhChe', 'Gungsuh', serif;
  font-size: 20px; font-weight: 900; letter-spacing: 3px; white-space: nowrap;
  color: #fff;
}
#quote-total-label-block .total-sub-label  {
  font-family: '궁서', 'GungsuhChe', 'Gungsuh', serif;
  font-size: 11px; font-weight: 700;
  background: rgba(255,255,255,0.25); padding: 2px 7px; border-radius: 3px; white-space: nowrap; letter-spacing: 1px;
  color: #fff;
}
#quote-total-amount-block {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  padding: 6px 18px;
  gap: 4px;
}
#quote-total-hangul-row {
  display: flex;
  align-items: baseline;
  gap: 3px;
  justify-content: flex-end;
}
#quote-total-hangul {
  font-family: '궁서', 'GungsuhChe', 'Gungsuh', serif;
  font-size: 22px; font-weight: 700; color: #1a252f;
  letter-spacing: 1px; white-space: nowrap;
}
#quote-total-won {
  font-family: '궁서', 'GungsuhChe', 'Gungsuh', serif;
  font-size: 22px; font-weight: 700; color: #1a252f;
  white-space: nowrap;
}
#quote-total-number-row {
  display: flex;
  justify-content: flex-end;
}
#quote-total-number {
  font-family: '궁서', 'GungsuhChe', 'Gungsuh', serif;
  font-size: 16px; font-weight: 900; color: #1a1a1a;
  letter-spacing: 1px; white-space: nowrap;
}

/* 품목 테이블 래퍼 */
#quote-table-scroll-wrapper {
  overflow-x: auto;
  width: 100%;
}
#quote-items-table {
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 11px;
}
#quote-items-table th {
  background: #2c3e50;
  color: #fff;
  border: 1px solid #555;
  padding: 4px 3px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
}
#quote-items-table td {
  border: 1px solid #bbb;
  padding: 2px 3px;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#quote-items-table td.editable-cell { cursor: text; }
#quote-items-table td.editable-cell:focus { outline: 2px solid #3498db; background: #eaf4ff; }
#quote-items-table td.number-cell { text-align: right; }
#quote-items-table td.calc-cell {
  font-weight: 600;
  text-align: right;
}
/* 금액 = 수량×단가 → 진한 파랑 */
#quote-items-table td.calc-amount-cell {
  background: #eaf4ff;
  color: #1a3a6b;
}
/* 공급가액 = 금액÷1.1 역산 → 녹색 계열 */
#quote-items-table td.calc-supply-cell {
  background: #f0faf4;
  color: #1d6a3a;
}
/* 세액 = 금액 - 공급가액 → 황금 계열 */
#quote-items-table td.calc-tax-cell {
  background: #fffbf0;
  color: #7d5a00;
}
#quote-items-table td.date-cell { text-align: center; color: #1a3a5c; }

/* 유류 합계 섹션 */
#quote-fuel-section {
  border: 1px solid #bbb;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 4px;
}
#quote-fuel-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
#quote-fuel-table th {
  background: #34495e;
  color: #fff;
  padding: 4px 8px;
  text-align: center;
  font-size: 10px;
  border: none;
}
#quote-fuel-table td {
  border: 1px solid #ddd;
  padding: 3px 8px;
  text-align: center;
}
#quote-fuel-table td.number-cell { text-align: right; padding-right: 10px; }

/* 인쇄 시 견적서 패널 숨김 방지 (별도 창 인쇄 방식 사용) */
@media print {
  #panel-quote { display: none !important; }
}

/* ── 견적서 사이드바 ── */
#sidebar-ledger { display: flex; flex-direction: column; height: 100%; }
#sidebar-quote  { display: flex; flex-direction: column; height: 100%; }
#quote-company-list {
  flex: 1; overflow-y: auto; list-style: none; padding: 4px 0;
}
#quote-company-list li {
  padding: 8px 12px; cursor: pointer; font-size: 12px;
  border-bottom: 1px solid #34495e;
  display: flex; justify-content: space-between; align-items: center;
}
#quote-company-list li:hover { background: #34495e; }
#quote-company-list li.active { background: #2980b9; }
#quote-company-list li .del-company {
  color: #e74c3c; font-size: 14px; cursor: pointer; padding: 0 4px; display: none;
}
#quote-company-list li:hover .del-company { display: inline; }
#btn-quote-add-company {
  width: 100%; padding: 7px; background: #27ae60; color: white;
  border: none; border-radius: 4px; cursor: pointer; font-size: 12px;
}
#btn-quote-add-company:hover { background: #229954; }
#quote-company-search {
  width: 100%; padding: 6px 8px; border-radius: 4px; border: none; font-size: 12px;
}

/* ── 견적서 PDF 미리보기 모달 ── */
#quote-pdf-preview-modal {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; align-items: center; justify-content: center;
}
#quote-pdf-preview-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,0.75);
}
#quote-pdf-preview-container {
  position: relative; z-index: 1;
  background: #1a1a2e; border-radius: 8px;
  display: flex; flex-direction: column;
  width: 860px; max-width: 96vw;
  height: 90vh; overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}
#quote-pdf-preview-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; background: #16213e; border-bottom: 1px solid #2a2a4a;
  flex-shrink: 0;
}
#quote-pdf-preview-info { color: #a9c1e8; font-size: 13px; font-weight: 600; }
#quote-pdf-preview-toolbar button {
  padding: 6px 14px; border: none; border-radius: 4px;
  cursor: pointer; font-size: 12px; font-weight: 600; margin-left: 8px;
}
#btn-quote-pdf-preview-save  { background: #e74c3c; color: #fff; }
#btn-quote-pdf-preview-save:hover  { background: #c0392b; }
#btn-quote-pdf-preview-close { background: #555; color: #fff; }
#btn-quote-pdf-preview-close:hover { background: #333; }
#quote-pdf-preview-scroll {
  flex: 1; overflow-y: auto; padding: 24px;
  display: flex; justify-content: center; align-items: flex-start;
  background: #0f3460;
}

/* ===== 줌 버튼 ===== */
.btn-zoom {
  padding: 5px 9px;
  background: #7f8c8d;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
}
.btn-zoom:hover { background: #636e72; }

/* ===== 툴바 글자체 선택 ===== */
.toolbar-font-label {
  display: flex;
  align-items: center;
  gap: 3px;
  background: #8e44ad;
  border-radius: 4px;
  padding: 0 6px 0 8px;
  height: 28px;
  cursor: pointer;
  border: none;
  flex-shrink: 0;
}
.toolbar-font-label:hover { background: #7d3c98; }
.toolbar-font-icon {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  pointer-events: none;
  line-height: 1;
}
.toolbar-font-select {
  height: 24px;
  border: none;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  background: #fff;
  color: #2c3e50;
  cursor: pointer;
  outline: none;
  padding: 0 4px;
  max-width: 110px;
}
.toolbar-font-select:focus { outline: none; }

/* 문서 영역 zoom transform 시 wrapper 대응 */
#doc-wrapper, #quote-doc-wrapper {
  /* 확대된 콘텐츠가 잘리지 않도록 overflow 유지 */
}

/* ===== 셀 우클릭 컨텍스트 메뉴 ===== */
#cell-context-menu {
  position: fixed;
  z-index: 99999;
  background: #fff;
  border: 1px solid #bbb;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  min-width: 160px;
  padding: 4px 0;
  font-size: 13px;
  font-family: 'Noto Sans KR', sans-serif;
}
#cell-context-menu ul {
  list-style: none;
  margin: 0; padding: 0;
}
#cell-context-menu li {
  padding: 7px 16px;
  cursor: pointer;
  white-space: nowrap;
  color: #222;
  transition: background 0.1s;
}
#cell-context-menu li:hover {
  background: #e8f4ff;
  color: #2980b9;
}
#cell-context-menu .ctx-divider {
  height: 1px;
  background: #e0e0e0;
  margin: 3px 0;
  padding: 0;
  cursor: default;
}
#cell-context-menu .ctx-divider:hover {
  background: #e0e0e0;
  color: inherit;
}

/* ================================================================
   📗 장부정리 패널
================================================================ */
#panel-book {
  display: flex;
  flex-direction: row;
  flex: 1;
  overflow: hidden;
  background: #f4f6f8;
  min-height: 0;
}

/* ── 왼쪽 사이드바 ── */
#book-sidebar {
  width: 220px;
  min-width: 220px;
  background: #2c3e50;
  color: #ecf0f1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  flex-shrink: 0;
}

.book-sidebar-section {
  border-bottom: 1px solid #34495e;
  padding-bottom: 6px;
}

.book-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 6px;
  font-size: 12px;
  font-weight: 600;
  color: #bdc3c7;
}

.book-sidebar-header button {
  padding: 3px 9px;
  background: #27ae60;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}
.book-sidebar-header button:hover { background: #229954; }

#book-company-search {
  width: calc(100% - 24px);
  margin: 0 12px 6px;
  padding: 5px 8px;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  background: #34495e;
  color: #ecf0f1;
  outline: none;
}
#book-company-search::placeholder { color: #7f8c8d; }

#book-company-list {
  list-style: none;
  padding: 0;
  margin: 0;
  overflow-y: auto;
  max-height: 200px;
}
.book-company-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  font-size: 12px;
  border-bottom: 1px solid #34495e;
  cursor: pointer;
  transition: background 0.12s;
}
.book-company-item:hover  { background: #34495e; }
.book-company-item.active { background: #2980b9; }
.book-company-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.book-del-company {
  background: none; border: none; color: #e74c3c;
  cursor: pointer; font-size: 13px; padding: 0 3px;
  opacity: 0; transition: opacity 0.15s;
}
.book-company-item:hover .book-del-company { opacity: 1; }

/* 차량번호 사이드 섹션 */
#book-vehicle-section .book-sidebar-header button { background: #e67e22; }
#book-vehicle-section .book-sidebar-header button:hover { background: #ca6f1e; }

#book-vehicle-list-wrap { padding: 0 8px; overflow-x: auto; }

#book-vehicle-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  color: #ecf0f1;
  margin-bottom: 4px;
}
#book-vehicle-table th {
  background: #1a252f;
  padding: 4px 6px;
  text-align: center;
  font-weight: 600;
  color: #bdc3c7;
  font-size: 10px;
}
#book-vehicle-table td { padding: 4px 6px; border-bottom: 1px solid #34495e; vertical-align: middle; }
.bvt-no   { font-weight: 600; }
.bvt-fuel   { text-align: center; }
.bvt-actions { text-align: right; white-space: nowrap; }
.bvt-empty  { text-align:center; color:#999; font-size:11px; padding:8px; }
.bvt-fuel-badge {
  display: inline-block;
  font-size: 9px; padding: 1px 5px; border-radius: 8px;
  font-weight: 600; background: #555; color: #fff;
}
.bvf-경유   { background: #2980b9; }
.bvf-휘발유 { background: #27ae60; }
.bvf-등유   { background: #8e44ad; }
.bvf-요소수 { background: #e67e22; }
.bvf-기타   { background: #7f8c8d; }

.bvt-edit, .bvt-del {
  background: none; border: none; cursor: pointer; font-size: 11px;
  padding: 1px 3px; opacity: 0; transition: opacity 0.15s;
}
#book-vehicle-table tr:hover .bvt-edit,
#book-vehicle-table tr:hover .bvt-del { opacity: 1; }
.bvt-del { color: #e74c3c; }

/* 차량 추가 폼 */
#book-vehicle-add-form {
  padding: 8px 10px;
  background: #1e2d3d;
  border-top: 1px solid #34495e;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
#book-vno-input {
  padding: 6px 8px;
  border: 1.5px solid #34495e;
  border-radius: 4px;
  background: #2c3e50;
  color: #ecf0f1;
  font-size: 12px;
  outline: none;
}
#book-vno-input:focus { border-color: #3498db; }
#book-vfuel-select {
  padding: 5px 6px;
  border: 1.5px solid #34495e;
  border-radius: 4px;
  background: #2c3e50;
  color: #ecf0f1;
  font-size: 12px;
  outline: none;
}
#book-vfuel-select:focus { border-color: #3498db; }
.book-vform-btns { display: flex; gap: 6px; }
#btn-book-vconfirm {
  flex: 1; padding: 5px; background: #27ae60; color: #fff;
  border: none; border-radius: 4px; cursor: pointer; font-size: 12px; font-weight: 600;
}
#btn-book-vconfirm:hover { background: #229954; }
#btn-book-vcancel {
  padding: 5px 10px; background: #7f8c8d; color: #fff;
  border: none; border-radius: 4px; cursor: pointer; font-size: 12px;
}
#btn-book-vcancel:hover { background: #636e72; }

/* ── 오른쪽 메인 영역 ── */
#book-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* 툴바 */
#book-toolbar {
  background: #fff;
  border-bottom: 1px solid #ddd;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
}
#book-company-title {
  font-size: 15px;
  font-weight: 700;
  color: #2c3e50;
}
.book-toolbar-right { display: flex; gap: 6px; }
.book-btn {
  padding: 5px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  background: #3498db;
  color: #fff;
  transition: background 0.15s;
}
.book-btn:hover        { background: #2980b9; }
.book-btn-green        { background: #27ae60; }
.book-btn-green:hover  { background: #229954; }
.book-btn-blue         { background: #2980b9; }
.book-btn-blue:hover   { background: #1a6a9a; }
.book-btn-divider      { width:1px; height:20px; background:#ddd; display:inline-block; margin:0 2px; vertical-align:middle; }

/* ── 시트 탭 ── */
#book-sheet-tabs {
  display: flex;
  align-items: center;
  background: #ecf0f1;
  border-bottom: 1px solid #ccc;
  padding: 0 8px;
  overflow-x: auto;
  white-space: nowrap;
  min-height: 34px;
  flex-shrink: 0;
  gap: 2px;
}
#book-tab-list { display: flex; gap: 2px; align-items: center; }
.book-sheet-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  font-size: 12px;
  background: #dde3e8;
  border-radius: 5px 5px 0 0;
  cursor: pointer;
  border: 1px solid #bbb;
  border-bottom: none;
  color: #555;
  user-select: none;
  transition: background 0.12s;
}
.book-sheet-tab:hover  { background: #c8d6e0; }
.book-sheet-tab.active { background: #fff; color: #2c3e50; font-weight: 700; border-color: #aaa; }
.book-tab-del { font-size:11px; color:#bbb; cursor:pointer; padding:0 2px; opacity:0; transition:opacity 0.15s; }
.book-sheet-tab:hover .book-tab-del { opacity:1; }
.book-tab-del:hover { color:#e74c3c; }
.book-sheet-add-btn {
  padding: 3px 10px; margin-left: 6px;
  background: #27ae60; color: #fff;
  border: none; border-radius: 4px;
  cursor: pointer; font-size: 14px; font-weight: 700; flex-shrink: 0;
}
.book-sheet-add-btn:hover { background: #229954; }

/* ── 비고 셀 ── */
.book-memo-cell {
  text-align: left;
  font-size: 12px;
  color: #555;
  cursor: crosshair;
  user-select: none;
}
.book-memo-drag {
  background: #fff3cd !important;
  outline: 1px dashed #f39c12;
}

/* 열 너비 조절 패널 */
#book-col-width-panel {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 8px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}
.book-col-width-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #444;
  background: #f0f4f8;
  border-radius: 4px;
  padding: 3px 8px;
}
.book-col-width-item span {
  min-width: 40px;
  color: #2c3e50;
  font-weight: 600;
}
.book-col-width-item input {
  width: 60px;
  padding: 2px 4px;
  border: 1px solid #bdc3c7;
  border-radius: 3px;
  font-size: 12px;
  text-align: center;
}

/* 표 영역 */
#book-table-wrap {
  flex: 1;
  overflow: auto;
  padding: 12px 14px;
  background: #f4f6f8;
}
#book-table {
  border-collapse: collapse;
  table-layout: fixed;
  background: #fff;
  box-shadow: 0 1px 6px rgba(0,0,0,0.10);
  border-radius: 6px;
  overflow: hidden;
  min-width: max-content;
}
#book-table thead tr {
  background: #2c3e50;
}
#book-table th {
  color: #ecf0f1;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 10px;
  text-align: center;
  white-space: nowrap;
  border-right: 1px solid #34495e;
  user-select: none;
}
#book-table th:last-child { border-right: none; }
#book-table tbody tr { border-bottom: 1px solid #e8ecf0; }
#book-table tbody tr:hover { background: #f0f8ff; }
#book-table td {
  font-size: 12px;
  padding: 3px 6px;
  border-right: 1px solid #e8ecf0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  vertical-align: middle;
  min-height: 26px;
  height: 26px;
}
#book-table td:last-child { border-right: none; }

/* 셀 타입별 */
.book-editable:focus {
  outline: 2px solid #3498db;
  background: #eaf4ff;
}
.book-number-cell { text-align: right; }
.book-total-cell  { text-align: right; font-weight: 700; color: #c0392b; background: #fff5f5; }
.book-fuel-cell,
.book-car-cell    { padding: 0 !important; text-align: center; }

/* 유종/차량번호 select 공통 */
.book-fuel-select,
.book-car-select {
  width: 100%;
  height: 100%;
  min-height: 24px;
  border: none;
  background: transparent;
  font-size: 12px;
  font-family: inherit;
  text-align: center;
  text-align-last: center;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  padding: 0 4px;
  color: #1a1a1a;
}
.book-fuel-select:focus,
.book-car-select:focus { background: #eaf4ff; }
.book-fuel-select option[value=""],
.book-car-select  option[value=""] { color: #aaa; }

/* 인쇄 시 장부정리 숨김 */
@media print {
  #panel-book { display: none !important; }
}
