*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: "Malgun Gothic", "맑은 고딕", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #f1f5f9;
  color: #0f172a;
  font-size: 13px;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* 최상단 헤더 (좌측 로고 · 중앙 캡슐형 메뉴 · 우측 상태) */
.app-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  height: 52px;
  background-color: #0f172a;
  border-bottom: 3px solid #16a34a;
  flex-shrink: 0;
}

.header-left {
  display: flex;
  align-items: center;
  min-width: 0;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.app-logo-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
}

.top-nav {
  display: inline-flex;
  align-items: stretch;
  height: 100%;
  gap: 4px;
  padding: 0;
  background-color: transparent;
  border: none;
  border-radius: 0;
  overflow-x: auto;
}

.nav-tab {
  height: 100%;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #475569;
  border-bottom: none;
  border-radius: 0;
  background-color: #1e293b;
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.nav-tab:hover {
  background-color: #334155;
  color: #ffffff;
  border-color: #94a3b8;
}

.nav-tab.active {
  background-color: #ffffff;
  color: #0f172a;
  border-color: #ffffff;
  box-shadow: none;
}

.page-view {
  display: none;
  flex: 1;
  min-height: 0;
}

.page-view.active {
  display: flex;
  flex-direction: column;
}

.app-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.2px;
}

.version-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  background-color: #16a34a;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
}

.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.global-zoom-group {
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  border: 1px solid #475569;
  background-color: #1e293b;
  overflow: hidden;
  flex-shrink: 0;
}

.global-zoom-btn {
  height: 28px;
  min-width: 28px;
  padding: 0 8px;
  border: none;
  background-color: transparent;
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.global-zoom-btn:hover {
  background-color: #334155;
  color: #ffffff;
}

.global-zoom-val {
  min-width: 48px;
  border-left: 1px solid #475569;
  border-right: 1px solid #475569;
}

.app-zoom-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid #475569;
  background-color: #1e293b;
  color: #cbd5e1;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s ease, transform 0.1s ease;
}

.status-pill:hover {
  opacity: 0.92;
}

.status-pill:active {
  transform: scale(0.98);
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: #94a3b8;
  flex-shrink: 0;
}

.status-connecting {
  color: #fdba74;
  border-color: #475569;
}
.status-connecting .status-dot {
  background-color: #fdba74;
}

.status-online {
  color: #86efac;
  border-color: #475569;
}
.status-online .status-dot {
  background-color: #4ade80;
}

.status-offline {
  color: #fde047;
  border-color: #475569;
}
.status-offline .status-dot {
  background-color: #fbbf24;
}

.status-error {
  color: #fca5a5;
  background-color: #37191e;
  border-color: #991b1b;
}
.status-error .status-dot {
  background-color: #f87171;
}

/* 메인 2단 레이아웃 */
.workspace {
  flex: 1;
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  min-height: 0;
  overflow: hidden;
}

.left-panel {
  width: 496px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding-right: 2px;
}

