/* style.css */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family:
    Malgun Gothic,
    sans-serif;
}
body {
  background: #eef2f7;
}
.header {
  height: 60px;
  background: #245a9c;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: bold;
}
.container {
  display: flex;
  height: calc(100vh - 60px);
}
.sidebar {
  width: 250px;

  background: #ffffff;

  border-right: 1px solid #d9dee5;

  padding: 0;
}

.sidebar h3 {
  padding: 18px 20px;

  background: #245a9c;

  color: #fff;

  font-size: 17px;

  border-bottom: 1px solid #1d4b84;
}

.menu-list {
  list-style: none;

  margin: 0;

  padding: 10px 0;
}

.menu-list > li {
  margin-bottom: 2px;
}

.menu-list > li > a,
.menu-list > li > span {
  display: flex;

  align-items: center;

  gap: 10px;

  padding: 12px 18px;

  color: #333;

  text-decoration: none;

  cursor: pointer;

  transition: 0.2s;

  font-size: 14px;

  font-weight: 600;
}

.menu-list > li > a:hover,
.menu-list > li > span:hover {
  background: #eef5ff;

  color: #245a9c;
}

.menu-list i {
  width: 18px;

  text-align: center;

  color: #6b7280;
}
.content {
  flex: 1;
  padding: 20px;
}

.has-sub ul {
  list-style: none;

  margin: 0;

  padding: 0;
}

.has-sub ul li a {
  display: block;

  padding: 10px 20px 10px 46px;

  color: #555;

  text-decoration: none;

  font-size: 13px;

  transition: 0.2s;
}

.has-sub ul li a:hover {
  background: #f5f8fc;

  color: #245a9c;
}

.menu-list .active {
  background: #245a9c !important;

  color: #fff !important;
}

.menu-list .active i {
  color: #fff;
}

.row {
  display: flex;
  gap: 20px;
  height: 100%;
}
.left {
  width: 280px;
}
.right {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card {
  background: #fff;
  border: 1px solid #d7d7d7;
  border-radius: 6px;
  overflow: hidden;
}
.card-header {
  background: #f3f6fa;
  padding: 12px;
  font-weight: bold;
  border-bottom: 1px solid #ddd;
}
.card-body {
  padding: 0;
}
table {
  border-collapse: collapse;
  width: 100%;
}
th,
td {
  border: 1px solid #ddd;
  padding: 8px;
  font-size: 13px;
}
th {
  background: #f7f8fb;
}
.badge {
  padding: 3px 8px;
  border-radius: 4px;
  color: #fff;
}
.red {
  background: #d9534f;
}
.blue {
  background: #584fd9;
}
.green {
  background: #5cb85c;
}
.summary {
  padding: 15px;
}
button {
  padding: 5px 10px;
  cursor: pointer;
}
.detail-wrap {
  width: 100%;
  overflow: hidden;
}
.detail-table {
  width: 100%;
  table-layout: fixed;
}
.expand-row {
  display: none;
}
.expand-row.show {
  display: table-row;
}
.expand-row td {
  padding: 16px 24px !important;
}
.history-wrap {
  width: 100%;
  max-width: 100%;

  /* 추가 */
  max-height: 600px;
  /* max-height: 100%; */
  overflow-y: auto;
  overflow-x: auto;

  border: 1px solid #d9e2ef;
  border-radius: 6px;

  background: #fff;

  box-sizing: border-box;
}

.history-table {
  width: max-content;
  min-width: 100%;

  border-collapse: collapse;
}
.history-table th,
.history-table td {
  min-width: 40px;
  white-space: nowrap;
}
.history-table thead th {
  position: sticky;
  top: 0;
  background: #eef2f7;
}
.menu ul {
  list-style: none;
}
.menu li {
  padding: 10px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 78px;
  height: 34px;

  padding: 0 16px;
  margin-right: 6px;

  border: none;
  border-radius: 18px;

  font-size: 13px;
  font-weight: 600;
  color: #fff;

  cursor: pointer;
  transition: all 0.2s ease;

  user-select: none;
}
.btn-edit {
  background: #2f80ed;
}
.btn-search {
  background: #cfcecf;
}
.btn-edit2 {
  background: #9877a0;
}
.btn-delete {
  background: #eb5757;
}
.btn-complete {
  background: #27ae60;
}
.form-input {
  height: 34px;
  display: block;

  width: 100%;
  max-width: 100%;

  padding: 0 10px;

  border: 1px solid #cfd8e3;
  border-radius: 4px;

  background: #fff;
  color: #333;

  font-size: 13px;
  line-height: 34px;

  outline: none;

  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    background-color 0.2s;
}
.form-input.number {
  width: 60px;

  min-width: 60px;
  text-align: right;
}
.form-input[readonly] {
  background: #f8f9fb;
  color: #555;
  cursor: default;
}
.form-textarea {
  width: 100%;
  min-height: 80px;

  padding: 8px 10px;

  border: 1px solid #cfd8e3;
  border-radius: 4px;

  resize: vertical;

  font-size: 13px;
  outline: none;
}

.form-textarea:focus {
  border-color: #2f80ed;
  box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.15);
}

