:root {
    --bg: #0f1117;
    --surface: #1a1d27;
    --surface-hover: #22263a;
    --border: #2a2e3f;
    --text: #e4e6ef;
    --text-muted: #8b8fa3;
    --accent: #6c72cb;
    --accent-hover: #8288e0;
    --success: #4ade80;
    --warning: #fbbf24;
    --danger: #f87171;
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

header {
    text-align: center;
    padding: 2rem 1rem 1rem;
    background: linear-gradient(135deg, #1a1d27 0%, #22263a 100%);
    border-bottom: 1px solid var(--border);
}

header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #6c72cb, #cb69c1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* 탭 네비게이션 */
.tab-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0;
}

.tab-btn {
    padding: 0.6rem 1.5rem;
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: var(--radius) var(--radius) 0 0;
    background: var(--bg);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: var(--text);
    background: var(--surface-hover);
}

.tab-btn.active {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border);
}

main {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transition: max-width 0.3s ease;
}

main.panel-open {
    max-width: 1400px;
}

/* 매물 목록 + 사이드패널 그리드 */
.property-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    transition: grid-template-columns 0.3s ease;
}

.property-layout.with-panel {
    grid-template-columns: 2fr 3fr;
}

/* 사이드 패널 */
.property-detail-panel {
    overflow-y: auto;
    max-height: 80vh;
    position: sticky;
    top: 1rem;
    animation: fadeIn 0.3s;
}

.panel-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.panel-tab {
    padding: 0.4rem 0.8rem;
    font-size: 0.82rem;
    font-weight: 600;
    border: 1px solid var(--border);
    border-radius: var(--radius) var(--radius) 0 0;
    background: var(--bg);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.panel-tab:hover {
    color: var(--text);
    background: var(--surface-hover);
}

.panel-tab.active {
    background: var(--surface);
    color: var(--text);
    border-bottom-color: var(--surface);
}

.panel-content {
    font-size: 0.85rem;
}

.panel-placeholder {
    color: var(--text-muted);
    text-align: center;
    padding: 2rem 0;
}

/* 패널 내 detail-grid 재사용 */
.panel-content .detail-grid {
    grid-template-columns: 1fr 1fr;
    padding: 0;
}


.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.card h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-header h2 {
    margin-bottom: 0;
}

.form-row {
    margin-bottom: 0.75rem;
}

.form-row label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.form-row input,
.form-row select,
.form-row textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #cb69c1);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 114, 203, 0.4);
}

.btn-sync {
    background: var(--surface-hover);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-sync:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.btn-sm {
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
}

.btn-danger {
    background: transparent;
    color: var(--danger);
    border: 1px solid var(--danger);
}

.btn-danger:hover {
    background: var(--danger);
    color: white;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    text-align: left;
    padding: 0.6rem 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

tbody tr {
    transition: background 0.15s;
}

tbody tr:hover {
    background: var(--surface-hover);
}

tbody td {
    padding: 0.6rem 0.5rem;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(42, 46, 63, 0.5);
}

.sync-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.sync-badge.synced {
    background: rgba(74, 222, 128, 0.15);
    color: var(--success);
}

.sync-badge.unsynced {
    background: rgba(251, 191, 36, 0.15);
    color: var(--warning);
}

.sync-status {
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    animation: fadeIn 0.3s;
}

.sync-status.success {
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.3);
    color: var(--success);
}

.sync-status.error {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: var(--danger);
}

.actions {
    display: flex;
    gap: 0.3rem;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.role-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.role-checkboxes label {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.82rem;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
}

.role-checkboxes label:hover {
    border-color: var(--accent);
    background: var(--surface-hover);
}

.role-checkboxes input[type="checkbox"] {
    width: auto;
    accent-color: var(--accent);
}

.search-bar {
    margin-bottom: 0.75rem;
}

.search-bar input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--accent);
}

.role-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.btn-filter {
    padding: 0.3rem 0.7rem;
    font-size: 0.8rem;
    border-radius: 999px;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-filter:hover {
    border-color: var(--accent);
    color: var(--text);
}

.btn-filter.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.status-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
    align-items: center;
}

