.spatial-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
    min-height: 0;
}
.spatial-list-search {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}
.spatial-list-search-input {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    outline: none;
    box-sizing: border-box;
}
.spatial-list-search-input:focus {
    border-color: #3498db;
}
.spatial-list-search-date-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
}
.spatial-list-search-date {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    outline: none;
}
.spatial-list-search-tilde {
    color: #999;
    font-size: 13px;
}
.spatial-list-search-btn {
    padding: 7px 16px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
}
.spatial-list-search-btn:hover {
    background: #2980b9;
}
.spatial-upload-btn {
    width: 100%;
    padding: 8px;
    background: #ef6c00;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-sizing: border-box;
}
.spatial-upload-btn:hover {
    background: #e65100;
}
.spatial-list-items {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.spatial-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 12px;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: visible;
}
.spatial-list-item:hover {
    border-color: #90caf9;
    box-shadow: 0 1px 4px rgba(33,150,243,0.1);
}
.spatial-list-item.active {
    border-color: #3498db;
    background: #f5faff;
    box-shadow: 0 0 0 2px rgba(52,152,219,0.15);
}
.spatial-list-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #f5f5f5;
}
.spatial-list-item-info {
    flex: 1;
    min-width: 0;
}
.spatial-list-item-name {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}
.spatial-list-item-name-text {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.spatial-list-item-name-edit {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    border-radius: 3px;
    opacity: 0;
    transition: opacity 0.15s;
}
.spatial-list-item:hover .spatial-list-item-name-edit {
    opacity: 1;
}
.spatial-list-item-name-edit:hover {
    color: #3498db;
    background: #e3f2fd;
}
.spatial-list-item-name.editing {
    display: flex;
    align-items: center;
    gap: 4px;
}
.spatial-list-item-name-input {
    flex: 1;
    min-width: 0;
    padding: 2px 6px;
    border: 1px solid #3498db;
    border-radius: 3px;
    font-size: 12px;
    outline: none;
    background: #fff;
}
.spatial-list-item-name-ok {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: none;
    background: #3498db;
    color: #fff;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.spatial-list-item-meta {
    font-size: 11px;
    color: #999;
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.spatial-list-item-format-badge {
    display: inline-block;
    padding: 1px 6px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    line-height: 16px;
}
.spatial-list-item-count {
    color: #888;
    font-size: 11px;
}
.spatial-list-item-date {
    font-size: 10px;
    color: #bbb;
    margin-top: 2px;
}
.spatial-list-item-actions {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-shrink: 0;
    align-self: center;
}
.spatial-list-item-btn {
    position: relative;
    width: 28px;
    height: 28px;
    border: 1px solid #d0d0d0;
    border-radius: 5px;
    background: #fafafa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #666;
    transition: all 0.15s;
}
.spatial-list-item-btn:hover {
    background: #e8e8e8;
    color: #333;
    border-color: #bbb;
}
/* 호버 툴팁 */
.spatial-list-item-btn[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute; bottom: calc(100% + 6px); left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px; border-radius: 4px;
    background: #333; color: #fff; font-size: 10px; font-weight: 500;
    white-space: nowrap; pointer-events: none; z-index: 10;
    animation: spatialTooltipIn 0.15s ease;
}
@keyframes spatialTooltipIn {
    from { opacity: 0; transform: translateX(-50%) translateY(4px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
/* 우측 끝 버튼 툴팁 오버플로 방지 */
.spatial-list-item-actions .spatial-list-item-btn:last-child[data-tooltip]:hover::after {
    left: auto; right: 0; transform: none;
    animation: spatialTooltipInRight 0.15s ease;
}
@keyframes spatialTooltipInRight {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.spatial-list-item-btn.danger:hover {
    background: #ffebee;
    border-color: #ef5350;
    color: #d32f2f;
}
.spatial-list-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}
.spatial-list-status.published { background: #e8f5e9; color: #2e7d32; }
.spatial-list-status.processing { background: #fff3e0; color: #ef6c00; }
.spatial-list-status.uploading { background: #e3f2fd; color: #1565c0; }
.spatial-list-status.error { background: #ffebee; color: #c62828; }
.spatial-list-empty {
    text-align: center;
    padding: 40px 16px;
    color: #999;
    font-size: 13px;
}

/* ── 처리중 카드 로딩 오버레이 ── */
.spatial-card-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 2;
    border-radius: 6px;
    pointer-events: none;
}
.spatial-card-loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #e0e0e0;
    border-top-color: #3498db;
    border-radius: 50%;
    animation: spatialCardSpin 0.8s linear infinite;
}
@keyframes spatialCardSpin {
    to { transform: rotate(360deg); }
}
.spatial-card-loading-text {
    font-size: 12px;
    color: #555;
    font-weight: 500;
    letter-spacing: -0.3px;
}
.spatial-list-paging {
    display: flex;
    justify-content: center;
    gap: 4px;
    padding-top: 8px;
    flex-shrink: 0;
}
.spatial-list-paging button {
    width: 28px;
    height: 28px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 12px;
    cursor: pointer;
}
.spatial-list-paging button.active {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
}
.spatial-delete-info {
    text-align: left;
    background: #fef8f8;
    border: 1px solid #fde2e2;
    border-radius: 8px;
    padding: 12px 14px;
    margin: 14px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.spatial-delete-info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #555;
    line-height: 1.45;
}
.spatial-delete-info-row svg {
    flex-shrink: 0;
}
.spatial-delete-info-row em {
    color: #999;
    font-style: normal;
    font-size: 11px;
}
.spatial-zoom-hint {
    position: absolute;
    bottom: 40px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 14px;
    background: rgba(40, 44, 52, 0.92);
    color: #ccc;
    font-size: 11px;
    border-radius: 6px;
    animation: hintFadeIn 0.25s ease;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    z-index: 10;
    white-space: nowrap;
}
@keyframes hintFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Error status clickable */
.spatial-list-status.error {
    background: #ffebee;
    color: #c62828;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.spatial-list-status.error:hover {
    transform: scale(1.15);
    box-shadow: 0 0 0 3px rgba(198,40,40,0.15);
}

/* Error Modal (drone-confirm-overlay 패턴 재사용) */
.spatial-error-box {
    width: 420px;
}
.spatial-error-overlay .drone-confirm-icon.icon-error {
    background: #ffebee;
    color: #e74c3c;
}
.spatial-error-detail {
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.spatial-error-detail-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}
.spatial-error-detail-label {
    color: #999;
    width: 55px;
    flex-shrink: 0;
}
.spatial-error-detail-val {
    color: #333;
    font-weight: 500;
}
.spatial-error-msg-box {
    border: 1px solid #fde2e2;
    border-radius: 8px;
    overflow: hidden;
}
.spatial-error-msg-title {
    padding: 6px 12px;
    background: #fef3f3;
    font-size: 11px;
    font-weight: 600;
    color: #c62828;
    border-bottom: 1px solid #fde2e2;
}
.spatial-error-msg-content {
    padding: 10px 12px;
    background: #fff;
    font-size: 12px;
    color: #b71c1c;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 120px;
    overflow-y: auto;
}

/* ═══ 초기 안내문구 (빈 목록 가이드) ═══ */
.spatial-guide { padding: 4px 2px 0; }
.spatial-guide-hero { text-align: center; padding: 10px 0 6px; }
.spatial-guide-icon-wrap {
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    width: 60px; height: 60px; margin-bottom: 6px;
    background: linear-gradient(135deg, #e8f4fd, #d1ecf9); border-radius: 16px;
}
.spatial-guide-pulse {
    position: absolute; inset: -4px; border-radius: 20px;
    border: 2px solid rgba(52,152,219,0.2);
    animation: spatialGuidePulse 2s ease-in-out infinite;
}
@keyframes spatialGuidePulse {
    0%, 100% { transform: scale(1); opacity: .6; }
    50% { transform: scale(1.08); opacity: 0; }
}
.spatial-guide-title { font-size: 15px; font-weight: 700; color: #333; margin-bottom: 2px; }
.spatial-guide-sub { font-size: 11px; color: #888; line-height: 1.55; }

.spatial-guide-cards { display: flex; flex-direction: column; gap: 5px; margin: 8px 0; }
.spatial-guide-card {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 10px; background: #fff; border: 1px solid #f0f0f0; border-radius: 8px;
    transition: border-color .15s;
}
.spatial-guide-card:hover { border-color: #90caf9; }
.spatial-guide-card-icon {
    width: 34px; height: 34px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.spatial-guide-card-text strong { display: block; font-size: 11.5px; color: #333; }
.spatial-guide-card-text span { font-size: 10px; color: #999; }

.spatial-guide-steps { display: flex; flex-direction: column; gap: 3px; margin: 6px 0; }
.spatial-guide-step {
    display: flex; align-items: center; gap: 8px;
    font-size: 11px; color: #555; padding: 3px 0;
}
.spatial-guide-step strong { color: #3498db; }
.spatial-guide-step-num {
    width: 18px; height: 18px; border-radius: 50%;
    background: linear-gradient(135deg, #e8f4fd, #d1ecf9); color: #3498db;
    font-size: 10px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.spatial-guide-footer {
    text-align: center; font-size: 9.5px; color: #bbb; margin-top: 4px;
    padding-top: 6px; border-top: 1px solid #f0f0f0;
}

/* ═══ 그룹 카드 확장/접기 ═══ */
.spatial-list-item.has-layers {
    cursor: pointer;
}
.spatial-list-item.has-layers.expanded {
    border-color: #90caf9;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom: 1px solid #e3f2fd;
    margin-bottom: 0;
}
.spatial-expand-btn svg {
    transition: transform 0.2s ease;
}
.spatial-list-item.expanded .spatial-expand-btn svg {
    transform: rotate(180deg);
}
.spatial-list-item-layer-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 7px;
    background: #f3e8fd;
    color: #7b1fa2;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    line-height: 16px;
}
.spatial-list-item-layer-badge svg {
    flex-shrink: 0;
}

/* ═══ 레이어 패널 (그룹 하위) ═══ */
.spatial-layer-panel {
    background: #f8fafe;
    border: 1px solid #e3f2fd;
    border-top: none;
    border-radius: 0 0 6px 6px;
    padding: 6px 8px 8px;
    margin-top: -6px;
    margin-bottom: 6px;
}
.spatial-layer-panel-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 0;
    font-size: 11px;
    color: #888;
}
.spatial-layer-panel-empty {
    text-align: center;
    padding: 12px 0;
    font-size: 11px;
    color: #aaa;
}
.spatial-layer-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.spatial-layer-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid #e8eef5;
    border-radius: 5px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.spatial-layer-item:hover {
    border-color: #b3d4fc;
}
.spatial-layer-item.active {
    border-color: #42a5f5;
    background: #f0f7ff;
    box-shadow: 0 0 0 1.5px rgba(66,165,245,0.15);
}
.spatial-layer-item-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #78909c;
}
.spatial-layer-item-info {
    flex: 1;
    min-width: 0;
}
.spatial-layer-item-name {
    font-size: 12px;
    font-weight: 500;
    color: #444;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.spatial-layer-item-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}
.spatial-layer-item-geom {
    font-size: 9px;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.spatial-layer-item-count {
    font-size: 10px;
    color: #999;
}
.spatial-layer-item-actions {
    display: flex;
    gap: 3px;
    align-items: center;
    flex-shrink: 0;
}
.spatial-layer-btn {
    width: 24px;
    height: 24px;
    border: 1px solid #d8dfe6;
    border-radius: 4px;
    background: #fafbfc;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #78909c;
    transition: all 0.15s;
}
.spatial-layer-btn:hover {
    background: #e3f2fd;
    color: #1976d2;
    border-color: #90caf9;
}
.spatial-layer-item.active .spatial-layer-btn:first-child {
    color: #1976d2;
}
