/* 夜航船 - 基础样式 */

:root {
    --ui-bg: #f5f6f8;
    --ui-surface: rgba(255, 255, 255, 0.88);
    --ui-surface-soft: rgba(246, 247, 248, 0.82);
    --ui-border: #dfe3e6;
    --ui-border-strong: #c8cdd2;
    --ui-text: #1c2d28;
    --ui-muted: #63756f;
    --ui-accent: #0f766e;
    --ui-accent-hover: #115e59;
    --ui-accent-soft: #dcefeb;
    --ui-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
    --ui-shadow-raised: 0 10px 28px rgba(15, 23, 42, 0.13);
    --ui-radius: 12px;
    --sidebar-width: 200px;
}

html {
    scroll-behavior: smooth;
}

body {
    color: var(--ui-text);
    background: var(--ui-bg);
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei UI", system-ui, -apple-system, sans-serif;
    text-rendering: optimizeLegibility;
}

/* ============================================================
   登录页 - 暗色主题 · 粒子动画 · 分栏布局
   ============================================================ */

/* 根容器 */
.login-wrapper {
    position: relative;
    min-height: 100dvh;
    display: flex;
    background: var(--ui-bg);
    overflow: hidden;
    font-family: 'Outfit', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* 粒子画布 */
#loginParticles {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* ---- 左侧品牌面板 ---- */
.login-brand-panel {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: var(--ui-text);
    background: #f8f9fa;
    border-right: 1px solid #e4e7ea;
}

.login-brand-inner {
    text-align: center;
    max-width: 360px;
    animation: loginFadeUp 0.8s ease both;
}

/* 品牌标志 - 月球 SVG */
.login-brand-moon {
    width: 140px;
    height: 140px;
    margin: 0 auto 32px;
    color: rgba(15, 118, 110, 0.62);
    animation: loginMoonFloat 6s ease-in-out infinite;
}
.login-brand-moon svg {
    width: 100%;
    height: 100%;
}

.login-brand-name {
    font-size: 2.6rem;
    font-weight: 200;
    letter-spacing: 0.18em;
    color: #173f3a;
    margin: 0 0 8px;
}

.login-brand-sub {
    font-size: 0.95rem;
    color: #6f817c;
    font-weight: 300;
    letter-spacing: 0.04em;
    margin: 0;
}

.login-brand-line {
    width: 48px;
    height: 1px;
    background: #bdd8d1;
    margin: 28px auto;
}

.login-brand-desc {
    font-size: 0.9rem;
    color: #8b9d98;
    font-weight: 300;
    line-height: 1.8;
    letter-spacing: 0.03em;
}

/* ---- 右侧表单面板 ---- */
.login-form-panel {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    background: rgba(255, 255, 255, 0.78);
    animation: loginFadeUp 0.8s 0.15s ease both;
}

.login-form-card {
    width: 100%;
    max-width: 380px;
}

.login-form-title {
    font-size: 1.6rem;
    font-weight: 600;
    color: #203b35;
    letter-spacing: 0.03em;
    margin: 0 0 36px;
}

/* 提示消息 */
.login-alert {
    font-size: 0.875rem;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 24px;
    font-weight: 400;
    animation: loginFadeUp 0.3s ease both;
}
.login-alert-success {
    background: rgba(52, 211, 153, 0.12);
    color: #6ee7b7;
    border: 1px solid rgba(52, 211, 153, 0.2);
}
.login-alert-danger, .login-alert-error {
    background: rgba(248, 113, 113, 0.12);
    color: #fca5a5;
    border: 1px solid rgba(248, 113, 113, 0.2);
}
.login-alert-warning {
    background: rgba(251, 191, 36, 0.12);
    color: #fde68a;
    border: 1px solid rgba(251, 191, 36, 0.2);
}

/* 表单字段 */
.login-field {
    margin-bottom: 24px;
}

.login-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: #70807c;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.login-input {
    display: block;
    width: 100%;
    padding: 14px 16px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--ui-text);
    background: #fff;
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius);
    outline: none;
    transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}
.login-input::placeholder {
    color: #a6b3b0;
}
.login-input:focus {
    background: #fff;
    border-color: #75aaa2;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}
.login-input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #fff inset;
    -webkit-text-fill-color: var(--ui-text);
}

/* 提交按钮 */
.login-submit {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    margin-top: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: #fff;
    background: var(--ui-accent);
    border: 1px solid var(--ui-accent);
    border-radius: var(--ui-radius);
    cursor: pointer;
    outline: none;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.login-submit:hover {
    background: var(--ui-accent-hover);
    border-color: var(--ui-accent-hover);
    box-shadow: 0 8px 20px rgba(15, 118, 110, 0.2);
}
.login-submit:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}
.login-submit:focus-visible {
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.18);
}

