

/* =========================================================
   HEADER FRAME
========================================================= */

.header {
    position: sticky;
    top: 0;

    width: 100%;
    min-height: 110px;

    z-index: 9999;

    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    width: 100%;
    max-width: 1340px;
    min-width: 0;

    margin: 0 auto;
    padding: 20px;
}

/* =========================================================
   LOGO
========================================================= */

.header .logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex: 0 0 auto;

    width: fit-content;
    min-width: 0;

    gap: 0.85rem;

    color: inherit;
    text-decoration: none;
}

.header .logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 64px;

    width: 64px;
    height: 64px;

    overflow: visible;
}

.header .logo-icon img {
    width: 180px;
    height: 180px;

    object-fit: contain;
    transform: translate(-20px, 0);
}

.header .logo-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;

    margin: 0;

    line-height: 1.05;
    text-align: left;
}

.header .logo-wordmark {
    color: #32abef;

    font-family: "Font Awesome 6 Free", sans-serif;
    font-size: 1.95rem;
    font-weight: 800;

    letter-spacing: 0.03em;
}

.header .logo-title {
    color: #111111;

    font-size: 1.4rem;
    font-weight: 800;
}

.header .logo-subtitle {
    color: rgba(59, 92, 180, 0.55);

    font-size: 0.82rem;
    font-weight: 700;

    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* =========================================================
   NAVIGATION CONTAINER
========================================================= */

.header .nav-buttons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;

    min-width: 0;
    max-width: 100%;

    gap: 0.6rem;
    padding: 0.5rem;

    background: rgba(162, 219, 254, 0.89);
    border-radius: 18px;
}

/* =========================================================
   NAVIGATION BUTTONS
========================================================= */

.header .nav-buttons .btn,
.header .nav-buttons .nav-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;

    min-height: 40px;
    padding: 0.55rem 1.2rem;

    gap: 0.45rem;

    border: 0;
    border-radius: 999px;

    background:
        linear-gradient(
            135deg,
            #0ea5e9,
            #2563eb
        );

    color: #ffffff;

    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1;

    text-decoration: none;
    white-space: nowrap;

    cursor: pointer;

    box-shadow:
        inset 0 0 0 1px rgba(14, 165, 233, 0.25);

    transition:
        background 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.header .nav-buttons .btn:hover,
.header .nav-buttons .nav-pill:hover {
    background: #020202;
    color: #ffffff;

    transform: translateY(-1px);
    text-decoration: none;
}

.header .nav-buttons .btn:focus-visible,
.header .nav-buttons .nav-pill:focus-visible {
    outline: 3px solid rgba(14, 165, 233, 0.35);
    outline-offset: 2px;
}

.header .nav-buttons .btn i,
.header .nav-buttons .nav-pill i {
    font-size: 0.9rem;
}

.header .nav-buttons .btn[href*="logout"] {
    color: #b91c1c;
}

/* =========================================================
   STOP IMPERSONATING
========================================================= */

.header .nav-buttons .nav-pill.impersonate-stop {
    border: 1px solid rgba(147, 51, 234, 0.25);

    background: #e0f2fe;
    color: #000000;

    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.header .nav-buttons .nav-pill.impersonate-stop i {
    color: #000000;
}

.header .nav-buttons .nav-pill.impersonate-stop:hover {
    border-color: rgba(124, 58, 237, 0.35);

    background: #e0f2fe;
    color: #000000;

    box-shadow: 0 5px 14px rgba(124, 58, 237, 0.18);
}

/* =========================================================
   MOBILE HEADER
========================================================= */

@media (max-width: 768px) {

    .header {
        min-height: 0;
    }

    .header-container {
        flex-direction: column;
        align-items: stretch;

        gap: 0.75rem;
        padding: 0.75rem 1rem;
    }

    .header .logo {
        justify-content: center;

        width: 100%;
        min-width: 0;

        padding: 14px 18px;

        background:
            linear-gradient(
                180deg,
                #ffffff,
                #f8fafc
            );

        border: 1px solid rgba(0, 0, 0, 0.05);
        border-radius: 18px;

        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);

        text-align: center;
    }
    
    .header .logo-icon img {
    width: 130px;
    height: 130px;

    transform: translate(15px, 8px);
}

    .header .logo-text {
        align-items: center;

        margin: 0;

        text-align: center;
    }

    .header .logo-wordmark {
        font-size: 1.95rem;
    }

    .header .logo-title {
        font-size: 1.2rem;
    }

    .header .logo-subtitle {
        font-size: 0.8rem;
        letter-spacing: 0.1em;
    }

    .header .nav-buttons {
        justify-content: flex-start;
        flex-wrap: nowrap;

        width: 100%;
        max-width: 100%;
        min-width: 0;

        gap: 8px;
        padding: 6px 0;

        overflow-x: auto;
        overflow-y: hidden;

        white-space: nowrap;

        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .header .nav-buttons::-webkit-scrollbar {
        display: none;
    }

    .header .nav-buttons .btn,
    .header .nav-buttons .nav-pill {
        flex: 0 0 auto;
        white-space: nowrap;
    }
}