/* P7 W1: two-row sticky topbar.
 * Loaded by base.html on every page. Pulls tokens from design-tokens.css.
 * Per D7-Q6: tabs row appears only when topbar_section is 'trucks'|'trailers'.
 */

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in oklab, var(--paper) 92%, transparent);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-1);
}

.topbar-row {
    max-width: var(--container-page, 1200px);
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 0 var(--space-4, 16px);
}

.topbar-row-brand {
    height: 52px;
    justify-content: space-between;
}

.topbar-row-tabs {
    height: 40px;
    gap: var(--space-5, 20px);
    border-top: 1px solid var(--border-1);
}

.topbar-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--ink);
}

.topbar-actions {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2, 8px);
}

.topbar-profile {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--paper-2);
    border: 1px solid var(--border-1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--ink-3);
    transition: background 120ms ease, border-color 120ms ease;
}

.topbar-profile:hover {
    background: var(--paper-3);
    border-color: var(--border-2);
}

.topbar-profile-initials {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.topbar-tab {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-4);
    text-decoration: none;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: color 120ms ease, border-bottom-color 120ms ease;
}

.topbar-tab:hover {
    color: var(--ink-2);
}

.topbar-tab.active {
    color: var(--ink);
    border-bottom-color: var(--ink);
}

@media (max-width: 480px) {
    .topbar-row-brand,
    .topbar-row-tabs {
        padding: 0 var(--space-3, 12px);
    }
}

/* Dark theme — paper inverts to ink, profile bg shifts to ink-2 */
:root[data-theme="dark"] .topbar {
    background: color-mix(in oklab, var(--paper) 92%, transparent);
}
:root[data-theme="dark"] .topbar-profile {
    background: var(--paper-2);
}