.login-submit-text {
    flex: 1;
    text-align: center;
}
.login-submit-arrow {
    font-size: 1.15rem;
    opacity: 0.4;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.login-submit:hover .login-submit-arrow {
    opacity: 0.8;
    transform: translateX(3px);
}

/* ---- 动画 ---- */
@keyframes loginFadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes loginMoonFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ---- 密码输入行 + 偷看小人 ---- */
.login-password-row {
    position: relative;
    display: flex;
    align-items: center;
}
.login-password-row .login-input {
    flex: 1;
    padding-right: 44px; /* 给小人留空间 */
}

.peek-guard {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%) translateX(0);
    width: 36px;
    height: 40px;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 2;
}
.peek-guard .peek-svg {
    width: 100%;
    height: 100%;
}

/* 聚焦：小人贴近输入框 */
.peek-guard--watching {
    transform: translateY(-50%) translateX(-3px);
}

/* 小人手部动画 */
.peek-hand {
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.peek-guard--watching .peek-hand-left {
    transform: translateX(1px) translateY(1px);
}
.peek-guard--watching .peek-hand-right {
    transform: translateX(-1px) translateY(1px);
}

/* ---- 响应式 ---- */
@media (max-width: 768px) {
    .login-wrapper {
        flex-direction: column;
    }

    .login-brand-panel {
        flex: 0 0 auto;
        padding: 48px 32px 24px;
        border-right: 0;
        border-bottom: 1px solid #e4e7ea;
    }

    .login-brand-moon {
        width: 90px;
        height: 90px;
        margin-bottom: 20px;
    }

    .login-brand-name {
        font-size: 1.8rem;
    }

    .login-brand-line {
        margin: 18px auto;
    }

    .login-brand-desc {
        display: none;
    }

    .login-form-panel {
        flex: 1;
        align-items: flex-start;
        padding: 16px 32px 48px;
    }

    .login-form-title {
        margin-bottom: 24px;
    }
}

/* ---- 偏好：减少动效 ---- */
@media (prefers-reduced-motion: reduce) {
    .login-brand-inner,
    .login-form-panel {
        animation: none;
    }
    .login-brand-moon {
        animation: none;
    }
}

/* ============================================================
   通用筛选栏（视频/图文模板列表）
   ============================================================ */
.dash-filter-bar {
    margin-bottom: 12px;
}
.dash-filter-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* 搜索框 */
.dash-filter-search {
    position: relative;
    flex: 0 1 240px;
    min-width: 180px;
}
.dash-filter-search i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.85rem;
    pointer-events: none;
}
.dash-filter-search input {
    width: 100%;
    padding: 7px 12px 7px 32px;
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius);
    font-size: 0.875rem;
    background: #fff;
    color: #1e293b;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.dash-filter-search input:focus {
    border-color: var(--ui-accent);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.11);
}
.dash-filter-search input::placeholder {
    color: #94a3b8;
}

/* 下拉框 */
.dash-filter-row select {
    padding: 7px 32px 7px 10px;
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius);
    font-size: 0.875rem;
    background: #fff;
    color: #1e293b;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: border-color 0.2s;
    max-width: 160px;
}
.dash-filter-row select:focus {
    border-color: var(--ui-accent);
}

/* 清除链接 */
.dash-filter-clear {
    font-size: 0.85rem;
    color: #ef4444;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 6px;
    transition: background 0.15s;
    white-space: nowrap;
}
.dash-filter-clear:hover {
    background: #fef2f2;
    color: #dc2626;
}

/* 侧边栏 */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: rgba(255, 255, 255, 0.94);
    color: var(--ui-text);
    position: fixed;
    left: 0;
    top: 0;
    transition: all 0.3s;
    z-index: 1000;
    overflow-y: auto;
    border-right: 1px solid var(--ui-border);
    box-shadow: 5px 0 20px rgba(15, 23, 42, 0.035);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.sidebar:hover {
    scrollbar-color: rgba(69, 103, 95, 0.28) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 4px;
}

.sidebar:hover::-webkit-scrollbar-thumb {
    background: rgba(69, 103, 95, 0.28);
}

.sidebar > .nav {
    padding-bottom: 64px;
}

.sidebar.collapsed {
    margin-left: calc(-1 * var(--sidebar-width));
}

.sidebar-header {
    padding: 20px;
    background: rgba(248, 249, 250, 0.9);
    text-align: center;
    border-bottom: 1px solid var(--ui-border);
    color: #173f3a;
}

