.admin-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgb(30 41 59 / 0.8);
    background: rgb(15 23 42 / 0.95);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}

.admin-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    max-width: 80rem;
    margin: 0 auto;
    padding: 0.625rem 1rem;
}

@media (min-width: 640px) {
    .admin-header__inner {
        padding: 0.75rem 1.5rem;
    }
}

@media (min-width: 768px) {
    .admin-header__inner {
        flex-wrap: nowrap;
        gap: 1rem;
        padding: 0.75rem 2rem;
    }
}

.admin-header__brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-width: 0;
    flex: 1;
    text-decoration: none;
}

@media (min-width: 768px) {
    .admin-header__brand {
        flex: 0 1 auto;
        max-width: 14rem;
    }
}

.admin-header__logo {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    object-fit: cover;
    flex-shrink: 0;
}

@media (min-width: 640px) {
    .admin-header__logo {
        width: 2.5rem;
        height: 2.5rem;
    }
}

.admin-header__user {
    min-width: 0;
}

.admin-header__name {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-header__username {
    margin: 0;
    font-size: 0.75rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-header__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 1px solid #1e293b;
    border-radius: 0.75rem;
    background: #020617;
    color: #94a3b8;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.15s, color 0.15s;
}

.admin-header__toggle:hover {
    border-color: rgb(249 177 122 / 0.5);
    color: #f9b17a;
}

@media (min-width: 768px) {
    .admin-header__toggle {
        display: none;
    }
}

.admin-header__toggle-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.admin-header__toggle-icon--close {
    display: none;
}

.admin-header.is-open .admin-header__toggle-icon--open {
    display: none;
}

.admin-header.is-open .admin-header__toggle-icon--close {
    display: block;
}

.admin-header__panel {
    display: none;
    width: 100%;
    order: 3;
}

.admin-header.is-open .admin-header__panel {
    display: block;
}

@media (min-width: 768px) {
    .admin-header__panel {
        display: contents;
    }
}

.admin-header__links {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

@media (min-width: 768px) {
    .admin-header__links {
        flex: 1;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.25rem;
        min-width: 0;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .admin-header__links::-webkit-scrollbar {
        display: none;
    }
}

.admin-header__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.75rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #94a3b8;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.15s, color 0.15s;
}

.admin-header__link:hover {
    background: rgb(30 41 59 / 0.6);
    color: #fff;
}

.admin-header__link.is-active {
    background: #f9b17a;
    color: #020617;
    box-shadow: 0 0 12px rgb(249 177 122 / 0.2);
}

.admin-header__link svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.admin-header__logout-wrap {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #1e293b;
}

@media (min-width: 768px) {
    .admin-header__logout-wrap {
        margin: 0;
        padding: 0;
        border: 0;
        flex-shrink: 0;
    }
}

.admin-header__logout {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid #1e293b;
    border-radius: 0.75rem;
    background: #020617;
    font-size: 0.875rem;
    font-weight: 600;
    color: #94a3b8;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

@media (min-width: 768px) {
    .admin-header__logout {
        width: auto;
    }
}

.admin-header__logout:hover {
    border-color: rgb(249 177 122 / 0.5);
    color: #f9b17a;
}

.admin-header__logout svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.admin-header__link-icon-wrap {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
}

.admin-header__link-icon-wrap--chat,
.admin-header__link-icon-wrap--receipts,
.admin-header__link-icon-wrap--notifications {
    /* Nav badge anchor — same position as messenger-style count */
}

.admin-header__chat-badge {
    position: absolute;
    top: -0.3rem;
    inset-inline-end: -0.35rem;
    z-index: 2;
    width: 1rem !important;
    height: 1rem !important;
    min-width: 1rem !important;
    max-width: 1rem !important;
    font-size: 0.5625rem !important;
    box-shadow: 0 0 0 2px rgb(15 23 42);
}

.admin-header__receipt-badge {
    position: absolute;
    top: -0.3rem;
    inset-inline-end: -0.35rem;
    z-index: 2;
    width: 1rem !important;
    height: 1rem !important;
    min-width: 1rem !important;
    max-width: 1rem !important;
    font-size: 0.5625rem !important;
    box-shadow: 0 0 0 2px rgb(15 23 42);
}

.admin-header__notification-badge {
    position: absolute;
    top: -0.3rem;
    inset-inline-end: -0.35rem;
    z-index: 2;
    width: 1rem !important;
    height: 1rem !important;
    min-width: 1rem !important;
    max-width: 1rem !important;
    font-size: 0.5625rem !important;
    box-shadow: 0 0 0 2px rgb(15 23 42);
}

.chat-unread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    min-width: 1.25rem;
    max-width: 1.25rem;
    padding: 0;
    border-radius: 50%;
    background-color: #dc2626 !important;
    color: #fff !important;
    font-size: 0.5625rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 0 0 2px rgb(15 23 42);
    box-sizing: border-box;
    flex-shrink: 0;
}

.chat-unread-badge--sm {
    width: 1.125rem;
    height: 1.125rem;
    min-width: 1.125rem;
    max-width: 1.125rem;
    font-size: 0.5rem;
}

.chat-unread-badge--lg {
    width: 1.375rem;
    height: 1.375rem;
    min-width: 1.375rem;
    max-width: 1.375rem;
    font-size: 0.5625rem;
}

.admin-header__link.is-active .chat-unread-badge {
    background-color: #dc2626 !important;
    color: #ffffff !important;
}

.admin-header__link.is-active .admin-header__chat-badge {
    box-shadow: 0 0 0 2px #f9b17a;
}

.admin-header__link.is-active .admin-header__receipt-badge {
    box-shadow: 0 0 0 2px #f9b17a;
}

.admin-header__link.is-active .admin-header__notification-badge {
    box-shadow: 0 0 0 2px #f9b17a;
}

.admin-header__link.is-active .nav-alert-badge--warning {
    background-color: #dc2626 !important;
    color: #ffffff !important;
}

.admin-header__link.is-active .nav-alert-badge--receipt {
    background-color: #f59e0b !important;
    color: #111827 !important;
}

.chat-list-item--unread {
    background: rgb(2 6 23 / 0.45);
}

.chat-list-item__count {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
}

.chat-list-item__count:empty {
    display: none;
}

.admin-header--guest .admin-header__inner {
    justify-content: space-between;
    flex-wrap: nowrap;
}

.admin-header__brand--guest {
    flex: 0 1 auto;
    max-width: none;
}

.admin-header__logo--guest {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 0.75rem;
}

@media (min-width: 640px) {
    .admin-header__logo--guest {
        width: 3.75rem;
        height: 3.75rem;
    }
}

@media (min-width: 768px) {
    .admin-header__logo--guest {
        width: 4.25rem;
        height: 4.25rem;
        border-radius: 0.875rem;
    }
}

.admin-header__login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-shrink: 0;
    padding: 0.625rem 1rem;
    border: 0;
    border-radius: 0.75rem;
    background: #f9b17a;
    font-size: 0.875rem;
    font-weight: 700;
    color: #0f172a;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s, transform 0.15s;
}

.admin-header__login-btn:hover {
    background: rgb(249 177 122 / 0.9);
    color: #0f172a;
}

@media (min-width: 640px) {
    .admin-header__login-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9375rem;
    }
}

.admin-header__login-btn svg {
    width: 1.125rem;
    height: 1.125rem;
    flex-shrink: 0;
}
