.region-search {
    background: #fff;
    border: 1px solid #dce4df;
    border-radius: 12px;
    padding: 24px;
    margin: 24px 0;
}

.region-search h2 {
    font-size: 21px;
    margin: 0 0 8px;
    color: #203d30;
}

.region-description {
    color: #68756d;
    font-size: 14px;
    margin-bottom: 20px;
}

.region-select-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.region-field {
    flex: 1 1 160px;
    min-width: 0;
}

.region-field[hidden] {
    display: none !important;
}

.region-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 7px;
}

.region-field select {
    width: 100%;
    height: 46px;
    padding: 0 12px;
    border: 1px solid #ccd6cf;
    border-radius: 6px;
    background: #fff;
    font-size: 15px;
    box-sizing: border-box;
}

.region-field select:disabled {
    background: #f3f5f3;
    color: #999;
}

.region-search-button {
    width: 100%;
    margin-top: 16px;
    padding: 13px;
    background: #246345;
    color: #fff;
    border: 0;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.region-search-button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

#region-status {
    color: #68756d;
    font-size: 13px;
    margin: 10px 0 0;
}

#region-status:empty {
    display: none;
}

@media (max-width: 600px) {
    .region-search {
        padding: 16px;
    }

    .region-field {
        flex-basis: 100%;
    }
}


.region-results-grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fit, minmax(min(100%, 300px), 1fr)
    );
    gap: 14px;
    margin-top: 20px;
}

.region-result-card {
    padding: 18px;
    border: 1px solid #dce4df;
    border-radius: 8px;
    background: #fff;
}

.region-result-card h3 {
    margin: 0 0 8px;
    font-size: 16px;
    color: #203d30;
}

.region-result-pnu {
    font-size: 12px;
    color: #77847b;
    overflow-wrap: anywhere;
}

.region-result-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 14px 0;
    border-top: 1px solid #edf0ed;
    font-size: 14px;
}

.region-result-price strong {
    color: #246345;
}

.region-detail-link {
    display: block;
    padding: 11px;
    border-radius: 6px;
    background: #edf4ef;
    color: #246345;
    text-align: center;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.region-detail-link:hover {
    background: #246345;
    color: #fff;
}

.region-pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 25px;
}

.region-pagination a {
    padding: 9px 13px;
    border: 1px solid #dce4df;
    border-radius: 5px;
    color: #246345;
    text-decoration: none;
}

.region-pagination a.active {
    background: #246345;
    color: #fff;
}


/* 지역별 토지 검색 리스트 */

.region-table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-top: 20px;
}

.region-results-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
    font-size: 14px;
}

.region-results-table th {
    padding: 13px 12px;
    background: #f1f5f2;
    color: #345342;
    border-top: 2px solid #246345;
    border-bottom: 1px solid #dce4df;
    font-weight: 600;
    white-space: nowrap;
    text-align: center;
}

.region-results-table td {
    padding: 12px;
    border-bottom: 1px solid #e5eae6;
    vertical-align: middle;
}

.region-results-table tbody tr:hover {
    background: #f5f9f6;
}

.region-row-number {
    width: 45px;
    text-align: center;
    color: #879189;
}

.region-address {
    min-width: 250px;
}

.region-address a {
    color: #203d30;
    text-decoration: none;
    font-weight: 600;
}

.region-address a:hover {
    color: #246345;
    text-decoration: underline;
}

.region-address small {
    display: block;
    margin-top: 4px;
    color: #89938c;
    font-size: 11px;
    font-weight: 400;
}