.form-select {
  display: block;

  width: 100%;
  max-width: 100%;
  height: 34px;

  padding: 0 36px 0 10px;

  border: 1px solid #cfd8e3;
  border-radius: 4px;

  background-color: #fff;
  color: #333;

  font-size: 13px;

  outline: none;
  cursor: pointer;

  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    background-color 0.2s;

  /* 기본 화살표 제거 */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  /* 사용자 정의 화살표 */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M1.5 5l6.5 6 6.5-6' stroke='%23666' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.history-action {
  display: flex;

  gap: 8px;

  padding: 15px 10px;

  /* border-top: 1px solid #d9e2ef; */

  /* background: #fafbfd; */
}
/* ================= Drawer ================= */

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transition: 0.25s;
  z-index: 998;
}

.drawer-overlay.show {
  opacity: 1;
  visibility: visible;
}

.drawer {
  position: fixed;
  top: 0;
  right: -700px;
  width: 700px;
  max-width: 90%;
  height: 100%;
  background: #fff;
  box-shadow: -5px 0 18px rgba(0, 0, 0, 0.18);
  transition: right 0.3s ease;
  z-index: 999;

  display: flex;
  flex-direction: column;
}

.drawer.show {
  right: 0;
}

.drawer-header {
  height: 60px;
  background: #245a9c;
  color: #fff;

  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 0 20px;
}

.drawer-header h3 {
  font-size: 18px;
}

.drawer-close {
  border: none;
  background: none;
  color: #fff;

  font-size: 30px;
  cursor: pointer;
}

.drawer-body {
  flex: 1;

  overflow: auto;

  padding: 20px;
}

.drawer-table {
  width: 100%;
  border-collapse: collapse;
}

.drawer-table th,
.drawer-table td {
  border: 1px solid #ddd;

  padding: 8px;

  font-size: 13px;

  text-align: center;
}

.drawer-table th {
  background: #eef2f7;

  position: sticky;

  top: 0;
}

.drawer-footer {
  border-top: 1px solid #ddd;

  padding: 15px;

  text-align: right;
}
/* Receipt Popup */

.receipt-popup {
  position: fixed;

  top: 30px;

  left: -460px;

  width: 430px;

  height: calc(100vh - 60px);

  background: #fff;

  border-right: 1px solid #ddd;

  box-shadow: 4px 0 12px rgba(0, 0, 0, 0.2);

  transition: left 0.3s;

  z-index: 1001;

  display: flex;

  flex-direction: column;
}

.receipt-popup.show {
  left: 0;
}

.receipt-header {
  height: 50px;

  background: #245a9c;

  color: #fff;

  display: flex;

  justify-content: space-between;

  align-items: center;

  padding: 0 15px;
}

.receipt-body {
  flex: 1;

  overflow: auto;

  text-align: center;

  padding: 15px;
}

.receipt-body img {
  width: 100%;

  cursor: zoom-in;

  transition: 0.25s;

  transform-origin: center center;
}

.receipt-footer {
  padding: 12px;

  text-align: right;

  border-top: 1px solid #ddd;
}
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 15px 20px;

  margin-bottom: 20px;

  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.search-bar label {
  font-weight: bold;
  color: #444;
}

.search-bar .form-select {
  width: 90px;
}

.search-action {
  margin-left: auto;
}

.invalid-th {
  background: #fff4f4;
}

