.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    background: linear-gradient(180deg, #1b2d40, #0f1c2c);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 18px;
    font-weight: bold;
}

/* ===============================
   NAV
   =============================== */
.nav {
    display: flex;
    gap: 10px;
}

/* ===============================
   BUTTON – BASE (OUTLINE)
   =============================== */
.nav-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 10px 22px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.4px;
    font-size: 14px;

    background: transparent;
    color: #cfe0ff;
    border: 2px solid currentColor;

    transition:
        background 0.25s ease,
        color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.15s ease;
}

.nav-btn:hover {
    background: rgba(255,255,255,0.08);
    transform: translateY(-1px);
}

/* ===============================
   🎨 KOLORY (OBRAMÓWKA)
   =============================== */
.nav-btn         { color: #6bbcff; }   /* default */
.nav-btn.warning { color: #ffae42; }
.nav-btn.alert   { color: #ff4d4d; }
.nav-btn.sea     { color: #3fd38a; }

/* ===============================
   ACTIVE – TŁO + ISKRA ⚡
   =============================== */
.nav-btn.active {
    color: #ffffff;
    border-color: transparent;
    background: linear-gradient(180deg, var(--active-a), var(--active-b));
    box-shadow:
        0 0 26px var(--active-glow),
        inset 0 0 14px rgba(255,255,255,0.35);
    overflow: hidden;
}

/* ⚡ iskra – tylko active */
.nav-btn.active::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        transparent 30%,
        rgba(255,255,255,0.95),
        transparent 70%
    );
    background-size: 200% 100%;
    animation: spark 1.8s linear infinite;
    pointer-events: none;
}

/* ===============================
   🎨 KOLORY ACTIVE (PER TAB)
   =============================== */
.nav-btn.active:nth-of-type(1) {
    --active-a: #6bbcff;
    --active-b: #3f8fff;
    --active-glow: rgba(107,188,255,0.9);
}

.nav-btn.active:nth-of-type(2) {
    --active-a: #5fe1ff;
    --active-b: #2bb3ff;
    --active-glow: rgba(95,225,255,0.9);
}

.nav-btn.active.warning {
    --active-a: #ffd27a;
    --active-b: #ffae42;
    --active-glow: rgba(255,174,66,0.9);
}

.nav-btn.active.sea {
    --active-a: #5fffd1;
    --active-b: #3fd38a;
    --active-glow: rgba(63,211,138,0.9);
}

/* ===============================
   📱 MOBILE – IKONA + TOOLTIP
   =============================== */
@media (max-width: 640px) {
    .nav-btn {
        font-size: 0;           /* ukrywa tekst */
        padding: 10px 14px;
    }

    .nav-btn::first-letter {
        font-size: 16px;        /* emoji wraca */
    }

    /* tooltip */
    .nav-btn[data-label]::before {
        content: attr(data-label);
        position: absolute;
        bottom: -38px;
        left: 50%;
        transform: translateX(-50%);
        background: #020617;
        color: #fff;
        padding: 6px 10px;
        border-radius: 8px;
        font-size: 12px;
        white-space: nowrap;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
        box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    }

    .nav-btn:hover::before,
    .nav-btn:focus::before {
        opacity: 1;
    }
}

/* ===============================
   STATUS
   =============================== */
.status {
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: bold;
}

.alerts-off {
    color: #ff6b6b;
}

/* ===============================
   ANIMACJE
   =============================== */
@keyframes spark {
    from { background-position: -200% 0; }
    to   { background-position:  200% 0; }
}
header.top-bar {
    position: sticky;
    top: 0;
    z-index: 2000;
}