.region-price {
    text-align: right;
    white-space: nowrap;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.region-price-date {
    text-align: center;
    white-space: nowrap;
    color: #77847b;
}

.region-detail-cell {
    text-align: center;
    white-space: nowrap;
}

.region-list-detail {
    display: inline-block;
    padding: 7px 12px;
    background: #edf4ef;
    color: #246345;
    border: 1px solid #dce7df;
    border-radius: 5px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
}

.region-list-detail:hover {
    background: #246345;
    color: #fff;
}

.region-empty {
    text-align: center;
    padding: 30px !important;
    color: #77847b;
}


/* 확장된 지역별 토지 리스트 */

.region-results-table {
    min-width: 1180px;
    font-size: 13px;
}

.region-results-table th {
    padding: 12px 9px;
}

.region-results-table td {
    padding: 11px 9px;
}

.region-address {
    min-width: 220px;
}

.region-center {
    text-align: center;
    white-space: nowrap;
}

.region-number {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.region-count {
    color: #a0aaa3;
    font-variant-numeric: tabular-nums;
}

.region-count.has-count {
    color: #246345;
    font-weight: 700;
}

.region-results-table form {
    margin: 0;
}

.region-address-button {
    border: 0;
    padding: 0;
    background: transparent;
    color: #203d30;
    font: inherit;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.region-address-button:hover {
    color: #246345;
    text-decoration: underline;
}

button.region-list-detail {
    cursor: pointer;
    font-family: inherit;
}

.region-list-note {
    margin-top: 12px;
    font-size: 12px;
    color: #77847b;
}


/* DB 기반 지역 상세 검색 */

.region-db-info,
.region-api-info {
    padding: 12px 15px;
    margin: 16px 0;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.6;
}

.region-db-info {
    background: #edf4ef;
    color: #345342;
}

.region-api-info {
    background: #f5f6f5;
    color: #68756d;
}

.region-filter-form {
    padding: 20px;
    border: 1px solid #dce4df;
    border-radius: 8px;
    background: #fafcfb;
    margin: 18px 0;
}

.region-filter-heading {
    font-size: 16px;
    font-weight: 700;
    color: #203d30;
    margin-bottom: 18px;
}

.region-filter-group {
    margin-bottom: 18px;
}

.region-filter-group strong {
    display: block;
    font-size: 13px;
    margin-bottom: 10px;
}

.region-checkbox-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}

.region-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    cursor: pointer;
}

.region-checkbox input {
    accent-color: #246345;
    margin: 0;
}

.region-filter-grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fit, minmax(min(100%, 220px), 1fr)
    );
    gap: 16px;
}

.region-filter-field {
    min-width: 0;
}

.region-filter-field > label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 7px;
}

.region-filter-field input,
.region-filter-field select {
    width: 100%;
    min-width: 0;
    height: 40px;
    padding: 0 10px;
    border: 1px solid #ccd6cf;
    border-radius: 5px;
    background: #fff;
    box-sizing: border-box;
    font-size: 13px;
}

.region-range {
    display: flex;
    align-items: center;
    gap: 7px;
}

.region-range input {
    flex: 1;
    width: 0;
}

.region-filter-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e0e7e2;
}

.region-filter-checks,
.region-filter-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.region-filter-submit,
.region-filter-reset {
    padding: 10px 25px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.region-filter-submit {
    border: 1px solid #246345;
    background: #246345;
    color: #fff;
}

.region-filter-reset {
    border: 1px solid #ccd6cf;
    background: #fff;
    color: #345342;
}

.region-results-table {
    min-width: 1280px;
}

@media (max-width: 600px) {

    .region-filter-form {
        padding: 14px;
    }

    .region-filter-grid {
        grid-template-columns: 1fr;
    }

    .region-filter-actions {
        width: 100%;
    }

    .region-filter-submit,
    .region-filter-reset {
        flex: 1;
        text-align: center;
    }

}


/* 지역 자동 수집 진행 상태 */

.region-sync-panel {
    padding: 20px;
    margin: 18px 0;
    background: #f5f9f6;
    border: 1px solid #dce7df;
    border-radius: 8px;
}

.region-sync-panel[hidden] {
    display: none !important;
}

.region-sync-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    color: #246345;
    font-size: 15px;
}

#region-sync-percent {
    font-size: 20px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.region-sync-progress {
    display: block;
    width: 100%;
    height: 10px;
    appearance: none;
    border: 0;
    border-radius: 6px;
    overflow: hidden;
    background: #dce7df;
    accent-color: #246345;
}

.region-sync-progress::-webkit-progress-bar {
    background: #dce7df;
    border-radius: 6px;
}

.region-sync-progress::-webkit-progress-value {
    background: #246345;
    border-radius: 6px;
    transition: width .3s ease;
}

.region-sync-progress::-moz-progress-bar {
    background: #246345;
}

#region-sync-message {
    margin: 12px 0 5px;
    font-size: 13px;
    color: #345342;
}

.region-sync-description {
    margin: 5px 0 0;
    font-size: 12px;
    color: #77847b;
    line-height: 1.6;
}

.region-sync-panel[data-status="failed"],
.region-sync-panel[data-status="queue_full"] {
    background: #fff8f3;
    border-color: #e8d7c8;
}