.right-panel {
  flex: 1;
  min-width: 340px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* 카드 공통 */
.card {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  padding: 12px 14px;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.step-badge {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background-color: #0f172a;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
}

/* 드래그 앤 드롭 영역 */
.drop-zone {
  height: 66px;
  border: 1.5px dashed #94a3b8;
  border-radius: 8px;
  background-color: #f4f7fc;
  color: #1e3a5f;
  font-size: 12.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px 12px;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  user-select: none;
  margin-bottom: 8px;
  word-break: keep-all;
}

.drop-zone:hover,
.drop-zone.drag-over {
  background-color: #e0ecfa;
  border-color: #16794b;
}

.drop-zone.has-file {
  font-weight: 700;
  color: #0f172a;
  background-color: #f0fdf4;
  border-color: #16a34a;
}

.file-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.file-input-display {
  flex: 1;
  min-width: 0;
  height: 28px;
  padding: 0 8px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background-color: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-family: inherit;
}

.btn-dark {
  height: 28px;
  padding: 0 12px;
  border: none;
  border-radius: 6px;
  background-color: #0f172a;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.15s ease;
}

.btn-dark:hover:not(:disabled) {
  background-color: #1e293b;
}

.btn-dark:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-clear {
  height: 28px;
  width: 34px;
  border: 1px solid #f8b4b4;
  border-radius: 6px;
  background-color: #fef2f2;
  color: #dc143c;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.15s ease;
}

.btn-clear:hover:not(:disabled) {
  background-color: #fee2e2;
}

.btn-clear:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* 설정 영역 */
.settings-grid {
  display: grid;
  grid-template-columns: 64px 132px 1fr;
  gap: 8px 8px;
  align-items: center;
  margin-bottom: 10px;
}

.setting-label {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
}

.setting-select {
  height: 28px;
  padding: 0 6px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background-color: #ffffff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.info-box {
  height: 28px;
  padding: 0 8px;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  background-color: #f1f5f9;
  color: #0f172a;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.info-box-green {
  background-color: #f0faf4;
  color: #156434;
  border-color: #bbf7d0;
}

.checkbox-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 2px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.checkbox-row .setting-label {
  width: 64px;
  flex-shrink: 0;
}

.chk-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
  user-select: none;
}

.chk-label input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #1d4ed8;
  cursor: pointer;
  margin: 0;
}

/* 변환 버튼 */
.btn-convert {
  width: 100%;
  height: 46px;
  border: none;
  border-radius: 8px;
  background-color: #15803d;
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.15s ease;
  flex-shrink: 0;
}

.btn-convert:hover:not(:disabled) {
  background-color: #166534;
}

.btn-convert:disabled {
  background-color: #cbd5e1;
  color: #64748b;
  cursor: not-allowed;
}

/* 진행 상태 및 프로그레스 바 */
.status-area {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.status-text {
  font-size: 12.5px;
  color: #475569;
  min-height: 18px;
  line-height: 1.4;
}

.status-text.status-ready {
  color: #16243b;
}

.status-text.status-busy {
  color: #005ab4;
}

.status-text.status-done {
  color: #14783c;
}

.status-text.status-warn-inline .missing-highlight {
  color: #dc143c;
  font-weight: 700;
}

.status-text.status-err {
  color: #dc143c;
}

.progress-track {
  width: 100%;
  height: 14px;
  border-radius: 7px;
  background-color: #dee5ee;
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: 7px;
  background: linear-gradient(90deg, #16794b, #22a866);
  transition: width 0.2s ease;
}

/* 우측 미리보기 카드 */
.preview-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 10px 12px 12px 12px;
}

.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 8px;
  margin-bottom: 10px;
  min-height: 28px;
}

.preview-toolbar .card-title {
  white-space: nowrap;
  flex-shrink: 0;
}

.preview-controls {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  min-width: 0;
}

.preview-meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 12px;
  border-radius: 4px;
  background-color: #dcfce7;
  color: #166534;
  font-size: 12px;
  font-weight: 700;
  min-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.zoom-group {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.btn-zoom {
  height: 26px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  background-color: #ffffff;
  color: #0f172a;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.btn-zoom:hover {
  background-color: #f1f5f9;
}

.preview-scroll {
  flex: 1;
  min-height: 0;
  background-color: #cbd5e1;
  border-radius: 6px;
  overflow: auto;
  scrollbar-gutter: stable;
  padding: 16px;
}

.preview-pages {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.preview-page-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.a4-canvas {
  display: block;
  background-color: #ffffff;
  border: 1px solid #94a3b8;
  box-shadow: 3px 3px 8px rgba(15, 23, 42, 0.16);
  flex-shrink: 0;
}

.a4-table {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
}

.a4-table td,
.a4-table th {
  border: 1px solid #505050;
  padding: 0;
  vertical-align: middle;
  text-align: center;
  color: #000000;
  overflow: hidden;
  word-break: break-word;
  font-family: "Malgun Gothic", "맑은 고딕", sans-serif;
}

.a4-table .cell-header {
  background-color: #d9e1f2;
}

.a4-table .cell-red {
  color: #ff0000;
  font-weight: 700;
}

.a4-table .cell-left {
  text-align: left;
}

.a4-table .cell-nowrap {
  white-space: nowrap;
}

.preview-empty-hint {
  text-align: center;
  color: #64748b;
  margin-top: 12px;
}

.preview-page-num {
  margin-top: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: #334155;
}

/* 모달 팝업 */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.48);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.modal-backdrop.hidden {
  display: none;
}

.modal-dialog {
  width: 100%;
  max-width: 500px;
  background-color: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.28);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 44px;
  background-color: #0f172a;
  border-bottom: 3px solid #16a34a;
  color: #ffffff;
}