.btn-filter-status {
    padding: 0.3rem 0.7rem;
    font-size: 0.8rem;
    border-radius: 999px;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-filter-status:hover {
    border-color: var(--success);
    color: var(--text);
}

.btn-filter-status.active {
    background: var(--success);
    color: #0f1117;
    border-color: var(--success);
}

.role-group-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
}

.btn-small {
    padding: 0.3rem 0.7rem;
    font-size: 0.8rem;
    font-family: inherit;
    border-radius: 8px;
    background: var(--surface-hover);
    color: var(--text);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-small:hover {
    border-color: var(--accent);
}

.rent-option-row {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
    margin-bottom: 0.5rem;
}

/* 편집 모달 */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s;
}

.modal-content {
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s;
}

.modal-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-cancel {
    background: var(--surface-hover);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.btn-cancel:hover {
    background: var(--border);
    color: var(--text);
}

.btn-edit {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}

.btn-edit:hover {
    background: var(--accent);
    color: white;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 상세보기 Expandable Row */
.detail-row td {
    padding: 0 !important;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1.5rem;
    padding: 1rem 1.5rem;
    animation: fadeIn 0.2s;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(42, 46, 63, 0.3);
}

.detail-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
}

.detail-value {
    font-size: 0.85rem;
    color: var(--text);
    text-align: right;
}

.detail-row:hover td {
    background: var(--bg);
}

.detail-section-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin: 1.5rem 0 0.5rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border);
}
.detail-section-title:first-child {
    margin-top: 0;
}

.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-source {
    background: rgba(108, 114, 203, 0.15);
    color: var(--accent);
}

.badge-status {
    background: rgba(74, 222, 128, 0.15);
    color: var(--success);
}

/* 주소 검색 결과 드롭다운 */
.address-item {
    cursor: pointer;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

.address-item:hover {
    background: var(--surface-hover);
}

.address-item:active {
    background: var(--accent);
    transform: scale(0.99);
}

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

/* 연락처 연결 표시 */
.contact-display {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.7rem;
    background: rgba(108, 114, 203, 0.15);
    border: 1px solid var(--accent);
    border-radius: 999px;
    font-size: 0.85rem;
    color: var(--text);
}

.btn-contact-clear {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    padding: 0 0.2rem;
    line-height: 1;
    transition: color 0.2s;
}

.btn-contact-clear:hover {
    color: var(--danger);
}

.contact-link-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

/* 매물 상태 필터 */
.property-status-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
    align-items: center;
}

.btn-filter-prop-status {
    padding: 0.3rem 0.7rem;
    font-size: 0.8rem;
    border-radius: 999px;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-filter-prop-status:hover {
    border-color: var(--accent);
    color: var(--text);
}

.btn-filter-prop-status.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* 매물 상태 배지 */
.badge-prop-status {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-prop-received {
    background: rgba(108, 114, 203, 0.15);
    color: var(--accent);
}

.badge-prop-advertising {
    background: rgba(74, 222, 128, 0.15);
    color: var(--success);
}

.badge-prop-on_hold {
    background: rgba(251, 191, 36, 0.15);
    color: var(--warning);
}

.badge-prop-in_contract {
    background: rgba(96, 165, 250, 0.15);
    color: #60a5fa;
}

.badge-prop-completed {
    background: rgba(139, 143, 163, 0.15);
    color: var(--text-muted);
}

.badge-prop-closed {
    background: rgba(248, 113, 113, 0.1);
    color: var(--danger);
}

.badge-prop-available {
    background: rgba(52, 211, 153, 0.15);
    color: #34d399;
}

.badge-prop-contracted {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
}

.badge-prop-withdrawn {
    background: rgba(156, 163, 175, 0.15);
    color: #9ca3af;
}

/* 건축물대장 한 줄 요약 */
.building-summary {
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    background: rgba(108, 114, 203, 0.08);
    border: 1px solid rgba(108, 114, 203, 0.2);
    color: var(--text-muted);
    animation: fadeIn 0.3s;
}

/* 사이드패널 카드 렌더링 */
.panel-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 0.75rem;
    animation: fadeIn 0.2s;
}

.panel-card-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.6rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border);
}

