/* 导航栏右侧内容样式 */
.navbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}
/* Navbar Top Bar */
.top-bar {
    margin-left: 0;
}

/* 搜索容器 */
.search-container {
    flex: 1;
    max-width: 400px;
    min-width: 280px;
    margin-right: 24px;
}
.search-container .search-form {
    width: 100%;
}
.search-container .search-input-wrapper {
    position: relative;
    width: 100%;
    height: 40px;
    background: rgba(255, 255, 255, 1);
    border: 1px solid rgba(229, 230, 235, 1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.search-container .search-input-wrapper:hover {
    border-color: rgba(63, 140, 255, 0.3);
    box-shadow: 0 4px 12px rgba(63, 140, 255, 0.08);
}
.search-container .search-input-wrapper:focus-within {
    border-color: rgba(63, 140, 255, 1);
    box-shadow: 0 4px 16px rgba(63, 140, 255, 0.15);
}
.search-container .search-icon {
    color: rgba(109, 114, 120, 0.6);
    font-size: 16px;
    margin-right: 12px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}
.search-container .search-input-wrapper:focus-within .search-icon {
    color: rgba(63, 140, 255, 1);
}
.search-container .search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: rgba(109, 114, 120, 1);
    font-family: PingFangSC-Regular;
    line-height: 1.4;
}
.search-container .search-input::placeholder {
    color: rgba(109, 114, 120, 0.5);
    font-size: 14px;
}
/* 右侧用户信息区域 */
.user-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    height: 100%;
}
/* 通知铃铛 */
.notification-wrapper {
    position: relative;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 1);
    border: 1px solid rgba(229, 230, 235, 1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.notification-wrapper:hover {
    border-color: rgba(63, 140, 255, 0.3);
    box-shadow: 0 4px 12px rgba(63, 140, 255, 0.15);
    transform: translateY(-1px);
}
.notification-wrapper .dropdown-toggle {
    position: relative;
    padding: 0.5rem 0.75rem;
}
.notification-wrapper .notification-icon {
    color: rgba(109, 114, 120, 0.8);
    font-size: 1.25rem;
    transition: all 0.3s ease;
}
.notification-wrapper:hover .notification-icon {
    color: rgba(63, 140, 255, 1);
    transform: scale(1.1);
}
/* 用户信息容器 */
.user-dropdown-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
}
.user-info-toggle {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    width: 100%;
    padding: 0.5rem 0.75rem;
}
.user-info-toggle:hover {
    text-decoration: none;
    color: inherit;
}
.user-info-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 8px;
    background: rgba(255, 255, 255, 1);
    /* border: 1px solid rgba(229, 230, 235, 1); */
    border-radius: 12px;
    padding: 6px 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 40px;
    width: auto;
    min-width: 120px;
    max-width: 180px;
    /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); */
}
.user-info-container:hover {
    border-color: rgba(63, 140, 255, 0.3);
    box-shadow: 0 4px 12px rgba(63, 140, 255, 0.15);
    transform: translateY(-1px);
}
.user-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    margin-right: 0.5rem;
    object-fit: cover;
    flex-shrink: 0;
}
.user-info-container .username {
    font-size: 14px;
    color: rgba(51, 51, 51, 0.85);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
    flex: 1;
    margin-right: 0.5rem;
}
.user-info-container .dropdown-arrow {
    font-size: 1rem;
    color: rgba(109, 114, 120, 0.6);
    margin-left: 4px;
    transition: transform 0.3s ease;
}
.user-info-container .dropdown.show .dropdown-arrow {
    transform: rotate(180deg);
}
/* 下拉菜单 - Scoped to Navbar */
.user-actions .dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid rgba(229, 230, 235, 1);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    min-width: 200px;
    padding: 8px 0;
    margin-top: 8px;
    z-index: 1060;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}
.user-actions .dropdown.show .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 修复下拉菜单箭头 */
.notification-wrapper .dropdown-toggle::after {
    display: none !important;
}

/* Arco Pro 风格 Tabs */
.notification-header {
    border-bottom: 1px solid #f0f0f0;
    padding: 0 8px;
}
.notification-header .nav-tabs {
    border-bottom: none;
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between; /* 均匀分布 */
    width: 100%;
}
.notification-header .nav-item {
    margin-bottom: 0;
    flex: 1; /* 平分宽度 */
    text-align: center;
}
.notification-header .nav-link {
    border: none;
    color: #4e5969;
    padding: 10px 4px; /* 减小内边距 */
    font-size: 14px;
    position: relative;
    background: transparent !important;
    transition: color 0.3s;
    white-space: nowrap; /* 不换行 */
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.notification-header .nav-link:hover {
    color: #165dff;
}
.notification-header .nav-link.active {
    color: #165dff;
    font-weight: 500;
}
.notification-header .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 2px;
    background-color: #165dff;
}

/* 消息列表样式 */
.msg-list .list-group-item {
    padding: 12px 16px;
    border: none;
    border-bottom: 1px solid #f2f3f5;
    transition: all 0.2s;
    display: block; /* 确保是块级元素 */
}
.msg-list .list-group-item:last-child {
    border-bottom: none;
}
.msg-list .list-group-item:hover {
    background-color: #f7f8fa;
}

/* 消息项头部：标题和时间 */
.msg-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
    width: 100%;
}
.msg-item-title {
    font-size: 14px;
    color: #1d2129;
    line-height: 1.5;
    flex: 1;
    min-width: 0; /* 关键属性：允许flex子项收缩 */
    margin-right: 8px;
    /* 标题单行显示 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%; /* 使用100%配合min-width:0自动计算 */
}

#msgModalContent {
    text-align: left;
}
.msg-item-title.unread {
    font-weight: 500;
}
/* 未读红点样式优化：2px圆角，高度小点 */
.msg-item-title.unread::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #f53f3f;
    border-radius: 2px; /* 圆角2px */
    margin-right: 6px;
    vertical-align: middle;
    margin-top: -2px;
}
.msg-item-time {
    font-size: 12px;
    color: #86909c;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 消息项底部：分类和查看详情 */
.msg-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2px; /* 往上靠近 */
}
.msg-item-type {
    font-size: 12px;
    color: #86909c;
    background: #f2f3f5;
    padding: 1px 6px;
    border-radius: 2px;
}
.msg-item-action {
    font-size: 12px;
    color: #165dff;
    opacity: 0;
    transition: opacity 0.2s;
}
.msg-list .list-group-item:hover .msg-item-action {
    opacity: 1;
}

/* Modal Scroll Fix: Removed unused messageModal styles */

#msgModalContent img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 10px auto;
    border-radius: 4px;
}
#msgModalContent p {
    margin-bottom: 10px;
    word-break: break-all;
}
