/* =========================================================
   Header and top navigation
   Dev banner, logo, search, nav, logout
   ========================================================= */

.dev-banner {
    position: sticky;
    top: 0;
    z-index: 9999;

    background: #fbbf24;
    color: #111827;

    padding: 10px 16px;

    text-align: center;

    font-weight: 600;
    font-size: 14px;
}

.dev-banner a {
    color: #111827;
    text-decoration: underline;
    font-weight: 700;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;

    display: flex;
    justify-content: space-between;
    align-items: center;

    width: 100%;
    max-width: 100%;

    padding: 18px 42px;

    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(18px);

    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    overflow-x: hidden;
}

.site-logo a {
    color: white;

    text-decoration: none;

    font-size: 30px;
    font-weight: 800;
    letter-spacing: -1px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 25px;
}

.header-search input {
    width: 240px;

    background: #0f172a;
    border: 1px solid #334155;

    color: white;

    padding: 10px 14px;
    border-radius: 10px;
}

.header-search input::placeholder {
    color: #94a3b8;
}

.site-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.site-nav a {
    color: #38bdf8;

    text-decoration: none;

    font-size: 17px;
    font-weight: bold;

    transition: 0.3s;
}

.site-nav a:hover {
    color: white;
}

.user-name {
    color: #cbd5e1;
    font-weight: 600;
}

.header-premium-btn {
    position: relative;
    isolation: isolate;
    overflow: hidden;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 42px;
    padding: 10px 22px;

    border-radius: 999px;

    background:
        linear-gradient(135deg, #f8e7a2 0%, #f3c766 44%, #b8872d 100%);

    color: #171103 !important;

    font-size: 15px;
    font-weight: 950;

    text-decoration: none;
    white-space: nowrap;

    border: 1px solid rgba(255, 235, 170, 0.52);

    box-shadow:
        0 16px 36px rgba(248, 199, 102, 0.18),
        0 8px 22px rgba(2, 6, 23, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.45);

    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease,
        filter 0.22s ease;
}

.header-premium-btn::after {
    content: "";

    position: absolute;
    top: -60%;
    left: -45%;

    width: 42%;
    height: 220%;

    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.42),
        transparent
    );

    transform: rotate(18deg) translateX(-120%);
    transition: transform 0.55s ease;
}

.header-premium-btn:hover {
    transform: translateY(-2px);
    filter: saturate(1.06);

    color: #171103 !important;

    box-shadow:
        0 22px 48px rgba(248, 199, 102, 0.27),
        0 12px 28px rgba(2, 6, 23, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.header-premium-btn:hover::after {
    transform: rotate(18deg) translateX(360%);
}
.logout-form {
    display: inline;
    margin: 0;
}

.logout-link {
    background: none;
    border: none;

    color: #38bdf8;

    font: inherit;
    font-weight: 700;

    cursor: pointer;

    padding: 0;

    box-shadow: none;
}

.logout-link:hover {
    color: #7dd3fc;
    transform: none;
    box-shadow: none;
}

.header-pro-badge {
    position: relative;
    isolation: isolate;
    overflow: hidden;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 42px;
    padding: 10px 20px;

    border-radius: 999px;

    background:
        radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.16), transparent 26%),
        linear-gradient(135deg, rgba(16, 24, 42, 0.96), rgba(9, 14, 27, 0.96));

    color: #eaf6ff !important;

    font-size: 15px;
    font-weight: 950;

    text-decoration: none;
    letter-spacing: 0.01em;
    white-space: nowrap;

    border: 1px solid rgba(125, 211, 252, 0.34);

    box-shadow:
        0 18px 42px rgba(2, 6, 23, 0.34),
        0 0 0 1px rgba(255, 255, 255, 0.03) inset,
        0 0 28px rgba(56, 189, 248, 0.12);

    transition:
        transform 0.22s ease,
        border-color 0.22s ease,
        box-shadow 0.22s ease,
        color 0.22s ease;
}

.header-pro-badge::before {
    content: "PRO";

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 24px;
    margin-right: 9px;
    padding: 0 9px;

    border-radius: 999px;

    background: linear-gradient(135deg, #f8e7a2, #f3c766 48%, #b8872d);
    color: #171103;

    font-size: 11px;
    font-weight: 950;
    letter-spacing: 0.08em;

    box-shadow:
        0 8px 18px rgba(248, 199, 102, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.52);
}

.header-pro-badge::after {
    content: "";

    position: absolute;
    inset: -80% -30% auto auto;
    z-index: -1;

    width: 90px;
    height: 90px;

    background: radial-gradient(circle, rgba(56, 189, 248, 0.30), transparent 62%);
    opacity: 0.7;

    transition:
        transform 0.32s ease,
        opacity 0.32s ease;
}

.header-pro-badge:hover {
    transform: translateY(-2px);

    color: #ffffff !important;
    border-color: rgba(248, 199, 102, 0.46);

    box-shadow:
        0 24px 54px rgba(2, 6, 23, 0.42),
        0 0 0 1px rgba(248, 199, 102, 0.12) inset,
        0 0 36px rgba(56, 189, 248, 0.18);
}

.header-pro-badge:hover::after {
    transform: translate(-14px, 16px) scale(1.18);
    opacity: 1;
}

/* ---------- Header responsive ---------- */

@media (max-width: 768px) {
    .site-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;

        padding: 22px 16px;
    }

    .site-logo a {
        font-size: 28px;
    }

    .header-right {
        width: 100%;

        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
    }

    .header-search,
    .header-search input {
        width: 100%;
        max-width: 100%;
    }

    .site-nav {
        gap: 18px;
        flex-wrap: wrap;
    }

    .site-nav a {
        font-size: 18px;
    }
}

.site-nav > a:not(.header-premium-btn):not(.header-pro-badge) {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 38px;
    padding: 8px 2px;

    color: #6fd3ff;

    transition:
        color 0.22s ease,
        transform 0.22s ease;
}

.site-nav > a:not(.header-premium-btn):not(.header-pro-badge)::after {
    content: "";

    position: absolute;
    left: 0;
    right: 0;
    bottom: 2px;

    height: 2px;
    border-radius: 999px;

    background: linear-gradient(90deg, #38bdf8, #8b5cf6);

    transform: scaleX(0);
    transform-origin: right;

    transition: transform 0.24s ease;
}

.site-nav > a:not(.header-premium-btn):not(.header-pro-badge):hover {
    color: #ffffff;
    transform: translateY(-1px);
}

.site-nav > a:not(.header-premium-btn):not(.header-pro-badge):hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.logout-link {
    transition:
        color 0.22s ease,
        transform 0.22s ease;
}

.logout-link:hover {
    color: #ffffff;
    transform: translateY(-1px);
}