/* ══════════════════════════════════════════
   칸반 보드 (Phase 5-C T37)
══════════════════════════════════════════ */

/* 칸반 탭 영역 — main의 flex 흐름에서 전체 너비 확보 */
#content-inquiries {
    flex-direction: column;
    gap: 1rem;
}

/* 툴바 */
.kanban-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0 0.5rem;
}

.kanban-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
}

/* 보드 전체 — 가로 스크롤 4열 */
.kanban-board {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1.5rem;
    /* 스크롤바 스타일 */
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.kanban-board::-webkit-scrollbar {
    height: 6px;
}
.kanban-board::-webkit-scrollbar-track {
    background: transparent;
}
.kanban-board::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

/* 칸반 컬럼 */
.kanban-column {
    flex: 0 0 260px;
    min-width: 240px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 220px);
}

/* 컬럼 헤더 */
.kanban-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid transparent;
    border-radius: var(--radius) var(--radius) 0 0;
    font-weight: 600;
    font-size: 0.9rem;
}

/* 컬럼별 헤더 색상 */
.kanban-col-new {
    border-bottom-color: #60a5fa;
    background: rgba(96, 165, 250, 0.08);
    color: #60a5fa;
}

.kanban-col-touring {
    border-bottom-color: #fbbf24;
    background: rgba(251, 191, 36, 0.08);
    color: #fbbf24;
}

.kanban-col-contracted {
    border-bottom-color: #4ade80;
    background: rgba(74, 222, 128, 0.08);
    color: #4ade80;
}

.kanban-col-cancelled {
    border-bottom-color: #9ca3af;
    background: rgba(156, 163, 175, 0.08);
    color: #9ca3af;
}

/* 건수 배지 */
.kanban-col-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(255,255,255,0.1);
    color: inherit;
}

/* 카드 목록 컨테이너 — 스크롤 가능 */
.kanban-cards {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 80px; /* 빈 컬럼도 드롭 영역 유지 */
}

.kanban-cards::-webkit-scrollbar {
    width: 4px;
}
.kanban-cards::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

/* 칸반 카드 */
.kanban-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem;
    cursor: grab;
    transition: box-shadow 0.2s, transform 0.15s, border-color 0.2s;
    animation: fadeIn 0.25s;
    user-select: none;
}

.kanban-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transform: translateY(-1px);
}

.kanban-card:active {
    cursor: grabbing;
}

/* 드래그 중 원본 카드 (SortableJS ghost) */
.kanban-card.sortable-ghost {
    opacity: 0.35;
    background: var(--surface-hover);
    border-style: dashed;
}

/* 드래그 중 복사본 (SortableJS drag) */
.kanban-card.sortable-drag {
    box-shadow: 0 12px 32px rgba(0,0,0,0.5);
    transform: rotate(1.5deg) scale(1.03);
    border-color: var(--accent);
    opacity: 1;
}

/* negotiating 상태 카드 (touring 컬럼에 표시) */
.kanban-card.status-negotiating {
    border-left: 3px solid #f59e0b;
}

/* 카드 내부 레이아웃 */
.kanban-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.4rem;
}

.kanban-card-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}

.kanban-card-deal {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.15rem 0.4rem;
    border-radius: 999px;
    background: rgba(108, 114, 203, 0.2);
    color: var(--accent);
}

.kanban-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.kanban-card-budget {
    color: var(--text);
    font-weight: 500;
}

.kanban-card-memo {
    font-style: italic;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 빈 컬럼 플레이스홀더 */
.kanban-empty {
    text-align: center;
    padding: 1.5rem 0.5rem;
    color: var(--text-muted);
    font-size: 0.82rem;
    pointer-events: none;
}

/* 상태 업데이트 중 로딩 */
.kanban-card.updating {
    opacity: 0.6;
    pointer-events: none;
}

/* ── 의뢰 생성 모달 ── */
#new-inquiry-modal .modal-content {
    max-width: 480px;
}

/* ── 모바일 반응형 ── */
@media (max-width: 640px) {
    .kanban-board {
        gap: 0.75rem;
    }

    .kanban-column {
        flex: 0 0 220px;
        min-width: 200px;
    }

    .kanban-toolbar {
        padding: 0.75rem 0 0.25rem;
    }
}


