/* === 공통 CSS 변수 === */
:root {
    --border-color: #e5e7eb;
    --primary-color: #3b82f6;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --secondary-color: #6c757d;
    --panel-bg: #f8f9fa;
    --shadow-light: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-medium: 0 4px 8px rgba(0,0,0,0.15);
    --shadow-heavy: 0 8px 16px rgba(0,0,0,0.2);
    --transition-speed: 0.3s;
}

/* === CQL 영역 전체 === */
.cql-area {
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: var(--krds-color-light-gray-90, #1a1a1a);
}

/* === 필터 적용 토글 === */
.filter-apply-toggle {
    margin-left: auto;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    border-left: 1px solid var(--border-color);
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    user-select: none;
    transition: color 0.2s ease;
}

.toggle-label:hover {
    color: var(--primary-color);
}

.toggle-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.toggle-text {
    white-space: nowrap;
}

/* === 탭 콘텐츠 === */
.cql-tab-contents {
    flex: 1;
    overflow: hidden;
    background-color: var(--krds-color-light-gray-90, #1a1a1a);
}

.cql-tab-content {
    display: none;
    height: 100%;
    overflow-y: auto;
}

.cql-area,
.cql-tab-header,
.cql-tab-header .krds-tab-area,
.cql-tab-header .tab.line.full,
.cql-tab-header .tab_panel {
    width: 100%;
}

.cql-tab-header .tab_panel {
    display: flex;
    padding: 0;
    margin: 0;
}

.cql-tab-header .tab_panel > li {
    flex: 1 1 0;
}

.cql-tab-content.active {
    display: block;
}

/* 공통 버튼 스타일 */
.btn-primary {
    height: 42px;
    padding: 0 18px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    background: var(--primary-color);
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59,130,246,0.3);
}

.btn-secondary {
    height: 36px;
    padding: 0 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    background: #ffffff;
    color: #374151;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    transform: translateY(-1px);
}

/* 공통 로딩 상태 */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #6b7280;
    font-size: 14px;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 12px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