.modal-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.modal-close-x {
  position: absolute;
  right: 10px;
  top: 8px;
  width: 28px;
  height: 26px;
  border: none;
  border-radius: 6px;
  background-color: transparent;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.modal-close-x:hover {
  background-color: #dc2626;
  color: #ffffff;
}

.modal-body {
  padding: 14px;
}

.modal-body-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
}

.modal-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-icon-info {
  background-color: #0f172a;
}

.modal-icon-warn {
  background-color: #d97706;
}

.modal-icon-error {
  background-color: #dc2626;
}

.modal-message {
  margin: 0;
  flex: 1;
  max-height: 280px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.5;
  color: #0f172a;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  padding: 0 14px 14px 14px;
}

.btn-modal-ok {
  min-width: 96px;
  height: 36px;
  border: none;
  border-radius: 7px;
  background-color: #15803d;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.btn-modal-ok:hover {
  background-color: #166534;
}

/* 페이지 2: 관리동 조회 */
.dong-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  min-height: 0;
  position: relative;
}

.dong-toolbar-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

.dong-toolbar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.dong-export-pill {
  display: inline-flex;
  align-items: stretch;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(22, 163, 74, 0.45);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.btn-dong-export {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 13px;
  border: none;
  background-color: #15803d;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}

.btn-dong-export:hover:not(:disabled) {
  background-color: #166534;
}

.btn-dong-export:disabled {
  background-color: #94a3b8;
  cursor: not-allowed;
}

.btn-dong-export-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.dong-count-badge {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  background-color: #dcfce7;
  color: #166534;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.dong-filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.dong-search-input {
  flex: 1;
  min-width: 220px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  color: #0f172a;
  background-color: #ffffff;
}

.dong-search-input:focus {
  outline: 2px solid #16a34a;
  outline-offset: -1px;
}

.dong-team-select {
  height: 32px;
  min-width: 140px;
}

.dong-table-card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.dong-table-wrap {
  flex: 1;
  overflow: auto;
}

.dong-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.dong-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background-color: #d9e1f2;
  color: #0f172a;
  font-weight: 700;
  padding: 9px 10px;
  border-bottom: 1px solid #94a3b8;
  text-align: center;
  white-space: nowrap;
}

.dong-table tbody td {
  padding: 8px 10px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
}

.dong-table tbody tr:hover {
  background-color: #f8fafc;
}

.dong-table .col-no {
  width: 54px;
  text-align: center;
  color: #64748b;
}

.dong-table .col-dongno {
  width: 110px;
  text-align: center;
  font-weight: 700;
}

.dong-table .col-road {
  text-align: left;
}

.dong-table .col-jibun {
  width: 160px;
  text-align: center;
  color: #dc2626;
  font-weight: 700;
  white-space: nowrap;
}

.dong-table .col-team,
.dong-table .col-team-insp {
  width: 132px;
  text-align: center;
}

.dong-insp-sub {
  margin-top: 2px;
  font-size: 11px;
  color: #475569;
  white-space: nowrap;
}

.dong-table .col-handover {
  width: 88px;
  text-align: center;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
}

.dong-table .col-elev-no {
  width: 112px;
  text-align: center;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
}

.dong-table .col-elev-vendor {
  min-width: 120px;
  text-align: center;
  color: #334155;
  white-space: pre-line;
}

.dong-table .col-contact {
  min-width: 210px;
  text-align: left;
  white-space: pre-line;
  line-height: 1.45;
  color: #1e293b;
}

.dong-table .col-note {
  min-width: 190px;
  text-align: left;
  white-space: pre-line;
  line-height: 1.45;
  color: #475569;
}

.dong-table .col-note.note-red {
  color: #dc2626;
  font-weight: 700;
}

.dong-table .col-copy {
  width: 64px;
  text-align: center;
}

.dong-team-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background-color: #dcfce7;
  color: #166534;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.dong-team-badge.unassigned {
  background-color: #f1f5f9;
  color: #64748b;
}

