        .custom-navbar {
            width: 100%;
            background: #fff;
            box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
            position: sticky;
            top: 0;
            z-index: 1100;
        }

        .nav-row {
            height: 64px;
            padding: 0 16px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 14px;
        }

        .brand {
            display: flex;
            align-items: center;
            gap: 10px;
            text-decoration: none;
        }

        .brand img {
            height: 40px;
        }

        .brand span {
            font-weight: 800;
            font-size: 18px;
            color: #0d6efd;
        }

        .right {
            position: relative;
            display: flex;
            align-items: center;
            gap: 14px;
        }

        .chat-icon,
        .friend-icon {
            position: relative;
            font-size: 22px;
            color: #0d6efd;
            text-decoration: none;
            line-height: 1;
            cursor: pointer;
            user-select: none;
        }

        .chat-icon:hover,
        .friend-icon:hover {
            opacity: .85;
        }

        .msg-badge,
        .friend-badge {
            position: absolute;
            top: -6px;
            right: -10px;
            min-width: 18px;
            height: 18px;
            padding: 0 5px;
            border-radius: 999px;
            background: #dc3545;
            color: #fff;
            font-weight: 900;
            font-size: 11px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border: 2px solid #fff;
            box-shadow: 0 6px 14px rgba(220, 53, 69, .35);
        }

        .friend-badge {
            background: #dc3545;
            /* đỏ */
            color: #fff;
            box-shadow: 0 6px 14px rgba(220, 53, 69, .35);
        }

        .dd-toggle {
            display: none;
        }

        .avatar-wrap {
            position: relative;
            width: 44px;
            height: 44px;
            cursor: pointer;
        }

        .avatar-circle {
            width: 42px;
            height: 42px;
            border-radius: 50%;
            overflow: hidden;
            border: 2px solid #fff;
            box-shadow: 0 8px 18px rgba(0, 0, 0, .12);
        }

        .avatar-circle img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        .avatar-caret {
            position: absolute;
            right: 2px;
            bottom: 2px;
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: #fff;
            border: 1.5px solid #e5e7eb;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 7px;
            color: #0f172a;
            box-shadow: 0 2px 4px rgba(0, 0, 0, .25);
            z-index: 3;
            transition: transform .25s ease;
        }

        #nav-dd:checked+label .avatar-caret {
            transform: rotate(180deg);
        }

        .dropdown {
            position: absolute;
            right: 0;
            top: calc(100% + 10px);
            min-width: 260px;
            background: #fff;
            border-radius: 14px;
            box-shadow: 0 18px 40px rgba(0, 0, 0, .14);
            padding: 8px;
            display: none;
            opacity: 0;
            transform: translateY(-8px) scale(.98);
            transition: .25s;
            z-index: 1110;
        }

        #nav-dd:checked~.dropdown {
            display: block;
            opacity: 1;
            transform: none;
        }

        .dropdown a {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px;
            border-radius: 12px;
            text-decoration: none;
            font-weight: 700;
            font-size: 14px;
            color: #0f172a;
        }

        .dropdown a:hover {
            background: rgba(2, 6, 23, .06);
        }

        .dropdown a.logout {
            color: #dc3545;
        }

        .mini-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            overflow: hidden;
        }

        .mini-avatar img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .name {
            font-weight: 800;
            font-size: 14px;
            max-width: 180px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .overlay {
            position: fixed;
            inset: 0;
            z-index: 1090;
            display: none;
        }

        #nav-dd:checked~.overlay {
            display: block;
        }

        .friend-wrap {
            position: relative;
        }

        .friend-label {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 26px;
            height: 26px;
            border-radius: 10px;
        }

        .friend-dropdown {
            position: absolute;
            right: 0;
            top: calc(100% + 10px);
            width: min(360px, calc(100vw - 24px));
            background: #fff;
            border-radius: 14px;
            box-shadow: 0 18px 40px rgba(0, 0, 0, .14);
            padding: 10px;
            display: none;
            opacity: 0;
            transform: translateY(-8px) scale(.98);
            transition: .25s;
            z-index: 1110;
        }

        #nav-friend-dd:checked~.friend-dropdown {
            display: block;
            opacity: 1;
            transform: none;
        }

        .friend-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            padding: 8px 8px 10px;
        }

        .friend-head .title {
            font-weight: 900;
            font-size: 14px;
            color: #0f172a;
        }

        .friend-head .count {
            font-weight: 900;
            font-size: 12px;
            color: #0d6efd;
            background: rgba(13, 110, 253, .1);
            border: 1px solid rgba(13, 110, 253, .2);
            padding: 4px 8px;
            border-radius: 999px;
        }

        .friend-list {
            display: flex;
            flex-direction: column;
            gap: 8px;
            padding: 0 6px 6px;
            max-height: 360px;
            overflow: auto;
        }

        .friend-item {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            padding: 10px;
            border-radius: 12px;
            border: 1px solid rgba(2, 6, 23, .08);
            background: #fff;
        }

        .friend-item:hover {
            background: rgba(2, 6, 23, .03);
        }

        .friend-ava {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            overflow: hidden;
            flex: 0 0 auto;
            background: #e9ecef;
        }

        .friend-ava img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        .friend-meta {
            min-width: 0;
            flex: 1 1 auto;
        }

        .friend-name {
            font-weight: 900;
            font-size: 14px;
            color: #0f172a;
            line-height: 1.15;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 240px;
            display: block;
        }

        .friend-actions {
            display: flex;
            gap: 8px;
            margin-top: 8px;
        }

        .fbtn {
            border: 0;
            padding: 8px 10px;
            border-radius: 10px;
            font-weight: 900;
            font-size: 12px;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        .fbtn-accept {
            background: #0d6efd;
            color: #fff;
        }

        .fbtn-decline {
            background: rgba(220, 53, 69, .1);
            color: #dc3545;
        }

        .friend-empty {
            padding: 14px 10px 10px;
            color: #64748b;
            font-weight: 800;
            font-size: 13px;
            text-align: center;
        }

        #nav-friend-dd:checked~.friend-overlay {
            display: block;
        }

        .friend-overlay {
            position: fixed;
            inset: 0;
            z-index: 1090;
            display: none;
        }
