/* ±âº» ÃÊ±âÈ­ */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
body {
  margin: 0;
  padding: 0;
  font-family: "Malgun Gothic", sans-serif;
  background: #f5f5f5;
  color: #333;
}

.report-container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  background: #fff;
  padding: 20px;
  min-height: 100vh;
  position: relative;
}

/* ========================================= */
/* ÀÎ¼â ÀÏ½Ã Ç¥½Ã ¿µ¿ª (Æò¼Ò¿£ ¼û±è)          */
/* ========================================= */
#printTimeArea {
  display: none; /* È­¸é¿¡¼­´Â º¸ÀÌÁö ¾ÊÀ½ */
  text-align: right;
  font-size: 11px;
  color: #888;
  margin-bottom: 5px;
  font-family: sans-serif;
  width: 100%;
}

/* Çì´õ ¹× ¼±ÅÃ¹Ú½º */
.report-header {
  border-bottom: 2px solid #000;
  margin-bottom: 15px;
  padding-bottom: 5px;
}
.report-title-input {
  width: 100%;
  border: none;
  font-size: 20px;
  font-weight: bold;
  outline: none;
}
.sub-header-text {
  font-size: 9px;
  color: #888;
  letter-spacing: 1px;
}

.select-grid {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.select-group {
  flex: 1;
}
.select-group label {
  font-size: 9px;
  font-weight: bold;
  display: block;
  margin-bottom: 2px;
}
.select-group select {
  width: 100%;
  padding: 5px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 11px;
}

/* ¼½¼Ç Å¸ÀÌÆ² */
.section-title {
  font-size: 13px;
  font-weight: bold;
  margin: 12px 0 6px;
  display: flex;
  align-items: center;
}
.section-num {
  background: #000;
  color: #fff;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-right: 6px;
  font-size: 11px;
}

/* 1, 2¹ø Áöµµ ¿µ¿ª */
.first-row {
  display: flex;
  gap: 12px;
  margin-bottom: 15px;
  flex-direction: column; /* ¸ð¹ÙÀÏ ¿ì¼± */
}

.step-box {
  flex: 1;
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  height: auto !important;
  display: flex;
  flex-direction: column;
}
.box-header {
  background: #f8f9fa;
  padding: 6px;
  border-bottom: 1px solid #eee;
  font-weight: bold;
  font-size: 11px;
}
.map-img-wrapper {
  width: 100%;
  height: auto;
  display: block;
  background: #fff;
}

.map-img-wrapper img {
  width: 100% !important;
  height: auto !important;
  display: block;
}

/* 3¹ø µ¥ÀÌÅÍ ¸µÅ© */
.single-link-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.link-input {
  border: 1px solid #ddd;
  padding: 6px;
  font-size: 11px;
  border-radius: 4px;
  outline: none;
}
.link-input.name {
  flex: 1;
}
.link-input.url {
  flex: 2;
}

/* ÅØ½ºÆ® ¿µ¿ª */
.report-textarea {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 8px;
  font-size: 11px;
  resize: none;
  line-height: 1.4;
  background: #fff;
}

/* ========================================= */
/* [¼öÁ¤] ¹öÆ° ±×·ì ¹× ½ºÅ¸ÀÏ ÅëÀÏ            */
/* ========================================= */
.btn-group {
  display: flex !important;
  flex-direction: row !important;
  justify-content: flex-end !important; /* ¿À¸¥ÂÊ Á¤·Ä */
  align-items: center !important;
  gap: 15px !important;
  margin-top: 30px;
  margin-bottom: 40px;
  width: 100%;
}

/* °øÅë ¹öÆ° ½ºÅ¸ÀÏ */
.action-btn {
  padding: 14px 28px;
  border-radius: 8px;
  border: none;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: white;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  margin: 0 !important;
}

/* [¼öÁ¤] ÀúÀå ¹× ÃÊ±âÈ­ ¹öÆ° ½ºÅ¸ÀÏ ÅëÀÏ (µÑ ´Ù °ËÁ¤»ö) */
.btn-save,
.btn-reset {
  background: #000 !important; /* °ËÁ¤»ö ¹è°æ */
  color: #fff !important; /* Èò»ö ÅØ½ºÆ® */
  width: auto !important;
  display: flex !important;
}

/* È£¹ö È¿°ú ÅëÀÏ */
.btn-save:hover,
.btn-reset:hover {
  background: #333 !important; /* È£¹ö ½Ã ¾à°£ ¹àÀº °ËÁ¤ */
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn-save:active,
.btn-reset:active {
  transform: translateY(0);
}

/* 6¹ø ¿øÀÚ·á (2ÆäÀÌÁö) */
.raw-page-wrapper {
  page-break-before: always;
  margin-top: 30px;
  padding-top: 15px;
  display: flex;
  flex-direction: column;
}
.raw-data-container {
  display: flex;
  gap: 10px;
  flex-direction: column;
  flex: 1;
}
.raw-data-col {
  flex: 1;
  border: 1px solid #ddd;
  padding: 10px;
  background: #fdfdfd;
  display: flex;
  flex-direction: column;
}
.raw-col-header {
  text-align: center;
  font-weight: bold;
  font-size: 11px;
  background: #eee;
  padding: 4px;
  border-radius: 3px;
  margin-bottom: 8px;
}
.raw-sub-title {
  margin: 8px 0 4px;
  font-size: 10px;
  color: #2c3e50;
  font-weight: bold;
}
.table-scroll-area {
  flex: 1;
  overflow-y: auto;
  border: 1px solid #f0f0f0;
  max-height: 250px;
}
.raw-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 9px;
}
.raw-table th,
.raw-table td {
  border: 1px solid #eee;
  padding: 3px;
  text-align: center;
  white-space: nowrap;
}
.raw-table th {
  background: #f9f9f9;
  position: sticky;
  top: 0;
}

/* È­¸é»ó PC ·¹ÀÌ¾Æ¿ô (768px ÀÌ»ó) */
@media (min-width: 768px) {
  .first-row,
  .raw-data-container {
    flex-direction: row;
  }
}

/* ========================================================== */
/* [ÇÙ½É] PDF ÀÎ¼â ¸ðµå °­Á¦ ¼³Á¤ (¸ð¹ÙÀÏµµ PC ·¹ÀÌ¾Æ¿ôÀ¸·Î) */
/* ========================================================== */
.pdf-mode.report-container {
  width: 210mm !important;
  padding: 12mm !important;
  background: white !important;
  margin: 0 !important;
}

/* PDF ¸ðµåÀÏ ¶§ ¹öÆ° ¼û±â±â */
.pdf-mode .pdf-hidden {
  display: none !important;
}

/* [Ãß°¡] PDF ¸ðµåÀÏ ¶§¸¸ ÀÎ¼â ÀÏ½Ã º¸ÀÌ±â */
.pdf-mode #printTimeArea {
  display: block !important;
}

