.search-panel {
    position: absolute;
    /* 필터 패널 아래에 위치 - JavaScript에서 동적으로 top 설정됨 */
    top: 70px;
    left: 0;
    z-index: 10;
    background: white;
    padding: 10px 12px;
    border-radius: 8px;
    /* 위쪽으로 번지는 그림자를 줄여, 상단(필터 패널)과 붙어도 경계가 과하게 겹쳐 보이지 않게 */
    box-shadow: 0 10px 18px -14px rgba(0, 0, 0, 0.35);
    /* 검색/선택 시에도 패널 폭이 자동으로 넓어지지 않도록 고정 */
    width: 320px;
    min-width: 320px;
    max-width: 320px;
    min-height: 0;
    max-height: calc(100vh - 90px);
    resize: none;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    transform: scale(var(--ui-scale, 1));
    transform-origin: top left;
}

.search-panel h2 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
}

.search-input-wrap {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    box-sizing: border-box;
    /* 1줄 시작(여유 픽셀을 둬서 아이콘 버튼이 보더를 침범해 보이지 않게) */
    min-height: 38px;
    max-height: 180px; /* 너무 커지지 않게 */
    padding: 8px 86px 8px 10px; /* 오른쪽 버튼(리셋+검색) 공간 확보 */
    border: 1px solid #ddd;
    font-size: 14px;
    line-height: 18px;
    resize: none; /* 패널 리사이즈로 대응 */
    overflow: hidden; /* auto-grow용 */
}

.search-inline-btn {
    position: absolute;
    /* 세로 중앙 정렬(보더 침범 방지) */
    top: 50%;
    transform: translateY(-50%);
    /* ui-scale(소수점) 적용 시 픽셀 라운딩으로 아래가 붙어 보이는 현상 보정 */
    margin-top: -1px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    background: #f5f5f5;
    cursor: pointer;
    color: #333;
    font-size: 16px;
    line-height: 1;
}

.search-inline-btn:hover {
    background: #e8e8e8;
}

.search-reset-inline-btn {
    right: 44px; /* 돋보기 버튼 왼쪽 */
}

.search-go-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    /* ui-scale(소수점) 적용 시 픽셀 라운딩으로 아래가 붙어 보이는 현상 보정 */
    margin-top: -1px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    background: #f5f5f5;
    cursor: pointer;
    color: #333;
}

.search-go-btn:hover {
    background: #e8e8e8;
}

.search-group {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.search-group input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.search-group button {
    padding: 10px 20px;
    background: #1976d2;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.result-panel {
    margin-top: 6px;
    background: #fafafa;
    padding: 0;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    width: 100%;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.result-panel.embedded {
    position: static;
    box-shadow: none;
}

#resultList {
    display: flex;
    flex-direction: column;
    gap: 0; /* 결과 아이템은 붙여서 */
}

.result-item {
    padding: 8px;
    margin: 0;
    border: 1px solid #e0e0e0;
    border-left: 0;
    border-radius: 0;
    cursor: pointer;
    transition: none;
    /* 긴 문자열 때문에 패널 폭이 밀리는 걸 방지 */
    overflow-wrap: anywhere;
    word-break: break-word;
}

.result-item:not(:last-child) {
    border-bottom: 0; /* 아이템 사이 이중 라인 제거 */
}

.result-item:hover {
    background: transparent;
}

.result-item.active {
    background: #f5f5f5;
    box-shadow: none;
}

/* 투박한 결과 행 레이아웃 */
.result-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-title {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    font-weight: 700;
    color: #222;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.result-actions {
    display: flex;
    gap: 4px;
    margin-top: 4px;
}

.result-summary {
    margin-top: 4px;
    font-size: 11px;
    color: #333;
}

.result-info-plain {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #eee;
    font-size: 11px;
    color: #333;
}

.result-color-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    flex-shrink: 0;
}

.color-picker-wrapper {
    position: relative;
    margin-right: 8px;
    flex-shrink: 0;
}

.color-picker-current {
    width: 24px;
    height: 24px;
    border: 1px solid rgba(0,0,0,0.2);
    border-radius: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.color-picker-current:hover {
    border-color: rgba(0,0,0,0.4);
}

.color-number {
    font-size: 12px;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    pointer-events: none; /* 클릭이 부모(.color-picker-current)로 전달되도록 */
}

.color-picker-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
    background: white;
    border: 1px solid #ddd;
    border-radius: 0;
    padding: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    margin-top: 2px;
}