.invalid-th .warning {
  margin-left: 6px;

  color: #dc3545;

  cursor: pointer;

  font-size: 14px;
}

.field-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.field-wrap .form-select {
  flex: 1;
}

.inspection-popover {
  max-width: 260px;
}

.inspection-popover .popover {
  border: 2px solid #2f5ea7;

  border-radius: 8px;

  background: #fff;

  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.inspection-popover .popover-header {
  background: #f8f9fa;

  border-bottom: 1px solid #e9ecef;

  color: #333;

  font-size: 14px;

  font-weight: 600;

  padding: 10px 14px;
}

.inspection-popover .popover-body {
  background: #fff;

  padding: 12px 14px;

  color: #495057;

  line-height: 1.7;

  font-size: 13px;
}

.inspection-popover.bs-popover-end .popover-arrow::before {
  border-right-color: #d9dee5;
}

.inspection-popover.bs-popover-end .popover-arrow::after {
  border-right-color: #ffffff;
}

.inspection-popover.bs-popover-start .popover-arrow::before {
  border-left-color: #d9dee5;
}

.inspection-popover.bs-popover-start .popover-arrow::after {
  border-left-color: #ffffff;
}

.warning {
  color: #dc3545;
  cursor: pointer;
  font-size: 15px;
  transition: 0.2s;
}

.warning:hover {
  color: #bb2d3b;
}

.action-bar {
  display: flex;

  justify-content: flex-end;

  margin-bottom: 16px;
}

.btn-download {
  display: inline-flex;

  align-items: center;

  gap: 6px;

  min-width: 120px;

  height: 38px;

  padding: 0 18px;

  border: none;

  border-radius: 6px;

  background: #198754;

  color: #fff;

  font-size: 14px;

  font-weight: 600;

  cursor: pointer;

  transition: 0.2s;
}

.receipt-list {
  list-style: none;

  margin: 0;

  padding: 0;
}

.receipt-list li {
  display: flex;

  align-items: center;

  gap: 10px;

  padding: 14px 18px;

  cursor: pointer;

  border-bottom: 1px solid #ececec;

  transition: 0.2s;
}

.receipt-list li:hover {
  background: #eef5ff;
}

.receipt-list i {
  color: #245a9c;

  font-size: 18px;
}

.inspection-opinion {
  margin-top: 20px;

  padding: 16px;

  border: 1px solid #d9e2ef;

  border-radius: 6px;

  background: #fafbfd;
}

.inspection-title {
  display: flex;

  align-items: center;

  gap: 8px;

  margin-bottom: 14px;

  font-size: 14px;

  font-weight: 600;

  color: #245a9c;
}

.inspection-check {
  display: grid;

  grid-template-columns: repeat(7, 1fr);

  gap: 12px 18px;

  margin-bottom: 16px;
}

.inspection-check label {
  display: flex;

  align-items: center;

  gap: 6px;

  font-size: 13px;

  white-space: nowrap;

  cursor: pointer;
}

.inspection-text {
  text-align: left;

  width: 100%;

  min-height: 90px;

  padding: 10px 12px;

  border: 1px solid #cfd8e3;

  border-radius: 4px;

  resize: vertical;

  font-size: 13px;

  outline: none;
}

.inspection-text:focus {
  border-color: #2f80ed;

  box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.15);
}

.consumer-opinion {
  margin-top: 20px;

  margin-bottom: 18px;

  padding: 16px;

  border: 1px solid #d9e2ef;

  border-radius: 6px;

  background: #f8fafc;
}

.consumer-title {
  display: flex;

  align-items: center;

  gap: 8px;

  margin-bottom: 12px;

  color: #245a9c;

  font-weight: 600;

  font-size: 14px;
}

.consumer-text {
  width: 100%;

  min-height: 80px;

  padding: 10px 12px;

  border: 1px solid #cfd8e3;

  border-radius: 4px;

  background: #fff;

  resize: none;

  font-size: 13px;

  color: #495057;
}

.consumer-text[readonly] {
  background: #f5f7fa;

  color: #495057;

  cursor: default;
}

.menu .has-sub ul .has-sub > span {
  display: flex;

  align-items: center;

  padding: 10px 16px;

  padding-left: 32px;

  cursor: pointer;
}

