/* ==========================================================================
   Header / Navigation
   ========================================================================== */

header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: transparent;

    width: 100%;
    min-height: 64px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    box-sizing: border-box;
}

/* ── Logo anchor ─────────────────────────────────────────────────────────── */
header > a:first-child {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    text-decoration: none;
}

/* ── All header SVG icons: explicit size, no transform tricks ────────────── */
.icon {
    display: block;
    width: 100%;
    height: 100%;
}

/* ── Navigation pill ─────────────────────────────────────────────────────── */
#nav {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 18px;
    font-size: 0.9rem;
    white-space: nowrap;

    background:
        linear-gradient(white, white) padding-box,
        linear-gradient(90deg, var(--Green), var(--Blue), var(--Purple), var(--Red), var(--Yellow)) border-box;
    border: 1.5px solid transparent;
    border-radius: 999px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

#nav > a {
    color: #444;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 999px;
    transition: background 0.15s ease;
    white-space: nowrap;
}

#nav > a:hover {
    background: rgba(0, 0, 0, 0.05);
}

#ati {
    font-weight: bold;
}

/* ── Profile icon anchor (index.html — SVG inside <a>) ───────────────────── */
header > a:last-child {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    text-decoration: none;
}

/* ── Profile icon SVG (feedback.html — direct <svg> child) ──────────────── */
#loginAsEmployee {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: block;
    cursor: pointer;
}

/* ==========================================================================
   Responsive — Tablet (≤ 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
    /* Hide profile icon — both variants */
    header > a:last-child,
    #loginAsEmployee {
        display: none;
    }

    #nav {
        font-size: 0.82rem;
        padding: 6px 12px;
        gap: 2px;
    }
}

/* ==========================================================================
   Responsive — Large mobile (≤ 768px)
   ========================================================================== */
@media (max-width: 768px) {
    header {
        min-height: 56px;
        padding: 6px 12px;
        gap: 8px;
    }

    header > a:first-child {
        width: 38px;
        height: 38px;
    }

    #nav {
        font-size: 0.75rem;
        padding: 5px 10px;
        gap: 0;
        overflow-x: auto;
        scrollbar-width: none;
        justify-content: flex-start;
    }

    #nav::-webkit-scrollbar {
        display: none;
    }

    #nav > a {
        padding: 4px 6px;
        flex-shrink: 0;
    }
}

/* ==========================================================================
   Responsive — Mobile (≤ 540px)  — nav moves below logo row
   ========================================================================== */
@media (max-width: 540px) {
    header {
        flex-wrap: wrap;
        min-height: auto;
        padding: 8px 12px 6px;
        gap: 6px;
    }

    header > a:first-child {
        width: 34px;
        height: 34px;
    }

    #nav {
        /* Take full width on second row */
        flex: 0 0 100%;
        font-size: 0.72rem;
        padding: 4px 10px;
        justify-content: space-around;
    }

    #nav > a {
        padding: 3px 4px;
    }
}