/* ═══════════════════════════════════════════════
   Phase 5-D (T43): 인라인 연락처 생성 폼
   ════════════════════════════════════════════════ */

/* 드롭다운에서 "새 연락처 만들기" 항목 */
.contact-create-item {
    color: var(--accent, #38bdf8);
    font-style: italic;
    border-top: 1px solid var(--border-color, rgba(255,255,255,0.1));
    margin-top: 2px;
    padding-top: 6px;
}
.contact-create-item span {
    font-style: normal;
    margin-right: 4px;
}
.contact-create-item:hover {
    background: rgba(56, 189, 248, 0.12);
    color: #7dd3fc;
}

/* 인라인 연락처 생성 폼 컨테이너 */
.inline-contact-form {
    background: var(--card-bg, #1e293b);
    border: 1px solid var(--accent, #38bdf8);
    border-radius: 8px;
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.inline-contact-form-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent, #38bdf8);
    margin-bottom: 2px;
}

.inline-contact-form input[type="text"],
.inline-contact-form input[type="tel"] {
    width: 100%;
    padding: 0.4rem 0.6rem;
    font-size: 0.88rem;
    border-radius: 6px;
    background: var(--input-bg, #0f172a);
    border: 1px solid var(--border-color, rgba(255,255,255,0.15));
    color: var(--text-primary, #f1f5f9);
    box-sizing: border-box;
}

.inline-contact-form-actions {
    display: flex;
    gap: 0.4rem;
    margin-top: 2px;
}

.inline-contact-error {
    font-size: 0.8rem;
    color: #f87171;
    margin-top: 2px;
}

/* ═══════════════════════════════════════════════
   Phase 7 (T53): 태그 배지 & 태그 입력 컴포넌트
   ════════════════════════════════════════════════ */

/* 칸반 카드 내 태그 배지 영역 */
.kanban-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.3rem;
}

/* 태그 배지 — 파스텔톤 컬러 */
.tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    transition: opacity 0.15s;
}

.tag-badge:hover {
    opacity: 0.85;
}

/* 태그 배지 삭제 버튼 (모달에서만 표시) */
.tag-badge .tag-remove {
    cursor: pointer;
    font-size: 0.75rem;
    opacity: 0.6;
    transition: opacity 0.15s;
    line-height: 1;
    margin-left: 0.1rem;
}

.tag-badge .tag-remove:hover {
    opacity: 1;
}

/* 태그 입력 컴포넌트 컨테이너 */
.tag-input-container {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    padding: 0.4rem;
    min-height: 38px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    align-items: center;
    transition: border-color 0.2s;
}

.tag-input-container:focus-within {
    border-color: var(--accent);
}

.tag-input-container .tag-badge {
    animation: fadeIn 0.2s;
}

/* 태그 텍스트 입력 */
.tag-input-field {
    flex: 1;
    min-width: 100px;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text);
    font-size: 0.85rem;
    font-family: inherit;
    padding: 0.15rem 0.3rem;
}

.tag-input-field::placeholder {
    color: var(--text-muted);
    font-size: 0.82rem;
}

/* 자동완성 드롭다운 */
.tag-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 10;
    max-height: 180px;
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.tag-suggestion-item {
    padding: 0.5rem 0.6rem;
    cursor: pointer;
    font-size: 0.82rem;
    color: var(--text);
    transition: background 0.15s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.tag-suggestion-item:hover {
    background: var(--surface-hover);
}

.tag-suggestion-item .tag-swatch {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.tag-suggestion-item.tag-create-new {
    color: var(--accent);
    font-style: italic;
    border-top: 1px solid var(--border);
}

/* ─── Phase 8 MVP-3: 지역 3단 콤보 ────────────────────── */
.region-combo-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.region-combo-group .region-select {
    width: 100%;
}

/* 비활성 select: 시각적으로 희미하게 */
select:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* 단지 select — 활성화될 때 강조 */
#inq-complex:not(:disabled) {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(var(--accent-rgb, 100,200,255), 0.2);
}
