/* ─── ENTITY PAGE HEADER + NAV ───────────────────────────────────────────────
   Reusable header and navigation patterns for entity-level pages
   (Company, Production, etc.)
   ──────────────────────────────────────────────────────────────────────────── */

/* ── Entity header bar — left border only, no card treatment ────────────── */

.tt-entity-header-bar {
    border-left: 3px solid var(--primary-color);
    padding: var(--space-2xs) var(--space-s);
    margin-bottom: var(--space-xs);
}

.tt-entity-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-s);
    flex-wrap: wrap;
}

.tt-entity-header-name {
    font-size: var(--step-2);
    line-height: 1.1;
}

.tt-entity-header-identity {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.375rem 0.625rem;
}

.tt-entity-header-subtitle {
    font-size: var(--step--1);
    color: var(--text-muted);
}

.tt-entity-header-meta {
    font-size: var(--step--2);
    color: var(--text-muted);
    margin-top: 0.2rem;
    letter-spacing: 0.03em;
}

/* ── Entity tabs — sidebar-style applied horizontally ───────────────────── */

.tt-entity-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border-muted);
    margin-bottom: var(--space-s);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}

.tt-entity-tabs::-webkit-scrollbar {
    display: none;
}

.tt-entity-tab {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    color: var(--text-color);
    text-decoration: none;
    font-size: var(--step--1);
    border-bottom: 2px solid transparent;
    border-radius: 5px 5px 0 0;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background-color 0.15s, color 0.15s, border-color 0.15s;
    margin-bottom: -1px;
}

/* Labels hidden by default; entity-tabs controller adds --labels-visible
   when the tabs actually fit without overflowing. */
.tt-entity-tab-label {
    display: none;
}

.tt-entity-tabs--labels-visible .tt-entity-tab-label {
    display: inline;
}

.tt-entity-tab:hover {
    color: var(--heading-color);
    background-color: var(--bg-muted-hover);
}

.tt-entity-tab.active {
    color: var(--heading-color);
    background-color: var(--bg-muted-hover);
    border-bottom-color: var(--primary-color);
}
