/* Tab Bar - 앱 내부 탭 UI (Step 1) */
.tab-bar {
    display: flex;
    align-items: stretch;
    background: var(--bg-secondary, #f3f4f6);
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    min-height: 36px;
    padding: 0 8px;
    overflow-x: auto;
    overflow-y: hidden;
    flex-shrink: 0;
    user-select: none;
}

.tab-bar::-webkit-scrollbar { height: 4px; }
.tab-bar::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 2px; }

.tab-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px 6px 12px;
    margin: 4px 2px 0 2px;
    background: #e5e7eb;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    white-space: nowrap;
    max-width: 220px;
    transition: background 0.12s;
}

.tab-item:hover {
    background: #d1d5db;
}

.tab-item.active {
    background: #ffffff;
    border-color: var(--border-color, #e5e7eb);
    color: #111827;
    font-weight: 500;
    position: relative;
    z-index: 2;
}

.tab-item .tab-title {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 170px;
}

.tab-item .tab-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: transparent;
    color: #6b7280;
    font-size: 11px;
    line-height: 1;
}

.tab-item .tab-close:hover {
    background: #ef4444;
    color: #fff;
}

.tab-item.is-dirty .tab-title::after {
    content: " •";
    color: #f59e0b;
    font-weight: bold;
}
