/* ============================================================
 * 通知（评论）管理组件样式（独立组件，前缀 nt-）
 * 主色：#1677ff ｜ 页面底：#f5f7fa ｜ 文本：#1f2329 / #646a73 / #8f959e
 * ============================================================ */

.nt-panel {
    display: flex;
    height: 100%;
    min-height: 460px;
    background: #f5f7fa;
    border-radius: 8px;
    overflow: hidden;
    font-size: 13px;
    color: #1f2329;
    box-shadow: 0 1px 6px rgba(31, 35, 41, 0.06);
}

/* ---------------- 左侧：通知列表 ---------------- */
.nt-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #eef0f4;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.nt-search {
    position: relative;
    padding: 16px 14px 12px;
    flex-shrink: 0;
}

.nt-search-icon {
    position: absolute;
    left: 27px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    pointer-events: none;
}

.nt-search-input {
    width: 100%;
    height: 36px;
    padding: 0 12px 0 38px;
    border: 1px solid #e5e6eb;
    border-radius: 8px;
    background: #f7f8fa;
    font-size: 13px;
    color: #1f2329;
    outline: none;
    box-sizing: border-box;
    transition: border-color .2s, background .2s, box-shadow .2s;
}

.nt-search-input:focus {
    border-color: #1677ff;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
}

.nt-search-input::placeholder {
    color: #a3a9b3;
}

/* 标签栏 */
.nt-filter {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 14px 12px;
    border-bottom: 1px solid #f0f1f4;
    flex-shrink: 0;
}

.nt-filter-item {
    flex: 1;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 12px;
    color: #646a73;
    border-radius: 6px;
    cursor: pointer;
    transition: background .2s, color .2s;
    user-select: none;
}

.nt-filter-item:hover {
    background: #f5f7fa;
    color: #1f2329;
}

.nt-filter-item.is-active {
    background: rgba(22, 119, 255, 0.08);
    color: #1677ff;
    font-weight: 600;
}

.nt-filter-count {
    font-style: normal;
    font-size: 11px;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    border-radius: 8px;
    background: #f0f1f4;
    color: #8f959e;
    padding: 0 4px;
    box-sizing: border-box;
}

.nt-filter-item.is-active .nt-filter-count {
    background: rgba(22, 119, 255, 0.14);
    color: #1677ff;
}

/* 通知列表 */
.nt-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 8px 16px;
}

.nt-list::-webkit-scrollbar,
.nt-detail::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.nt-list::-webkit-scrollbar-thumb,
.nt-detail::-webkit-scrollbar-thumb {
    background: #e2e5ea;
    border-radius: 3px;
}

.nt-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 10px;
    margin-bottom: 2px;
    border-radius: 8px;
    cursor: pointer;
    transition: background .18s;
}

.nt-item:hover {
    background: #f5f7fa;
}

.nt-item.is-active {
    background: rgba(22, 119, 255, 0.08);
}

.nt-item-avatar {
    position: relative;
    flex-shrink: 0;
    margin-right: 12px;
}

/* 平台标识角标（头像右下角） */
.nt-platform-badge {
    position: absolute;
    right: -3px;
    bottom: -3px;
    width: 15px;
    height: 15px;
    padding: 1px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 1px #fff, 0 1px 3px rgba(31, 35, 41, 0.18);
    box-sizing: content-box;
    z-index: 2;
}

.nt-platform-badge img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: block;
}

.nt-avatar {
    display: inline-block;
    width: 38px;
    height: 38px;
    line-height: 38px;
    text-align: center;
    border-radius: 50%;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    flex-shrink: 0;
    overflow: hidden;
}

.nt-item-body {
    flex: 1;
    min-width: 0;
}

.nt-item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nt-item-type {
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 4px;
    line-height: 16px;
    flex-shrink: 0;
}

.nt-item-type.is-dm {
    color: #1677ff;
    background: rgba(22, 119, 255, 0.1);
}

.nt-item-type.is-comment {
    color: #14a66f;
    background: rgba(20, 166, 111, 0.1);
}

.nt-item-time {
    font-size: 11px;
    color: #a3a9b3;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    margin-left: 6px;
}