.sidebar-header h4 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
}

.sidebar-header h4 img {
    border-radius: 8px;
}

.beta-customer-shell {
    --ui-bg: #f7f7fa;
    --ui-accent: #7c3aed;
    --ui-accent-hover: #6d28d9;
    --ui-accent-soft: #ede9fe;
}

.beta-customer-shell .sidebar .nav-link.active {
    border-color: #cfc5fa;
}

.sidebar .nav-link {
    color: #455a54;
    padding: 9px 12px;
    margin: 2px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
    border: 1px solid transparent;
    border-radius: var(--ui-radius);
    font-size: 0.89rem;
}

.sidebar .nav-link:hover {
    color: #183e37;
    background: #ffffff;
    border-color: #d5e3df;
}

.sidebar .nav-link.active {
    color: var(--ui-accent);
    background: var(--ui-accent-soft);
    border-color: #a9d0c8;
    box-shadow: 0 3px 10px rgba(15, 118, 110, 0.10);
    font-weight: 600;
}

.sidebar .nav-link i {
    font-size: 1.1rem;
    width: 22px;
    text-align: center;
    opacity: 0.7;
}
.sidebar .nav-link.active i,
.sidebar .nav-link:hover i {
    opacity: 1;
}

.sidebar .sidebar-section {
    color: #778a84;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 17px 22px 5px;
    margin-top: 2px;
    user-select: none;
    list-style: none;
}
.sidebar .sidebar-section:first-of-type {
    margin-top: 0;
}

/* 主内容区 */
.main-content {
    flex: 1;
    min-width: 0;
    width: calc(100% - var(--sidebar-width));
    margin-left: var(--sidebar-width);
    transition: all 0.3s;
}

.main-content.expanded {
    width: 100%;
    margin-left: 0;
}

/* 顶部导航 */
.top-navbar {
    background: rgba(255, 255, 255, 0.86);
    padding: 12px 20px;
    border-bottom: 1px solid var(--ui-border);
    box-shadow: 0 3px 16px rgba(28, 78, 70, 0.04);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
}

/* 内容区 */
.content-wrapper {
    padding: 24px;
    background: var(--ui-bg);
    min-height: calc(100vh - 60px);
}

/* 统计卡片 */
.stat-card {
    border: none;
    border-radius: var(--ui-radius);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--ui-shadow-raised);
}

/* 通知徽章 */
/* 表格样式 */
.table th {
    background: var(--ui-surface-soft);
    font-weight: 600;
    color: #52635f;
}

.table td {
    vertical-align: middle;
}

.table > :not(caption) > * > * {
    border-bottom-color: #e9f0ee;
}

.table-hover > tbody > tr:hover > * {
    --bs-table-bg-state: #f7f8f9;
}