.color-picker-dropdown.open {
    display: grid;
}

.color-option {
    width: 20px;
    height: 20px;
    border-radius: 0;
    cursor: pointer;
    border: 2px solid transparent;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option[data-selected="true"] {
    border-color: #333;
}

.result-header {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.result-actions {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}

.result-link-btn {
    flex: 0 0 auto;
    width: 34px;
    padding: 4px 0;
    border-radius: 0;
    border: 1px solid #c5cae9;
    background: white;
    color: #1a237e;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.result-link-btn.land {
    border-color: #a5d6a7;
    background: white;
    color: #2E75B6;
}

.result-link-btn.building {
    border-color: #ffcc80;
    background: white;
    color: #FF0000;
}

.result-link-btn:hover {
    opacity: 0.9;
}

.result-address {
    font-size: 12px;
    color: #666;
}

.result-info {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    font-size: 12px;
}

.info-item {
    color: #555;
}

.info-label {
    color: #999;
    margin-right: 4px;
}

.result-error {
    font-size: 12px;
    color: #f44336;
    margin-top: 4px;
}

.result-details {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e0e0e0;
    font-size: 12px;
    display: none;
}

.result-details.expanded {
    display: block;
}

.streetview-panel {
    position: absolute;
    bottom: 15px;
    right: 15px;
    z-index: 10;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    width: 480px;
    height: 320px;
    min-width: 300px;
    min-height: 200px;
    max-width: 80vw;
    max-height: 70vh;
    display: none;
    overflow: hidden;
    transform: scale(var(--ui-scale, 1));
    transform-origin: bottom right;
}

.streetview-panel.visible {
    display: flex;
    flex-direction: column;
}

.streetview-resize-handle {
    position: absolute;
    top: 0;
    left: 0;
    width: 24px;
    height: 24px;
    cursor: nw-resize;
    z-index: 100;
    background: linear-gradient(135deg, #999 25%, transparent 25%, transparent 50%, #999 50%, #999 75%, transparent 75%);
    background-size: 4px 4px;
    border-radius: 8px 0 0 0;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.streetview-resize-handle:hover {
    opacity: 1;
    background: linear-gradient(135deg, #666 25%, transparent 25%, transparent 50%, #666 50%, #666 75%, transparent 75%);
    background-size: 4px 4px;
}

.streetview-header {
    padding: 12px 20px 12px 32px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.streetview-header h3 {
    font-size: 14px;
    margin: 0;
    color: #333;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 40px);
}

.close-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #333;
}

.streetview-container {
    width: 100%;
    flex: 1;
    position: relative;
    min-height: 0;
}

/* 건축물 정보 패널 */
.building-info-panel {
    position: absolute;
    /* JavaScript에서 동적으로 위치 조정됨 (검색 패널 오른쪽, 동일한 top) */
    top: 70px;
    left: 395px;
    z-index: 10;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    /* 필요 이상으로 넓어지지 않도록: 내용 기준으로 가능한 한 좁게(=최소 너비), 필요할 때만 확장 */
    width: fit-content;
    min-width: 360px;
    max-width: min(520px, calc(100vw - 30px));
    max-height: calc(100vh - 90px);
    display: none;
    flex-direction: column;
    /* UI 스케일 적용 (검색 패널과 동일한 방식) */
    transform: scale(var(--ui-scale, 1));
    transform-origin: top left;
}

.building-info-panel.visible {
    display: flex;
}

.building-info-header {
    padding: 12px 16px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    background: #f5f5f5;
    border-radius: 8px 8px 0 0;
}

.building-info-header h3 {
    font-size: 15px;
    margin: 0;
    color: #333;
}

.building-info-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.building-info-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 주소 */
.building-address {
    font-size: 14px;
    font-weight: 600;
    color: #1976d2;
    padding: 10px 12px;
    background: #e3f2fd;
    border-radius: 6px;
    margin-bottom: 4px;
    /* 긴 주소/건물명도 좌우 드래그 없이 보이도록 줄바꿈 */
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
    word-break: keep-all;
}

/* 기본 정보(테이블) 섹션 */
.building-basic-section {
    margin-top: 8px;
}

.building-basic-section h4 {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
    padding-bottom: 6px;
    border-bottom: 2px solid #1976d2;
}

.building-table-wrapper {
    /* 기본정보는 가로 스크롤 대신 줄바꿈으로 보여주기 */
    overflow-x: hidden;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.building-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    table-layout: fixed;
}

.building-table col.label {
    width: 18%;
}
.building-table col.value {
    width: 32%;
}

.building-table th {
    padding: 8px 8px;
    text-align: left;
    font-weight: 600; /* 제목만 bold */
    color: #333;
    border-bottom: 1px solid #ddd;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: keep-all;
}

.building-table td {
    padding: 8px 8px;
    text-align: right;
    font-weight: 400; /* 내용은 bold 없이 */
    color: #444;
    border-bottom: 1px solid #f0f0f0;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.building-table td.span-cell {
    text-align: left;
}

.building-table tbody tr:hover {
    background: #f8f9fa;
}

/* 정보 그리드 */
.building-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.building-info-grid .info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background: #fafafa;
    border-radius: 4px;
    font-size: 12px;
}

.building-info-grid .info-key {
    color: #666;
    font-weight: 500;
}

.building-info-grid .info-value {
    color: #333;
    font-weight: 600;
    text-align: right;
}

/* 층별 정보 섹션 */
.floor-section {
    margin-top: 8px;
}

.floor-section h4 {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
    padding-bottom: 6px;
    border-bottom: 2px solid #1976d2;
}

.floor-table-wrapper {
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.floor-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.floor-table thead {
    position: sticky;
    top: 0;
    background: #f5f5f5;
    z-index: 1;
}

.floor-table th {
    padding: 8px 6px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #ddd;
}

.floor-table td {
    padding: 6px;
    border-bottom: 1px solid #f0f0f0;
    color: #444;
}

.floor-table tbody tr:hover {
    background: #f8f9fa;
}

.floor-table .etc-purps {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #888;
}

.floor-table .area {
    text-align: right;
    font-family: 'Roboto Mono', monospace;
}

.building-info-container .no-data {
    color: #999;
    font-size: 13px;
    text-align: center;
    padding: 20px;
    margin: 0;
}

/* 이전 스타일 (호환성) */
.building-section {
    background: #fafafa;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.building-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1976d2;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #1976d2;
}

.building-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.building-details div {
    font-size: 13px;
    color: #333;
    line-height: 1.5;
}

.building-details strong {
    display: inline-block;
    width: 120px;
    color: #666;
    font-weight: 600;
}

.building-section .no-data {
    color: #999;
    font-size: 13px;
    text-align: center;
    padding: 10px;
    margin: 0;
}

.building-section .error-data {
    color: #f44336;
    font-size: 13px;
    padding: 10px;
    margin: 0;
}


/* 실거래가 패널 */
.realestate-panel {
    position: absolute;
    bottom: 20px;
    left: 15px;
    z-index: 10;
    background: white;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    transform: scale(var(--ui-scale, 1));
    transform-origin: bottom left;
}

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

.realestate-header .toggle-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}

.realestate-header .toggle-label input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.month-select {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}

.realestate-filters {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    cursor: pointer;
}

.filter-item input {
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.filter-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

/* 실거래가 마커 */
.realestate-marker {
    padding: 4px 8px;
    border-radius: 4px;
    background: white;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 50px;
    text-align: center;
}

.realestate-marker:hover {
    transform: scale(1.1);
    z-index: 100;
}

.realestate-marker .marker-price {
    font-size: 12px;
    font-weight: 700;
}

.realestate-marker .marker-name {
    font-size: 9px;
    font-weight: 400;
    opacity: 0.9;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 거래내역 패널 */
.trade-history-panel {
    margin-top: 15px;
    border-top: 1px solid #e0e0e0;
    padding-top: 15px;
}

.trade-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.trade-history-header h3 {
    font-size: 14px;
    margin: 0;
    color: #333;
}

.trade-history-list {
    max-height: 200px;
    overflow-y: auto;
}

.trade-history-item {
    display: grid;
    grid-template-columns: 80px 60px 50px 1fr;
    gap: 8px;
    padding: 8px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 12px;
    align-items: center;
}

.trade-history-item:last-child {
    border-bottom: none;
}

.trade-history-item .trade-date {
    color: #666;
}

.trade-history-item .trade-dong {
    color: #888;
}

.trade-history-item .trade-floor {
    color: #888;
}

.trade-history-item .trade-price {
    font-weight: 600;
    color: var(--trade-accent, #00C8B4);
    text-align: right;
}

.trade-history-item .trade-area {
    color: #666;
    font-size: 11px;
}

/* 가격 토글 버튼 */
.trade-price-toggle {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
}

.price-toggle-btn {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid #ddd;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
}

.price-toggle-btn:hover {
    background: #e8e8e8;
}

.price-toggle-btn.active {
    background: #1976d2;
    color: white;
    border-color: #1976d2;
}

/* 필터 모달 */
.filter-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.filter-modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    min-width: 300px;
    max-width: 400px;
    max-height: 80vh;
    overflow: auto;
}

.filter-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.filter-modal-header h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.filter-modal-body {
    padding: 20px;
}

.filter-section {
    margin-bottom: 20px;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-section h4 {
    margin: 0 0 12px 0;
    font-size: 13px;
    color: #666;
    font-weight: 600;
}

/* 필터 버튼 그리드 (2x2) */
.filter-button-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.filter-type-btn {
    padding: 16px 20px;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: white;
    text-align: center;
    transition: all 0.2s;
    position: relative;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-type-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.filter-type-btn[data-active="false"] {
    opacity: 0.3;
    filter: grayscale(100%);
}

.filter-type-btn[data-active="true"] {
    opacity: 1;
    border-color: rgba(255, 255, 255, 0.5);
}

.filter-btn-label {
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    cursor: pointer;
    font-size: 14px;
}

.filter-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.filter-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.filter-item.disabled input[type="checkbox"] {
    cursor: not-allowed;
}

.filter-color {
    width: 14px;
    height: 14px;
    border-radius: 3px;
}

/* 필터 버튼 패널 */
.filter-panel {
    position: absolute;
    /* 검색 패널 위에 위치 - JavaScript에서 동적으로 설정됨 */
    top: 20px;
    left: 0;
    z-index: 11;
    background: white;
    padding: 8px 12px;
    border-radius: 8px;
    /* 아래로만 살짝 떨어지는 느낌(검색 패널과 붙어도 겹침 최소화) */
    box-shadow: 0 10px 18px -14px rgba(0, 0, 0, 0.35);
    transform: scale(var(--ui-scale, 1));
    transform-origin: top left;
    display: flex;
    align-items: center;
    gap: 8px;
}

.realestate-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    line-height: 1;
}

.realestate-toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
    accent-color: #1976d2;
    vertical-align: middle;
}

.realestate-toggle span {
    vertical-align: middle;
    line-height: 16px;
}

.filter-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid #ddd;
    background: #f5f5f5;
    border-radius: 4px;
    cursor: pointer;
    color: #666;
    transition: all 0.2s;
}

.filter-icon-btn:hover {
    background: #e0e0e0;
    color: #333;
}

.filter-open-btn {
    padding: 10px 20px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.filter-open-btn:hover {
    background: #43A047;
}

/* 거래유형 토글 (매매/전세/월세) */
.trade-type-toggle {
    display: flex;
    gap: 4px;
    margin-bottom: 15px;
}

.trade-type-btn {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.trade-type-btn:hover:not(:disabled) {
    background: #e8e8e8;
}

.trade-type-btn.active {
    background: #1976d2;
    color: white;
    border-color: #1976d2;
}

.trade-type-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 거래 요약 (최근 가격) */
.trade-summary {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 15px;
}

.trade-apt-name {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.trade-latest-price {
    font-size: 28px;
    font-weight: 700;
    color: var(--trade-accent, #00C8B4);
    margin-bottom: 4px;
}

.trade-latest-date {
    font-size: 12px;
    color: #999;
}

/* 거래내역 섹션 */
.trade-detail-section h4 {
    font-size: 13px;
    color: #333;
    margin: 0 0 10px 0;
    font-weight: 600;
}
