* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family:
    Pretendard,
    -apple-system,
    BlinkMacSystemFont,
    "Apple SD Gothic Neo",
    "Malgun Gothic",
    sans-serif;
  background: #fcfbf7;
  color: #1e293b;
  font-size: 14px;
  line-height: 1.5;
}
#auth-layer {
  position: fixed;
  inset: 0;
  background: #f4f2ea;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
#auth-layer.hidden {
  display: none;
}
.auth-box {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 40px 36px;
  width: 100%;
  max-width: 380px;
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.05),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}
.auth-logo i {
  font-size: 42px;
  color: #047857;
  margin-bottom: 12px;
}
.auth-logo h2 {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}
.auth-logo p {
  font-size: 13px;
  color: #64748b;
  margin-top: 6px;
}
.auth-field {
  margin-bottom: 20px;
}
.auth-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 8px;
}
.auth-field input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  outline: 0;
  transition: all 0.2s;
  background: #f8fafc;
}
.auth-field input:focus {
  border-color: #10b981;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
}
.auth-btn {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: none;
  background: #047857;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.auth-btn:hover {
  background: #065f46;
}
.auth-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.auth-err {
  font-size: 12px;
  color: #ef4444;
  margin-top: 10px;
  text-align: center;
  min-height: 18px;
  font-weight: 500;
}
.auth-lock {
  font-size: 12px;
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fef3c7;
  border-radius: 10px;
  padding: 10px 14px;
  margin-top: 12px;
  text-align: center;
  display: none;
  font-weight: 500;
}
.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}
#main-content {
  display: none;
}
#main-content.visible {
  display: block;
}
header {
  background: linear-gradient(135deg, #065f46 0, #022c22 100%);
  color: #fff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.header-top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
}
.header-top h1 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.header-top p {
  font-size: 12px;
  color: #34d399;
  margin-top: 2px;
  font-weight: 500;
}
.icon-leaf {
  font-size: 26px;
  color: #34d399;
}
.header-btns {
  margin-left: auto;
  display: flex;
  gap: 8px;
}
.logout-btn,
.pwchg-btn {
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.logout-btn:hover,
.pwchg-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.4);
}
nav {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
}
.tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 600;
  color: #a7f3d0;
  background: 0 0;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}
.tab.on {
  border-bottom-color: #fbbf24;
  color: #fff;
}
.tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}
.msg {
  display: none;
  align-items: center;
  gap: 8px;
  margin: 16px 0 0;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  animation: fadeIn 0.3s ease;
}
.msg.show {
  display: flex;
}
.msg.ok {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.msg.err {
  background: #fff5f5;
  color: #991b1b;
  border: 1px solid #fee2e2;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
main {
  padding: 24px 0 60px;
}
.card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
.card-title {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.card-title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 16px;
  background: #10b981;
  border-radius: 2px;
}
.supplier-bar {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13px;
  color: #475569;
  margin-bottom: 20px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}
.supplier-bar i {
  color: #047857;
}
.g2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.g3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}
.g4 {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.6fr 0.8fr 1.1fr;
  gap: 12px;
}
.span2 {
  grid-column: span 2;
}
.g4e {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 16px;
}
.g5e {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
  gap: 14px;
}
@media (max-width: 768px) {
  .g2,
  .g3,
  .g4,
  .g4e,
  .g5e {
    grid-template-columns: 1fr;
  }
  .span2 {
    grid-column: span 1;
  }
}
.badge-low {
  background: #fee2e2;
  color: #b91c1c;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
}
.badge-ok {
  background: #dcfce7;
  color: #15803d;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
}
.badge-io-in {
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
}
.badge-io-out {
  background: #fef3c7;
  color: #b45309;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
}
.badge-io-adjust {
  background: #ede9fe;
  color: #6d28d9;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}
.req {
  color: #ef4444;
  margin-left: 2px;
}
.ferr {
  font-size: 12px;
  color: #ef4444;
  margin-top: 2px;
  font-weight: 500;
}
input[type="date"],
input[type="number"],
input[type="text"],
select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-family: inherit;
  outline: 0;
  transition: all 0.2s;
  background: #fff;
  color: #1e293b;
}
input:focus,
select:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}
input.bad {
  border-color: #ef4444;
  background: #fff5f5;
}
input:disabled {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
}
.iw {
  position: relative;
  width: 100%;
}
.iw i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 14px;
  pointer-events: none;
}
.iw input {
  padding-left: 36px;
}
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}
.pill {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s;
}
.pill:hover {
  border-color: #10b981;
  color: #10b981;
  background: #f0fdf4;
}
.pill.g {
  background: #047857;
  color: #fff;
  border-color: #047857;
  box-shadow: 0 2px 4px rgba(4, 120, 87, 0.15);
}
.crow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  margin-top: 4px;
}
.crow input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #047857;
  cursor: pointer;
  border-radius: 4px;
}
.hint {
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
  margin-left: 26px;
  font-weight: 500;
}
.preview {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  color: #166534;
  margin-top: 12px;
  font-weight: 500;
}
.preview strong {
  color: #047857;
  font-size: 16px;
  font-weight: 700;
  margin-left: 2px;
}
.actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-o {
  background: #fff;
  border: 1px solid #cbd5e1;
  color: #475569;
}
.btn-o:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #1e293b;
}
.btn-p {
  background: #047857;
  color: #fff;
  box-shadow: 0 2px 4px rgba(4, 120, 87, 0.1);
}
.btn-p:hover {
  background: #065f46;
  box-shadow: 0 4px 6px rgba(4, 120, 87, 0.2);
}
.btn-danger {
  background: #ef4444;
  color: #fff;
}
.btn-danger:hover {
  background: #dc2626;
}
.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 6px;
}
.sumbar {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: #64748b;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.01);
}
.sumbar strong {
  color: #0f172a;
  font-weight: 700;
}
.sumbar .gn {
  color: #047857;
  font-size: 14px;
}
.tbl-wrap {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 20px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
  width: 100%;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  table-layout: fixed;
}
thead {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
th {
  padding: 10px 4px;
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  color: #475569;
  letter-spacing: 0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
td {
  padding: 10px 4px;
  border-top: 1px solid #f1f5f9;
  color: #334155;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
tr:hover td {
  background: #f8fafc;
}
.tr {
  text-align: right;
  font-weight: 500;
  font-family: monospace;
}
.tbl-wrap table:not(.records-table) td,
.tbl-wrap table:not(.records-table) th {
  white-space: normal;
  word-break: keep-all;
}
.records-table td:first-child,
.records-table th:first-child {
  width: 4%;
  text-align: center;
}
.records-table td:nth-child(2),
.records-table th:nth-child(2) {
  width: 9%;
}
.records-table td:nth-child(3),
.records-table th:nth-child(3) {
  width: 6%;
}
.records-table td:nth-child(4),
.records-table th:nth-child(4) {
  width: 12%;
}
.records-table td:nth-child(5),
.records-table th:nth-child(5) {
  width: 6%;
}
.records-table td:nth-child(6),
.records-table th:nth-child(6) {
  width: 11%;
}
.records-table td:nth-child(7),
.records-table th:nth-child(7) {
  width: auto;
}
.records-table td:nth-child(8),
.records-table th:nth-child(8) {
  width: 8%;
}
.records-table td:nth-child(9),
.records-table th:nth-child(9) {
  width: 6%;
}
.records-table td:nth-child(10),
.records-table th:nth-child(10) {
  width: 21%;
  text-align: center;
  white-space: normal;
}
.badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}
.bo {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #ffedd5;
}
.bn {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}
.ibtns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-left: 8px;
}
.ibtn {
  background: #fff;
  border: 1px solid #cbd5e1;
  padding: 4px 5px;
  border-radius: 6px;
  cursor: pointer;
  color: #475569;
  font-size: 10.5px;
  transition: all 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  white-space: nowrap;
  overflow: visible;
}
.ibtn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}
.ibtn.d:hover {
  background: #fff5f5;
  border-color: #fecdd3;
  color: #ef4444;
}
.empty-td {
  text-align: center;
  padding: 48px;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 500;
}
.items-builder-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 12px;
}
.item-row-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  position: relative;
  animation: fadeIn 0.2s ease;
}
.item-row-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  border-bottom: 1px dashed #e2e8f0;
  padding-bottom: 6px;
}
.item-row-title {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
}
.pagination-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 18px 0;
}
.page-num-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 6px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.page-num-btn:hover {
  border-color: #10b981;
  color: #10b981;
  background: #f0fdf4;
}
.page-num-btn.active {
  background: #047857;
  color: #fff;
  border-color: #047857;
}
.page-num-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: #f1f5f9;
}
.preview-container {
  display: none;
  margin-top: 24px;
  animation: fadeIn 0.4s ease;
}
.preview-container.show {
  display: block;
}
.preview-card {
  background: #e8e8e8;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  padding: 30px 20px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
  overflow-x: auto;
}
.preview-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.preview-header-bar h3 {
  font-size: 14px;
  font-weight: 700;
  color: #047857;
  display: flex;
  align-items: center;
  gap: 6px;
}
.excel-frame {
  width: 100%;
  max-width: 740px;
  margin: 0 auto;
  padding: 14px;
  font-family: "맑은 고딕", "Malgun Gothic", sans-serif;
  color: #222;
  font-size: 11px;
  background: #e8e4df;
}
.tfs {
  background: #fff;
  border: 1.5px dashed #b33a3a;
  padding: 0;
  margin-bottom: 10px;
}
.tfs.bl {
  border-color: #2c5f8a;
}
.tfs-title {
  text-align: center;
  padding: 8px 10px;
  border-bottom: 1.5px dashed #b33a3a;
  background: #fff;
}
.tfs.bl .tfs-title {
  border-bottom-color: #2c5f8a;
  background: #fff;
}
.tfs-name {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 5px;
  color: #b33a3a;
}
.tfs.bl .tfs-name {
  color: #2c5f8a;
}
.tfs-sub {
  font-size: 12px;
  font-weight: 700;
  color: #b33a3a;
  margin-left: 14px;
  letter-spacing: 0;
}
.tfs.bl .tfs-sub {
  color: #2c5f8a;
}
.tfs table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}
.tfs td {
  border: 1px dashed #b33a3a;
  padding: 4px 6px;
  vertical-align: middle;
  font-size: 10.5px;
  word-break: keep-all;
  overflow: visible;
  white-space: normal;
}
.tfs.bl td {
  border-color: #2c5f8a;
}
.tfs-sl {
  background: #fff;
  color: #b33a3a;
  text-align: center;
  width: 22px;
  max-width: 22px;
  min-width: 22px;
  padding: 6px 1px !important;
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: 0;
  white-space: nowrap;
}
.tfs.bl .tfs-sl {
  background: #fff;
  color: #2c5f8a;
}
.tfs-k {
  background: #fff;
  font-weight: 700;
  text-align: center;
  font-size: 9.5px;
  color: #444;
  white-space: nowrap;
  min-width: 58px;
  width: 62px;
}
.tfs-k small {
  font-size: 7.5px;
  color: #999;
  font-weight: 500;
  display: block;
  line-height: 1;
}
.tfs-mid-k {
  background: #fff;
  color: #b33a3a;
  font-weight: 700;
  text-align: center;
  font-size: 9px;
  white-space: nowrap;
  width: 48px;
  line-height: 1.3;
}
.tfs.bl .tfs-mid-k {
  background: #fff;
  color: #2c5f8a;
}
.tfs-mid-v {
  color: #222;
  font-weight: 700;
  text-align: center;
  font-size: 10.5px;
  white-space: nowrap;
  width: 96px;
}
.tfs-mid-r {
  color: #444;
  font-size: 9.5px;
  text-align: left;
  padding-left: 8px !important;
}
.tfs-v {
  font-weight: 500;
  color: #222;
}
.tfs-vb {
  font-weight: 800;
  color: #222;
  font-size: 11px;
}
.tfs-ih {
  background: #fff;
  color: #b33a3a;
  font-weight: 700;
  text-align: center;
  letter-spacing: 2px;
  font-size: 10px;
  padding: 5px 2px !important;
}
.tfs.bl .tfs-ih {
  background: #fff;
  color: #2c5f8a;
}
.tfs-ic {
  text-align: center;
  height: 21px;
  font-size: 10px;
}
.tfs-il {
  text-align: left;
  padding-left: 8px !important;
}
.tfs-ir {
  text-align: right;
  padding-right: 8px !important;
  font-family: Consolas, "Courier New", monospace;
}
.tfs-fl {
  background: #fff;
  color: #b33a3a;
  font-weight: 700;
  text-align: center;
  letter-spacing: 2px;
  font-size: 10px;
}
.tfs.bl .tfs-fl {
  background: #fff;
  color: #2c5f8a;
}
.tfs-fv {
  font-weight: 800;
  color: #b33a3a;
  text-align: right;
  padding-right: 8px !important;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
}
.tfs.bl .tfs-fv {
  color: #2c5f8a;
}
.tfs-rc {
  font-weight: 700;
  color: #444;
  text-align: center;
  font-size: 11px;
  letter-spacing: 1px;
  padding: 4px 6px !important;
  vertical-align: middle;
}
.tfs-rc b {
  font-size: 14px;
  color: #b33a3a;
}
.tfs.bl .tfs-rc b {
  color: #2c5f8a;
}
.tfs-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
  border-top: 1px solid #b33a3a;
  font-size: 9px;
}
.tfs.bl .tfs-bottom {
  border-top-color: #2c5f8a;
}
.tfs-amt {
  font-weight: 800;
  color: #b33a3a;
  font-size: 13.5px;
  letter-spacing: 0.3px;
}
.tfs.bl .tfs-amt {
  color: #2c5f8a;
}
.tfs-paper {
  color: #999;
  font-size: 9px;
}
.excel-divider {
  position: relative;
  text-align: center;
  padding: 8px 0;
  margin: 1px 0;
}
.excel-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  border-top: 1.5px dashed #b8b3aa;
}
.excel-divider span {
  position: relative;
  background: #e8e4df;
  padding: 0 12px;
  color: #999;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
}
#alog-overlay,
#print-overlay,
#pwd-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 999;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 40px 20px;
}
#alog-overlay.show,
#print-overlay.show,
#pwd-overlay.show {
  display: flex;
}
.psheet {
  background: #fff;
  width: 100%;
  max-width: 840px;
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
  padding: 30px;
  overflow-x: auto;
}
.pwd-box {
  background: #fff;
  width: 100%;
  max-width: 380px;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
  margin-top: 8%;
  border: 1px solid #e2e8f0;
}
.alog-box {
  background: #0f172a;
  color: #e2e8f0;
  width: 100%;
  max-width: 1000px;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  margin-top: 4%;
  border: 1px solid #334155;
  font-family: Consolas, monospace;
}
.alog-box .tbl-wrap {
  background: #1e293b;
  border-color: #334155;
}
.alog-box th {
  color: #94a3b8;
  background: #1e293b;
}
.alog-box td {
  color: #cbd5e1;
  border-top-color: #334155;
  font-size: 10.5px;
}
.alog-box tr:hover td {
  background: #273449;
}
.pbtns {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 16px;
}
#pretty-modal-container {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(5px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.25s ease;
}
#pretty-modal-container.show {
  display: flex;
}
.pretty-modal-box {
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  width: 100%;
  max-width: 400px;
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  text-align: center;
}
.pm-icon {
  font-size: 38px;
  margin-bottom: 16px;
}
.pm-icon.info {
  color: #10b981;
}
.pm-icon.warn {
  color: #f59e0b;
}
.pm-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}
.pm-text {
  font-size: 13.5px;
  color: #475569;
  margin-bottom: 24px;
  line-height: 1.6;
  white-space: pre-wrap;
}
.pm-btns {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.pm-btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  min-width: 80px;
}
.pm-btn-ok {
  background: #047857;
  color: #fff;
}
.pm-btn-ok:hover {
  background: #065f46;
}
.pm-btn-cancel {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}
.pm-btn-cancel:hover {
  background: #e2e8f0;
}
@media print {
  @page {
    size: A4 portrait;
    margin: 0mm 8mm;
  }
  body,
  html {
    background: #fff !important;
    width: 100%;
    margin: 0;
    padding: 0;
    font-size: 11px;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    overflow: visible !important;
  }
  ::-webkit-scrollbar {
    display: none !important;
  }
  #alog-overlay,
  #auth-layer,
  #perpage-wrap,
  #pretty-modal-container,
  #pwd-overlay,
  .actions,
  .live-preview-space,
  .msg,
  .pagination-wrap,
  .pbtns,
  .preview-container,
  .section-filter,
  .sumbar,
  .tbl-wrap,
  header,
  nav {
    display: none !important;
  }
  #print-overlay {
    display: block !important;
    position: static !important;
    background: #fff !important;
    padding: 0 !important;
    overflow: visible !important;
  }
  .psheet {
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: none !important;
    border: none !important;
    margin: 0 !important;
  }
  .excel-frame {
    background: #fff !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
  }
  .tfs {
    page-break-inside: avoid;
    break-inside: avoid;
  }
  .excel-frame > .tfs + .excel-divider,
  .excel-frame > .excel-divider + .tfs {
    page-break-before: avoid !important;
    break-before: avoid !important;
  }
  .excel-frame {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  @page {
    size: 182mm 289mm portrait;
  }
  #print-target-area {
    width: 182mm;
    margin: 0 auto;
  }
  .lp-page {
    page-break-after: always !important;
    break-after: page !important;
    width: 182mm;
    display: block;
  }
  .lp-page.lp-last,
  .lp-page:last-child {
    page-break-after: auto !important;
    break-after: auto !important;
  }
  .lp-slot {
    height: 128mm;
    overflow: hidden;
    width: 182mm;
    display: block;
  }
  .lp-slot .excel-frame {
    padding: 0 !important;
    width: 182mm !important;
    max-width: 182mm !important;
    background: #fff !important;
  }
  .lp-sep {
    border-top: 1px dashed #bbb;
    margin: 1mm 0;
    height: 1mm;
    display: block;
  }
}
#print-target-area.pf-active {
  width: 100% !important;
  max-width: 720px !important;
  --pscale: 1;
}
#print-target-area.pf-active .excel-frame {
  width: 100% !important;
  max-width: none !important;
  padding: 0 !important;
}
#print-target-area.pf-active .tfs {
  margin-bottom: calc(5mm * var(--pscale)) !important;
  padding: calc(7px * var(--pscale)) calc(9px * var(--pscale)) !important;
  box-sizing: border-box !important;
  width: 100% !important;
}
#print-target-area.pf-active .tfs table {
  font-size: calc(12.5px * var(--pscale)) !important;
  table-layout: auto !important;
}
#print-target-area.pf-active .tfs td {
  padding: calc(6px * var(--pscale)) calc(7px * var(--pscale)) !important;
  font-size: calc(12px * var(--pscale)) !important;
}
#print-target-area.pf-active .tfs-sl {
  width: calc(22px * var(--pscale)) !important;
  padding: calc(9px * var(--pscale)) calc(2px * var(--pscale)) !important;
  font-size: calc(10.5px * var(--pscale)) !important;
}
#print-target-area.pf-active .tfs-k {
  font-size: calc(11px * var(--pscale)) !important;
  padding: calc(5px * var(--pscale)) calc(5px * var(--pscale)) !important;
}
#print-target-area.pf-active .tfs-title {
  padding: calc(9px * var(--pscale)) calc(11px * var(--pscale)) !important;
}
#print-target-area.pf-active .tfs-name {
  font-size: calc(20px * var(--pscale)) !important;
  letter-spacing: calc(6px * var(--pscale)) !important;
}
#print-target-area.pf-active .tfs-sub {
  font-size: calc(14px * var(--pscale)) !important;
}
#print-target-area.pf-active .tfs-ih {
  padding: calc(6px * var(--pscale)) calc(4px * var(--pscale)) !important;
  font-size: calc(12px * var(--pscale)) !important;
}
#print-target-area.pf-active .tfs-ic,
#print-target-area.pf-active .tfs-il,
#print-target-area.pf-active .tfs-ir {
  height: calc(24px * var(--pscale)) !important;
  font-size: calc(12px * var(--pscale)) !important;
}
#print-target-area.pf-active .tfs-fl {
  padding: calc(6px * var(--pscale)) calc(5px * var(--pscale)) !important;
  font-size: calc(12px * var(--pscale)) !important;
}
#print-target-area.pf-active .tfs-fv {
  font-size: calc(14px * var(--pscale)) !important;
}
#print-target-area.pf-active .tfs-rc {
  font-size: calc(13px * var(--pscale)) !important;
}
#print-target-area.pf-active .tfs-rc b {
  font-size: calc(16px * var(--pscale)) !important;
}
#print-target-area.pf-active .tfs-bottom {
  padding: calc(5px * var(--pscale)) calc(9px * var(--pscale)) !important;
}
#print-target-area.pf-active .tfs-amt {
  font-size: calc(15px * var(--pscale)) !important;
}
#print-target-area.pf-active .tfs-paper {
  font-size: calc(10.5px * var(--pscale)) !important;
}
#print-target-area.pf-active .tfs-mid-k {
  font-size: calc(11px * var(--pscale)) !important;
  padding: calc(5px * var(--pscale)) calc(5px * var(--pscale)) !important;
}
#print-target-area.pf-active .tfs-mid-v {
  font-size: calc(13px * var(--pscale)) !important;
}
#print-target-area.pf-active .excel-divider {
  margin: calc(2mm * var(--pscale)) 0 !important;
  padding: calc(3px * var(--pscale)) 0 !important;
}
#print-target-area.pf-active .excel-divider::before {
  border-top: 1px dashed #aaa !important;
}
#print-target-area.pf-active .excel-divider span {
  font-size: calc(9px * var(--pscale)) !important;
  background: #fff !important;
}
.records-table {
  min-width: 760px;
}
.parts-table {
  min-width: 680px;
}
.invlog-table {
  min-width: 680px;
}
@media (max-width: 768px) {
  .wrap {
    padding: 0 12px;
  }
  header .wrap {
    padding: 0 12px;
  }
  nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .tab {
    padding: 12px 14px;
    font-size: 12.5px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .auth-logo h1 {
    font-size: 18px;
  }
  table {
    font-size: 11px;
  }
  td,
  th {
    padding: 8px 6px;
  }
  .card {
    padding: 16px;
  }
  .sumbar {
    padding: 12px;
  }
  .sumbar > div[style*="flex-end"] {
    width: 100%;
    justify-content: flex-start !important;
  }
  .alog-box,
  .pretty-modal-box,
  .pwd-box {
    max-width: 92vw;
    padding: 18px;
  }
  .ibtns {
    grid-template-columns: 1fr 1fr;
    gap: 3px;
  }
  .ibtn {
    font-size: 9.5px;
    padding: 5px 3px;
  }
}
.dash-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.dash-period-toggle {
  display: flex;
  background: #f1f5f9;
  border-radius: 10px;
  padding: 4px;
  gap: 2px;
}
.dash-ptab {
  border: none;
  background: 0 0;
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s;
}
.dash-ptab.on {
  background: #065f46;
  color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.perpage-pills {
  display: flex;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}
.perpage-btn {
  border: none;
  background: 0 0;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s;
}
.perpage-btn.on {
  background: #065f46;
  color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}
.dash-period-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 6px 14px;
}
.dash-nav-btn {
  border: none;
  background: 0 0;
  color: #475569;
  cursor: pointer;
  font-size: 13px;
  padding: 4px 6px;
  border-radius: 6px;
}
.dash-nav-btn:hover {
  background: #f1f5f9;
}
.dash-period-label {
  font-size: 13.5px;
  font-weight: 700;
  color: #1e293b;
  min-width: 130px;
  text-align: center;
}
.dash-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.dash-card {
  border-radius: 16px;
  padding: 20px 22px;
  color: #fff;
  box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
}
.dash-card::after {
  content: "";
  position: absolute;
  right: -20px;
  top: -20px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}
.dash-blue {
  background: linear-gradient(135deg, #0369a1, #0c4a6e);
}
.dash-green {
  background: linear-gradient(135deg, #047857, #064e3b);
}
.dash-red {
  background: linear-gradient(135deg, #dc2626, #7f1d1d);
}
.dash-purple {
  background: linear-gradient(135deg, #7c3aed, #4c1d95);
}
.dash-label {
  font-size: 12.5px;
  font-weight: 600;
  opacity: 0.88;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}
.dash-value {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
}
@media (max-width: 900px) {
  .dash-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 480px) {
  .dash-grid {
    grid-template-columns: 1fr;
  }
  .dash-value {
    font-size: 22px;
  }
  .dash-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .dash-period-nav {
    justify-content: center;
  }
}
.tools-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: 0 0;
  border: none;
  padding: 8px 12px;
  font-size: 12.5px;
  color: #334155;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  text-align: left;
}
.tools-item:hover {
  background: #f8fafc;
  color: #065f46;
}

/* ============================================================
   발주서 페이지 — 평문 추가 스타일
   ============================================================ */
.order-layout {
  display: grid;
  grid-template-columns: minmax(460px, 1fr) minmax(430px, 480px);
  gap: 18px;
  align-items: start;
}

.order-editor-card,
.order-preview-card,
.order-history-card {
  overflow: visible;
}

.order-items-head,
.order-history-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 18px 0 10px;
}

.order-history-toolbar {
  margin-top: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.order-input-table input {
  padding: 8px 9px;
  font-size: 12px;
  border-radius: 7px;
}

.order-input-table th,
.order-input-table td,
.order-history-table th,
.order-history-table td {
  vertical-align: middle;
}

.order-total-line {
  margin-top: 12px;
  text-align: right;
  color: #334155;
  font-weight: 700;
}

.order-total-line strong {
  color: #047857;
  font-size: 20px;
  margin: 0 4px;
}

.order-actions {
  margin-top: 18px;
}

.order-sheet {
  width: 420px;
  min-height: 594px;
  margin: 0 auto;
  padding: 22px 20px;
  background: #fff;
  color: #111827;
  border: 1px solid #cbd5e1;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  font-size: 11px;
  line-height: 1.35;
}

.order-doc-title {
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.26em;
  margin: 4px 0 18px;
}

.order-approval-wrap {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.order-approval-table {
  width: 205px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 10.5px;
}

.order-approval-table th,
.order-approval-table td,
.order-info-table th,
.order-info-table td,
.order-item-preview-table th,
.order-item-preview-table td {
  border: 1px solid #111827;
  padding: 5px 6px;
}

.order-approval-table td {
  height: 42px;
}

.order-info-table,
.order-item-preview-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin-bottom: 10px;
}

.order-info-table th {
  width: 23%;
  background: #f8fafc;
  text-align: center;
  font-weight: 800;
}

.order-info-table td {
  height: 28px;
}

.order-total-cell {
  font-weight: 800;
  font-size: 12px;
}

.order-item-preview-table th {
  background: #f8fafc;
  text-align: center;
  font-weight: 800;
}

.order-item-preview-table thead span,
.order-item-preview-table thead small {
  font-size: 9px;
  font-weight: 700;
}

.order-item-preview-table td {
  height: 27px;
}

.order-center {
  text-align: center;
}

.order-right {
  text-align: right;
}

.order-special {
  min-height: 40px;
  border: 1px solid #111827;
  padding: 8px;
  margin-bottom: 18px;
}

.order-closing {
  text-align: center;
  margin: 18px 0 24px;
  font-weight: 600;
}

.order-date-line {
  text-align: center;
  margin-bottom: 24px;
  font-weight: 700;
}

.order-company-line {
  text-align: center;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.16em;
  line-height: 1.7;
}

@media (max-width: 1100px) {
  .order-layout {
    grid-template-columns: 1fr;
  }

  .order-sheet {
    width: 100%;
    max-width: 520px;
  }
}

@media print {
  body * {
    visibility: hidden;
  }

  #page-order,
  #page-order * {
    visibility: visible;
  }

  #page-order {
    position: absolute;
    inset: 0;
    background: #fff;
  }

  .order-editor-card,
  .order-history-card,
  header,
  .msg,
  .order-preview-card .card-title {
    display: none !important;
  }

  .order-layout {
    display: block;
  }

  .order-preview-card {
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
  }

  .order-sheet {
    width: 190mm;
    min-height: 270mm;
    box-shadow: none;
    border: none;
    padding: 12mm;
  }
}


/* ============================================================
   발주서 v2 보정 — 미리보기/인쇄/긴 문장/간격
   ============================================================ */
.order-layout.preview-closed {
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
}

.order-preview-title {
  justify-content: space-between;
}
.order-preview-title::before {
  display: none;
}
.order-preview-title span::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 16px;
  background: #10b981;
  border-radius: 2px;
  margin-right: 8px;
  vertical-align: -2px;
}

.order-sheet table,
.order-sheet th,
.order-sheet td {
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
}

.order-sheet {
  font-size: 10.5px;
  line-height: 1.28;
}

.order-doc-title {
  padding-left: 0.26em;
}

.order-approval-table {
  width: 205px;
}
.order-approval-table .approval-label-col {
  width: 36px;
}
.order-approval-table th {
  text-align: center;
  word-break: keep-all;
  line-height: 1.15;
  padding: 4px 3px;
}
.order-approval-table td {
  height: 41px;
}
.order-approval-table .approval-label {
  letter-spacing: 0.15em;
}

.order-info-table {
  table-layout: fixed;
}
.order-info-label-col {
  width: 86px;
}
.order-info-value-short {
  width: 102px;
}
.order-info-table th {
  width: auto;
  letter-spacing: 0.03em;
  word-break: keep-all;
  white-space: nowrap !important;
  padding: 5px 4px;
}
.order-info-table td {
  height: 29px;
  line-height: 1.25;
  word-break: break-all;
}
.order-wrap-cell,
.order-text-cell,
.order-special {
  word-break: break-all !important;
  overflow-wrap: anywhere !important;
  white-space: normal !important;
}
.order-num-cell,
.order-right {
  word-break: keep-all !important;
  white-space: nowrap !important;
}
.order-item-preview-table {
  table-layout: fixed;
}
.order-item-preview-table td {
  height: 26px;
  line-height: 1.2;
}
.order-item-preview-table th {
  padding: 4px 4px;
  word-break: keep-all;
  white-space: normal !important;
}
.order-special {
  line-height: 1.35;
}

@media print {
  @page { size: A4 portrait; margin: 0; }
  html, body { margin: 0 !important; padding: 0 !important; background: #fff !important; }
  body * { visibility: hidden; }
  #page-order, #page-order * { visibility: visible; }
  #page-order { position: absolute; inset: 0; background: #fff; }
  .order-editor-card, .order-history-card, header, .msg, .order-preview-card .card-title { display: none !important; }
  .order-layout { display: block; }
  .order-preview-card { border: none; box-shadow: none; padding: 0; margin: 0; }
  .order-sheet {
    width: 210mm !important;
    min-height: 297mm !important;
    margin: 0 !important;
    padding: 16mm 17mm 13mm !important;
    box-shadow: none !important;
    border: none !important;
    font-size: 10.5pt !important;
    line-height: 1.32 !important;
  }
  .order-doc-title { font-size: 20pt !important; margin: 3mm 0 8mm !important; }
  .order-approval-table { width: 62mm !important; font-size: 10pt !important; }
  .order-approval-table td { height: 17mm !important; }
  .order-item-preview-table td { height: 8.7mm !important; }
  .order-special { min-height: 15mm !important; }
}

/* 재고 그룹 체크박스 선택 모달 */
.parts-pick-modal-overlay{
  position:fixed;inset:0;background:rgba(15,23,42,.62);backdrop-filter:blur(4px);
  z-index:10020;display:flex;align-items:center;justify-content:center;padding:22px;
}
.parts-pick-modal{
  width:min(760px,96vw);max-height:88vh;background:#fff;border-radius:18px;
  box-shadow:0 25px 70px rgba(15,23,42,.28);padding:22px;display:flex;flex-direction:column;gap:14px;
}
.parts-pick-modal.small{width:min(520px,94vw)}
.ppm-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;border-bottom:1px solid #e2e8f0;padding-bottom:12px}
.ppm-head h3{font-size:17px;font-weight:800;color:#065f46;margin:0 0 4px;display:flex;gap:8px;align-items:center}
.ppm-head p{font-size:12px;color:#64748b;margin:0;line-height:1.45}
.ppm-x{border:1px solid #e2e8f0;background:#f8fafc;border-radius:10px;width:34px;height:34px;cursor:pointer;color:#64748b}
.ppm-tools{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.ppm-tools input{flex:1;min-width:220px;border:1px solid #cbd5e1;border-radius:10px;padding:10px 12px;font-size:13px}
.ppm-count{font-size:12px;color:#047857;font-weight:700;background:#f0fdf4;border:1px solid #bbf7d0;border-radius:10px;padding:8px 12px}
.ppm-list{display:grid;grid-template-columns:1fr 1fr;gap:8px;overflow-y:auto;max-height:420px;padding:2px 4px 2px 0}
.parts-pick-modal.small .ppm-list,.group-list-select{grid-template-columns:1fr;max-height:360px}
.ppm-item{display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid #e2e8f0;border-radius:12px;background:#f8fafc;cursor:pointer;min-width:0;transition:.15s}
.ppm-item:hover{border-color:#10b981;background:#f0fdf4}
.ppm-item input{width:17px;height:17px;accent-color:#047857;flex:0 0 auto}
.ppm-main{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
.ppm-main strong{font-size:13px;color:#0f172a;white-space:normal;word-break:break-all}
.ppm-main small{font-size:11px;color:#64748b;white-space:normal;word-break:break-all}
.ppm-stock{font-size:11px;font-weight:700;color:#047857;background:#ecfdf5;border-radius:999px;padding:3px 8px;flex:0 0 auto}
.ppm-foot{display:flex;justify-content:flex-end;gap:8px;border-top:1px solid #e2e8f0;padding-top:12px}
@media(max-width:720px){.ppm-list{grid-template-columns:1fr}.parts-pick-modal{padding:16px}}


/* ============================================================
   v3 인쇄/발주/재고연동 보정
   ============================================================ */
.order-row-tools{display:flex;gap:4px;align-items:center;justify-content:center;}
.order-row-pick{color:#047857;background:#ecfdf5;border-color:#a7f3d0;}
.order-history-items{margin-top:7px;display:flex;flex-direction:column;gap:5px;}
.order-history-item{display:flex;align-items:center;gap:6px;flex-wrap:wrap;font-size:11.5px;color:#475569;background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:5px 7px;}
.order-history-item b{color:#0f172a;}
.order-history-item .arrived{font-style:normal;color:#047857;background:#d1fae5;border:1px solid #a7f3d0;border-radius:999px;padding:2px 7px;font-weight:700;font-size:10.5px;}
.order-arrival-btn{border:1px solid #bae6fd;background:#f0f9ff;color:#0369a1;border-radius:999px;padding:2px 7px;font-size:10.5px;font-weight:700;cursor:pointer;}
.order-arrival-btn:hover{background:#e0f2fe;}
.order-modal-overlay{position:fixed;inset:0;background:rgba(15,23,42,.62);z-index:10050;display:none;align-items:center;justify-content:center;padding:22px;}
.order-modal-overlay.show{display:flex;}
.order-modal-box{background:#fff;border-radius:16px;border:1px solid #e2e8f0;box-shadow:0 25px 60px rgba(15,23,42,.28);padding:18px;width:min(760px,96vw);max-height:88vh;overflow:auto;}
.order-modal-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px;color:#065f46;}
.order-modal-search{width:100%;border:1px solid #cbd5e1;border-radius:10px;padding:10px 12px;margin-bottom:12px;}
.order-part-picker-list{display:flex;flex-direction:column;gap:12px;}
.order-part-group{border:1px solid #e2e8f0;border-radius:12px;background:#f8fafc;padding:10px;}
.order-part-group-title{font-weight:800;color:#065f46;font-size:12.5px;margin-bottom:8px;}
.order-part-pick{width:100%;border:1px solid #e2e8f0;background:#fff;border-radius:10px;padding:8px 10px;margin:4px 0;display:flex;align-items:center;justify-content:space-between;gap:12px;text-align:left;cursor:pointer;}
.order-part-pick:hover{border-color:#10b981;background:#f0fdf4;}
.order-part-pick span{display:flex;flex-direction:column;gap:2px;min-width:0;}
.order-part-pick small{font-size:11px;color:#64748b;}
.order-part-pick em{font-style:normal;color:#047857;font-weight:800;font-size:11.5px;white-space:nowrap;}
.order-modal-desc{font-size:12px;color:#64748b;margin-bottom:12px;}
.order-modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:14px;}

@media print {
  @page { size:A4 portrait; margin:8mm; }
  body.print-record-mode * { visibility:hidden !important; }
  body.print-record-mode #print-overlay,
  body.print-record-mode #print-overlay * { visibility:visible !important; }
  body.print-record-mode #page-order,
  body.print-record-mode #page-order * { visibility:hidden !important; }
  body.print-record-mode #print-overlay{display:block!important;position:static!important;background:#fff!important;padding:0!important;overflow:visible!important;}
  body.print-record-mode .psheet{box-shadow:none!important;border:0!important;padding:0!important;margin:0!important;width:100%!important;max-width:none!important;}
  body.print-record-mode .pbtns{display:none!important;}
  body.print-record-mode #print-target-area{width:194mm!important;margin:0 auto!important;}
  body.print-record-mode .excel-frame{width:194mm!important;max-width:194mm!important;padding:0!important;background:#fff!important;}
  body.print-record-mode .tfs{width:194mm!important;margin:0 0 5mm!important;padding:3.2mm 4mm!important;box-sizing:border-box!important;break-inside:avoid!important;page-break-inside:avoid!important;}
  body.print-record-mode .tfs table{font-size:10.2px!important;table-layout:fixed!important;}
  body.print-record-mode .tfs td{padding:3.5px 4px!important;font-size:10px!important;line-height:1.15!important;}
  body.print-record-mode .tfs-title{padding:4px 6px!important;}
  body.print-record-mode .tfs-name{font-size:14px!important;}
  body.print-record-mode .tfs-sub{font-size:9px!important;}
  body.print-record-mode .tfs-bottom{padding:4px 6px!important;}
  body.print-record-mode .excel-divider{margin:2mm 0!important;}
  body.print-record-mode .lp-page{width:194mm!important;height:281mm!important;page-break-after:always!important;break-after:page!important;overflow:hidden!important;}
  body.print-record-mode .lp-page:last-child{page-break-after:auto!important;break-after:auto!important;}
  body.print-record-mode .lp-slot{width:194mm!important;height:137mm!important;overflow:hidden!important;display:block!important;}
  body.print-record-mode .lp-slot .excel-frame{width:194mm!important;max-width:194mm!important;}
  body.print-record-mode .lp-slot .tfs{height:135mm!important;margin:0!important;}
  body.print-record-mode .lp-sep{height:3mm!important;margin:2mm 0!important;border-top:1px dashed #999!important;}
}


/* V4: 인쇄 비율 / 발주 기록 / 재고현황 가독성 보정 */
@media print {
  @page { size: A4 portrait; margin: 5mm; }
  body.print-record-mode #print-target-area{
    width:200mm!important;
    max-width:200mm!important;
    margin:0 auto!important;
    transform:none!important;
  }
  body.print-record-mode #print-target-area.pf-active{
    transform:none!important;
    width:200mm!important;
  }
  body.print-record-mode #print-target-area.pf-active .excel-frame{
    transform:none!important;
    width:200mm!important;
    max-width:200mm!important;
  }
  body.print-record-mode .excel-frame{
    width:200mm!important;
    max-width:200mm!important;
    padding:0!important;
    margin:0 auto!important;
    background:#fff!important;
  }
  body.print-record-mode .tfs{
    width:200mm!important;
    margin:0 0 3mm!important;
    padding:3.5mm 4.2mm!important;
    box-sizing:border-box!important;
    break-inside:avoid!important;
    page-break-inside:avoid!important;
  }
  body.print-record-mode .excel-frame>.tfs:first-child,
  body.print-record-mode .excel-frame>.tfs.bl{
    min-height:137mm!important;
  }
  body.print-record-mode .tfs table{font-size:10.4px!important;table-layout:fixed!important;}
  body.print-record-mode .tfs td{padding:3.8px 4px!important;font-size:10.2px!important;line-height:1.18!important;}
  body.print-record-mode .tfs-title{padding:4.5px 6px!important;}
  body.print-record-mode .tfs-name{font-size:14.5px!important;}
  body.print-record-mode .tfs-bottom{padding:4.5px 6px!important;}
  body.print-record-mode .excel-divider{margin:1.8mm 0!important;}
  body.print-record-mode .lp-page{
    width:200mm!important;
    height:287mm!important;
    page-break-after:always!important;
    break-after:page!important;
    overflow:hidden!important;
  }
  body.print-record-mode .lp-page:last-child{page-break-after:auto!important;break-after:auto!important;}
  body.print-record-mode .lp-slot{
    width:200mm!important;
    height:140mm!important;
    overflow:hidden!important;
    display:flex!important;
    align-items:flex-start!important;
  }
  body.print-record-mode .lp-slot .excel-frame{width:200mm!important;max-width:200mm!important;}
  body.print-record-mode .lp-slot .tfs{
    width:200mm!important;
    min-height:137mm!important;
    height:auto!important;
    margin:0!important;
    padding:3.5mm 4.2mm!important;
  }
  body.print-record-mode .lp-sep{height:4mm!important;margin:1.5mm 0!important;border-top:1px dashed #999!important;}
}

/* 발주서 기록을 카드형/압축형으로 보여서 긴 목록이 세로로 늘어지지 않게 함 */
.order-history-table td{vertical-align:middle;}
.order-history-items.compact{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(178px,1fr));
  gap:5px;
  max-width:620px;
  margin-top:7px;
}
.order-history-items.compact .order-history-item{
  min-width:0;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  column-gap:6px;
  row-gap:2px;
  font-size:11px;
  padding:5px 7px;
}
.order-history-items.compact .order-history-item b,
.order-history-items.compact .order-history-item small{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.order-history-items.compact .order-history-item small{color:#64748b;font-size:10.5px;}
.order-history-items.compact .order-history-item>em:not(.arrived){font-style:normal;color:#334155;font-weight:700;white-space:nowrap;}
.order-history-more{font-size:11px;color:#64748b;background:#f8fafc;border:1px dashed #cbd5e1;border-radius:8px;padding:5px 8px;}
.order-arrival-all-btn{background:#ecfdf5!important;border-color:#a7f3d0!important;color:#047857!important;font-weight:800;}

/* 재고현황 테이블: 관리버튼 때문에 줄이 길어지는 문제 보정 */
.parts-table{table-layout:fixed;}
.parts-table th,.parts-table td{vertical-align:middle;}
.parts-table td:nth-child(2),.parts-table td:nth-child(3){
  white-space:normal;
  word-break:break-word;
}
.parts-table .ibtns{
  display:grid;
  grid-template-columns:repeat(3,minmax(54px,1fr));
  gap:4px;
  min-width:0;
}
.parts-table .ibtn{
  padding:5px 6px;
  font-size:11px;
  justify-content:center;
  white-space:nowrap;
}
@media(max-width:980px){
  .parts-table .ibtns{grid-template-columns:repeat(2,minmax(54px,1fr));}
}


/* ============================================================
   v5 레이아웃 / 인쇄 / 발주기록 / 재고접힘 보정
   ============================================================ */
/* 상단 메뉴: 글자 줄바꿈/겹침 방지 */
header .wrap{max-width:1180px;}
.header-top{padding:14px 20px;}
.header-top h1{font-size:18px;}
.header-top p{font-size:11.5px;}
nav.wrap{padding:0 8px;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:0;align-items:stretch;}
.tab{min-width:0;justify-content:center;text-align:center;gap:6px;padding:12px 8px;font-size:13px;line-height:1.2;white-space:normal;word-break:keep-all;}
.tab i{font-size:15px;flex:0 0 auto;}
@media(max-width:880px){nav.wrap{grid-template-columns:repeat(3,1fr)}.tab{font-size:12.5px;padding:10px 6px}.header-top{flex-wrap:wrap}.header-btns{width:100%;justify-content:flex-end}}
@media(max-width:520px){nav.wrap{grid-template-columns:repeat(2,1fr)}}

/* 명세서 인쇄: 큰 빈칸 대신 표의 행들이 균형 있게 커지도록 보정 */
@media print{
  @page{size:A4 portrait;margin:5mm;}
  body.print-record-mode #print-target-area{width:200mm!important;max-width:200mm!important;margin:0 auto!important;}
  body.print-record-mode .excel-frame{width:200mm!important;max-width:200mm!important;background:#fff!important;padding:0!important;margin:0 auto!important;}
  body.print-record-mode .tfs{width:200mm!important;height:136mm!important;min-height:0!important;margin:0!important;padding:3.6mm 4.2mm!important;box-sizing:border-box!important;overflow:hidden!important;display:flex!important;flex-direction:column!important;}
  body.print-record-mode .tfs-title{flex:0 0 auto!important;padding:4.3px 6px!important;}
  body.print-record-mode .tfs-name{font-size:14.6px!important;letter-spacing:3.8px!important;}
  body.print-record-mode .tfs-sub{font-size:9px!important;}
  body.print-record-mode .tfs table{width:100%!important;table-layout:fixed!important;flex:0 0 auto!important;}
  body.print-record-mode .tfs table:nth-of-type(3){flex:1 1 auto!important;height:auto!important;}
  body.print-record-mode .tfs table:nth-of-type(3) tr{height:auto!important;}
  body.print-record-mode .tfs table:nth-of-type(3) td{height:auto!important;}
  body.print-record-mode .tfs td{padding:3.2px 4px!important;font-size:9.8px!important;line-height:1.12!important;}
  body.print-record-mode .tfs table:nth-of-type(3) td{padding-top:4.2px!important;padding-bottom:4.2px!important;}
  body.print-record-mode .tfs-bottom{flex:0 0 auto!important;padding:4px 6px!important;margin-top:0!important;}
  body.print-record-mode .tfs-amt{font-size:12px!important;letter-spacing:0!important;}
  body.print-record-mode .excel-divider{height:5mm!important;margin:0!important;padding:1.5mm 0!important;}
  body.print-record-mode .lp-page{width:200mm!important;height:287mm!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;page-break-after:always!important;break-after:page!important;}
  body.print-record-mode .lp-page:last-child{page-break-after:auto!important;break-after:auto!important;}
  body.print-record-mode .lp-slot{width:200mm!important;height:136mm!important;display:block!important;overflow:hidden!important;flex:0 0 136mm!important;}
  body.print-record-mode .lp-slot .excel-frame{width:200mm!important;max-width:200mm!important;height:136mm!important;}
  body.print-record-mode .lp-slot .tfs{height:136mm!important;min-height:0!important;margin:0!important;}
  body.print-record-mode .lp-sep{height:6mm!important;margin:0!important;border-top:1px dashed #999!important;flex:0 0 6mm!important;}
}

/* 화면 미리보기에서도 명세표가 특정 하단 칸만 길어 보이지 않도록 */
.excel-frame .tfs{display:block;}
.excel-frame .tfs table:nth-of-type(3) td{height:25px;}

/* 발주서 페이지: 숨막히는 느낌 완화 */
.order-layout{grid-template-columns:minmax(500px,1fr) minmax(420px,500px);gap:24px;align-items:start;}
.order-editor-card,.order-preview-card,.order-history-card{border-radius:18px;padding:26px;}
.order-editor-card .g2{gap:18px 20px;}
.order-editor-card input,.order-editor-card select{height:42px;font-size:13.5px;}
.order-input-table{border-radius:16px;overflow:hidden;background:#fff;}
.order-input-table th{padding:12px 10px;background:#f8fafc;font-size:12.5px;}
.order-input-table td{padding:10px 8px;}
.order-input-table input{height:38px;padding:9px 10px;font-size:13px;}
.order-row-tools{min-width:64px;}
.order-actions{gap:10px;margin-top:22px;}
.order-sheet{width:440px;min-height:622px;padding:28px 22px;font-size:11.2px;}
.order-doc-title{font-size:21px;margin:4px 0 20px;}
.order-info-table th,.order-item-preview-table th{background:#f8fafc;}
.order-info-table td{height:32px;padding:7px 8px;}
.order-item-preview-table td{height:30px;padding:6px 7px;}
.order-special{min-height:46px;margin-bottom:20px;}
@media(max-width:1100px){.order-layout{grid-template-columns:1fr}.order-sheet{max-width:540px;width:100%;}.order-preview-card{overflow-x:auto;}}

/* 발주서 미리보기 기본 열림 상태에 맞춘 버튼 */
#order-preview-open{margin-bottom:12px;}

/* 발주서 기록: 넓게 퍼지지 않고, 모든 품목의 도착 버튼이 보이도록 */
.order-history-table{table-layout:fixed;}
.order-history-table th,.order-history-table td{padding:12px 14px;vertical-align:middle;}
.order-history-table th:first-child,.order-history-table td:first-child{width:112px;text-align:left;white-space:nowrap;padding-left:18px;}
.order-history-table th:nth-child(3),.order-history-table td:nth-child(3){width:90px;text-align:center;}
.order-history-table th:nth-child(4),.order-history-table td:nth-child(4){width:105px;text-align:right;}
.order-history-table th:nth-child(5),.order-history-table td:nth-child(5){width:230px;}
.order-history-title{display:block;font-size:13.5px;margin-bottom:3px;}
.order-history-purpose{display:block;color:#64748b;margin-bottom:8px;line-height:1.35;max-width:100%;word-break:break-word;}
.order-history-items.compact.all-items{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:6px;max-width:520px;max-height:176px;overflow:auto;padding:2px 4px 2px 0;margin-top:6px;}
.order-history-items.compact.all-items .order-history-item{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:3px 6px;padding:7px 8px;border-radius:9px;background:#f8fafc;border:1px solid #e2e8f0;}
.order-history-item .ohi-main{min-width:0;display:flex;flex-direction:column;gap:2px;}
.order-history-items.compact.all-items .order-history-item b{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.order-history-items.compact.all-items .order-history-item small{font-size:10.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.order-history-items.compact.all-items .order-history-item em:not(.arrived){font-size:11px;}
.order-arrival-btn,.order-history-item .arrived{justify-self:end;}
.order-history-more{display:none!important;}
.order-history-table .ibtns{display:grid;grid-template-columns:1fr 1fr;gap:6px;}
.order-history-table .ibtn{justify-content:center;padding:6px 8px;font-size:11.5px;}
@media(max-width:900px){.order-history-table{table-layout:auto}.order-history-table th:nth-child(5),.order-history-table td:nth-child(5){width:auto}.order-history-items.compact.all-items{max-width:100%;grid-template-columns:1fr}.order-history-table .ibtns{grid-template-columns:1fr}}

/* 재고현황: 기본 접힘 상태 안내와 테이블 압축 */
.group-header-row td::after{content:"  클릭해서 펼치기/접기";font-size:11px;font-weight:500;color:#64748b;margin-left:8px;}
.parts-table td,.parts-table th{padding:9px 10px;}
.parts-table .ibtns{grid-template-columns:repeat(2,minmax(56px,1fr));max-width:180px;margin-left:auto;}

/* v6 추가: 발주서 기록 필터 / 거래내역 필터 / 입출고 그룹 필터 정리 */
.order-history-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.order-history-filter-input {
  height: 32px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  background: #fff;
  color: #1e293b;
}
#order-filter-search {
  min-width: 220px;
  flex: 1 1 240px;
}
.order-date-filter {
  width: 138px;
  flex: 0 0 auto;
}
.order-arrival-filter {
  width: 140px;
  flex: 0 0 auto;
}
.order-filter-sep {
  font-size: 12px;
  color: #64748b;
  font-weight: 700;
}
.order-history-date {
  padding-left: 14px !important;
  padding-right: 14px !important;
  white-space: nowrap;
}
.records-table th[data-sort="part"],
.records-table th[data-sort="status"] {
  background: #f0fdf4;
  color: #065f46;
}
.section-filter select,
#invlog-filter-group {
  height: 38px;
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12.5px;
  background: #fff;
  color: #1e293b;
}
@media (max-width: 760px) {
  .order-history-filter-input,
  #order-filter-search,
  .order-date-filter,
  .order-arrival-filter {
    width: 100%;
    flex: 1 1 100%;
  }
  .order-filter-sep { display: none; }
}


/* ============================================================
   v7 사용성/정렬/기록 보정
   ============================================================ */
/* 발주서 기록 필터: 한 줄에 길게 늘어지지 않게 카드형 */
.order-history-toolbar{
  display:grid!important;
  grid-template-columns:auto minmax(180px,1fr) 132px 18px 132px 116px auto auto;
  gap:8px 10px!important;
  align-items:center!important;
  background:#f8fafc;
  border:1px solid #e2e8f0;
  border-radius:14px;
  padding:10px 12px;
  margin-bottom:10px!important;
}
#order-filter-search{min-width:0!important;width:100%!important;flex:unset!important;}
.order-date-filter{width:100%!important;flex:unset!important;cursor:pointer;}
.order-arrival-filter{width:100%!important;flex:unset!important;}
#order-history-summary{justify-self:end;color:#475569;white-space:nowrap;font-weight:700;}
@media(max-width:980px){.order-history-toolbar{grid-template-columns:1fr 1fr}.order-filter-sep{display:none}#order-history-summary{justify-self:start}}
@media(max-width:560px){.order-history-toolbar{grid-template-columns:1fr}}

/* 발주서 품목 입력 버튼을 눈에 띄게 */
.order-input-table{table-layout:fixed;width:100%;}
.order-input-table th:nth-child(1),.order-input-table td:nth-child(1){width:26%;}
.order-input-table th:nth-child(2),.order-input-table td:nth-child(2){width:22%;}
.order-input-table th:nth-child(3),.order-input-table td:nth-child(3){width:12%;}
.order-input-table th:nth-child(4),.order-input-table td:nth-child(4){width:16%;}
.order-input-table th:nth-child(5),.order-input-table td:nth-child(5){width:16%;}
.order-row-tools{min-width:120px!important;display:grid!important;grid-template-columns:1fr;gap:6px!important;}
.order-row-pick,.order-row-remove{font-size:11.5px!important;padding:7px 8px!important;border-radius:8px!important;justify-content:center!important;white-space:nowrap;}
.order-row-pick{background:#ecfdf5!important;color:#047857!important;border-color:#86efac!important;}
.order-row-remove{background:#fff5f5!important;color:#dc2626!important;border-color:#fecaca!important;}

/* 발주서 기록 행: 지나치게 넓고 들쑥날쑥한 느낌 완화 */
.order-history-table{table-layout:fixed!important;border-collapse:separate;border-spacing:0;}
.order-history-table th{background:#f8fafc;color:#334155;font-weight:800;}
.order-history-table td{padding:14px 16px!important;border-bottom:1px solid #eef2f7;}
.order-history-table th:first-child,.order-history-table td:first-child{width:116px!important;padding-left:20px!important;padding-right:14px!important;}
.order-history-table th:nth-child(2),.order-history-table td:nth-child(2){width:auto;}
.order-history-table th:nth-child(3),.order-history-table td:nth-child(3){width:110px!important;}
.order-history-table th:nth-child(4),.order-history-table td:nth-child(4){width:120px!important;}
.order-history-table th:nth-child(5),.order-history-table td:nth-child(5){width:245px!important;}
.order-history-items.compact.all-items{max-width:100%!important;grid-template-columns:repeat(auto-fit,minmax(150px,1fr))!important;max-height:150px!important;border:1px solid #e2e8f0;border-radius:10px;background:#fff;padding:6px!important;}
.order-history-items.compact.all-items .order-history-item{min-height:42px;}

/* 거래내역 조회 관리액션 버튼이 묻히지 않게 */
.records-table .ibtns{display:grid!important;grid-template-columns:repeat(2,minmax(64px,1fr));gap:6px;min-width:154px;}
.records-table .ibtn{font-size:11.5px!important;padding:7px 8px!important;border-radius:8px!important;justify-content:center;background:#fff;}
.records-table .btn-printlog-direct{background:#faf5ff!important;border-color:#ddd6fe!important;color:#7c3aed!important;}
.records-table .btn-view-direct{background:#eff6ff!important;border-color:#bfdbfe!important;}
.records-table .btn-edit-direct{background:#f5f3ff!important;border-color:#ddd6fe!important;}
.records-table .btn-excel-direct{background:#f0fdf4!important;border-color:#bbf7d0!important;}

/* 분류파트/상태 헤더 색상 통일 */
.records-table th[data-sort="part"],
.records-table th[data-sort="status"]{background:#f8fafc!important;color:#334155!important;}

/* 미수금 현황 명세표 버튼 */
.btn-ar-view{white-space:nowrap;}

/* 거래명세서 작성 버튼 균일화 */
.actions .btn{min-width:148px;height:44px;}

/* 입출고대장 자동출고 메모 */
.invlog-note-main{font-weight:600;color:#475569;}

/* 외상 상태 뱃지 */
.credit-badge{display:inline-flex;align-items:center;justify-content:center;gap:4px;min-width:88px;padding:5px 8px;border-radius:999px;font-size:11.5px;font-weight:800;white-space:nowrap;border:1px solid transparent;line-height:1.15}
.credit-unpaid{background:#fff7ed;color:#c2410c;border-color:#fed7aa}
.credit-paid{background:#ecfdf5;color:#047857;border-color:#a7f3d0}
.records-table td .credit-badge i{font-size:10px}


/* ============================================================
   GreenOps ERP Redesign Overlay
   - UI/UX redesign only
   - Keeps existing IDs, JS hooks, APIs, print/document logic intact
   ============================================================ */

:root {
  --primary: #0f6b4f;
  --primary-2: #07845f;
  --primary-dark: #064e3b;
  --primary-soft: #e8f5ef;
  --accent: #f5b942;
  --danger: #e5484d;
  --danger-dark: #c92a2a;
  --danger-soft: #fff1f1;
  --warning: #f59e0b;
  --warning-soft: #fff7e6;
  --info: #2563eb;
  --info-soft: #eef4ff;
  --purple: #7c3aed;
  --purple-soft: #f3ecff;
  --bg: #f7f8f4;
  --surface: #ffffff;
  --surface-soft: #f3f6f1;
  --border: #dde5dc;
  --border-strong: #c9d6cf;
  --text: #102a24;
  --muted: #6b7c74;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 2px 8px rgba(15, 107, 79, 0.06);
  --shadow-card: 0 8px 24px rgba(15, 107, 79, 0.08);
  --shadow-floating: 0 18px 42px rgba(15, 107, 79, 0.13);
}

@media screen {
  html {
    background: var(--bg);
  }

  body {
    background:
      radial-gradient(circle at 8% -8%, rgba(15,107,79,.10), transparent 28%),
      radial-gradient(circle at 92% 0%, rgba(245,185,66,.12), transparent 25%),
      linear-gradient(180deg, #f9faf5 0%, var(--bg) 260px, var(--bg) 100%);
    color: var(--text);
    letter-spacing: -0.012em;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }

  ::selection {
    background: rgba(15, 107, 79, 0.18);
    color: var(--primary-dark);
  }

  ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
  }

  ::-webkit-scrollbar-track {
    background: #eef2ed;
  }

  ::-webkit-scrollbar-thumb {
    background: #bdccc3;
    border-radius: 999px;
    border: 2px solid #eef2ed;
  }

  ::-webkit-scrollbar-thumb:hover {
    background: #95aa9f;
  }

  .wrap {
    max-width: 1280px;
    padding-left: 28px;
    padding-right: 28px;
  }

  main.wrap {
    padding-top: 28px;
  }

  /* Login */
  #auth-layer {
    background:
      radial-gradient(circle at top left, rgba(15,107,79,.16), transparent 34%),
      linear-gradient(135deg, #f7f8f4 0%, #eef4ec 100%);
  }

  .auth-box {
    max-width: 420px;
    border-color: rgba(201,214,207,.85);
    border-radius: 26px;
    padding: 44px 40px;
    box-shadow: var(--shadow-floating);
  }

  .auth-logo i {
    color: var(--primary);
    background: var(--primary-soft);
    width: 74px;
    height: 74px;
    border-radius: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
  }

  .auth-logo h2 {
    color: var(--text);
    font-size: 23px;
    font-weight: 850;
  }

  .auth-logo p {
    color: var(--muted);
  }

  .auth-btn {
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    font-weight: 800;
    padding: 14px 16px;
    box-shadow: 0 10px 20px rgba(15,107,79,.22);
  }

  .auth-btn:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  }

  /* Header / Navigation */
  header {
    background:
      linear-gradient(135deg, rgba(6,78,59,.98) 0%, rgba(15,107,79,.96) 54%, rgba(5,46,34,.98) 100%);
    box-shadow: 0 10px 28px rgba(6,78,59,.18);
    border-bottom: 1px solid rgba(255,255,255,.10);
    position: sticky;
    top: 0;
    z-index: 600;
  }

  .header-top {
    padding: 18px 0 16px;
  }

  .header-top h1 {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.045em;
  }

  .header-top p {
    color: #b7f7d8;
    font-size: 12.5px;
  }

  .icon-leaf {
    color: #b7f7d8;
    background: rgba(255,255,255,.10);
    border: 1px solid rgba(255,255,255,.14);
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .header-btns {
    gap: 10px;
  }

  .logout-btn,
  .pwchg-btn {
    height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255,255,255,.10);
    border-color: rgba(255,255,255,.22);
    font-weight: 700;
    backdrop-filter: blur(8px);
  }

  .logout-btn:hover,
  .pwchg-btn:hover {
    transform: translateY(-1px);
    background: rgba(255,255,255,.18);
  }

  nav.wrap {
    border-top: 1px solid rgba(255,255,255,.10);
    padding: 10px 0 12px;
    gap: 8px;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .tab {
    min-height: 52px;
    justify-content: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid transparent;
    border-bottom: 1px solid transparent;
    color: rgba(255,255,255,.78);
    font-weight: 800;
    line-height: 1.25;
    text-align: center;
    word-break: keep-all;
  }

  .tab i {
    color: #b7f7d8;
    font-size: 15px;
  }

  .tab:hover {
    background: rgba(255,255,255,.10);
    border-color: rgba(255,255,255,.12);
  }

  .tab.on {
    background: #ffffff;
    color: var(--primary-dark);
    border-color: rgba(255,255,255,.92);
    box-shadow: 0 12px 22px rgba(3,38,28,.16);
  }

  .tab.on i {
    color: var(--primary);
  }

  /* General card / sections */
  .card,
  .order-editor-card,
  .order-preview-card,
  .order-history-card,
  .preview-card,
  .alog-box,
  .inventory-card,
  .customer-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
  }

  .card {
    padding: 24px;
    margin-bottom: 22px;
  }

  .card-title,
  .order-preview-title,
  .section-title {
    color: var(--text);
    font-size: 16px;
    font-weight: 900;
    letter-spacing: -0.025em;
    text-transform: none;
  }

  .card-title::before,
  .order-preview-title::before,
  .section-title::before {
    width: 5px;
    height: 20px;
    border-radius: 999px;
    background: linear-gradient(180deg, #10b981, var(--primary));
  }

  .supplier-bar,
  .preview,
  .sumbar,
  .dash-toolbar,
  .order-history-toolbar {
    background: rgba(243,246,241,.86);
    border: 1px solid var(--border);
    border-radius: 16px;
    color: var(--muted);
  }

  /* Form controls */
  input[type="date"],
  input[type="number"],
  input[type="text"],
  input[type="password"],
  select,
  textarea,
  .auth-field input,
  .order-editor-card input,
  .order-editor-card select,
  .order-editor-card textarea,
  .order-history-filter-input,
  #order-filter-search,
  .order-date-filter,
  .order-arrival-filter {
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    min-height: 42px;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
  }

  input:focus,
  select:focus,
  textarea:focus,
  .auth-field input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(15,107,79,.12);
    background: #fff;
  }

  .field label,
  .auth-field label {
    color: #314c42;
    font-weight: 800;
  }

  .req {
    color: var(--danger);
    font-weight: 900;
  }

  /* Buttons */
  .btn,
  .ibtn,
  .pm-btn,
  .page-num-btn,
  .dash-nav-btn,
  .perpage-btn,
  .dash-ptab,
  .pill,
  .logout-btn,
  .pwchg-btn {
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease, color .16s ease;
  }

  .btn:hover,
  .ibtn:hover,
  .page-num-btn:hover,
  .dash-nav-btn:hover,
  .pill:hover {
    transform: translateY(-1px);
  }

  .btn-p,
  .pm-btn-ok {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    border: 0;
    box-shadow: 0 7px 16px rgba(15,107,79,.20);
  }

  .btn-p:hover,
  .pm-btn-ok:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    box-shadow: 0 10px 20px rgba(15,107,79,.25);
  }

  .btn-o,
  .pm-btn-cancel,
  .ibtn {
    background: #fff;
    color: var(--primary-dark);
    border: 1px solid var(--border-strong);
    font-weight: 800;
  }

  .btn-o:hover,
  .pm-btn-cancel:hover,
  .ibtn:hover {
    background: var(--primary-soft);
    border-color: #b6d6c8;
    color: var(--primary-dark);
  }

  .btn-danger,
  .ibtn.d {
    background: var(--danger-soft) !important;
    color: var(--danger-dark) !important;
    border: 1px solid #ffc9c9 !important;
  }

  .btn-danger:hover,
  .ibtn.d:hover {
    background: #ffe3e3 !important;
  }

  .pill {
    border-color: var(--border-strong);
    border-radius: 999px;
    color: #40534c;
    background: #fff;
  }

  .pill.g,
  .pill.on,
  .dash-ptab.on,
  .perpage-btn.on {
    background: var(--primary-soft);
    color: var(--primary-dark);
    border-color: #a8d5c4;
    box-shadow: inset 0 0 0 1px rgba(15,107,79,.05);
  }

  /* Dashboard */
  .dash-toolbar {
    padding: 14px 16px;
    box-shadow: var(--shadow-sm);
  }

  .dash-grid {
    gap: 16px;
  }

  .dash-card,
  .dash-blue,
  .dash-green,
  .dash-red,
  .dash-purple {
    position: relative;
    overflow: hidden;
    background: #fff !important;
    color: var(--text) !important;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 22px 22px 20px;
    box-shadow: var(--shadow-card);
  }

  .dash-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: var(--primary);
  }

  .dash-red::before {
    background: var(--danger);
  }

  .dash-purple::before {
    background: var(--purple);
  }

  .dash-card::after {
    background: radial-gradient(circle, rgba(15,107,79,.10) 0%, transparent 68%);
    opacity: 1;
  }

  .dash-label {
    color: var(--muted) !important;
    font-weight: 850;
    font-size: 12.5px;
  }

  .dash-label i {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-soft);
    color: var(--primary);
  }

  .dash-red .dash-label i {
    background: var(--danger-soft);
    color: var(--danger-dark);
  }

  .dash-purple .dash-label i {
    background: var(--purple-soft);
    color: var(--purple);
  }

  .dash-value {
    color: var(--text);
    font-size: 26px;
    letter-spacing: -0.04em;
  }

  /* Tables */
  .tbl-wrap {
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: auto;
    background: #fff;
    box-shadow: var(--shadow-sm);
  }

  .tbl-wrap table,
  .records-table,
  .parts-table,
  .order-history-table {
    width: 100%;
    border-collapse: separate !important;
    border-spacing: 0 !important;
  }

  .tbl-wrap th,
  .records-table th,
  .parts-table th,
  .order-history-table th,
  .tbl-wrap table:not(.records-table) th {
    background: var(--surface-soft) !important;
    color: #40534c !important;
    font-size: 12.5px;
    font-weight: 900;
    padding: 13px 14px !important;
    border-bottom: 1px solid var(--border) !important;
    white-space: nowrap;
  }

  .tbl-wrap td,
  .records-table td,
  .parts-table td,
  .order-history-table td {
    color: var(--text);
    padding: 13px 14px !important;
    border-bottom: 1px solid #edf2ee !important;
    vertical-align: middle;
  }

  .tbl-wrap tbody tr:hover td,
  .records-table tbody tr:hover td,
  .parts-table tbody tr:hover td,
  .order-history-table tbody tr:hover td {
    background: #fbfdf9;
  }

  .records-table .ibtns,
  .parts-table .ibtns,
  .order-history-table .ibtns {
    gap: 7px;
  }

  .records-table .ibtn,
  .parts-table .ibtn,
  .order-history-table .ibtn {
    min-height: 32px;
    border-radius: 10px !important;
    box-shadow: none;
  }

  .empty-td {
    color: var(--muted) !important;
    background: #fbfcfa !important;
  }

  /* Badges */
  .badge,
  .badge-low,
  .badge-ok,
  .badge-io-in,
  .badge-io-out,
  .badge-io-adjust,
  .credit-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 11.5px;
    font-weight: 900;
    line-height: 1.15;
    border: 1px solid transparent;
    white-space: nowrap;
  }

  .badge,
  .badge-ok,
  .bn {
    background: var(--primary-soft) !important;
    color: var(--primary) !important;
    border-color: #c4e4d7 !important;
  }

  .bo,
  .badge-info {
    background: var(--info-soft) !important;
    color: var(--info) !important;
    border-color: #cfe0ff !important;
  }

  .badge-low,
  .badge-danger {
    background: var(--danger-soft) !important;
    color: var(--danger-dark) !important;
    border-color: #ffc9c9 !important;
  }

  .badge-io-in {
    background: var(--info-soft) !important;
    color: var(--info) !important;
    border-color: #cfe0ff !important;
  }

  .badge-io-out,
  .badge-warning,
  .credit-unpaid {
    background: var(--warning-soft) !important;
    color: #b45309 !important;
    border-color: #f7d38d !important;
  }

  .badge-io-adjust,
  .badge-purple {
    background: var(--purple-soft) !important;
    color: var(--purple) !important;
    border-color: #dfd0ff !important;
  }

  .credit-paid {
    background: var(--primary-soft) !important;
    color: var(--primary) !important;
    border-color: #bce1d2 !important;
  }

  /* Form page refinement */
  .g2,
  .g3,
  .g4e,
  .g5e {
    gap: 18px;
  }

  .item-row-card {
    border-color: var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
    background: linear-gradient(180deg, #fff 0%, #fbfdf9 100%);
  }

  .item-row-header {
    background: var(--surface-soft);
    border-bottom: 1px solid var(--border);
    border-radius: 18px 18px 0 0;
  }

  .preview-card {
    border-color: var(--border);
  }

  .preview-header-bar {
    background: var(--surface-soft);
    border-color: var(--border);
  }

  /* Inventory */
  .parts-table th,
  .parts-table td {
    text-align: left;
  }

  .parts-table td:nth-child(4),
  .parts-table td:nth-child(5),
  .parts-table td:nth-child(6),
  .parts-table td:nth-child(7) {
    text-align: right;
    font-variant-numeric: tabular-nums;
  }

  .parts-table .ibtns {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(56px, 1fr));
    min-width: 190px;
  }

  .invlog-note-main {
    color: var(--primary-dark);
  }

  #invlog-filter-group {
    border-color: var(--border-strong);
    border-radius: 12px;
    min-height: 40px;
  }

  /* Receivables / customer */
  #page-customer .card {
    border-color: var(--border);
  }

  #ar-list .card,
  .ar-card {
    background: #fff !important;
    border-left: 5px solid var(--danger);
    border-top-color: var(--border);
    border-right-color: var(--border);
    border-bottom-color: var(--border);
    box-shadow: var(--shadow-sm);
  }

  .btn-ar-view {
    background: var(--info-soft) !important;
    color: var(--info) !important;
    border-color: #cfe0ff !important;
    border-radius: 10px;
    min-height: 31px;
  }

  /* Order page */
  #page-order {
    --doc-border: #111827;
  }

  .order-layout {
    gap: 22px;
    align-items: start;
  }

  .order-editor-card,
  .order-preview-card,
  .order-history-card {
    border-radius: 20px;
  }

  .order-preview-card {
    position: sticky;
    top: 142px;
  }

  .order-editor-card .g2 {
    gap: 20px;
  }

  .order-input-table {
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
  }

  .order-input-table th {
    background: var(--surface-soft) !important;
    color: #40534c;
  }

  .order-input-table input {
    border-radius: 10px;
  }

  .order-row-tools {
    min-width: 150px !important;
  }

  .order-row-pick,
  .order-row-remove {
    min-height: 34px;
    border-radius: 10px !important;
    font-weight: 900 !important;
  }

  .order-row-pick {
    background: var(--primary-soft) !important;
    color: var(--primary-dark) !important;
    border-color: #bce1d2 !important;
  }

  .order-row-remove {
    background: var(--danger-soft) !important;
    color: var(--danger-dark) !important;
    border-color: #ffc9c9 !important;
  }

  .order-actions {
    background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(247,248,244,.94));
    border-top: 1px solid var(--border);
    padding-top: 18px;
  }

  .order-sheet {
    border-color: var(--doc-border);
    border-radius: 2px;
    box-shadow: 0 12px 28px rgba(16,42,36,.08);
  }

  .order-doc-title {
    color: #0b1720;
  }

  .order-history-toolbar {
    box-shadow: var(--shadow-sm);
  }

  .order-history-title {
    color: var(--text);
    font-weight: 900;
  }

  .order-history-purpose {
    color: var(--muted);
  }

  .order-history-items.compact.all-items {
    border-color: var(--border);
    background: #fbfdf9;
  }

  .order-history-item {
    border-color: var(--border);
    background: #fff;
  }

  .order-arrival-btn,
  .order-arrival-all-btn,
  .order-history-item .arrived {
    border-radius: 999px !important;
    font-weight: 900 !important;
  }

  /* Modals */
  #pretty-modal-container.show,
  .order-modal-overlay.show,
  .parts-pick-modal-overlay.show {
    backdrop-filter: blur(6px);
  }

  .pretty-modal-box,
  .order-modal-box,
  .parts-pick-modal {
    border-radius: 22px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-floating);
  }

  /* Keep document/print-like previews readable and not overly SaaS-styled */
  .tfs,
  .tfs table,
  .order-sheet table {
    letter-spacing: normal;
  }

  /* Responsive */
  @media (max-width: 1180px) {
    nav.wrap {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .order-layout {
      grid-template-columns: 1fr !important;
    }

    .order-preview-card {
      position: static;
    }
  }

  @media (max-width: 820px) {
    .wrap {
      padding-left: 16px;
      padding-right: 16px;
    }

    .header-top {
      flex-wrap: wrap;
    }

    .header-btns {
      width: 100%;
      margin-left: 0;
      justify-content: flex-end;
    }

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

    .tab {
      min-height: 48px;
      font-size: 13px;
    }

    .dash-grid {
      grid-template-columns: 1fr !important;
    }

    .card {
      padding: 18px;
    }
  }

  @media (max-width: 540px) {
    nav.wrap {
      grid-template-columns: 1fr;
    }

    .header-top h1 {
      font-size: 19px;
    }
  }
}


/* ============================================================
   CorpScale final overlay — based on corpscale-DESIGN.md
   - Navy / gray / blue enterprise ERP tone
   - Keeps original HTML, IDs, JS hooks and print logic intact
   ============================================================ */
:root {
  --primary: #1E3A5F;
  --primary-2: #2563EB;
  --primary-dark: #162D4A;
  --primary-soft: #EFF6FF;
  --accent: #2563EB;
  --danger: #DC2626;
  --danger-dark: #B91C1C;
  --danger-soft: #FEF2F2;
  --warning: #CA8A04;
  --warning-soft: #FEF3C7;
  --success: #16A34A;
  --success-soft: #ECFDF5;
  --info: #2563EB;
  --info-soft: #EFF6FF;
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --surface-soft: #F1F5F9;
  --border: #E2E8F0;
  --border-strong: #CBD5E1;
  --text: #0F172A;
  --muted: #64748B;
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 6px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-card: 0 2px 6px rgba(15, 23, 42, 0.06);
  --shadow-floating: 0 12px 32px rgba(15, 23, 42, 0.12);
  --font-head: "Noto Serif KR", "Noto Serif", Georgia, serif;
  --font-body: "Inter", "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-mono: "JetBrains Mono", Consolas, monospace;
}

@media screen {
  body {
    font-family: var(--font-body) !important;
    background: var(--bg) !important;
    color: var(--text) !important;
    letter-spacing: -0.01em;
  }

  h1, h2, h3, .card-title, .dash-value, .order-doc-title, .tfs-name {
    font-family: var(--font-head) !important;
  }

  .tr, code, pre, .dash-period-label {
    font-family: var(--font-mono) !important;
  }

  header {
    background: linear-gradient(135deg, #1E3A5F 0%, #0F172A 100%) !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.14) !important;
  }

  .header-top p,
  .icon-leaf,
  .tab {
    color: #BFDBFE !important;
  }

  .tab.on {
    border-bottom-color: #60A5FA !important;
    color: #FFFFFF !important;
    background: rgba(255, 255, 255, 0.08) !important;
  }

  .card,
  .auth-box,
  .tbl-wrap,
  .sumbar,
  .order-editor-card,
  .order-preview-card,
  .order-history-card {
    border-radius: var(--radius-md) !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--shadow-sm) !important;
    background: var(--surface) !important;
  }

  .card-title {
    color: var(--text) !important;
    font-size: 18px !important;
    line-height: 26px !important;
    font-weight: 700 !important;
  }

  input, select, textarea, .order-history-filter-input {
    border-radius: var(--radius-md) !important;
    border-color: var(--border-strong) !important;
    background: #fff !important;
    color: var(--text) !important;
    font-family: var(--font-body) !important;
    min-height: 36px;
  }

  input:hover, select:hover, textarea:hover {
    border-color: #94A3B8 !important;
  }

  input:focus, select:focus, textarea:focus, .order-history-filter-input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 2px rgba(30, 58, 95, 0.12) !important;
  }

  input.bad,
  .pills.bad,
  .pills.bad .pill {
    border-color: var(--danger) !important;
    background: var(--danger-soft) !important;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.10) !important;
  }

  .pills.bad {
    border: 1px solid var(--danger);
    border-radius: var(--radius-md);
    padding: 8px;
  }

  .pill {
    border-radius: var(--radius-sm) !important;
    border-color: var(--border-strong) !important;
    color: #475569 !important;
    background: #fff !important;
  }

  .pill:hover {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
    background: var(--primary-soft) !important;
  }

  .pill.g,
  .dash-ptab.on,
  .perpage-btn.on,
  .btn-p,
  .auth-btn {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
    box-shadow: none !important;
  }

  .btn-p:hover,
  .auth-btn:hover {
    background: var(--primary-dark) !important;
  }

  .btn,
  .ibtn,
  .page-num-btn,
  .dash-nav-btn,
  .dash-ptab,
  .perpage-btn,
  .order-arrival-btn,
  .order-arrival-all-btn {
    border-radius: var(--radius-md) !important;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease !important;
    font-family: var(--font-body) !important;
  }

  .btn-o,
  .ibtn,
  .page-num-btn {
    background: #fff !important;
    border-color: var(--border-strong) !important;
    color: var(--primary) !important;
  }

  .btn-o:hover,
  .ibtn:hover,
  .page-num-btn:hover {
    background: var(--surface-soft) !important;
    border-color: #94A3B8 !important;
  }

  .btn-danger,
  .ibtn.d {
    background: var(--danger) !important;
    color: #fff !important;
    border-color: var(--danger) !important;
  }

  table {
    font-family: var(--font-body) !important;
  }

  thead,
  th,
  .order-input-table th,
  .order-history-table th {
    background: #F1F5F9 !important;
    color: #475569 !important;
  }

  th {
    padding: 12px 8px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: none;
  }

  td {
    padding: 8px !important;
    border-top-color: var(--border) !important;
  }

  tr:hover td {
    background: #F8FAFC !important;
  }

  .records-table {
    min-width: 1160px !important;
    table-layout: fixed !important;
  }

  .records-table th,
  .records-table td {
    overflow: visible !important;
    text-overflow: clip !important;
  }

  .records-table th:nth-child(1), .records-table td:nth-child(1) { width: 42px !important; }
  .records-table th:nth-child(2), .records-table td:nth-child(2) { width: 92px !important; }
  .records-table th:nth-child(3), .records-table td:nth-child(3) { width: 72px !important; }
  .records-table th:nth-child(4), .records-table td:nth-child(4) { width: 136px !important; white-space: normal !important; }
  .records-table th:nth-child(5), .records-table td:nth-child(5) { width: 86px !important; }
  .records-table th:nth-child(6), .records-table td:nth-child(6) { width: 136px !important; }
  .records-table th:nth-child(7), .records-table td:nth-child(7) { width: 180px !important; white-space: normal !important; }
  .records-table th:nth-child(8), .records-table td:nth-child(8) { width: 92px !important; }
  .records-table th:nth-child(9), .records-table td:nth-child(9) { width: 122px !important; }
  .records-table th:nth-child(10), .records-table td:nth-child(10),
  .records-table th:nth-child(11), .records-table td:nth-child(11) { width: 94px !important; }
  .records-table th:nth-child(12), .records-table td:nth-child(12) { width: 214px !important; }

  .badge,
  .credit-badge,
  .btn-status-toggle,
  .order-history-item .arrived {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    min-height: 24px !important;
    padding: 4px 10px !important;
    border-radius: var(--radius-sm) !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    max-width: none !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  .badge.bn {
    color: #1E3A5F !important;
    background: #F1F5F9 !important;
    border: 1px solid #CBD5E1 !important;
  }

  .badge.bo {
    color: #1E3A5F !important;
    background: #EFF6FF !important;
    border: 1px solid #BFDBFE !important;
  }

  .btn-status-toggle[data-status="done"] {
    color: var(--success) !important;
    background: var(--success-soft) !important;
    border-color: #BBF7D0 !important;
  }

  .btn-status-toggle[data-status="pending"] {
    color: var(--warning) !important;
    background: #FFFBEB !important;
    border-color: #FDE68A !important;
  }

  .credit-badge.credit-unpaid {
    color: var(--warning) !important;
    background: #FFFBEB !important;
    border: 1px solid #FDE68A !important;
  }

  .credit-badge.credit-paid {
    color: var(--success) !important;
    background: var(--success-soft) !important;
    border: 1px solid #BBF7D0 !important;
  }

  .ibtns {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(88px, 1fr)) !important;
    gap: 6px !important;
    margin-left: 0 !important;
    min-width: 0 !important;
  }

  .ibtn {
    min-height: 28px !important;
    padding: 5px 8px !important;
    font-size: 11px !important;
    white-space: nowrap !important;
  }

  .dash-card {
    border-radius: var(--radius-md) !important;
    border: 1px solid var(--border) !important;
    background: #FFFFFF !important;
    color: var(--text) !important;
    box-shadow: var(--shadow-sm) !important;
  }

  .dash-card::after { display: none !important; }
  .dash-blue { border-left: 4px solid #2563EB !important; }
  .dash-green { border-left: 4px solid #16A34A !important; }
  .dash-red { border-left: 4px solid #DC2626 !important; }
  .dash-purple { border-left: 4px solid #6B7280 !important; }
  .dash-label { color: var(--muted) !important; opacity: 1 !important; }
  .dash-value { color: var(--primary) !important; }

  #ar-list {
    gap: 14px !important;
  }

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

  .ar-section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: -0.01em;
  }

  .ar-section-title span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
  }

  .ar-card,
  .ar-record-row,
  .ar-paid-list {
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-md) !important;
    background: #fff !important;
  }

  .ar-card-unpaid {
    border-left: 4px solid var(--warning) !important;
  }

  .ar-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    background: #F8FAFC;
  }

  .ar-card-head strong {
    color: var(--text);
    font-size: 14px;
  }

  .ar-card-head span {
    margin-left: 8px;
    color: var(--muted);
    font-size: 12px;
  }

  .ar-card-head em {
    font-style: normal;
    color: var(--warning);
    font-weight: 900;
  }

  .ar-card-body,
  .ar-paid-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
  }

  .ar-record-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    font-size: 12px;
  }

  .ar-paid-row {
    background: #F8FAFC !important;
  }

  .ar-record-meta {
    color: var(--muted);
    min-width: 0;
    white-space: normal;
    word-break: keep-all;
  }

  .ar-record-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .ar-record-amount {
    color: var(--text);
    font-family: var(--font-mono);
    font-weight: 800;
  }

  .btn-collect {
    background: var(--success-soft) !important;
    color: var(--success) !important;
    border-color: #BBF7D0 !important;
  }

  .ar-empty {
    padding: 14px;
    text-align: center;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-md);
    color: var(--muted);
    background: #F8FAFC;
    font-size: 12px;
  }

  .order-layout {
    grid-template-columns: minmax(500px, 1fr) minmax(420px, 500px) !important;
    gap: 20px !important;
  }

  .order-input-table th,
  .order-input-table td {
    padding: 7px 8px !important;
  }

  .order-input-table input {
    height: 32px !important;
    min-height: 32px !important;
    padding: 6px 8px !important;
    font-size: 12px !important;
  }

  .order-history-table {
    min-width: 980px !important;
    table-layout: fixed !important;
  }

  .order-history-table th:nth-child(1), .order-history-table td:nth-child(1) { width: 112px !important; }
  .order-history-table th:nth-child(3), .order-history-table td:nth-child(3) { width: 88px !important; }
  .order-history-table th:nth-child(4), .order-history-table td:nth-child(4) { width: 120px !important; }
  .order-history-table th:nth-child(5), .order-history-table td:nth-child(5) { width: 220px !important; }

  .order-history-items.compact.all-items {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
    max-height: 150px !important;
    overflow: auto !important;
    gap: 4px !important;
    padding-right: 4px !important;
  }

  .order-history-items.compact.all-items .order-history-item {
    border-radius: var(--radius-md) !important;
    padding: 5px 6px !important;
    font-size: 10.5px !important;
    background: #FFFFFF !important;
  }

  .order-history-table .ibtns {
    grid-template-columns: repeat(2, minmax(82px, 1fr)) !important;
  }

  .order-arrival-btn,
  .order-arrival-all-btn {
    border-radius: var(--radius-sm) !important;
    background: var(--primary-soft) !important;
    border-color: #BFDBFE !important;
    color: var(--primary) !important;
  }

  @media (max-width: 1100px) {
    .order-layout { grid-template-columns: 1fr !important; }
    .order-preview-card { position: static !important; }
  }

  @media (max-width: 760px) {
    .records-table { min-width: 1080px !important; }
    .ar-record-row { align-items: flex-start; flex-direction: column; }
    .ar-record-actions { justify-content: flex-start; }
    .order-history-table { min-width: 900px !important; }
  }
}

/* ============================================================
   User screenshot correction patch — table/actions/order/login
   ============================================================ */
@media screen {
  /* 로그인: 외부 저작권 사진 대신 농기계 느낌의 자체 일러스트 배경 */
  #auth-layer {
    display: grid !important;
    grid-template-columns: minmax(380px, 540px) minmax(340px, 420px) !important;
    gap: 34px !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 44px !important;
    background:
      radial-gradient(circle at 20% 18%, rgba(37, 99, 235, 0.14), transparent 30%),
      radial-gradient(circle at 82% 74%, rgba(22, 163, 74, 0.10), transparent 30%),
      linear-gradient(135deg, #f8fafc 0%, #eef4fb 48%, #f7faf5 100%) !important;
    overflow: hidden !important;
  }

  #auth-layer::before {
    content: "";
    position: absolute;
    inset: auto -6% -9% -6%;
    height: 32%;
    background:
      repeating-linear-gradient(100deg, rgba(30, 58, 95, 0.10) 0 2px, transparent 2px 32px),
      linear-gradient(180deg, rgba(241, 245, 249, 0) 0%, rgba(226, 232, 240, 0.95) 100%);
    transform: skewY(-2deg);
    pointer-events: none;
  }

  .auth-visual {
    position: relative;
    z-index: 1;
    min-height: 430px;
    padding: 46px 44px;
    border: 1px solid rgba(203, 213, 225, 0.78);
    border-radius: 28px;
    color: #0f172a;
    background:
      linear-gradient(140deg, rgba(255,255,255,.84), rgba(239,246,255,.72)),
      radial-gradient(circle at 76% 35%, rgba(30, 58, 95, 0.10), transparent 32%);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.10);
    overflow: hidden;
  }

  .auth-visual::before {
    content: "\f722";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: -8px;
    bottom: 34px;
    font-size: 190px;
    line-height: 1;
    color: rgba(30, 58, 95, 0.10);
  }

  .auth-visual::after {
    content: "";
    position: absolute;
    left: 34px;
    right: 34px;
    bottom: 48px;
    height: 74px;
    border-radius: 22px;
    background:
      repeating-linear-gradient(90deg, rgba(37,99,235,.12) 0 2px, transparent 2px 22px),
      linear-gradient(180deg, rgba(248,250,252,.3), rgba(226,232,240,.75));
  }

  .auth-visual-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1e3a5f;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
  }

  .auth-visual h2 {
    max-width: 430px;
    margin-top: 20px;
    font-family: var(--font-head);
    font-size: 31px;
    line-height: 1.25;
    letter-spacing: -0.03em;
  }

  .auth-visual p {
    max-width: 430px;
    margin-top: 14px;
    color: #475569;
    font-size: 14px;
    line-height: 1.7;
  }

  .auth-machine-card {
    position: absolute;
    left: 44px;
    bottom: 38px;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 290px;
    padding: 14px 16px;
    border: 1px solid rgba(203,213,225,.86);
    border-radius: 18px;
    background: rgba(255,255,255,.88);
    box-shadow: 0 14px 34px rgba(15,23,42,.10);
  }

  .auth-machine-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #1e3a5f, #2563eb);
  }

  .auth-machine-card strong,
  .auth-machine-card span { display: block; }
  .auth-machine-card strong { font-size: 13px; color: #0f172a; }
  .auth-machine-card span { margin-top: 2px; font-size: 11.5px; color: #64748b; }

  .auth-box {
    position: relative;
    z-index: 1;
    max-width: 420px !important;
    border-radius: 24px !important;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.13) !important;
  }

  /* 로그인 후 배경: 조용한 ERP 배경으로 정돈 */
  #main-content {
    min-height: 100vh;
    background:
      linear-gradient(180deg, rgba(248,250,252,.86), rgba(248,250,252,.96)),
      radial-gradient(circle at 12% 10%, rgba(37,99,235,.08), transparent 25%),
      radial-gradient(circle at 88% 30%, rgba(30,58,95,.06), transparent 26%),
      repeating-linear-gradient(0deg, transparent 0 31px, rgba(148,163,184,.075) 31px 32px),
      #f8fafc;
  }

  /* 거래내역: 분류/상태 컬럼 바탕색 차이 제거 */
  .records-table tbody tr,
  .records-table tbody td,
  .records-table tbody td:nth-child(n) {
    background: #fff !important;
  }

  .records-table tbody tr:hover td {
    background: #f8fafc !important;
  }

  .records-table thead th,
  .records-table thead th:nth-child(n) {
    background: #f1f5f9 !important;
  }

  .records-table {
    min-width: 1180px !important;
    width: 100% !important;
  }

  .records-table th,
  .records-table td {
    padding-left: 6px !important;
    padding-right: 6px !important;
  }

  .records-table th:nth-child(1), .records-table td:nth-child(1) { width: 36px !important; }
  .records-table th:nth-child(2), .records-table td:nth-child(2) { width: 88px !important; }
  .records-table th:nth-child(3), .records-table td:nth-child(3) { width: 70px !important; }
  .records-table th:nth-child(4), .records-table td:nth-child(4) { width: 120px !important; }
  .records-table th:nth-child(5), .records-table td:nth-child(5) { width: 72px !important; text-align: center !important; }
  .records-table th:nth-child(6), .records-table td:nth-child(6) { width: 110px !important; text-align: center !important; }
  .records-table th:nth-child(7), .records-table td:nth-child(7) { width: 150px !important; }
  .records-table th:nth-child(8), .records-table td:nth-child(8) { width: 82px !important; text-align: center !important; }
  .records-table th:nth-child(9), .records-table td:nth-child(9) { width: 112px !important; text-align: center !important; }
  .records-table th:nth-child(10), .records-table td:nth-child(10) { width: 84px !important; }
  .records-table th:nth-child(11), .records-table td:nth-child(11) { width: 74px !important; }
  .records-table th:nth-child(12), .records-table td:nth-child(12) { width: 172px !important; }

  .records-table .ibtns {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(48px, 1fr)) !important;
    gap: 4px !important;
    min-width: 154px !important;
    width: 100% !important;
  }

  .records-table .ibtn {
    min-width: 0 !important;
    min-height: 27px !important;
    padding: 4px 5px !important;
    font-size: 10.5px !important;
    line-height: 1 !important;
    gap: 3px !important;
    overflow: visible !important;
  }

  .badge.bn,
  .badge.bo,
  .btn-status-toggle,
  .credit-badge {
    border-radius: 4px !important;
  }

  .badge.bn,
  .badge.bo {
    min-width: 0 !important;
    background: #eff6ff !important;
    color: #1e3a5f !important;
    border-color: #bfdbfe !important;
  }

  .btn-status-toggle[data-status="done"],
  .credit-badge.credit-paid {
    background: #ecfdf5 !important;
    color: #15803d !important;
    border-color: #bbf7d0 !important;
  }

  /* 거래명세서 작성 품목 행: 오른쪽 삭제 버튼 묻힘 방지 */
  .item-row-card {
    overflow: visible !important;
  }

  .item-row-card .g2 > .field:first-child > div {
    display: grid !important;
    grid-template-columns: minmax(110px, 1fr) minmax(74px, 92px) auto !important;
    gap: 6px !important;
  }

  .item-row-card .p-tax {
    max-width: none !important;
  }

  .btn-remove-item-row {
    min-width: 70px !important;
    min-height: 30px !important;
    padding: 5px 10px !important;
  }

  /* 발주서 입력 테이블: 우측 선택/삭제 버튼이 묻히지 않게 */
  .order-input-table-wrap {
    overflow-x: auto !important;
  }

  .order-input-table {
    min-width: 720px !important;
    table-layout: fixed !important;
  }

  .order-input-table colgroup col:nth-child(1) { width: 22% !important; }
  .order-input-table colgroup col:nth-child(2) { width: 18% !important; }
  .order-input-table colgroup col:nth-child(3) { width: 10% !important; }
  .order-input-table colgroup col:nth-child(4) { width: 14% !important; }
  .order-input-table colgroup col:nth-child(5) { width: 15% !important; }
  .order-input-table colgroup col:nth-child(6) { width: 120px !important; }

  .order-row-tools {
    width: 120px !important;
    min-width: 120px !important;
    white-space: normal !important;
    overflow: visible !important;
  }

  .order-row-tools .ibtn,
  .order-row-pick,
  .order-row-remove {
    width: 100% !important;
    min-height: 30px !important;
    padding: 5px 6px !important;
    margin: 2px 0 !important;
    font-size: 11px !important;
    border-radius: 6px !important;
  }

  /* 발주 기록: 품목 카드와 관리 버튼 재정리 */
  .order-history-table {
    min-width: 1120px !important;
    table-layout: fixed !important;
  }

  .order-history-table th:nth-child(1), .order-history-table td:nth-child(1) { width: 106px !important; }
  .order-history-table th:nth-child(2), .order-history-table td:nth-child(2) { width: auto !important; }
  .order-history-table th:nth-child(3), .order-history-table td:nth-child(3) { width: 84px !important; }
  .order-history-table th:nth-child(4), .order-history-table td:nth-child(4) { width: 104px !important; }
  .order-history-table th:nth-child(5), .order-history-table td:nth-child(5) { width: 250px !important; }

  .order-history-title {
    display: inline-block;
    margin-bottom: 4px;
    font-size: 14px;
    color: #0f172a;
  }

  .order-history-purpose {
    display: block;
    margin-bottom: 8px;
    color: #64748b;
  }

  .order-history-items.compact.all-items {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    gap: 6px !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
  }

  .order-history-items.compact.all-items .order-history-item {
    display: inline-grid !important;
    grid-template-columns: minmax(92px, 1fr) auto !important;
    align-items: center !important;
    gap: 6px !important;
    width: auto !important;
    min-width: 156px !important;
    max-width: 190px !important;
    padding: 7px 8px !important;
    border: 1px solid #dbeafe !important;
    background: #f8fbff !important;
  }

  .order-history-item .ohi-main b {
    display: block !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .order-history-item .ohi-main small {
    display: block !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    color: #64748b !important;
  }

  .order-arrival-btn,
  .order-arrival-all-btn,
  .order-history-item .arrived {
    min-height: 24px !important;
    padding: 4px 7px !important;
    border-radius: 4px !important;
    font-size: 10.5px !important;
  }

  .order-history-table .ibtns {
    grid-template-columns: repeat(2, minmax(94px, 1fr)) !important;
    gap: 6px !important;
    min-width: 206px !important;
  }

  .order-history-table .ibtn {
    min-height: 29px !important;
    font-size: 11px !important;
  }

  /* 화면 미리보기 발주서도 너무 작아 보이지 않게 */
  .order-sheet {
    width: 560px !important;
    min-height: 792px !important;
    padding: 34px 32px !important;
    font-size: 12.5px !important;
  }

  .order-doc-title {
    font-size: 24px !important;
    margin-bottom: 22px !important;
  }

  .order-sheet table,
  .order-sheet th,
  .order-sheet td {
    font-size: 12px !important;
  }

  .order-info-table td,
  .order-item-preview-table td {
    padding: 7px 8px !important;
  }

  @media (max-width: 980px) {
    #auth-layer {
      grid-template-columns: minmax(300px, 420px) !important;
      padding: 24px !important;
    }
    .auth-visual { display: none !important; }
    .records-table { min-width: 1120px !important; }
  }
}

/* ============================================================
   Auth overlay visibility fix
   - The redesigned login screen used display:grid !important.
   - This restores hidden state after successful login.
   ============================================================ */
#auth-layer.hidden {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
#main-content.visible {
  display: block !important;
}

/* ============================================================
   Final requested fixes: item inputs, print spacing, modals, order preview
   ============================================================ */
.item-row-card{overflow:visible!important;}
.item-row-card .g4{grid-template-columns:minmax(190px,1.6fr) minmax(120px,1fr) 72px 96px!important;gap:10px!important;align-items:end!important;}
.item-row-card input{min-width:0!important;}
.item-row-card .p-item{width:100%!important;}
.item-row-card .g2{grid-template-columns:minmax(0,1.15fr) minmax(130px,.85fr)!important;gap:10px!important;}
.item-row-card .g2 > .field:first-child > div{display:grid!important;grid-template-columns:minmax(96px,1fr) 72px 54px!important;gap:6px!important;align-items:center!important;}
.item-row-card .p-tax{max-width:none!important;width:100%!important;}
.btn-remove-item-row{min-width:68px!important;white-space:nowrap!important;}
@media(max-width:900px){.item-row-card .g4{grid-template-columns:1fr 1fr!important}.item-row-card .g2{grid-template-columns:1fr!important}}

/* 발주 입력 테이블: 하단 가로 스크롤 제거 + 선택/삭제 노출 */
.order-input-table-wrap{overflow-x:visible!important;width:100%!important;}
.order-input-table{width:100%!important;min-width:0!important;table-layout:fixed!important;}
.order-input-table th,.order-input-table td{padding:8px 6px!important;}
.order-input-table input{width:100%!important;min-width:0!important;padding:9px 8px!important;font-size:12px!important;}
.order-input-table colgroup col:nth-child(1){width:22%!important;}
.order-input-table colgroup col:nth-child(2){width:18%!important;}
.order-input-table colgroup col:nth-child(3){width:9%!important;}
.order-input-table colgroup col:nth-child(4){width:13%!important;}
.order-input-table colgroup col:nth-child(5){width:14%!important;}
.order-input-table colgroup col:nth-child(6){width:112px!important;}
.order-row-tools{width:112px!important;min-width:112px!important;display:grid!important;grid-template-columns:1fr!important;gap:6px!important;overflow:visible!important;}
.order-row-tools .ibtn,.order-row-pick,.order-row-remove{width:100%!important;min-width:0!important;min-height:30px!important;padding:5px 6px!important;font-size:11px!important;justify-content:center!important;}

/* 선택 일괄인쇄: 1개 거래명세서 = 1페이지, 3번째 사진처럼 위/아래 간격 유지 */
@media print{
  body.print-record-mode .lp-page{width:200mm!important;height:287mm!important;padding:0!important;display:block!important;overflow:hidden!important;page-break-after:always!important;break-after:page!important;}
  body.print-record-mode .lp-page .excel-frame{height:287mm!important;width:200mm!important;padding:0!important;background:#fff!important;display:flex!important;flex-direction:column!important;justify-content:flex-start!important;gap:5mm!important;}
  body.print-record-mode .lp-page .excel-divider{display:flex!important;align-items:center!important;justify-content:center!important;height:6mm!important;margin:0!important;color:#94a3b8!important;border-top:1px dashed #cbd5e1!important;border-bottom:0!important;}
  body.print-record-mode .lp-page .excel-divider span{background:#fff!important;padding:0 8px!important;font-size:10px!important;}
  body.print-record-mode .lp-page .tfs{width:200mm!important;height:136mm!important;min-height:0!important;margin:0!important;padding:3.6mm 4.2mm!important;overflow:hidden!important;}
  body.print-record-mode .excel-frame.single-copy{height:auto!important;display:block!important;}
  body.print-record-mode .excel-frame.single-copy .tfs{height:136mm!important;margin:0!important;}
}

/* 재고/그룹 모달 입력창 정리 */
.ppm-name-tools{display:block!important;}
.ppm-name-tools input{width:100%!important;}
.stock-modal-fields{display:grid;grid-template-columns:1fr;gap:12px;margin:14px 0;}
.stock-modal-box .field label{display:block;margin-bottom:6px;font-weight:800;color:#334155;}
.stock-modal-box .field input{width:100%;height:42px;border:1px solid #cbd5e1;border-radius:10px;padding:0 12px;}

/* 발주서 미리보기: 카드 안에서 문서가 잘리지 않게 */
.order-preview-card{overflow-x:auto!important;align-items:center!important;}
.order-preview-card .order-sheet{width:100%!important;max-width:560px!important;min-width:0!important;margin-left:auto!important;margin-right:auto!important;}
.order-preview-card .order-sheet table{width:100%!important;}
@media(max-width:780px){.order-preview-card .order-sheet{max-width:100%!important;padding:24px 16px!important;font-size:11px!important}.order-doc-title{font-size:19px!important;letter-spacing:.22em!important}}
.order-history-activity{display:inline-flex;align-items:center;gap:5px;margin:2px 0 8px;padding:4px 8px;border-radius:999px;background:#f1f5f9;color:#475569;font-size:11px;font-weight:700;}


/* v-final: 거래내역 출력/관리 버튼 컬럼 분리 + 기록 5개 표시 대응 */
.records-table{min-width:1360px!important;}
.records-table th:nth-child(12), .records-table td:nth-child(12){width:180px!important;min-width:180px!important;}
.records-table th:nth-child(13), .records-table td:nth-child(13){width:170px!important;min-width:170px!important;}
.records-output-cell,.records-manage-cell{background:#fff!important;vertical-align:middle!important;}
.ibtns-output,.ibtns-manage{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important;align-items:center!important;justify-content:center!important;width:100%!important;}
.ibtns-output .ibtn,.ibtns-manage .ibtn{width:100%!important;min-width:0!important;min-height:32px!important;padding:6px 6px!important;font-size:11px!important;line-height:1.1!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;justify-content:center!important;}
@media(max-width:1180px){.records-table{min-width:1320px!important}.records-table th:nth-child(12),.records-table td:nth-child(12){width:170px!important;min-width:170px!important}.records-table th:nth-child(13),.records-table td:nth-child(13){width:160px!important;min-width:160px!important}}
@media print{
  body.print-record-mode #print-overlay.show{display:block!important;}
  body.print-record-mode .excel-frame.single-copy{width:200mm!important;max-width:200mm!important;height:auto!important;display:block!important;background:#fff!important;margin:0 auto!important;overflow:visible!important;}
  body.print-record-mode .excel-frame.single-copy .tfs{display:flex!important;width:200mm!important;height:136mm!important;min-height:136mm!important;margin:0 auto!important;visibility:visible!important;opacity:1!important;}
}

/* v-final-2: 출력 컬럼 공급자/공급받는자 인쇄 버튼 추가 및 컬럼 재정렬 */
.records-table{min-width:1480px!important;}
.records-table th:nth-child(12), .records-table td:nth-child(12){width:270px!important;min-width:270px!important;}
.records-table th:nth-child(13), .records-table td:nth-child(13){width:170px!important;min-width:170px!important;}
.ibtns-output{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:5px!important;}
.ibtns-output .ibtn{min-height:30px!important;padding:5px 4px!important;font-size:10.5px!important;letter-spacing:-.02em!important;}
@media(max-width:1180px){
  .records-table{min-width:1460px!important;}
  .records-table th:nth-child(12),.records-table td:nth-child(12){width:260px!important;min-width:260px!important;}
  .records-table th:nth-child(13),.records-table td:nth-child(13){width:165px!important;min-width:165px!important;}
}

/* === Naepo layout hotfix: 거래내역 출력 컬럼 / 거래처 관리 버튼 깨짐 방지 === */
.tbl-wrap{
  overflow-x:auto !important;
  overflow-y:visible !important;
  max-width:100% !important;
}
.records-table{
  table-layout:fixed !important;
  min-width:1580px !important;
  width:1580px !important;
}
.records-table th,
.records-table td{
  box-sizing:border-box !important;
  vertical-align:middle !important;
}
.records-table th:nth-child(10), .records-table td:nth-child(10){width:96px!important;min-width:96px!important;}
.records-table th:nth-child(11), .records-table td:nth-child(11){width:78px!important;min-width:78px!important;}
.records-table th:nth-child(12), .records-table td:nth-child(12){width:250px!important;min-width:250px!important;max-width:250px!important;}
.records-table th:nth-child(13), .records-table td:nth-child(13){width:168px!important;min-width:168px!important;max-width:168px!important;}
.records-output-cell,
.records-manage-cell{
  padding:8px 10px !important;
  overflow:visible !important;
  background:#fff !important;
}
.ibtns-output{
  display:grid!important;
  grid-template-columns:repeat(2, minmax(0, 1fr))!important;
  gap:6px!important;
  width:100%!important;
  min-width:0!important;
}
.ibtns-output .ibtn,
.ibtns-manage .ibtn{
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  min-height:31px!important;
  padding:6px 5px!important;
  font-size:10.5px!important;
  line-height:1.1!important;
  letter-spacing:-.03em!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:4px!important;
}
.ibtns-output .btn-excel-direct{
  grid-column:1 / -1 !important;
}
.ibtns-manage{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:6px!important;
  width:100%!important;
  min-width:0!important;
}

#page-customer .tbl-wrap table{
  min-width:1040px !important;
  table-layout:fixed !important;
}
#page-customer .tbl-wrap th:nth-child(1), #page-customer .tbl-wrap td:nth-child(1){width:20%!important;}
#page-customer .tbl-wrap th:nth-child(2), #page-customer .tbl-wrap td:nth-child(2){width:14%!important;}
#page-customer .tbl-wrap th:nth-child(3), #page-customer .tbl-wrap td:nth-child(3){width:12%!important;}
#page-customer .tbl-wrap th:nth-child(4), #page-customer .tbl-wrap td:nth-child(4){width:14%!important;}
#page-customer .tbl-wrap th:nth-child(5), #page-customer .tbl-wrap td:nth-child(5){width:14%!important;}
#page-customer .tbl-wrap th:nth-child(6), #page-customer .tbl-wrap td:nth-child(6){width:12%!important;}
#page-customer .tbl-wrap th:nth-child(7), #page-customer .tbl-wrap td:nth-child(7){width:180px!important;min-width:180px!important;max-width:180px!important;}
#customer-body td:last-child{
  padding:10px 12px!important;
  overflow:visible!important;
}
#customer-body td:last-child .ibtns{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:8px!important;
  width:100%!important;
  min-width:0!important;
}
#customer-body td:last-child .ibtn{
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  padding:7px 8px!important;
  font-size:11.5px!important;
  justify-content:center!important;
  white-space:nowrap!important;
}
@media(max-width:1200px){
  .records-table{min-width:1580px!important;width:1580px!important;}
  #page-customer .tbl-wrap table{min-width:1040px!important;}
}

/* ============================================================
   HARD FIX 2026-06-27: 거래내역조회 출력/관리 컬럼 깨짐 최종 보정
   - 출력 버튼 5개를 한 칸 안에 세로 정렬
   - 관리 버튼도 세로 정렬
   - 출력/관리 컬럼은 우측 sticky 처리하여 화면 오른쪽에서 잘리지 않게 유지
   ============================================================ */
#page-list .tbl-wrap{
  position:relative!important;
  overflow-x:auto!important;
  overflow-y:visible!important;
  max-width:100%!important;
  padding-bottom:10px!important;
}
#page-list .records-table{
  table-layout:fixed!important;
  width:1320px!important;
  min-width:1320px!important;
  max-width:none!important;
  border-collapse:separate!important;
  border-spacing:0!important;
}
#page-list .records-table th,
#page-list .records-table td{
  box-sizing:border-box!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  vertical-align:middle!important;
}
#page-list .records-table th:nth-child(1), #page-list .records-table td:nth-child(1){width:34px!important;min-width:34px!important;max-width:34px!important;}
#page-list .records-table th:nth-child(2), #page-list .records-table td:nth-child(2){width:88px!important;min-width:88px!important;max-width:88px!important;}
#page-list .records-table th:nth-child(3), #page-list .records-table td:nth-child(3){width:66px!important;min-width:66px!important;max-width:66px!important;}
#page-list .records-table th:nth-child(4), #page-list .records-table td:nth-child(4){width:126px!important;min-width:126px!important;max-width:126px!important;}
#page-list .records-table th:nth-child(5), #page-list .records-table td:nth-child(5){width:62px!important;min-width:62px!important;max-width:62px!important;}
#page-list .records-table th:nth-child(6), #page-list .records-table td:nth-child(6){width:102px!important;min-width:102px!important;max-width:102px!important;}
#page-list .records-table th:nth-child(7), #page-list .records-table td:nth-child(7){width:150px!important;min-width:150px!important;max-width:150px!important;white-space:normal!important;}
#page-list .records-table th:nth-child(8), #page-list .records-table td:nth-child(8){width:82px!important;min-width:82px!important;max-width:82px!important;}
#page-list .records-table th:nth-child(9), #page-list .records-table td:nth-child(9){width:94px!important;min-width:94px!important;max-width:94px!important;}
#page-list .records-table th:nth-child(10), #page-list .records-table td:nth-child(10){width:90px!important;min-width:90px!important;max-width:90px!important;}
#page-list .records-table th:nth-child(11), #page-list .records-table td:nth-child(11){width:58px!important;min-width:58px!important;max-width:58px!important;}
#page-list .records-table th:nth-child(12), #page-list .records-table td:nth-child(12){width:112px!important;min-width:112px!important;max-width:112px!important;}
#page-list .records-table th:nth-child(13), #page-list .records-table td:nth-child(13){width:84px!important;min-width:84px!important;max-width:84px!important;}
#page-list .records-output-cell,
#page-list .records-manage-cell{
  padding:6px!important;
  overflow:visible!important;
  background:#fff!important;
}
#page-list .ibtns-output,
#page-list .ibtns-manage{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:5px!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
}
#page-list .ibtns-output .ibtn,
#page-list .ibtns-manage .ibtn{
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  height:28px!important;
  min-height:28px!important;
  padding:4px 5px!important;
  border-radius:8px!important;
  font-size:10.5px!important;
  line-height:1!important;
  letter-spacing:-.04em!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:4px!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
#page-list .ibtns-output .btn-excel-direct{
  grid-column:auto!important;
}
@media (min-width: 900px){
  #page-list .records-table th:nth-child(13),
  #page-list .records-table td:nth-child(13){
    position:sticky!important;
    right:0!important;
    z-index:5!important;
    box-shadow:-1px 0 0 #e2e8f0!important;
    background:#fff!important;
  }
  #page-list .records-table th:nth-child(12),
  #page-list .records-table td:nth-child(12){
    position:sticky!important;
    right:84px!important;
    z-index:5!important;
    box-shadow:-1px 0 0 #e2e8f0!important;
    background:#fff!important;
  }
  #page-list .records-table thead th:nth-child(12),
  #page-list .records-table thead th:nth-child(13){
    z-index:8!important;
    background:#f1f5f9!important;
  }
}
@media (max-width: 899px){
  #page-list .records-table{width:1180px!important;min-width:1180px!important;}
}

/* ============================================================
   관리자 페이지 / 작업로그 / 요청 보정 패치
   ============================================================ */
#admin-overlay{
  display:none;position:fixed;inset:0;background:rgba(15,23,42,.62);backdrop-filter:blur(4px);
  z-index:10060;align-items:flex-start;justify-content:center;overflow-y:auto;padding:40px 20px;
}
#admin-overlay.show{display:flex;}
.admin-box{max-width:980px!important;margin-top:2%!important;}
.admin-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px;border-bottom:1px solid #e2e8f0;padding-bottom:14px;}
.admin-section{border:1px solid #e2e8f0;border-radius:16px;background:#f8fafc;padding:16px;margin-top:14px;}
.admin-section h3{display:flex;align-items:center;gap:8px;margin:0 0 5px;font-size:15px;color:#0f172a;font-weight:900;}
.admin-section p{margin:0 0 12px;font-size:12px;color:#64748b;line-height:1.5;}
.admin-tool-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;}
.admin-tool-btn{border:1px solid #cbd5e1;background:#fff;border-radius:14px;padding:14px 12px;display:flex;flex-direction:column;align-items:flex-start;gap:5px;cursor:pointer;text-align:left;transition:.15s;color:#0f172a;}
.admin-tool-btn:hover{border-color:#93c5fd;background:#eff6ff;transform:translateY(-1px);}
.admin-tool-btn i{color:#1e3a5f;font-size:18px;}
.admin-tool-btn span{font-weight:900;font-size:13px;}
.admin-tool-btn small{font-size:11px;color:#64748b;line-height:1.35;}
.admin-log-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;}
.admin-log-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end;}
.admin-log-table-wrap{max-height:360px;overflow:auto;border:1px solid #e2e8f0;border-radius:12px;background:#fff;}
.admin-log-table{width:100%;border-collapse:collapse;font-size:12px;min-width:760px;}
.admin-log-table th,.admin-log-table td{padding:9px 10px;border-bottom:1px solid #e2e8f0;text-align:left;vertical-align:top;}
.admin-log-table th{position:sticky;top:0;background:#f1f5f9;z-index:1;color:#334155;font-weight:900;}
.admin-log-table td:nth-child(1){width:145px;white-space:nowrap;color:#475569;}
.admin-log-table td:nth-child(2){width:160px;color:#0f172a;}
.admin-log-table td:nth-child(4){width:70px;text-align:center;color:#64748b;}
@media(max-width:900px){.admin-tool-grid{grid-template-columns:1fr 1fr}.admin-head,.admin-log-head{flex-direction:column;align-items:stretch}.admin-box{padding:20px!important}}
@media(max-width:560px){.admin-tool-grid{grid-template-columns:1fr}}

/* 거래내역 분류 파트가 길어도 대표 품목 요약을 밀지 않게 고정/말줄임 */
#page-list .records-table td:nth-child(6){white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
#page-list .records-table td:nth-child(6) .badge.bo{max-width:92px!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;display:inline-flex!important;}
#page-list .records-table td:nth-child(7){overflow:hidden!important;text-overflow:ellipsis!important;word-break:keep-all!important;}

/* 발주서 재고 선택 모달: 그룹은 기본 축소, 제목 클릭으로 펼침 */
.order-part-group{padding:0!important;overflow:hidden!important;}
.order-part-group-title{width:100%;border:0;background:#f8fafc;margin:0!important;padding:10px 12px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;cursor:pointer;text-align:left;}
.order-part-group-title span{margin-left:auto;color:#64748b;font-size:11px;font-weight:800;}
.order-part-group-body{padding:8px 10px 10px;display:block;}
.order-part-group.is-collapsed .order-part-group-body{display:none!important;}

/* 관리자 화면 위로 완료/오류 알림 모달이 항상 표시되도록 보정 */
#pretty-modal-container.show{z-index:20000!important;}
#pretty-modal-container.show .pretty-modal-box{position:relative;z-index:20001!important;}

/* ============================================================
   2026-06-27 최종 보정: 거래내역 가로 스크롤 제거 + 긴 분류/대표품목 줄바꿈
   - 기존 중복 테이블 폭 보정 규칙보다 뒤에 위치해야 적용됩니다.
   ============================================================ */
#page-list .table-wrap,
#page-list .table-responsive,
#page-list .records-table-wrap {
  overflow-x: hidden !important;
  width: 100% !important;
}
#page-list .records-table {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  table-layout: fixed !important;
}
#page-list .records-table th,
#page-list .records-table td {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  word-break: keep-all !important;
  overflow-wrap: anywhere !important;
  line-height: 1.35 !important;
}
#page-list .records-table th:nth-child(1), #page-list .records-table td:nth-child(1){width:3.2%!important;min-width:0!important;max-width:none!important;}
#page-list .records-table th:nth-child(2), #page-list .records-table td:nth-child(2){width:7.2%!important;min-width:0!important;max-width:none!important;}
#page-list .records-table th:nth-child(3), #page-list .records-table td:nth-child(3){width:5.8%!important;min-width:0!important;max-width:none!important;}
#page-list .records-table th:nth-child(4), #page-list .records-table td:nth-child(4){width:10.4%!important;min-width:0!important;max-width:none!important;}
#page-list .records-table th:nth-child(5), #page-list .records-table td:nth-child(5){width:6.2%!important;min-width:0!important;max-width:none!important;}
#page-list .records-table th:nth-child(6), #page-list .records-table td:nth-child(6){width:9.8%!important;min-width:0!important;max-width:none!important;}
#page-list .records-table th:nth-child(7), #page-list .records-table td:nth-child(7){width:12.2%!important;min-width:0!important;max-width:none!important;}
#page-list .records-table th:nth-child(8), #page-list .records-table td:nth-child(8){width:6.8%!important;min-width:0!important;max-width:none!important;}
#page-list .records-table th:nth-child(9), #page-list .records-table td:nth-child(9){width:8.0%!important;min-width:0!important;max-width:none!important;}
#page-list .records-table th:nth-child(10), #page-list .records-table td:nth-child(10){width:7.0%!important;min-width:0!important;max-width:none!important;}
#page-list .records-table th:nth-child(11), #page-list .records-table td:nth-child(11){width:4.8%!important;min-width:0!important;max-width:none!important;}
#page-list .records-table th:nth-child(12), #page-list .records-table td:nth-child(12){width:11.6%!important;min-width:0!important;max-width:none!important;position:static!important;}
#page-list .records-table th:nth-child(13), #page-list .records-table td:nth-child(13){width:7.0%!important;min-width:0!important;max-width:none!important;position:static!important;}
#page-list .records-table td:nth-child(6) .badge.bo,
#page-list .records-table td:nth-child(5) .badge.bn {
  max-width: 100% !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  display: inline-flex !important;
  justify-content: center !important;
  line-height: 1.25 !important;
}
#page-list .records-table td:nth-child(7) {
  text-align: left !important;
}
#page-list .records-table .ibtns-output,
#page-list .records-table .ibtns-manage {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 5px !important;
  width: 100% !important;
}
#page-list .records-table .ibtn {
  width: 100% !important;
  min-width: 0 !important;
  height: 30px !important;
  padding: 0 4px !important;
  font-size: 11px !important;
  white-space: nowrap !important;
  justify-content: center !important;
}
#page-list .records-table .ibtn i {
  margin-right: 3px !important;
}
@media (max-width: 1180px) {
  #page-list .records-table th:nth-child(2), #page-list .records-table td:nth-child(2),
  #page-list .records-table th:nth-child(3), #page-list .records-table td:nth-child(3),
  #page-list .records-table th:nth-child(5), #page-list .records-table td:nth-child(5) {
    font-size: 11px !important;
  }
  #page-list .records-table .ibtn {
    font-size: 10.5px !important;
    height: 28px !important;
  }
}

/* 2026-06-27: 거래내역 행 바로 아래 미리보기 + 대시보드 직접 기간 설정 */
.dash-custom-range {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 6px 8px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}
.dash-custom-range input[type="date"] {
  height: 32px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  background: #f8fafc;
}
.dash-range-btn {
  height: 32px;
  border: 1px solid #0f766e;
  border-radius: 9px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background: #0f766e;
  cursor: pointer;
}
.dash-range-btn.ghost {
  color: #475569;
  background: #fff;
  border-color: #cbd5e1;
}
.inline-record-preview-row td {
  background: #f8fafc !important;
  padding: 14px !important;
  border-top: 2px solid #cbd5e1 !important;
  border-bottom: 2px solid #cbd5e1 !important;
}
.inline-record-preview-box {
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}
.inline-record-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #0f172a, #1e40af);
  color: #fff;
}
.inline-record-preview-head strong {
  font-size: 13px;
  line-height: 1.35;
}
.inline-record-preview-close {
  color: #0f172a !important;
  background: #ffffff !important;
  border-color: rgba(255,255,255,0.75) !important;
  flex: 0 0 auto;
}
.inline-record-preview-frame {
  padding: 12px;
  overflow-x: auto;
  max-height: 78vh;
  overflow-y: auto;
}
.inline-record-preview-frame .sheet-paper,
.inline-record-preview-frame .premium-sheet,
.inline-record-preview-frame .print-sheet {
  margin-left: auto !important;
  margin-right: auto !important;
}
@media (max-width: 980px) {
  .dash-custom-range {
    width: 100%;
    flex-wrap: wrap;
  }
  .dash-custom-range input[type="date"] {
    flex: 1 1 132px;
  }
  .dash-range-btn {
    flex: 1 1 90px;
  }
}

/* 로그인 페이지 비밀번호 발급 요청 */
.auth-request-row{
  margin-top:10px;
  display:flex;
  justify-content:flex-end;
  align-items:center;
}
.auth-request-link{
  font-size:12px;
  font-weight:700;
  color:#64748b;
  text-decoration:none;
  cursor:pointer;
  line-height:1.4;
}
.auth-request-link:hover,
.auth-request-link:focus{
  color:#0f766e;
  text-decoration:underline;
  outline:none;
}
.password-request-modal{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(15,23,42,.48);
  backdrop-filter:blur(4px);
  z-index:10020;
}
.password-request-modal.show{display:flex;}
.password-request-box{
  position:relative;
  width:min(390px,94vw);
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:20px;
  padding:30px 28px 28px;
  box-shadow:0 24px 70px rgba(15,23,42,.28);
}
.password-request-close{
  position:absolute;
  top:12px;
  right:14px;
  border:0;
  background:transparent;
  color:#94a3b8;
  font-size:28px;
  line-height:1;
  cursor:pointer;
}
.password-request-close:hover{color:#0f172a;}
.password-request-box .auth-field{margin-bottom:14px;}

/* 2026-06-27: DECANT 스타일 관리자 대시보드 레이아웃 적용
   - 기능 ID/버튼 ID는 변경하지 않고 레이아웃과 대시보드 시각 디자인만 조정 */
:root{
  --admin-sidebar:#050607;
  --admin-sidebar-2:#0b0f14;
  --admin-topbar:#f4f6f9;
  --admin-page:#eef1f5;
  --admin-panel:#ffffff;
  --admin-text:#111827;
  --admin-muted:#6b7280;
  --admin-line:#e5e7eb;
  --admin-black:#050505;
  --admin-radius:24px;
}
body{
  background:var(--admin-page) !important;
}
#main-content.visible{
  display:block !important;
  min-height:100vh;
  padding-left:248px;
  padding-top:72px;
  background:
    radial-gradient(circle at 80% 0%, rgba(148,163,184,.18), transparent 30%),
    linear-gradient(135deg,#eef1f5 0%,#f7f8fb 48%,#e9edf3 100%) !important;
}
#main-content.visible::before{
  content:"";
  position:fixed;
  left:248px;
  right:0;
  top:0;
  height:72px;
  z-index:40;
  background:rgba(244,246,249,.92);
  border-bottom:1px solid rgba(209,213,219,.9);
  backdrop-filter:blur(12px);
  box-shadow:0 12px 30px rgba(15,23,42,.05);
}
#main-content.visible > header{
  position:fixed !important;
  left:0;
  top:0;
  bottom:0;
  width:248px;
  z-index:80;
  background:linear-gradient(180deg,var(--admin-sidebar) 0%,var(--admin-sidebar-2) 100%) !important;
  color:#fff;
  box-shadow:22px 0 45px rgba(15,23,42,.22) !important;
  overflow-y:auto;
  overflow-x:hidden;
}
#main-content.visible > header > .wrap{
  width:100%;
  max-width:none !important;
  padding:0 !important;
  margin:0 !important;
}
#main-content.visible .header-top{
  display:block !important;
  padding:26px 20px 18px !important;
  border-bottom:1px solid rgba(255,255,255,.08);
}
#main-content.visible .header-top .icon-leaf{
  width:42px;
  height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:14px;
  background:rgba(255,255,255,.10);
  color:#fff !important;
  font-size:20px !important;
  margin-bottom:12px;
}
#main-content.visible .header-top h1{
  font-size:18px !important;
  font-weight:900 !important;
  letter-spacing:-.04em;
  color:#fff;
}
#main-content.visible .header-top p{
  margin-top:6px !important;
  color:rgba(255,255,255,.58) !important;
  font-size:11.5px !important;
  line-height:1.45;
}
#main-content.visible .header-btns{
  position:fixed;
  top:16px;
  right:22px;
  z-index:90;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  margin:0 !important;
}
#main-content.visible .pwchg-btn,
#main-content.visible .logout-btn{
  min-height:40px;
  padding:0 14px !important;
  border-radius:12px !important;
  background:#fff !important;
  color:#111827 !important;
  border:1px solid #d8dde6 !important;
  box-shadow:0 10px 24px rgba(15,23,42,.07);
  font-size:12px !important;
  font-weight:800 !important;
}
#main-content.visible .logout-btn{
  color:#dc2626 !important;
}
#main-content.visible .pwchg-btn:hover,
#main-content.visible .logout-btn:hover{
  transform:translateY(-1px);
  box-shadow:0 16px 30px rgba(15,23,42,.11);
  border-color:#111827 !important;
}
#main-content.visible nav.wrap{
  display:flex !important;
  flex-direction:column !important;
  gap:6px;
  padding:16px 14px !important;
  border:0 !important;
  margin:0 !important;
  max-width:none !important;
}
#main-content.visible .tab{
  width:100%;
  min-height:46px;
  justify-content:flex-start;
  gap:12px;
  padding:0 14px !important;
  border:0 !important;
  border-radius:12px;
  color:rgba(255,255,255,.70) !important;
  font-size:13px !important;
  font-weight:800 !important;
  background:transparent !important;
}
#main-content.visible .tab i{
  width:20px;
  text-align:center;
  color:rgba(255,255,255,.72);
}
#main-content.visible .tab:hover{
  background:rgba(255,255,255,.08) !important;
  color:#fff !important;
}
#main-content.visible .tab.on{
  background:#fff !important;
  color:#050505 !important;
  box-shadow:0 14px 30px rgba(0,0,0,.22);
}
#main-content.visible .tab.on i{
  color:#050505 !important;
}
#main-content.visible > .wrap,
#main-content.visible > main.wrap{
  max-width:1480px !important;
  width:100%;
  margin:0 auto !important;
  padding-left:28px !important;
  padding-right:28px !important;
}
#main-content.visible > .wrap:has(.msg){
  position:relative;
  z-index:60;
}
#main-content.visible main.wrap{
  position:relative;
  z-index:10;
  padding-bottom:46px;
}
#main-content.visible main.wrap::before{
  content:"";
  position:fixed;
  left:248px;
  right:22px;
  top:48px;
  bottom:24px;
  z-index:-1;
  background:rgba(255,255,255,.72);
  border:1px solid rgba(255,255,255,.78);
  border-radius:30px;
  box-shadow:0 24px 80px rgba(15,23,42,.10);
  pointer-events:none;
}
#main-content.visible .msg{
  border-radius:14px !important;
}
#page-dashboard{
  padding-top:4px;
}
#page-dashboard::before{
  content:"대시보드";
  display:block;
  margin:0 0 18px;
  color:#111827;
  font-size:26px;
  font-weight:950;
  letter-spacing:-.055em;
}
#page-dashboard .dash-toolbar{
  background:#fff !important;
  border:1px solid #e6e9ef !important;
  border-radius:22px !important;
  padding:14px !important;
  box-shadow:0 16px 36px rgba(15,23,42,.06);
  margin-bottom:16px !important;
}
#page-dashboard .dash-period-toggle,
#page-dashboard .dash-period-nav,
#page-dashboard .dash-custom-range{
  border:1px solid #e5e7eb !important;
  background:#f8fafc !important;
  border-radius:16px !important;
  box-shadow:none !important;
}
#page-dashboard .dash-ptab,
#page-dashboard .dash-nav-btn,
#page-dashboard .dash-range-btn{
  border-radius:12px !important;
}
#page-dashboard .dash-ptab.on,
#page-dashboard .dash-range-btn:not(.ghost){
  background:#050505 !important;
  border-color:#050505 !important;
  color:#fff !important;
}
#page-dashboard .dash-grid{
  grid-template-columns:repeat(5,minmax(0,1fr)) !important;
  gap:14px !important;
  margin-bottom:18px;
}
#page-dashboard .dash-card{
  position:relative;
  min-height:132px;
  padding:22px 20px !important;
  border-radius:22px !important;
  background:#fff !important;
  color:#111827 !important;
  border:1px solid #e6e9ef !important;
  box-shadow:0 18px 40px rgba(15,23,42,.07) !important;
  overflow:hidden;
}
#page-dashboard .dash-card:first-child{
  background:#050505 !important;
  color:#fff !important;
  border-color:#050505 !important;
}
#page-dashboard .dash-card::after{
  content:"" !important;
  position:absolute;
  right:-28px;
  bottom:-36px;
  width:96px;
  height:96px;
  border-radius:999px;
  background:rgba(37,99,235,.08);
  transform:none !important;
}
#page-dashboard .dash-card:first-child::after{
  background:rgba(255,255,255,.14);
}
#page-dashboard .dash-label{
  color:inherit !important;
  opacity:.72;
  font-size:13px !important;
  font-weight:900 !important;
}
#page-dashboard .dash-label i{
  color:inherit !important;
}
#page-dashboard .dash-value{
  color:inherit !important;
  font-size:32px !important;
  letter-spacing:-.05em;
}
#page-dashboard .card{
  border-radius:22px !important;
  border:1px solid #e6e9ef !important;
  background:#fff !important;
  box-shadow:0 18px 42px rgba(15,23,42,.06) !important;
}
#page-dashboard .card-title{
  color:#111827 !important;
  font-size:16px !important;
  font-weight:950 !important;
  letter-spacing:-.035em;
}
#page-dashboard .card-title i{
  color:#111827 !important;
}
#main-content.visible .card,
#main-content.visible .panel,
#main-content.visible .section{
  border-radius:22px;
}
@media (max-width:1280px){
  #page-dashboard .dash-grid{grid-template-columns:repeat(3,minmax(0,1fr)) !important;}
}
@media (max-width:980px){
  #main-content.visible{
    padding-left:0;
    padding-top:132px;
  }
  #main-content.visible::before{
    left:0;
    height:132px;
  }
  #main-content.visible > header{
    right:0;
    bottom:auto;
    width:auto;
    height:132px;
    overflow:hidden;
  }
  #main-content.visible .header-top{
    display:flex !important;
    align-items:center;
    padding:14px 16px 8px !important;
  }
  #main-content.visible .header-top .icon-leaf{margin:0 10px 0 0;}
  #main-content.visible .header-btns{
    top:12px;
    right:14px;
  }
  #main-content.visible .header-btns button span{display:none;}
  #main-content.visible nav.wrap{
    flex-direction:row !important;
    overflow-x:auto;
    padding:8px 12px 12px !important;
  }
  #main-content.visible .tab{
    width:auto;
    flex:0 0 auto;
    white-space:nowrap;
    min-height:40px;
  }
  #main-content.visible main.wrap::before{
    left:10px;
    right:10px;
    top:112px;
    bottom:10px;
    border-radius:22px;
  }
  #main-content.visible > .wrap,
  #main-content.visible > main.wrap{
    padding-left:16px !important;
    padding-right:16px !important;
  }
  #page-dashboard .dash-grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important;}
}
@media (max-width:640px){
  #main-content.visible{padding-top:154px;}
  #main-content.visible::before{height:154px;}
  #main-content.visible > header{height:154px;}
  #main-content.visible .header-btns{
    left:12px;
    right:12px;
    top:104px;
    justify-content:space-between;
  }
  #main-content.visible .pwchg-btn,
  #main-content.visible .logout-btn{
    flex:1 1 0;
    padding:0 8px !important;
    font-size:11px !important;
  }
  #page-dashboard .dash-grid{grid-template-columns:1fr !important;}
}

/* ============================================================
   2026-06-27 ERP UI 색상 시스템 + 반응형 최종 정리
   목적: 기존 DOM id/class/이벤트는 유지하고 CSS 중심으로 색상·레이아웃·반응형 개선
   server.js/API/데이터 로직 영향 없음
   ============================================================ */
:root{
  --color-primary:#183B56;
  --color-primary-hover:#0F2A3D;
  --color-accent:#0F766E;
  --color-accent-hover:#115E59;
  --color-bg:#F4F7FA;
  --color-surface:#FFFFFF;
  --color-surface-muted:#F8FAFC;
  --color-border:#D8E0E8;
  --color-border-soft:#E5EAF0;
  --color-text:#172033;
  --color-text-muted:#64748B;
  --color-success:#15803D;
  --color-success-bg:#DCFCE7;
  --color-warning:#D97706;
  --color-warning-bg:#FEF3C7;
  --color-danger:#DC2626;
  --color-danger-bg:#FEE2E2;
  --color-info:#2563EB;
  --color-info-bg:#DBEAFE;
  --erp-sidebar:#0F172A;
  --erp-sidebar-2:#111827;
  --erp-sidebar-soft:#1E293B;
  --erp-radius-sm:10px;
  --erp-radius-md:14px;
  --erp-radius-lg:20px;
  --erp-radius-xl:26px;
  --erp-shadow-sm:0 2px 8px rgba(15,23,42,.04);
  --erp-shadow-md:0 14px 34px rgba(15,23,42,.08);
  --erp-shadow-lg:0 24px 70px rgba(15,23,42,.13);
}

html{scroll-behavior:smooth;}
body{
  font-family:"Inter","Noto Sans KR",-apple-system,BlinkMacSystemFont,"Malgun Gothic",sans-serif !important;
  background:var(--color-bg) !important;
  color:var(--color-text) !important;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
button,input,select,textarea{font-family:inherit !important;}
:focus-visible{
  outline:3px solid rgba(15,118,110,.28) !important;
  outline-offset:2px !important;
}

/* 로그인 화면도 본 UI 색상과 연결 */
#auth-layer{
  background:
    radial-gradient(circle at 12% 12%, rgba(15,118,110,.12), transparent 32%),
    radial-gradient(circle at 84% 80%, rgba(24,59,86,.10), transparent 34%),
    linear-gradient(135deg,#eef4f7 0%,#f8fafc 55%,#eef5f4 100%) !important;
}
.auth-box,.password-request-box{
  border-color:var(--color-border) !important;
  box-shadow:var(--erp-shadow-lg) !important;
}
.auth-logo i{color:var(--color-primary) !important;background:#eef6ff;border-radius:18px;padding:16px;}
.auth-logo h2{color:var(--color-text) !important;}
.auth-btn{
  background:var(--color-primary) !important;
  border-radius:14px !important;
  font-weight:800 !important;
}
.auth-btn:hover{background:var(--color-primary-hover) !important;}
.auth-field input:focus{border-color:var(--color-accent) !important;box-shadow:0 0 0 4px rgba(15,118,110,.14) !important;}
.auth-request-link{color:var(--color-accent) !important;}

/* 기본 레이아웃: 딥 네이비 사이드바 + 차분한 상단바 */
#main-content.visible{
  display:block !important;
  min-height:100vh;
  padding-left:252px !important;
  padding-top:76px !important;
  background:
    radial-gradient(circle at 88% 0%, rgba(15,118,110,.08), transparent 30%),
    linear-gradient(135deg,#EEF3F7 0%,#F7FAFC 46%,#EFF5F4 100%) !important;
}
#main-content.visible::before{
  content:"";
  position:fixed;
  left:252px;
  right:0;
  top:0;
  height:76px;
  z-index:40;
  background:rgba(248,250,252,.92) !important;
  border-bottom:1px solid rgba(216,224,232,.9) !important;
  backdrop-filter:blur(14px);
  box-shadow:0 10px 24px rgba(15,23,42,.05) !important;
}
#main-content.visible > header{
  position:fixed !important;
  left:0;top:0;bottom:0;
  width:252px !important;
  z-index:80;
  background:linear-gradient(180deg,var(--erp-sidebar) 0%,var(--erp-sidebar-2) 100%) !important;
  color:#fff !important;
  box-shadow:18px 0 44px rgba(15,23,42,.18) !important;
  overflow-y:auto;
  overflow-x:hidden;
}
#main-content.visible > header > .wrap{max-width:none !important;width:100%;padding:0 !important;margin:0 !important;}
#main-content.visible .header-top{
  display:block !important;
  padding:26px 20px 18px !important;
  border-bottom:1px solid rgba(255,255,255,.08) !important;
}
#main-content.visible .header-top .icon-leaf{
  width:44px;height:44px;display:inline-flex;align-items:center;justify-content:center;
  border-radius:16px;background:rgba(15,118,110,.22) !important;color:#99F6E4 !important;
  font-size:21px !important;margin:0 0 13px !important;
}
#main-content.visible .header-top h1{font-size:18px !important;font-weight:900 !important;letter-spacing:-.04em;color:#fff !important;}
#main-content.visible .header-top p{font-size:11.5px !important;line-height:1.45;color:rgba(226,232,240,.62) !important;margin-top:6px !important;}
#main-content.visible nav.wrap{
  display:flex !important;flex-direction:column !important;gap:6px;
  max-width:none !important;margin:0 !important;padding:16px 14px !important;border:0 !important;
}
#main-content.visible .tab{
  width:100%;min-height:46px;display:flex;align-items:center;justify-content:flex-start;gap:12px;
  padding:0 14px !important;border:0 !important;border-radius:14px !important;
  color:rgba(226,232,240,.76) !important;background:transparent !important;
  font-size:13px !important;font-weight:800 !important;letter-spacing:-.01em;
}
#main-content.visible .tab i{width:20px;text-align:center;color:rgba(148,163,184,.92) !important;}
#main-content.visible .tab:hover{background:rgba(255,255,255,.075) !important;color:#fff !important;}
#main-content.visible .tab.on{
  background:linear-gradient(135deg,var(--color-primary) 0%,var(--color-accent) 100%) !important;
  color:#fff !important;box-shadow:0 16px 34px rgba(15,118,110,.22) !important;
}
#main-content.visible .tab.on i{color:#fff !important;}

#main-content.visible .header-btns{
  position:fixed !important;top:16px;right:24px;z-index:90;
  display:flex;align-items:center;justify-content:flex-end;gap:8px;margin:0 !important;
}
#main-content.visible .pwchg-btn,#main-content.visible .logout-btn{
  min-height:42px;padding:0 15px !important;border-radius:13px !important;
  background:var(--color-surface) !important;border:1px solid var(--color-border) !important;
  color:var(--color-primary) !important;box-shadow:var(--erp-shadow-sm) !important;
  font-size:12px !important;font-weight:850 !important;transition:all .18s ease !important;
}
#main-content.visible .pwchg-btn:hover,#main-content.visible .logout-btn:hover{transform:translateY(-1px);box-shadow:var(--erp-shadow-md) !important;border-color:#B7C5D3 !important;}
#main-content.visible .logout-btn{color:var(--color-danger) !important;background:#fff !important;}
.mobile-menu-btn{display:none !important;}
.mobile-menu-backdrop{display:none;}

#main-content.visible > .wrap,#main-content.visible > main.wrap{
  max-width:1540px !important;width:100%;margin:0 auto !important;
  padding-left:28px !important;padding-right:28px !important;
}
#main-content.visible main.wrap{position:relative;z-index:10;padding-bottom:46px;}
#main-content.visible main.wrap::before{
  content:"";position:fixed;left:276px;right:24px;top:52px;bottom:22px;z-index:-1;
  border-radius:32px;background:rgba(255,255,255,.70);border:1px solid rgba(255,255,255,.78);
  box-shadow:0 28px 90px rgba(15,23,42,.08);pointer-events:none;
}

/* 카드/패널/폼 공통 */
.card,.panel,.section,.sumbar,.tbl-wrap,.dash-toolbar,.order-editor-card,.order-preview-card,.order-history-card,.admin-panel,.admin-section{
  background:var(--color-surface) !important;
  border:1px solid var(--color-border-soft) !important;
  border-radius:var(--erp-radius-lg) !important;
  box-shadow:var(--erp-shadow-sm) !important;
}
.card-title,.section-title,h2,h3{color:var(--color-text) !important;letter-spacing:-.035em;}
.card-title i,.section-title i{color:var(--color-accent) !important;}
input,select,textarea{
  border:1px solid #CBD5E1 !important;background:#fff !important;color:var(--color-text) !important;
  border-radius:12px !important;transition:border-color .16s, box-shadow .16s, background .16s !important;
}
input::placeholder,textarea::placeholder{color:#94A3B8 !important;}
input:focus,select:focus,textarea:focus{border-color:var(--color-accent) !important;box-shadow:0 0 0 4px rgba(15,118,110,.12) !important;}
label{color:#334155 !important;font-weight:750 !important;}

/* 버튼 색상 규칙 */
.btn, .ibtn, .pwchg-btn, .logout-btn, .dash-range-btn, .dash-nav-btn, .dash-ptab, .mini-btn,
button[class*="btn"], button[class*="-btn"]{
  border-radius:12px !important;font-weight:800 !important;transition:all .16s ease !important;
}
#save-btn,.auth-btn,.dash-range-btn:not(.ghost),.primary-btn,.btn-primary,
button[id*="save"],button[id*="add"],button[id*="register"]{
  background:var(--color-primary) !important;border-color:var(--color-primary) !important;color:#fff !important;
}
#save-btn:hover,.primary-btn:hover,.btn-primary:hover{background:var(--color-primary-hover) !important;}
.ibtn:not(.d),button[id*="view"],button[id*="search"],.btn-info{border-color:#BFDBFE !important;color:#1D4ED8 !important;background:#EFF6FF !important;}
button[id*="print"],.btn-print{border-color:#CBD5E1 !important;color:#334155 !important;background:#F8FAFC !important;}
button[id*="excel"],button[id*="collect"],.btn-success{border-color:#BBF7D0 !important;color:#166534 !important;background:#F0FDF4 !important;}
.ibtn.d,button[id*="delete"],button[id*="remove"],.btn-danger,.logout-btn{border-color:#FECACA !important;color:var(--color-danger) !important;background:#FFF7F7 !important;}
.ibtn:hover,button:hover{filter:none;}
.ibtn.d:hover,button[id*="delete"]:hover,button[id*="remove"]:hover{background:var(--color-danger-bg) !important;border-color:#FCA5A5 !important;}

/* 배지 색상 통일 */
.badge,.pill,.status-badge,.credit-badge{border-radius:999px !important;font-weight:850 !important;letter-spacing:-.01em;}
.badge.ok,.status-complete,.credit-paid,.success{background:var(--color-success-bg) !important;color:var(--color-success) !important;border-color:#BBF7D0 !important;}
.badge.warn,.status-wait,.warning{background:var(--color-warning-bg) !important;color:var(--color-warning) !important;border-color:#FDE68A !important;}
.badge.danger,.danger{background:var(--color-danger-bg) !important;color:var(--color-danger) !important;border-color:#FECACA !important;}
.badge.info,.info{background:var(--color-info-bg) !important;color:var(--color-info) !important;border-color:#BFDBFE !important;}
.bo{background:#FFF7ED !important;color:#B45309 !important;border-color:#FED7AA !important;}
.bn{background:#EFF6FF !important;color:#1D4ED8 !important;border-color:#BFDBFE !important;}

/* 대시보드: 강한 원색 대신 흰색 카드 + 의미색 라인 */
#page-dashboard{padding-top:4px;}
#page-dashboard::before{color:var(--color-text) !important;font-size:26px !important;letter-spacing:-.055em;}
#page-dashboard .dash-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:10px;background:#fff !important;border-color:var(--color-border-soft) !important;border-radius:22px !important;box-shadow:var(--erp-shadow-sm) !important;}
#page-dashboard .dash-period-toggle,#page-dashboard .dash-period-nav,#page-dashboard .dash-custom-range{background:var(--color-surface-muted) !important;border-color:var(--color-border-soft) !important;border-radius:14px !important;}
#page-dashboard .dash-ptab.on,#page-dashboard .dash-range-btn:not(.ghost){background:var(--color-primary) !important;border-color:var(--color-primary) !important;color:#fff !important;}
#page-dashboard .dash-range-btn.ghost{background:#fff !important;color:var(--color-text-muted) !important;border-color:var(--color-border) !important;}
#page-dashboard .dash-grid{display:grid !important;grid-template-columns:repeat(5,minmax(0,1fr)) !important;gap:14px !important;}
#page-dashboard .dash-card{
  position:relative;min-height:124px;padding:20px !important;background:#fff !important;color:var(--color-text) !important;
  border:1px solid var(--color-border-soft) !important;border-left:5px solid var(--color-primary) !important;
  border-radius:22px !important;box-shadow:var(--erp-shadow-sm) !important;overflow:hidden;
}
#page-dashboard .dash-card:first-child{background:#fff !important;color:var(--color-text) !important;border-color:var(--color-border-soft) !important;border-left-color:var(--color-primary) !important;}
#page-dashboard .dash-green{border-left-color:var(--color-accent) !important;}
#page-dashboard .dash-red{border-left-color:var(--color-warning) !important;}
#page-dashboard .dash-purple{border-left-color:var(--color-info) !important;}
#page-dashboard .dash-card::after{background:rgba(15,118,110,.06) !important;}
#page-dashboard .dash-label{color:var(--color-text-muted) !important;opacity:1 !important;font-size:12.5px !important;}
#page-dashboard .dash-label i{color:var(--color-accent) !important;}
#page-dashboard .dash-value{color:var(--color-primary) !important;font-size:30px !important;font-weight:950 !important;}
#page-dashboard .dash-red .dash-value{color:var(--color-warning) !important;}

/* 테이블: 실무 밀도 유지 + 색상 통일 */
.tbl-wrap{overflow-x:hidden !important;background:#fff !important;border-color:var(--color-border) !important;border-radius:18px !important;}
table{width:100% !important;border-collapse:collapse !important;table-layout:fixed !important;}
thead{background:#EEF3F8 !important;border-bottom:1px solid var(--color-border) !important;}
th{color:#334155 !important;font-weight:850 !important;background:#EEF3F8 !important;}
td{color:#263448 !important;border-top:1px solid #EDF2F7 !important;}
tr:hover td{background:#F8FAFC !important;}
.tr{font-family:"JetBrains Mono","Noto Sans KR",monospace !important;font-weight:700;}

/* 거래내역 조회: 데스크톱에서 가로 드래그바 없이 줄바꿈으로 처리 */
.records-table{min-width:0 !important;width:100% !important;table-layout:fixed !important;font-size:11.5px !important;}
.records-table th,.records-table td{padding:9px 5px !important;white-space:normal !important;word-break:keep-all !important;overflow:hidden !important;text-overflow:clip !important;vertical-align:middle !important;}
.records-table th:nth-child(1),.records-table td:nth-child(1){width:3% !important;text-align:center;}
.records-table th:nth-child(2),.records-table td:nth-child(2){width:7.5% !important;}
.records-table th:nth-child(3),.records-table td:nth-child(3){width:6% !important;}
.records-table th:nth-child(4),.records-table td:nth-child(4){width:9% !important;}
.records-table th:nth-child(5),.records-table td:nth-child(5){width:6.5% !important;}
.records-table th:nth-child(6),.records-table td:nth-child(6){width:10% !important;white-space:normal !important;line-height:1.35 !important;}
.records-table th:nth-child(7),.records-table td:nth-child(7){width:12% !important;white-space:normal !important;line-height:1.35 !important;}
.records-table th:nth-child(8),.records-table td:nth-child(8){width:5.5% !important;text-align:center;}
.records-table th:nth-child(9),.records-table td:nth-child(9){width:6.5% !important;text-align:center;}
.records-table th:nth-child(10),.records-table td:nth-child(10){width:7.5% !important;text-align:right;}
.records-table th:nth-child(11),.records-table td:nth-child(11){width:5% !important;text-align:right;}
.records-table th:nth-child(12),.records-table td:nth-child(12){width:11% !important;min-width:0 !important;text-align:center;}
.records-table th:nth-child(13),.records-table td:nth-child(13){width:10.5% !important;min-width:0 !important;text-align:center;}
.records-table .badge{max-width:100%;white-space:normal !important;line-height:1.25 !important;padding:4px 6px !important;}
.ibtns-output,.ibtns-manage{display:grid !important;grid-template-columns:1fr !important;gap:5px !important;width:100% !important;margin:0 !important;}
.ibtns-output .ibtn,.ibtns-manage .ibtn{width:100% !important;min-width:0 !important;min-height:28px !important;padding:5px 4px !important;font-size:10.3px !important;line-height:1.05 !important;white-space:normal !important;overflow:visible !important;text-overflow:clip !important;}
.records-output-cell,.records-manage-cell{background:#fff !important;}

/* 거래명세서 작성/재고/거래처/발주서: 반응형에서 자연스럽게 줄바꿈 */
.g2,.g3,.g4,.form-grid,.filter-grid,.admin-grid,.dash-custom-range{min-width:0;}
.g2 > *,.g3 > *,.g4 > *,.form-grid > *,.filter-grid > *{min-width:0;}
.item-row-card,.part-card,.customer-card,.ar-card,.order-editor-card,.order-preview-card{border-color:var(--color-border-soft) !important;box-shadow:var(--erp-shadow-sm) !important;}
.order-layout{gap:18px !important;}
.order-preview-card{background:#fff !important;}
.order-sheet{box-shadow:0 10px 30px rgba(15,23,42,.08) !important;}

/* 모바일/태블릿 */
@media (max-width:1280px){
  #page-dashboard .dash-grid{grid-template-columns:repeat(3,minmax(0,1fr)) !important;}
}
@media (max-width:1024px){
  #main-content.visible{padding-left:0 !important;padding-top:78px !important;}
  #main-content.visible::before{left:0 !important;height:78px !important;}
  #main-content.visible > header{
    left:0 !important;right:auto !important;top:0 !important;bottom:0 !important;width:min(82vw,320px) !important;height:100vh !important;
    transform:translateX(-104%);transition:transform .22s ease !important;overflow-y:auto !important;
  }
  #main-content.visible.mobile-nav-open > header{transform:translateX(0);}
  .mobile-menu-btn{display:inline-flex !important;align-items:center;gap:6px;}
  .mobile-menu-backdrop{display:none;position:fixed;inset:0;z-index:70;background:rgba(15,23,42,.42);border:0;}
  #main-content.visible.mobile-nav-open .mobile-menu-backdrop{display:block;}
  #main-content.visible .header-top{display:block !important;padding:24px 20px 18px !important;}
  #main-content.visible nav.wrap{flex-direction:column !important;overflow-x:visible !important;padding:14px !important;}
  #main-content.visible .tab{width:100% !important;min-height:46px !important;white-space:normal !important;}
  #main-content.visible .header-btns{top:14px !important;left:14px !important;right:14px !important;justify-content:space-between !important;gap:6px !important;}
  #main-content.visible .pwchg-btn,#main-content.visible .logout-btn{min-height:40px !important;padding:0 10px !important;font-size:11.5px !important;}
  #main-content.visible main.wrap::before{left:10px !important;right:10px !important;top:58px !important;bottom:10px !important;border-radius:22px !important;}
  #main-content.visible > .wrap,#main-content.visible > main.wrap{padding-left:14px !important;padding-right:14px !important;}
  #page-dashboard .dash-grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important;}
  .dash-toolbar{align-items:stretch !important;}
  .dash-custom-range{width:100%;display:flex;flex-wrap:wrap;}
  .order-layout{grid-template-columns:1fr !important;}
  .tbl-wrap{overflow-x:auto !important;-webkit-overflow-scrolling:touch;}
  .records-table{min-width:1120px !important;}
}
@media (max-width:640px){
  #main-content.visible{padding-top:126px !important;}
  #main-content.visible::before{height:126px !important;}
  #main-content.visible .header-btns{flex-wrap:wrap;}
  #main-content.visible .pwchg-btn,#main-content.visible .logout-btn{flex:1 1 calc(50% - 6px);}
  #main-content.visible .logout-btn{flex-basis:100%;}
  #page-dashboard .dash-grid{grid-template-columns:1fr !important;}
  #page-dashboard .dash-card{min-height:108px !important;padding:17px !important;}
  #page-dashboard .dash-value{font-size:26px !important;}
  .g2,.g3,.g4,.item-row-card .g4,.item-row-card .g2,.filter-grid,.form-grid{grid-template-columns:1fr !important;}
  .dash-period-toggle,.dash-period-nav,.dash-custom-range{width:100%;}
  .dash-custom-range input,.dash-custom-range button{flex:1 1 100%;}
  .ibtn{font-size:10.8px !important;}
  th,td{font-size:11px !important;}
}

/* 인쇄물은 화면 디자인 변경의 영향을 받지 않도록 보호 */
@media print{
  #main-content.visible{padding:0 !important;background:#fff !important;}
  #main-content.visible::before,#main-content.visible main.wrap::before{display:none !important;}
  body.print-record-mode .tfs, body.print-record-mode .excel-frame, .order-sheet{box-shadow:none !important;}
}

/* ============================================================
   2026-06-27 긴급 복구 패치: 명세서 미리보기/인쇄/거래내역/대시보드/발주 기록
   - 업무 기능 JS/API는 유지하고 깨진 화면 스타일만 최종 override
   ============================================================ */
/* 공통 알림 아이콘 배경 제거 */
.pretty-modal-box .pm-icon,
.pretty-modal-box .pm-icon i,
.pm-icon,
.pm-icon i{
  background:transparent !important;
  box-shadow:none !important;
  border-radius:0 !important;
  padding:0 !important;
}

/* 거래명세서 양식은 ERP 레이아웃 CSS 영향을 받지 않게 고정 */
.excel-frame,
.inline-record-preview-frame .excel-frame,
#print-target-area .excel-frame{
  width:740px !important;
  max-width:740px !important;
  min-width:740px !important;
  margin:0 auto !important;
  padding:14px !important;
  background:#e8e4df !important;
  box-sizing:border-box !important;
}
.tfs,
.inline-record-preview-frame .tfs,
#print-target-area .tfs{
  width:100% !important;
  box-sizing:border-box !important;
  display:block !important;
  overflow:hidden !important;
  margin:0 0 10px !important;
  padding:0 !important;
  background:#fff !important;
}
.tfs table,
.inline-record-preview-frame .tfs table,
#print-target-area .tfs table{
  width:100% !important;
  table-layout:fixed !important;
  border-collapse:collapse !important;
}
.tfs td,
.inline-record-preview-frame .tfs td,
#print-target-area .tfs td{
  box-sizing:border-box !important;
  overflow:hidden !important;
  text-overflow:clip !important;
  word-break:keep-all !important;
  white-space:normal !important;
  line-height:1.28 !important;
}
.tfs-title{display:block !important;white-space:normal !important;overflow:visible !important;}
.tfs-name{display:inline-block !important;white-space:normal !important;writing-mode:horizontal-tb !important;text-orientation:mixed !important;line-height:1.2 !important;}
.tfs-sub{display:inline-block !important;writing-mode:horizontal-tb !important;white-space:nowrap !important;}
.tfs-sl{writing-mode:horizontal-tb !important;text-orientation:mixed !important;word-break:keep-all !important;white-space:normal !important;}
.tfs-v,.tfs-vb,.tfs-k,.tfs-mid-v,.tfs-mid-k,.tfs-ih,.tfs-fl{writing-mode:horizontal-tb !important;text-orientation:mixed !important;}

/* 거래내역 미리보기는 해당 행 바로 아래에서 안정적으로 펼치기 */
.inline-record-preview-row > td{
  padding:16px 18px !important;
  overflow:visible !important;
  background:#f8fafc !important;
  border-top:1px solid #d8e0e8 !important;
  border-bottom:1px solid #d8e0e8 !important;
}
.inline-record-preview-box{
  width:100% !important;
  max-width:100% !important;
  border:1px solid #d8e0e8 !important;
  border-radius:16px !important;
  background:#fff !important;
  box-shadow:0 12px 30px rgba(15,23,42,.08) !important;
  padding:14px !important;
  overflow:hidden !important;
}
.inline-record-preview-head{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:12px !important;
  padding:0 0 12px !important;
  margin:0 0 12px !important;
  border-bottom:1px solid #e5eaf0 !important;
  color:#172033 !important;
}
.inline-record-preview-frame{
  width:100% !important;
  overflow-x:auto !important;
  overflow-y:hidden !important;
  background:#f1f5f9 !important;
  border-radius:12px !important;
  padding:14px !important;
}

/* 거래내역 조회: 버튼 영역 압축, 행 높이 과도 확대 방지 */
.records-table th:nth-child(6),.records-table td:nth-child(6){width:9% !important;}
.records-table th:nth-child(7),.records-table td:nth-child(7){width:13% !important;}
.records-table th:nth-child(11),.records-table td:nth-child(11){width:4.5% !important;}
.records-table th:nth-child(12),.records-table td:nth-child(12){width:9.5% !important;}
.records-table th:nth-child(13),.records-table td:nth-child(13){width:8.5% !important;}
.records-table td{min-height:0 !important;}
.records-output-cell,.records-manage-cell{padding:6px 5px !important;vertical-align:middle !important;}
.ibtns-output{
  display:grid !important;
  grid-template-columns:1fr 1fr !important;
  gap:4px !important;
  align-items:stretch !important;
}
.ibtns-output .ibtn{
  min-height:24px !important;
  height:24px !important;
  padding:3px 4px !important;
  font-size:10px !important;
  line-height:1 !important;
  border-radius:8px !important;
  white-space:nowrap !important;
}
.ibtns-output .btn-excel-direct{grid-column:1 / -1;}
.ibtns-manage{
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:4px !important;
}
.ibtns-manage .ibtn{
  min-height:24px !important;
  height:24px !important;
  padding:3px 4px !important;
  font-size:10px !important;
  line-height:1 !important;
  border-radius:8px !important;
  white-space:nowrap !important;
}
.btn-status-toggle[data-status="pending"],
.btn-status-toggle.pending{
  color:#dc2626 !important;
  border-color:#fecaca !important;
  background:#fef2f2 !important;
}

/* 대시보드 날짜/버튼 글자 깨짐 방지 */
#page-dashboard .dash-toolbar{gap:12px !important;align-items:center !important;}
#page-dashboard .dash-custom-range{
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
  flex-wrap:nowrap !important;
  min-width:520px !important;
  padding:8px !important;
}
#page-dashboard .dash-custom-range input{
  width:148px !important;
  min-width:148px !important;
  height:40px !important;
  padding:0 12px !important;
  white-space:nowrap !important;
  font-size:13px !important;
}
#page-dashboard .dash-custom-range .dash-range-btn,
#page-dashboard .dash-range-btn{
  min-width:64px !important;
  height:40px !important;
  padding:0 12px !important;
  white-space:nowrap !important;
  writing-mode:horizontal-tb !important;
  word-break:keep-all !important;
  line-height:1 !important;
}
#page-dashboard .dash-period-label{white-space:nowrap !important;word-break:keep-all !important;}
#page-dashboard .dash-card *{writing-mode:horizontal-tb !important;word-break:keep-all !important;}

/* 명세서 작성 품목 연동 슬롯: 어색한 제목/폼 폭 복구 */
.item-row-card{overflow:visible !important;}
.item-row-header{display:flex !important;align-items:center !important;justify-content:space-between !important;gap:10px !important;}
.item-row-title{white-space:nowrap !important;word-break:keep-all !important;font-size:13px !important;line-height:1.2 !important;}
.item-row-card .g4{grid-template-columns:minmax(220px,1.5fr) minmax(140px,1fr) minmax(90px,.55fr) minmax(120px,.75fr) !important;}
.item-row-card .g2{grid-template-columns:minmax(260px,1.1fr) minmax(180px,1fr) !important;}
.item-row-card input{min-width:0 !important;}

/* 발주서 기록 품목/택배도착 버튼: 불필요한 세로 확장 축소 */
.order-history-items.compact.all-items{
  display:flex !important;
  flex-wrap:wrap !important;
  align-items:flex-start !important;
  gap:6px !important;
  max-height:none !important;
  overflow:visible !important;
  padding:6px 0 0 !important;
}
.order-history-item{
  display:inline-grid !important;
  grid-template-columns:minmax(88px,1fr) auto !important;
  align-items:center !important;
  gap:4px 6px !important;
  width:auto !important;
  min-width:138px !important;
  max-width:180px !important;
  min-height:36px !important;
  padding:6px 7px !important;
  border-radius:8px !important;
  background:#f8fafc !important;
}
.order-history-item .ohi-main{min-width:0 !important;}
.order-history-item b,
.order-history-item small{display:block !important;overflow:hidden !important;text-overflow:ellipsis !important;white-space:nowrap !important;}
.order-arrival-btn,
.order-history-item .arrived{
  min-height:22px !important;
  height:22px !important;
  padding:2px 7px !important;
  font-size:10px !important;
  border-radius:7px !important;
  line-height:1 !important;
  white-space:nowrap !important;
}

/* 화면 미리보기용 인쇄 오버레이 */
#print-overlay.show .psheet{max-width:860px !important;overflow-x:auto !important;}
#print-overlay.show #print-target-area{width:100% !important;max-width:760px !important;margin:0 auto !important;}
#print-overlay.show #print-target-area .excel-frame{transform:none !important;}

/* 실제 인쇄: 빈 페이지 방지 + 기존 명세서 양식 크기 복구 */
@media print{
  @page{size:A4 portrait;margin:6mm 8mm !important;}
  body.print-record-mode, body.print-record-mode html{background:#fff !important;margin:0 !important;padding:0 !important;overflow:visible !important;}
  body.print-record-mode *{visibility:hidden !important;}
  body.print-record-mode #print-target-area,
  body.print-record-mode #print-target-area *{visibility:visible !important;}
  body.print-record-mode #print-overlay,
  body.print-record-mode .psheet{
    display:block !important;
    position:static !important;
    background:#fff !important;
    padding:0 !important;
    margin:0 !important;
    width:auto !important;
    max-width:none !important;
    box-shadow:none !important;
    border:0 !important;
    overflow:visible !important;
  }
  body.print-record-mode .pbtns{display:none !important;}
  body.print-record-mode #print-target-area{
    position:absolute !important;
    left:0 !important;
    top:0 !important;
    width:182mm !important;
    max-width:182mm !important;
    margin:0 !important;
    padding:0 !important;
    overflow:visible !important;
  }
  body.print-record-mode #print-target-area .excel-frame{
    width:182mm !important;
    min-width:182mm !important;
    max-width:182mm !important;
    padding:0 !important;
    margin:0 auto !important;
    background:#fff !important;
    page-break-inside:avoid !important;
    break-inside:avoid !important;
  }
  body.print-record-mode #print-target-area .tfs{
    width:182mm !important;
    margin:0 0 2.5mm !important;
    page-break-inside:avoid !important;
    break-inside:avoid !important;
  }
  body.print-record-mode #print-target-area .excel-divider{
    display:block !important;
    margin:1.6mm 0 !important;
    padding:1.5mm 0 !important;
  }
  body.print-record-mode #print-target-area .lp-page{
    width:182mm !important;
    max-width:182mm !important;
    page-break-after:always !important;
    break-after:page !important;
  }
  body.print-record-mode #print-target-area .lp-page.lp-last,
  body.print-record-mode #print-target-area .lp-page:last-child{
    page-break-after:auto !important;
    break-after:auto !important;
  }
  body.print-record-mode #print-target-area.pf-active,
  body.print-record-mode #print-target-area.pf-active .excel-frame,
  body.print-record-mode #print-target-area.pf-active .tfs{
    transform:none !important;
    --pscale:1 !important;
  }
}

@media (max-width:1280px){
  #page-dashboard .dash-custom-range{min-width:100% !important;flex-wrap:wrap !important;}
}
@media (max-width:640px){
  #page-dashboard .dash-custom-range input,
  #page-dashboard .dash-custom-range .dash-range-btn{width:100% !important;min-width:0 !important;flex:1 1 100% !important;}
  .item-row-card .g4,.item-row-card .g2{grid-template-columns:1fr !important;}
}

/* 2026-06-27 선택 일괄인쇄 복구: A4 한 페이지에 명세서 2건씩 배치 */
@media print {
  body.print-record-mode #print-target-area .lp-page {
    width: 200mm !important;
    height: 287mm !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    overflow: hidden !important;
    page-break-after: always !important;
    break-after: page !important;
    padding: 0 !important;
    margin: 0 auto !important;
  }
  body.print-record-mode #print-target-area .lp-page:last-child,
  body.print-record-mode #print-target-area .lp-page.lp-last {
    page-break-after: auto !important;
    break-after: auto !important;
  }
  body.print-record-mode #print-target-area .lp-slot {
    width: 200mm !important;
    height: 137mm !important;
    flex: 0 0 137mm !important;
    overflow: hidden !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  body.print-record-mode #print-target-area .lp-slot .excel-frame.single-copy {
    width: 200mm !important;
    max-width: 200mm !important;
    height: 137mm !important;
    display: block !important;
    overflow: hidden !important;
    background: #fff !important;
    margin: 0 auto !important;
    padding: 0 !important;
  }
  body.print-record-mode #print-target-area .lp-slot .excel-frame.single-copy .tfs {
    width: 200mm !important;
    height: 137mm !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 3.6mm 4.2mm !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }
  body.print-record-mode #print-target-area .lp-sep {
    height: 8mm !important;
    flex: 0 0 8mm !important;
    margin: 0 !important;
    padding: 2mm 0 0 !important;
    border-top: 1px dashed #94a3b8 !important;
    color: #94a3b8 !important;
    text-align: center !important;
    font-size: 10px !important;
    line-height: 1 !important;
  }
  body.print-record-mode #print-target-area .lp-sep span {
    background: #fff !important;
    padding: 0 8px !important;
  }
}

/* ===== hotfix-final-20260627 ===== */
/* 거래내역 출력/관리 컬럼: 폭 축소 + 버튼 과확장 방지 */
.records-table{min-width:1260px!important;table-layout:fixed!important;}
.records-table th:nth-child(10), .records-table td:nth-child(10){width:110px!important;}
.records-table th:nth-child(11), .records-table td:nth-child(11){width:78px!important;}
.records-table th:nth-child(12), .records-table td:nth-child(12){width:132px!important;min-width:132px!important;}
.records-table th:nth-child(13), .records-table td:nth-child(13){width:92px!important;min-width:92px!important;}
.records-output-cell,.records-manage-cell{padding:8px 6px!important;vertical-align:middle!important;}
.ibtns-output,.ibtns-manage{display:grid!important;grid-template-columns:1fr!important;gap:5px!important;width:100%!important;}
.ibtns-output .ibtn,.ibtns-manage .ibtn{width:100%!important;min-height:28px!important;padding:5px 8px!important;font-size:11px!important;line-height:1.1!important;justify-content:center!important;white-space:nowrap!important;}
.records-table .tr{padding-right:10px!important;}
.btn-status-toggle[data-status="pending"]{color:#dc2626!important;border-color:#fecaca!important;background:#fef2f2!important;}
.btn-status-toggle[data-status="done"]{color:#047857!important;border-color:#a7f3d0!important;background:#f0fdf4!important;}

/* 보기 미리보기: 행 아래에서 정상 크기로 렌더 */
.inline-record-preview-row td{padding:12px!important;background:#f8fafc!important;}
.inline-record-preview-box{border:1px solid #dbe3ee!important;border-radius:14px!important;overflow:hidden!important;background:#fff!important;box-shadow:0 14px 34px rgba(15,23,42,.08)!important;}
.inline-record-preview-head{padding:10px 14px!important;background:#f8fafc!important;color:#0f172a!important;border-bottom:1px solid #e2e8f0!important;}
.inline-record-preview-head strong{font-size:13px!important;font-weight:800!important;}
.inline-record-preview-close{background:#fff!important;color:#334155!important;border-color:#cbd5e1!important;}
.inline-record-preview-frame{padding:12px!important;overflow:auto!important;max-height:76vh!important;background:#f8fafc!important;}
.inline-record-preview-frame .excel-frame{width:760px!important;max-width:760px!important;min-width:760px!important;margin:0 auto!important;padding:14px!important;background:#e8e4df!important;}
.inline-record-preview-frame .excel-frame.single-copy{max-width:760px!important;}
.inline-record-preview-frame .tfs{width:100%!important;min-height:0!important;margin:0 0 10px!important;display:block!important;}
.inline-record-preview-frame .tfs-title{padding:8px 10px!important;}
.inline-record-preview-frame .tfs table{table-layout:fixed!important;}
.inline-record-preview-frame .tfs td{font-size:10.5px!important;line-height:1.3!important;white-space:normal!important;word-break:keep-all!important;overflow:visible!important;}
.inline-record-preview-frame .excel-divider{display:flex!important;align-items:center!important;justify-content:center!important;margin:8px 0!important;color:#94a3b8!important;font-size:11px!important;}
.inline-record-preview-frame .excel-divider::before,.inline-record-preview-frame .excel-divider::after{content:"";flex:1;border-top:1px dashed #cbd5e1;margin:0 8px;}

/* 선택 체크박스/아이콘 배경 깨짐 방지 */
.chk-row{appearance:auto!important;background:transparent!important;box-shadow:none!important;border-radius:0!important;}
.item-row-title{display:inline-flex!important;align-items:center!important;gap:6px!important;font-family:"Noto Sans KR","Malgun Gothic",sans-serif!important;white-space:nowrap!important;letter-spacing:0!important;}
.item-row-title i{display:inline-block!important;font-size:13px!important;background:none!important;box-shadow:none!important;}

/* 발주서 기록 버튼/아이템 간격 축소 */
.order-history-table td{vertical-align:middle!important;}
.order-history-items.compact.all-items{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(132px,1fr))!important;gap:6px!important;max-width:440px!important;max-height:132px!important;padding:4px!important;overflow:auto!important;}
.order-history-items.compact.all-items .order-history-item{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important;gap:3px 6px!important;padding:5px 7px!important;min-height:38px!important;}
.order-history-items.compact.all-items .order-history-item b{font-size:11px!important;}
.order-history-items.compact.all-items .order-history-item small{font-size:10px!important;}
.order-arrival-btn,.order-history-item .arrived{padding:3px 7px!important;font-size:10px!important;line-height:1.1!important;min-height:24px!important;}
.order-history-table .ibtns{display:grid!important;grid-template-columns:1fr 1fr!important;gap:6px!important;max-width:290px!important;}
.order-history-table .ibtn{padding:6px 8px!important;font-size:11px!important;min-height:30px!important;justify-content:center!important;}

/* 대시보드 임의 날짜 UI 글자 깨짐/줄바꿈 방지 */
.dash-custom-range{display:flex!important;align-items:center!important;gap:8px!important;flex-wrap:nowrap!important;}
.dash-custom-range input[type="date"]{min-width:138px!important;width:138px!important;}
.dash-range-btn{min-width:54px!important;white-space:nowrap!important;writing-mode:horizontal-tb!important;}
.dash-toolbar,.dash-toolbar *{writing-mode:horizontal-tb!important;text-orientation:mixed!important;}

/* ===== 인쇄 최종 보정: 기존 양식 유지, 여백/페이지 수 정상화 ===== */
@media print{
  @page{size:A4 portrait;margin:5mm;}
  body.print-record-mode{background:#fff!important;}
  body.print-record-mode > *:not(#print-overlay){display:none!important;}
  body.print-record-mode #print-overlay{display:block!important;position:static!important;inset:auto!important;background:#fff!important;padding:0!important;margin:0!important;overflow:visible!important;}
  body.print-record-mode #print-overlay .psheet{display:block!important;width:100%!important;max-width:none!important;margin:0!important;padding:0!important;border:0!important;box-shadow:none!important;background:#fff!important;}
  body.print-record-mode #print-overlay .pbtns{display:none!important;}
  body.print-record-mode #print-target-area{display:block!important;width:200mm!important;max-width:200mm!important;margin:0 auto!important;padding:0!important;transform:none!important;overflow:visible!important;}
  body.print-record-mode #print-target-area.pf-active{transform:none!important;}
  body.print-record-mode .excel-frame{display:block!important;width:200mm!important;max-width:200mm!important;margin:0 auto!important;padding:0!important;background:#fff!important;overflow:visible!important;}
  body.print-record-mode .excel-frame.single-copy{display:block!important;height:auto!important;}
  body.print-record-mode .tfs{display:flex!important;flex-direction:column!important;box-sizing:border-box!important;width:200mm!important;height:136mm!important;min-height:136mm!important;margin:0!important;padding:3.5mm 4.2mm!important;background:#fff!important;overflow:hidden!important;page-break-inside:avoid!important;break-inside:avoid!important;}
  body.print-record-mode .tfs-title{flex:0 0 auto!important;padding:4.3px 6px!important;}
  body.print-record-mode .tfs-name{font-size:14.5px!important;letter-spacing:3.7px!important;}
  body.print-record-mode .tfs-sub{font-size:9px!important;}
  body.print-record-mode .tfs table{width:100%!important;table-layout:fixed!important;flex:0 0 auto!important;}
  body.print-record-mode .tfs td{padding:3.2px 4px!important;font-size:9.8px!important;line-height:1.12!important;white-space:normal!important;overflow:visible!important;}
  body.print-record-mode .tfs table:nth-of-type(3){flex:1 1 auto!important;}
  body.print-record-mode .tfs table:nth-of-type(3) td{height:25px!important;}
  body.print-record-mode .tfs-bottom{flex:0 0 auto!important;padding:4px 6px!important;}
  body.print-record-mode .excel-divider{display:flex!important;align-items:center!important;justify-content:center!important;height:5mm!important;margin:0!important;color:#94a3b8!important;border:0!important;}
  body.print-record-mode .excel-divider::before,body.print-record-mode .excel-divider::after{content:"";flex:1;border-top:1px dashed #cbd5e1;}
  body.print-record-mode .excel-divider span{padding:0 8px!important;background:#fff!important;font-size:10px!important;}
  body.print-record-mode .lp-page{display:flex!important;flex-direction:column!important;justify-content:flex-start!important;width:200mm!important;height:277mm!important;min-height:277mm!important;max-height:277mm!important;margin:0 auto!important;overflow:hidden!important;page-break-after:always!important;break-after:page!important;}
  body.print-record-mode .lp-page:last-child{page-break-after:auto!important;break-after:auto!important;}
  body.print-record-mode .lp-slot{display:block!important;flex:0 0 136mm!important;width:200mm!important;height:136mm!important;min-height:136mm!important;overflow:hidden!important;}
  body.print-record-mode .lp-slot .excel-frame{width:200mm!important;max-width:200mm!important;height:136mm!important;}
  body.print-record-mode .lp-slot .tfs{height:136mm!important;min-height:136mm!important;}
  body.print-record-mode .lp-sep{display:flex!important;align-items:center!important;justify-content:center!important;flex:0 0 5mm!important;height:5mm!important;margin:0!important;color:#94a3b8!important;}
  body.print-record-mode .lp-sep::before,body.print-record-mode .lp-sep::after{content:"";flex:1;border-top:1px dashed #cbd5e1;}
  body.print-record-mode .lp-sep span{padding:0 8px!important;background:#fff!important;font-size:10px!important;}
}


/* ===== invoice-form-restore-final-20260627 ===== */
/* 기존 거래명세서 양식을 디자인 테이블 CSS 영향에서 분리 */
.excel-frame,
.inline-record-preview-frame .excel-frame,
#print-target-area .excel-frame{
  font-family:"Malgun Gothic","맑은 고딕",Arial,sans-serif !important;
  color:#1f2937 !important;
}
.tfs,
.inline-record-preview-frame .tfs,
#print-target-area .tfs{
  display:block !important;
  box-sizing:border-box !important;
  background:#fff !important;
  overflow:hidden !important;
}
.tfs table,
.inline-record-preview-frame .tfs table,
#print-target-area .tfs table{
  width:100% !important;
  border-collapse:collapse !important;
  table-layout:auto !important;
}
.tfs td,
.inline-record-preview-frame .tfs td,
#print-target-area .tfs td{
  box-sizing:border-box !important;
  overflow:visible !important;
  text-overflow:clip !important;
  white-space:normal !important;
  word-break:keep-all !important;
  line-height:1.22 !important;
  writing-mode:horizontal-tb !important;
  text-orientation:mixed !important;
}
.tfs-v,.tfs-vb,
.inline-record-preview-frame .tfs-v,.inline-record-preview-frame .tfs-vb,
#print-target-area .tfs-v,#print-target-area .tfs-vb{
  min-width:54px !important;
  white-space:normal !important;
  word-break:keep-all !important;
}
.tfs-sl,
.inline-record-preview-frame .tfs-sl,
#print-target-area .tfs-sl{
  width:22px !important;
  min-width:22px !important;
  max-width:22px !important;
  white-space:normal !important;
  word-break:keep-all !important;
  line-height:1.45 !important;
}
.tfs-k,
.inline-record-preview-frame .tfs-k,
#print-target-area .tfs-k{
  min-width:46px !important;
}

/* 거래내역 행 아래 미리보기: 기존 양식처럼 보이도록 고정 */
.inline-record-preview-row > td{
  padding:12px 14px !important;
  background:#f8fafc !important;
  border-top:1px solid #dbe3ee !important;
  border-bottom:1px solid #dbe3ee !important;
}
.inline-record-preview-box{
  border:1px solid #dbe3ee !important;
  border-radius:14px !important;
  background:#fff !important;
  overflow:hidden !important;
  box-shadow:0 12px 28px rgba(15,23,42,.08) !important;
}
.inline-record-preview-head{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  padding:10px 14px !important;
  background:#f8fafc !important;
  color:#0f172a !important;
  border-bottom:1px solid #e2e8f0 !important;
}
.inline-record-preview-head strong{
  font-size:13px !important;
  line-height:1.35 !important;
  writing-mode:horizontal-tb !important;
}
.inline-record-preview-frame{
  padding:14px !important;
  background:#f8fafc !important;
  overflow:auto !important;
  max-height:78vh !important;
}
.inline-record-preview-frame .excel-frame{
  width:760px !important;
  max-width:760px !important;
  min-width:760px !important;
  margin:0 auto !important;
  padding:14px !important;
  background:#e8e4df !important;
}
.inline-record-preview-frame .tfs{
  width:100% !important;
  min-height:0 !important;
  margin:0 0 10px !important;
  padding:0 !important;
}
.inline-record-preview-frame .tfs-title{padding:8px 10px !important;}
.inline-record-preview-frame .tfs-name{font-size:18px !important;letter-spacing:5px !important;white-space:normal !important;}
.inline-record-preview-frame .tfs-sub{font-size:12px !important;white-space:nowrap !important;}
.inline-record-preview-frame .tfs td{font-size:10.5px !important;padding:4px 6px !important;}
.inline-record-preview-frame .excel-divider{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:8px !important;
  margin:8px 0 !important;
  color:#94a3b8 !important;
  font-size:11px !important;
}
.inline-record-preview-frame .excel-divider::before,
.inline-record-preview-frame .excel-divider::after{
  content:"" !important;
  flex:1 !important;
  border-top:1px dashed #cbd5e1 !important;
}

/* 거래내역 출력/관리 버튼: 세액과 간격 확보 + 버튼 크기 축소 */
.records-table{
  min-width:1220px !important;
  table-layout:fixed !important;
}
.records-table th:nth-child(10), .records-table td:nth-child(10){width:104px !important;}
.records-table th:nth-child(11), .records-table td:nth-child(11){
  width:76px !important;
  padding-right:14px !important;
}
.records-table th:nth-child(12), .records-table td:nth-child(12){
  width:126px !important;
  min-width:126px !important;
  padding-left:10px !important;
}
.records-table th:nth-child(13), .records-table td:nth-child(13){
  width:86px !important;
  min-width:86px !important;
}
.records-output-cell,.records-manage-cell{
  padding:7px 6px !important;
  vertical-align:middle !important;
}
.ibtns-output{
  display:grid !important;
  grid-template-columns:1fr 1fr !important;
  gap:4px !important;
  width:100% !important;
}
.ibtns-manage{
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:4px !important;
  width:100% !important;
}
.ibtns-output .ibtn,.ibtns-manage .ibtn{
  min-height:24px !important;
  padding:4px 5px !important;
  font-size:10px !important;
  line-height:1.05 !important;
  border-radius:7px !important;
  justify-content:center !important;
  white-space:nowrap !important;
}
.ibtns-output .ibtn i,.ibtns-manage .ibtn i{font-size:10px !important;margin-right:3px !important;}

/* 품목 연동 슬롯 제목/삭제 버튼 깨짐 보정 */
.item-row-header{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  align-items:center !important;
  gap:10px !important;
  padding:10px 12px !important;
}
.item-row-title{
  display:block !important;
  min-width:0 !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
  word-break:keep-all !important;
  writing-mode:horizontal-tb !important;
  text-orientation:mixed !important;
  font-family:"Noto Sans KR","Malgun Gothic",sans-serif !important;
  font-size:13px !important;
  line-height:1.2 !important;
  letter-spacing:0 !important;
}
.item-row-header .btn-remove-item-row{
  position:static !important;
  justify-self:end !important;
  min-width:58px !important;
  height:28px !important;
  padding:4px 9px !important;
  font-size:11px !important;
  line-height:1 !important;
  border-radius:8px !important;
}

/* 발주서 기록 버튼/품목 카드 압축 */
.order-history-items.compact.all-items{
  grid-template-columns:repeat(auto-fit,minmax(126px,1fr)) !important;
  gap:5px !important;
  max-width:420px !important;
  max-height:126px !important;
  padding:4px !important;
}
.order-history-items.compact.all-items .order-history-item{
  min-height:34px !important;
  padding:5px 7px !important;
}
.order-arrival-btn,.order-history-item .arrived{
  min-height:22px !important;
  padding:3px 7px !important;
  font-size:10px !important;
}

/* 인쇄: 디자인 변경 전 182mm x 128mm 양식 기준으로 복구 */
@media print{
  @page{size:A4 portrait;margin:8mm;}
  html,body{width:auto !important;height:auto !important;background:#fff !important;}
  body.print-record-mode > *:not(#print-overlay){display:none !important;}
  body.print-record-mode #print-overlay{
    display:block !important;
    position:static !important;
    inset:auto !important;
    width:auto !important;
    height:auto !important;
    margin:0 !important;
    padding:0 !important;
    background:#fff !important;
    overflow:visible !important;
  }
  body.print-record-mode #print-overlay .psheet{
    display:block !important;
    width:100% !important;
    max-width:none !important;
    height:auto !important;
    margin:0 !important;
    padding:0 !important;
    border:0 !important;
    box-shadow:none !important;
    background:#fff !important;
    overflow:visible !important;
  }
  body.print-record-mode #print-overlay .pbtns{display:none !important;}
  body.print-record-mode #print-target-area{
    display:block !important;
    width:194mm !important;
    max-width:194mm !important;
    height:auto !important;
    margin:0 auto !important;
    padding:0 !important;
    transform:none !important;
    overflow:visible !important;
  }
  body.print-record-mode #print-target-area.pf-active{transform:none !important;}
  body.print-record-mode .excel-frame{
    display:block !important;
    width:194mm !important;
    max-width:194mm !important;
    height:auto !important;
    margin:0 auto !important;
    padding:0 !important;
    background:#fff !important;
    overflow:visible !important;
    page-break-inside:avoid !important;
    break-inside:avoid !important;
  }
  body.print-record-mode .excel-frame.single-copy{
    width:194mm !important;
    max-width:194mm !important;
  }
  body.print-record-mode .tfs{
    display:block !important;
    box-sizing:border-box !important;
    width:182mm !important;
    height:128mm !important;
    min-height:128mm !important;
    margin:0 auto !important;
    padding:0 !important;
    background:#fff !important;
    overflow:hidden !important;
    page-break-inside:avoid !important;
    break-inside:avoid !important;
  }
  body.print-record-mode .tfs-title{
    padding:3.4mm 3mm 2.4mm !important;
  }
  body.print-record-mode .tfs-name{
    font-size:14.2px !important;
    letter-spacing:4.2px !important;
  }
  body.print-record-mode .tfs-sub{font-size:9px !important;}
  body.print-record-mode .tfs table{
    width:100% !important;
    table-layout:auto !important;
    border-collapse:collapse !important;
  }
  body.print-record-mode .tfs td{
    padding:2.5px 3.5px !important;
    font-size:9.5px !important;
    line-height:1.1 !important;
    overflow:visible !important;
    text-overflow:clip !important;
    word-break:keep-all !important;
    white-space:normal !important;
  }
  body.print-record-mode .tfs table:nth-of-type(3) td{
    height:21px !important;
  }
  body.print-record-mode .tfs-bottom{
    padding:3px 5px !important;
  }
  body.print-record-mode .tfs-amt{font-size:12px !important;}
  body.print-record-mode .tfs-paper{font-size:8px !important;}
  body.print-record-mode .excel-divider{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    height:6mm !important;
    margin:0 !important;
    color:#94a3b8 !important;
    border:0 !important;
  }
  body.print-record-mode .excel-divider::before,
  body.print-record-mode .excel-divider::after{
    content:"" !important;
    flex:1 !important;
    border-top:1px dashed #cbd5e1 !important;
  }
  body.print-record-mode .excel-divider span{
    padding:0 8px !important;
    background:#fff !important;
    font-size:10px !important;
  }
  body.print-record-mode .lp-page{
    display:flex !important;
    flex-direction:column !important;
    width:194mm !important;
    height:281mm !important;
    max-height:281mm !important;
    margin:0 auto !important;
    padding:0 !important;
    overflow:hidden !important;
    page-break-after:always !important;
    break-after:page !important;
  }
  body.print-record-mode .lp-page:last-child{
    page-break-after:auto !important;
    break-after:auto !important;
  }
  body.print-record-mode .lp-slot{
    display:block !important;
    flex:0 0 128mm !important;
    width:194mm !important;
    height:128mm !important;
    overflow:hidden !important;
  }
  body.print-record-mode .lp-slot .excel-frame{
    width:194mm !important;
    max-width:194mm !important;
    height:128mm !important;
  }
  body.print-record-mode .lp-slot .tfs{
    width:182mm !important;
    height:128mm !important;
    min-height:128mm !important;
  }
  body.print-record-mode .lp-sep{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    flex:0 0 6mm !important;
    height:6mm !important;
    margin:0 !important;
    color:#94a3b8 !important;
  }
  body.print-record-mode .lp-sep::before,
  body.print-record-mode .lp-sep::after{
    content:"" !important;
    flex:1 !important;
    border-top:1px dashed #cbd5e1 !important;
  }
  body.print-record-mode .lp-sep span{
    padding:0 8px !important;
    background:#fff !important;
    font-size:10px !important;
  }
}

/* ===== naepo-final-overrides-20260627-d ===== */
/* 1) 거래내역 행 미리보기 헤더 깨짐 제거: 양식만 안정적으로 표시 */
.inline-record-preview-head{display:none!important;}
.inline-record-preview-row>td{padding:10px!important;background:#f8fafc!important;}
.inline-record-preview-box{border:1px solid #d8e0e8!important;border-radius:12px!important;background:#fff!important;box-shadow:none!important;overflow:hidden!important;}
.inline-record-preview-frame{padding:10px!important;background:#fff!important;overflow:auto!important;max-height:76vh!important;}
.inline-record-preview-frame .excel-frame{width:760px!important;max-width:760px!important;min-width:760px!important;margin:0 auto!important;padding:12px!important;background:#e8e4df!important;box-sizing:border-box!important;}
.inline-record-preview-frame .tfs{display:block!important;width:100%!important;height:auto!important;min-height:0!important;margin:0 0 9px!important;padding:0!important;overflow:hidden!important;}
.inline-record-preview-frame .tfs table{table-layout:auto!important;width:100%!important;border-collapse:collapse!important;}
.inline-record-preview-frame .tfs td{font-size:10.5px!important;padding:4px 6px!important;line-height:1.25!important;word-break:keep-all!important;white-space:normal!important;overflow:visible!important;writing-mode:horizontal-tb!important;text-orientation:mixed!important;}
.inline-record-preview-frame .tfs-sl{width:22px!important;min-width:22px!important;max-width:22px!important;line-height:1.45!important;}
.inline-record-preview-frame .tfs-title{padding:8px 10px!important;}
.inline-record-preview-frame .tfs-name{font-size:18px!important;letter-spacing:5px!important;}
.inline-record-preview-frame .tfs-sub{font-size:12px!important;}

/* 2) 거래내역 출력/관리 버튼 더 축소 */
.records-table{min-width:1160px!important;table-layout:fixed!important;}
.records-table th:nth-child(10),.records-table td:nth-child(10){width:104px!important;}
.records-table th:nth-child(11),.records-table td:nth-child(11){width:72px!important;padding-right:16px!important;}
.records-table th:nth-child(12),.records-table td:nth-child(12){width:108px!important;min-width:108px!important;padding-left:10px!important;padding-right:5px!important;}
.records-table th:nth-child(13),.records-table td:nth-child(13){width:78px!important;min-width:78px!important;padding-left:5px!important;padding-right:6px!important;}
.records-output-cell,.records-manage-cell{padding:5px!important;vertical-align:middle!important;}
.ibtns-output{display:grid!important;grid-template-columns:1fr 1fr!important;gap:3px!important;width:100%!important;}
.ibtns-manage{display:grid!important;grid-template-columns:1fr!important;gap:3px!important;width:100%!important;}
.ibtns-output .ibtn,.ibtns-manage .ibtn{min-height:21px!important;height:21px!important;padding:2px 4px!important;font-size:9.4px!important;line-height:1!important;border-radius:6px!important;letter-spacing:-.04em!important;justify-content:center!important;white-space:nowrap!important;}
.ibtns-output .ibtn i,.ibtns-manage .ibtn i{font-size:9px!important;margin-right:2px!important;}

/* 3) 사이드바 메뉴 글자 조금 확대 */
.sidebar .tab,.side-menu .tab,.app-sidebar .tab,.sidebar-nav .tab,nav.side-nav .tab{font-size:14px!important;font-weight:800!important;}
.sidebar .tab i,.side-menu .tab i,.app-sidebar .tab i,.sidebar-nav .tab i,nav.side-nav .tab i{font-size:15px!important;}

/* 4) 발주서 기록 품목 카드 가로/세로 스크롤 제거: 작게 접기 */
.order-history-items.compact.all-items{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:4px!important;max-width:365px!important;max-height:none!important;overflow:visible!important;padding:2px!important;border:0!important;background:transparent!important;}
.order-history-items.compact.all-items .order-history-item{min-width:0!important;min-height:32px!important;padding:4px 6px!important;border-radius:7px!important;}
.order-history-items.compact.all-items .order-history-item b{font-size:10.5px!important;max-width:86px!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;}
.order-history-items.compact.all-items .order-history-item small{font-size:9.5px!important;}
.order-arrival-btn,.order-history-item .arrived{min-height:20px!important;padding:2px 6px!important;font-size:9.5px!important;}

/* 5) 품목 연동 슬롯 제목/삭제 버튼 정리 */
.item-row-header{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important;gap:8px!important;padding:8px 10px!important;}
.item-row-title{display:block!important;min-width:0!important;max-width:100%!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;word-break:keep-all!important;writing-mode:horizontal-tb!important;text-orientation:mixed!important;font-size:13px!important;font-weight:800!important;letter-spacing:0!important;}
.item-row-title i{display:none!important;}
.item-row-header .btn-remove-item-row{position:static!important;justify-self:end!important;height:25px!important;min-height:25px!important;min-width:52px!important;padding:3px 8px!important;font-size:10.5px!important;border-radius:7px!important;line-height:1!important;}

/* 6) 인쇄 최종: A4 안에 182x128 양식 2개가 잘리지 않게 */
@media print{
  @page{size:A4 portrait;margin:8mm!important;}
  html,body{margin:0!important;padding:0!important;background:#fff!important;width:auto!important;height:auto!important;}
  body.print-record-mode > *:not(#print-overlay){display:none!important;}
  body.print-record-mode #print-overlay{display:block!important;position:static!important;inset:auto!important;width:auto!important;height:auto!important;margin:0!important;padding:0!important;background:#fff!important;overflow:visible!important;}
  body.print-record-mode #print-overlay .psheet{display:block!important;width:auto!important;max-width:none!important;margin:0!important;padding:0!important;border:0!important;box-shadow:none!important;background:#fff!important;overflow:visible!important;}
  body.print-record-mode .pbtns{display:none!important;}
  body.print-record-mode #print-target-area{display:block!important;width:182mm!important;max-width:182mm!important;margin:0 auto!important;padding:0!important;overflow:visible!important;transform:none!important;}
  body.print-record-mode .excel-frame{display:block!important;width:182mm!important;max-width:182mm!important;margin:0 auto!important;padding:0!important;background:#fff!important;overflow:visible!important;box-sizing:border-box!important;}
  body.print-record-mode .excel-frame.single-copy{width:182mm!important;max-width:182mm!important;height:auto!important;}
  body.print-record-mode .tfs{display:block!important;box-sizing:border-box!important;width:182mm!important;height:128mm!important;min-height:128mm!important;margin:0 auto!important;padding:0!important;background:#fff!important;overflow:hidden!important;break-inside:avoid!important;page-break-inside:avoid!important;}
  body.print-record-mode .tfs table{width:100%!important;table-layout:auto!important;border-collapse:collapse!important;}
  body.print-record-mode .tfs td{padding:2.5px 3.5px!important;font-size:9.45px!important;line-height:1.1!important;word-break:keep-all!important;white-space:normal!important;overflow:visible!important;writing-mode:horizontal-tb!important;text-orientation:mixed!important;}
  body.print-record-mode .tfs-sl{width:22px!important;min-width:22px!important;max-width:22px!important;padding-left:1px!important;padding-right:1px!important;line-height:1.42!important;}
  body.print-record-mode .tfs-title{padding:3.1mm 3mm 2.2mm!important;}
  body.print-record-mode .tfs-name{font-size:14px!important;letter-spacing:4px!important;}
  body.print-record-mode .tfs-sub{font-size:8.8px!important;}
  body.print-record-mode .tfs table:nth-of-type(3) td{height:20.2px!important;}
  body.print-record-mode .tfs-bottom{padding:3px 5px!important;}
  body.print-record-mode .tfs-amt{font-size:11.5px!important;}
  body.print-record-mode .tfs-paper{font-size:8px!important;}
  body.print-record-mode .excel-divider{display:flex!important;align-items:center!important;justify-content:center!important;height:6mm!important;margin:0!important;color:#94a3b8!important;border:0!important;}
  body.print-record-mode .excel-divider::before,body.print-record-mode .excel-divider::after{content:""!important;flex:1!important;border-top:1px dashed #cbd5e1!important;}
  body.print-record-mode .excel-divider span{padding:0 8px!important;background:#fff!important;font-size:10px!important;}
  body.print-record-mode .lp-page{display:flex!important;flex-direction:column!important;width:182mm!important;height:281mm!important;margin:0 auto!important;padding:0!important;overflow:hidden!important;page-break-after:always!important;break-after:page!important;}
  body.print-record-mode .lp-page:last-child{page-break-after:auto!important;break-after:auto!important;}
  body.print-record-mode .lp-slot{display:block!important;flex:0 0 128mm!important;width:182mm!important;height:128mm!important;overflow:hidden!important;}
  body.print-record-mode .lp-slot .excel-frame{width:182mm!important;max-width:182mm!important;height:128mm!important;}
  body.print-record-mode .lp-slot .tfs{width:182mm!important;height:128mm!important;min-height:128mm!important;}
  body.print-record-mode .lp-sep{display:flex!important;align-items:center!important;justify-content:center!important;flex:0 0 6mm!important;height:6mm!important;margin:0!important;color:#94a3b8!important;}
  body.print-record-mode .lp-sep::before,body.print-record-mode .lp-sep::after{content:""!important;flex:1!important;border-top:1px dashed #cbd5e1!important;}
  body.print-record-mode .lp-sep span{padding:0 8px!important;background:#fff!important;font-size:10px!important;}
}


/* ===== invoice-original-output-restore-20260627 =====
   기존 파일의 거래명세서 양식/인쇄 방식을 우선 적용합니다.
   다른 화면 기능은 건드리지 않고 .excel-frame/.tfs/인쇄/미리보기만 분리합니다. */

/* 거래명세서 양식 기본값을 예전 양식으로 되돌림 */
.excel-frame{
  width:100% !important;
  max-width:740px !important;
  margin:0 auto !important;
  padding:14px !important;
  font-family:"맑은 고딕","Malgun Gothic",sans-serif !important;
  color:#222 !important;
  font-size:11px !important;
  background:#e8e4df !important;
}
.tfs{
  display:block !important;
  background:#fff !important;
  border:1.5px dashed #b33a3a !important;
  padding:0 !important;
  margin-bottom:10px !important;
  box-sizing:border-box !important;
  overflow:hidden !important;
}
.tfs.bl{border-color:#2c5f8a !important;}
.tfs-title{
  display:block !important;
  text-align:center !important;
  padding:8px 10px !important;
  border-bottom:1.5px dashed #b33a3a !important;
  background:#fff !important;
  white-space:normal !important;
}
.tfs.bl .tfs-title{border-bottom-color:#2c5f8a !important;background:#fff !important;}
.tfs-name{
  display:inline !important;
  font-size:18px !important;
  font-weight:900 !important;
  letter-spacing:5px !important;
  color:#b33a3a !important;
  white-space:normal !important;
  writing-mode:horizontal-tb !important;
  text-orientation:mixed !important;
}
.tfs.bl .tfs-name{color:#2c5f8a !important;}
.tfs-sub{
  display:inline !important;
  font-size:12px !important;
  font-weight:700 !important;
  color:#b33a3a !important;
  margin-left:14px !important;
  letter-spacing:0 !important;
  white-space:nowrap !important;
  writing-mode:horizontal-tb !important;
}
.tfs.bl .tfs-sub{color:#2c5f8a !important;}
.tfs table{
  width:100% !important;
  border-collapse:collapse !important;
  table-layout:auto !important;
}
.tfs td{
  border:1px dashed #b33a3a !important;
  padding:4px 6px !important;
  vertical-align:middle !important;
  font-size:10.5px !important;
  line-height:1.22 !important;
  word-break:keep-all !important;
  overflow:visible !important;
  white-space:normal !important;
  text-overflow:clip !important;
  writing-mode:horizontal-tb !important;
  text-orientation:mixed !important;
  box-sizing:border-box !important;
}
.tfs.bl td{border-color:#2c5f8a !important;}
.tfs-sl{
  background:#fff !important;
  color:#b33a3a !important;
  text-align:center !important;
  width:22px !important;
  max-width:22px !important;
  min-width:22px !important;
  padding:6px 1px !important;
  font-size:9.5px !important;
  font-weight:800 !important;
  line-height:1.5 !important;
  letter-spacing:0 !important;
  white-space:nowrap !important;
}
.tfs.bl .tfs-sl{background:#fff !important;color:#2c5f8a !important;}
.tfs-k{
  background:#fff !important;
  font-weight:700 !important;
  text-align:center !important;
  font-size:9.5px !important;
  color:#444 !important;
  white-space:nowrap !important;
  min-width:58px !important;
  width:62px !important;
}
.tfs-k small{
  font-size:7.5px !important;
  color:#999 !important;
  font-weight:500 !important;
  display:block !important;
  line-height:1 !important;
}
.tfs-mid-k{
  background:#fff !important;
  color:#b33a3a !important;
  font-weight:700 !important;
  text-align:center !important;
  font-size:9px !important;
  white-space:nowrap !important;
  width:48px !important;
  line-height:1.3 !important;
}
.tfs.bl .tfs-mid-k{background:#fff !important;color:#2c5f8a !important;}
.tfs-mid-v{
  color:#222 !important;
  font-weight:700 !important;
  text-align:center !important;
  font-size:10.5px !important;
  white-space:nowrap !important;
  width:96px !important;
}
.tfs-mid-r{
  color:#444 !important;
  font-size:9.5px !important;
  text-align:left !important;
  padding-left:8px !important;
}
.tfs-v{font-weight:500 !important;color:#222 !important;}
.tfs-vb{font-weight:800 !important;color:#222 !important;font-size:11px !important;}
.tfs-ih{
  background:#fff !important;
  color:#b33a3a !important;
  font-weight:700 !important;
  text-align:center !important;
  letter-spacing:2px !important;
  font-size:10px !important;
  padding:5px 2px !important;
}
.tfs.bl .tfs-ih{background:#fff !important;color:#2c5f8a !important;}
.tfs-ic{text-align:center !important;height:21px !important;font-size:10px !important;}
.tfs-il{text-align:left !important;padding-left:8px !important;}
.tfs-ir{text-align:right !important;padding-right:8px !important;font-family:Consolas,"Courier New",monospace !important;}
.tfs-fl{
  background:#fff !important;
  color:#b33a3a !important;
  font-weight:700 !important;
  text-align:center !important;
  letter-spacing:2px !important;
  font-size:10px !important;
}
.tfs.bl .tfs-fl{background:#fff !important;color:#2c5f8a !important;}
.tfs-fv{
  font-weight:800 !important;
  color:#b33a3a !important;
  text-align:right !important;
  padding-right:8px !important;
  font-family:Consolas,"Courier New",monospace !important;
}
.tfs.bl .tfs-fv{color:#2c5f8a !important;}
.tfs-rc{text-align:center !important;font-weight:700 !important;color:#444 !important;}
.tfs-rc b{color:#b33a3a !important;font-size:15px !important;}
.tfs.bl .tfs-rc b{color:#2c5f8a !important;}
.tfs-bottom{
  display:flex !important;
  justify-content:space-between !important;
  align-items:center !important;
  padding:5px 8px !important;
  color:#b33a3a !important;
  font-weight:800 !important;
}
.tfs.bl .tfs-bottom{color:#2c5f8a !important;}
.tfs-amt{font-size:14px !important;letter-spacing:1px !important;}
.tfs.bl .tfs-amt{color:#2c5f8a !important;}
.tfs-paper{font-size:8px !important;color:#999 !important;font-weight:400 !important;letter-spacing:0 !important;}
.excel-divider{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:8px !important;
  margin:8px 0 !important;
  color:#94a3b8 !important;
  font-size:11px !important;
}
.excel-divider::before,.excel-divider::after{
  content:"" !important;
  flex:1 !important;
  border-top:1px dashed #cbd5e1 !important;
}
.excel-divider span{background:transparent !important;padding:0 6px !important;}

/* 인라인 미리보기: 스크롤 없이 해당 행 아래에 전체 표시 */
.inline-record-preview-row > td{
  padding:14px !important;
  background:#f8fafc !important;
  overflow:visible !important;
}
.inline-record-preview-box{
  background:#fff !important;
  border:1px solid #dbe3ee !important;
  border-radius:14px !important;
  overflow:visible !important;
  box-shadow:0 12px 28px rgba(15,23,42,.08) !important;
}
.inline-record-preview-head{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  padding:8px 12px !important;
  background:#fff !important;
  border-bottom:1px solid #e2e8f0 !important;
  color:#0f172a !important;
}
.inline-record-preview-head strong{display:none !important;}
.inline-record-preview-close{
  height:30px !important;
  min-height:30px !important;
  padding:5px 12px !important;
  background:#fff !important;
  color:#334155 !important;
  border-color:#cbd5e1 !important;
}
.inline-record-preview-frame{
  padding:14px !important;
  background:#f8fafc !important;
  overflow:visible !important;
  max-height:none !important;
}
.inline-record-preview-frame .excel-frame{
  width:740px !important;
  max-width:100% !important;
  min-width:0 !important;
  margin:0 auto !important;
  padding:14px !important;
  background:#e8e4df !important;
}
.inline-record-preview-frame .tfs table{table-layout:auto !important;}
.inline-record-preview-frame .tfs td{font-size:10.5px !important;padding:4px 6px !important;}

/* 거래내역 버튼: 글자 가독성은 유지하면서 높이와 점유 면적 축소 */
.records-table{
  min-width:1180px !important;
  table-layout:fixed !important;
  font-size:12px !important;
}
.records-table th,.records-table td{
  font-size:12px !important;
}
.records-table th:nth-child(10),.records-table td:nth-child(10){width:106px !important;}
.records-table th:nth-child(11),.records-table td:nth-child(11){
  width:78px !important;
  padding-right:16px !important;
}
.records-table th:nth-child(12),.records-table td:nth-child(12){
  width:118px !important;
  min-width:118px !important;
  padding-left:8px !important;
  padding-right:5px !important;
}
.records-table th:nth-child(13),.records-table td:nth-child(13){
  width:88px !important;
  min-width:88px !important;
  padding-left:5px !important;
  padding-right:5px !important;
}
.records-output-cell,.records-manage-cell{padding:6px 5px !important;}
.ibtns-output{
  display:grid !important;
  grid-template-columns:1fr 1fr !important;
  gap:4px !important;
}
.ibtns-manage{
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:4px !important;
}
.ibtns-output .ibtn,.ibtns-manage .ibtn{
  min-height:23px !important;
  height:23px !important;
  padding:3px 5px !important;
  font-size:10px !important;
  line-height:1 !important;
  border-radius:7px !important;
  gap:3px !important;
  justify-content:center !important;
}
.ibtns-output .ibtn i,.ibtns-manage .ibtn i{font-size:9.5px !important;margin:0 !important;}

/* 사이드바 메뉴 글자 살짝 확대 */
.app-sidebar .tab,
.sidebar .tab,
#main-content .app-sidebar button,
#main-content aside button{
  font-size:14px !important;
}

/* 발주서 기록 품목 스크롤 제거 */
.order-history-items.compact.all-items{
  overflow:visible !important;
  max-height:none !important;
  max-width:100% !important;
  grid-template-columns:repeat(auto-fit,minmax(118px,1fr)) !important;
  gap:5px !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
}
.order-history-items.compact.all-items .order-history-item{
  min-width:0 !important;
  min-height:30px !important;
  padding:4px 6px !important;
  gap:2px 5px !important;
}
.order-arrival-btn,.order-history-item .arrived{
  min-height:20px !important;
  padding:2px 6px !important;
  font-size:9.5px !important;
}

/* 품목 연동 슬롯 */
.item-row-header{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  align-items:center !important;
  gap:10px !important;
  padding:10px 12px !important;
}
.item-row-title{
  display:block !important;
  min-width:0 !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
  word-break:keep-all !important;
  writing-mode:horizontal-tb !important;
  text-orientation:mixed !important;
  font-family:"Noto Sans KR","Malgun Gothic",sans-serif !important;
  font-size:13px !important;
  line-height:1.2 !important;
  letter-spacing:0 !important;
}
.item-row-title i{display:none !important;}
.item-row-header .btn-remove-item-row{
  position:static !important;
  justify-self:end !important;
  min-width:54px !important;
  height:26px !important;
  padding:3px 8px !important;
  font-size:10.5px !important;
  line-height:1 !important;
  border-radius:8px !important;
}

/* 인쇄는 업로드된 기존 파일의 print 구조를 우선 적용 */
@media print{
  @page{
    size:182mm 289mm portrait;
    margin:0mm 8mm;
  }
  body,html{
    background:#fff !important;
    width:100% !important;
    margin:0 !important;
    padding:0 !important;
    font-size:11px !important;
    -webkit-print-color-adjust:exact !important;
    print-color-adjust:exact !important;
    overflow:visible !important;
  }
  ::-webkit-scrollbar{display:none !important;}
  body.print-record-mode > *:not(#print-overlay){display:none !important;}
  body.print-record-mode #print-overlay{
    display:block !important;
    position:static !important;
    background:#fff !important;
    padding:0 !important;
    margin:0 !important;
    overflow:visible !important;
    inset:auto !important;
  }
  body.print-record-mode .psheet{
    box-shadow:none !important;
    border-radius:0 !important;
    padding:0 !important;
    width:100% !important;
    max-width:none !important;
    border:none !important;
    margin:0 !important;
    background:#fff !important;
    overflow:visible !important;
  }
  body.print-record-mode .pbtns{display:none !important;}
  body.print-record-mode #print-target-area{
    width:182mm !important;
    max-width:182mm !important;
    margin:0 auto !important;
    padding:0 !important;
    transform:none !important;
    overflow:visible !important;
  }
  body.print-record-mode #print-target-area.pf-active{width:182mm !important;max-width:182mm !important;transform:none !important;}
  body.print-record-mode .excel-frame{
    background:#fff !important;
    padding:0 !important;
    width:182mm !important;
    max-width:182mm !important;
    box-sizing:border-box !important;
    page-break-inside:avoid !important;
    break-inside:avoid !important;
    overflow:visible !important;
  }
  body.print-record-mode .tfs{
    width:182mm !important;
    height:auto !important;
    min-height:0 !important;
    margin:0 0 10px !important;
    padding:0 !important;
    page-break-inside:avoid !important;
    break-inside:avoid !important;
    overflow:hidden !important;
  }
  body.print-record-mode .excel-frame > .tfs + .excel-divider,
  body.print-record-mode .excel-frame > .excel-divider + .tfs{
    page-break-before:avoid !important;
    break-before:avoid !important;
  }
  body.print-record-mode .lp-page{
    page-break-after:always !important;
    break-after:page !important;
    width:182mm !important;
    display:block !important;
    overflow:hidden !important;
    margin:0 auto !important;
    padding:0 !important;
  }
  body.print-record-mode .lp-page.lp-last,
  body.print-record-mode .lp-page:last-child{
    page-break-after:auto !important;
    break-after:auto !important;
  }
  body.print-record-mode .lp-slot{
    height:128mm !important;
    overflow:hidden !important;
    width:182mm !important;
    display:block !important;
  }
  body.print-record-mode .lp-slot .excel-frame{
    padding:0 !important;
    width:182mm !important;
    max-width:182mm !important;
    background:#fff !important;
  }
  body.print-record-mode .lp-slot .tfs{
    width:182mm !important;
    max-width:182mm !important;
    margin:0 !important;
  }
  body.print-record-mode .lp-sep{
    border-top:1px dashed #bbb !important;
    margin:1mm 0 !important;
    height:1mm !important;
    display:block !important;
  }
  body.print-record-mode .lp-sep span{display:none !important;}
}


/* ===== print-margin-ratio-v2: A4 여백/비율 최종 보정 ===== */
/* 화면 미리보기는 스크롤 없이 양식 전체가 보이도록 */
.inline-record-preview-frame{
  max-height:none !important;
  overflow:visible !important;
  padding:14px !important;
}
.inline-record-preview-box{
  overflow:visible !important;
}
.inline-record-preview-frame .excel-frame{
  width:820px !important;
  max-width:100% !important;
  min-width:0 !important;
  padding:14px !important;
  background:#e8e4df !important;
}
.inline-record-preview-frame .tfs{
  width:100% !important;
}

/* 인쇄는 A4 안에서 좌우 균등, 최대한 크게, 하단 잘림 방지 */
@media print{
  @page{size:A4 portrait;margin:6mm;}
  html,body{
    width:auto !important;
    height:auto !important;
    margin:0 !important;
    padding:0 !important;
    background:#fff !important;
  }
  body.print-record-mode > *:not(#print-overlay){
    display:none !important;
  }
  body.print-record-mode #print-overlay{
    display:block !important;
    position:static !important;
    inset:auto !important;
    width:100% !important;
    height:auto !important;
    margin:0 !important;
    padding:0 !important;
    background:#fff !important;
    overflow:visible !important;
  }
  body.print-record-mode #print-overlay .psheet{
    display:block !important;
    width:100% !important;
    max-width:none !important;
    height:auto !important;
    margin:0 !important;
    padding:0 !important;
    border:0 !important;
    box-shadow:none !important;
    background:#fff !important;
    overflow:visible !important;
  }
  body.print-record-mode #print-overlay .pbtns{
    display:none !important;
  }
  body.print-record-mode #print-target-area,
  body.print-record-mode #print-target-area.pf-active{
    display:block !important;
    width:198mm !important;
    max-width:198mm !important;
    height:auto !important;
    margin:0 auto !important;
    padding:0 !important;
    transform:none !important;
    overflow:visible !important;
  }

  body.print-record-mode .excel-frame,
  body.print-record-mode .excel-frame.single-copy{
    display:block !important;
    box-sizing:border-box !important;
    width:198mm !important;
    max-width:198mm !important;
    height:auto !important;
    margin:0 auto !important;
    padding:0 !important;
    background:#fff !important;
    overflow:visible !important;
    page-break-inside:avoid !important;
    break-inside:avoid !important;
  }

  body.print-record-mode .tfs{
    display:block !important;
    box-sizing:border-box !important;
    width:190mm !important;
    height:126mm !important;
    min-height:126mm !important;
    max-height:126mm !important;
    margin:0 auto !important;
    padding:0 !important;
    background:#fff !important;
    overflow:hidden !important;
    page-break-inside:avoid !important;
    break-inside:avoid !important;
  }
  body.print-record-mode .tfs table{
    width:100% !important;
    border-collapse:collapse !important;
    table-layout:auto !important;
  }
  body.print-record-mode .tfs-title{
    padding:3.1mm 3mm 2.1mm !important;
  }
  body.print-record-mode .tfs-name{
    font-size:14.4px !important;
    letter-spacing:4.3px !important;
  }
  body.print-record-mode .tfs-sub{
    font-size:9.2px !important;
  }
  body.print-record-mode .tfs td{
    padding:2.25px 3.2px !important;
    font-size:9.35px !important;
    line-height:1.08 !important;
    overflow:visible !important;
    text-overflow:clip !important;
    word-break:keep-all !important;
    white-space:normal !important;
    writing-mode:horizontal-tb !important;
    text-orientation:mixed !important;
  }
  body.print-record-mode .tfs-sl{
    width:22px !important;
    min-width:22px !important;
    max-width:22px !important;
    padding-left:1px !important;
    padding-right:1px !important;
    line-height:1.42 !important;
  }
  body.print-record-mode .tfs table:nth-of-type(3) td{
    height:19.5px !important;
  }
  body.print-record-mode .tfs-bottom{
    padding:2.5px 5px !important;
  }
  body.print-record-mode .tfs-amt{
    font-size:11.8px !important;
  }
  body.print-record-mode .tfs-paper{
    font-size:8px !important;
  }

  /* 일반 인쇄: 공급자/공급받는자 2장을 한 페이지 안에 안정 배치 */
  body.print-record-mode #print-target-area > .excel-frame:not(.single-copy){
    display:flex !important;
    flex-direction:column !important;
    justify-content:flex-start !important;
    gap:0 !important;
    height:auto !important;
    min-height:0 !important;
  }
  body.print-record-mode .excel-divider{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    height:5.5mm !important;
    min-height:5.5mm !important;
    margin:0 !important;
    color:#94a3b8 !important;
    border:0 !important;
  }
  body.print-record-mode .excel-divider::before,
  body.print-record-mode .excel-divider::after{
    content:"" !important;
    flex:1 !important;
    border-top:1px dashed #cbd5e1 !important;
  }
  body.print-record-mode .excel-divider span{
    padding:0 8px !important;
    background:#fff !important;
    font-size:10px !important;
  }

  /* 선택일괄인쇄: 1페이지 2장, 둘째 장 하단 절대 안 잘리게 */
  body.print-record-mode .lp-page{
    display:flex !important;
    flex-direction:column !important;
    justify-content:flex-start !important;
    box-sizing:border-box !important;
    width:198mm !important;
    max-width:198mm !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    margin:0 auto !important;
    padding:0 !important;
    overflow:visible !important;
    page-break-after:always !important;
    break-after:page !important;
  }
  body.print-record-mode .lp-page:last-child{
    page-break-after:auto !important;
    break-after:auto !important;
  }
  body.print-record-mode .lp-slot{
    display:block !important;
    box-sizing:border-box !important;
    flex:0 0 126mm !important;
    width:198mm !important;
    height:126mm !important;
    min-height:126mm !important;
    max-height:126mm !important;
    overflow:hidden !important;
  }
  body.print-record-mode .lp-slot .excel-frame{
    width:198mm !important;
    max-width:198mm !important;
    height:126mm !important;
    min-height:126mm !important;
    max-height:126mm !important;
    margin:0 auto !important;
    overflow:hidden !important;
  }
  body.print-record-mode .lp-slot .tfs{
    width:190mm !important;
    height:126mm !important;
    min-height:126mm !important;
    max-height:126mm !important;
  }
  body.print-record-mode .lp-sep{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    flex:0 0 5.5mm !important;
    height:5.5mm !important;
    min-height:5.5mm !important;
    margin:0 !important;
    color:#94a3b8 !important;
  }
  body.print-record-mode .lp-sep::before,
  body.print-record-mode .lp-sep::after{
    content:"" !important;
    flex:1 !important;
    border-top:1px dashed #cbd5e1 !important;
  }
  body.print-record-mode .lp-sep span{
    padding:0 8px !important;
    background:#fff !important;
    font-size:10px !important;
  }
}


/* ===== print-fill-final-v3: A4를 더 크게 채우고 하단 절대 잘림 방지 ===== */
@media print{
  @page{size:A4 portrait;margin:4mm;}
  html,body{
    margin:0 !important;
    padding:0 !important;
    background:#fff !important;
    width:auto !important;
    height:auto !important;
  }
  body.print-record-mode > *:not(#print-overlay){display:none !important;}
  body.print-record-mode #print-overlay{
    display:block !important;
    position:static !important;
    inset:auto !important;
    width:100% !important;
    height:auto !important;
    margin:0 !important;
    padding:0 !important;
    background:#fff !important;
    overflow:visible !important;
  }
  body.print-record-mode #print-overlay .psheet{
    width:100% !important;
    max-width:none !important;
    margin:0 !important;
    padding:0 !important;
    border:0 !important;
    box-shadow:none !important;
    background:#fff !important;
    overflow:visible !important;
  }
  body.print-record-mode #print-overlay .pbtns{display:none !important;}
  body.print-record-mode #print-target-area,
  body.print-record-mode #print-target-area.pf-active{
    display:block !important;
    width:202mm !important;
    max-width:202mm !important;
    margin:0 auto !important;
    padding:0 !important;
    transform:none !important;
    overflow:visible !important;
  }
  body.print-record-mode .excel-frame,
  body.print-record-mode .excel-frame.single-copy{
    display:block !important;
    box-sizing:border-box !important;
    width:202mm !important;
    max-width:202mm !important;
    margin:0 auto !important;
    padding:0 !important;
    background:#fff !important;
    overflow:visible !important;
  }
  body.print-record-mode .tfs{
    display:block !important;
    box-sizing:border-box !important;
    width:200mm !important;
    height:132mm !important;
    min-height:132mm !important;
    max-height:132mm !important;
    margin:0 auto !important;
    padding:0 !important;
    background:#fff !important;
    overflow:hidden !important;
    page-break-inside:avoid !important;
    break-inside:avoid !important;
  }
  body.print-record-mode .tfs table{
    width:100% !important;
    border-collapse:collapse !important;
    table-layout:auto !important;
  }
  body.print-record-mode .tfs-title{padding:3.35mm 3mm 2.35mm !important;}
  body.print-record-mode .tfs-name{font-size:15px !important;letter-spacing:4.4px !important;}
  body.print-record-mode .tfs-sub{font-size:9.5px !important;}
  body.print-record-mode .tfs td{
    padding:2.45px 3.35px !important;
    font-size:9.65px !important;
    line-height:1.1 !important;
    overflow:visible !important;
    text-overflow:clip !important;
    word-break:keep-all !important;
    white-space:normal !important;
    writing-mode:horizontal-tb !important;
    text-orientation:mixed !important;
  }
  body.print-record-mode .tfs-sl{
    width:22px !important;
    min-width:22px !important;
    max-width:22px !important;
    padding-left:1px !important;
    padding-right:1px !important;
    line-height:1.42 !important;
  }
  body.print-record-mode .tfs table:nth-of-type(3) td{height:20.5px !important;}
  body.print-record-mode .tfs-bottom{padding:2.8px 5px !important;}
  body.print-record-mode .tfs-amt{font-size:12.2px !important;}
  body.print-record-mode .tfs-paper{font-size:8px !important;}

  body.print-record-mode .excel-divider{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    height:5mm !important;
    min-height:5mm !important;
    margin:0 !important;
    color:#94a3b8 !important;
    border:0 !important;
  }
  body.print-record-mode .excel-divider::before,
  body.print-record-mode .excel-divider::after{
    content:"" !important;
    flex:1 !important;
    border-top:1px dashed #cbd5e1 !important;
  }
  body.print-record-mode .excel-divider span{
    padding:0 8px !important;
    background:#fff !important;
    font-size:10px !important;
  }

  body.print-record-mode .lp-page{
    display:flex !important;
    flex-direction:column !important;
    box-sizing:border-box !important;
    width:202mm !important;
    max-width:202mm !important;
    height:269mm !important;
    min-height:269mm !important;
    max-height:269mm !important;
    margin:0 auto !important;
    padding:0 !important;
    overflow:hidden !important;
    page-break-after:always !important;
    break-after:page !important;
  }
  body.print-record-mode .lp-page:last-child{
    page-break-after:auto !important;
    break-after:auto !important;
  }
  body.print-record-mode .lp-slot{
    display:block !important;
    flex:0 0 132mm !important;
    width:202mm !important;
    height:132mm !important;
    min-height:132mm !important;
    max-height:132mm !important;
    overflow:hidden !important;
  }
  body.print-record-mode .lp-slot .excel-frame{
    width:202mm !important;
    max-width:202mm !important;
    height:132mm !important;
    min-height:132mm !important;
    max-height:132mm !important;
    overflow:hidden !important;
  }
  body.print-record-mode .lp-slot .tfs{
    width:200mm !important;
    height:132mm !important;
    min-height:132mm !important;
    max-height:132mm !important;
  }
  body.print-record-mode .lp-sep{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    flex:0 0 5mm !important;
    height:5mm !important;
    min-height:5mm !important;
    margin:0 !important;
    color:#94a3b8 !important;
  }
  body.print-record-mode .lp-sep::before,
  body.print-record-mode .lp-sep::after{
    content:"" !important;
    flex:1 !important;
    border-top:1px dashed #cbd5e1 !important;
  }
  body.print-record-mode .lp-sep span{
    padding:0 8px !important;
    background:#fff !important;
    font-size:10px !important;
  }
}

/* 거래내역 버튼 조금 더 작은 업무형 */
.records-table th:nth-child(12), .records-table td:nth-child(12){
  width:118px !important;
  min-width:118px !important;
}
.records-table th:nth-child(13), .records-table td:nth-child(13){
  width:82px !important;
  min-width:82px !important;
}
.ibtns-output .ibtn,.ibtns-manage .ibtn{
  min-height:22px !important;
  padding:3px 5px !important;
  font-size:9.5px !important;
  border-radius:6px !important;
}

/* 사이드바 메뉴 글자 가독성 */
.app-sidebar .tab,
.sidebar .tab,
#main-content aside .tab{
  font-size:14px !important;
  font-weight:800 !important;
}


/* ===== FINAL_HOTFIX_20260627_PRINT_FILL_AND_RESET ===== */
/* 거래내역 헤더 정렬표시/버튼/미리보기 안정화 */
.records-table th[data-sort]{cursor:pointer;}
.records-table th:nth-child(12), .records-table td:nth-child(12){width:112px!important;min-width:112px!important;padding-left:8px!important;}
.records-table th:nth-child(13), .records-table td:nth-child(13){width:78px!important;min-width:78px!important;}
.records-output-cell,.records-manage-cell{padding:5px 5px!important;}
.ibtns-output{display:grid!important;grid-template-columns:1fr 1fr!important;gap:3px!important;width:100%!important;}
.ibtns-manage{display:grid!important;grid-template-columns:1fr!important;gap:3px!important;width:100%!important;}
.ibtns-output .ibtn,.ibtns-manage .ibtn{min-height:21px!important;padding:3px 4px!important;font-size:9px!important;line-height:1!important;border-radius:6px!important;justify-content:center!important;white-space:nowrap!important;}
.ibtns-output .ibtn i,.ibtns-manage .ibtn i{font-size:9px!important;margin-right:2px!important;}
.inline-record-preview-box,.inline-record-preview-row>td{overflow:visible!important;}
.inline-record-preview-frame{max-height:none!important;overflow:visible!important;padding:12px!important;}
.inline-record-preview-frame .excel-frame{width:920px!important;max-width:100%!important;min-width:0!important;background:#e8e4df!important;padding:14px!important;}
.inline-record-preview-frame .tfs{width:100%!important;height:auto!important;min-height:0!important;}
.app-sidebar .tab,.sidebar .tab,#main-content aside .tab{font-size:14.5px!important;font-weight:800!important;}

/* 인쇄: 디자인 변경 전 양식 구조를 유지하면서 A4를 최대한 채움 */
@media print{
  @page{size:A4 portrait;margin:3mm;}
  html,body{margin:0!important;padding:0!important;background:#fff!important;width:auto!important;height:auto!important;-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important;overflow:visible!important;}
  body.print-record-mode > *:not(#print-overlay){display:none!important;}
  body.print-record-mode #print-overlay{display:block!important;position:static!important;inset:auto!important;width:100%!important;height:auto!important;margin:0!important;padding:0!important;background:#fff!important;overflow:visible!important;}
  body.print-record-mode #print-overlay .psheet{display:block!important;width:100%!important;max-width:none!important;margin:0!important;padding:0!important;border:0!important;box-shadow:none!important;background:#fff!important;overflow:visible!important;}
  body.print-record-mode #print-overlay .pbtns{display:none!important;}
  body.print-record-mode #print-target-area,body.print-record-mode #print-target-area.pf-active{display:block!important;width:204mm!important;max-width:204mm!important;margin:0 auto!important;padding:0!important;transform:none!important;overflow:visible!important;}
  body.print-record-mode .excel-frame,body.print-record-mode .excel-frame.single-copy{display:block!important;box-sizing:border-box!important;width:204mm!important;max-width:204mm!important;margin:0 auto!important;padding:0!important;background:#fff!important;overflow:visible!important;page-break-inside:avoid!important;break-inside:avoid!important;}
  body.print-record-mode .tfs{display:block!important;box-sizing:border-box!important;width:202mm!important;height:133mm!important;min-height:133mm!important;max-height:133mm!important;margin:0 auto!important;padding:0!important;background:#fff!important;overflow:hidden!important;page-break-inside:avoid!important;break-inside:avoid!important;}
  body.print-record-mode .tfs table{width:100%!important;border-collapse:collapse!important;table-layout:auto!important;}
  body.print-record-mode .tfs-title{padding:3.3mm 3mm 2.2mm!important;}
  body.print-record-mode .tfs-name{font-size:15.2px!important;letter-spacing:4.5px!important;white-space:normal!important;writing-mode:horizontal-tb!important;}
  body.print-record-mode .tfs-sub{font-size:9.5px!important;white-space:nowrap!important;}
  body.print-record-mode .tfs td{padding:2.35px 3.1px!important;font-size:9.55px!important;line-height:1.08!important;overflow:visible!important;text-overflow:clip!important;word-break:keep-all!important;white-space:normal!important;writing-mode:horizontal-tb!important;text-orientation:mixed!important;}
  body.print-record-mode .tfs-sl{width:22px!important;min-width:22px!important;max-width:22px!important;padding-left:1px!important;padding-right:1px!important;line-height:1.42!important;}
  body.print-record-mode .tfs table:nth-of-type(3) td{height:20px!important;}
  body.print-record-mode .tfs-bottom{padding:2.5px 5px!important;}
  body.print-record-mode .tfs-amt{font-size:12px!important;}
  body.print-record-mode .tfs-paper{font-size:8px!important;}
  body.print-record-mode .excel-divider{display:flex!important;align-items:center!important;justify-content:center!important;height:5mm!important;min-height:5mm!important;margin:0!important;color:#94a3b8!important;border:0!important;}
  body.print-record-mode .excel-divider::before,body.print-record-mode .excel-divider::after{content:""!important;flex:1!important;border-top:1px dashed #cbd5e1!important;}
  body.print-record-mode .excel-divider span{padding:0 8px!important;background:#fff!important;font-size:10px!important;}
  body.print-record-mode .lp-page{display:flex!important;flex-direction:column!important;box-sizing:border-box!important;width:204mm!important;max-width:204mm!important;height:271mm!important;min-height:271mm!important;max-height:271mm!important;margin:0 auto!important;padding:0!important;overflow:hidden!important;page-break-after:always!important;break-after:page!important;}
  body.print-record-mode .lp-page:last-child{page-break-after:auto!important;break-after:auto!important;}
  body.print-record-mode .lp-slot{display:block!important;flex:0 0 133mm!important;width:204mm!important;height:133mm!important;min-height:133mm!important;max-height:133mm!important;overflow:hidden!important;}
  body.print-record-mode .lp-slot .excel-frame{width:204mm!important;max-width:204mm!important;height:133mm!important;min-height:133mm!important;max-height:133mm!important;overflow:hidden!important;}
  body.print-record-mode .lp-slot .tfs{width:202mm!important;height:133mm!important;min-height:133mm!important;max-height:133mm!important;}
  body.print-record-mode .lp-sep{display:flex!important;align-items:center!important;justify-content:center!important;flex:0 0 5mm!important;height:5mm!important;min-height:5mm!important;margin:0!important;color:#94a3b8!important;}
  body.print-record-mode .lp-sep::before,body.print-record-mode .lp-sep::after{content:""!important;flex:1!important;border-top:1px dashed #cbd5e1!important;}
  body.print-record-mode .lp-sep span{padding:0 8px!important;background:#fff!important;font-size:10px!important;}
}


/* ===== invoice-a4-fill-v5-20260627 ===== */
/* A4 좌우 여백 균등화 + 양식 폭 확대 + 하단 금액칸 과다 여백/잘림 보정 */
@media print{
  @page{
    size:A4 portrait;
    margin:2mm;
  }

  html,body{
    margin:0 !important;
    padding:0 !important;
    background:#fff !important;
    width:auto !important;
    height:auto !important;
  }

  body.print-record-mode > *:not(#print-overlay){
    display:none !important;
  }

  body.print-record-mode #print-overlay{
    display:block !important;
    position:static !important;
    inset:auto !important;
    width:100% !important;
    height:auto !important;
    margin:0 !important;
    padding:0 !important;
    background:#fff !important;
    overflow:visible !important;
  }

  body.print-record-mode #print-overlay .psheet{
    display:block !important;
    width:100% !important;
    max-width:none !important;
    height:auto !important;
    margin:0 !important;
    padding:0 !important;
    border:0 !important;
    box-shadow:none !important;
    background:#fff !important;
    overflow:visible !important;
  }

  body.print-record-mode #print-overlay .pbtns{
    display:none !important;
  }

  body.print-record-mode #print-target-area,
  body.print-record-mode #print-target-area.pf-active{
    display:block !important;
    box-sizing:border-box !important;
    width:206mm !important;
    max-width:206mm !important;
    margin:0 auto !important;
    padding:0 !important;
    transform:none !important;
    overflow:visible !important;
  }

  body.print-record-mode .excel-frame,
  body.print-record-mode .excel-frame.single-copy{
    display:block !important;
    box-sizing:border-box !important;
    width:206mm !important;
    max-width:206mm !important;
    height:auto !important;
    margin:0 auto !important;
    padding:0 !important;
    background:#fff !important;
    overflow:visible !important;
  }

  body.print-record-mode .tfs{
    display:flex !important;
    flex-direction:column !important;
    box-sizing:border-box !important;
    width:204mm !important;
    max-width:204mm !important;
    height:132mm !important;
    min-height:132mm !important;
    max-height:132mm !important;
    margin:0 auto !important;
    padding:0 !important;
    background:#fff !important;
    overflow:hidden !important;
    page-break-inside:avoid !important;
    break-inside:avoid !important;
    border:1px dashed currentColor !important;
  }

  body.print-record-mode .tfs-title{
    flex:0 0 auto !important;
    padding:3.05mm 3mm 2mm !important;
    line-height:1.12 !important;
    border:0 !important;
  }

  body.print-record-mode .tfs-name{
    font-size:15.1px !important;
    letter-spacing:4.6px !important;
  }

  body.print-record-mode .tfs-sub{
    font-size:9.3px !important;
  }

  body.print-record-mode .tfs table{
    width:100% !important;
    border-collapse:collapse !important;
    border-spacing:0 !important;
    table-layout:auto !important;
    margin:0 !important;
    flex:0 0 auto !important;
  }

  body.print-record-mode .tfs td{
    box-sizing:border-box !important;
    border:1px dashed currentColor !important;
    padding:2.05px 3px !important;
    font-size:9.35px !important;
    line-height:1.06 !important;
    overflow:visible !important;
    text-overflow:clip !important;
    white-space:normal !important;
    word-break:keep-all !important;
    writing-mode:horizontal-tb !important;
    text-orientation:mixed !important;
  }

  /* 바깥 박스와 내부 표 경계가 따로 보이지 않도록 외곽 겹침 제거 */
  body.print-record-mode .tfs table:first-of-type tr:first-child td{
    border-top:0 !important;
  }
  body.print-record-mode .tfs table td:first-child{
    border-left:0 !important;
  }
  body.print-record-mode .tfs table td:last-child{
    border-right:0 !important;
  }
  body.print-record-mode .tfs table:last-of-type tr:last-child td{
    border-bottom:0 !important;
  }

  body.print-record-mode .tfs-vb{
    font-weight:700 !important;
  }

  body.print-record-mode .tfs-sl{
    width:22px !important;
    min-width:22px !important;
    max-width:22px !important;
    padding-left:1px !important;
    padding-right:1px !important;
    line-height:1.32 !important;
  }

  /* 품목 행 표가 남는 높이를 먹도록 해서 하단 금액문구 칸이 과하게 커지지 않게 함 */
  body.print-record-mode .tfs table:nth-of-type(3){
    flex:1 1 auto !important;
    min-height:0 !important;
  }

  body.print-record-mode .tfs table:nth-of-type(3) td{
    height:auto !important;
    min-height:18px !important;
  }

  body.print-record-mode .tfs-pay-table{
    flex:0 0 auto !important;
  }

  body.print-record-mode .tfs-pay-table td{
    height:21px !important;
  }

  body.print-record-mode .tfs-rc{
    padding-left:6px !important;
    padding-right:6px !important;
  }

  body.print-record-mode .tfs-bottom{
    flex:0 0 8mm !important;
    min-height:8mm !important;
    max-height:8mm !important;
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    padding:0 5px !important;
    border-top:1px dashed currentColor !important;
  }

  body.print-record-mode .tfs-amt{
    flex:0 1 auto !important;
    min-width:0 !important;
    font-size:12px !important;
    white-space:nowrap !important;
  }

  body.print-record-mode .tfs-paper{
    flex:0 0 auto !important;
    font-size:8px !important;
    opacity:.45 !important;
  }

  body.print-record-mode .excel-divider,
  body.print-record-mode .lp-sep{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    height:4mm !important;
    min-height:4mm !important;
    max-height:4mm !important;
    margin:0 !important;
    color:#94a3b8 !important;
    border:0 !important;
  }

  body.print-record-mode .excel-divider::before,
  body.print-record-mode .excel-divider::after,
  body.print-record-mode .lp-sep::before,
  body.print-record-mode .lp-sep::after{
    content:"" !important;
    flex:1 !important;
    border-top:1px dashed #cbd5e1 !important;
  }

  body.print-record-mode .excel-divider span,
  body.print-record-mode .lp-sep span{
    padding:0 8px !important;
    background:#fff !important;
    font-size:10px !important;
  }

  /* 선택일괄인쇄: 2장/페이지 기준. 하단 잘림 방지 위해 페이지 높이는 실제 인쇄 가능 영역보다 작게 */
  body.print-record-mode .lp-page{
    display:flex !important;
    flex-direction:column !important;
    box-sizing:border-box !important;
    width:206mm !important;
    max-width:206mm !important;
    height:268mm !important;
    min-height:268mm !important;
    max-height:268mm !important;
    margin:0 auto !important;
    padding:0 !important;
    overflow:hidden !important;
    page-break-after:always !important;
    break-after:page !important;
  }

  body.print-record-mode .lp-page:last-child{
    page-break-after:auto !important;
    break-after:auto !important;
  }

  body.print-record-mode .lp-slot{
    display:block !important;
    flex:0 0 132mm !important;
    width:206mm !important;
    height:132mm !important;
    min-height:132mm !important;
    max-height:132mm !important;
    overflow:hidden !important;
  }

  body.print-record-mode .lp-slot .excel-frame{
    width:206mm !important;
    max-width:206mm !important;
    height:132mm !important;
    min-height:132mm !important;
    max-height:132mm !important;
    overflow:hidden !important;
  }

  body.print-record-mode .lp-slot .tfs{
    width:204mm !important;
    max-width:204mm !important;
    height:132mm !important;
    min-height:132mm !important;
    max-height:132mm !important;
  }
}

/* 화면 미리보기에서도 내부 스크롤 없이 전체 양식 표시 */
.inline-record-preview-box,
.inline-record-preview-frame{
  overflow:visible !important;
  max-height:none !important;
}
.inline-record-preview-frame .excel-frame{
  width:980px !important;
  max-width:100% !important;
}
.inline-record-preview-frame .tfs{
  width:100% !important;
}


/* ===== invoice-a4-fill-v6-20260627 ===== */
/* 사용자 요청: 명세서 폭/높이 추가 확대 + A4 좌우 여백 균형 재보정 */
@media print{
  @page{
    size:A4 portrait;
    margin:1.5mm;
  }

  html,body{
    margin:0 !important;
    padding:0 !important;
    background:#fff !important;
  }

  body.print-record-mode > *:not(#print-overlay){
    display:none !important;
  }

  body.print-record-mode #print-overlay,
  body.print-record-mode #print-overlay .psheet{
    display:block !important;
    position:static !important;
    inset:auto !important;
    width:100% !important;
    max-width:none !important;
    height:auto !important;
    margin:0 !important;
    padding:0 !important;
    border:0 !important;
    box-shadow:none !important;
    background:#fff !important;
    overflow:visible !important;
  }

  body.print-record-mode #print-overlay .pbtns{
    display:none !important;
  }

  body.print-record-mode #print-target-area,
  body.print-record-mode #print-target-area.pf-active{
    display:block !important;
    box-sizing:border-box !important;
    width:207mm !important;
    max-width:207mm !important;
    margin:0 auto !important;
    padding:0 !important;
    transform:none !important;
    overflow:visible !important;
  }

  body.print-record-mode .excel-frame,
  body.print-record-mode .excel-frame.single-copy{
    display:block !important;
    box-sizing:border-box !important;
    width:207mm !important;
    max-width:207mm !important;
    height:auto !important;
    margin:0 auto !important;
    padding:0 !important;
    background:#fff !important;
    overflow:visible !important;
  }

  body.print-record-mode .tfs{
    display:flex !important;
    flex-direction:column !important;
    box-sizing:border-box !important;
    width:205.5mm !important;
    max-width:205.5mm !important;
    height:135mm !important;
    min-height:135mm !important;
    max-height:135mm !important;
    margin:0 auto !important;
    padding:0 !important;
    background:#fff !important;
    overflow:hidden !important;
    page-break-inside:avoid !important;
    break-inside:avoid !important;
    border:1px dashed currentColor !important;
  }

  body.print-record-mode .tfs-title{
    flex:0 0 auto !important;
    padding:3.2mm 3mm 2.2mm !important;
    line-height:1.1 !important;
  }

  body.print-record-mode .tfs-name{
    font-size:15.6px !important;
    letter-spacing:4.8px !important;
  }

  body.print-record-mode .tfs-sub{
    font-size:9.6px !important;
  }

  body.print-record-mode .tfs table{
    width:100% !important;
    border-collapse:collapse !important;
    border-spacing:0 !important;
    table-layout:auto !important;
    margin:0 !important;
    flex:0 0 auto !important;
  }

  body.print-record-mode .tfs td{
    box-sizing:border-box !important;
    border:1px dashed currentColor !important;
    padding:2.25px 3.25px !important;
    font-size:9.55px !important;
    line-height:1.08 !important;
    overflow:visible !important;
    text-overflow:clip !important;
    white-space:normal !important;
    word-break:keep-all !important;
    writing-mode:horizontal-tb !important;
    text-orientation:mixed !important;
  }

  body.print-record-mode .tfs table:first-of-type tr:first-child td{
    border-top:0 !important;
  }
  body.print-record-mode .tfs table td:first-child{
    border-left:0 !important;
  }
  body.print-record-mode .tfs table td:last-child{
    border-right:0 !important;
  }
  body.print-record-mode .tfs table:last-of-type tr:last-child td{
    border-bottom:0 !important;
  }

  body.print-record-mode .tfs-sl{
    width:22px !important;
    min-width:22px !important;
    max-width:22px !important;
    padding-left:1px !important;
    padding-right:1px !important;
    line-height:1.32 !important;
  }

  body.print-record-mode .tfs table:nth-of-type(3){
    flex:1 1 auto !important;
    min-height:0 !important;
  }

  body.print-record-mode .tfs table:nth-of-type(3) td{
    height:auto !important;
    min-height:18px !important;
  }

  body.print-record-mode .tfs-pay-table td{
    height:21px !important;
  }

  body.print-record-mode .tfs-bottom{
    flex:0 0 7.5mm !important;
    min-height:7.5mm !important;
    max-height:7.5mm !important;
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    padding:0 5px !important;
    border-top:1px dashed currentColor !important;
  }

  body.print-record-mode .tfs-amt{
    font-size:12.2px !important;
    white-space:nowrap !important;
  }

  body.print-record-mode .tfs-paper{
    font-size:8px !important;
    opacity:.45 !important;
  }

  body.print-record-mode .excel-divider,
  body.print-record-mode .lp-sep{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    height:3.5mm !important;
    min-height:3.5mm !important;
    max-height:3.5mm !important;
    margin:0 !important;
    color:#94a3b8 !important;
    border:0 !important;
  }

  body.print-record-mode .excel-divider::before,
  body.print-record-mode .excel-divider::after,
  body.print-record-mode .lp-sep::before,
  body.print-record-mode .lp-sep::after{
    content:"" !important;
    flex:1 !important;
    border-top:1px dashed #cbd5e1 !important;
  }

  body.print-record-mode .excel-divider span,
  body.print-record-mode .lp-sep span{
    padding:0 8px !important;
    background:#fff !important;
    font-size:10px !important;
  }

  /* 선택일괄인쇄: 135 + 3.5 + 135 = 273.5mm */
  body.print-record-mode .lp-page{
    display:flex !important;
    flex-direction:column !important;
    box-sizing:border-box !important;
    width:207mm !important;
    max-width:207mm !important;
    height:273.5mm !important;
    min-height:273.5mm !important;
    max-height:273.5mm !important;
    margin:0 auto !important;
    padding:0 !important;
    overflow:hidden !important;
    page-break-after:always !important;
    break-after:page !important;
  }

  body.print-record-mode .lp-page:last-child{
    page-break-after:auto !important;
    break-after:auto !important;
  }

  body.print-record-mode .lp-slot{
    display:block !important;
    flex:0 0 135mm !important;
    width:207mm !important;
    height:135mm !important;
    min-height:135mm !important;
    max-height:135mm !important;
    overflow:hidden !important;
  }

  body.print-record-mode .lp-slot .excel-frame{
    width:207mm !important;
    max-width:207mm !important;
    height:135mm !important;
    min-height:135mm !important;
    max-height:135mm !important;
    overflow:hidden !important;
  }

  body.print-record-mode .lp-slot .tfs{
    width:205.5mm !important;
    max-width:205.5mm !important;
    height:135mm !important;
    min-height:135mm !important;
    max-height:135mm !important;
  }
}


/* ===== invoice-a4-safe-center-v7-20260628 ===== */
/* 오른쪽 잘림 방지 우선 + 단일/공급자/받는자/선택일괄 공통 중앙 기준 재계산
   A4 210mm 기준:
   - 인쇄 가능 안전폭을 198mm로 제한
   - 실제 명세서 폭 196mm
   - 왼쪽으로 붙어 보이는 문제는 translateX(3mm)로 보정
   - 선택일괄은 132mm + 4mm + 132mm = 268mm로 하단 잘림 방지
*/
@media print{
  @page{
    size:A4 portrait;
    margin:4mm;
  }

  html,body{
    margin:0 !important;
    padding:0 !important;
    background:#fff !important;
  }

  body.print-record-mode > *:not(#print-overlay){
    display:none !important;
  }

  body.print-record-mode #print-overlay,
  body.print-record-mode #print-overlay .psheet{
    display:block !important;
    position:static !important;
    inset:auto !important;
    width:100% !important;
    max-width:none !important;
    height:auto !important;
    margin:0 !important;
    padding:0 !important;
    border:0 !important;
    box-shadow:none !important;
    background:#fff !important;
    overflow:visible !important;
  }

  body.print-record-mode #print-overlay .pbtns{
    display:none !important;
  }

  body.print-record-mode #print-target-area,
  body.print-record-mode #print-target-area.pf-active{
    display:block !important;
    box-sizing:border-box !important;
    width:198mm !important;
    max-width:198mm !important;
    margin:0 auto !important;
    padding:0 !important;
    transform:translateX(3mm) !important;
    overflow:visible !important;
  }

  body.print-record-mode .excel-frame,
  body.print-record-mode .excel-frame.single-copy{
    display:block !important;
    box-sizing:border-box !important;
    width:198mm !important;
    max-width:198mm !important;
    height:auto !important;
    margin:0 auto !important;
    padding:0 !important;
    background:#fff !important;
    overflow:visible !important;
  }

  body.print-record-mode .tfs{
    display:flex !important;
    flex-direction:column !important;
    box-sizing:border-box !important;
    width:196mm !important;
    max-width:196mm !important;
    height:132mm !important;
    min-height:132mm !important;
    max-height:132mm !important;
    margin:0 auto !important;
    padding:0 !important;
    background:#fff !important;
    overflow:hidden !important;
    page-break-inside:avoid !important;
    break-inside:avoid !important;
    border:1px dashed currentColor !important;
  }

  body.print-record-mode .tfs-title{
    flex:0 0 auto !important;
    padding:3.05mm 3mm 2mm !important;
    line-height:1.1 !important;
  }

  body.print-record-mode .tfs-name{
    font-size:15.1px !important;
    letter-spacing:4.5px !important;
  }

  body.print-record-mode .tfs-sub{
    font-size:9.3px !important;
  }

  body.print-record-mode .tfs table{
    width:100% !important;
    border-collapse:collapse !important;
    border-spacing:0 !important;
    table-layout:auto !important;
    margin:0 !important;
    flex:0 0 auto !important;
  }

  body.print-record-mode .tfs td{
    box-sizing:border-box !important;
    border:1px dashed currentColor !important;
    padding:2.05px 3px !important;
    font-size:9.35px !important;
    line-height:1.06 !important;
    overflow:visible !important;
    text-overflow:clip !important;
    white-space:normal !important;
    word-break:keep-all !important;
    writing-mode:horizontal-tb !important;
    text-orientation:mixed !important;
  }

  body.print-record-mode .tfs table:first-of-type tr:first-child td{
    border-top:0 !important;
  }
  body.print-record-mode .tfs table td:first-child{
    border-left:0 !important;
  }
  body.print-record-mode .tfs table td:last-child{
    border-right:0 !important;
  }
  body.print-record-mode .tfs table:last-of-type tr:last-child td{
    border-bottom:0 !important;
  }

  body.print-record-mode .tfs-sl{
    width:22px !important;
    min-width:22px !important;
    max-width:22px !important;
    padding-left:1px !important;
    padding-right:1px !important;
    line-height:1.3 !important;
  }

  body.print-record-mode .tfs table:nth-of-type(3){
    flex:1 1 auto !important;
    min-height:0 !important;
  }

  body.print-record-mode .tfs table:nth-of-type(3) td{
    height:auto !important;
    min-height:18px !important;
  }

  body.print-record-mode .tfs-pay-table td{
    height:21px !important;
  }

  body.print-record-mode .tfs-bottom{
    flex:0 0 7.5mm !important;
    min-height:7.5mm !important;
    max-height:7.5mm !important;
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    padding:0 5px !important;
    border-top:1px dashed currentColor !important;
  }

  body.print-record-mode .tfs-amt{
    font-size:12px !important;
    white-space:nowrap !important;
  }

  body.print-record-mode .tfs-paper{
    font-size:8px !important;
    opacity:.45 !important;
  }

  body.print-record-mode .excel-divider,
  body.print-record-mode .lp-sep{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    height:4mm !important;
    min-height:4mm !important;
    max-height:4mm !important;
    margin:0 !important;
    color:#94a3b8 !important;
    border:0 !important;
  }

  body.print-record-mode .excel-divider::before,
  body.print-record-mode .excel-divider::after,
  body.print-record-mode .lp-sep::before,
  body.print-record-mode .lp-sep::after{
    content:"" !important;
    flex:1 !important;
    border-top:1px dashed #cbd5e1 !important;
  }

  body.print-record-mode .excel-divider span,
  body.print-record-mode .lp-sep span{
    padding:0 8px !important;
    background:#fff !important;
    font-size:10px !important;
  }

  body.print-record-mode .lp-page{
    display:flex !important;
    flex-direction:column !important;
    box-sizing:border-box !important;
    width:198mm !important;
    max-width:198mm !important;
    height:268mm !important;
    min-height:268mm !important;
    max-height:268mm !important;
    margin:0 auto !important;
    padding:0 !important;
    overflow:hidden !important;
    page-break-after:always !important;
    break-after:page !important;
  }

  body.print-record-mode .lp-page:last-child{
    page-break-after:auto !important;
    break-after:auto !important;
  }

  body.print-record-mode .lp-slot{
    display:block !important;
    flex:0 0 132mm !important;
    width:198mm !important;
    height:132mm !important;
    min-height:132mm !important;
    max-height:132mm !important;
    overflow:hidden !important;
  }

  body.print-record-mode .lp-slot .excel-frame{
    width:198mm !important;
    max-width:198mm !important;
    height:132mm !important;
    min-height:132mm !important;
    max-height:132mm !important;
    overflow:hidden !important;
  }

  body.print-record-mode .lp-slot .tfs{
    width:196mm !important;
    max-width:196mm !important;
    height:132mm !important;
    min-height:132mm !important;
    max-height:132mm !important;
  }
}


/* ===== invoice-calculated-a4-v8-20260628 =====
   계산 기준:
   - A4 portrait = 210mm x 297mm
   - Chrome 인쇄 미리보기의 잘림 방지를 위해 안전 사용폭 190mm로 제한
   - 단일/공급자/공급받는자: 명세서 190mm x 129mm, 중앙 정렬
   - 선택일괄인쇄: 1페이지 = 129mm + 4mm + 129mm = 262mm
   - 좌우는 transform 이동 제거. 이전 오른쪽 잘림 원인이 width 과다 + translate였음.
*/
@media print{
  @page{
    size:A4 portrait;
    margin:6mm;
  }

  html,body{
    margin:0 !important;
    padding:0 !important;
    background:#fff !important;
    width:auto !important;
    height:auto !important;
  }

  body.print-record-mode > *:not(#print-overlay){
    display:none !important;
  }

  body.print-record-mode #print-overlay,
  body.print-record-mode #print-overlay .psheet{
    display:block !important;
    position:static !important;
    inset:auto !important;
    box-sizing:border-box !important;
    width:100% !important;
    max-width:none !important;
    height:auto !important;
    margin:0 !important;
    padding:0 !important;
    border:0 !important;
    box-shadow:none !important;
    background:#fff !important;
    overflow:visible !important;
  }

  body.print-record-mode #print-overlay .pbtns{
    display:none !important;
  }

  body.print-record-mode #print-target-area,
  body.print-record-mode #print-target-area.pf-active{
    display:block !important;
    box-sizing:border-box !important;
    width:194mm !important;
    max-width:194mm !important;
    margin:0 auto !important;
    padding:0 !important;
    transform:none !important;
    overflow:visible !important;
  }

  body.print-record-mode .excel-frame,
  body.print-record-mode .excel-frame.single-copy{
    display:block !important;
    box-sizing:border-box !important;
    width:194mm !important;
    max-width:194mm !important;
    height:auto !important;
    margin:0 auto !important;
    padding:0 !important;
    background:#fff !important;
    overflow:visible !important;
  }

  body.print-record-mode .tfs{
    display:flex !important;
    flex-direction:column !important;
    box-sizing:border-box !important;
    width:190mm !important;
    max-width:190mm !important;
    height:129mm !important;
    min-height:129mm !important;
    max-height:129mm !important;
    margin:0 auto !important;
    padding:0 !important;
    background:#fff !important;
    overflow:hidden !important;
    page-break-inside:avoid !important;
    break-inside:avoid !important;
    border:1px dashed currentColor !important;
  }

  body.print-record-mode .tfs-title{
    flex:0 0 auto !important;
    padding:2.9mm 3mm 1.9mm !important;
    line-height:1.08 !important;
  }

  body.print-record-mode .tfs-name{
    font-size:14.7px !important;
    letter-spacing:4.25px !important;
  }

  body.print-record-mode .tfs-sub{
    font-size:9.1px !important;
  }

  body.print-record-mode .tfs table{
    width:100% !important;
    border-collapse:collapse !important;
    border-spacing:0 !important;
    table-layout:auto !important;
    margin:0 !important;
    flex:0 0 auto !important;
  }

  body.print-record-mode .tfs td{
    box-sizing:border-box !important;
    border:1px dashed currentColor !important;
    padding:1.95px 2.8px !important;
    font-size:9.1px !important;
    line-height:1.04 !important;
    overflow:visible !important;
    text-overflow:clip !important;
    white-space:normal !important;
    word-break:keep-all !important;
    writing-mode:horizontal-tb !important;
    text-orientation:mixed !important;
  }

  body.print-record-mode .tfs table:first-of-type tr:first-child td{
    border-top:0 !important;
  }
  body.print-record-mode .tfs table td:first-child{
    border-left:0 !important;
  }
  body.print-record-mode .tfs table td:last-child{
    border-right:0 !important;
  }
  body.print-record-mode .tfs table:last-of-type tr:last-child td{
    border-bottom:0 !important;
  }

  body.print-record-mode .tfs-sl{
    width:21px !important;
    min-width:21px !important;
    max-width:21px !important;
    padding-left:1px !important;
    padding-right:1px !important;
    line-height:1.27 !important;
  }

  body.print-record-mode .tfs-vb{
    font-weight:700 !important;
  }

  body.print-record-mode .tfs table:nth-of-type(3){
    flex:1 1 auto !important;
    min-height:0 !important;
  }

  body.print-record-mode .tfs table:nth-of-type(3) td{
    height:auto !important;
    min-height:17px !important;
  }

  body.print-record-mode .tfs-pay-table{
    flex:0 0 auto !important;
  }

  body.print-record-mode .tfs-pay-table td{
    height:20px !important;
  }

  body.print-record-mode .tfs-rc{
    padding-left:4px !important;
    padding-right:4px !important;
  }

  body.print-record-mode .tfs-bottom{
    flex:0 0 5mm !important;
    min-height:5mm !important;
    max-height:5mm !important;
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    padding:0 4px !important;
    border-top:1px dashed currentColor !important;
  }

  body.print-record-mode .tfs-amt{
    flex:0 1 auto !important;
    min-width:0 !important;
    font-size:11.6px !important;
    line-height:1 !important;
    white-space:nowrap !important;
  }

  body.print-record-mode .tfs-paper{
    flex:0 0 auto !important;
    font-size:7.6px !important;
    line-height:1 !important;
    opacity:.45 !important;
  }

  body.print-record-mode .excel-divider,
  body.print-record-mode .lp-sep{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    height:4mm !important;
    min-height:4mm !important;
    max-height:4mm !important;
    margin:0 !important;
    color:#94a3b8 !important;
    border:0 !important;
  }

  body.print-record-mode .excel-divider::before,
  body.print-record-mode .excel-divider::after,
  body.print-record-mode .lp-sep::before,
  body.print-record-mode .lp-sep::after{
    content:"" !important;
    flex:1 !important;
    border-top:1px dashed #cbd5e1 !important;
  }

  body.print-record-mode .excel-divider span,
  body.print-record-mode .lp-sep span{
    padding:0 8px !important;
    background:#fff !important;
    font-size:10px !important;
  }

  body.print-record-mode .lp-page{
    display:flex !important;
    flex-direction:column !important;
    box-sizing:border-box !important;
    width:194mm !important;
    max-width:194mm !important;
    height:262mm !important;
    min-height:262mm !important;
    max-height:262mm !important;
    margin:0 auto !important;
    padding:0 !important;
    overflow:hidden !important;
    page-break-after:always !important;
    break-after:page !important;
  }

  body.print-record-mode .lp-page:last-child{
    page-break-after:auto !important;
    break-after:auto !important;
  }

  body.print-record-mode .lp-slot{
    display:block !important;
    flex:0 0 129mm !important;
    width:194mm !important;
    height:129mm !important;
    min-height:129mm !important;
    max-height:129mm !important;
    overflow:hidden !important;
  }

  body.print-record-mode .lp-slot .excel-frame{
    width:194mm !important;
    max-width:194mm !important;
    height:129mm !important;
    min-height:129mm !important;
    max-height:129mm !important;
    overflow:hidden !important;
  }

  body.print-record-mode .lp-slot .tfs{
    width:190mm !important;
    max-width:190mm !important;
    height:129mm !important;
    min-height:129mm !important;
    max-height:129mm !important;
  }
}

/* 화면 미리보기는 인쇄 계산과 별개로 전체 표시 */
.inline-record-preview-box,
.inline-record-preview-frame{
  overflow:visible !important;
  max-height:none !important;
}
.inline-record-preview-frame .excel-frame{
  width:920px !important;
  max-width:100% !important;
}
.inline-record-preview-frame .tfs{
  width:100% !important;
}


/* ===== invoice-print-v9-table-fixed-20260628 =====
   핵심 수정:
   1) 오른쪽 잘림의 주원인인 거래명세서 내부 table auto-layout 제거 → fixed로 고정
   2) Microsoft Print to PDF 기준 A4 전체폭 210mm를 사용하되 명세서는 204mm로 제한
   3) 선택일괄인쇄: 143mm + 5mm + 143mm = 291mm, A4 297mm 안에 배치
   4) 영수/금액 하단 영역 과다 폭/높이 축소
*/
@media print{
  @page{
    size:A4 portrait;
    margin:0;
  }

  html,body{
    margin:0 !important;
    padding:0 !important;
    width:210mm !important;
    min-width:210mm !important;
    background:#fff !important;
  }

  body.print-record-mode > *:not(#print-overlay){
    display:none !important;
  }

  body.print-record-mode #print-overlay,
  body.print-record-mode #print-overlay .psheet{
    display:block !important;
    position:static !important;
    inset:auto !important;
    box-sizing:border-box !important;
    width:210mm !important;
    max-width:210mm !important;
    height:auto !important;
    margin:0 auto !important;
    padding:0 !important;
    border:0 !important;
    box-shadow:none !important;
    background:#fff !important;
    overflow:visible !important;
  }

  body.print-record-mode #print-overlay .pbtns{
    display:none !important;
  }

  body.print-record-mode #print-target-area,
  body.print-record-mode #print-target-area.pf-active{
    display:block !important;
    box-sizing:border-box !important;
    width:210mm !important;
    max-width:210mm !important;
    margin:0 auto !important;
    padding:0 !important;
    transform:none !important;
    overflow:visible !important;
  }

  body.print-record-mode .excel-frame,
  body.print-record-mode .excel-frame.single-copy{
    display:block !important;
    box-sizing:border-box !important;
    width:210mm !important;
    max-width:210mm !important;
    height:auto !important;
    margin:0 auto !important;
    padding:0 !important;
    background:#fff !important;
    overflow:visible !important;
  }

  body.print-record-mode .tfs{
    display:flex !important;
    flex-direction:column !important;
    box-sizing:border-box !important;
    width:204mm !important;
    max-width:204mm !important;
    height:143mm !important;
    min-height:143mm !important;
    max-height:143mm !important;
    margin:0 auto !important;
    padding:0 !important;
    background:#fff !important;
    overflow:hidden !important;
    page-break-inside:avoid !important;
    break-inside:avoid !important;
    border:1px dashed currentColor !important;
  }

  body.print-record-mode .tfs-title{
    flex:0 0 auto !important;
    padding:3.35mm 3mm 2.15mm !important;
    line-height:1.1 !important;
  }

  body.print-record-mode .tfs-name{
    font-size:15.8px !important;
    letter-spacing:4.8px !important;
  }

  body.print-record-mode .tfs-sub{
    font-size:9.6px !important;
  }

  body.print-record-mode .tfs table{
    width:100% !important;
    max-width:100% !important;
    border-collapse:collapse !important;
    border-spacing:0 !important;
    table-layout:fixed !important;
    margin:0 !important;
    flex:0 0 auto !important;
  }

  body.print-record-mode .tfs td{
    box-sizing:border-box !important;
    border:1px dashed currentColor !important;
    padding:2.3px 3.15px !important;
    font-size:9.55px !important;
    line-height:1.08 !important;
    overflow:hidden !important;
    text-overflow:clip !important;
    white-space:normal !important;
    word-break:keep-all !important;
    writing-mode:horizontal-tb !important;
    text-orientation:mixed !important;
  }

  body.print-record-mode .tfs table:first-of-type tr:first-child td{
    border-top:0 !important;
  }

  body.print-record-mode .tfs table td:first-child{
    border-left:0 !important;
  }

  body.print-record-mode .tfs table td:last-child{
    border-right:0 !important;
  }

  body.print-record-mode .tfs table:last-of-type tr:last-child td{
    border-bottom:0 !important;
  }

  body.print-record-mode .tfs-sl{
    width:22px !important;
    min-width:22px !important;
    max-width:22px !important;
    padding-left:1px !important;
    padding-right:1px !important;
    line-height:1.28 !important;
    text-align:center !important;
  }

  body.print-record-mode .tfs-vb{
    font-weight:700 !important;
  }

  body.print-record-mode .tfs table:nth-of-type(3){
    flex:1 1 auto !important;
    min-height:0 !important;
  }

  body.print-record-mode .tfs table:nth-of-type(3) td{
    height:auto !important;
    min-height:18px !important;
  }

  body.print-record-mode .tfs-pay-table{
    flex:0 0 auto !important;
  }

  body.print-record-mode .tfs-pay-table td{
    height:21px !important;
  }

  body.print-record-mode .tfs-rc{
    padding-left:3px !important;
    padding-right:3px !important;
    text-align:center !important;
  }

  body.print-record-mode .tfs-bottom{
    flex:0 0 5mm !important;
    min-height:5mm !important;
    max-height:5mm !important;
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    padding:0 4px !important;
    border-top:1px dashed currentColor !important;
  }

  body.print-record-mode .tfs-amt{
    flex:0 1 auto !important;
    min-width:0 !important;
    font-size:11.8px !important;
    line-height:1 !important;
    white-space:nowrap !important;
  }

  body.print-record-mode .tfs-paper{
    flex:0 0 auto !important;
    font-size:7.6px !important;
    line-height:1 !important;
    opacity:.45 !important;
  }

  body.print-record-mode .excel-divider,
  body.print-record-mode .lp-sep{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    height:5mm !important;
    min-height:5mm !important;
    max-height:5mm !important;
    margin:0 !important;
    color:#94a3b8 !important;
    border:0 !important;
  }

  body.print-record-mode .excel-divider::before,
  body.print-record-mode .excel-divider::after,
  body.print-record-mode .lp-sep::before,
  body.print-record-mode .lp-sep::after{
    content:"" !important;
    flex:1 !important;
    border-top:1px dashed #cbd5e1 !important;
  }

  body.print-record-mode .excel-divider span,
  body.print-record-mode .lp-sep span{
    padding:0 8px !important;
    background:#fff !important;
    font-size:10px !important;
  }

  body.print-record-mode .lp-page{
    display:flex !important;
    flex-direction:column !important;
    box-sizing:border-box !important;
    width:210mm !important;
    max-width:210mm !important;
    height:291mm !important;
    min-height:291mm !important;
    max-height:291mm !important;
    margin:0 auto !important;
    padding:0 !important;
    overflow:hidden !important;
    page-break-after:always !important;
    break-after:page !important;
  }

  body.print-record-mode .lp-page:last-child{
    page-break-after:auto !important;
    break-after:auto !important;
  }

  body.print-record-mode .lp-slot{
    display:block !important;
    flex:0 0 143mm !important;
    width:210mm !important;
    height:143mm !important;
    min-height:143mm !important;
    max-height:143mm !important;
    overflow:hidden !important;
  }

  body.print-record-mode .lp-slot .excel-frame{
    width:210mm !important;
    max-width:210mm !important;
    height:143mm !important;
    min-height:143mm !important;
    max-height:143mm !important;
    overflow:hidden !important;
  }

  body.print-record-mode .lp-slot .tfs{
    width:204mm !important;
    max-width:204mm !important;
    height:143mm !important;
    min-height:143mm !important;
    max-height:143mm !important;
  }
}

/* 화면 미리보기는 실제 인쇄 크기와 분리하되 오른쪽 잘림 없이 표시 */
.inline-record-preview-box,
.inline-record-preview-frame{
  overflow:visible !important;
  max-height:none !important;
}
.inline-record-preview-frame .excel-frame{
  width:980px !important;
  max-width:100% !important;
}
.inline-record-preview-frame .tfs{
  width:100% !important;
}


/* ===== easy-import-preview-20260628 ===== */
.import-modal{
  position:fixed;
  inset:0;
  z-index:9999;
  display:none;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:rgba(15,23,42,.48);
  backdrop-filter:blur(4px);
}
.import-modal.show{display:flex;}
.import-modal-box{
  width:min(1120px, calc(100vw - 32px));
  max-height:calc(100vh - 48px);
  overflow:auto;
  background:#fff;
  border:1px solid #dbe3ee;
  border-radius:20px;
  box-shadow:0 24px 80px rgba(15,23,42,.22);
  padding:18px;
}
.import-modal-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  border-bottom:1px solid #e2e8f0;
  padding-bottom:14px;
  margin-bottom:14px;
}
.import-modal-head h2{
  margin:0;
  font-size:18px;
  color:#0f172a;
}
.import-modal-head p{
  margin:6px 0 0;
  color:#64748b;
  font-size:13px;
  font-weight:700;
}
.import-textarea{
  width:100%;
  min-height:210px;
  resize:vertical;
  border:1px solid #cbd5e1;
  border-radius:14px;
  padding:12px;
  font-size:13px;
  line-height:1.55;
  font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color:#172033;
  background:#f8fafc;
}
.import-textarea:focus{
  outline:2px solid rgba(37,99,235,.18);
  border-color:#93c5fd;
  background:#fff;
}
.import-modal-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  justify-content:flex-end;
  margin:12px 0;
}
.import-summary{
  margin:12px 0;
  padding:12px 14px;
  border:1px solid #bfdbfe;
  background:#eff6ff;
  color:#1e3a8a;
  border-radius:14px;
  font-weight:900;
  font-size:13px;
}
.import-preview-list,
.import-preview-grid{
  display:grid;
  gap:12px;
}
.import-preview-grid{
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
}
.import-preview-card{
  border:1px solid #e2e8f0;
  border-radius:14px;
  background:#fff;
  overflow:auto;
  padding:12px;
}
.import-preview-card strong{
  display:block;
  margin-bottom:8px;
  color:#0f172a;
  font-size:13px;
}
.import-preview-card table{
  width:100%;
  border-collapse:collapse;
  font-size:12px;
}
.import-preview-card th,
.import-preview-card td{
  border-bottom:1px solid #eef2f7;
  padding:7px 8px;
  text-align:left;
  white-space:nowrap;
}
.import-preview-card th{
  background:#f8fafc;
  color:#334155;
  font-weight:900;
}
.records-table tbody tr[data-record-id]{
  cursor:pointer;
}
.records-table tbody tr[data-record-id]:hover td{
  background:#f8fbff;
}


/* ===== invoice-205mm-print-v10-20260628 =====
   사용자 기준: A4 폭 210mm → 명세서가 총 205mm를 차지하도록 조정.
   적용 대상: 단독인쇄 / 공급자만 / 공급받는자만 / 선택일괄인쇄.
   핵심:
   - 출력 대상 전체폭: 210mm
   - 실제 명세서 폭: 205mm
   - 좌우 여백: 약 2.5mm씩
   - 선택일괄인쇄: 140mm + 4mm + 140mm = 284mm
   - 하단 "금 xxx원정" 영역은 5mm로 제한
*/
@media print{
  @page{
    size:A4 portrait;
    margin:0;
  }

  html, body{
    width:210mm !important;
    min-width:210mm !important;
    margin:0 !important;
    padding:0 !important;
    background:#fff !important;
  }

  body.print-record-mode > *:not(#print-overlay){
    display:none !important;
  }

  body.print-record-mode #print-overlay,
  body.print-record-mode #print-overlay .psheet{
    display:block !important;
    position:static !important;
    inset:auto !important;
    box-sizing:border-box !important;
    width:210mm !important;
    max-width:210mm !important;
    height:auto !important;
    margin:0 auto !important;
    padding:0 !important;
    border:0 !important;
    box-shadow:none !important;
    background:#fff !important;
    overflow:visible !important;
  }

  body.print-record-mode #print-overlay .pbtns{
    display:none !important;
  }

  body.print-record-mode #print-target-area,
  body.print-record-mode #print-target-area.pf-active{
    display:block !important;
    box-sizing:border-box !important;
    width:210mm !important;
    max-width:210mm !important;
    margin:0 auto !important;
    padding:0 !important;
    transform:none !important;
    overflow:visible !important;
  }

  body.print-record-mode .excel-frame,
  body.print-record-mode .excel-frame.single-copy{
    display:block !important;
    box-sizing:border-box !important;
    width:210mm !important;
    max-width:210mm !important;
    height:auto !important;
    margin:0 auto !important;
    padding:0 !important;
    background:#fff !important;
    overflow:visible !important;
  }

  body.print-record-mode .tfs{
    display:flex !important;
    flex-direction:column !important;
    box-sizing:border-box !important;
    width:205mm !important;
    max-width:205mm !important;
    height:140mm !important;
    min-height:140mm !important;
    max-height:140mm !important;
    margin:0 auto !important;
    padding:0 !important;
    background:#fff !important;
    overflow:hidden !important;
    border:1px dashed currentColor !important;
    page-break-inside:avoid !important;
    break-inside:avoid !important;
  }

  body.print-record-mode .tfs-title{
    flex:0 0 auto !important;
    padding:3.2mm 3mm 2mm !important;
    line-height:1.08 !important;
  }

  body.print-record-mode .tfs-name{
    font-size:15.8px !important;
    letter-spacing:4.6px !important;
  }

  body.print-record-mode .tfs-sub{
    font-size:9.4px !important;
  }

  body.print-record-mode .tfs table{
    width:100% !important;
    max-width:100% !important;
    border-collapse:collapse !important;
    border-spacing:0 !important;
    table-layout:fixed !important;
    margin:0 !important;
    flex:0 0 auto !important;
  }

  body.print-record-mode .tfs td{
    box-sizing:border-box !important;
    border:1px dashed currentColor !important;
    padding:2.1px 2.8px !important;
    font-size:9.35px !important;
    line-height:1.05 !important;
    overflow:hidden !important;
    text-overflow:clip !important;
    white-space:normal !important;
    word-break:keep-all !important;
    writing-mode:horizontal-tb !important;
    text-orientation:mixed !important;
  }

  body.print-record-mode .tfs table:first-of-type tr:first-child td{
    border-top:0 !important;
  }
  body.print-record-mode .tfs table td:first-child{
    border-left:0 !important;
  }
  body.print-record-mode .tfs table td:last-child{
    border-right:0 !important;
  }
  body.print-record-mode .tfs table:last-of-type tr:last-child td{
    border-bottom:0 !important;
  }

  body.print-record-mode .tfs-sl{
    width:22px !important;
    min-width:22px !important;
    max-width:22px !important;
    padding-left:1px !important;
    padding-right:1px !important;
    line-height:1.26 !important;
    text-align:center !important;
  }

  body.print-record-mode .tfs-vb{
    font-weight:700 !important;
  }

  body.print-record-mode .tfs table:nth-of-type(3){
    flex:1 1 auto !important;
    min-height:0 !important;
  }

  body.print-record-mode .tfs table:nth-of-type(3) td{
    height:auto !important;
    min-height:17px !important;
  }

  body.print-record-mode .tfs-pay-table{
    flex:0 0 auto !important;
  }

  body.print-record-mode .tfs-pay-table td{
    height:20px !important;
  }

  body.print-record-mode .tfs-rc{
    padding-left:3px !important;
    padding-right:3px !important;
    text-align:center !important;
  }

  body.print-record-mode .tfs-bottom{
    flex:0 0 5mm !important;
    min-height:5mm !important;
    max-height:5mm !important;
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    padding:0 4px !important;
    border-top:1px dashed currentColor !important;
  }

  body.print-record-mode .tfs-amt{
    flex:0 1 auto !important;
    min-width:0 !important;
    font-size:11.6px !important;
    line-height:1 !important;
    white-space:nowrap !important;
  }

  body.print-record-mode .tfs-paper{
    flex:0 0 auto !important;
    font-size:7.4px !important;
    line-height:1 !important;
    opacity:.45 !important;
  }

  body.print-record-mode .excel-divider,
  body.print-record-mode .lp-sep{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    height:4mm !important;
    min-height:4mm !important;
    max-height:4mm !important;
    margin:0 !important;
    color:#94a3b8 !important;
    border:0 !important;
  }

  body.print-record-mode .excel-divider::before,
  body.print-record-mode .excel-divider::after,
  body.print-record-mode .lp-sep::before,
  body.print-record-mode .lp-sep::after{
    content:"" !important;
    flex:1 !important;
    border-top:1px dashed #cbd5e1 !important;
  }

  body.print-record-mode .excel-divider span,
  body.print-record-mode .lp-sep span{
    padding:0 8px !important;
    background:#fff !important;
    font-size:10px !important;
  }

  /* 선택일괄인쇄: 한 페이지에 명세서 2개 */
  body.print-record-mode .lp-page{
    display:flex !important;
    flex-direction:column !important;
    box-sizing:border-box !important;
    width:210mm !important;
    max-width:210mm !important;
    height:284mm !important;
    min-height:284mm !important;
    max-height:284mm !important;
    margin:0 auto !important;
    padding:0 !important;
    overflow:hidden !important;
    page-break-after:always !important;
    break-after:page !important;
  }

  body.print-record-mode .lp-page:last-child{
    page-break-after:auto !important;
    break-after:auto !important;
  }

  body.print-record-mode .lp-slot{
    display:block !important;
    flex:0 0 140mm !important;
    width:210mm !important;
    height:140mm !important;
    min-height:140mm !important;
    max-height:140mm !important;
    overflow:hidden !important;
  }

  body.print-record-mode .lp-slot .excel-frame{
    width:210mm !important;
    max-width:210mm !important;
    height:140mm !important;
    min-height:140mm !important;
    max-height:140mm !important;
    overflow:hidden !important;
  }

  body.print-record-mode .lp-slot .tfs{
    width:205mm !important;
    max-width:205mm !important;
    height:140mm !important;
    min-height:140mm !important;
    max-height:140mm !important;
  }
}

/* ===== invoice-print-safe-fill-v13-20260628 =====
   단독인쇄 / 공급자만 / 공급받는자만 / 선택일괄인쇄 공통 보정.
   A4 210mm 기준, 실제 명세서 200mm로 오른쪽 잘림 방지와 여백 축소 균형을 맞춤.
*/
@media print{
  @page{
    size:A4 portrait;
    margin:3mm;
  }

  html,
  body{
    margin:0 !important;
    padding:0 !important;
    background:#fff !important;
    width:auto !important;
    min-width:0 !important;
    height:auto !important;
  }

  body.print-record-mode > *:not(#print-overlay){
    display:none !important;
  }

  body.print-record-mode #print-overlay{
    display:block !important;
    position:static !important;
    inset:auto !important;
    box-sizing:border-box !important;
    width:100% !important;
    max-width:none !important;
    height:auto !important;
    margin:0 !important;
    padding:0 !important;
    background:#fff !important;
    overflow:visible !important;
  }

  body.print-record-mode #print-overlay .psheet{
    display:block !important;
    box-sizing:border-box !important;
    width:100% !important;
    max-width:none !important;
    height:auto !important;
    margin:0 !important;
    padding:0 !important;
    border:0 !important;
    box-shadow:none !important;
    background:#fff !important;
    overflow:visible !important;
  }

  body.print-record-mode #print-overlay .pbtns{
    display:none !important;
  }

  body.print-record-mode #print-target-area,
  body.print-record-mode #print-target-area.pf-active{
    display:block !important;
    box-sizing:border-box !important;
    width:204mm !important;
    max-width:204mm !important;
    margin:0 auto !important;
    padding:0 !important;
    transform:none !important;
    overflow:visible !important;
  }

  body.print-record-mode .excel-frame,
  body.print-record-mode .excel-frame.single-copy{
    display:block !important;
    box-sizing:border-box !important;
    width:204mm !important;
    max-width:204mm !important;
    height:auto !important;
    margin:0 auto !important;
    padding:0 !important;
    background:#fff !important;
    overflow:visible !important;
    page-break-inside:avoid !important;
    break-inside:avoid !important;
  }

  body.print-record-mode .tfs{
    display:flex !important;
    flex-direction:column !important;
    box-sizing:border-box !important;
    width:200mm !important;
    max-width:200mm !important;
    height:132mm !important;
    min-height:132mm !important;
    max-height:132mm !important;
    margin:0 auto !important;
    padding:0 !important;
    background:#fff !important;
    overflow:hidden !important;
    border:1px dashed currentColor !important;
    page-break-inside:avoid !important;
    break-inside:avoid !important;
  }

  body.print-record-mode .tfs-title{
    flex:0 0 auto !important;
    padding:3.0mm 3mm 1.9mm !important;
    line-height:1.08 !important;
  }

  body.print-record-mode .tfs-name{
    font-size:15.4px !important;
    letter-spacing:4.4px !important;
  }

  body.print-record-mode .tfs-sub{
    font-size:9.2px !important;
  }

  body.print-record-mode .tfs table{
    width:100% !important;
    max-width:100% !important;
    border-collapse:collapse !important;
    border-spacing:0 !important;
    table-layout:fixed !important;
    margin:0 !important;
    flex:0 0 auto !important;
  }

  body.print-record-mode .tfs td{
    box-sizing:border-box !important;
    border:1px dashed currentColor !important;
    padding:2.0px 2.7px !important;
    font-size:9.2px !important;
    line-height:1.04 !important;
    overflow:hidden !important;
    text-overflow:clip !important;
    white-space:normal !important;
    word-break:keep-all !important;
    writing-mode:horizontal-tb !important;
    text-orientation:mixed !important;
  }

  body.print-record-mode .tfs table:first-of-type tr:first-child td{
    border-top:0 !important;
  }
  body.print-record-mode .tfs table td:first-child{
    border-left:0 !important;
  }
  body.print-record-mode .tfs table td:last-child{
    border-right:0 !important;
  }
  body.print-record-mode .tfs table:last-of-type tr:last-child td{
    border-bottom:0 !important;
  }

  body.print-record-mode .tfs-sl{
    width:21px !important;
    min-width:21px !important;
    max-width:21px !important;
    padding-left:1px !important;
    padding-right:1px !important;
    line-height:1.25 !important;
    text-align:center !important;
  }

  body.print-record-mode .tfs-vb{
    font-weight:700 !important;
  }

  body.print-record-mode .tfs table:nth-of-type(3){
    flex:1 1 auto !important;
    min-height:0 !important;
  }

  body.print-record-mode .tfs table:nth-of-type(3) td{
    height:auto !important;
    min-height:17px !important;
  }

  body.print-record-mode .tfs-pay-table{
    flex:0 0 auto !important;
  }

  body.print-record-mode .tfs-pay-table td{
    height:19px !important;
  }

  body.print-record-mode .tfs-rc{
    padding-left:3px !important;
    padding-right:3px !important;
    text-align:center !important;
  }

  body.print-record-mode .tfs-bottom{
    flex:0 0 4.5mm !important;
    min-height:4.5mm !important;
    max-height:4.5mm !important;
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    padding:0 8px !important;
    border-top:1px dashed currentColor !important;
    overflow:hidden !important;
  }

  body.print-record-mode .tfs-amt{
    flex:0 1 auto !important;
    min-width:0 !important;
    padding-left:0 !important;
    padding-right:8px !important;
    font-size:11.4px !important;
    line-height:1 !important;
    white-space:nowrap !important;
  }

  body.print-record-mode .tfs-paper{
    flex:0 0 auto !important;
    font-size:7.2px !important;
    line-height:1 !important;
    opacity:.45 !important;
    white-space:nowrap !important;
  }

  body.print-record-mode .excel-divider,
  body.print-record-mode .lp-sep{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    height:3mm !important;
    min-height:3mm !important;
    max-height:3mm !important;
    margin:0 !important;
    color:#94a3b8 !important;
    border:0 !important;
    overflow:hidden !important;
  }

  body.print-record-mode .excel-divider::before,
  body.print-record-mode .excel-divider::after,
  body.print-record-mode .lp-sep::before,
  body.print-record-mode .lp-sep::after{
    content:"" !important;
    flex:1 !important;
    border-top:1px dashed #cbd5e1 !important;
  }

  body.print-record-mode .excel-divider span,
  body.print-record-mode .lp-sep span{
    padding:0 8px !important;
    background:#fff !important;
    font-size:9px !important;
  }

  body.print-record-mode .lp-page{
    display:flex !important;
    flex-direction:column !important;
    box-sizing:border-box !important;
    width:204mm !important;
    max-width:204mm !important;
    height:267mm !important;
    min-height:267mm !important;
    max-height:267mm !important;
    margin:0 auto !important;
    padding:0 !important;
    overflow:hidden !important;
    page-break-after:always !important;
    break-after:page !important;
  }

  body.print-record-mode .lp-page:last-child{
    page-break-after:auto !important;
    break-after:auto !important;
  }

  body.print-record-mode .lp-slot{
    display:block !important;
    flex:0 0 132mm !important;
    width:204mm !important;
    height:132mm !important;
    min-height:132mm !important;
    max-height:132mm !important;
    overflow:hidden !important;
  }

  body.print-record-mode .lp-slot .excel-frame{
    width:204mm !important;
    max-width:204mm !important;
    height:132mm !important;
    min-height:132mm !important;
    max-height:132mm !important;
    overflow:hidden !important;
  }

  body.print-record-mode .lp-slot .tfs{
    width:200mm !important;
    max-width:200mm !important;
    height:132mm !important;
    min-height:132mm !important;
    max-height:132mm !important;
  }
}

/* 화면 미리보기는 인쇄와 별도. 내부 스크롤 제거 유지 */
.inline-record-preview-box,
.inline-record-preview-frame{
  overflow:visible !important;
  max-height:none !important;
}
.inline-record-preview-frame .excel-frame{
  width:960px !important;
  max-width:100% !important;
}
.inline-record-preview-frame .tfs{
  width:100% !important;
}


/* ===== restore-original-invoice-print-v15-20260628 =====
   아래 인쇄 CSS는 사용자가 올린 디자인 변경 전 styles.css의 명세서 인쇄 규격을 마지막 우선순위로 복원합니다.
   단독인쇄 / 공급자만 / 공급받는자만 / 선택일괄인쇄에 공통 적용됩니다.
*/
@media print {
  @page {
    size: A4 portrait;
    margin: 0mm 8mm;
  }
  body,
  html {
    background: #fff !important;
    width: 100%;
    margin: 0;
    padding: 0;
    font-size: 11px;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    overflow: visible !important;
  }
  ::-webkit-scrollbar {
    display: none !important;
  }
  #alog-overlay,
  #auth-layer,
  #perpage-wrap,
  #pretty-modal-container,
  #pwd-overlay,
  .actions,
  .live-preview-space,
  .msg,
  .pagination-wrap,
  .pbtns,
  .preview-container,
  .section-filter,
  .sumbar,
  .tbl-wrap,
  header,
  nav {
    display: none !important;
  }
  #print-overlay {
    display: block !important;
    position: static !important;
    background: #fff !important;
    padding: 0 !important;
    overflow: visible !important;
  }
  .psheet {
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: none !important;
    border: none !important;
    margin: 0 !important;
  }
  .excel-frame {
    background: #fff !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
  }
  .tfs {
    page-break-inside: avoid;
    break-inside: avoid;
  }
  .excel-frame > .tfs + .excel-divider,
  .excel-frame > .excel-divider + .tfs {
    page-break-before: avoid !important;
    break-before: avoid !important;
  }
  .excel-frame {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  @page {
    size: 182mm 289mm portrait;
  }
  #print-target-area {
    width: 182mm;
    margin: 0 auto;
  }
  .lp-page {
    page-break-after: always !important;
    break-after: page !important;
    width: 182mm;
    display: block;
  }
  .lp-page.lp-last,
  .lp-page:last-child {
    page-break-after: auto !important;
    break-after: auto !important;
  }
  .lp-slot {
    height: 128mm;
    overflow: hidden;
    width: 182mm;
    display: block;
  }
  .lp-slot .excel-frame {
    padding: 0 !important;
    width: 182mm !important;
    max-width: 182mm !important;
    background: #fff !important;
  }
  .lp-sep {
    border-top: 1px dashed #bbb;
    margin: 1mm 0;
    height: 1mm;
    display: block;
  }
}
#print-target-area.pf-active {
  width: 100% !important;
  max-width: 720px !important;
  --pscale: 1;
}
#print-target-area.pf-active .excel-frame {
  width: 100% !important;
  max-width: none !important;
  padding: 0 !important;
}
#print-target-area.pf-active .tfs {
  margin-bottom: calc(5mm * var(--pscale)) !important;
  padding: calc(7px * var(--pscale)) calc(9px * var(--pscale)) !important;
  box-sizing: border-box !important;
  width: 100% !important;
}
#print-target-area.pf-active .tfs table {
  font-size: calc(12.5px * var(--pscale)) !important;
  table-layout: auto !important;
}
#print-target-area.pf-active .tfs td {
  padding: calc(6px * var(--pscale)) calc(7px * var(--pscale)) !important;
  font-size: calc(12px * var(--pscale)) !important;
}
#print-target-area.pf-active .tfs-sl {
  width: calc(22px * var(--pscale)) !important;
  padding: calc(9px * var(--pscale)) calc(2px * var(--pscale)) !important;
  font-size: calc(10.5px * var(--pscale)) !important;
}
#print-target-area.pf-active .tfs-k {
  font-size: calc(11px * var(--pscale)) !important;
  padding: calc(5px * var(--pscale)) calc(5px * var(--pscale)) !important;
}
#print-target-area.pf-active .tfs-title {
  padding: calc(9px * var(--pscale)) calc(11px * var(--pscale)) !important;
}
#print-target-area.pf-active .tfs-name {
  font-size: calc(20px * var(--pscale)) !important;
  letter-spacing: calc(6px * var(--pscale)) !important;
}
#print-target-area.pf-active .tfs-sub {
  font-size: calc(14px * var(--pscale)) !important;
}
#print-target-area.pf-active .tfs-ih {
  padding: calc(6px * var(--pscale)) calc(4px * var(--pscale)) !important;
  font-size: calc(12px * var(--pscale)) !important;
}
#print-target-area.pf-active .tfs-ic,
#print-target-area.pf-active .tfs-il,
#print-target-area.pf-active .tfs-ir {
  height: calc(24px * var(--pscale)) !important;
  font-size: calc(12px * var(--pscale)) !important;
}
#print-target-area.pf-active .tfs-fl {
  padding: calc(6px * var(--pscale)) calc(5px * var(--pscale)) !important;
  font-size: calc(12px * var(--pscale)) !important;
}
#print-target-area.pf-active .tfs-fv {
  font-size: calc(14px * var(--pscale)) !important;
}
#print-target-area.pf-active .tfs-rc {
  font-size: calc(13px * var(--pscale)) !important;
}
#print-target-area.pf-active .tfs-rc b {
  font-size: calc(16px * var(--pscale)) !important;
}
#print-target-area.pf-active .tfs-bottom {
  padding: calc(5px * var(--pscale)) calc(9px * var(--pscale)) !important;
}
#print-target-area.pf-active .tfs-amt {
  font-size: calc(15px * var(--pscale)) !important;
}
#print-target-area.pf-active .tfs-paper {
  font-size: calc(10.5px * var(--pscale)) !important;
}
#print-target-area.pf-active .tfs-mid-k {
  font-size: calc(11px * var(--pscale)) !important;
  padding: calc(5px * var(--pscale)) calc(5px * var(--pscale)) !important;
}
#print-target-area.pf-active .tfs-mid-v {
  font-size: calc(13px * var(--pscale)) !important;
}
#print-target-area.pf-active .excel-divider {
  margin: calc(2mm * var(--pscale)) 0 !important;
  padding: calc(3px * var(--pscale)) 0 !important;
}
#print-target-area.pf-active .excel-divider::before {
  border-top: 1px dashed #aaa !important;
}
#print-target-area.pf-active .excel-divider span {
  font-size: calc(9px * var(--pscale)) !important;
  background: #fff !important;
}

@media print {
  /* 기존 파일 규격 복원 + 선택일괄인쇄 오른쪽 잘림 방지 */
  #print-target-area,
  body.print-record-mode #print-target-area,
  body.print-record-mode #print-target-area.pf-active {
    width: 182mm !important;
    max-width: 182mm !important;
    margin: 0 auto !important;
    padding: 0 !important;
    transform: none !important;
    overflow: visible !important;
  }

  body.print-record-mode .excel-frame,
  body.print-record-mode .excel-frame.single-copy {
    width: 182mm !important;
    max-width: 182mm !important;
    padding: 0 !important;
    margin: 0 auto !important;
    background: #fff !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  body.print-record-mode .tfs {
    width: 182mm !important;
    max-width: 182mm !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    overflow: visible !important;
    box-sizing: border-box !important;
    table-layout: auto !important;
  }

  body.print-record-mode .tfs table {
    table-layout: auto !important;
  }

  body.print-record-mode .lp-page {
    width: 182mm !important;
    max-width: 182mm !important;
    margin: 0 auto !important;
    padding: 0 !important;
    overflow: hidden !important;
    page-break-after: always !important;
    break-after: page !important;
  }

  body.print-record-mode .lp-page.lp-last,
  body.print-record-mode .lp-page:last-child {
    page-break-after: auto !important;
    break-after: auto !important;
  }

  body.print-record-mode .lp-slot {
    width: 182mm !important;
    height: 128mm !important;
    min-height: 128mm !important;
    max-height: 128mm !important;
    overflow: hidden !important;
    display: block !important;
  }

  body.print-record-mode .lp-slot .excel-frame {
    width: 182mm !important;
    max-width: 182mm !important;
    height: 128mm !important;
    min-height: 128mm !important;
    max-height: 128mm !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  body.print-record-mode .lp-slot .tfs {
    width: 182mm !important;
    max-width: 182mm !important;
  }

  body.print-record-mode .lp-sep {
    height: 1mm !important;
    min-height: 1mm !important;
    max-height: 1mm !important;
    margin: 1mm 0 !important;
    border-top: 1px dashed #bbb !important;
    display: block !important;
    overflow: hidden !important;
  }

  body.print-record-mode .lp-sep span {
    display: none !important;
  }
}


/* ===== invoice-print-selective-v16-20260628 =====
   요청 반영:
   - 단일인쇄 / 공급자만 / 공급받는자만: 사용자가 올린 이전 단일인쇄 양식 사이즈로 복원
   - 선택일괄인쇄: 단일 양식 복원값을 덮지 않고 별도 슬롯 규격 사용
*/
@media print{
  /* 단일 / 공급자만 / 공급받는자만 */
  body.print-record-mode #print-target-area:not(:has(.lp-page)),
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)){
    width:182mm !important;
    max-width:182mm !important;
    margin:0 auto !important;
    padding:0 !important;
    transform:none !important;
    overflow:visible !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .excel-frame,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .excel-frame.single-copy{
    width:182mm !important;
    max-width:182mm !important;
    margin:0 auto !important;
    padding:0 !important;
    background:#fff !important;
    overflow:visible !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs{
    width:182mm !important;
    max-width:182mm !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    margin:0 0 10px !important;
    overflow:visible !important;
    table-layout:auto !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs table{
    table-layout:auto !important;
  }

  /* 선택일괄인쇄: 현재 수정 전처럼 1페이지 2개 구조 유지 */
  body.print-record-mode #print-target-area:has(.lp-page),
  body.print-record-mode #print-target-area.pf-active:has(.lp-page){
    width:204mm !important;
    max-width:204mm !important;
    margin:0 auto !important;
    padding:0 !important;
    transform:none !important;
    overflow:visible !important;
  }

  body.print-record-mode .lp-page{
    display:flex !important;
    flex-direction:column !important;
    box-sizing:border-box !important;
    width:204mm !important;
    max-width:204mm !important;
    height:267mm !important;
    min-height:267mm !important;
    max-height:267mm !important;
    margin:0 auto !important;
    padding:0 !important;
    overflow:hidden !important;
    page-break-after:always !important;
    break-after:page !important;
  }

  body.print-record-mode .lp-page.lp-last,
  body.print-record-mode .lp-page:last-child{
    page-break-after:auto !important;
    break-after:auto !important;
  }

  body.print-record-mode .lp-slot{
    display:block !important;
    flex:0 0 132mm !important;
    width:204mm !important;
    height:132mm !important;
    min-height:132mm !important;
    max-height:132mm !important;
    overflow:hidden !important;
  }

  body.print-record-mode .lp-slot .excel-frame{
    width:204mm !important;
    max-width:204mm !important;
    height:132mm !important;
    min-height:132mm !important;
    max-height:132mm !important;
    margin:0 auto !important;
    padding:0 !important;
    overflow:hidden !important;
    background:#fff !important;
  }

  body.print-record-mode .lp-slot .tfs{
    width:200mm !important;
    max-width:200mm !important;
    height:132mm !important;
    min-height:132mm !important;
    max-height:132mm !important;
    margin:0 auto !important;
    overflow:hidden !important;
  }

  body.print-record-mode .lp-slot .tfs table{
    table-layout:fixed !important;
  }

  body.print-record-mode .lp-sep{
    height:3mm !important;
    min-height:3mm !important;
    max-height:3mm !important;
    margin:0 !important;
    border-top:1px dashed #bbb !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    overflow:hidden !important;
  }

  body.print-record-mode .lp-sep span{
    display:inline-block !important;
    background:#fff !important;
    padding:0 8px !important;
    font-size:9px !important;
    color:#94a3b8 !important;
  }
}


/* ===== current-design-print-import-v18-20260628 =====
   현재 디자인은 유지하고, 인쇄 규격/텍스트 가져오기 설명만 보정합니다.
   - 단일/공급자/받는자: 기존 현재 버전 비율 유지 + 좌우/상하 소폭 확대
   - 선택일괄인쇄: 오른쪽 잘림 방지용 별도 규격
*/
.import-modal-head{
  align-items:flex-start !important;
}
.import-modal-head > div{
  min-width:0 !important;
  flex:1 1 auto !important;
}
.import-modal-head p,
#easy-import-desc{
  white-space:normal !important;
  overflow:visible !important;
  text-overflow:clip !important;
  word-break:keep-all !important;
  line-height:1.55 !important;
  max-width:none !important;
}
.import-textarea{
  min-height:230px !important;
  white-space:pre-wrap !important;
  overflow:auto !important;
}
.import-meta-line{
  display:flex;
  flex-wrap:wrap;
  gap:6px 10px;
  margin:6px 0 10px;
  font-size:12px;
  color:#475569;
}
.import-meta-line span{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:3px 8px;
  border:1px solid #e2e8f0;
  border-radius:999px;
  background:#f8fafc;
  font-weight:700;
}

@media print{
  @page{
    size:A4 portrait;
    margin:4mm 6mm;
  }

  html,
  body{
    background:#fff !important;
    width:auto !important;
    min-width:0 !important;
    height:auto !important;
    margin:0 !important;
    padding:0 !important;
    overflow:visible !important;
    -webkit-print-color-adjust:exact !important;
    print-color-adjust:exact !important;
  }

  body.print-record-mode > *:not(#print-overlay){
    display:none !important;
  }

  body.print-record-mode #print-overlay,
  body.print-record-mode #print-overlay .psheet{
    display:block !important;
    position:static !important;
    inset:auto !important;
    width:100% !important;
    max-width:none !important;
    height:auto !important;
    margin:0 !important;
    padding:0 !important;
    border:0 !important;
    box-shadow:none !important;
    background:#fff !important;
    overflow:visible !important;
  }

  body.print-record-mode #print-overlay .pbtns{
    display:none !important;
  }

  /* 단일 / 공급자만 / 공급받는자만 — 현재 비율 유지, 조금만 확대 */
  body.print-record-mode #print-target-area:not(:has(.lp-page)),
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)){
    width:188mm !important;
    max-width:188mm !important;
    margin:0 auto !important;
    padding:0 !important;
    transform:none !important;
    overflow:visible !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .excel-frame,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .excel-frame.single-copy{
    width:188mm !important;
    max-width:188mm !important;
    margin:0 auto !important;
    padding:0 !important;
    background:#fff !important;
    overflow:visible !important;
    box-sizing:border-box !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs{
    width:188mm !important;
    max-width:188mm !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    margin:0 0 10px !important;
    overflow:visible !important;
    box-sizing:border-box !important;
    table-layout:auto !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs table{
    table-layout:auto !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs-title{
    padding:9px 11px !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs td{
    padding:4.4px 6.4px !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs-bottom{
    padding:6px 14px 8px !important;
    min-height:24px !important;
    overflow:visible !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs-amt{
    padding-left:4px !important;
    padding-right:10px !important;
    white-space:nowrap !important;
    line-height:1.15 !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs-paper{
    padding-right:4px !important;
    white-space:nowrap !important;
  }

  /* 선택일괄인쇄 — 오른쪽 잘림 방지. 단일보다 별도 규격 */
  body.print-record-mode #print-target-area:has(.lp-page),
  body.print-record-mode #print-target-area.pf-active:has(.lp-page){
    width:192mm !important;
    max-width:192mm !important;
    margin:0 auto !important;
    padding:0 !important;
    transform:none !important;
    overflow:visible !important;
  }

  body.print-record-mode .lp-page{
    display:flex !important;
    flex-direction:column !important;
    box-sizing:border-box !important;
    width:192mm !important;
    max-width:192mm !important;
    height:268mm !important;
    min-height:268mm !important;
    max-height:268mm !important;
    margin:0 auto !important;
    padding:0 !important;
    overflow:hidden !important;
    page-break-after:always !important;
    break-after:page !important;
  }

  body.print-record-mode .lp-page.lp-last,
  body.print-record-mode .lp-page:last-child{
    page-break-after:auto !important;
    break-after:auto !important;
  }

  body.print-record-mode .lp-slot{
    display:block !important;
    flex:0 0 132.5mm !important;
    width:192mm !important;
    height:132.5mm !important;
    min-height:132.5mm !important;
    max-height:132.5mm !important;
    overflow:hidden !important;
  }

  body.print-record-mode .lp-slot .excel-frame{
    width:192mm !important;
    max-width:192mm !important;
    height:132.5mm !important;
    min-height:132.5mm !important;
    max-height:132.5mm !important;
    margin:0 auto !important;
    padding:0 !important;
    background:#fff !important;
    overflow:hidden !important;
    box-sizing:border-box !important;
  }

  body.print-record-mode .lp-slot .tfs{
    width:188mm !important;
    max-width:188mm !important;
    height:132.5mm !important;
    min-height:132.5mm !important;
    max-height:132.5mm !important;
    margin:0 auto !important;
    overflow:hidden !important;
    box-sizing:border-box !important;
  }

  body.print-record-mode .lp-slot .tfs table{
    table-layout:fixed !important;
  }

  body.print-record-mode .lp-slot .tfs-title{
    padding:7px 9px !important;
  }

  body.print-record-mode .lp-slot .tfs td{
    padding:3px 4.2px !important;
    font-size:10px !important;
    line-height:1.13 !important;
  }

  body.print-record-mode .lp-slot .tfs-bottom{
    padding:4px 13px 6px !important;
    min-height:21px !important;
    overflow:visible !important;
  }

  body.print-record-mode .lp-slot .tfs-amt{
    padding-left:4px !important;
    padding-right:10px !important;
    white-space:nowrap !important;
    line-height:1.1 !important;
  }

  body.print-record-mode .lp-sep{
    height:3mm !important;
    min-height:3mm !important;
    max-height:3mm !important;
    margin:0 !important;
    border-top:1px dashed #bbb !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    overflow:hidden !important;
  }

  body.print-record-mode .lp-sep span{
    display:inline-block !important;
    background:#fff !important;
    padding:0 8px !important;
    font-size:9px !important;
    color:#94a3b8 !important;
  }
}


/* ===== invoice-print-tune-v19-20260628 =====
   현재 UI 디자인 유지. 인쇄 영역만 마지막 우선순위로 미세 조정.
   사용자 요청:
   - 단일인쇄: 좌우/상하 여백 축소, 전체 비율 유지하며 약간 확대
   - 선택일괄인쇄: 오른쪽 잘림 방지, 절취선 표시, 상하 여백 축소
   - 공급자/받는자: 현재 좋은 비율 유지 + 좌우 약간 확대 + 금액문구 테두리 밀착 방지
*/
@media print{
  @page{
    size:A4 portrait;
    margin:2mm 3.5mm !important;
  }

  html,
  body{
    margin:0 !important;
    padding:0 !important;
    background:#fff !important;
    width:auto !important;
    min-width:0 !important;
    height:auto !important;
    overflow:visible !important;
    -webkit-print-color-adjust:exact !important;
    print-color-adjust:exact !important;
  }

  body.print-record-mode > *:not(#print-overlay){
    display:none !important;
  }

  body.print-record-mode #print-overlay,
  body.print-record-mode #print-overlay .psheet{
    display:block !important;
    position:static !important;
    inset:auto !important;
    width:100% !important;
    max-width:none !important;
    height:auto !important;
    margin:0 !important;
    padding:0 !important;
    border:0 !important;
    box-shadow:none !important;
    background:#fff !important;
    overflow:visible !important;
  }

  body.print-record-mode #print-overlay .pbtns{
    display:none !important;
  }

  /* 단일인쇄 / 공급자만 / 공급받는자만 */
  body.print-record-mode #print-target-area:not(:has(.lp-page)),
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)){
    width:197mm !important;
    max-width:197mm !important;
    margin:0 auto !important;
    padding:0 !important;
    transform:none !important;
    overflow:visible !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .excel-frame,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .excel-frame.single-copy{
    width:197mm !important;
    max-width:197mm !important;
    margin:0 auto !important;
    padding:0 !important;
    background:#fff !important;
    overflow:visible !important;
    box-sizing:border-box !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs{
    width:197mm !important;
    max-width:197mm !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    margin:0 0 6px !important;
    overflow:visible !important;
    box-sizing:border-box !important;
    table-layout:auto !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs table{
    table-layout:auto !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs-title{
    padding:8px 10px !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs td{
    padding:4.15px 6px !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs-bottom{
    padding:6px 16px 9px !important;
    min-height:25px !important;
    overflow:visible !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs-amt{
    padding-left:8px !important;
    padding-right:12px !important;
    white-space:nowrap !important;
    line-height:1.16 !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs-paper{
    padding-right:6px !important;
    white-space:nowrap !important;
  }

  /* 단일인쇄에 빨강/파랑 2장 사이 절취선이 확실히 보이도록 */
  body.print-record-mode .excel-divider{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    width:197mm !important;
    max-width:197mm !important;
    height:4mm !important;
    min-height:4mm !important;
    max-height:4mm !important;
    margin:2mm auto 2mm !important;
    border:0 !important;
    overflow:hidden !important;
    color:#8a94a6 !important;
  }

  body.print-record-mode .excel-divider::before,
  body.print-record-mode .excel-divider::after{
    content:"" !important;
    flex:1 1 auto !important;
    border-top:1px dashed #b9c0cc !important;
  }

  body.print-record-mode .excel-divider span{
    display:inline-block !important;
    padding:0 8px !important;
    background:#fff !important;
    color:#7b8495 !important;
    font-size:9px !important;
    line-height:1 !important;
    white-space:nowrap !important;
  }

  /* 선택일괄인쇄: 오른쪽 잘림 방지용 별도 폭. 내부 명세서는 단일보다 약간 작게 */
  body.print-record-mode #print-target-area:has(.lp-page),
  body.print-record-mode #print-target-area.pf-active:has(.lp-page){
    width:190mm !important;
    max-width:190mm !important;
    margin:0 auto !important;
    padding:0 !important;
    transform:none !important;
    overflow:visible !important;
  }

  body.print-record-mode .lp-page{
    display:flex !important;
    flex-direction:column !important;
    box-sizing:border-box !important;
    width:190mm !important;
    max-width:190mm !important;
    height:283mm !important;
    min-height:283mm !important;
    max-height:283mm !important;
    margin:0 auto !important;
    padding:0 !important;
    overflow:hidden !important;
    page-break-after:always !important;
    break-after:page !important;
  }

  body.print-record-mode .lp-page.lp-last,
  body.print-record-mode .lp-page:last-child{
    page-break-after:auto !important;
    break-after:auto !important;
  }

  body.print-record-mode .lp-slot{
    display:block !important;
    flex:0 0 139mm !important;
    width:190mm !important;
    height:139mm !important;
    min-height:139mm !important;
    max-height:139mm !important;
    overflow:hidden !important;
  }

  body.print-record-mode .lp-slot .excel-frame{
    width:190mm !important;
    max-width:190mm !important;
    height:139mm !important;
    min-height:139mm !important;
    max-height:139mm !important;
    margin:0 auto !important;
    padding:0 !important;
    background:#fff !important;
    overflow:hidden !important;
    box-sizing:border-box !important;
  }

  body.print-record-mode .lp-slot .tfs{
    width:186mm !important;
    max-width:186mm !important;
    height:139mm !important;
    min-height:139mm !important;
    max-height:139mm !important;
    margin:0 auto !important;
    overflow:hidden !important;
    box-sizing:border-box !important;
  }

  body.print-record-mode .lp-slot .tfs table{
    table-layout:fixed !important;
  }

  body.print-record-mode .lp-slot .tfs-title{
    padding:8px 9px !important;
  }

  body.print-record-mode .lp-slot .tfs td{
    padding:3.6px 4.2px !important;
    font-size:10px !important;
    line-height:1.14 !important;
  }

  body.print-record-mode .lp-slot .tfs-bottom{
    padding:6px 15px 8px !important;
    min-height:23px !important;
    overflow:visible !important;
  }

  body.print-record-mode .lp-slot .tfs-amt{
    padding-left:8px !important;
    padding-right:12px !important;
    white-space:nowrap !important;
    line-height:1.12 !important;
  }

  body.print-record-mode .lp-slot .tfs-paper{
    padding-right:6px !important;
    white-space:nowrap !important;
  }

  body.print-record-mode .lp-sep{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    flex:0 0 5mm !important;
    width:190mm !important;
    height:5mm !important;
    min-height:5mm !important;
    max-height:5mm !important;
    margin:0 auto !important;
    border:0 !important;
    overflow:hidden !important;
    color:#8a94a6 !important;
  }

  body.print-record-mode .lp-sep::before,
  body.print-record-mode .lp-sep::after{
    content:"" !important;
    flex:1 1 auto !important;
    border-top:1px dashed #b9c0cc !important;
  }

  body.print-record-mode .lp-sep span{
    display:inline-block !important;
    padding:0 8px !important;
    background:#fff !important;
    color:#7b8495 !important;
    font-size:9px !important;
    line-height:1 !important;
    white-space:nowrap !important;
  }
}

/* ===== invoice-print-v21-from-v19-20260628 =====
   v19를 기준으로 되돌리고, 사용자가 요청한 여백만 미세 조정.
   - 기존 UI/기능/체크박스 로직은 변경하지 않음
   - 단일/공급자/받는자: v19 좌우폭 유지, 상하 여백만 축소
   - 선택일괄인쇄: v19 상하 비율 유지, 오른쪽 잘림 방지를 위해 폭만 축소
*/
@media print{
  @page{
    size:A4 portrait;
    margin:1mm 3.5mm !important;
  }

  /* 단일인쇄 / 공급자만 / 공급받는자만: v19 좌우폭 유지 */
  body.print-record-mode #print-target-area:not(:has(.lp-page)),
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)){
    width:197mm !important;
    max-width:197mm !important;
    margin:0 auto !important;
    padding:0 !important;
    transform:none !important;
    overflow:visible !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .excel-frame,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .excel-frame.single-copy{
    width:197mm !important;
    max-width:197mm !important;
    margin:0 auto !important;
    padding:0 !important;
    background:#fff !important;
    overflow:visible !important;
    box-sizing:border-box !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs{
    width:197mm !important;
    max-width:197mm !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    margin:0 0 3px !important;
    overflow:visible !important;
    box-sizing:border-box !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs-bottom{
    padding:6px 16px 9px !important;
    min-height:25px !important;
    overflow:visible !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs-amt{
    padding-left:10px !important;
    padding-right:12px !important;
    white-space:nowrap !important;
    line-height:1.16 !important;
  }

  body.print-record-mode .excel-divider{
    display:flex !important;
    width:197mm !important;
    max-width:197mm !important;
    height:4mm !important;
    min-height:4mm !important;
    max-height:4mm !important;
    margin:1mm auto 1mm !important;
    border:0 !important;
    overflow:hidden !important;
    color:#8a94a6 !important;
  }

  body.print-record-mode .excel-divider::before,
  body.print-record-mode .excel-divider::after{
    content:"" !important;
    flex:1 1 auto !important;
    border-top:1px dashed #b9c0cc !important;
  }

  body.print-record-mode .excel-divider span{
    display:inline-block !important;
    padding:0 8px !important;
    background:#fff !important;
    color:#7b8495 !important;
    font-size:9px !important;
    line-height:1 !important;
    white-space:nowrap !important;
  }

  /* 선택일괄인쇄: v19 높이 유지, 오른쪽 잘림만 방지 */
  body.print-record-mode #print-target-area:has(.lp-page),
  body.print-record-mode #print-target-area.pf-active:has(.lp-page){
    width:186mm !important;
    max-width:186mm !important;
    margin:0 auto !important;
    padding:0 !important;
    transform:none !important;
    overflow:visible !important;
  }

  body.print-record-mode .lp-page{
    display:flex !important;
    flex-direction:column !important;
    box-sizing:border-box !important;
    width:186mm !important;
    max-width:186mm !important;
    height:283mm !important;
    min-height:283mm !important;
    max-height:283mm !important;
    margin:0 auto !important;
    padding:0 !important;
    overflow:hidden !important;
    page-break-after:always !important;
    break-after:page !important;
  }

  body.print-record-mode .lp-page.lp-last,
  body.print-record-mode .lp-page:last-child{
    page-break-after:auto !important;
    break-after:auto !important;
  }

  body.print-record-mode .lp-slot{
    display:block !important;
    flex:0 0 139mm !important;
    width:186mm !important;
    height:139mm !important;
    min-height:139mm !important;
    max-height:139mm !important;
    overflow:hidden !important;
  }

  body.print-record-mode .lp-slot .excel-frame{
    width:186mm !important;
    max-width:186mm !important;
    height:139mm !important;
    min-height:139mm !important;
    max-height:139mm !important;
    margin:0 auto !important;
    padding:0 !important;
    background:#fff !important;
    overflow:hidden !important;
    box-sizing:border-box !important;
  }

  body.print-record-mode .lp-slot .tfs{
    width:182mm !important;
    max-width:182mm !important;
    height:139mm !important;
    min-height:139mm !important;
    max-height:139mm !important;
    margin:0 auto !important;
    overflow:hidden !important;
    box-sizing:border-box !important;
  }

  body.print-record-mode .lp-slot .tfs table{
    table-layout:fixed !important;
  }

  body.print-record-mode .lp-slot .tfs-title{
    padding:8px 9px !important;
  }

  body.print-record-mode .lp-slot .tfs td{
    padding:3.45px 3.8px !important;
    font-size:9.8px !important;
    line-height:1.12 !important;
  }

  body.print-record-mode .lp-slot .tfs-bottom{
    padding:6px 16px 8px !important;
    min-height:23px !important;
    overflow:visible !important;
  }

  body.print-record-mode .lp-slot .tfs-amt{
    padding-left:10px !important;
    padding-right:12px !important;
    white-space:nowrap !important;
    line-height:1.12 !important;
  }

  body.print-record-mode .lp-sep{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    flex:0 0 5mm !important;
    width:186mm !important;
    height:5mm !important;
    min-height:5mm !important;
    max-height:5mm !important;
    margin:0 auto !important;
    border:0 !important;
    overflow:hidden !important;
    color:#8a94a6 !important;
  }

  body.print-record-mode .lp-sep::before,
  body.print-record-mode .lp-sep::after{
    content:"" !important;
    flex:1 1 auto !important;
    border-top:1px dashed #b9c0cc !important;
  }

  body.print-record-mode .lp-sep span{
    display:inline-block !important;
    padding:0 8px !important;
    background:#fff !important;
    color:#7b8495 !important;
    font-size:9px !important;
    line-height:1 !important;
    white-space:nowrap !important;
  }
}


/* ===== invoice-print-v22-balance-cutline-amount-20260628 =====
   v21 기준 유지. 요청사항만 반영:
   1) 출력물이 너무 위로 붙지 않도록 위쪽 여백을 추가해서 상/하 여백 균형 보정
   2) 절취선 색/두께/텍스트를 강화해서 잘 보이게 수정
   3) "금 xxx원정" 문구가 애매하게 테두리에 붙지 않도록 위치 재조정
*/
@media print{
  @page{
    size:A4 portrait;
    margin:1mm 3.5mm !important;
  }

  /* 단일 / 공급자 / 받는자: 좌우는 v21 그대로, 전체를 조금 아래로 내려 상하 균형 보정 */
  body.print-record-mode #print-target-area:not(:has(.lp-page)),
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)){
    width:197mm !important;
    max-width:197mm !important;
    margin:12mm auto 0 !important;
    padding:0 !important;
    transform:none !important;
    overflow:visible !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .excel-frame,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .excel-frame.single-copy{
    width:197mm !important;
    max-width:197mm !important;
    margin:0 auto !important;
    padding:0 !important;
    background:#fff !important;
    overflow:visible !important;
    box-sizing:border-box !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs{
    width:197mm !important;
    max-width:197mm !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    margin:0 0 4px !important;
    overflow:visible !important;
    box-sizing:border-box !important;
  }

  /* 금액 문구 위치 재조정: 좌측/하단 여유 확보 */
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs-bottom{
    padding:7px 18px 11px !important;
    min-height:28px !important;
    overflow:visible !important;
    align-items:center !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs-amt{
    display:block !important;
    padding-left:13px !important;
    padding-right:14px !important;
    padding-bottom:2px !important;
    white-space:nowrap !important;
    line-height:1.16 !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs-paper{
    padding-right:8px !important;
    padding-bottom:1px !important;
    white-space:nowrap !important;
  }

  /* 단일 출력 중 공급자/받는자 2장 사이 절취선 */
  body.print-record-mode .excel-divider{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    width:197mm !important;
    max-width:197mm !important;
    height:6mm !important;
    min-height:6mm !important;
    max-height:6mm !important;
    margin:4mm auto 4mm !important;
    border:0 !important;
    overflow:visible !important;
    color:#475569 !important;
    opacity:1 !important;
  }

  body.print-record-mode .excel-divider::before,
  body.print-record-mode .excel-divider::after{
    content:"" !important;
    flex:1 1 auto !important;
    border-top:1.3px dashed #64748b !important;
  }

  body.print-record-mode .excel-divider span{
    display:inline-block !important;
    padding:0 10px !important;
    background:#fff !important;
    color:#475569 !important;
    font-size:10px !important;
    font-weight:800 !important;
    line-height:1 !important;
    white-space:nowrap !important;
  }

  /* 선택일괄인쇄: 현재 폭/높이 유지, 위쪽으로 붙는 문제와 절취선만 보정 */
  body.print-record-mode #print-target-area:has(.lp-page),
  body.print-record-mode #print-target-area.pf-active:has(.lp-page){
    width:186mm !important;
    max-width:186mm !important;
    margin:7mm auto 0 !important;
    padding:0 !important;
    transform:none !important;
    overflow:visible !important;
  }

  body.print-record-mode .lp-page{
    width:186mm !important;
    max-width:186mm !important;
    height:276mm !important;
    min-height:276mm !important;
    max-height:276mm !important;
    margin:0 auto !important;
    padding:0 !important;
    overflow:hidden !important;
    box-sizing:border-box !important;
  }

  body.print-record-mode .lp-slot{
    flex:0 0 135mm !important;
    width:186mm !important;
    height:135mm !important;
    min-height:135mm !important;
    max-height:135mm !important;
    overflow:hidden !important;
  }

  body.print-record-mode .lp-slot .excel-frame{
    width:186mm !important;
    max-width:186mm !important;
    height:135mm !important;
    min-height:135mm !important;
    max-height:135mm !important;
    margin:0 auto !important;
    padding:0 !important;
    overflow:hidden !important;
    background:#fff !important;
    box-sizing:border-box !important;
  }

  body.print-record-mode .lp-slot .tfs{
    width:186mm !important;
    max-width:186mm !important;
    height:135mm !important;
    min-height:135mm !important;
    max-height:135mm !important;
    margin:0 auto !important;
    overflow:hidden !important;
    box-sizing:border-box !important;
  }

  body.print-record-mode .lp-slot .tfs-bottom{
    padding:7px 17px 10px !important;
    min-height:27px !important;
    overflow:visible !important;
    align-items:center !important;
  }

  body.print-record-mode .lp-slot .tfs-amt{
    display:block !important;
    padding-left:12px !important;
    padding-right:14px !important;
    padding-bottom:2px !important;
    white-space:nowrap !important;
    line-height:1.14 !important;
  }

  body.print-record-mode .lp-slot .tfs-paper{
    padding-right:8px !important;
    padding-bottom:1px !important;
    white-space:nowrap !important;
  }

  /* 선택일괄인쇄 절취선 강화 */
  body.print-record-mode .lp-sep{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    flex:0 0 6mm !important;
    width:186mm !important;
    height:6mm !important;
    min-height:6mm !important;
    max-height:6mm !important;
    margin:0 auto !important;
    border:0 !important;
    overflow:visible !important;
    color:#475569 !important;
    opacity:1 !important;
  }

  body.print-record-mode .lp-sep::before,
  body.print-record-mode .lp-sep::after{
    content:"" !important;
    flex:1 1 auto !important;
    border-top:1.3px dashed #64748b !important;
  }

  body.print-record-mode .lp-sep span{
    display:inline-block !important;
    padding:0 10px !important;
    background:#fff !important;
    color:#475569 !important;
    font-size:10px !important;
    font-weight:800 !important;
    line-height:1 !important;
    white-space:nowrap !important;
  }
}


/* ===== invoice-print-v23-top-batch-right-fix-20260628 =====
   v22 기준 최종 미세 조정:
   - 단일/공급자/받는자: 좌우 폭은 유지하고, 위쪽으로 붙는 문제만 아래로 이동
   - 선택일괄인쇄: 위쪽으로 붙는 문제 보정 + 오른쪽 테두리 잘림 방지 위해 폭만 축소
*/
@media print{
  @page{
    size:A4 portrait;
    margin:1mm 3.5mm !important;
  }

  /* 단일/공급자/받는자 2장 출력: 좌우는 그대로, 첫 장만 아래로 내려 상하 균형 */
  body.print-record-mode #print-target-area:not(:has(.lp-page)) > .excel-frame:first-child:not(.single-copy){
    margin-top:13mm !important;
  }

  /* 공급자만/받는자만/단일 1장 출력: 한 장이라 더 위로 붙어 보이므로 조금 더 아래로 */
  body.print-record-mode #print-target-area:not(:has(.lp-page)) > .excel-frame.single-copy:first-child,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) > .excel-frame:only-child{
    margin-top:19mm !important;
  }

  /* 기존 v22에서 print-target 자체에 준 위쪽 margin은 브라우저에서 겹쳐 보일 수 있어 제거 */
  body.print-record-mode #print-target-area:not(:has(.lp-page)),
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)){
    width:197mm !important;
    max-width:197mm !important;
    margin:0 auto !important;
    padding:0 !important;
    transform:none !important;
    overflow:visible !important;
  }

  /* 금액 문구가 테두리에 닿지 않도록 유지 보강 */
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs-bottom{
    padding:7px 19px 11px !important;
    min-height:28px !important;
    overflow:visible !important;
    align-items:center !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs-amt{
    padding-left:14px !important;
    padding-right:14px !important;
    padding-bottom:2px !important;
    white-space:nowrap !important;
    line-height:1.16 !important;
  }

  /* 절취선은 선명하게 유지 */
  body.print-record-mode .excel-divider{
    height:6mm !important;
    min-height:6mm !important;
    max-height:6mm !important;
    margin:4mm auto 4mm !important;
    color:#334155 !important;
    opacity:1 !important;
  }

  body.print-record-mode .excel-divider::before,
  body.print-record-mode .excel-divider::after{
    border-top:1.5px dashed #475569 !important;
  }

  body.print-record-mode .excel-divider span{
    color:#334155 !important;
    font-size:10px !important;
    font-weight:900 !important;
  }

  /* 선택일괄인쇄: 오른쪽 잘림 방지를 위해 전체 폭/명세서 폭만 더 안전하게 축소 */
  body.print-record-mode #print-target-area:has(.lp-page),
  body.print-record-mode #print-target-area.pf-active:has(.lp-page){
    width:181mm !important;
    max-width:181mm !important;
    margin:8mm auto 0 !important;
    padding:0 !important;
    transform:none !important;
    overflow:visible !important;
  }

  body.print-record-mode .lp-page{
    width:181mm !important;
    max-width:181mm !important;
    height:276mm !important;
    min-height:276mm !important;
    max-height:276mm !important;
    margin:0 auto !important;
    padding:0 !important;
    overflow:hidden !important;
    box-sizing:border-box !important;
  }

  body.print-record-mode .lp-slot{
    flex:0 0 135mm !important;
    width:181mm !important;
    height:135mm !important;
    min-height:135mm !important;
    max-height:135mm !important;
    overflow:hidden !important;
  }

  body.print-record-mode .lp-slot .excel-frame{
    width:181mm !important;
    max-width:181mm !important;
    height:135mm !important;
    min-height:135mm !important;
    max-height:135mm !important;
    margin:0 auto !important;
    padding:0 !important;
    overflow:hidden !important;
    background:#fff !important;
    box-sizing:border-box !important;
  }

  body.print-record-mode .lp-slot .tfs{
    width:181mm !important;
    max-width:181mm !important;
    height:135mm !important;
    min-height:135mm !important;
    max-height:135mm !important;
    margin:0 auto !important;
    overflow:hidden !important;
    box-sizing:border-box !important;
  }

  body.print-record-mode .lp-slot .tfs-bottom{
    padding:7px 18px 10px !important;
    min-height:27px !important;
    overflow:visible !important;
    align-items:center !important;
  }

  body.print-record-mode .lp-slot .tfs-amt{
    padding-left:14px !important;
    padding-right:14px !important;
    padding-bottom:2px !important;
    white-space:nowrap !important;
    line-height:1.14 !important;
  }

  body.print-record-mode .lp-sep{
    flex:0 0 6mm !important;
    width:181mm !important;
    height:6mm !important;
    min-height:6mm !important;
    max-height:6mm !important;
    margin:0 auto !important;
    color:#334155 !important;
    opacity:1 !important;
  }

  body.print-record-mode .lp-sep::before,
  body.print-record-mode .lp-sep::after{
    border-top:1.5px dashed #475569 !important;
  }

  body.print-record-mode .lp-sep span{
    color:#334155 !important;
    font-size:10px !important;
    font-weight:900 !important;
  }
}


/* ===== excel-paste-record-import-v24-20260628 ===== */
#import-modal,
.import-modal{
  z-index:10000;
}
#easy-import-title{
  word-break:keep-all;
}
#easy-import-desc{
  display:block;
  max-width:100%;
  white-space:normal !important;
  word-break:keep-all;
  line-height:1.55;
}
.import-textarea{
  min-height:260px !important;
  white-space:pre !important;
  overflow:auto !important;
  tab-size:12;
  font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace !important;
}
.import-preview-card{
  max-width:100%;
}
.import-preview-card table{
  min-width:980px;
}
.import-meta-line{
  display:flex;
  flex-wrap:wrap;
  gap:6px 10px;
  margin:8px 0 10px;
}
.import-meta-line span{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:3px 8px;
  border:1px solid #e2e8f0;
  border-radius:999px;
  background:#f8fafc;
  color:#475569;
  font-size:12px;
  font-weight:700;
}


/* ===== repair-log-page-v27 ===== */
.repair-card textarea{resize:vertical;min-height:92px}.repair-form-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.repair-status-row{display:flex;gap:12px;flex-wrap:wrap;margin-top:12px}.repair-status-box{flex:1 1 280px;border:1px solid var(--color-border-soft,#e5eaf0);border-radius:14px;background:#f8fafc;padding:12px}.repair-status-box>label{display:block;font-size:12px;font-weight:900;color:#334155;margin-bottom:8px}.repair-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}.repair-list-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap}.repair-list-actions{display:flex;gap:8px;flex-wrap:wrap}.repair-filter-bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;border:1px solid #dbe3ee;border-radius:16px;background:#f8fafc;padding:10px;margin:12px 0}.repair-filter-bar input,.repair-filter-bar select{height:38px;border:1px solid #cbd5e1;border-radius:10px;padding:0 10px;background:#fff;font-weight:700;color:#172033}.repair-filter-bar input[type="text"]{min-width:280px;flex:1}.repair-summary{display:inline-flex;align-items:center;min-height:34px;border:1px solid #bfdbfe;background:#eff6ff;color:#1e3a8a;border-radius:999px;padding:0 14px;font-size:13px;font-weight:900;margin-bottom:10px}.repair-grouped-list{display:flex;flex-direction:column;gap:14px}.repair-group-section{border:1px solid #dbe3ee;border-radius:16px;overflow:hidden;background:#fff}.repair-group-title{display:flex;align-items:center;justify-content:space-between;gap:8px;background:#f1f5f9;padding:10px 12px;border-bottom:1px solid #dbe3ee}.repair-group-title strong{font-size:14px;color:#0f172a}.repair-group-title span{font-size:12px;font-weight:900;color:#475569}.repair-table{width:100%;border-collapse:collapse;font-size:12px}.repair-table th,.repair-table td{border-bottom:1px solid #e2e8f0;padding:9px 10px;vertical-align:middle}.repair-table th{background:#f8fafc;color:#334155;font-weight:900}.repair-detail-cell{max-width:320px;white-space:pre-wrap;word-break:keep-all}.repair-badge{display:inline-flex;align-items:center;height:26px;border-radius:999px;padding:0 9px;font-size:12px;font-weight:900}.repair-badge.ok{background:#dcfce7;color:#166534}.repair-badge.warn{background:#fef3c7;color:#92400e}.repair-badge.muted{background:#e2e8f0;color:#475569}.repair-paid-toggle{height:30px;border-radius:999px;border:1px solid #cbd5e1;background:#fff;padding:0 10px;font-size:12px;font-weight:900;cursor:pointer}.repair-paid-toggle.paid{border-color:#86efac;background:#dcfce7;color:#166534}.repair-paid-toggle.unpaid{border-color:#fecaca;background:#fef2f2;color:#b91c1c}.repair-row-actions{display:flex;gap:6px;justify-content:center}.repair-delete{color:#dc2626!important;border-color:#fecaca!important;background:#fef2f2!important}@media(max-width:1024px){.repair-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.repair-filter-bar input[type="text"]{min-width:180px}}@media(max-width:640px){.repair-form-grid{grid-template-columns:1fr}.repair-actions,.repair-list-actions{width:100%;justify-content:stretch}.repair-actions .btn,.repair-list-actions .btn{flex:1}.repair-filter-bar{align-items:stretch}.repair-filter-bar input,.repair-filter-bar select,.repair-filter-bar button{width:100%}.repair-table-wrap{overflow-x:auto}.repair-table{min-width:920px}}


/* ===== record-phone-v28-20260628 ===== */
.record-phone-mini{
  margin-top:3px;
  font-size:10.5px;
  color:#64748b;
  font-weight:600;
  line-height:1.2;
  white-space:nowrap;
}
.record-phone-mini i{
  font-size:9px;
  margin-right:3px;
  color:#94a3b8;
}
@media (max-width: 768px){
  .record-phone-mini{
    white-space:normal;
  }
}


/* ===== repair-log-mobile-invoice-receipt-v29-20260628 ===== */
/* 접수대장 입력/필터 날짜: 캘린더 아이콘만이 아니라 입력칸 전체를 눌러도 선택되게 보강 */
#page-repair input[type="date"]{
  cursor:pointer !important;
  min-width:142px;
  position:relative;
}
#page-repair input[type="date"]::-webkit-calendar-picker-indicator{
  cursor:pointer;
}

/* 접수대장 버튼/아이콘 줄맞춤 */
#page-repair .btn,
#page-repair .repair-paid-toggle,
#page-repair .repair-row-actions .btn{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:6px !important;
  line-height:1 !important;
  white-space:nowrap !important;
  vertical-align:middle !important;
}
#page-repair .repair-actions,
#page-repair .repair-list-actions{
  align-items:center !important;
}
#page-repair .repair-list-actions .btn{
  min-height:34px !important;
  padding:0 12px !important;
}
#page-repair .repair-row-actions{
  display:grid !important;
  grid-template-columns:repeat(2, minmax(72px, 1fr)) !important;
  gap:6px !important;
  align-items:center !important;
  justify-content:center !important;
  min-width:166px;
}
#page-repair .repair-row-actions .btn{
  min-height:30px !important;
  padding:0 8px !important;
  font-size:11.5px !important;
}
#page-repair .repair-to-invoice{
  color:#2563eb !important;
  border-color:#bfdbfe !important;
  background:#eff6ff !important;
}
#page-repair .repair-receipt-print{
  color:#047857 !important;
  border-color:#a7f3d0 !important;
  background:#f0fdf4 !important;
}

/* 수리내역 입력/목록 텍스트 위치 보정 */
#repair-detail{
  min-height:104px !important;
  padding:12px 13px !important;
  line-height:1.55 !important;
  vertical-align:top !important;
  text-align:left !important;
}
#page-repair textarea{
  line-height:1.55 !important;
}
#page-repair .repair-detail-cell{
  vertical-align:top !important;
  text-align:left !important;
  line-height:1.45 !important;
  padding-top:10px !important;
  padding-bottom:10px !important;
}

/* 접수대장 목록 열 너비 안정화 */
#page-repair .repair-table th,
#page-repair .repair-table td{
  vertical-align:middle;
}
#page-repair .repair-table th:nth-child(5),
#page-repair .repair-table td:nth-child(5){
  min-width:240px;
}
#page-repair .repair-table th:last-child,
#page-repair .repair-table td:last-child{
  min-width:180px;
}

/* 모바일 사이드바가 보이지 않던 문제: 헤더 밖 고정 메뉴 버튼 추가 */
.mobile-menu-floating{
  display:none;
}
@media (max-width:1024px){
  .mobile-menu-floating{
    position:fixed !important;
    left:14px !important;
    top:16px !important;
    z-index:140 !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:7px !important;
    min-height:42px !important;
    padding:0 13px !important;
    border:1px solid rgba(203,213,225,.95) !important;
    border-radius:14px !important;
    background:#ffffff !important;
    color:#0f766e !important;
    box-shadow:0 10px 28px rgba(15,23,42,.18) !important;
    font-size:12px !important;
    font-weight:900 !important;
  }
  #main-content.visible.mobile-nav-open .mobile-menu-floating{
    color:#dc2626 !important;
    border-color:#fecaca !important;
    background:#fff7f7 !important;
  }
  #main-content.visible > header{
    z-index:130 !important;
  }
  .mobile-menu-backdrop{
    z-index:120 !important;
  }
  #main-content.visible .header-btns .mobile-menu-btn{
    display:none !important;
  }
}
@media (max-width:640px){
  #page-repair .repair-row-actions{
    grid-template-columns:repeat(2, minmax(76px, 1fr)) !important;
    min-width:190px;
  }
  #page-repair .repair-table{
    min-width:1080px !important;
  }
}


/* ===== repair-table-settlement-inventory-v31-20260702 ===== */
/* 정산 모달 줄바꿈 표시 */
#pm-text-slot{
  white-space:pre-line !important;
  text-align:left !important;
}

/* 접수대장 수리내역 글자 위치 재보정: 다른 셀과 높이감 맞춤 */
#page-repair .repair-detail-cell{
  vertical-align:middle !important;
  text-align:left !important;
  line-height:1.45 !important;
  padding:12px 12px !important;
  white-space:pre-wrap !important;
  word-break:keep-all !important;
}

/* 접수대장 목록 버튼 깨짐 방지 */
#page-repair .repair-table-wrap{
  overflow-x:auto !important;
  -webkit-overflow-scrolling:touch;
}
#page-repair .repair-table{
  min-width:1180px !important;
  table-layout:fixed !important;
}
#page-repair .repair-table th:nth-child(1),#page-repair .repair-table td:nth-child(1){width:112px}
#page-repair .repair-table th:nth-child(2),#page-repair .repair-table td:nth-child(2){width:130px}
#page-repair .repair-table th:nth-child(3),#page-repair .repair-table td:nth-child(3){width:105px}
#page-repair .repair-table th:nth-child(4),#page-repair .repair-table td:nth-child(4){width:140px}
#page-repair .repair-table th:nth-child(5),#page-repair .repair-table td:nth-child(5){width:280px}
#page-repair .repair-table th:nth-child(6),#page-repair .repair-table td:nth-child(6){width:105px}
#page-repair .repair-table th:nth-child(7),#page-repair .repair-table td:nth-child(7){width:100px}
#page-repair .repair-table th:nth-child(8),#page-repair .repair-table td:nth-child(8){width:105px}
#page-repair .repair-table th:nth-child(9),#page-repair .repair-table td:nth-child(9){width:210px}
#page-repair .repair-row-actions{
  width:196px !important;
  min-width:196px !important;
  display:grid !important;
  grid-template-columns:repeat(2, 1fr) !important;
  gap:6px !important;
  align-items:center !important;
}
#page-repair .repair-row-actions .btn{
  width:100% !important;
  min-width:0 !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  min-height:31px !important;
}

/* 연락/결제 상태를 목록에서 바로 수정 가능하도록 버튼 스타일 통일 */
#page-repair .repair-contact-toggle,
#page-repair .repair-paid-toggle{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-width:78px !important;
  height:30px !important;
  border-radius:999px !important;
  padding:0 10px !important;
  font-size:12px !important;
  font-weight:900 !important;
  cursor:pointer !important;
  line-height:1 !important;
  white-space:nowrap !important;
}
#page-repair .repair-contact-toggle.ok{
  border:1px solid #86efac !important;
  background:#dcfce7 !important;
  color:#166534 !important;
}
#page-repair .repair-contact-toggle.warn{
  border:1px solid #fde68a !important;
  background:#fef3c7 !important;
  color:#92400e !important;
}
#page-repair .repair-contact-toggle.muted{
  border:1px solid #cbd5e1 !important;
  background:#e2e8f0 !important;
  color:#475569 !important;
}

/* 거래내역 정산 버튼 */
#btn-settlement-summary{
  font-weight:900 !important;
}


/* ===== invoice-auto-compact-print-v32-20260703 =====
   명세 품목 줄이 많을 때 A4 1장 안에 공급자/공급받는자 2매가 같이 들어가도록
   품목 수 기준으로 폰트/행간/여백을 단계별로 자동 축소합니다.
*/
@media print{
  /* 7~9개 품목: 살짝 축소 */
  body.print-record-mode .tfs.tfs-compact{
    --tfs-td-font:8.9px;
    --tfs-head-font:8.6px;
    --tfs-row-h:13.6px;
    --tfs-cell-py:1.8px;
    --tfs-cell-px:3px;
  }

  /* 10~13개 품목: 강하게 축소 */
  body.print-record-mode .tfs.tfs-dense{
    --tfs-td-font:8.15px;
    --tfs-head-font:7.9px;
    --tfs-row-h:11.8px;
    --tfs-cell-py:1.2px;
    --tfs-cell-px:2px;
  }

  /* 14개 이상 품목: 최대 축소 */
  body.print-record-mode .tfs.tfs-ultra{
    --tfs-td-font:7.35px;
    --tfs-head-font:7.1px;
    --tfs-row-h:10px;
    --tfs-cell-py:0.7px;
    --tfs-cell-px:1.6px;
  }

  body.print-record-mode .tfs.tfs-compact,
  body.print-record-mode .tfs.tfs-dense,
  body.print-record-mode .tfs.tfs-ultra{
    padding:2.2mm 3.2mm !important;
    margin-bottom:3mm !important;
    overflow:visible !important;
  }

  body.print-record-mode .tfs.tfs-dense,
  body.print-record-mode .tfs.tfs-ultra{
    padding-top:1.8mm !important;
    padding-bottom:1.8mm !important;
  }

  body.print-record-mode .tfs.tfs-compact .tfs-title,
  body.print-record-mode .tfs.tfs-dense .tfs-title,
  body.print-record-mode .tfs.tfs-ultra .tfs-title{
    padding:2px 5px !important;
  }

  body.print-record-mode .tfs.tfs-compact .tfs-name{
    font-size:12.4px !important;
    letter-spacing:3.2px !important;
  }
  body.print-record-mode .tfs.tfs-dense .tfs-name{
    font-size:11.2px !important;
    letter-spacing:2.4px !important;
  }
  body.print-record-mode .tfs.tfs-ultra .tfs-name{
    font-size:10px !important;
    letter-spacing:1.8px !important;
  }

  body.print-record-mode .tfs.tfs-compact .tfs-sub,
  body.print-record-mode .tfs.tfs-dense .tfs-sub,
  body.print-record-mode .tfs.tfs-ultra .tfs-sub{
    font-size:7.4px !important;
    margin-left:6px !important;
  }

  body.print-record-mode .tfs.tfs-compact td,
  body.print-record-mode .tfs.tfs-dense td,
  body.print-record-mode .tfs.tfs-ultra td{
    padding:var(--tfs-cell-py) var(--tfs-cell-px) !important;
    font-size:var(--tfs-td-font) !important;
    line-height:1.02 !important;
  }

  body.print-record-mode .tfs.tfs-compact .tfs-k,
  body.print-record-mode .tfs.tfs-dense .tfs-k,
  body.print-record-mode .tfs.tfs-ultra .tfs-k,
  body.print-record-mode .tfs.tfs-compact .tfs-mid-k,
  body.print-record-mode .tfs.tfs-dense .tfs-mid-k,
  body.print-record-mode .tfs.tfs-ultra .tfs-mid-k,
  body.print-record-mode .tfs.tfs-compact .tfs-ih,
  body.print-record-mode .tfs.tfs-dense .tfs-ih,
  body.print-record-mode .tfs.tfs-ultra .tfs-ih,
  body.print-record-mode .tfs.tfs-compact .tfs-fl,
  body.print-record-mode .tfs.tfs-dense .tfs-fl,
  body.print-record-mode .tfs.tfs-ultra .tfs-fl{
    font-size:var(--tfs-head-font) !important;
    letter-spacing:0.8px !important;
  }

  body.print-record-mode .tfs.tfs-compact .tfs-k small,
  body.print-record-mode .tfs.tfs-dense .tfs-k small,
  body.print-record-mode .tfs.tfs-ultra .tfs-k small{
    font-size:6px !important;
  }

  body.print-record-mode .tfs.tfs-compact .tfs-vb,
  body.print-record-mode .tfs.tfs-dense .tfs-vb,
  body.print-record-mode .tfs.tfs-ultra .tfs-vb,
  body.print-record-mode .tfs.tfs-compact .tfs-mid-v,
  body.print-record-mode .tfs.tfs-dense .tfs-mid-v,
  body.print-record-mode .tfs.tfs-ultra .tfs-mid-v{
    font-size:var(--tfs-td-font) !important;
  }

  body.print-record-mode .tfs.tfs-compact .tfs-ic,
  body.print-record-mode .tfs.tfs-compact .tfs-il,
  body.print-record-mode .tfs.tfs-compact .tfs-ir,
  body.print-record-mode .tfs.tfs-dense .tfs-ic,
  body.print-record-mode .tfs.tfs-dense .tfs-il,
  body.print-record-mode .tfs.tfs-dense .tfs-ir,
  body.print-record-mode .tfs.tfs-ultra .tfs-ic,
  body.print-record-mode .tfs.tfs-ultra .tfs-il,
  body.print-record-mode .tfs.tfs-ultra .tfs-ir{
    height:var(--tfs-row-h) !important;
    max-height:var(--tfs-row-h) !important;
    font-size:var(--tfs-td-font) !important;
    line-height:1.02 !important;
  }

  body.print-record-mode .tfs.tfs-compact .tfs-il,
  body.print-record-mode .tfs.tfs-dense .tfs-il,
  body.print-record-mode .tfs.tfs-ultra .tfs-il{
    padding-left:4px !important;
  }

  body.print-record-mode .tfs.tfs-compact .tfs-ir,
  body.print-record-mode .tfs.tfs-dense .tfs-ir,
  body.print-record-mode .tfs.tfs-ultra .tfs-ir{
    padding-right:4px !important;
  }

  body.print-record-mode .tfs.tfs-compact .tfs-fv,
  body.print-record-mode .tfs.tfs-dense .tfs-fv,
  body.print-record-mode .tfs.tfs-ultra .tfs-fv,
  body.print-record-mode .tfs.tfs-compact .tfs-amt,
  body.print-record-mode .tfs.tfs-dense .tfs-amt,
  body.print-record-mode .tfs.tfs-ultra .tfs-amt{
    font-size:9.6px !important;
  }

  body.print-record-mode .tfs.tfs-compact .tfs-rc,
  body.print-record-mode .tfs.tfs-dense .tfs-rc,
  body.print-record-mode .tfs.tfs-ultra .tfs-rc{
    font-size:8px !important;
    padding:2px 3px !important;
  }

  body.print-record-mode .tfs.tfs-compact .tfs-rc b,
  body.print-record-mode .tfs.tfs-dense .tfs-rc b,
  body.print-record-mode .tfs.tfs-ultra .tfs-rc b{
    font-size:11px !important;
  }

  body.print-record-mode .tfs.tfs-compact .tfs-bottom,
  body.print-record-mode .tfs.tfs-dense .tfs-bottom,
  body.print-record-mode .tfs.tfs-ultra .tfs-bottom{
    padding:2px 11px 4px !important;
    min-height:18px !important;
    font-size:7.6px !important;
  }

  body.print-record-mode .tfs.tfs-compact .tfs-paper,
  body.print-record-mode .tfs.tfs-dense .tfs-paper,
  body.print-record-mode .tfs.tfs-ultra .tfs-paper{
    font-size:6.8px !important;
  }

  /* 긴 품목명/비고가 행 높이를 밀어내지 않도록 인쇄 때만 한 줄에 안정화 */
  body.print-record-mode .tfs.tfs-compact .tfs-il,
  body.print-record-mode .tfs.tfs-dense .tfs-il,
  body.print-record-mode .tfs.tfs-ultra .tfs-il,
  body.print-record-mode .tfs.tfs-compact td[style*="font-size:9px"],
  body.print-record-mode .tfs.tfs-dense td[style*="font-size:9px"],
  body.print-record-mode .tfs.tfs-ultra td[style*="font-size:9px"]{
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
  }

  /* 선택일괄인쇄 안에서도 긴 명세서가 잘리지 않게 동일 축소 유지 */
  body.print-record-mode .lp-slot .tfs.tfs-compact,
  body.print-record-mode .lp-slot .tfs.tfs-dense,
  body.print-record-mode .lp-slot .tfs.tfs-ultra{
    height:135mm !important;
    max-height:135mm !important;
    overflow:hidden !important;
  }
}


/* ===== v33-print-force-compact-group-modal-20260703 =====
   v32보다 더 강하게 축소. 품목 많은 명세서는 2매가 A4 1장 안에 들어오도록
   #print-target-area 기준의 높은 우선순위로 다시 보정합니다.
*/
@media print{
  body.print-record-mode #print-target-area .tfs.tfs-compact,
  body.print-record-mode #print-target-area .tfs.tfs-dense,
  body.print-record-mode #print-target-area .tfs.tfs-ultra{
    padding:1.2mm 2.2mm !important;
    margin-bottom:1.5mm !important;
    overflow:hidden !important;
  }

  body.print-record-mode #print-target-area .tfs.tfs-compact{
    --v33-font:7.6px;
    --v33-head:7.2px;
    --v33-row:9.6px;
  }
  body.print-record-mode #print-target-area .tfs.tfs-dense{
    --v33-font:6.7px;
    --v33-head:6.35px;
    --v33-row:8.1px;
  }
  body.print-record-mode #print-target-area .tfs.tfs-ultra{
    --v33-font:6.05px;
    --v33-head:5.8px;
    --v33-row:7.2px;
  }

  body.print-record-mode #print-target-area .tfs.tfs-compact .tfs-title,
  body.print-record-mode #print-target-area .tfs.tfs-dense .tfs-title,
  body.print-record-mode #print-target-area .tfs.tfs-ultra .tfs-title{
    padding:1px 4px !important;
  }

  body.print-record-mode #print-target-area .tfs.tfs-compact .tfs-name{
    font-size:10.3px !important;
    letter-spacing:2px !important;
  }
  body.print-record-mode #print-target-area .tfs.tfs-dense .tfs-name{
    font-size:9.2px !important;
    letter-spacing:1.5px !important;
  }
  body.print-record-mode #print-target-area .tfs.tfs-ultra .tfs-name{
    font-size:8.2px !important;
    letter-spacing:1px !important;
  }
  body.print-record-mode #print-target-area .tfs.tfs-compact .tfs-sub,
  body.print-record-mode #print-target-area .tfs.tfs-dense .tfs-sub,
  body.print-record-mode #print-target-area .tfs.tfs-ultra .tfs-sub{
    font-size:6px !important;
    margin-left:4px !important;
  }

  body.print-record-mode #print-target-area .tfs.tfs-compact td,
  body.print-record-mode #print-target-area .tfs.tfs-dense td,
  body.print-record-mode #print-target-area .tfs.tfs-ultra td{
    padding:0.5px 1.4px !important;
    font-size:var(--v33-font) !important;
    line-height:0.98 !important;
  }

  body.print-record-mode #print-target-area .tfs.tfs-compact .tfs-k,
  body.print-record-mode #print-target-area .tfs.tfs-dense .tfs-k,
  body.print-record-mode #print-target-area .tfs.tfs-ultra .tfs-k,
  body.print-record-mode #print-target-area .tfs.tfs-compact .tfs-mid-k,
  body.print-record-mode #print-target-area .tfs.tfs-dense .tfs-mid-k,
  body.print-record-mode #print-target-area .tfs.tfs-ultra .tfs-mid-k,
  body.print-record-mode #print-target-area .tfs.tfs-compact .tfs-ih,
  body.print-record-mode #print-target-area .tfs.tfs-dense .tfs-ih,
  body.print-record-mode #print-target-area .tfs.tfs-ultra .tfs-ih,
  body.print-record-mode #print-target-area .tfs.tfs-compact .tfs-fl,
  body.print-record-mode #print-target-area .tfs.tfs-dense .tfs-fl,
  body.print-record-mode #print-target-area .tfs.tfs-ultra .tfs-fl{
    font-size:var(--v33-head) !important;
    letter-spacing:0.2px !important;
    line-height:0.98 !important;
  }

  body.print-record-mode #print-target-area .tfs.tfs-compact .tfs-k small,
  body.print-record-mode #print-target-area .tfs.tfs-dense .tfs-k small,
  body.print-record-mode #print-target-area .tfs.tfs-ultra .tfs-k small{
    font-size:5px !important;
    line-height:0.9 !important;
  }

  body.print-record-mode #print-target-area .tfs.tfs-compact .tfs-ic,
  body.print-record-mode #print-target-area .tfs.tfs-compact .tfs-il,
  body.print-record-mode #print-target-area .tfs.tfs-compact .tfs-ir,
  body.print-record-mode #print-target-area .tfs.tfs-dense .tfs-ic,
  body.print-record-mode #print-target-area .tfs.tfs-dense .tfs-il,
  body.print-record-mode #print-target-area .tfs.tfs-dense .tfs-ir,
  body.print-record-mode #print-target-area .tfs.tfs-ultra .tfs-ic,
  body.print-record-mode #print-target-area .tfs.tfs-ultra .tfs-il,
  body.print-record-mode #print-target-area .tfs.tfs-ultra .tfs-ir{
    height:var(--v33-row) !important;
    min-height:var(--v33-row) !important;
    max-height:var(--v33-row) !important;
    font-size:var(--v33-font) !important;
    line-height:0.98 !important;
  }

  body.print-record-mode #print-target-area .tfs.tfs-compact .tfs-bottom,
  body.print-record-mode #print-target-area .tfs.tfs-dense .tfs-bottom,
  body.print-record-mode #print-target-area .tfs.tfs-ultra .tfs-bottom{
    padding:1px 8px 2px !important;
    min-height:13px !important;
    font-size:6px !important;
  }

  body.print-record-mode #print-target-area .tfs.tfs-compact .tfs-amt,
  body.print-record-mode #print-target-area .tfs.tfs-dense .tfs-amt,
  body.print-record-mode #print-target-area .tfs.tfs-ultra .tfs-amt,
  body.print-record-mode #print-target-area .tfs.tfs-compact .tfs-fv,
  body.print-record-mode #print-target-area .tfs.tfs-dense .tfs-fv,
  body.print-record-mode #print-target-area .tfs.tfs-ultra .tfs-fv{
    font-size:8px !important;
    line-height:1 !important;
  }

  body.print-record-mode #print-target-area .tfs.tfs-compact .tfs-rc,
  body.print-record-mode #print-target-area .tfs.tfs-dense .tfs-rc,
  body.print-record-mode #print-target-area .tfs.tfs-ultra .tfs-rc{
    font-size:6.5px !important;
    padding:1px 2px !important;
  }
  body.print-record-mode #print-target-area .tfs.tfs-compact .tfs-rc b,
  body.print-record-mode #print-target-area .tfs.tfs-dense .tfs-rc b,
  body.print-record-mode #print-target-area .tfs.tfs-ultra .tfs-rc b{
    font-size:9px !important;
  }

  body.print-record-mode #print-target-area .tfs.tfs-compact .tfs-paper,
  body.print-record-mode #print-target-area .tfs.tfs-dense .tfs-paper,
  body.print-record-mode #print-target-area .tfs.tfs-ultra .tfs-paper{
    font-size:5.5px !important;
  }

  body.print-record-mode #print-target-area .tfs.tfs-compact .tfs-il,
  body.print-record-mode #print-target-area .tfs.tfs-dense .tfs-il,
  body.print-record-mode #print-target-area .tfs.tfs-ultra .tfs-il,
  body.print-record-mode #print-target-area .tfs.tfs-compact td[style*="font-size:9px"],
  body.print-record-mode #print-target-area .tfs.tfs-dense td[style*="font-size:9px"],
  body.print-record-mode #print-target-area .tfs.tfs-ultra td[style*="font-size:9px"]{
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
  }

  body.print-record-mode .excel-divider{
    height:4mm !important;
    min-height:4mm !important;
    max-height:4mm !important;
    margin:1.4mm auto !important;
  }
}

/* 그룹 일괄추가 모달 확대 */
.group-apply-modal-box{
  max-height:86vh !important;
}
.group-apply-modal-list label{
  min-height:44px !important;
}
@media(max-width:720px){
  .group-apply-modal-list{
    grid-template-columns:1fr !important;
  }
}
.parts-pick-modal{
  width:min(92vw,900px) !important;
  max-width:min(92vw,900px) !important;
}
.parts-pick-modal .ppm-list{
  max-height:66vh !important;
}


/* ===== v34-group-repair-stock-fix-20260703 ===== */
.group-apply-modal-box{
  width:min(96vw,1040px) !important;
  max-width:96vw !important;
  min-width:min(720px,96vw) !important;
  max-height:88vh !important;
}
.group-apply-modal-list{
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  max-height:68vh !important;
}
.repair-import-inline{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin:10px 0 12px;
  padding:10px 12px;
  border:1px solid #bfdbfe;
  border-radius:12px;
  background:#eff6ff;
}
.repair-import-inline span{
  font-size:12px;
  color:#475569;
  font-weight:700;
}
@media(max-width:900px){
  .group-apply-modal-list{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}
@media(max-width:640px){
  .group-apply-modal-list{
    grid-template-columns:1fr !important;
  }
}


/* ===== daily-settlement-report-v35-20260703 ===== */
.daily-report-shell{
  display:flex;
  flex-direction:column;
  gap:16px;
}
.daily-report-hero{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  padding:22px 24px;
  border:1px solid #dbeafe;
  border-radius:20px;
  background:linear-gradient(135deg,#eff6ff 0%,#ffffff 48%,#ecfdf5 100%);
  box-shadow:0 16px 38px rgba(15,23,42,.08);
}
.daily-eyebrow{
  display:inline-flex;
  align-items:center;
  gap:7px;
  margin-bottom:8px;
  font-size:12px;
  font-weight:900;
  color:#0f766e;
  letter-spacing:.02em;
}
.daily-report-hero h2{
  margin:0;
  font-size:26px;
  line-height:1.1;
  color:#0f172a;
  letter-spacing:-.04em;
}
.daily-report-hero p{
  margin:8px 0 0;
  font-size:13px;
  color:#64748b;
  font-weight:600;
}
.daily-report-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:8px;
  min-width:340px;
}
.daily-report-actions input[type="date"]{
  min-height:34px;
  padding:0 10px;
  border:1px solid #cbd5e1;
  border-radius:10px;
  color:#0f172a;
  font-weight:800;
  background:#fff;
}
.daily-summary-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}
.daily-summary-card{
  padding:16px 18px;
  border:1px solid #d1fae5;
  border-radius:16px;
  background:#f0fdf4;
}
.daily-summary-card span{
  display:block;
  font-size:12px;
  font-weight:900;
  color:#047857;
  margin-bottom:6px;
}
.daily-summary-card strong{
  display:block;
  font-size:22px;
  line-height:1.1;
  color:#064e3b;
  letter-spacing:-.03em;
}
.daily-summary-card small{
  display:block;
  margin-top:6px;
  font-size:11.5px;
  color:#475569;
  font-weight:700;
}
.daily-summary-card.warn{
  border-color:#fed7aa;
  background:#fff7ed;
}
.daily-summary-card.warn span,
.daily-summary-card.warn strong{
  color:#c2410c;
}
.daily-summary-card.blue{
  border-color:#bfdbfe;
  background:#eff6ff;
}
.daily-summary-card.blue span,
.daily-summary-card.blue strong{
  color:#1d4ed8;
}
.daily-report-layout{
  display:grid;
  gap:16px;
}
.daily-card{
  margin:0;
}
.daily-section-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  margin-bottom:10px;
}
.daily-section-head h3{
  margin:0;
  display:flex;
  align-items:center;
  gap:7px;
  font-size:16px;
  color:#0f172a;
}
.daily-section-head p{
  margin:4px 0 0;
  font-size:12px;
  color:#64748b;
  font-weight:600;
}
.daily-table{
  width:100%;
  border-collapse:collapse;
  table-layout:fixed;
}
.daily-table th{
  background:#f8fafc;
  color:#334155;
  font-size:11.5px;
  font-weight:900;
  border-bottom:1px solid #e2e8f0;
  padding:10px 8px;
  text-align:left;
}
.daily-table td{
  border-top:1px solid #f1f5f9;
  padding:9px 8px;
  font-size:12px;
  vertical-align:middle;
}
.daily-table td small{
  display:block;
  margin-top:3px;
  color:#64748b;
  font-size:10.5px;
  font-weight:700;
}
.daily-table .tr{
  text-align:right;
  font-family:Consolas,"Courier New",monospace;
}
.daily-detail-cell{
  white-space:pre-wrap;
  line-height:1.45;
  word-break:keep-all;
}
.daily-note-card textarea{
  width:100%;
  min-height:110px;
  resize:vertical;
  border:1px solid #cbd5e1;
  border-radius:12px;
  padding:12px 14px;
  font-size:13px;
  line-height:1.55;
  outline:none;
}
.daily-note-card textarea:focus{
  border-color:#14b8a6;
  box-shadow:0 0 0 3px rgba(20,184,166,.15);
}
@media(max-width:1024px){
  .daily-report-hero{
    flex-direction:column;
  }
  .daily-report-actions{
    min-width:0;
    justify-content:flex-start;
  }
  .daily-summary-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media(max-width:640px){
  .daily-report-hero{
    padding:18px;
  }
  .daily-summary-grid{
    grid-template-columns:1fr;
  }
  .daily-report-actions{
    width:100%;
  }
  .daily-report-actions input,
  .daily-report-actions .btn{
    width:100%;
  }
  .daily-table-wrap{
    overflow-x:auto;
  }
  .daily-table{
    min-width:900px;
  }
}


/* ===== v36-report-group-repair-fixes-20260703 ===== */
.v36-group-modal-overlay{
  position:fixed;
  inset:0;
  z-index:30000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:rgba(15,23,42,.64);
  backdrop-filter:blur(5px);
}
.v36-group-modal{
  width:min(96vw,1120px);
  max-height:90vh;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border-radius:22px;
  background:#fff;
  box-shadow:0 28px 80px rgba(15,23,42,.38);
  border:1px solid rgba(226,232,240,.9);
}
.v36-group-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding:22px 24px 14px;
  border-bottom:1px solid #e2e8f0;
  background:linear-gradient(135deg,#ecfdf5 0%,#ffffff 65%);
}
.v36-group-head h3{
  margin:0;
  display:flex;
  align-items:center;
  gap:8px;
  color:#065f46;
  font-size:19px;
  font-weight:900;
  letter-spacing:-.03em;
}
.v36-group-head p{
  margin:6px 0 0;
  color:#64748b;
  font-size:12.5px;
  font-weight:700;
}
.v36-group-x{
  width:36px;
  height:36px;
  border:1px solid #e2e8f0;
  border-radius:12px;
  background:#fff;
  color:#475569;
  cursor:pointer;
}
.v36-group-tools{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  padding:14px 24px;
  border-bottom:1px solid #f1f5f9;
}
.v36-group-search{
  flex:1 1 360px;
  min-height:38px;
  border:1px solid #cbd5e1;
  border-radius:12px;
  padding:0 12px;
  font-size:13px;
  outline:none;
}
.v36-group-search:focus{
  border-color:#14b8a6;
  box-shadow:0 0 0 3px rgba(20,184,166,.15);
}
.v36-group-count{
  margin-left:auto;
  font-size:12px;
  font-weight:900;
  color:#0f766e;
}
.v36-group-list{
  padding:16px 24px;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  overflow:auto;
  max-height:62vh;
}
.v36-group-item{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:58px;
  padding:10px 12px;
  border:1px solid #e2e8f0;
  border-radius:14px;
  background:#f8fafc;
  cursor:pointer;
}
.v36-group-item:hover{
  border-color:#14b8a6;
  background:#f0fdfa;
}
.v36-group-item input{
  width:16px;
  height:16px;
  accent-color:#047857;
}
.v36-group-main{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:3px;
}
.v36-group-main strong{
  color:#0f172a;
  font-size:13px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.v36-group-main small{
  color:#64748b;
  font-size:11px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.v36-group-item em{
  margin-left:auto;
  font-style:normal;
  color:#047857;
  font-weight:900;
  font-size:11.5px;
  white-space:nowrap;
}
.v36-group-foot{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  padding:14px 24px 20px;
  border-top:1px solid #e2e8f0;
  background:#fff;
}
.repair-import-hero{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin:0 0 16px;
  padding:12px 14px;
  border:1px solid #bbf7d0;
  border-radius:14px;
  background:#f0fdf4;
}
.repair-import-hero span{
  color:#475569;
  font-size:12.5px;
  font-weight:700;
}
#btn-open-daily-report{
  font-weight:900 !important;
}
@media(max-width:920px){
  .v36-group-list{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media(max-width:640px){
  .v36-group-modal{
    width:96vw;
  }
  .v36-group-list{
    grid-template-columns:1fr;
    padding:12px;
  }
  .v36-group-head,
  .v36-group-tools,
  .v36-group-foot{
    padding-left:14px;
    padding-right:14px;
  }
}


/* ===== v38-invoice-readable-many-items-20260703 =====
   품목이 많은 명세서의 공급자/공급받는자 일반 출력에서
   과하게 축소되어 읽기 어려운 문제를 보정합니다.
   선택일괄인쇄(.lp-page)는 기존 압축 규칙을 유지하고,
   일반 인쇄/공급자만/받는자만/공급자+받는자 출력만 읽기 중심으로 조정합니다.
*/
@media print{
  /* 일반 거래명세서 출력 영역은 A4 폭을 유지하면서 높이를 충분히 사용 */
  body.print-record-mode #print-target-area:not(:has(.lp-page)){
    width:197mm !important;
    max-width:197mm !important;
    margin:0 auto !important;
    padding:0 !important;
    transform:none !important;
    overflow:visible !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .excel-frame{
    width:197mm !important;
    max-width:197mm !important;
    padding:0 !important;
    margin:0 auto !important;
    overflow:visible !important;
    background:#fff !important;
  }

  /* v32/v33의 과도한 ultra 축소를 일반 출력에서는 무력화 */
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-compact,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-dense,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-ultra{
    width:197mm !important;
    max-width:197mm !important;
    min-height:120mm !important;
    height:auto !important;
    max-height:none !important;
    padding:2.3mm 3.2mm !important;
    margin:0 0 4mm !important;
    overflow:visible !important;
    box-sizing:border-box !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-compact table,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-dense table,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-ultra table{
    table-layout:fixed !important;
    width:100% !important;
    font-size:8.8px !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-compact .tfs-title,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-dense .tfs-title,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-ultra .tfs-title{
    padding:3px 6px !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-compact .tfs-name,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-dense .tfs-name,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-ultra .tfs-name{
    font-size:12.2px !important;
    letter-spacing:2.4px !important;
    line-height:1.12 !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-compact .tfs-sub,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-dense .tfs-sub,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-ultra .tfs-sub{
    font-size:7.8px !important;
    margin-left:6px !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-compact td,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-dense td,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-ultra td{
    padding:1.6px 2.6px !important;
    font-size:8.6px !important;
    line-height:1.08 !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    overflow:visible !important;
    text-overflow:clip !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-compact .tfs-k,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-dense .tfs-k,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-ultra .tfs-k,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-compact .tfs-mid-k,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-dense .tfs-mid-k,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-ultra .tfs-mid-k,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-compact .tfs-ih,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-dense .tfs-ih,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-ultra .tfs-ih,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-compact .tfs-fl,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-dense .tfs-fl,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-ultra .tfs-fl{
    font-size:8.2px !important;
    letter-spacing:0.7px !important;
    line-height:1.08 !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-compact .tfs-ic,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-compact .tfs-il,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-compact .tfs-ir,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-dense .tfs-ic,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-dense .tfs-il,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-dense .tfs-ir,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-ultra .tfs-ic,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-ultra .tfs-il,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-ultra .tfs-ir{
    height:auto !important;
    min-height:13.2px !important;
    max-height:none !important;
    font-size:8.6px !important;
    line-height:1.08 !important;
  }

  /* 품목/비고는 너무 작게 잘리지 않도록 일반 출력에서는 말줄임 금지 */
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-compact .tfs-il,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-dense .tfs-il,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-ultra .tfs-il,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-compact td[style*="font-size:9px"],
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-dense td[style*="font-size:9px"],
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-ultra td[style*="font-size:9px"]{
    white-space:normal !important;
    overflow:visible !important;
    text-overflow:clip !important;
    word-break:keep-all !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-compact .tfs-fv,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-dense .tfs-fv,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-ultra .tfs-fv,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-compact .tfs-amt,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-dense .tfs-amt,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-ultra .tfs-amt{
    font-size:10.2px !important;
    line-height:1.1 !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-compact .tfs-bottom,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-dense .tfs-bottom,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-ultra .tfs-bottom{
    padding:3px 14px 5px !important;
    min-height:20px !important;
    font-size:7.6px !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .excel-divider{
    height:5mm !important;
    min-height:5mm !important;
    max-height:5mm !important;
    margin:2.2mm auto !important;
  }
}


/* ===== v39-invoice-item-area-readable-20260703 =====
   품목이 많은 공급자/받는자 일반 출력에서 전체 양식을 작게 축소하지 않고,
   실제 품목 표 영역의 행 높이와 글자 크기를 키워 읽을 수 있게 조정합니다.
   선택일괄인쇄(.lp-page)는 기존 규칙 유지.
*/
@media print{
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)){
    --pscale:1 !important;
    width:197mm !important;
    max-width:197mm !important;
    margin:0 auto !important;
    transform:none !important;
    overflow:visible !important;
  }

  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .excel-frame{
    width:197mm !important;
    max-width:197mm !important;
    margin:0 auto !important;
    padding:0 !important;
    overflow:visible !important;
    background:#fff !important;
  }

  /* 바깥 테두리만 길어지는 현상 방지: 높이는 내용이 결정 */
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .tfs.tfs-compact,
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .tfs.tfs-dense,
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .tfs.tfs-ultra{
    width:197mm !important;
    max-width:197mm !important;
    min-height:0 !important;
    height:auto !important;
    max-height:none !important;
    padding:2.2mm 3.1mm !important;
    margin:0 0 4mm !important;
    overflow:visible !important;
    box-sizing:border-box !important;
  }

  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .tfs.tfs-compact .tfs-title,
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .tfs.tfs-dense .tfs-title,
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .tfs.tfs-ultra .tfs-title{
    padding:3px 6px !important;
  }
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .tfs.tfs-compact .tfs-name,
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .tfs.tfs-dense .tfs-name,
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .tfs.tfs-ultra .tfs-name{
    font-size:12.6px !important;
    letter-spacing:2.7px !important;
    line-height:1.12 !important;
  }

  /* 상단 정보/작성일 영역은 과도하게 크지 않게 유지 */
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .tfs.tfs-compact > table:not(:nth-of-type(3)) td,
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .tfs.tfs-dense > table:not(:nth-of-type(3)) td,
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .tfs.tfs-ultra > table:not(:nth-of-type(3)) td{
    padding:1.5px 2.4px !important;
    font-size:8.4px !important;
    line-height:1.05 !important;
  }

  /* 핵심: 품목 표 자체를 키움 */
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .tfs.tfs-compact > table:nth-of-type(3),
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .tfs.tfs-dense > table:nth-of-type(3),
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .tfs.tfs-ultra > table:nth-of-type(3){
    width:100% !important;
    table-layout:fixed !important;
    margin-top:1px !important;
    margin-bottom:2px !important;
  }

  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .tfs.tfs-compact > table:nth-of-type(3) .tfs-ih,
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .tfs.tfs-dense > table:nth-of-type(3) .tfs-ih,
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .tfs.tfs-ultra > table:nth-of-type(3) .tfs-ih{
    height:17px !important;
    min-height:17px !important;
    padding:2.5px 3px !important;
    font-size:8.5px !important;
    line-height:1.08 !important;
    letter-spacing:0.8px !important;
  }

  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .tfs.tfs-compact > table:nth-of-type(3) .tfs-ic,
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .tfs.tfs-compact > table:nth-of-type(3) .tfs-il,
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .tfs.tfs-compact > table:nth-of-type(3) .tfs-ir,
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .tfs.tfs-dense > table:nth-of-type(3) .tfs-ic,
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .tfs.tfs-dense > table:nth-of-type(3) .tfs-il,
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .tfs.tfs-dense > table:nth-of-type(3) .tfs-ir,
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .tfs.tfs-ultra > table:nth-of-type(3) .tfs-ic,
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .tfs.tfs-ultra > table:nth-of-type(3) .tfs-il,
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .tfs.tfs-ultra > table:nth-of-type(3) .tfs-ir{
    height:18px !important;
    min-height:18px !important;
    max-height:none !important;
    padding:2.4px 3px !important;
    font-size:8.9px !important;
    line-height:1.12 !important;
    overflow:visible !important;
    text-overflow:clip !important;
  }

  /* 14줄 이상도 읽을 수는 있게 하되, A4 2매 배치가 깨지지 않도록 살짝만 낮춤 */
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .tfs.tfs-ultra > table:nth-of-type(3) .tfs-ic,
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .tfs.tfs-ultra > table:nth-of-type(3) .tfs-il,
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .tfs.tfs-ultra > table:nth-of-type(3) .tfs-ir{
    height:16.8px !important;
    min-height:16.8px !important;
    font-size:8.4px !important;
    padding:2.1px 2.5px !important;
  }

  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .tfs.tfs-compact > table:nth-of-type(3) .tfs-il,
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .tfs.tfs-dense > table:nth-of-type(3) .tfs-il,
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .tfs.tfs-ultra > table:nth-of-type(3) .tfs-il{
    white-space:normal !important;
    word-break:keep-all !important;
  }

  /* 금액/결제 영역은 테두리만 남지 않도록 품목표 바로 아래에 붙임 */
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .tfs.tfs-compact .tfs-pay-table td,
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .tfs.tfs-dense .tfs-pay-table td,
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .tfs.tfs-ultra .tfs-pay-table td{
    padding:2px 3px !important;
    font-size:8.3px !important;
    line-height:1.06 !important;
  }
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .tfs.tfs-compact .tfs-fv,
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .tfs.tfs-dense .tfs-fv,
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .tfs.tfs-ultra .tfs-fv,
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .tfs.tfs-compact .tfs-amt,
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .tfs.tfs-dense .tfs-amt,
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .tfs.tfs-ultra .tfs-amt{
    font-size:9.8px !important;
    line-height:1.08 !important;
  }
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .tfs.tfs-compact .tfs-bottom,
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .tfs.tfs-dense .tfs-bottom,
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .tfs.tfs-ultra .tfs-bottom{
    padding:3px 14px 5px !important;
    min-height:19px !important;
  }

  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .excel-divider{
    height:4.5mm !important;
    min-height:4.5mm !important;
    max-height:4.5mm !important;
    margin:2mm auto !important;
  }
}


/* ===== v40-invoice-item-rows-fill-space-20260703 =====
   v39에서 외곽 테두리만 커지고 품목 표 안쪽이 그대로 좁게 보이던 문제 수정.
   일반 공급자/받는자 출력에서 실제 품목표 행 높이와 글자 크기를 키워 A4 공간을 사용합니다.
   선택일괄인쇄(.lp-page)는 기존 압축 유지.
*/
@media print{
  /* pf-active 초창기 max-width:720px 규칙을 일반 명세서 인쇄에서 무효화 */
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)),
  body.print-record-mode #print-target-area:not(:has(.lp-page)){
    width:200mm !important;
    max-width:200mm !important;
    margin:0 auto !important;
    padding:0 !important;
    transform:none !important;
    overflow:visible !important;
    --pscale:1 !important;
  }

  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .excel-frame,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .excel-frame{
    width:200mm !important;
    max-width:200mm !important;
    margin:0 auto !important;
    padding:0 !important;
    overflow:visible !important;
    background:#fff !important;
  }

  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .tfs,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs{
    width:200mm !important;
    max-width:200mm !important;
    min-height:0 !important;
    height:auto !important;
    max-height:none !important;
    padding:2.2mm 3mm !important;
    margin:0 0 3.5mm !important;
    overflow:visible !important;
    box-sizing:border-box !important;
  }

  /* 품목이 많은 명세서는 외곽만 늘리지 않고 품목표 자체를 늘린다 */
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-compact .tfs-item-table,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-dense .tfs-item-table,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-ultra .tfs-item-table{
    width:100% !important;
    table-layout:fixed !important;
    margin-top:0 !important;
    margin-bottom:0 !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-compact .tfs-item-table .tfs-ih,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-dense .tfs-item-table .tfs-ih,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-ultra .tfs-item-table .tfs-ih{
    height:18px !important;
    min-height:18px !important;
    padding:2.5px 3px !important;
    font-size:9px !important;
    line-height:1.12 !important;
    letter-spacing:1px !important;
  }

  /* 7~9줄: 넉넉하게 */
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-compact .tfs-item-table .tfs-ic,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-compact .tfs-item-table .tfs-il,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-compact .tfs-item-table .tfs-ir{
    height:21px !important;
    min-height:21px !important;
    max-height:none !important;
    padding:3px 3.5px !important;
    font-size:9.2px !important;
    line-height:1.15 !important;
  }

  /* 10~13줄: A4 2장 배치를 유지하면서 실제 행 높이를 확보 */
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-dense .tfs-item-table .tfs-ic,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-dense .tfs-item-table .tfs-il,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-dense .tfs-item-table .tfs-ir{
    height:18px !important;
    min-height:18px !important;
    max-height:none !important;
    padding:2.6px 3.2px !important;
    font-size:8.9px !important;
    line-height:1.13 !important;
  }

  /* 14줄 이상: 너무 작게 누르지 않고, 그래도 1장 배치를 고려 */
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-ultra .tfs-item-table .tfs-ic,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-ultra .tfs-item-table .tfs-il,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-ultra .tfs-item-table .tfs-ir{
    height:15.5px !important;
    min-height:15.5px !important;
    max-height:none !important;
    padding:2px 2.8px !important;
    font-size:8.35px !important;
    line-height:1.1 !important;
  }

  /* 품목명/비고는 한 줄로 너무 눌리지 않게. 긴 경우만 자연 줄바꿈 */
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-compact .tfs-item-table .tfs-il,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-dense .tfs-item-table .tfs-il,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-ultra .tfs-item-table .tfs-il,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-compact .tfs-item-table td[style*="font-size:9px"],
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-dense .tfs-item-table td[style*="font-size:9px"],
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-ultra .tfs-item-table td[style*="font-size:9px"]{
    white-space:normal !important;
    overflow:visible !important;
    text-overflow:clip !important;
    word-break:keep-all !important;
  }

  /* 제목/기본정보는 너무 커지지 않게, 품목표에 공간 우선 배정 */
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-compact .tfs-title,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-dense .tfs-title,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-ultra .tfs-title{
    padding:2px 5px !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-compact .tfs-name,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-dense .tfs-name,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-ultra .tfs-name{
    font-size:11.6px !important;
    letter-spacing:2.2px !important;
    line-height:1.05 !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-compact td:not(.tfs-ic):not(.tfs-il):not(.tfs-ir):not(.tfs-ih),
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-dense td:not(.tfs-ic):not(.tfs-il):not(.tfs-ir):not(.tfs-ih),
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-ultra td:not(.tfs-ic):not(.tfs-il):not(.tfs-ir):not(.tfs-ih){
    padding:1.4px 2.4px !important;
    font-size:8.2px !important;
    line-height:1.08 !important;
  }

  /* 결제/금액 영역은 품목표 아래 자연스럽게 붙임 */
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-compact .tfs-pay-table,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-dense .tfs-pay-table,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-ultra .tfs-pay-table{
    margin-top:0 !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-compact .tfs-bottom,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-dense .tfs-bottom,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-ultra .tfs-bottom{
    padding:2px 12px 4px !important;
    min-height:18px !important;
  }
}

/* ===== v41-invoice-many-items-real-row-expand-20260703 ===== */
@media print{
  body.print-record-mode #print-target-area:not(:has(.lp-page)),
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)){
    width:202mm !important;
    max-width:202mm !important;
    margin:0 auto !important;
    padding:0 !important;
    transform:none !important;
    overflow:visible !important;
    --pscale:1 !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .excel-frame,
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .excel-frame{
    width:202mm !important;
    max-width:202mm !important;
    margin:0 auto !important;
    padding:0 !important;
    overflow:visible !important;
    box-sizing:border-box !important;
    background:#fff !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs,
  body.print-record-mode #print-target-area.pf-active:not(:has(.lp-page)) .tfs{
    width:202mm !important;
    max-width:202mm !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    padding:2.4mm 3.2mm !important;
    margin:0 0 4mm !important;
    overflow:visible !important;
    box-sizing:border-box !important;
  }

  /* 상단/하단 정보는 살짝 줄이고 품목표에 공간 배정 */
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-compact .tfs-title,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-dense .tfs-title,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-ultra .tfs-title{
    padding:1.8px 5px !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-compact .tfs-name,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-dense .tfs-name,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-ultra .tfs-name{
    font-size:11.4px !important;
    line-height:1.04 !important;
    letter-spacing:2px !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-compact .tfs-sub,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-dense .tfs-sub,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-ultra .tfs-sub{
    font-size:7px !important;
    line-height:1 !important;
    margin-left:5px !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-compact > table:nth-of-type(1) td,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-dense > table:nth-of-type(1) td,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-ultra > table:nth-of-type(1) td,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-compact > table:nth-of-type(2) td,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-dense > table:nth-of-type(2) td,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-ultra > table:nth-of-type(2) td{
    padding:1.2px 2.4px !important;
    font-size:8px !important;
    line-height:1.04 !important;
  }

  /* 실제 품목표: app.js class가 반영되지 않아도 3번째 table을 직접 잡음 */
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs > table:nth-of-type(3),
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs .tfs-item-table{
    width:100% !important;
    table-layout:fixed !important;
    border-collapse:collapse !important;
    margin:0 !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs > table:nth-of-type(3) tr:first-child td,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs .tfs-item-table tr:first-child td{
    height:18px !important;
    min-height:18px !important;
    padding:2.8px 3px !important;
    font-size:9.1px !important;
    line-height:1.12 !important;
    letter-spacing:1px !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs > table:nth-of-type(3) tr:not(:first-child) td,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs .tfs-item-table tr:not(:first-child) td{
    max-height:none !important;
    overflow:visible !important;
    text-overflow:clip !important;
    vertical-align:middle !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-compact > table:nth-of-type(3) tr:not(:first-child) td,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-compact .tfs-item-table tr:not(:first-child) td{
    height:23px !important;
    min-height:23px !important;
    padding:3.4px 3.8px !important;
    font-size:9.45px !important;
    line-height:1.18 !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-dense > table:nth-of-type(3) tr:not(:first-child) td,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-dense .tfs-item-table tr:not(:first-child) td{
    height:21px !important;
    min-height:21px !important;
    padding:3px 3.6px !important;
    font-size:9.2px !important;
    line-height:1.16 !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-ultra > table:nth-of-type(3) tr:not(:first-child) td,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-ultra .tfs-item-table tr:not(:first-child) td{
    height:18.5px !important;
    min-height:18.5px !important;
    padding:2.6px 3.2px !important;
    font-size:8.85px !important;
    line-height:1.14 !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs > table:nth-of-type(3) .tfs-il,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs .tfs-item-table .tfs-il,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs > table:nth-of-type(3) td[style*="font-size:9px"],
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs .tfs-item-table td[style*="font-size:9px"]{
    white-space:normal !important;
    word-break:keep-all !important;
    overflow:visible !important;
    text-overflow:clip !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-compact .tfs-pay-table td,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-dense .tfs-pay-table td,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-ultra .tfs-pay-table td{
    padding:2px 3px !important;
    font-size:8.5px !important;
    line-height:1.08 !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-compact .tfs-bottom,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-dense .tfs-bottom,
  body.print-record-mode #print-target-area:not(:has(.lp-page)) .tfs.tfs-ultra .tfs-bottom{
    padding:2px 12px 4px !important;
    min-height:18px !important;
  }

  body.print-record-mode #print-target-area:not(:has(.lp-page)) .excel-divider{
    height:5mm !important;
    min-height:5mm !important;
    max-height:5mm !important;
    margin:2mm auto !important;
  }
}


/* ===== v42-repair-done-status-20260706 ===== */
#page-repair .repair-done-toggle{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-width:82px !important;
  height:30px !important;
  border-radius:999px !important;
  padding:0 10px !important;
  font-size:12px !important;
  font-weight:900 !important;
  cursor:pointer !important;
  line-height:1 !important;
  white-space:nowrap !important;
  border:1px solid #cbd5e1;
  background:#f1f5f9;
  color:#475569;
}
#page-repair .repair-done-toggle.done{
  border-color:#93c5fd !important;
  background:#dbeafe !important;
  color:#1d4ed8 !important;
}
#page-repair .repair-done-toggle.undone{
  border-color:#fed7aa !important;
  background:#fff7ed !important;
  color:#c2410c !important;
}
#page-repair .repair-status-row{
  flex-wrap:wrap !important;
}
#page-repair .repair-table{
  min-width:1280px !important;
}
#page-repair .repair-table th:nth-child(7),
#page-repair .repair-table td:nth-child(7){
  width:100px;
}
#page-repair .repair-table th:nth-child(8),
#page-repair .repair-table td:nth-child(8){
  width:110px;
}
#page-repair .repair-table th:nth-child(9),
#page-repair .repair-table td:nth-child(9){
  width:105px;
}
#page-repair .repair-table th:nth-child(10),
#page-repair .repair-table td:nth-child(10){
  width:210px;
}


/* ===== v43-invoice-normal-readable-real-expand-20260706 =====
   기존 :has() 기반 규칙이 환경에 따라 안 먹는 문제를 피하려고
   JS가 붙인 .invoice-normal-print 클래스로 직접 적용합니다.
   선택일괄인쇄는 제외하고, 일반 공급자/받는자 출력의 실제 품목표 행을 키웁니다.
*/
@media print{
  @page{
    size:A4 portrait;
    margin:2mm 2mm !important;
  }

  body.print-record-mode #print-target-area.invoice-normal-print,
  body.print-record-mode #print-target-area.pf-active.invoice-normal-print{
    width:204mm !important;
    max-width:204mm !important;
    margin:0 auto !important;
    padding:0 !important;
    transform:none !important;
    overflow:visible !important;
    --pscale:1 !important;
  }

  body.print-record-mode #print-target-area.invoice-normal-print .excel-frame{
    width:204mm !important;
    max-width:204mm !important;
    margin:0 auto !important;
    padding:0 !important;
    overflow:visible !important;
    background:#fff !important;
    box-sizing:border-box !important;
  }

  body.print-record-mode #print-target-area.invoice-normal-print .tfs{
    width:204mm !important;
    max-width:204mm !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    padding:2.2mm 3mm !important;
    margin:0 0 4mm !important;
    overflow:visible !important;
    box-sizing:border-box !important;
  }

  /* 품목 많은 명세서만: 상단 기본정보를 조금 아끼고 품목표를 크게 사용 */
  body.print-record-mode #print-target-area.invoice-normal-print .tfs.tfs-compact .tfs-title,
  body.print-record-mode #print-target-area.invoice-normal-print .tfs.tfs-dense .tfs-title,
  body.print-record-mode #print-target-area.invoice-normal-print .tfs.tfs-ultra .tfs-title{
    padding:1.5px 5px !important;
  }

  body.print-record-mode #print-target-area.invoice-normal-print .tfs.tfs-compact .tfs-name,
  body.print-record-mode #print-target-area.invoice-normal-print .tfs.tfs-dense .tfs-name,
  body.print-record-mode #print-target-area.invoice-normal-print .tfs.tfs-ultra .tfs-name{
    font-size:11.5px !important;
    line-height:1.04 !important;
    letter-spacing:2px !important;
  }

  body.print-record-mode #print-target-area.invoice-normal-print .tfs.tfs-compact .tfs-sub,
  body.print-record-mode #print-target-area.invoice-normal-print .tfs.tfs-dense .tfs-sub,
  body.print-record-mode #print-target-area.invoice-normal-print .tfs.tfs-ultra .tfs-sub{
    font-size:7px !important;
    line-height:1 !important;
    margin-left:5px !important;
  }

  body.print-record-mode #print-target-area.invoice-normal-print .tfs.tfs-compact > table:nth-of-type(1) td,
  body.print-record-mode #print-target-area.invoice-normal-print .tfs.tfs-dense > table:nth-of-type(1) td,
  body.print-record-mode #print-target-area.invoice-normal-print .tfs.tfs-ultra > table:nth-of-type(1) td,
  body.print-record-mode #print-target-area.invoice-normal-print .tfs.tfs-compact > table:nth-of-type(2) td,
  body.print-record-mode #print-target-area.invoice-normal-print .tfs.tfs-dense > table:nth-of-type(2) td,
  body.print-record-mode #print-target-area.invoice-normal-print .tfs.tfs-ultra > table:nth-of-type(2) td{
    padding:1.1px 2.3px !important;
    font-size:8px !important;
    line-height:1.04 !important;
  }

  /* 실제 품목표 */
  body.print-record-mode #print-target-area.invoice-normal-print .tfs .tfs-item-table,
  body.print-record-mode #print-target-area.invoice-normal-print .tfs > table:nth-of-type(3){
    width:100% !important;
    table-layout:fixed !important;
    border-collapse:collapse !important;
    margin:0 !important;
  }

  body.print-record-mode #print-target-area.invoice-normal-print .tfs .tfs-item-table tr:first-child td,
  body.print-record-mode #print-target-area.invoice-normal-print .tfs > table:nth-of-type(3) tr:first-child td{
    height:19px !important;
    min-height:19px !important;
    padding:3px 3.2px !important;
    font-size:9.2px !important;
    line-height:1.12 !important;
    letter-spacing:1px !important;
    vertical-align:middle !important;
  }

  body.print-record-mode #print-target-area.invoice-normal-print .tfs .tfs-item-table tr:not(:first-child) td,
  body.print-record-mode #print-target-area.invoice-normal-print .tfs > table:nth-of-type(3) tr:not(:first-child) td{
    max-height:none !important;
    overflow:visible !important;
    text-overflow:clip !important;
    vertical-align:middle !important;
    box-sizing:border-box !important;
  }

  /* 7~9줄 */
  body.print-record-mode #print-target-area.invoice-normal-print .tfs.tfs-compact .tfs-item-table tr:not(:first-child) td,
  body.print-record-mode #print-target-area.invoice-normal-print .tfs.tfs-compact > table:nth-of-type(3) tr:not(:first-child) td{
    height:27px !important;
    min-height:27px !important;
    padding:4px 4px !important;
    font-size:9.8px !important;
    line-height:1.2 !important;
  }

  /* 10~13줄: 현재 문제 구간 */
  body.print-record-mode #print-target-area.invoice-normal-print .tfs.tfs-dense .tfs-item-table tr:not(:first-child) td,
  body.print-record-mode #print-target-area.invoice-normal-print .tfs.tfs-dense > table:nth-of-type(3) tr:not(:first-child) td{
    height:25px !important;
    min-height:25px !important;
    padding:3.8px 4px !important;
    font-size:9.6px !important;
    line-height:1.18 !important;
  }

  /* 14줄 이상 */
  body.print-record-mode #print-target-area.invoice-normal-print .tfs.tfs-ultra .tfs-item-table tr:not(:first-child) td,
  body.print-record-mode #print-target-area.invoice-normal-print .tfs.tfs-ultra > table:nth-of-type(3) tr:not(:first-child) td{
    height:21px !important;
    min-height:21px !important;
    padding:3px 3.6px !important;
    font-size:9px !important;
    line-height:1.15 !important;
  }

  body.print-record-mode #print-target-area.invoice-normal-print .tfs .tfs-item-table .tfs-il,
  body.print-record-mode #print-target-area.invoice-normal-print .tfs > table:nth-of-type(3) .tfs-il,
  body.print-record-mode #print-target-area.invoice-normal-print .tfs .tfs-item-table td[style*="font-size:9px"],
  body.print-record-mode #print-target-area.invoice-normal-print .tfs > table:nth-of-type(3) td[style*="font-size:9px"]{
    white-space:normal !important;
    word-break:keep-all !important;
    overflow:visible !important;
    text-overflow:clip !important;
  }

  body.print-record-mode #print-target-area.invoice-normal-print .tfs.tfs-compact .tfs-pay-table td,
  body.print-record-mode #print-target-area.invoice-normal-print .tfs.tfs-dense .tfs-pay-table td,
  body.print-record-mode #print-target-area.invoice-normal-print .tfs.tfs-ultra .tfs-pay-table td{
    padding:2px 3px !important;
    font-size:8.5px !important;
    line-height:1.08 !important;
  }

  body.print-record-mode #print-target-area.invoice-normal-print .tfs.tfs-compact .tfs-bottom,
  body.print-record-mode #print-target-area.invoice-normal-print .tfs.tfs-dense .tfs-bottom,
  body.print-record-mode #print-target-area.invoice-normal-print .tfs.tfs-ultra .tfs-bottom{
    padding:2px 12px 4px !important;
    min-height:18px !important;
  }

  body.print-record-mode #print-target-area.invoice-normal-print .excel-divider{
    height:5mm !important;
    min-height:5mm !important;
    max-height:5mm !important;
    margin:2mm auto !important;
  }
}


/* ===== v44-force-readable-invoice-item-rows-20260706 =====
   품목이 많은 공급자/받는자 일반 출력에서 실제 품목 행이 계속 작게 보이는 문제를
   :has(), invoice-normal-print class 의존 없이 최종 강제 보정합니다.
   선택일괄인쇄는 .lp-slot 전용 규칙으로 다시 압축 유지합니다.
*/
@media print{
  /* 일반 거래명세서 출력 폭 확보 */
  body.print-record-mode #print-target-area:not(.invoice-batch-print),
  body.print-record-mode #print-target-area.pf-active:not(.invoice-batch-print){
    width:204mm !important;
    max-width:204mm !important;
    margin:0 auto !important;
    padding:0 !important;
    --pscale:1 !important;
    transform:none !important;
    overflow:visible !important;
  }

  body.print-record-mode #print-target-area:not(.invoice-batch-print) .excel-frame{
    width:204mm !important;
    max-width:204mm !important;
    margin:0 auto !important;
    padding:0 !important;
    overflow:visible !important;
    background:#fff !important;
    box-sizing:border-box !important;
  }

  body.print-record-mode #print-target-area:not(.invoice-batch-print) .tfs{
    width:204mm !important;
    max-width:204mm !important;
    height:auto !important;
    max-height:none !important;
    min-height:0 !important;
    padding:2.2mm 3mm !important;
    margin:0 0 4mm !important;
    overflow:visible !important;
    box-sizing:border-box !important;
  }

  /* 품목 많은 경우 상단은 조금만 압축 */
  body.print-record-mode #print-target-area:not(.invoice-batch-print) .tfs.tfs-compact .tfs-title,
  body.print-record-mode #print-target-area:not(.invoice-batch-print) .tfs.tfs-dense .tfs-title,
  body.print-record-mode #print-target-area:not(.invoice-batch-print) .tfs.tfs-ultra .tfs-title{
    padding:2px 5px !important;
  }

  body.print-record-mode #print-target-area:not(.invoice-batch-print) .tfs.tfs-compact .tfs-name,
  body.print-record-mode #print-target-area:not(.invoice-batch-print) .tfs.tfs-dense .tfs-name,
  body.print-record-mode #print-target-area:not(.invoice-batch-print) .tfs.tfs-ultra .tfs-name{
    font-size:12.2px !important;
    line-height:1.08 !important;
    letter-spacing:2.2px !important;
  }

  body.print-record-mode #print-target-area:not(.invoice-batch-print) .tfs.tfs-compact .tfs-sub,
  body.print-record-mode #print-target-area:not(.invoice-batch-print) .tfs.tfs-dense .tfs-sub,
  body.print-record-mode #print-target-area:not(.invoice-batch-print) .tfs.tfs-ultra .tfs-sub{
    font-size:7.4px !important;
    line-height:1 !important;
    margin-left:5px !important;
  }

  body.print-record-mode #print-target-area:not(.invoice-batch-print) .tfs.tfs-compact > table:nth-of-type(1) td,
  body.print-record-mode #print-target-area:not(.invoice-batch-print) .tfs.tfs-dense > table:nth-of-type(1) td,
  body.print-record-mode #print-target-area:not(.invoice-batch-print) .tfs.tfs-ultra > table:nth-of-type(1) td,
  body.print-record-mode #print-target-area:not(.invoice-batch-print) .tfs.tfs-compact > table:nth-of-type(2) td,
  body.print-record-mode #print-target-area:not(.invoice-batch-print) .tfs.tfs-dense > table:nth-of-type(2) td,
  body.print-record-mode #print-target-area:not(.invoice-batch-print) .tfs.tfs-ultra > table:nth-of-type(2) td{
    padding:1.4px 2.5px !important;
    font-size:8.2px !important;
    line-height:1.06 !important;
  }

  /* 실제 품목표를 직접 크게 사용 */
  body.print-record-mode #print-target-area:not(.invoice-batch-print) .tfs .tfs-item-table,
  body.print-record-mode #print-target-area:not(.invoice-batch-print) .tfs > table:nth-of-type(3){
    width:100% !important;
    table-layout:fixed !important;
    border-collapse:collapse !important;
    margin:0 !important;
  }

  body.print-record-mode #print-target-area:not(.invoice-batch-print) .tfs .tfs-item-table tr:first-child td,
  body.print-record-mode #print-target-area:not(.invoice-batch-print) .tfs > table:nth-of-type(3) tr:first-child td{
    height:20px !important;
    min-height:20px !important;
    padding:3px 3px !important;
    font-size:9.4px !important;
    line-height:1.12 !important;
    vertical-align:middle !important;
  }

  body.print-record-mode #print-target-area:not(.invoice-batch-print) .tfs .tfs-item-table tr:not(:first-child) td,
  body.print-record-mode #print-target-area:not(.invoice-batch-print) .tfs > table:nth-of-type(3) tr:not(:first-child) td{
    max-height:none !important;
    overflow:visible !important;
    text-overflow:clip !important;
    vertical-align:middle !important;
    box-sizing:border-box !important;
  }

  /* 7~9줄 */
  body.print-record-mode #print-target-area:not(.invoice-batch-print) .tfs.tfs-compact .tfs-item-table tr:not(:first-child) td,
  body.print-record-mode #print-target-area:not(.invoice-batch-print) .tfs.tfs-compact > table:nth-of-type(3) tr:not(:first-child) td{
    height:30px !important;
    min-height:30px !important;
    padding:4.6px 4.2px !important;
    font-size:10px !important;
    line-height:1.22 !important;
  }

  /* 10~13줄: 현재 사진 문제 구간 */
  body.print-record-mode #print-target-area:not(.invoice-batch-print) .tfs.tfs-dense .tfs-item-table tr:not(:first-child) td,
  body.print-record-mode #print-target-area:not(.invoice-batch-print) .tfs.tfs-dense > table:nth-of-type(3) tr:not(:first-child) td{
    height:28px !important;
    min-height:28px !important;
    padding:4.2px 4px !important;
    font-size:9.8px !important;
    line-height:1.2 !important;
  }

  /* 14줄 이상 */
  body.print-record-mode #print-target-area:not(.invoice-batch-print) .tfs.tfs-ultra .tfs-item-table tr:not(:first-child) td,
  body.print-record-mode #print-target-area:not(.invoice-batch-print) .tfs.tfs-ultra > table:nth-of-type(3) tr:not(:first-child) td{
    height:24px !important;
    min-height:24px !important;
    padding:3.6px 3.8px !important;
    font-size:9.25px !important;
    line-height:1.17 !important;
  }

  body.print-record-mode #print-target-area:not(.invoice-batch-print) .tfs .tfs-item-table .tfs-il,
  body.print-record-mode #print-target-area:not(.invoice-batch-print) .tfs > table:nth-of-type(3) .tfs-il,
  body.print-record-mode #print-target-area:not(.invoice-batch-print) .tfs .tfs-item-table td[style*="font-size:9px"],
  body.print-record-mode #print-target-area:not(.invoice-batch-print) .tfs > table:nth-of-type(3) td[style*="font-size:9px"]{
    white-space:normal !important;
    word-break:keep-all !important;
    overflow:visible !important;
    text-overflow:clip !important;
  }

  body.print-record-mode #print-target-area:not(.invoice-batch-print) .tfs.tfs-compact .tfs-pay-table td,
  body.print-record-mode #print-target-area:not(.invoice-batch-print) .tfs.tfs-dense .tfs-pay-table td,
  body.print-record-mode #print-target-area:not(.invoice-batch-print) .tfs.tfs-ultra .tfs-pay-table td{
    padding:2.2px 3px !important;
    font-size:8.7px !important;
    line-height:1.1 !important;
  }

  body.print-record-mode #print-target-area:not(.invoice-batch-print) .tfs.tfs-compact .tfs-bottom,
  body.print-record-mode #print-target-area:not(.invoice-batch-print) .tfs.tfs-dense .tfs-bottom,
  body.print-record-mode #print-target-area:not(.invoice-batch-print) .tfs.tfs-ultra .tfs-bottom{
    padding:2px 12px 4px !important;
    min-height:18px !important;
  }

  body.print-record-mode #print-target-area:not(.invoice-batch-print) .excel-divider{
    height:5mm !important;
    min-height:5mm !important;
    max-height:5mm !important;
    margin:2mm auto !important;
  }

  /* 선택일괄인쇄는 이전처럼 슬롯 안에서만 압축 유지 */
  body.print-record-mode #print-target-area.invoice-batch-print,
  body.print-record-mode #print-target-area .lp-page{
    width:182mm !important;
    max-width:182mm !important;
  }

  body.print-record-mode #print-target-area .lp-slot{
    height:128mm !important;
    width:182mm !important;
    overflow:hidden !important;
  }

  body.print-record-mode #print-target-area .lp-slot .tfs .tfs-item-table tr:not(:first-child) td,
  body.print-record-mode #print-target-area .lp-slot .tfs > table:nth-of-type(3) tr:not(:first-child) td{
    height:10px !important;
    min-height:10px !important;
    padding:0.7px 1.6px !important;
    font-size:7.35px !important;
    line-height:1.02 !important;
  }
}


/* ===== v45-invoice-print-left-right-safe-margin-20260710 =====
   HP/Chrome 인쇄 미리보기에서 좌측 테두리가 잘리는 문제 보정.
   v44에서 일반 출력 폭을 204mm까지 넓혔던 값을 안전 인쇄폭 196mm로 줄이고,
   좌우 여백을 동일하게 맞춥니다.
*/
@media print{
  @page{
    size:A4 portrait;
    margin:4mm 7mm !important;
  }

  body.print-record-mode #print-target-area:not(.invoice-batch-print),
  body.print-record-mode #print-target-area.pf-active:not(.invoice-batch-print){
    width:196mm !important;
    max-width:196mm !important;
    min-width:196mm !important;
    margin-left:auto !important;
    margin-right:auto !important;
    padding:0 !important;
    transform:none !important;
    overflow:visible !important;
    --pscale:1 !important;
  }

  body.print-record-mode #print-target-area:not(.invoice-batch-print) .excel-frame,
  body.print-record-mode #print-target-area.pf-active:not(.invoice-batch-print) .excel-frame{
    width:196mm !important;
    max-width:196mm !important;
    min-width:196mm !important;
    margin-left:auto !important;
    margin-right:auto !important;
    padding:0 !important;
    overflow:visible !important;
    box-sizing:border-box !important;
    background:#fff !important;
  }

  body.print-record-mode #print-target-area:not(.invoice-batch-print) .tfs,
  body.print-record-mode #print-target-area.pf-active:not(.invoice-batch-print) .tfs{
    width:196mm !important;
    max-width:196mm !important;
    min-width:196mm !important;
    margin-left:auto !important;
    margin-right:auto !important;
    box-sizing:border-box !important;
  }

  body.print-record-mode #print-target-area:not(.invoice-batch-print) .single-copy,
  body.print-record-mode #print-target-area.pf-active:not(.invoice-batch-print) .single-copy{
    width:196mm !important;
    max-width:196mm !important;
    margin-left:auto !important;
    margin-right:auto !important;
  }

  body.print-record-mode #print-target-area:not(.invoice-batch-print) .excel-divider{
    width:196mm !important;
    max-width:196mm !important;
    margin-left:auto !important;
    margin-right:auto !important;
  }

  /* 선택일괄인쇄는 기존 전용 폭 유지 */
  body.print-record-mode #print-target-area.invoice-batch-print,
  body.print-record-mode #print-target-area .lp-page,
  body.print-record-mode #print-target-area .lp-slot{
    width:182mm !important;
    max-width:182mm !important;
  }
}


/* ===== v46-dashboard-work-alerts-20260710 ===== */
.dash-work-alert-v46{
  margin:14px 0 16px;
  border:1px solid #fed7aa;
  background:linear-gradient(135deg,#fff7ed 0%,#ffffff 58%,#fef2f2 100%);
  border-radius:18px;
  padding:14px;
  box-shadow:0 14px 34px rgba(15,23,42,.08);
}
.dash-work-alert-v46.all-clear{
  border-color:#bbf7d0;
  background:linear-gradient(135deg,#f0fdf4 0%,#ffffff 70%);
}
.dash-work-alert-v46.snoozed,
.dash-work-alert-v46.error{
  border-color:#cbd5e1;
  background:#f8fafc;
}
.dash-alert-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  margin-bottom:12px;
}
.dash-alert-head strong,
.dash-alert-snoozed strong{
  display:flex;
  align-items:center;
  gap:8px;
  color:#0f172a;
  font-size:15px;
  font-weight:900;
}
.dash-alert-head strong i{
  color:#ea580c;
}
.dash-work-alert-v46.all-clear .dash-alert-head strong i{
  color:#16a34a;
}
.dash-alert-head span,
.dash-alert-snoozed span{
  display:block;
  margin-top:4px;
  color:#64748b;
  font-size:12.5px;
  font-weight:700;
}
.dash-alert-snooze{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:6px;
}
.dash-alert-snooze button,
.dash-alert-btn{
  border:1px solid #e2e8f0;
  background:#fff;
  color:#475569;
  border-radius:999px;
  min-height:30px;
  padding:0 10px;
  font-size:11.5px;
  font-weight:900;
  cursor:pointer;
}
.dash-alert-btn.primary{
  border-color:#99f6e4;
  background:#f0fdfa;
  color:#0f766e;
}
.dash-alert-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}
.dash-alert-card{
  text-align:left;
  border:1px solid #e2e8f0;
  border-radius:16px;
  background:#fff;
  padding:13px 14px;
  cursor:pointer;
  box-shadow:0 8px 22px rgba(15,23,42,.06);
}
.dash-alert-card span{
  display:block;
  font-size:12px;
  color:#64748b;
  font-weight:900;
  margin-bottom:6px;
}
.dash-alert-card strong{
  display:block;
  font-size:24px;
  line-height:1;
  color:#0f172a;
  letter-spacing:-.04em;
}
.dash-alert-card em{
  display:block;
  margin-top:6px;
  font-size:12px;
  font-style:normal;
  font-weight:900;
  color:#475569;
}
.dash-alert-card.credit{
  border-color:#fecaca;
  background:#fff7f7;
}
.dash-alert-card.credit strong{color:#dc2626;}
.dash-alert-card.pending{
  border-color:#fed7aa;
  background:#fff7ed;
}
.dash-alert-card.pending strong{color:#ea580c;}
.dash-alert-card.repair{
  border-color:#bfdbfe;
  background:#eff6ff;
}
.dash-alert-card.repair strong{color:#2563eb;}
.dash-alert-preview{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:10px;
}
.dash-alert-preview span{
  border-radius:999px;
  padding:5px 9px;
  font-size:11.5px;
  font-weight:800;
  background:#f8fafc;
  color:#475569;
  border:1px solid #e2e8f0;
}
.dash-alert-preview .credit{
  color:#b91c1c;
  border-color:#fecaca;
  background:#fff1f2;
}
.dash-alert-preview .pending{
  color:#c2410c;
  border-color:#fed7aa;
  background:#fff7ed;
}
.dash-alert-preview .repair{
  color:#1d4ed8;
  border-color:#bfdbfe;
  background:#eff6ff;
}
.dash-alert-snoozed{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}
@media(max-width:900px){
  .dash-alert-head,
  .dash-alert-snoozed{
    flex-direction:column;
    align-items:stretch;
  }
  .dash-alert-snooze{
    justify-content:flex-start;
  }
  .dash-alert-grid{
    grid-template-columns:1fr;
  }
}


/* ===== v47-dashboard-work-alert-popup-20260710 ===== */
.dash-alert-popup-v47{
  position:fixed;
  inset:0;
  z-index:40000;
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
}
.dash-alert-popup-v47.show{
  display:flex;
}
.dash-alert-popup-backdrop{
  position:absolute;
  inset:0;
  background:rgba(15,23,42,.62);
  backdrop-filter:blur(5px);
}
.dash-alert-popup-box{
  position:relative;
  width:min(94vw,820px);
  max-height:90vh;
  overflow:auto;
  border-radius:24px;
  background:#fff;
  border:1px solid rgba(226,232,240,.95);
  box-shadow:0 30px 90px rgba(15,23,42,.42);
}
.dash-alert-popup-inner{
  padding:22px;
}
.dash-popup-head{
  display:flex;
  align-items:flex-start;
  gap:14px;
  padding-bottom:16px;
  border-bottom:1px solid #e2e8f0;
}
.dash-popup-icon{
  width:44px;
  height:44px;
  border-radius:16px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#fff7ed;
  color:#ea580c;
  border:1px solid #fed7aa;
  font-size:20px;
  flex:0 0 auto;
}
.dash-popup-head h2{
  margin:0;
  color:#0f172a;
  font-size:22px;
  letter-spacing:-.04em;
}
.dash-popup-head p{
  margin:6px 0 0;
  color:#64748b;
  font-size:13px;
  font-weight:700;
}
.dash-popup-x{
  margin-left:auto;
  width:36px;
  height:36px;
  border-radius:12px;
  border:1px solid #e2e8f0;
  background:#fff;
  color:#64748b;
  cursor:pointer;
}
.dash-popup-summary{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin:16px 0;
}
.dash-popup-card{
  text-align:left;
  border-radius:18px;
  border:1px solid #e2e8f0;
  padding:15px;
  background:#fff;
  cursor:pointer;
}
.dash-popup-card span{
  display:block;
  color:#64748b;
  font-size:12px;
  font-weight:900;
  margin-bottom:8px;
}
.dash-popup-card strong{
  display:block;
  font-size:30px;
  line-height:1;
  color:#0f172a;
  letter-spacing:-.04em;
}
.dash-popup-card em{
  display:block;
  margin-top:8px;
  font-style:normal;
  font-weight:900;
  color:#475569;
  font-size:12.5px;
}
.dash-popup-card.credit{
  background:#fff1f2;
  border-color:#fecaca;
}
.dash-popup-card.credit strong{color:#dc2626;}
.dash-popup-card.pending{
  background:#fff7ed;
  border-color:#fed7aa;
}
.dash-popup-card.pending strong{color:#ea580c;}
.dash-popup-card.repair{
  background:#eff6ff;
  border-color:#bfdbfe;
}
.dash-popup-card.repair strong{color:#2563eb;}
.dash-popup-list{
  display:grid;
  gap:7px;
  max-height:260px;
  overflow:auto;
  padding:2px 2px 2px 0;
}
.dash-popup-list div{
  display:flex;
  gap:9px;
  align-items:center;
  border:1px solid #e2e8f0;
  background:#f8fafc;
  border-radius:12px;
  padding:8px 10px;
}
.dash-popup-list b{
  min-width:78px;
  font-size:12px;
}
.dash-popup-list span{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#475569;
  font-size:12.5px;
  font-weight:700;
}
.dash-popup-list .credit b{color:#dc2626;}
.dash-popup-list .pending b{color:#ea580c;}
.dash-popup-list .repair b{color:#2563eb;}
.dash-popup-actions{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-top:18px;
  padding-top:16px;
  border-top:1px solid #e2e8f0;
}
.dash-popup-main{
  min-height:40px;
  padding:0 18px;
  border:none;
  border-radius:14px;
  background:#0f766e;
  color:white;
  font-weight:900;
  cursor:pointer;
}
.dash-popup-snooze{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:6px;
}
.dash-popup-snooze span{
  color:#64748b;
  font-size:12px;
  font-weight:900;
  margin-right:4px;
}
.dash-popup-snooze button{
  min-height:30px;
  padding:0 10px;
  border-radius:999px;
  border:1px solid #e2e8f0;
  background:#fff;
  color:#475569;
  font-weight:900;
  font-size:11.5px;
  cursor:pointer;
}
@media(max-width:720px){
  .dash-alert-popup-box{
    width:96vw;
  }
  .dash-alert-popup-inner{
    padding:16px;
  }
  .dash-popup-summary{
    grid-template-columns:1fr;
  }
  .dash-popup-actions{
    flex-direction:column;
    align-items:stretch;
  }
  .dash-popup-snooze{
    justify-content:flex-start;
  }
}


/* ===== v48-priority-ops-admin-alerts-inventory-daily-20260710 ===== */
.v48-popup-grid{
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
}
.dash-popup-card.stock,.dash-alert-card.stock{background:#f0fdf4!important;border-color:#bbf7d0!important}
.dash-popup-card.stock strong,.dash-alert-card.stock strong{color:#16a34a!important}
.dash-popup-card.contact,.dash-alert-card.contact{background:#fefce8!important;border-color:#fde68a!important}
.dash-popup-card.contact strong,.dash-alert-card.contact strong{color:#ca8a04!important}
.dash-popup-card.expected{background:#f5f3ff!important;border-color:#ddd6fe!important}
.dash-popup-card.expected strong{color:#7c3aed!important}
.dash-popup-card.old,.dash-alert-card.old{background:#fff1f2!important;border-color:#fecdd3!important}
.dash-popup-card.old strong,.dash-alert-card.old strong{color:#be123c!important}
.v48-aging-line{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  border:1px solid #fecdd3;
  background:#fff1f2;
  color:#9f1239;
  border-radius:14px;
  padding:9px 11px;
  margin:0 0 13px;
  font-size:12px;
  font-weight:900;
}
.v48-aging-line b{margin-right:4px;color:#881337}
.v48-alert-grid{
  grid-template-columns:repeat(6,minmax(0,1fr)) !important;
}
#dash-work-alert-v46{display:none!important}
.dash-popup-list .stock b{color:#16a34a}
.dash-popup-list .old b{color:#be123c}
.dash-popup-list .contact b{color:#ca8a04}
@media(max-width:1100px){
  .v48-popup-grid,.v48-alert-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:720px){
  .v48-popup-grid,.v48-alert-grid{grid-template-columns:1fr!important}
}

.v48-mini-modal{
  display:none;
  position:fixed;
  inset:0;
  z-index:41000;
  align-items:center;
  justify-content:center;
  padding:18px;
}
.v48-mini-modal.show{display:flex}
.v48-mini-backdrop{
  position:absolute;
  inset:0;
  background:rgba(15,23,42,.56);
  backdrop-filter:blur(4px);
}
.v48-mini-box{
  position:relative;
  width:min(96vw,880px);
  max-height:88vh;
  overflow:auto;
  background:#fff;
  border-radius:22px;
  border:1px solid #e2e8f0;
  box-shadow:0 28px 80px rgba(15,23,42,.36);
  padding:18px;
}
.v48-mini-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  border-bottom:1px solid #e2e8f0;
  padding-bottom:12px;
  margin-bottom:12px;
}
.v48-mini-head strong{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:18px;
  color:#0f172a;
}
.v48-mini-head button{
  width:36px;
  height:36px;
  border-radius:12px;
  border:1px solid #e2e8f0;
  background:#fff;
  cursor:pointer;
}
.v48-inv-summary{
  display:flex;
  justify-content:space-between;
  gap:10px;
  border:1px solid #e2e8f0;
  background:#f8fafc;
  border-radius:14px;
  padding:10px 12px;
  margin-bottom:10px;
}
.v48-inv-table{
  width:100%;
  border-collapse:collapse;
  font-size:12.5px;
}
.v48-inv-table th,.v48-inv-table td{
  border:1px solid #e2e8f0;
  padding:8px 9px;
  vertical-align:middle;
}
.v48-inv-table th{
  background:#f1f5f9;
  font-weight:900;
  color:#334155;
}
.v48-inv-table small{
  display:block;
  color:#64748b;
  margin-top:3px;
}
.v48-inv-badge{
  display:inline-flex;
  border-radius:999px;
  padding:4px 8px;
  font-size:11.5px;
  font-weight:900;
}
.v48-inv-badge.ok{background:#dcfce7;color:#166534}
.v48-inv-badge.warn{background:#fef3c7;color:#92400e}
.v48-inv-badge.bad{background:#fee2e2;color:#b91c1c}
.v48-inv-log-title{
  margin:12px 0 6px;
  font-weight:900;
  color:#334155;
}
.v48-inv-log{
  display:grid;
  gap:5px;
  font-size:12px;
  color:#475569;
}
.v48-inv-log div{
  border:1px solid #e2e8f0;
  background:#f8fafc;
  border-radius:10px;
  padding:7px 9px;
}
.v48-loading,.v48-error{
  padding:14px;
  border-radius:12px;
  background:#f8fafc;
  color:#475569;
  font-weight:800;
}
.v48-error{background:#fef2f2;color:#b91c1c}
.btn-inventory-history-v48{
  border-color:#99f6e4!important;
  background:#f0fdfa!important;
}
.admin-v48-status-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}
.admin-v48-status-card{
  border:1px solid #e2e8f0;
  border-radius:16px;
  background:#fff;
  padding:12px;
}
.admin-v48-status-card span{
  display:block;
  color:#64748b;
  font-size:12px;
  font-weight:900;
  margin-bottom:7px;
}
.admin-v48-status-card strong{
  display:block;
  color:#0f172a;
  font-size:14px;
  font-weight:900;
}
.admin-v48-status-card small{
  display:block;
  margin-top:5px;
  color:#64748b;
  line-height:1.35;
}
.admin-v48-status-card.ok{
  border-color:#bbf7d0;
  background:#f0fdf4;
}
.admin-v48-status-card.bad{
  border-color:#fecaca;
  background:#fff1f2;
}
.admin-v48-trash-table td:nth-child(4){
  max-width:320px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
@media(max-width:900px){
  .admin-v48-status-grid{grid-template-columns:1fr}
}


/* ===== v49-subsidy-project-module-20260710 ===== */
.subsidy-shell{display:grid;gap:14px}
.subsidy-hero{
  display:flex;justify-content:space-between;align-items:flex-start;gap:14px;
  border:1px solid #d9f99d;background:linear-gradient(135deg,#f7fee7,#fff);
  border-radius:22px;padding:18px;box-shadow:0 16px 42px rgba(15,23,42,.08)
}
.subsidy-hero h2{margin:4px 0 6px;font-size:26px;letter-spacing:-.05em;color:#14532d}
.subsidy-hero p{margin:0;color:#64748b;font-size:13px;font-weight:700}
.subsidy-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.subsidy-import-label{cursor:pointer}
.subsidy-summary-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
.subsidy-summary-card{border:1px solid #e2e8f0;background:#fff;border-radius:16px;padding:13px;box-shadow:0 10px 24px rgba(15,23,42,.05)}
.subsidy-summary-card span{display:block;color:#64748b;font-size:12px;font-weight:900;margin-bottom:7px}
.subsidy-summary-card strong{display:block;font-size:24px;line-height:1;color:#0f172a}
.subsidy-summary-card em{display:block;margin-top:5px;font-style:normal;color:#94a3b8;font-size:11px;font-weight:900}
.subsidy-summary-card.warn{border-color:#fed7aa;background:#fff7ed}
.subsidy-summary-card.warn strong{color:#ea580c}
.subsidy-summary-card.money{border-color:#bbf7d0;background:#f0fdf4}
.subsidy-summary-card.money strong{color:#15803d}
.subsidy-filter-bar{display:flex;gap:8px;flex-wrap:wrap;align-items:center;border:1px solid #e2e8f0;background:#fff;border-radius:16px;padding:10px}
.subsidy-filter-bar input,.subsidy-filter-bar select{height:36px;border:1px solid #cbd5e1;border-radius:10px;padding:0 10px;font-weight:700;color:#334155}
.subsidy-filter-bar input{min-width:260px;flex:1}
.subsidy-hint{border:1px solid #bfdbfe;background:#eff6ff;color:#1e40af;border-radius:14px;padding:10px 12px;font-size:12.5px;font-weight:800}
.subsidy-table-wrap{background:#fff;border-radius:18px;border:1px solid #e2e8f0;overflow:auto}
.subsidy-table{min-width:1420px;width:100%;border-collapse:collapse;font-size:12.5px}
.subsidy-table th,.subsidy-table td{border-bottom:1px solid #e2e8f0;padding:9px 8px;vertical-align:middle}
.subsidy-table th{background:#f8fafc;color:#334155;font-weight:900;white-space:nowrap}
.subsidy-table td small{display:block;margin-top:3px;color:#64748b;font-size:11.5px;font-weight:700}
.subsidy-town{display:inline-flex;border-radius:999px;background:#ecfdf5;color:#047857;border:1px solid #a7f3d0;padding:4px 8px;font-weight:900}
.subsidy-selfpay{font-weight:900;color:#dc2626}
.subsidy-status-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;width:245px}
.subsidy-status-btn{border:1px solid #e2e8f0;border-radius:999px;padding:5px 7px;background:#fff;font-size:11px;font-weight:900;cursor:pointer;white-space:nowrap}
.subsidy-status-btn.ok{background:#dcfce7;border-color:#86efac;color:#166534}
.subsidy-status-btn.warn{background:#fff7ed;border-color:#fed7aa;color:#c2410c}
.subsidy-status-btn.bad{background:#fee2e2;border-color:#fecaca;color:#b91c1c}
.subsidy-row-actions{display:grid;grid-template-columns:1fr 1fr;gap:5px;min-width:190px}
.dash-popup-card.subsidy,.dash-alert-card.subsidy{background:#f7fee7!important;border-color:#d9f99d!important}
.dash-popup-card.subsidy strong,.dash-alert-card.subsidy strong{color:#4d7c0f!important}
.dash-popup-list .subsidy b{color:#4d7c0f}
@media(max-width:1000px){
  .subsidy-hero{flex-direction:column}
  .subsidy-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:640px){
  .subsidy-summary-grid{grid-template-columns:1fr}
  .subsidy-filter-bar input{min-width:100%}
}


/* ===== v49-subsidy-project-management-20260710 ===== */
.subsidy-shell{
  display:grid;
  gap:14px;
}
.subsidy-hero{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:18px;
  padding:18px;
  border:1px solid #dbeafe;
  border-radius:22px;
  background:linear-gradient(135deg,#eff6ff 0%,#ffffff 58%,#f0fdf4 100%);
  box-shadow:0 16px 34px rgba(15,23,42,.07);
}
.subsidy-hero h2{
  margin:4px 0 5px;
  color:#0f172a;
  font-size:25px;
  letter-spacing:-.04em;
}
.subsidy-hero p{
  margin:0;
  color:#64748b;
  font-size:13px;
  font-weight:700;
}
.subsidy-actions{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:8px;
}
.subsidy-summary-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:10px;
}
.subsidy-summary-card{
  border:1px solid #e2e8f0;
  background:#fff;
  border-radius:18px;
  padding:14px;
  box-shadow:0 8px 22px rgba(15,23,42,.05);
}
.subsidy-summary-card span{
  display:block;
  color:#64748b;
  font-size:12px;
  font-weight:900;
  margin-bottom:7px;
}
.subsidy-summary-card strong{
  display:inline-block;
  font-size:28px;
  color:#0f172a;
  letter-spacing:-.04em;
}
.subsidy-summary-card small{
  margin-left:4px;
  color:#64748b;
  font-weight:800;
}
.subsidy-summary-card.warn{
  border-color:#fed7aa;
  background:#fff7ed;
}
.subsidy-summary-card.warn strong{color:#ea580c;}
.subsidy-summary-card.danger{
  border-color:#fecaca;
  background:#fff1f2;
}
.subsidy-summary-card.danger strong{color:#dc2626;}
.subsidy-summary-card.money{
  border-color:#bbf7d0;
  background:#f0fdf4;
}
.subsidy-summary-card.money strong{color:#16a34a;}
.subsidy-filter-bar{
  display:grid;
  grid-template-columns:1fr 170px 170px;
  gap:8px;
  padding:12px;
  border:1px solid #e2e8f0;
  border-radius:18px;
  background:#fff;
}
.subsidy-filter-bar input,
.subsidy-filter-bar select{
  min-height:38px;
  border:1px solid #cbd5e1;
  border-radius:12px;
  padding:0 11px;
  font-weight:700;
  color:#334155;
  background:#fff;
}
.subsidy-hint{
  display:flex;
  align-items:center;
  gap:8px;
  border:1px solid #fde68a;
  background:#fefce8;
  color:#854d0e;
  border-radius:14px;
  padding:9px 11px;
  font-size:12.5px;
  font-weight:800;
}
.subsidy-table-wrap{
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:18px;
  overflow:auto;
}
.subsidy-table{
  min-width:1320px;
  width:100%;
  border-collapse:collapse;
  font-size:12.5px;
}
.subsidy-table th{
  position:sticky;
  top:0;
  z-index:1;
  background:#f8fafc;
  color:#334155;
  font-weight:900;
  border-bottom:1px solid #e2e8f0;
  padding:10px 9px;
  text-align:left;
  white-space:nowrap;
}
.subsidy-table td{
  border-bottom:1px solid #f1f5f9;
  padding:9px;
  vertical-align:top;
  color:#334155;
}
.subsidy-table td small{
  display:block;
  margin-top:3px;
  color:#64748b;
  font-size:11.5px;
}
.subsidy-table .tr{
  text-align:right;
}
.subsidy-state-grid{
  display:flex;
  flex-wrap:wrap;
  gap:4px;
  min-width:330px;
}
.subsidy-state{
  border:1px solid #e2e8f0;
  background:#f8fafc;
  color:#475569;
  border-radius:999px;
  padding:4px 8px;
  font-size:11px;
  font-weight:900;
  cursor:pointer;
  white-space:nowrap;
}
.subsidy-state.ok{
  border-color:#bbf7d0;
  background:#dcfce7;
  color:#166534;
}
.subsidy-state.warn{
  border-color:#fed7aa;
  background:#fff7ed;
  color:#c2410c;
}
.subsidy-state.bad{
  border-color:#fecaca;
  background:#fee2e2;
  color:#b91c1c;
}
.subsidy-state.muted{
  border-color:#cbd5e1;
  background:#f1f5f9;
  color:#64748b;
}
.subsidy-machine{
  margin-top:6px;
  color:#0f766e;
  font-weight:900;
  font-size:11.5px;
}
.subsidy-row-actions{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  min-width:220px;
}
.dash-popup-card.subsidy,
.dash-alert-card.subsidy{
  background:#f0fdfa!important;
  border-color:#99f6e4!important;
}
.dash-popup-card.subsidy strong,
.dash-alert-card.subsidy strong{
  color:#0f766e!important;
}
.dash-popup-card.subsidyPay{
  background:#eef2ff!important;
  border-color:#c7d2fe!important;
}
.dash-popup-card.subsidyPay strong{
  color:#4f46e5!important;
}
.dash-popup-list .subsidy b{
  color:#0f766e;
}
@media(max-width:1000px){
  .subsidy-hero{
    flex-direction:column;
  }
  .subsidy-actions{
    justify-content:flex-start;
  }
  .subsidy-summary-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .subsidy-filter-bar{
    grid-template-columns:1fr;
  }
}
@media(max-width:620px){
  .subsidy-summary-grid{
    grid-template-columns:1fr;
  }
}


/* ===== v50-subsidy-layout-fix-20260710 ===== */
.subsidy-table-wrap{
  overflow-x:auto !important;
  overflow-y:visible !important;
  max-width:100% !important;
}
.subsidy-table{
  min-width:1480px !important;
  table-layout:fixed !important;
}
.subsidy-table th:nth-child(1), .subsidy-table td:nth-child(1){width:58px !important;}
.subsidy-table th:nth-child(2), .subsidy-table td:nth-child(2){width:86px !important;}
.subsidy-table th:nth-child(3), .subsidy-table td:nth-child(3){width:140px !important;}
.subsidy-table th:nth-child(4), .subsidy-table td:nth-child(4){width:150px !important;}
.subsidy-table th:nth-child(5), .subsidy-table td:nth-child(5){width:160px !important;}
.subsidy-table th:nth-child(6), .subsidy-table td:nth-child(6),
.subsidy-table th:nth-child(7), .subsidy-table td:nth-child(7),
.subsidy-table th:nth-child(8), .subsidy-table td:nth-child(8){width:105px !important;}
.subsidy-table th:nth-child(9), .subsidy-table td:nth-child(9){width:420px !important;}
.subsidy-table th:nth-child(10), .subsidy-table td:nth-child(10){
  width:255px !important;
  min-width:255px !important;
}
.subsidy-manage-cell{
  position:sticky !important;
  right:0 !important;
  background:#fff !important;
  z-index:2 !important;
  box-shadow:-8px 0 16px rgba(15,23,42,.06) !important;
}
.subsidy-table thead th:nth-child(10){
  position:sticky !important;
  right:0 !important;
  z-index:4 !important;
  background:#f8fafc !important;
}
.subsidy-row-actions{
  display:grid !important;
  grid-template-columns:1fr 1fr !important;
  gap:6px !important;
  min-width:230px !important;
}
.subsidy-row-actions .btn{
  width:100% !important;
  justify-content:center !important;
  white-space:nowrap !important;
  padding-left:6px !important;
  padding-right:6px !important;
}
.subsidy-status-grid{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:5px !important;
  min-width:390px !important;
}
.subsidy-status-btn,
.subsidy-state{
  width:100% !important;
  justify-content:center !important;
  text-align:center !important;
}
.subsidy-filter-bar{
  grid-template-columns:minmax(260px,1fr) 170px 170px 140px !important;
}
@media(max-width:900px){
  .subsidy-filter-bar{
    grid-template-columns:1fr !important;
  }
  .subsidy-table{
    min-width:1380px !important;
  }
}


/* ===== v52-subsidy-table-bulk-edit-fix-20260710 ===== */
.subsidy-table-wrap{
  overflow-x:auto !important;
  overflow-y:visible !important;
  max-width:100% !important;
}
.subsidy-table{
  min-width:1820px !important;
  table-layout:fixed !important;
}
.subsidy-table th:nth-child(1), .subsidy-table td:nth-child(1){width:48px!important;text-align:center!important}
.subsidy-table th:nth-child(2), .subsidy-table td:nth-child(2){width:58px!important}
.subsidy-table th:nth-child(3), .subsidy-table td:nth-child(3){width:86px!important}
.subsidy-table th:nth-child(4), .subsidy-table td:nth-child(4){width:230px!important}
.subsidy-table th:nth-child(5), .subsidy-table td:nth-child(5){width:145px!important}
.subsidy-table th:nth-child(6), .subsidy-table td:nth-child(6){width:160px!important}
.subsidy-table th:nth-child(7), .subsidy-table td:nth-child(7),
.subsidy-table th:nth-child(8), .subsidy-table td:nth-child(8),
.subsidy-table th:nth-child(9), .subsidy-table td:nth-child(9){width:105px!important}
.subsidy-table th:nth-child(10), .subsidy-table td:nth-child(10){width:430px!important}
.subsidy-table th:nth-child(11), .subsidy-table td:nth-child(11){width:280px!important}
.subsidy-manage-cell{
  position:static!important;
  right:auto!important;
  min-width:280px!important;
  background:#fff!important;
  box-shadow:none!important;
}
.subsidy-table thead th:nth-child(11){
  position:static!important;
  right:auto!important;
}
.subsidy-check-cell input,
.subsidy-check-head input{
  width:18px!important;
  height:18px!important;
  accent-color:#0f766e;
  cursor:pointer;
}
.subsidy-selected-row{
  background:#f0fdfa!important;
}
.subsidy-person-cell strong{
  display:block;
  color:#0f172a;
  font-size:13px;
  margin-bottom:3px;
}
.subsidy-person-cell small{
  display:block;
  color:#64748b;
  font-size:11.5px;
  line-height:1.35;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.subsidy-person-cell small.addr{
  max-width:210px;
}
.subsidy-status-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:5px!important;
  min-width:410px!important;
}
.subsidy-status-btn,
.subsidy-state{
  width:100%!important;
  justify-content:center!important;
  text-align:center!important;
  min-height:28px!important;
  white-space:nowrap!important;
}
.subsidy-row-actions{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:7px!important;
  min-width:250px!important;
}
.subsidy-row-actions .btn{
  width:100%!important;
  justify-content:center!important;
  white-space:nowrap!important;
  padding-left:6px!important;
  padding-right:6px!important;
}
.subsidy-filter-bar{
  grid-template-columns:minmax(260px,1fr) 170px 170px 140px!important;
}
.subsidy-edit-modal-v52{
  display:none;
  position:fixed;
  inset:0;
  z-index:42000;
  align-items:center;
  justify-content:center;
  padding:18px;
}
.subsidy-edit-modal-v52.show{display:flex}
.subsidy-edit-backdrop{
  position:absolute;
  inset:0;
  background:rgba(15,23,42,.58);
  backdrop-filter:blur(4px);
}
.subsidy-edit-box{
  position:relative;
  width:min(96vw,860px);
  max-height:90vh;
  overflow:auto;
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:22px;
  box-shadow:0 28px 80px rgba(15,23,42,.38);
  padding:18px;
}
.subsidy-edit-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  border-bottom:1px solid #e2e8f0;
  padding-bottom:12px;
  margin-bottom:14px;
}
.subsidy-edit-head strong{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:18px;
  color:#0f172a;
}
.subsidy-edit-head button{
  width:36px;
  height:36px;
  border:1px solid #e2e8f0;
  border-radius:12px;
  background:#fff;
  cursor:pointer;
}
.subsidy-edit-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}
.subsidy-edit-grid label{
  display:grid;
  gap:5px;
  color:#475569;
  font-size:12px;
  font-weight:900;
}
.subsidy-edit-grid label.wide{
  grid-column:1 / -1;
}
.subsidy-edit-grid input{
  min-height:38px;
  border:1px solid #cbd5e1;
  border-radius:12px;
  padding:0 10px;
  font-weight:700;
  color:#334155;
}
.subsidy-edit-actions{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  border-top:1px solid #e2e8f0;
  margin-top:16px;
  padding-top:14px;
}
@media(max-width:900px){
  .subsidy-filter-bar{grid-template-columns:1fr!important}
  .subsidy-edit-grid{grid-template-columns:1fr}
  .subsidy-table{min-width:1720px!important}
}


/* ===== v53-subsidy-fit-report-pagination-20260710 ===== */
.subsidy-filter-bar{
  grid-template-columns:minmax(220px,1fr) 130px 130px 130px 95px 110px!important;
  gap:7px!important;
}
.subsidy-table-wrap{
  overflow-x:hidden!important;
  overflow-y:visible!important;
  max-width:100%!important;
  border-radius:16px!important;
}
.subsidy-table{
  width:100%!important;
  min-width:0!important;
  table-layout:fixed!important;
  font-size:10.4px!important;
}
.subsidy-table th,
.subsidy-table td{
  padding:6px 5px!important;
  line-height:1.25!important;
  word-break:keep-all!important;
}
.subsidy-table th:nth-child(1), .subsidy-table td:nth-child(1){width:2.6%!important;text-align:center!important}
.subsidy-table th:nth-child(2), .subsidy-table td:nth-child(2){width:3.1%!important}
.subsidy-table th:nth-child(3), .subsidy-table td:nth-child(3){width:5.0%!important}
.subsidy-table th:nth-child(4), .subsidy-table td:nth-child(4){width:13.8%!important}
.subsidy-table th:nth-child(5), .subsidy-table td:nth-child(5){width:8.5%!important}
.subsidy-table th:nth-child(6), .subsidy-table td:nth-child(6){width:9.0%!important}
.subsidy-table th:nth-child(7), .subsidy-table td:nth-child(7),
.subsidy-table th:nth-child(8), .subsidy-table td:nth-child(8),
.subsidy-table th:nth-child(9), .subsidy-table td:nth-child(9){width:6.0%!important}
.subsidy-table th:nth-child(10), .subsidy-table td:nth-child(10){width:8.0%!important}
.subsidy-table th:nth-child(11), .subsidy-table td:nth-child(11){width:24.5%!important}
.subsidy-table th:nth-child(12), .subsidy-table td:nth-child(12){width:13.5%!important}
.subsidy-manage-cell{
  position:static!important;
  min-width:0!important;
  box-shadow:none!important;
}
.subsidy-person-cell strong{
  font-size:11.6px!important;
  margin-bottom:2px!important;
}
.subsidy-person-cell small{
  display:block!important;
  font-size:9.8px!important;
  line-height:1.25!important;
  color:#64748b!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
.subsidy-person-cell .addr{
  max-width:100%!important;
}
.subsidy-item-cell,
.subsidy-note-cell{
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.subsidy-note-cell{
  color:#475569!important;
  font-size:10px!important;
}
.subsidy-status-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:3px!important;
  min-width:0!important;
}
.subsidy-status-btn,
.subsidy-state{
  width:100%!important;
  min-height:23px!important;
  padding:2px 3px!important;
  font-size:9.5px!important;
  border-radius:8px!important;
  justify-content:center!important;
  text-align:center!important;
  white-space:nowrap!important;
}
.subsidy-row-actions{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:4px!important;
  min-width:0!important;
}
.subsidy-row-actions .btn{
  width:100%!important;
  min-height:25px!important;
  padding:2px 3px!important;
  font-size:9.8px!important;
  justify-content:center!important;
  white-space:nowrap!important;
}
.subsidy-check-cell input,
.subsidy-check-head input{
  width:15px!important;
  height:15px!important;
  accent-color:#0f766e;
  cursor:pointer;
}
.subsidy-pagination-v53{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding:10px 2px 0;
}
.subsidy-page-info{
  color:#64748b;
  font-size:12px;
  font-weight:800;
}
.subsidy-page-actions{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}
.subsidy-report-modal-v53{
  display:none;
  position:fixed;
  inset:0;
  z-index:43000;
  align-items:center;
  justify-content:center;
  padding:18px;
}
.subsidy-report-modal-v53.show{display:flex}
.subsidy-report-backdrop{
  position:absolute;
  inset:0;
  background:rgba(15,23,42,.58);
  backdrop-filter:blur(4px);
}
.subsidy-report-box{
  position:relative;
  width:min(96vw,1000px);
  max-height:90vh;
  overflow:auto;
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:22px;
  box-shadow:0 28px 80px rgba(15,23,42,.38);
  padding:18px;
}
.subsidy-report-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding-bottom:12px;
  margin-bottom:12px;
  border-bottom:1px solid #e2e8f0;
}
.subsidy-report-head strong{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:18px;
  color:#0f172a;
}
.subsidy-report-head > div{
  display:flex;
  gap:6px;
}
.subsidy-report-doc h2{
  text-align:center;
  margin:0 0 8px;
}
.subsidy-report-meta{
  text-align:center;
  color:#64748b;
  font-weight:800;
  font-size:12px;
  margin-bottom:12px;
}
.subsidy-report-cards{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  margin-bottom:14px;
}
.subsidy-report-cards div{
  border:1px solid #e2e8f0;
  background:#f8fafc;
  border-radius:14px;
  padding:11px;
}
.subsidy-report-cards span{
  display:block;
  color:#64748b;
  font-size:11px;
  font-weight:900;
  margin-bottom:5px;
}
.subsidy-report-cards b{
  font-size:18px;
  color:#0f172a;
}
.subsidy-report-doc h3{
  margin:18px 0 8px;
  color:#0f172a;
  font-size:14px;
}
.subsidy-report-doc table{
  width:100%;
  border-collapse:collapse;
  font-size:12px;
}
.subsidy-report-doc th,
.subsidy-report-doc td{
  border:1px solid #e2e8f0;
  padding:7px 8px;
}
.subsidy-report-doc th{
  background:#f1f5f9;
  color:#334155;
}
@media(max-width:1100px){
  .subsidy-table{font-size:9.6px!important}
  .subsidy-status-btn,.subsidy-state{font-size:8.8px!important}
  .subsidy-row-actions .btn{font-size:9px!important}
}
@media(max-width:900px){
  .subsidy-filter-bar{grid-template-columns:1fr 1fr!important}
  .subsidy-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .subsidy-pagination-v53{flex-direction:column;align-items:stretch}
  .subsidy-report-cards{grid-template-columns:1fr 1fr}
}


/* ===== v54-subsidy-report-backup-polish-20260714 ===== */
.subsidy-table-wrap{
  padding-left:0 !important;
}
.subsidy-table th:first-child,
.subsidy-table td:first-child{
  border-left:1px solid #e2e8f0 !important;
}
.subsidy-table th{
  text-align:center !important;
}
.subsidy-table th:nth-child(2),
.subsidy-table td:nth-child(2){
  width:3.3% !important;
  min-width:34px !important;
  text-align:center !important;
}
.subsidy-note-cell{
  background:#fff !important;
  color:#334155 !important;
  font-weight:700 !important;
}
.subsidy-table td:nth-child(10){
  background:#fff !important;
  color:#334155 !important;
}
.subsidy-report-doc table tbody tr.subsidy-town-start td{
  border-top:2px solid #94a3b8 !important;
}


/* ===== v55-subsidy-import-status-persist-fix-20260714 ===== */
.subsidy-table th:nth-child(2),
.subsidy-table td:nth-child(2){
  width:3.8% !important;
  min-width:46px !important;
  text-align:center !important;
}
.subsidy-table th:nth-child(11),
.subsidy-table td:nth-child(11){
  width:26.5% !important;
}
.subsidy-status-grid{
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
}
.subsidy-status-btn,
.subsidy-state{
  font-size:9.1px !important;
  min-height:22px !important;
  padding:2px 2px !important;
}


/* ===== v56-subsidy-note-detail-status-20260714 ===== */
.subsidy-table tbody td{
  background:#fff !important;
}
.subsidy-table tbody tr.subsidy-selected-row td{
  background:#f0fdfa !important;
}
.subsidy-note-cell,
.subsidy-table td:nth-child(10){
  background:#fff !important;
  color:#334155 !important;
  font-weight:700 !important;
  box-shadow:none !important;
}
.subsidy-status-grid{
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
}
.subsidy-status-btn{
  cursor:pointer !important;
  pointer-events:auto !important;
}
.subsidy-machine{
  display:block !important;
  margin-top:4px !important;
  color:#0f766e !important;
  font-size:9.5px !important;
  font-weight:900 !important;
}
.subsidy-row-actions{
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
}
.subsidy-detail-modal-v56{
  display:none;
  position:fixed;
  inset:0;
  z-index:44000;
  align-items:center;
  justify-content:center;
  padding:18px;
}
.subsidy-detail-modal-v56.show{
  display:flex;
}
.subsidy-detail-backdrop{
  position:absolute;
  inset:0;
  background:rgba(15,23,42,.58);
  backdrop-filter:blur(4px);
}
.subsidy-detail-box{
  position:relative;
  width:min(96vw,920px);
  max-height:90vh;
  overflow:auto;
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:22px;
  box-shadow:0 28px 80px rgba(15,23,42,.38);
  padding:18px;
}
.subsidy-detail-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  border-bottom:1px solid #e2e8f0;
  padding-bottom:12px;
  margin-bottom:14px;
}
.subsidy-detail-head strong{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:18px;
  color:#0f172a;
}
.subsidy-detail-head button{
  width:36px;
  height:36px;
  border:1px solid #e2e8f0;
  border-radius:12px;
  background:#fff;
  cursor:pointer;
}
.subsidy-detail-title{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  border:1px solid #e2e8f0;
  background:#f8fafc;
  border-radius:16px;
  padding:14px;
  margin-bottom:12px;
}
.subsidy-detail-title h3{
  margin:0 0 4px;
  font-size:22px;
  color:#0f172a;
}
.subsidy-detail-title p{
  margin:0;
  color:#64748b;
  font-weight:800;
}
.subsidy-detail-title span{
  border-radius:999px;
  background:#ecfeff;
  border:1px solid #99f6e4;
  color:#0f766e;
  padding:6px 10px;
  font-weight:900;
}
.subsidy-detail-grid,
.subsidy-detail-status{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
}
.subsidy-detail-grid div,
.subsidy-detail-status div{
  border:1px solid #e2e8f0;
  border-radius:12px;
  padding:9px 10px;
  background:#fff;
}
.subsidy-detail-grid div.wide{
  grid-column:span 3;
}
.subsidy-detail-grid b,
.subsidy-detail-status b{
  display:block;
  color:#64748b;
  font-size:11px;
  margin-bottom:4px;
}
.subsidy-detail-grid span,
.subsidy-detail-status span{
  display:block;
  color:#0f172a;
  font-weight:900;
  word-break:break-all;
}
.subsidy-detail-status small{
  display:block;
  color:#64748b;
  font-size:11px;
  margin-top:4px;
  word-break:break-all;
}
.subsidy-detail-box h4{
  margin:16px 0 8px;
  color:#0f172a;
}
.subsidy-detail-foot{
  display:flex;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  margin-top:14px;
  color:#64748b;
  font-size:12px;
  font-weight:800;
}
.v56-loading,
.v56-error{
  padding:14px;
  border-radius:12px;
  background:#f8fafc;
  color:#475569;
  font-weight:800;
}
.v56-error{
  background:#fff1f2;
  color:#be123c;
}
@media(max-width:760px){
  .subsidy-detail-grid,
  .subsidy-detail-status{
    grid-template-columns:1fr;
  }
  .subsidy-detail-grid div.wide{
    grid-column:auto;
  }
}


/* ===== v57-subsidy-contact-date-css-20260714 ===== */
.subsidy-machine{
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  max-width:100% !important;
}
.subsidy-detail-status small,
.subsidy-detail-foot span{
  font-family:inherit !important;
  letter-spacing:0 !important;
}


/* ===== v58-inventory-location-class-report-20260714 ===== */
.part-location-badge,
.part-class-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  max-width:100%;
  border-radius:999px;
  padding:3px 8px;
  font-size:11px;
  font-weight:900;
  border:1px solid #dbeafe;
  background:#eff6ff;
  color:#1e3a8a;
  white-space:nowrap;
}
.part-class-badge{
  border-color:#bbf7d0;
  background:#f0fdf4;
  color:#166534;
}
.inventory-report-modal-v58{
  display:none;
  position:fixed;
  inset:0;
  z-index:45000;
  align-items:center;
  justify-content:center;
  padding:18px;
}
.inventory-report-modal-v58.show{display:flex}
.inventory-report-backdrop{
  position:absolute;
  inset:0;
  background:rgba(15,23,42,.58);
  backdrop-filter:blur(4px);
}
.inventory-report-box{
  position:relative;
  width:min(96vw,1100px);
  max-height:90vh;
  overflow:auto;
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:22px;
  box-shadow:0 28px 80px rgba(15,23,42,.38);
  padding:18px;
}
.inventory-report-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  border-bottom:1px solid #e2e8f0;
  padding-bottom:12px;
  margin-bottom:12px;
}
.inventory-report-head strong{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:18px;
  color:#0f172a;
}
.inventory-report-head > div{
  display:flex;
  gap:6px;
}
.inventory-report-filter{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:8px;
  border:1px solid #e2e8f0;
  background:#f8fafc;
  border-radius:14px;
  padding:10px;
  margin-bottom:12px;
}
.inventory-report-filter label{
  display:grid;
  gap:4px;
  font-size:11px;
  font-weight:900;
  color:#475569;
}
.inventory-report-filter input,
.inventory-report-filter select{
  min-height:34px;
  border:1px solid #cbd5e1;
  border-radius:10px;
  padding:0 9px;
  background:#fff;
  color:#334155;
  font-weight:700;
}
.inv-report-cards{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  margin-bottom:14px;
}
.inv-report-cards div{
  border:1px solid #e2e8f0;
  background:#f8fafc;
  border-radius:14px;
  padding:11px;
}
.inv-report-cards span{
  display:block;
  color:#64748b;
  font-size:11px;
  font-weight:900;
  margin-bottom:5px;
}
.inv-report-cards b{
  font-size:17px;
  color:#0f172a;
}
#inventory-report-body-v58 h4{
  margin:18px 0 8px;
  color:#0f172a;
  font-size:14px;
}
.inv-report-table{
  width:100%;
  border-collapse:collapse;
  font-size:12px;
}
.inv-report-table th,
.inv-report-table td{
  border:1px solid #e2e8f0;
  padding:7px 8px;
}
.inv-report-table th{
  background:#f1f5f9;
  color:#334155;
}
.inv-report-loading,
.inv-report-error{
  padding:14px;
  border-radius:12px;
  background:#f8fafc;
  color:#475569;
  font-weight:800;
}
.inv-report-error{
  background:#fff1f2;
  color:#be123c;
}
@media(max-width:900px){
  .inventory-report-filter,
  .inv-report-cards{
    grid-template-columns:1fr 1fr;
  }
}


/* ===== v59-inventory-fit-office-date-20260714 ===== */
#page-inventory .tbl-wrap{
  overflow-x: visible !important;
}
#page-inventory .parts-table{
  width:100% !important;
  min-width:0 !important;
  table-layout:fixed !important;
  font-size:11px !important;
}
#page-inventory .parts-table th,
#page-inventory .parts-table td{
  padding:8px 5px !important;
  line-height:1.25 !important;
  word-break:keep-all !important;
}
#page-inventory .parts-table td:nth-child(2) strong{
  display:block;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
}
#page-inventory .part-location-badge,
#page-inventory .part-class-badge{
  max-width:100%;
  padding:2px 6px !important;
  font-size:10px !important;
  overflow:hidden;
  text-overflow:ellipsis;
}
#page-inventory .parts-table .ibtns{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:4px !important;
  min-width:0 !important;
}
#page-inventory .parts-table .ibtn{
  width:100% !important;
  justify-content:center !important;
  min-height:26px !important;
  padding:3px 4px !important;
  font-size:10px !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}
#page-inventory .parts-table th:nth-child(10),
#page-inventory .parts-table td:nth-child(10){
  min-width:0 !important;
}
@media(max-width:1200px){
  #page-inventory .parts-table{
    font-size:10px !important;
  }
  #page-inventory .parts-table .ibtn{
    font-size:9px !important;
    padding:2px !important;
  }
  #page-inventory .part-location-badge,
  #page-inventory .part-class-badge{
    font-size:9px !important;
    padding:2px 4px !important;
  }
}


/* ===== v60-inventory-list-persist-polish-20260714 ===== */
#page-inventory .tbl-wrap{
  overflow-x: hidden !important;
}
#page-inventory .parts-table{
  width:100% !important;
  min-width:0 !important;
  table-layout:fixed !important;
  font-size:11px !important;
}
#page-inventory .parts-table th,
#page-inventory .parts-table td{
  padding:8px 5px !important;
  vertical-align:middle !important;
}
#page-inventory .parts-table th:nth-child(1),
#page-inventory .parts-table td:nth-child(1){width:3% !important;}
#page-inventory .parts-table th:nth-child(2),
#page-inventory .parts-table td:nth-child(2){width:13% !important;}
#page-inventory .parts-table th:nth-child(3),
#page-inventory .parts-table td:nth-child(3){width:8% !important;}
#page-inventory .parts-table th:nth-child(4),
#page-inventory .parts-table td:nth-child(4){width:8% !important;}
#page-inventory .parts-table th:nth-child(5),
#page-inventory .parts-table td:nth-child(5){width:8% !important;}
#page-inventory .parts-table th:nth-child(6),
#page-inventory .parts-table td:nth-child(6){width:8% !important;}
#page-inventory .parts-table th:nth-child(7),
#page-inventory .parts-table td:nth-child(7){width:7% !important;}
#page-inventory .parts-table th:nth-child(8),
#page-inventory .parts-table td:nth-child(8){width:7% !important;}
#page-inventory .parts-table th:nth-child(9),
#page-inventory .parts-table td:nth-child(9){width:8% !important;}
#page-inventory .parts-table th:nth-child(10),
#page-inventory .parts-table td:nth-child(10){width:30% !important;}
#page-inventory .parts-table td:nth-child(2) strong{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.part-row-timestamp{
  display:block;
  margin-top:3px;
  color:#94a3b8;
  font-size:9.5px;
  font-weight:800;
  white-space:nowrap;
}
#page-inventory .part-location-badge,
#page-inventory .part-class-badge{
  display:inline-flex !important;
  max-width:100% !important;
  min-width:34px;
  align-items:center;
  justify-content:center;
  padding:3px 7px !important;
  border-radius:999px;
  font-size:10.5px !important;
  font-weight:900;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
#page-inventory .part-location-badge{
  border:1px solid #bae6fd;
  background:#f0f9ff;
  color:#0369a1;
}
#page-inventory .part-class-badge{
  border:1px solid #bbf7d0;
  background:#f0fdf4;
  color:#166534;
}
#page-inventory .parts-table .ibtns{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(86px,1fr)) !important;
  gap:6px !important;
  align-items:center !important;
}
#page-inventory .parts-table .ibtn{
  width:100% !important;
  min-height:28px !important;
  padding:4px 8px !important;
  justify-content:center !important;
  white-space:nowrap !important;
  font-size:10.5px !important;
}
@media(max-width:1200px){
  #page-inventory .parts-table{font-size:10px !important;}
  #page-inventory .parts-table .ibtns{grid-template-columns:repeat(2,minmax(70px,1fr)) !important; gap:4px !important;}
  #page-inventory .parts-table .ibtn{font-size:9.5px !important; padding:3px 5px !important;}
}


/* ===== v60-visible-timestamp-style-20260714 ===== */
.subsidy-row-updated-at{
  margin-top:4px;
  color:#94a3b8;
  font-size:9.5px;
  font-weight:900;
  white-space:nowrap;
}


/* ===== v61-inventory-layout-office-time-stockmatch-20260715 ===== */
#page-inventory .tbl-wrap{
  overflow-x:hidden !important;
}
#page-inventory .parts-table{
  width:100% !important;
  min-width:0 !important;
  table-layout:fixed !important;
  font-size:10.8px !important;
}
#page-inventory .parts-table th,
#page-inventory .parts-table td{
  padding:7px 5px !important;
  vertical-align:middle !important;
  box-sizing:border-box !important;
}
#page-inventory .parts-table th:nth-child(1),
#page-inventory .parts-table td:nth-child(1){width:3% !important;}
#page-inventory .parts-table th:nth-child(2),
#page-inventory .parts-table td:nth-child(2){width:14% !important;}
#page-inventory .parts-table th:nth-child(3),
#page-inventory .parts-table td:nth-child(3){width:8% !important;}
#page-inventory .parts-table th:nth-child(4),
#page-inventory .parts-table td:nth-child(4){width:8% !important;}
#page-inventory .parts-table th:nth-child(5),
#page-inventory .parts-table td:nth-child(5){width:8% !important;}
#page-inventory .parts-table th:nth-child(6),
#page-inventory .parts-table td:nth-child(6){width:7% !important;}
#page-inventory .parts-table th:nth-child(7),
#page-inventory .parts-table td:nth-child(7){width:7% !important;}
#page-inventory .parts-table th:nth-child(8),
#page-inventory .parts-table td:nth-child(8){width:6% !important;}
#page-inventory .parts-table th:nth-child(9),
#page-inventory .parts-table td:nth-child(9){width:7% !important;}
#page-inventory .parts-table th:nth-child(10),
#page-inventory .parts-table td:nth-child(10){width:32% !important;}
#page-inventory .parts-table td:nth-child(2) strong{
  display:block !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
}
#page-inventory .parts-table .ibtns{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:5px !important;
  align-items:center !important;
}
#page-inventory .parts-table .ibtn{
  width:100% !important;
  min-width:0 !important;
  min-height:27px !important;
  padding:3px 5px !important;
  font-size:10px !important;
  justify-content:center !important;
  white-space:nowrap !important;
}
#page-inventory .part-location-badge,
#page-inventory .part-class-badge{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  max-width:100% !important;
  min-width:32px !important;
  padding:3px 6px !important;
  border-radius:999px !important;
  font-size:10px !important;
  font-weight:900 !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}
#page-inventory .part-location-badge{
  border:1px solid #bae6fd !important;
  background:#f0f9ff !important;
  color:#0369a1 !important;
}
#page-inventory .part-class-badge{
  border:1px solid #bbf7d0 !important;
  background:#f0fdf4 !important;
  color:#166534 !important;
}
.part-row-timestamp{
  display:block !important;
  margin-top:3px !important;
  color:#94a3b8 !important;
  font-size:9px !important;
  font-weight:800 !important;
}
.subsidy-machine{
  white-space:normal !important;
}


/* ===== v62-nonghyup-class-outbound-report-20260715 ===== */
.class-out-report-modal-v62{
  display:none;
  position:fixed;
  inset:0;
  z-index:46000;
  align-items:center;
  justify-content:center;
  padding:18px;
}
.class-out-report-modal-v62.show{display:flex}
.class-out-report-backdrop{
  position:absolute;
  inset:0;
  background:rgba(15,23,42,.58);
  backdrop-filter:blur(4px);
}
.class-out-report-box{
  position:relative;
  width:min(96vw,1180px);
  max-height:90vh;
  overflow:auto;
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:22px;
  box-shadow:0 28px 80px rgba(15,23,42,.38);
  padding:18px;
}
.class-out-report-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  border-bottom:1px solid #e2e8f0;
  padding-bottom:12px;
  margin-bottom:12px;
}
.class-out-report-head strong{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:18px;
  color:#0f172a;
}
.class-out-report-head > div{
  display:flex;
  gap:6px;
}
.class-out-report-filter{
  display:grid;
  grid-template-columns:130px 130px 150px 1fr 1fr 100px;
  gap:8px;
  border:1px solid #e2e8f0;
  background:#f8fafc;
  border-radius:14px;
  padding:10px;
  margin-bottom:12px;
}
.class-out-report-filter label{
  display:grid;
  gap:4px;
  font-size:11px;
  font-weight:900;
  color:#475569;
}
.class-out-report-filter input,
.class-out-report-filter select{
  min-height:34px;
  border:1px solid #cbd5e1;
  border-radius:10px;
  padding:0 9px;
  background:#fff;
  color:#334155;
  font-weight:700;
}
.class-out-hint{
  border:1px solid #fde68a;
  background:#fffbeb;
  color:#92400e;
  border-radius:12px;
  padding:9px 11px;
  font-size:12px;
  font-weight:800;
  margin-bottom:12px;
}
.class-out-cards{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  margin-bottom:14px;
}
.class-out-cards div{
  border:1px solid #e2e8f0;
  background:#f8fafc;
  border-radius:14px;
  padding:11px;
}
.class-out-cards span{
  display:block;
  color:#64748b;
  font-size:11px;
  font-weight:900;
  margin-bottom:5px;
}
.class-out-cards b{
  font-size:17px;
  color:#0f172a;
}
#class-out-report-body-v62 h4{
  margin:18px 0 8px;
  color:#0f172a;
  font-size:14px;
}
.class-out-table{
  width:100%;
  border-collapse:collapse;
  font-size:12px;
}
.class-out-table th,
.class-out-table td{
  border:1px solid #e2e8f0;
  padding:7px 8px;
}
.class-out-table th{
  background:#f1f5f9;
  color:#334155;
}
.class-out-table .empty,
.class-out-loading,
.class-out-error{
  text-align:center;
  color:#64748b;
  padding:14px;
  font-weight:800;
}
.class-out-error{
  color:#be123c;
  background:#fff1f2;
  border-radius:12px;
}
@media(max-width:1000px){
  .class-out-report-filter{grid-template-columns:1fr 1fr}
  .class-out-cards{grid-template-columns:1fr 1fr}
}


/* ===== v63-subsidy-project-switcher-20260715 ===== */
.subsidy-project-switcher-v63{
  border:1px solid #dbeafe;
  background:linear-gradient(135deg,#f8fafc,#eff6ff);
  border-radius:18px;
  padding:13px 14px;
  margin:14px 0;
}
.subsidy-project-switcher-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom:10px;
}
.subsidy-project-switcher-head strong{
  display:flex;
  align-items:center;
  gap:8px;
  color:#0f172a;
  font-size:14px;
}
.subsidy-project-switcher-head span{
  color:#64748b;
  font-size:12px;
  font-weight:800;
}
.subsidy-project-buttons{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.subsidy-project-btn,
.subsidy-project-add{
  border:1px solid #cbd5e1;
  background:#fff;
  color:#334155;
  border-radius:999px;
  padding:8px 12px;
  font-weight:900;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:7px;
  transition:.15s;
}
.subsidy-project-btn em{
  font-style:normal;
  color:#64748b;
  font-size:11px;
}
.subsidy-project-btn.on{
  background:#0f766e;
  color:#fff;
  border-color:#0f766e;
  box-shadow:0 8px 18px rgba(15,118,110,.18);
}
.subsidy-project-btn.on em{
  color:#ccfbf1;
}
.subsidy-project-add{
  border-color:#99f6e4;
  background:#ecfdf5;
  color:#0f766e;
}
@media(max-width:700px){
  .subsidy-project-switcher-head{align-items:flex-start;flex-direction:column}
  .subsidy-project-btn,.subsidy-project-add{width:100%;justify-content:space-between}
}


/* ===== v64-ratefix-inventory-buttons-20260715 ===== */
#page-inventory .v64-inv-buttons-fit{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:5px !important;
}
#page-inventory .v64-inv-buttons-fit .ibtn{
  width:100% !important;
  min-width:0 !important;
  justify-content:center !important;
}


/* ===== v65-subsidy-projects-monthly-inventory-fix-20260715 ===== */
.subsidy-project-year-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
  flex-wrap:wrap;
}
.subsidy-project-year-row label{
  display:flex;
  align-items:center;
  gap:8px;
  color:#475569;
  font-size:12px;
  font-weight:900;
}
.subsidy-project-year-row select{
  height:34px;
  border:1px solid #cbd5e1;
  border-radius:10px;
  padding:0 10px;
  background:#fff;
  color:#334155;
  font-weight:900;
}
.subsidy-project-delete{
  border:1px solid #fecaca;
  background:#fff1f2;
  color:#dc2626;
  border-radius:999px;
  padding:7px 11px;
  font-weight:900;
  cursor:pointer;
}
#page-inventory .tbl-wrap{
  overflow-x:auto !important;
}
#page-inventory .parts-table{
  min-width:1180px !important;
  width:100% !important;
  table-layout:fixed !important;
}
#page-inventory .parts-table th,
#page-inventory .parts-table td{
  box-sizing:border-box !important;
  vertical-align:middle !important;
}
#page-inventory .parts-table .ibtns{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:5px !important;
}
#page-inventory .parts-table .ibtn{
  min-width:0 !important;
  width:100% !important;
  padding:4px 6px !important;
  font-size:10px !important;
  justify-content:center !important;
  white-space:nowrap !important;
}
.inventory-monthly-report-modal-v65{
  display:none;
  position:fixed;
  inset:0;
  z-index:47000;
  align-items:center;
  justify-content:center;
  padding:18px;
}
.inventory-monthly-report-modal-v65.show{display:flex}
.inventory-monthly-backdrop{
  position:absolute;
  inset:0;
  background:rgba(15,23,42,.58);
  backdrop-filter:blur(4px);
}
.inventory-monthly-box{
  position:relative;
  width:min(97vw,1220px);
  max-height:91vh;
  overflow:auto;
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:22px;
  box-shadow:0 28px 80px rgba(15,23,42,.38);
  padding:18px;
}
.inventory-monthly-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  border-bottom:1px solid #e2e8f0;
  padding-bottom:12px;
  margin-bottom:12px;
}
.inventory-monthly-head strong{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:18px;
  color:#0f172a;
}
.inventory-monthly-head > div{
  display:flex;
  gap:6px;
}
.inventory-monthly-filter{
  display:grid;
  grid-template-columns:130px 130px 130px 1fr 1fr 100px;
  gap:8px;
  border:1px solid #e2e8f0;
  background:#f8fafc;
  border-radius:14px;
  padding:10px;
  margin-bottom:12px;
}
.inventory-monthly-filter label{
  display:grid;
  gap:4px;
  font-size:11px;
  font-weight:900;
  color:#475569;
}
.inventory-monthly-filter input,
.inventory-monthly-filter select{
  min-height:34px;
  border:1px solid #cbd5e1;
  border-radius:10px;
  padding:0 9px;
  background:#fff;
  color:#334155;
  font-weight:700;
}
.monthly-cards{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:8px;
  margin-bottom:14px;
}
.monthly-cards div{
  border:1px solid #e2e8f0;
  background:#f8fafc;
  border-radius:14px;
  padding:11px;
}
.monthly-cards span{
  display:block;
  color:#64748b;
  font-size:11px;
  font-weight:900;
  margin-bottom:5px;
}
.monthly-cards b{
  font-size:16px;
  color:#0f172a;
}
#inventory-monthly-body-v65 h4{
  margin:18px 0 8px;
  color:#0f172a;
  font-size:14px;
}
.monthly-table{
  width:100%;
  border-collapse:collapse;
  font-size:12px;
}
.monthly-table th,
.monthly-table td{
  border:1px solid #e2e8f0;
  padding:7px 8px;
}
.monthly-table th{
  background:#f1f5f9;
  color:#334155;
}
.monthly-table .empty,
.monthly-loading,
.monthly-error{
  text-align:center;
  color:#64748b;
  padding:14px;
  font-weight:800;
}
.monthly-error{
  color:#be123c;
  background:#fff1f2;
  border-radius:12px;
}
@media(max-width:1000px){
  .inventory-monthly-filter{grid-template-columns:1fr 1fr}
  .monthly-cards{grid-template-columns:1fr 1fr}
}


/* ===== v66-inventory-column-align-save-report-20260715 ===== */
#page-inventory .tbl-wrap{
  overflow-x:auto !important;
}
#page-inventory table.parts-table{
  width:100% !important;
  min-width:1180px !important;
  table-layout:fixed !important;
  border-collapse:collapse !important;
}
#page-inventory .parts-table col:nth-child(1){width:3% !important;}
#page-inventory .parts-table col:nth-child(2){width:16% !important;}
#page-inventory .parts-table col:nth-child(3){width:10% !important;}
#page-inventory .parts-table col:nth-child(4){width:9% !important;}
#page-inventory .parts-table col:nth-child(5){width:9% !important;}
#page-inventory .parts-table col:nth-child(6){width:9% !important;}
#page-inventory .parts-table col:nth-child(7){width:8% !important;}
#page-inventory .parts-table col:nth-child(8){width:8% !important;}
#page-inventory .parts-table col:nth-child(9){width:8% !important;}
#page-inventory .parts-table col:nth-child(10){width:20% !important;}
#page-inventory .parts-table th,
#page-inventory .parts-table td{
  box-sizing:border-box !important;
  vertical-align:middle !important;
  overflow:hidden !important;
}
#page-inventory .parts-table th:nth-child(1), #page-inventory .parts-table td:nth-child(1){width:3% !important; text-align:center !important;}
#page-inventory .parts-table th:nth-child(2), #page-inventory .parts-table td:nth-child(2){width:16% !important; text-align:left !important;}
#page-inventory .parts-table th:nth-child(3), #page-inventory .parts-table td:nth-child(3){width:10% !important; text-align:center !important;}
#page-inventory .parts-table th:nth-child(4), #page-inventory .parts-table td:nth-child(4){width:9% !important; text-align:center !important;}
#page-inventory .parts-table th:nth-child(5), #page-inventory .parts-table td:nth-child(5){width:9% !important; text-align:center !important;}
#page-inventory .parts-table th:nth-child(6), #page-inventory .parts-table td:nth-child(6){width:9% !important; text-align:right !important;}
#page-inventory .parts-table th:nth-child(7), #page-inventory .parts-table td:nth-child(7){width:8% !important; text-align:right !important;}
#page-inventory .parts-table th:nth-child(8), #page-inventory .parts-table td:nth-child(8){width:8% !important; text-align:right !important;}
#page-inventory .parts-table th:nth-child(9), #page-inventory .parts-table td:nth-child(9){width:8% !important; text-align:center !important;}
#page-inventory .parts-table th:nth-child(10), #page-inventory .parts-table td:nth-child(10){width:20% !important; text-align:left !important;}
#page-inventory .parts-table tbody tr:not(.inventory-group-row) td{
  border-top:1px solid #e2e8f0 !important;
}
#page-inventory .parts-table .ibtns{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:5px !important;
  width:100% !important;
}
#page-inventory .parts-table .ibtn{
  min-width:0 !important;
  width:100% !important;
  height:28px !important;
  padding:3px 4px !important;
  font-size:10px !important;
  justify-content:center !important;
  white-space:nowrap !important;
}
#page-inventory .parts-table .part-location-badge,
#page-inventory .parts-table .part-class-badge{
  max-width:100% !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}



/* ===== v70-subsidy-delete-year-uncat-clean-20260716 ===== */
.v70-uncat{position:fixed;inset:0;z-index:50000;background:rgba(15,23,42,.58);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;padding:18px}
.v70-uncat-box{width:min(96vw,1040px);max-height:88vh;overflow:hidden;background:#fff;border:1px solid #e2e8f0;border-radius:22px;box-shadow:0 28px 80px rgba(15,23,42,.38);padding:18px;display:flex;flex-direction:column}
.v70-head{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #e2e8f0;padding-bottom:10px;margin-bottom:10px}
.v70-head h3{margin:0;font-size:18px;color:#0f172a}.v70-x{width:34px;height:34px;border:1px solid #e2e8f0;border-radius:10px;background:#fff;font-size:20px;cursor:pointer}
.v70-search{height:38px;border:1px solid #cbd5e1;border-radius:12px;padding:0 12px;font-weight:800;margin-bottom:10px}
.v70-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;overflow:auto;max-height:58vh;padding-right:4px}
.v70-item{display:flex;align-items:center;gap:9px;border:1px solid #e2e8f0;background:#f8fafc;border-radius:12px;padding:9px 10px;cursor:pointer}
.v70-item input{width:16px;height:16px;accent-color:#0f766e}.v70-item span{min-width:0;flex:1}.v70-item b{display:block;color:#0f172a;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.v70-item small{display:block;color:#64748b;font-size:11px;margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.v70-item em{font-style:normal;color:#0f766e;font-size:11px;font-weight:900;white-space:nowrap}
.v70-foot{display:flex;justify-content:flex-end;gap:8px;padding-top:12px;margin-top:12px;border-top:1px solid #e2e8f0}
@media(max-width:900px){.v70-list{grid-template-columns:1fr}}

/* ===== v74-subsidy-direct-entry-durable-save-20260716 ===== */
.subsidy-edit-grid input[readonly]{
  background:#f1f5f9;
  color:#475569;
  cursor:not-allowed;
}
.subsidy-actions{
  flex-wrap:wrap;
}
@media(max-width:720px){
  #subsidy-add-manual,
  .subsidy-import-label{
    width:100%;
    justify-content:center;
  }
}


/* ===== v77.3-daily-manual-delete-20260724 ===== */
.daily-delete-guide{display:flex;align-items:center;gap:6px;margin-top:8px;color:#64748b;font-size:12px;font-weight:700;line-height:1.45}
.daily-delete-guide i{color:#0f766e}
.daily-manage-head,.daily-manage-cell{width:116px;text-align:center;white-space:nowrap}
.daily-row-delete-btn{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-width:96px;padding:7px 10px;border:1px solid #cbd5e1;border-radius:9px;background:#f8fafc;color:#334155;font-weight:900;line-height:1;white-space:nowrap;cursor:pointer}
.daily-row-delete-btn:hover{background:#e2e8f0;border-color:#94a3b8}
.daily-row-delete-btn:disabled{opacity:.6;cursor:wait}
@media(max-width:760px){.daily-manage-head,.daily-manage-cell{width:104px}.daily-row-delete-btn{min-width:88px;padding:7px 8px}.daily-row-delete-btn i{margin:0}.daily-row-delete-btn{font-size:11px}}

/* ===== v77.5 거래내역 월말정산 PDF ===== */
.records-monthly-pdf-modal-v775{
  position:fixed;
  inset:0;
  z-index:10080;
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
}
.records-monthly-pdf-modal-v775.show{display:flex}
.records-monthly-pdf-backdrop-v775{
  position:absolute;
  inset:0;
  background:rgba(15,23,42,.58);
  backdrop-filter:blur(3px);
}
.records-monthly-pdf-box-v775{
  position:relative;
  width:min(760px,96vw);
  max-height:90vh;
  overflow:auto;
  background:#fff;
  border-radius:18px;
  box-shadow:0 28px 70px rgba(15,23,42,.3);
  padding:22px;
}
.records-monthly-pdf-head-v775{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding-bottom:14px;
  border-bottom:1px solid #e2e8f0;
}
.records-monthly-pdf-head-v775 strong{
  display:block;
  color:#991b1b;
  font-size:17px;
  font-weight:900;
}
.records-monthly-pdf-head-v775 small{
  display:block;
  color:#64748b;
  font-size:12px;
  margin-top:5px;
}
.records-monthly-pdf-form-v775{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin-top:16px;
}
.records-monthly-pdf-form-v775 label{
  display:flex;
  flex-direction:column;
  gap:6px;
  color:#334155;
  font-size:12px;
  font-weight:800;
}
.records-monthly-pdf-form-v775 input[type="month"],
.records-monthly-pdf-form-v775 input[type="date"]{
  width:100%;
  min-height:40px;
  border:1px solid #cbd5e1;
  border-radius:9px;
  padding:8px 10px;
  background:#fff;
  color:#0f172a;
}
.records-monthly-check-v775{
  grid-column:1/-1;
  flex-direction:row!important;
  align-items:center;
  gap:8px!important;
  padding:10px 12px;
  border:1px solid #e2e8f0;
  border-radius:9px;
  background:#f8fafc;
  cursor:pointer;
}
.records-monthly-check-v775 input{
  width:16px;
  height:16px;
  accent-color:#991b1b;
}
.records-monthly-pdf-note-v775{
  display:flex;
  align-items:flex-start;
  gap:8px;
  margin-top:12px;
  padding:11px 12px;
  border:1px solid #fecaca;
  border-radius:10px;
  background:#fff7f7;
  color:#7f1d1d;
  font-size:12px;
  line-height:1.55;
}
.records-monthly-pdf-actions-v775{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:16px;
}
#record-monthly-status-v775{
  color:#64748b;
  font-size:12px;
}
@media(max-width:720px){
  .records-monthly-pdf-form-v775{grid-template-columns:1fr}
  .records-monthly-check-v775{grid-column:auto}
  .records-monthly-pdf-actions-v775{align-items:stretch;flex-direction:column}
  .records-monthly-pdf-actions-v775 .btn{width:100%}
}

/* ===== v77.6 inventory monthly category filter fix ===== */
.monthly-source-note-v776{
  display:flex;
  align-items:flex-start;
  gap:7px;
  margin:0 0 12px;
  padding:9px 11px;
  border:1px solid #fcd34d;
  border-radius:10px;
  background:#fffbeb;
  color:#78350f;
  font-size:12px;
  line-height:1.5;
}
.monthly-source-note-v776 i{margin-top:2px;color:#d97706}
.monthly-source-badge-v776{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  white-space:nowrap;
  padding:2px 7px;
  border:1px solid #cbd5e1;
  border-radius:999px;
  font-size:10px;
  font-weight:800;
}
.monthly-source-badge-v776.is-log{
  color:#047857;
  border-color:#a7f3d0;
  background:#ecfdf5;
}
.monthly-source-badge-v776.is-record{
  color:#c2410c;
  border-color:#fed7aa;
  background:#fff7ed;
}
