/* ---------------------------------------------------------
   topbar.css — obere Navigationsleiste
--------------------------------------------------------- */
.topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 28px;
    height: var(--topbar-h);
    position: sticky;
    top: 0;
    z-index: 30;
    gap: 8px;
}

/* Hamburger (mobile) */
.hamburger {
    display: none;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-right: 4px;
}
.hamburger span {
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
}
.hamburger:hover { background: var(--surface-alt); }
.nav-close { display: none; }
.nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 25;
}

.logo {
    display: inline-flex;
    align-items: center;
    margin-right: 56px;
}
.logo img {
    display: block;
    height: 32px;
    width: auto;
}

.nav {
    flex: 1;
    height: var(--topbar-h);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.nav::before,
.nav::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    width: 60px;
    pointer-events: none;
    z-index: 2;
}
.nav::before { left: 0;  background: linear-gradient(to right, var(--surface), transparent); }
.nav::after  { right: 0; background: linear-gradient(to left,  var(--surface), transparent); }

.nav-track {
    display: inline-flex;
    align-items: center;
    gap: 40px;
    height: 100%;
    padding: 0 20px;
    position: relative;
    transform: translateX(0);
    transition: transform .6s cubic-bezier(.4, 0, .2, 1);
    will-change: transform;
}
.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-soft);
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: .4px;
    height: var(--topbar-h);
    border-bottom: 3px solid transparent;
    padding-top: 3px;
    transition: color .15s;
    white-space: nowrap;
    flex-shrink: 0;
}
.nav-link:hover { color: var(--text); }
.nav-link.active {
    color: var(--text);
    border-bottom-color: var(--brand);
    font-weight: 600;
}
.nav-link svg { opacity: .85; }
.nav-link.active svg { opacity: 1; }

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: var(--text-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, color .15s;
    flex-shrink: 0;
}
.icon-btn:hover {
    background: var(--bg);
    color: var(--text);
}
.icon-btn i { font-size: 18px; }

/* ── User pill dropdown ─────────────────────────────────── */
.cockpit-userpill {
    position: relative;
}

/* The trigger button inherits .icon-btn — just fix specifics */
.cockpit-userpill__btn {
    padding: 0;
    gap: 0;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    justify-content: center;
    background: transparent;
}

.cockpit-userpill__menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 6px;
    z-index: 60;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity .15s, transform .15s, visibility .15s;
}
.cockpit-userpill.is-open .cockpit-userpill__menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.cockpit-userpill__head {
    padding: 10px 12px 11px;
    border-bottom: 1px solid var(--border-soft);
    margin-bottom: 4px;
}
.cockpit-userpill__head strong {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text);
}
.cockpit-userpill__head small {
    display: block;
    font-size: 11.5px;
    color: var(--text-mute);
    margin-top: 1px;
}

.cockpit-userpill__item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 500;
    transition: background .12s, color .12s;
}
.cockpit-userpill__item i {
    font-size: 16px;
    width: 18px;
    text-align: center;
    color: var(--text-mute);
    flex-shrink: 0;
}
.cockpit-userpill__item:hover {
    background: var(--bg);
    color: var(--text);
}
.cockpit-userpill__item:hover i { color: var(--text-soft); }

.cockpit-userpill__item--danger { color: var(--danger-deep); }
.cockpit-userpill__item--danger i { color: var(--danger); }
.cockpit-userpill__item--danger:hover {
    background: #fee2e2;
    color: #991b1b;
}
.cockpit-userpill__item--danger:hover i { color: #991b1b; }

/* Roter Logout / Power-Button */
.logout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e49e00;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    transition: background .15s, transform .1s;
    flex-shrink: 0;
}
.logout-btn:hover  { background: #c62828; }
.logout-btn:active { transform: scale(.96); }
.logout-btn i      { font-size: 18px; color: #fff; }

/* ---------------------------------------------------------
   Notification Bell + Dropdown
--------------------------------------------------------- */
.notif-bell-wrap { position: relative; }

.notif-bell-badge {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: var(--danger);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    border-radius: var(--radius-pill);
    border: 2px solid var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    pointer-events: none;
    animation: nbounce .3s ease;
}
@keyframes nbounce {
    0%   { transform: scale(0); }
    70%  { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.notif-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: -8px;
    width: 340px;
    max-width: 94vw;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    z-index: 9000;
    overflow: hidden;
    animation: ndrop-in .14s ease;
}
@keyframes ndrop-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.notif-dropdown__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 16px 10px;
    border-bottom: 1px solid var(--border-soft);
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}
.notif-markall-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    color: var(--info);
    padding: 0;
    font-family: inherit;
}
.notif-markall-btn:hover { color: var(--chart-blue); }

.notif-list {
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
}
.notif-list::-webkit-scrollbar { width: 4px; }
.notif-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: var(--radius-pill); }

.notif-empty {
    padding: 28px 16px;
    text-align: center;
    font-size: 13px;
    color: var(--text-mute);
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 11px 16px;
    border-bottom: 1px solid var(--border-soft);
    text-decoration: none;
    color: inherit;
    transition: background .1s;
    cursor: pointer;
}
.notif-item:last-child  { border-bottom: 0; }
.notif-item:hover       { background: var(--bg-soft); }
.notif-item--unread     { background: var(--brand-soft); }
.notif-item--unread:hover { background: #fdedc0; }

.notif-item__icon {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border-radius: 50%;
    font-size: 15px;
    margin-top: 1px;
}
.notif-item--unread .notif-item__icon { background: var(--brand-soft); }

.notif-item__body      { flex: 1; min-width: 0; }
.notif-item__title {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.notif-item__body-text {
    display: block;
    font-size: 11px;
    color: var(--text-soft);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.notif-item__time {
    flex: 0 0 auto;
    font-size: 10px;
    color: var(--text-mute);
    white-space: nowrap;
    margin-top: 2px;
}