.menu .has-sub ul .has-sub ul {
  margin-left: 12px;
}
.menu .has-sub ul .has-sub ul li a {
  display: block;

  padding: 8px 16px;

  padding-left: 48px;

  font-size: 13px;

  color: #666;
}
.menu .has-sub ul .has-sub ul li a:hover {
  background: #eef5ff;

  color: #1d4ed8;
}

.has-sub > ul {
  display: none;
}

.has-sub.open > ul {
  display: block;
}

/* ============================= */
/* Wizard Modal */
/* ============================= */

.wizard-modal {
  width: 900px;
  max-width: 95%;
}

.wizard-page {
  min-height: 350px;
  padding: 20px;
}

/* ============================= */
/* Step */
/* ============================= */

.wizard-step {
  display: flex;
  align-items: center;
  justify-content: center;

  margin: 25px 0 35px;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;

  width: 140px;
}

.step-number {
  width: 42px;
  height: 42px;

  border-radius: 50%;

  background: #d9d9d9;

  color: #fff;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 18px;
  font-weight: bold;

  margin-bottom: 10px;
}

.step.active .step-number {
  background: #0d6efd;
}

.step-text {
  font-size: 14px;

  color: #666;
}

.step.active .step-text {
  color: #0d6efd;

  font-weight: bold;
}

.step-line {
  flex: 1;

  height: 2px;

  background: #dcdcdc;

  margin: 0 20px;
}

/* ============================= */
/* Step Title */
/* ============================= */

.wizard-title {
  font-size: 20px;

  font-weight: 600;

  text-align: center;

  margin-bottom: 35px;
}

/* ============================= */
/* Radio */
/* ============================= */

.wizard-radio-group {
  display: flex;

  justify-content: center;

  gap: 50px;
}

.wizard-radio {
  width: 180px;

  border: 2px solid #ddd;

  border-radius: 10px;

  padding: 30px;

  text-align: center;

  cursor: pointer;

  transition: 0.2s;
}

.wizard-radio:hover {
  border-color: #0d6efd;

  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.wizard-radio input {
  display: none;
}

.wizard-radio span {
  font-size: 18px;

  font-weight: 600;
}

.wizard-radio input:checked + span {
  color: #0d6efd;
}

/* ============================= */
/* popup table */
/* ============================= */

.popup-table {
  width: 100%;

  border-collapse: collapse;

  margin-top: 10px;
}

.popup-table th {
  width: 140px;

  background: #f5f5f5;

  border: 1px solid #ddd;

  padding: 12px;

  text-align: center;
}

.popup-table td {
  border: 1px solid #ddd;

  padding: 10px;
}

.popup-table input {
  width: 100%;
}

.popup-table select {
  width: 100%;
}

/* ============================= */
/* Footer */
/* ============================= */

.modal-footer {
  display: flex;

  justify-content: flex-end;

  gap: 10px;

  padding: 20px;

  border-top: 1px solid #ddd;
}

/* ============================= */
/* Area */
/* ============================= */

#largeArea,
#middleArea,
#smallArea {
  animation: fade 0.2s ease;
}

/* ============================= */
/* Fade */
/* ============================= */

@keyframes fade {
  from {
    opacity: 0;

    transform: translateY(10px);
  }

  to {
    opacity: 1;

    transform: translateY(0);
  }
}

.receipt-body {
  flex: 1;

  display: flex;

  justify-content: center;

  align-items: center;

  position: relative;
}

.receipt-body img {
  width: 90%;

  max-height: 92%;

  object-fit: contain;
}

.receipt-arrow {
  position: absolute;

  top: 50%;

  transform: translateY(-50%);

  width: 44px;

  height: 44px;

  border: none;

  border-radius: 50%;

  background: rgba(36, 90, 156, 0.85);

  color: #fff;

  font-size: 26px;

  cursor: pointer;

  z-index: 10;

  transition: 0.2s;
}

.receipt-arrow:hover {
  background: #245a9c;
}

.receipt-arrow.left {
  left: 12px;
}

.receipt-arrow.right {
  right: 12px;
}

receipt-exist {
  background: #fdfdfd;
}

.receipt-exist td {
  background: #e3e5e7;
}

.break-line {
  grid-column: 1;
}