/* 列表项昵称（浅色，弱化，突出内容） */
.nt-item-name {
    flex: 1;
    min-width: 0;
    margin-left: 6px;
    font-size: 13px;
    font-weight: 400;
    color: #8f959e;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 未读数字气泡（与私信一致：头像右上角，默认1） */
.nt-dot {
    position: absolute;
    right: -4px;
    top: -4px;
    min-width: 17px;
    height: 17px;
    line-height: 17px;
    text-align: center;
    font-style: normal;
    font-size: 10px;
    color: #fff;
    background: #f5222d;
    border-radius: 9px;
    padding: 0 4px;
    box-sizing: border-box;
    box-shadow: 0 0 0 2px #fff;
    z-index: 3;
}

/* 列表行右侧未读数：垂直居中、更小巧 */
.nt-item-right {
    flex-shrink: 0;
    margin-left: 8px;
    display: flex;
    align-items: center;
    align-self: center;
}
.nt-item-right .nt-dot {
    position: static;
    min-width: 15px;
    height: 15px;
    line-height: 15px;
    font-size: 9px;
    border-radius: 8px;
    box-shadow: none;
}

/* 回复/评论内容（重点突出） */
.nt-item-content {
    font-size: 13px;
    color: #1f2329;
    font-weight: 600;
    margin-top: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nt-item-meta {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    color: #8f959e;
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nt-platform-icon {
    width: 13px;
    height: 13px;
    border-radius: 3px;
    flex-shrink: 0;
}

.nt-list-empty {
    padding: 60px 0;
    text-align: center;
    color: #a3a9b3;
    font-size: 13px;
}

.nt-list-empty-icon {
    display: block;
    margin-bottom: 10px;
}

/* 通知列表触底加载提示 */
.nt-list-more {
    padding: 10px 0;
    text-align: center;
    color: #a3a9b3;
    font-size: 12px;
}

/* ---------------- 右侧：通知详情 ---------------- */
.nt-main {
    flex: 1;
    min-width: 0;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.nt-main-head {
    height: 48px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding: 0 20px;
    font-size: 14px;
    font-weight: 600;
    color: #1f2329;
    border-bottom: 1px solid #eef0f4;
}

.nt-detail {
    flex: 1;
    overflow-y: auto;
    padding: 18px 20px;
    background: #f5f7fa;
    box-sizing: border-box;
}

.nt-empty {
    padding: 100px 0;
    text-align: center;
    color: #b4bac4;
}

/* 详情卡片 */
.nt-card {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #eef0f4;
    padding: 16px 18px;
    box-shadow: 0 1px 4px rgba(31, 35, 41, 0.04);
    animation: ntFadeIn .25s ease;
}

@keyframes ntFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.nt-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f1f4;
}

.nt-card-type {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: 5px;
    flex-shrink: 0;
}

.nt-card-type.is-dm {
    color: #1677ff;
    background: rgba(22, 119, 255, 0.1);
}

.nt-card-type.is-comment {
    color: #14a66f;
    background: rgba(20, 166, 111, 0.1);
}

.nt-card-account {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #8f959e;
}

.nt-card-time {
    margin-left: auto;
    font-size: 12px;
    color: #a3a9b3;
    flex-shrink: 0;
}

.nt-card-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    color: #1677ff;
    background: rgba(22, 119, 255, 0.08);
    flex-shrink: 0;
    text-decoration: none;
    transition: background .2s;
}

.nt-card-link:hover {
    background: rgba(22, 119, 255, 0.16);
}

.nt-card-body {
    padding: 14px 0;
}

.nt-card-user {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.nt-card-user-name {
    font-size: 14px;
    font-weight: 600;
    color: #1f2329;
}

.nt-card-msg {
    background: #f7f8fa;
    border-radius: 8px;
    padding: 10px 14px;
}

.nt-card-comment-box {
    border-left: 3px solid #14a66f;
}

.nt-card-msg-label {
    font-size: 11px;
    color: #8f959e;
    margin-bottom: 5px;
}

.nt-card-msg-head {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
}

.nt-card-msg-head .nt-card-msg-label {
    margin-bottom: 0;
}

.nt-card-msg-head .nt-card-link {
    width: 20px;
    height: 20px;
}

.nt-card-msg-content {
    font-size: 13px;
    color: #1f2329;
    line-height: 1.6;
    word-break: break-word;
}

.nt-card-msg-content.is-link {
    color: #1677ff;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.nt-card-msg-content.is-link:hover {
    color: #0e5fd8;
}

.nt-replied {
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(22, 119, 255, 0.06);
    border-radius: 8px;
    font-size: 12px;
    color: #1677ff;
    line-height: 1.5;
}

/* 快捷回复 */
.nt-card-reply {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    border-top: 1px dashed #eef0f4;
}

.nt-reply-input {
    flex: 1;
    height: 34px;
    padding: 0 12px;
    border: 1px solid #e5e6eb;
    border-radius: 6px;
    font-size: 13px;
    color: #1f2329;
    outline: none;
    box-sizing: border-box;
    transition: border-color .2s, box-shadow .2s;
}

.nt-reply-input:focus {
    border-color: #1677ff;
    box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
}

.nt-reply-input::placeholder {
    color: #b4bac4;
}

.nt-send-btn {
    flex-shrink: 0;
    height: 34px;
    padding: 0 18px;
    border: none;
    border-radius: 6px;
    background: #1677ff;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: background .2s;
}

.nt-send-btn:hover {
    background: #0f6ce8;
}

/* 操作按钮 */
.nt-card-actions {
    display: flex;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid #f0f1f4;
}

.nt-btn-primary {
    height: 32px;
    padding: 0 16px;
    border: none;
    border-radius: 6px;
    background: #1677ff;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    transition: background .2s, box-shadow .2s;
    box-shadow: 0 2px 6px rgba(22, 119, 255, 0.25);
}

.nt-btn-primary:hover {
    background: #0f6ce8;
}

.nt-btn-default {
    height: 32px;
    padding: 0 16px;
    border: 1px solid #d9dce1;
    border-radius: 6px;
    background: #fff;
    color: #1f2329;
    font-size: 12px;
    cursor: pointer;
    transition: all .2s;
}

.nt-btn-default:hover {
    border-color: #1677ff;
    color: #1677ff;
    background: rgba(22, 119, 255, 0.04);
}

/* 发起新私信弹窗 */
.nt-newdm .nt-form-item {
    margin-bottom: 14px;
}

.nt-newdm label {
    display: block;
    font-size: 12px;
    color: #646a73;
    margin-bottom: 6px;
}

.nt-newdm select,
.nt-newdm input,
.nt-newdm textarea {
    width: 100%;
    height: 34px;
    padding: 0 10px;
    border: 1px solid #e5e6eb;
    border-radius: 6px;
    font-size: 13px;
    color: #1f2329;
    outline: none;
    box-sizing: border-box;
    background: #fff;
}

.nt-newdm textarea {
    height: auto;
    padding: 8px 10px;
    line-height: 1.6;
    resize: none;
}

.nt-newdm select:focus,
.nt-newdm input:focus,
.nt-newdm textarea:focus {
    border-color: #1677ff;
    box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
}

/* 归属账号：搜索框（下拉选择器）+ 账号列表 */
.nt-nm-account-wrap {
    position: relative;
}

.nt-newdm .nt-nm-account-search {
    padding-right: 30px;
    cursor: pointer;
    background-color: #fff;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238f959e' d='M2.5 4.5 6 8l3.5-3.5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.nt-nm-account-list {
    max-height: 168px;
    overflow-y: auto;
    border: 1px solid #e5e6eb;
    border-radius: 6px;
    margin-top: 6px;
    background: #fff;
}

.nt-nm-account-list::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

.nt-nm-account-list::-webkit-scrollbar-thumb {
    background: #e2e5ea;
    border-radius: 3px;
}

.nt-nm-account-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    cursor: pointer;
    transition: background .15s;
    border-bottom: 1px solid #f7f8fa;
}

.nt-nm-account-item:last-child {
    border-bottom: none;
}

.nt-nm-account-item:hover {
    background: #f5f7fa;
}

.nt-nm-account-item.is-selected {
    background: rgba(22, 119, 255, 0.08);
}

.nt-nm-account-item.is-selected .nt-nm-account-name {
    color: #1677ff;
    font-weight: 600;
}

.nt-nm-account-icon {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    flex-shrink: 0;
}

.nt-nm-account-name {
    font-size: 13px;
    color: #1f2329;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nt-nm-account-empty {
    padding: 12px;
    text-align: center;
    font-size: 12px;
    color: #a3a9b3;
}

/* 发起新私信弹窗：发送中锁定发送按钮，防止重复提交 */
.nt-newdm-layer .layui-m-layerbtn span[type="1"].is-sending {
    pointer-events: none;
    opacity: 0.6;
    cursor: default;
}