/* 状态标签 */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-调试中 { background: #e3f2fd; color: #1976d2; }
.status-调试完毕 { background: #e8f5e9; color: #2e7d32; }  /* 绿色 */
.status-可上线 { background: #e8f5e9; color: #388e3c; }
.status-已上线 { background: #c8e6c9; color: #2e7d32; }
.status-需修改 { background: #ffebee; color: #c62828; }  /* 红色 */
.status-暂不上线 { background: #f5f5f5; color: #757575; }
.status-另做他用 { background: #f3e5f5; color: #7b1fa2; }
.status-待调整 { background: #fff8e1; color: #ff8f00; }
.status-暂时隐藏 { background: #eceff1; color: #455a64; }



/* 搜索框 */
.search-box {
    background: var(--ui-surface);
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius);
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: var(--ui-shadow);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* 卡片样式 */
.card {
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius);
    box-shadow: var(--ui-shadow);
    background: var(--ui-surface);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: visible;
}

.card-header {
    background: rgba(255, 255, 255, 0.68);
    border-bottom: 1px solid #e8f0ed;
    font-weight: 600;
}

/* 按钮样式 */
.btn {
    border-radius: var(--ui-radius);
    font-weight: 500;
    transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0) scale(0.98);
}

.btn-primary {
    background: var(--ui-accent);
    border-color: var(--ui-accent);
    box-shadow: 0 3px 10px rgba(15, 118, 110, 0.18);
}

.btn-primary:hover {
    background: var(--ui-accent-hover);
    border-color: var(--ui-accent-hover);
}

.btn-outline-primary {
    color: var(--ui-accent);
    border-color: #91bbb4;
}

.btn-outline-primary:hover {
    color: #fff;
    background: var(--ui-accent);
    border-color: var(--ui-accent);
}

.btn-link {
    color: #536c67;
}

.btn-link:hover {
    color: var(--ui-accent);
}

.form-control,
.form-select,
.input-group-text {
    border-color: var(--ui-border);
    border-radius: var(--ui-radius);
}

.form-control,
.form-select {
    background-color: #fff;
    color: var(--ui-text);
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus,
.btn:focus-visible,
.nav-link:focus-visible {
    border-color: #75aaa2;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.13);
    outline: none;
}

.form-check-input:checked {
    background-color: var(--ui-accent);
    border-color: var(--ui-accent);
}

.dropdown-menu,
.modal-content,
.alert,
.toast {
    border-color: var(--ui-border);
    border-radius: var(--ui-radius);
    box-shadow: var(--ui-shadow-raised);
}

.dropdown-item {
    border-radius: 6px;
    margin: 2px 6px;
    width: calc(100% - 12px);
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: var(--ui-accent-soft);
    color: var(--ui-accent-hover);
}

.pagination .page-link {
    color: var(--ui-accent);
    border-color: var(--ui-border);
}

.pagination .active > .page-link,
.pagination .page-link.active {
    background-color: var(--ui-accent);
    border-color: var(--ui-accent);
}

/* 文件预览 */
.file-preview {
    max-width: 200px;
    max-height: 150px;
    object-fit: cover;
    border-radius: 8px;
}

.video-preview {
    max-width: 300px;
    border-radius: 8px;
}

/* 调试页面 */
.debug-container {
    display: flex;
    gap: 16px;
    height: calc(100vh - 120px);
}

.debug-params {
    width: 35%;
    overflow-y: auto;
}

.debug-preview {
    width: 40%;
    background: white;
    border-radius: var(--ui-radius);
    padding: 16px;
    overflow-y: auto;
}

.debug-history {
    width: 25%;
    background: white;
    border-radius: var(--ui-radius);
    padding: 16px;
    overflow-y: auto;
}

/* 侧边栏遮罩（移动端抽屉使用） */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1030;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/* AI资讯速览：Bootstrap 5 无 min-w-0 工具类，补丁以保证 flex 项可收缩截断 */
#aiNewsList .min-w-0 {
    min-width: 0;
}
#aiNewsList .ai-news-item .small.fw-medium,
#aiNewsList .ai-news-item .text-muted.small {
}

/* 响应式 */
@media (max-width: 768px) {
    /* 侧边栏抽屉化 */
    .sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
        z-index: 1040;
    }
    .sidebar.show {
        margin-left: 0;
        box-shadow: 2px 0 16px rgba(0, 0, 0, 0.25);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        min-width: 0;
    }

    /* 抽屉开启时禁止主体滚动 */
    body.sidebar-open {
        overflow: hidden;
    }

    /* 顶部导航与内容区紧凑化 */
    .top-navbar {
        padding: 10px 12px;
    }
    #sidebarToggle {
        font-size: 1.4rem;
        padding: 4px 8px;
    }
    .top-navbar .dropdown-toggle .user-name-text {
        display: none;
    }
    .content-wrapper {
        padding: 12px;
    }

    /* 表格横向滚动兑底 */
    .content-wrapper .table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }
    .content-wrapper .table-responsive .table {
        display: table;
        overflow: visible;
        white-space: normal;
    }
    .content-wrapper .table th,
    .content-wrapper .table td {
        white-space: nowrap;
    }

    /* 图片/视频预览自适应 */
    .file-preview {
        max-width: 100%;
        height: auto;
    }
    .video-preview {
        max-width: 100%;
    }

    /* 统计卡片与卡片内边距 */
    .stat-card .card-body {
        padding: 0.75rem;
    }
    .stat-card h2,
    .stat-card h3 {
        font-size: 1.4rem;
    }
    .card-body {
        padding: 12px;
    }
    .search-box {
        padding: 10px;
    }
    /* 按钮组换行时留出间距 */
    .btn-group-sm .btn,
    .card-footer .btn {
        margin-bottom: 4px;
    }

    /* 调试页：继续堆叠且高度自适应 */
    .debug-container {
        flex-direction: column;
        height: auto;
        gap: 12px;
    }
    .debug-params,
    .debug-preview,
    .debug-history {
        width: 100%;
    }
    .debug-preview,
    .debug-history {
        max-height: 60vh;
    }
    .debug-preview img,
    .debug-preview video {
        max-width: 100%;
        height: auto;
    }

    /* 表单 iOS 防自动放大、模态框与下拉 */
    .form-control,
    .form-select {
        font-size: 16px;
    }
    .modal-dialog {
        margin: 0.5rem;
    }
    .dropdown-menu {
        max-width: calc(100vw - 24px);
    }

    /* AI资讯速览：竖向布局 = 头部meta行（来源+时间） + 标题 + 摘要 */
    #aiNewsList .ai-news-item {
        flex-wrap: wrap;
    }
    #aiNewsList .ai-news-item > .badge {
        margin-top: 0 !important;
    }
    #aiNewsList .ai-news-item > small.text-muted {
        margin-left: auto !important;
    }
    #aiNewsList .ai-news-item > .flex-grow-1 {
        flex: 0 0 100%;
        order: 3;
        margin-top: 4px;
        min-width: 0;
    }
    /* 摘要允许换行，最多两行 */
    #aiNewsList .ai-news-item .text-truncate {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