/* Áöµµ 2´Ü °­Á¦ */
.pdf-mode .first-row {
  display: flex !important;
  flex-direction: row !important;
  height: auto !important;
  max-height: 155mm !important;
  overflow: hidden !important;
  gap: 12px !important;
  margin-bottom: 15px !important;
}

.pdf-mode .step-box {
  flex: 1 !important;
  width: 50% !important;
  display: flex !important;
  flex-direction: column !important;
  border: 1px solid #eee !important;
}

/* ¿øÀÚ·á ÆäÀÌÁö °íÁ¤ */
.pdf-mode .raw-page-wrapper {
  display: block !important;
  height: 275mm !important;
  overflow: hidden !important;
  page-break-before: always !important;
  border-top: none !important;
}
.pdf-mode .raw-data-container {
  display: flex !important;
  flex-direction: row !important;
  height: 90% !important;
}
.pdf-mode .raw-data-col {
  flex: 1 !important;
  width: 50% !important;
}
.pdf-mode .table-scroll-area {
  overflow: hidden !important;
  max-height: none !important;
  border: none !important;
}

/* ¸ð´Þ °ü·Ã (ÇÊ¿ä ½Ã) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}
.modal-content {
  background: white;
  padding: 25px;
  border-radius: 12px;
  width: 320px;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}
.modal-header {
  font-weight: bold;
  font-size: 18px;
  margin-bottom: 15px;
  color: #2c3e50;
}
.modal-body {
  font-size: 14px;
  margin-bottom: 25px;
  color: #666;
}
.modal-footer {
  display: flex;
  gap: 8px;
  justify-content: center;
}

/* ¸ð´Þ ³»ºÎ ¹öÆ° ½ºÅ¸ÀÏ */
.save-btn-modal,
.cancel-btn {
  padding: 10px 15px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}
