.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{
    display:flex;
    align-items:center;
    gap:1px;
    font-size:1.35rem;
    font-weight:800;
    letter-spacing:-0.03em;
    white-space:nowrap;
}

.brand-icon{
    width:30px;
    height:30px;
    display:block;
    filter:
        drop-shadow(0 0 1px rgba(0,0,0,0.3))
        drop-shadow(0 0 3px rgba(0,0,0,0.2))
        drop-shadow(0 0 5px rgba(0,0,0,0.2));
}

.top-nav{
    display:flex;
    align-items:center;
    gap:10px;
    flex:1;
    justify-content:center;
}

.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;
    white-space:nowrap;
}

.top-nav a:hover{
    color:var(--text);
}

.top-nav a.active{
    color:var(--text);
    border-color:var(--accent-2);
    background:rgba(29,78,216,0.06);
}

.status-row{
    display:flex;
    align-items:center;
    flex:0 0 auto;
}

.lang-form{
    margin:0;
    display:flex;
    align-items:center;
}

.lang-form select{
    height:34px;
    padding:0 8px;
    border:1px solid var(--line);
    border-radius:999px;
    background:var(--surface);
    color:var(--text);
    font-size:.78rem;
    font-weight:800;
    letter-spacing:.04em;
    cursor:pointer;
    outline:none;
    width:auto;
    min-width:0;
    max-width:none;
    flex:0 0 auto;
}

.lang-form select:focus{
    border-color:var(--accent-2);
    box-shadow:0 0 0 3px rgba(29,78,216,.12);
}

.header-actions{
    display:flex;
    align-items:center;
    gap:8px;
    margin-left:auto;
    white-space:nowrap;
}

.header-search{
    display:flex;
    align-items:center;
    gap:8px;
    margin-left:0;
}

.header-search input{
    height:38px;
    min-width:160px;
    max-width:160px;
    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);
}

.search-btn{
    height:38px;
    width:38px;
    padding:0;
    display:flex;
    align-items:center;
    justify-content:center;
    border:1px solid var(--line-strong);
    border-radius:999px;
    background:var(--surface);
    cursor:pointer;
    flex:0 0 auto;
}

.search-btn img{
    width:16px;
    height:16px;
    object-fit:contain;
    opacity:.75;
}

.search-btn:hover{
    border-color:var(--accent-2);
    background:rgba(29,78,216,.06);
}

.search-btn:hover img{
    opacity:1;
}

.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;
}

.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);
}

.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);
}

.status-wrap{
    display:flex;
    align-items:center;
    gap:8px;
    flex:0 0 auto;
    white-space:nowrap;
}

.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:space-between;
        gap:10px;
    }

    .brand{
        order:1;
        margin:0 auto 0 0;
    }

    .status-row{
        order:2;
        margin:0 0 0 auto;
    }

    .status-wrap{
        order:2;
        margin-left:auto;
    }

    .header-actions,
    .header-search{
        order:3;
        width:100%;
    }

    .header-search{
        flex:1;
        justify-content:flex-end;
    }

    .header-search input{
        flex:1;
        max-width:none;
    }

    .top-nav{
        order:4;
        width:100%;
        flex:0 0 100%;
        justify-content:flex-start;
        overflow-x:auto;
        -webkit-overflow-scrolling:touch;
        scrollbar-width:none;
        -ms-overflow-style:none;
        padding:2px 0 4px;
        gap:10px;
    }

    .top-nav::-webkit-scrollbar{
        display:none;
    }
}

@media (max-width: 640px){
    .header-inner{
        padding:14px;
    }

    .header-actions{
        gap:6px;
    }

    .header-search{
        gap:6px;
    }

    .header-search input{
        min-width:0;
        font-size:0.85rem;
    }

    .header-search button{
        padding:0;
    }

    .lang-form select{
        height:32px;
        padding:0 8px;
        font-size:0.76rem;
    }

    .status{
        height:32px;
        padding:0 10px;
        font-size:0.78rem;
    }
}