        .sql-editor {
            width: 100%;
            border: 1px solid #d1d5db;
            border-radius: 6px;
            margin-bottom: 8px;
            overflow: auto;
            resize: vertical;
            max-height: 70vh;
            box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
            transition: border-color 0.2s, box-shadow 0.2s;
        }

        .sql-editor.h-8 {
            height: 188px;
            min-height: 160px;
        }

        .sql-editor:focus-within {
            border-color: #2563eb;
            box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
        }

        .sql-editor.readonly {
            background: #f8f9fc;
        }

        .editor-title {
            font-weight: bold;
            color: #1f2937;
            font-size: 12px;
            letter-spacing: 0.3px;
        }

        .section-head {
            display: flex;
            justify-content: flex-start;
            align-items: center;
            gap: 8px;
            margin-bottom: 6px;
            flex-wrap: wrap;
        }

        .tool-row {
            display: flex;
            gap: 6px;
            margin-bottom: 8px;
            flex-wrap: wrap;
            align-items: center;
        }

        .tool-row label {
            font-size: 13px;
            color: #4b5563;
            font-weight: bold;
        }

        .status-row {
            display: flex;
            justify-content: flex-start;
            gap: 12px;
            color: #6b7280;
            font-size: 12px;
            margin-top: -2px;
            margin-bottom: 8px;
            flex-wrap: wrap;
        }

        .btn-group {
            display: flex;
            gap: 6px;
            margin-bottom: 8px;
            flex-wrap: wrap;
            align-items: center;
        }

        .copy-success {
            color: #10b981;
            font-size: 13px;
            margin-left: 10px;
            display: none;
        }

        .advanced-panel {
            display: none;
            border: 1px solid #d1d5db;
            border-radius: 6px;
            padding: 8px;
            margin-bottom: 8px;
            background: #f3f4f6;
        }

        .advanced-panel.open {
            display: block;
        }

        .split-layout {
            display: flex;
            align-items: stretch;
            gap: 0;
            margin-bottom: 8px;
        }

        .split-pane {
            min-width: 68px;
            flex: 1 1 auto;
        }

        .split-pane-right {
            flex: 0 0 42%;
            max-width: 90%;
        }

        .splitter {
            width: 8px;
            cursor: col-resize;
            position: relative;
            -webkit-user-select: none;
            user-select: none;
            touch-action: none;
        }

        .splitter::before {
            content: '';
            position: absolute;
            top: 0;
            bottom: 0;
            left: 3px;
            width: 2px;
            background: #c3cad6;
            border-radius: 999px;
        }

        .splitter:hover::before,
        .splitter.dragging::before {
            background: #2563eb;
        }

        @media (max-width: 1100px) {
            .split-layout {
                flex-direction: column;
            }

            .splitter {
                display: none;
            }

            .split-pane-right {
                flex: 1 1 auto;
                max-width: none;
            }
        }

        /* SQL模板样式 */
        .template-card {
            transition: all 0.2s ease;
        }

        .template-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
        }

        /* 加载动画 */
        .loading {
            display: inline-block;
            width: 16px;
            height: 16px;
            border: 2px solid #f3f3f3;
            border-top: 2px solid #2563eb;
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin-left: 8px;
        }

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

        /* 响应式调整 */
        @media (max-width: 768px) {
            .tool-row {
                flex-direction: column;
                align-items: flex-start;
            }

            .btn-group {
                flex-direction: column;
                align-items: flex-start;
            }

            .status-row {
                flex-direction: column;
                align-items: flex-start;
            }
        }