/* 전체 배경 */
body {
  margin: 0;
  padding: 40px;
  background: #f5f6f8;
  font-family: "NanumSquareRound", Arial, sans-serif;
}

/* 중앙 카드 */
.container {
  width: min(900px, 100%);
  margin: auto;
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.08);
  box-sizing: border-box;
  min-width: 0;
}

/* 제목 */
h2 {
  margin-bottom: 20px;
}

/* 검색 영역 */
.search-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 입력창 */
input {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  flex: 1;
  min-width: 120px;
}

input:focus {
  outline: none;
  border-color: #4a90e2;
}

/* 버튼 */
button {
  padding: 10px 20px;
  background: #4a90e2;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

button:hover {
  background: #357bd8;
}

.msapp-upload-toggle {
  background: #64748b;
}

.msapp-upload-toggle:hover,
.msapp-upload-toggle.is-open {
  background: #475569;
}

/* 법정동 */
.input-wrap {
  position: relative;
  flex: 3;   /* 넓게 */
}

/* 지번 */
#jibun {
  flex: 1;
}

/* 자동완성 */
#suggestions {
    
  display: none;
  position: absolute;
  top: 45px;
  width: 100%;

  background: white;              /* 다시 살림 */
  border: 1px solid #ddd;         /* 전체 테두리 */
  border-radius: 10px;

  padding: 6px;                   /* 안쪽 여백 */
  box-sizing: border-box;

  max-height: 220px;
  overflow-y: auto;
}

/* 자동완성 아이템 */
#suggestions div {
  padding: 10px;
  background: white;

  border-radius: 6px;
  margin-bottom: 4px;

  cursor: pointer;
}

/* hover 제거 (또는 아주 약하게) */
#suggestions div:hover {
  background: #f3f4f6;
}

/* 한 줄 정렬 */
.row {
  display: flex;
  align-items: center;  /* 높이 맞춤 핵심 */
  gap: 10px;
}

/* 테이블 */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 5px;
}

#result {
  max-width: 100%;
  min-width: 0;
}

.msapp-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  contain: layout paint;
}

.msapp-result-table {
  min-width: 860px;
  table-layout: fixed;
}

.msapp-result-table .col-dong {
  width: 150px;
}

.msapp-result-table .col-jibun {
  width: 100px;
}

.msapp-result-table .col-building {
  width: 210px;
}

.msapp-result-table .col-unit,
.msapp-result-table .col-floor,
.msapp-result-table .col-ho {
  width: 70px;
}

.msapp-result-table .col-area {
  width: 100px;
}

.msapp-result-table .col-price {
  width: 120px;
}

th {
  background: #f1f3f5;
  padding: 10px;
}

td {
  padding: 10px;
  border-top: 1px solid #eee;
}

.msapp-result-table th,
.msapp-result-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

tr:hover {
  background: #fafafa;
}

/* input 높이 통일 */
input {
  height: 40px;     /* 높이 고정 */
  box-sizing: border-box;
}

/* 버튼 높이 통일 */
button {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;   /* 이거 추가 */
}

.result-count {
  font-size: 14px;
  color: #555;
}

.result-actions {
  display: flex;
  align-items: center;
}

.result-actions button {
  height: 30px;              /* 작게 */
  padding: 0 10px;
  font-size: 13px;

  background: #e0e0e0;       /* 회색 */
  color: #000;               /* 검정 글씨 */

  border: 1px solid #ccc;
  border-radius: 6px;

  margin-left: 6px;
  cursor: pointer;

  display: flex;
  align-items: center;       /* 세로 정렬 */
}

.result-actions button:hover {
  background: #d5d5d5;
}

#dong {
  flex: 4;
  min-width: 350px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.title {
  font-size: 22px;   /* h2 느낌 */
  font-weight: 600;  /* 적당히 굵게 */
  margin-bottom: 10px;
}

.header-right {
  font-size: 14px;
  color: #666;
}

.msapp-upload-panel {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid #e5e7eb;
}

.msapp-upload-panel[hidden] {
  display: none;
}

.msapp-upload-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.msapp-upload-header h2 {
  margin: 0;
  color: #111827;
  font-size: 18px;
}

.msapp-upload-header button:disabled {
  background: #cbd5e1;
  color: #64748b;
  cursor: not-allowed;
}

.msapp-upload-form {
  width: 100%;
}

.msapp-drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 118px;
  padding: 14px 18px;
  border: 1px dashed #94a3b8;
  border-radius: 8px;
  background: #f8fafc;
  box-sizing: border-box;
  color: #334155;
  cursor: pointer;
  gap: 5px;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.msapp-drop-zone:hover,
.msapp-drop-zone:focus,
.msapp-drop-zone.is-dragging {
  border-color: #2563eb;
  background: #eff6ff;
  outline: none;
}

.msapp-drop-zone input {
  display: none;
}

.msapp-drop-zone strong {
  color: #111827;
  font-size: 15px;
}

.msapp-drop-zone span {
  color: #64748b;
  font-size: 13px;
}

.msapp-upload-status {
  min-height: 18px;
  margin: 8px 0 0;
  color: #64748b;
  font-size: 13px;
}

.msapp-upload-status.success {
  color: #047857;
}

.msapp-upload-status.error {
  color: #b91c1c;
}

.msapp-selected-files {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.msapp-selected-files li {
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid #d7dde5;
  border-radius: 6px;
  background: #ffffff;
  color: #334155;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.msapp-progress-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.42);
  z-index: 1000;
}

.msapp-progress-overlay.is-visible {
  display: flex;
}

.msapp-progress-modal {
  width: min(460px, 100%);
  padding: 22px;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.24);
  box-sizing: border-box;
}

.msapp-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.msapp-progress-header h2 {
  margin: 0;
  color: #111827;
  font-size: 18px;
}

#msappProgressPercent {
  color: #2563eb;
  font-size: 18px;
  font-weight: 700;
}

.msapp-progress-track {
  width: 100%;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}

.msapp-progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: #2563eb;
  transition: width 0.2s ease;
}

#msappProgressText {
  margin: 14px 0 0;
  color: #111827;
  font-size: 14px;
}

.msapp-progress-detail {
  margin: 7px 0 0;
  color: #64748b;
  font-size: 13px;
}