.slot1 {
  background: #3498db;
  color: white;
  flex: 1;
}
.slot2 {
  background: #e67e22;
  color: white;
  flex: 1;
}
.cancel-btn {
  background: #eee;
  color: #333;
  flex: 1;
}

/* ±âº» ½ºÅ¸ÀÏ (µ¥½ºÅ©Åé ¿ì¼±) */
.report-header-row,
.visualization-row {
  display: flex;
  gap: 15px;
  flex-direction: row;
}

.visualization-item {
  flex: 1;
  min-height: 300px;
}

/* ========================================= */
/* °¡Ä¡Å½±¸ Ç¥ Àü¿ë ½ºÅ¸ÀÏ Ãß°¡               */
/* ========================================= */
.value-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  table-layout: fixed;
  background-color: #fff;
}

.value-table th,
.value-table td {
  border: 1px solid #333;
  padding: 0;
  text-align: center;
  vertical-align: middle;
}

.value-table thead th {
  background-color: #eee;
  padding: 10px;
  font-weight: bold;
  font-size: 13px;
  color: #111;
}

.value-table .sub-th {
  background-color: #f9f9f9;
  font-size: 13px;
  font-weight: bold;
}

.table-textarea {
  width: 100%;
  height: 80px;
  border: none;
  resize: none;
  padding: 10px;
  box-sizing: border-box;
  font-family: "Malgun Gothic", sans-serif;
  font-size: 12px;
  background-color: transparent;
  outline: none;
}

.table-textarea:focus {
  background-color: #f0f8ff;
}

.group-input {
  width: 100%;
  border: none;
  background: transparent;
  font-weight: bold;
  text-align: center;
  font-family: inherit;
  font-size: 13px;
  padding: 10px;
  box-sizing: border-box;
  outline: none;
}

.group-input:focus {
  background-color: #f0f8ff;
}

/* ========================================= */
/* ÀÚ±â¼ºÂûº¸°í¼­ & µ¿·áÆò°¡Áö Ãß°¡ ½ºÅ¸ÀÏ     */
/* ========================================= */

/* ÄÁÅ×ÀÌ³Ê ÁÂ¿ì Æø ½½¸²È­ ¹× »óÇÏ ¿©¹é ³Ë³ËÇÏ°Ô È®º¸ */
.report-container {
  max-width: 750px !important;
  padding: 40px !important;
  margin: 0 auto;
}

/* Æò°¡Áö Ç¥ ¼¿ Å©±â ¹× ¿©¹é ÃÖÀûÈ­ */
.value-table {
  margin-bottom: 15px !important;
}
.value-table th,
.value-table td {
  padding: 5px 8px !important;
  font-size: 13px !important;
}
.value-table thead th {
  padding: 8px !important;
}

/* ÅØ½ºÆ® ÀÔ·ÂÃ¢ ³ôÀÌ ¹× ÆÐµù ´Ùµë±â */
.group-input {
  padding: 5px 8px !important;
  font-size: 13px !important;
  height: auto !important;
}
.table-textarea {
  padding: 6px 8px !important;
  font-size: 13px !important;
}

/* Ç¥ ÇÏ´Ü ¾È³» ¹®±¸ (°¢ÁÖ) ¿µ¿ª */
.table-footer {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #555;
  margin-top: 5px;
  margin-bottom: 15px;
  padding: 0 5px;
}

/* Ç¥ ³»¿ë Ãß°¡/»èÁ¦ ¹Ì´Ï ¹öÆ° */
.action-btn-small {
  background: #34495e;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s;
}
.action-btn-small:hover {
  background: #2c3e50;
}
.btn-danger {
  background: #e74c3c;
  margin-left: 5px;
}
.btn-danger:hover {
  background: #c0392b;
}

/* PDF ´Ù¿î·Îµå ½Ã Àß¸² ¹æÁö¿ë ¸ÂÃã ¿©¹é */
.pdf-mode.report-container {
  width: 190mm !important;
  padding: 15mm !important;
}

/* ¸ð¹ÙÀÏ Àü¿ë ½ºÅ¸ÀÏ */
@media (max-width: 768px) {
  .report-header-row,
  .visualization-row {
    flex-direction: column;
  }

  .visualization-item {
    width: 100%;
    margin-bottom: 20px;
  }

  input[type="text"],
  select {
    width: 100% !important;
    margin-bottom: 8px;
  }
}

@media print {
  .first-row {
    flex-direction: row !important;
    align-items: flex-start !important;
  }
  .step-box {
    height: auto !important;
  }
}
