.pane-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-sidebar); /* Matches the deeper background */
    height: 44px; /* Slightly taller for a more breathable, premium feel */
    overflow-x: auto;
    overflow-y: hidden;
    border-bottom: 1px solid var(--border-color); /* Crisp, thin separator */
}

.tab-group {
    display: flex;
    height: 100%;
    padding-left: 8px; /* Adds a nice offset from the left edge */
    gap: 2px; /* Tiny gap between tabs to prevent them from looking glued together */
}

.tab {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--text-muted);
    border: none;
    padding: 0 16px;
    font-family: 'Geist', 'Inter', -apple-system, sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    height: calc(100% - 6px); /* Leaves space at the top */
    margin-top: 6px;
    border-radius: 8px 8px 0 0; /* Smoothly rounded top corners */
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.tab:hover {
    background: rgba(255, 255, 255, 0.04); /* Very subtle hover fill */
    color: var(--text-main);
}

/* Active Tab Blends Seamlessly into the Editor below it */
.tab.active {
    background-color: var(--bg-editor);
    color: var(--text-light);
}

/* Modern glowing accent line at the top of the active tab */
.tab.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    width: 80%; /* Doesn't stretch edge-to-edge, looks sleeker */
    height: 2px;
    background: var(--accent);
    border-radius: 0 0 4px 4px;
    box-shadow: 0 2px 8px rgba(0, 229, 191, 0.4); /* Soft neon glow */
}

/* Specific Tab Icons */
.tab-icon {
    width: 14px;
    height: 14px;
    opacity: 0.7;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.tab:hover .tab-icon {
    opacity: 0.9;
}

.tab.active .tab-icon {
    opacity: 1;
}

.ts-icon { color: var(--ts-blue); }
.js-icon { color: var(--js-yellow); }
.accent-icon { color: var(--accent); }

/* Read-Only Badge (Modernized floating pill) */
.badge {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    padding: 2px 8px;
    border-radius: 99px; /* Pill shape */
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-left: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05); /* Barely-there glass border */
}