.btn-row-copy {
  height: 24px;
  padding: 0 9px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background-color: #ffffff;
  color: #0f172a;
  font-size: 11.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.btn-row-copy:hover {
  background-color: #f1f5f9;
  border-color: #16a34a;
}

.dong-empty-cell {
  text-align: center;
  padding: 36px 12px !important;
  color: #64748b;
}

.copy-toast.hidden {
  display: none;
}

.copy-toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 1200;
  padding: 9px 14px;
  border-radius: 8px;
  background-color: #0f172a;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.24);
}

/* 페이지 3: 주소변환기 (안 1: 좌우 2단 분할형) */
.addr-workspace {
  flex: 1;
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  min-height: 0;
  overflow: hidden;
}

.addr-left {
  width: 440px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
}

.addr-right {
  flex: 1;
  min-width: 340px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.addr-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.addr-line-count {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
}

.addr-textarea {
  width: 100%;
  height: 220px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background-color: #f8fafc;
  color: #0f172a;
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1.6;
  resize: vertical;
}

.addr-textarea:focus {
  outline: 2px solid #16a34a;
  outline-offset: -1px;
  background-color: #ffffff;
}

.addr-input-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

.addr-hint {
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.35;
}

.btn-api-key {
  height: 24px;
  padding: 0 9px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  background-color: #f8fafc;
  color: #334155;
  font-size: 11.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.btn-api-key:hover {
  background-color: #e2e8f0;
  color: #0f172a;
}

.addr-format-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.addr-fmt-btn {
  height: 32px;
  padding: 0 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background-color: #ffffff;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.addr-fmt-btn:hover {
  border-color: #16a34a;
}

.addr-fmt-btn.active {
  background-color: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.addr-result-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 11px 14px;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.dong-table .col-addr-src {
  width: 78px;
  text-align: center;
}

.dong-table .col-addr-in {
  min-width: 150px;
  text-align: left;
  color: #64748b;
}

.dong-table .col-addr-road {
  min-width: 200px;
  text-align: left;
  color: #0f172a;
  font-weight: 600;
}

.dong-table .col-addr-jibun {
  min-width: 165px;
  text-align: left;
  color: #dc2626;
  font-weight: 700;
  white-space: nowrap;
}

.addr-source-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.addr-source-badge.dong {
  background-color: #dcfce7;
  color: #166534;
}

.addr-source-badge.ext {
  background-color: #e0f2fe;
  color: #075985;
}

.addr-source-badge.none {
  background-color: #f1f5f9;
  color: #64748b;
}

/* 좁은 화면 대응 */
@media (max-width: 1024px) {
  body {
    height: auto;
  }

  .workspace,
  .addr-workspace {
    flex-direction: column;
    overflow: visible;
  }

  .left-panel,
  .addr-left {
    width: 100%;
    overflow: visible;
  }

  .right-panel,
  .addr-right {
    min-width: 0;
    min-height: 560px;
  }
}

@media (max-width: 900px) {
  .app-header {
    display: flex;
    flex-wrap: wrap;
    height: auto;
    padding: 8px 12px;
    gap: 8px;
  }

  .top-nav {
    order: 3;
    width: 100%;
    height: 36px;
    justify-content: center;
  }
}
