/* Topbar (compact sticky) */
.topbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.app-brand {
    display: flex;
    align-items: center;
}

.app-brand img,
.app-brand svg {
    height: 26px;
    width: auto;
    display: block;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 12px;
    background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.topnav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.topnav a {
    color: var(--muted);
    text-decoration: none;
    font-size: 12.5px;
    padding: 6px 8px;
    border-radius: 7px;
    border: 1px solid transparent;
}

.topnav a:hover {
    background: var(--hover);
    border-color: var(--border);
}

.topnav a.active {
    background: var(--hover);
    border-color: var(--border-2);
    color: var(--text);
}

.topnav a:focus {

    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.last-saved {
    margin-left: 4px;
    color: var(--muted);
    font-size: 12px;
}

.bar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn.slim {
    padding: 6px 8px;
    font-size: 12px;
    border-radius: 7px;
}

/* Hide old header/nav styles if any remain */
.app-header,
.jump-nav {
    display: none;
}

/* Light mode premium topbar */
:root:not([data-theme="dark"]) .topbar {
    background: #ffffff;
    border-bottom-color: #E7EAF0;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.05);
    padding: 10px 20px;
}

:root:not([data-theme="dark"]) .topnav a {
    font-size: 13px;
    font-weight: 500;
    color: #667085;
}

:root:not([data-theme="dark"]) .topnav a:hover {
    background: #F5F7FA;
    border-color: #E7EAF0;
    color: #111827;
}

:root:not([data-theme="dark"]) .topnav a.active {
    background: #EEF2FF;
    border-color: rgba(47, 91, 255, 0.2);
    color: #2F5BFF;
    font-weight: 600;
}