/* header.css - Shared Header Styles for traceX */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background: var(--bg-surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-panel, 0 8px 32px 0 rgba(0, 0, 0, 0.25));
    position: relative;
    z-index: 100;
}

/* --- Section switcher: the logo itself opens the Trace / COM / ACC menu --- */
.section-switcher {
    position: relative;
    flex-shrink: 0;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    margin-left: -10px;
    font-family: inherit;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logo-section:hover,
.section-switcher-btn[aria-expanded="true"] {
    background: rgba(0, 240, 255, 0.06);
    border-color: rgba(0, 240, 255, 0.2);
}

.section-tag {
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--neon-cyan);
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.25);
    border-radius: 4px;
}

.section-caret {
    font-size: 10px;
    color: var(--text-secondary);
    transition: transform 0.2s ease;
}

.section-switcher-btn[aria-expanded="true"] .section-caret {
    transform: rotate(180deg);
}

.section-switcher-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 140px;
    padding: 6px;
    background: var(--bg-surface, #12151c);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    z-index: 200;
}

.section-switcher-menu.open {
    display: block;
}

.section-switcher-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 12px;
    text-align: left;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.section-switcher-item:hover {
    color: var(--neon-cyan);
    background: rgba(0, 240, 255, 0.1);
}

.section-switcher-item.active {
    color: var(--neon-cyan);
    background: rgba(0, 240, 255, 0.14);
}

.section-switcher-item-icon {
    width: 18px;
    font-size: 15px;
    color: var(--neon-cyan);
    text-align: center;
}

.section-switcher-item-label {
    flex: 1;
}

.section-switcher-item-key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted, #64748b);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    margin-left: auto;
}

.section-switcher-item:hover .section-switcher-item-key,
.section-switcher-item.active .section-switcher-item-key {
    color: var(--neon-cyan);
    border-color: rgba(0, 240, 255, 0.3);
    background: rgba(0, 240, 255, 0.1);
}

.logo-diamond {
    color: var(--neon-cyan);
    font-size: 24px;
    filter: drop-shadow(0 0 6px var(--neon-cyan));
}

.logo-text {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 1px;
    background: linear-gradient(90deg, var(--logo-from, #fff) 0%, var(--neon-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.nav-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.nav-item svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    opacity: 0.85;
}

.nav-item:hover svg, .nav-item.active svg {
    opacity: 1;
}

.nav-item:hover, .nav-item.active {
    color: var(--neon-cyan);
    background: rgba(0, 240, 255, 0.08);
    border-color: rgba(0, 240, 255, 0.2);
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
}
