.site-header{
    position:sticky;
    top:0;
    z-index:50;
    background:rgba(255,255,255,0.92);
    backdrop-filter:blur(10px);
    border-bottom:1px solid rgba(15,23,42,0.08);
}

.header-inner{
    max-width:var(--max);
    margin:0 auto;
    padding:16px 24px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
}

.brand{
    font-size:1.35rem;
    font-weight:800;
    letter-spacing:-0.03em;
    white-space:nowrap;
}

.top-nav{
    display:flex;
    align-items:center;
    gap:18px;
    flex:1;
    justify-content:center;
}

.top-nav a{
    font-size:0.95rem;
    font-weight:600;
    color:var(--muted);
    transition:color .2s ease;
}

.top-nav a{
    font-size:0.95rem;
    font-weight:600;
    color:var(--muted);
    padding:6px 10px;
    border-radius:999px;
    border:1px solid transparent;
    transition:color .2s ease, border-color .2s ease, background .2s ease;
}

.top-nav a:hover{
    color:var(--text);
}

/* selected category */
.top-nav a.active{
    color:var(--text);
    border-color:var(--accent-2); /* blue outline */
    background:rgba(29,78,216,0.06); /* optional subtle fill */
}

.status{
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:8px 12px;
    border:1px solid var(--line);
    border-radius:999px;
    background:var(--surface);
    font-size:0.86rem;
    color:var(--muted);
    white-space:nowrap;
}

.dot{
    width:10px;
    height:10px;
    border-radius:50%;
    background:#94a3b8;
}

.dot.ok{
    background:var(--ok);
}

.dot.bad{
    background:var(--bad);
}

@media (max-width: 860px){
    .header-inner{
        flex-wrap:wrap;
        justify-content:center;
    }

    .top-nav{
        order:3;
        width:100%;
        justify-content:flex-start;
        overflow-x:auto;
        padding-bottom:2px;
    }
}

@media (max-width: 640px){
    .header-inner{
        padding:14px;
    }
}

/* --- SEARCH BOX --- */

.header-search{
    display:flex;
    align-items:center;
    gap:8px;
    margin-left:auto;
}

.header-search input{
    height:38px;
    min-width:180px;
    max-width:240px;
    padding:0 14px;
    border:1px solid var(--line);
    border-radius:999px;
    background:var(--surface);
    font-size:0.9rem;
    color:var(--text);
    outline:none;
    transition:border-color .2s ease, box-shadow .2s ease;
}

.header-search input::placeholder{
    color:var(--muted);
}

.header-search input:focus{
    border-color:var(--accent-2);
    box-shadow:0 0 0 2px rgba(29,78,216,0.15);
}

.header-search button{
    height:38px;
    padding:0 14px;
    border-radius:999px;
    border:1px solid var(--line-strong);
    background:var(--surface);
    font-size:0.85rem;
    font-weight:600;
    cursor:pointer;
    transition:all .2s ease;
}

.header-search button:hover{
    background:var(--surface-soft);
}

/* --- RESPONSIVE --- */

@media (max-width: 860px){
    .header-search{
        order:2;
        width:100%;
        justify-content:flex-end;
    }

    .header-search input{
        flex:1;
        max-width:none;
    }
}

@media (max-width: 640px){
    .header-search{
        flex-direction:row;
        gap:6px;
    }

    .header-search input{
        min-width:0;
        font-size:0.85rem;
    }

    .header-search button{
        padding:0 12px;
    }
}

.header-actions{
    display:flex;
    align-items:center;
    gap:8px;
    margin-left:auto;
    white-space:nowrap;
}

.lang-switcher{
    display:flex;
    align-items:center;
    flex:0 0 auto;
}

.lang-switcher select{
    height:38px;
    min-width:68px;
    padding:0 10px;
    border:1px solid var(--line-strong);
    border-radius:999px;
    background:var(--surface);
    color:var(--text);
    font-size:0.85rem;
    font-weight:700;
    cursor:pointer;
    outline:none;
}

.lang-switcher select:focus{
    border-color:var(--accent-2);
    box-shadow:0 0 0 2px rgba(29,78,216,0.15);
}

.header-search{
    display:flex;
    align-items:center;
    gap:8px;
    margin-left:0;
}

@media (max-width: 860px){
    .header-actions{
        order:2;
        width:100%;
        justify-content:flex-end;
    }

    .header-search{
        flex:1;
        justify-content:flex-end;
    }

    .header-search input{
        flex:1;
        max-width:none;
    }
}

@media (max-width: 640px){
    .header-actions{
        gap:6px;
    }

    .header-search{
        gap:6px;
    }

    .lang-switcher select{
        min-width:62px;
        padding:0 8px;
        font-size:0.8rem;
    }
}

.url-add-btn{
    height:38px;
    padding:0 14px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border:1px solid var(--line);
    border-radius:999px;
    background:var(--surface);
    color:var(--text);
    font-size:.86rem;
    font-weight:800;
    text-decoration:none;
    white-space:nowrap;
}

.url-add-btn:hover{
    background:var(--surface-soft);
}

.search-icon-btn{
    width:38px;
    height:38px;
    padding:0;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border:0;
    border-radius:999px;
    background:var(--accent);
    cursor:pointer;
    flex:0 0 auto;
}

.search-icon-btn img{
    width:17px;
    height:17px;
    display:block;
    object-fit:contain;
}