/* ===== 通知铃铛美化 ===== */
.notification-bell-btn {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    color: #6c757d !important;
    text-decoration: none !important;
}
.notification-bell-btn:hover {
    background: rgba(0,0,0,0.05);
    color: #333 !important;
    transform: scale(1.1);
}
.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    font-size: 10px;
    font-weight: 700;
    padding: 0 5px;
    border-radius: 9px;
    background: linear-gradient(135deg, #ff4757, #ff6b81);
    color: #fff;
    border: 2px solid #1a1d23;
    text-align: center;
    animation: badgePulse 2s ease-in-out infinite;
    box-shadow: 0 2px 8px rgba(255,71,87,0.4);
}
@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* 分页样式 */
.pagination {
    margin: 16px 0 0;
}
.page-link {
    color: #333;
    border-color: #dee2e6;
}
.page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

/* ===== AI审核样式 ===== */
.ai-review-section {
    border-top: 1px dashed #dee2e6;
    padding-top: 6px;
}
.ai-review-result {
    transition: all 0.3s;
}
.ai-review-btn {
    transition: all 0.2s;
}
/* 审核中旋转动画 */
@keyframes aiSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.ai-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #6c757d;
    border-top-color: transparent;
    border-radius: 50%;
    animation: aiSpin 0.8s linear infinite;
    vertical-align: middle;
}

/* ── Markdown 渲染内容样式 ── */
.markdown-body {
    font-size: 0.925rem;
    line-height: 1.7;
    color: #212529;
    word-wrap: break-word;
}
.markdown-body h1, .markdown-body h2, .markdown-body h3,
.markdown-body h4, .markdown-body h5, .markdown-body h6 {
    margin-top: 1em;
    margin-bottom: 0.5em;
    font-weight: 600;
    color: #1a1a1a;
}
.markdown-body h1 { font-size: 1.4rem; border-bottom: 1px solid #e5e7eb; padding-bottom: 0.3em; }
.markdown-body h2 { font-size: 1.25rem; border-bottom: 1px solid #e5e7eb; padding-bottom: 0.25em; }
.markdown-body h3 { font-size: 1.1rem; }
.markdown-body h4 { font-size: 1rem; }
.markdown-body p { margin: 0 0 0.7em; }
.markdown-body ul, .markdown-body ol { padding-left: 1.5em; margin: 0 0 0.7em; }
.markdown-body li { margin-bottom: 0.2em; }
.markdown-body code {
    background: #f1f3f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.875em;
    font-family: 'Cascadia Code', 'Fira Code', Consolas, monospace;
}
.markdown-body pre {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 12px 16px;
    overflow-x: auto;
    font-size: 0.85rem;
    line-height: 1.5;
}
.markdown-body pre code {
    background: none;
    padding: 0;
    font-size: inherit;
}
.markdown-body strong { font-weight: 600; color: #111; }
.markdown-body em { font-style: italic; }
.markdown-body blockquote {
    border-left: 3px solid #6c757d;
    margin: 0.7em 0;
    padding: 0.3em 1em;
    color: #495057;
    background: #f8f9fa;
    border-radius: 0 4px 4px 0;
}
.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.7em 0;
    font-size: 0.875rem;
}
.markdown-body th, .markdown-body td {
    border: 1px solid #dee2e6;
    padding: 6px 10px;
    text-align: left;
}
.markdown-body th { background: #f1f3f5; font-weight: 600; }
.markdown-body hr {
    border: none;
    border-top: 1px solid #dee2e6;
    margin: 1em 0;
}
.markdown-body a { color: #0d6efd; text-decoration: none; }
.markdown-body a:hover { text-decoration: underline; }



/* ── AI分析结果：防止长JSON撑宽页面 ── */
.analysis-result {
    min-width: 0;
}
.analysis-result pre,
.analysis-result code {
    white-space: pre-wrap !important;
    word-break: break-word !important;
}
