/* ===== Editor Area ===== */
.editor-area {
    grid-row: 2 / 3;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    overflow: hidden;
}

.editor-tabs {
    display: flex;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-default);
    overflow-x: auto;
    min-height: 36px;
}

.editor-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border-right: 1px solid var(--border-default);
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
    position: relative;
}

.editor-tab:hover { background: var(--bg-hover); }

.editor-tab.active {
    background: var(--bg-primary);
    color: var(--text-white);
}

.editor-tab.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--accent-primary);
}

.tab-modified-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-warning);
    border-radius: 50%;
    margin-left: 4px;
}

.tab-close {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.15s;
    margin-left: 4px;
}

.editor-tab:hover .tab-close { opacity: 1; }
.tab-close:hover { background: rgba(255,255,255,0.1); }

.editor-content {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.code-area {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.code-header {
    padding: 8px 16px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-default);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
}

.code-path { color: var(--text-secondary); }

.code-status {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.status-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
}

.status-badge.synced { background: rgba(34, 197, 94, 0.2); color: var(--accent-success); }
.status-badge.modified { background: rgba(245, 158, 11, 0.2); color: var(--accent-warning); }
.status-badge.preview { background: rgba(99, 102, 241, 0.2); color: var(--accent-primary); }

.code-lines {
    flex: 1;
    overflow: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: var(--code-font-size);
    line-height: 22px;
    background: var(--bg-primary);
}

.code-line {
    display: flex;
    min-height: 22px;
}

.line-num {
    width: 50px;
    padding-right: 12px;
    text-align: right;
    color: var(--text-muted);
    user-select: none;
    font-size: 12px;
    background: var(--bg-primary);
    flex-shrink: 0;
}

.line-content {
    flex: 1;
    padding-left: 12px;
    padding-right: 12px;
    white-space: pre;
    min-height: 22px;
}

.line-content:hover { background: rgba(255,255,255,0.03); }
.line-content.selected { background: rgba(99, 102, 241, 0.15); }
.line-content.diff-add { background: rgba(34, 197, 94, 0.2); }
.line-content.diff-remove { background: rgba(239, 68, 68, 0.2); }

.code-line.folded {
    background: rgba(99, 102, 241, 0.1);
    cursor: pointer;
}

.fold-indicator {
    font-size: 12px;
    margin-right: 4px;
    cursor: pointer;
}

/* ===== Syntax Highlighting ===== */
.syn-keyword { color: var(--syntax-keyword); }
.syn-function { color: var(--syntax-function); }
.syn-string { color: var(--syntax-string); }
.syn-number { color: var(--syntax-number); }
.syn-comment { color: var(--syntax-comment); font-style: italic; }
.syn-variable { color: var(--syntax-variable); }
.syn-class { color: var(--syntax-class); }
.syn-type { color: var(--syntax-class); }
.syn-operator { color: var(--text-primary); }

/* ===== Inline Edit ===== */
.inline-edit-input:focus {
    background: rgba(99, 102, 241, 0.2);
}