/* ============================================================
   博客后台 · 管理界面样式（v2 重制版）
   设计基调：现代 / 专业 / 精致
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-deep: #4338ca;
    --accent: #8b5cf6;
    --primary-light: #eef2ff;
    --primary-50: #f5f6ff;
    --bg: #f5f6fa;
    --card: #ffffff;
    --text: #334155;
    --text-strong: #0f172a;
    --text-light: #94a3b8;
    --border: #e9ecf3;
    --border-strong: #dbe0ec;
    --danger: #e11d48;
    --danger-bg: #fff1f2;
    --success: #10b981;
    --warning: #f59e0b;
    --info: #0ea5e9;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.05);
    --shadow: 0 4px 16px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.16);
    --grad-brand: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --grad-deep: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --sidebar-bg: #0d1526;
    --sidebar-hover: rgba(255, 255, 255, 0.06);
    --sidebar-active: rgba(99, 102, 241, 0.16);
    --sidebar-text: #8fa0b8;
    --sidebar-text-active: #ffffff;
}

html { -webkit-font-smoothing: antialiased; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; }

::selection { background: rgba(99, 102, 241, 0.18); }

/* 精致滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #cbd2e0; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #aeb7c9; }
::-webkit-scrollbar-track { background: transparent; }

/* ========== 通用工具 ========== */
.muted { color: var(--text-light); }
.strong { font-weight: 600; color: var(--text-strong); }
.req { color: var(--danger); }
.help { font-size: 12px; color: var(--text-light); margin-top: 6px; line-height: 1.5; }
.help code { background: #f1f2f7; padding: 1px 5px; border-radius: 4px; font-size: 11.5px; color: var(--text); }

/* ========== 按钮 ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.4;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text);
    cursor: pointer;
    transition: all 0.16s ease;
    white-space: nowrap;
    user-select: none;
}
.btn:hover { border-color: #c3c9d9; background: #f8fafc; color: var(--text-strong); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.btn-primary {
    background: var(--grad-brand);
    border: none;
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.28);
}
.btn-primary:hover { background: var(--grad-deep); color: #fff; box-shadow: 0 6px 16px rgba(99, 102, 241, 0.36); }
.btn-primary:active { box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3); }

.btn-danger {
    background: #fff;
    border-color: #fecdd3;
    color: var(--danger);
}
.btn-danger:hover { background: var(--danger-bg); border-color: #fda4af; color: var(--danger); }

.btn-danger-solid { background: var(--danger); border: none; color: #fff; }
.btn-danger-solid:hover { background: #be123c; color: #fff; }

.btn-outline { background: transparent; border: 1px dashed var(--border-strong); }
.btn-outline:hover { border-style: solid; border-color: var(--primary); color: var(--primary); background: var(--primary-50); }

.btn-sm { padding: 5px 11px; font-size: 12.5px; border-radius: 6px; }
.btn-sm svg { width: 13px; height: 13px; }

.btn-lg { padding: 11px 22px; font-size: 15px; border-radius: 10px; }

.btn-block { width: 100%; }

.btn-ghost { border: none; background: transparent; color: var(--text-light); }
.btn-ghost:hover { background: #f1f2f7; color: var(--text); }

.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    transition: color 0.15s;
}
.btn-link:hover { color: var(--primary-deep); }

.btn:disabled, .btn.disabled { opacity: 0.55; cursor: not-allowed; pointer-events: none; }

.btn .spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ========== 标签徽标 ========== */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 999px;
    line-height: 1.6;
    white-space: nowrap;
}
.tag::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: 0.85; }
.tag-green { background: #ecfdf5; color: #059669; }
.tag-orange { background: #fffbeb; color: #d97706; }
.tag-gray { background: #f1f5f9; color: #64748b; }
.tag-red { background: #fff1f2; color: #e11d48; }
.tag-blue { background: #eff6ff; color: #2563eb; }
.tag-indigo { background: var(--primary-light); color: var(--primary-dark); }

.count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--primary-light);
    color: var(--primary-dark);
    font-size: 11.5px;
    font-weight: 700;
}
.count-badge.danger { background: #fee2e2; color: var(--danger); }

/* ========== 表单 ========== */
.form-group { margin-bottom: 18px; }
.form-group > label { display: block; font-size: 13px; font-weight: 600; color: var(--text-strong); margin-bottom: 7px; }

input[type="text"], input[type="password"], input[type="email"], input[type="number"], input[type="url"], input[type="search"],
select, textarea {
    width: 100%;
    padding: 8px 12px;
    font-size: 13.5px;
    font-family: inherit;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}
input::placeholder, textarea::placeholder { color: #a5b0c3; }
select { cursor: pointer; }
textarea { resize: vertical; min-height: 90px; }
input[type="checkbox"] { accent-color: var(--primary); width: 15px; height: 15px; cursor: pointer; }

.form-actions { display: flex; align-items: center; gap: 10px; margin-top: 6px; flex-wrap: wrap; }

.input-suffix { position: relative; }
.input-suffix input { padding-right: 52px; }
.input-suffix-text {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12.5px;
    color: var(--text-light);
    pointer-events: none;
}

/* 开关 */
.switch { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track {
    width: 40px;
    height: 22px;
    border-radius: 999px;
    background: #cbd5e1;
    position: relative;
    transition: background 0.2s;
    flex-shrink: 0;
}
.switch-track::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s;
}
.switch input:checked + .switch-track { background: var(--primary); }
.switch input:checked + .switch-track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-track { box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25); }

/* 复选框组 */
.checkbox-group { display: flex; flex-wrap: wrap; gap: 8px; }
.checkbox-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    font-size: 12.5px;
    cursor: pointer;
    transition: all 0.15s;
    background: #fff;
}
.checkbox-item:hover { border-color: var(--primary); color: var(--primary); }
.checkbox-item:has(input:checked) { background: var(--primary-light); border-color: var(--primary); color: var(--primary-dark); font-weight: 500; }

/* ========== 提示条 ========== */
.alert {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 16px;
    border-radius: 10px;
    font-size: 13.5px;
    margin-bottom: 18px;
    border: 1px solid transparent;
}
.alert-info { background: #eff6ff; color: #1d4ed8; border-color: #dbeafe; }
.alert-error { background: var(--danger-bg); color: var(--danger); border-color: #fecdd3; }
.alert-success { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }

/* ========== 面板 ========== */
.panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
}
.panel-head h3 { font-size: 15px; font-weight: 600; color: var(--text-strong); }
.panel-head h2 { font-size: 17px; font-weight: 600; color: var(--text-strong); }
.panel-head p { font-size: 12.5px; color: var(--text-light); margin-top: 2px; }
.panel-body { padding: 20px; }
.panel-more { margin: 0; }

/* ========== 数据表格 ========== */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
    text-align: left;
    padding: 11px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    letter-spacing: 0.4px;
    background: #fafbfe;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.data-table td {
    padding: 12px 16px;
    font-size: 13.5px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    color: var(--text);
}
.data-table tbody tr { transition: background 0.12s; }
.data-table tbody tr:hover { background: #f8faff; }
.data-table tbody tr:last-child td { border-bottom: none; }
.table-link { color: var(--text-strong); font-weight: 500; transition: color 0.15s; }
.table-link:hover { color: var(--primary); }

.cover-thumb {
    width: 64px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border);
    display: block;
}

.row-actions { display: flex; align-items: center; gap: 6px; }
.row-actions form { display: inline-flex; margin: 0; }

/* 分页 */
.pagination { padding: 14px 16px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; }
.pagination .pagination { border: none; padding: 0; }
.pagination ul { display: flex; gap: 6px; list-style: none; flex-wrap: wrap; }
.pagination li a, .pagination li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid var(--border-strong);
    font-size: 13px;
    color: var(--text);
    background: #fff;
    transition: all 0.15s;
}
.pagination li a:hover { border-color: var(--primary); color: var(--primary); }
.pagination li.current span { background: var(--grad-brand); color: #fff; border-color: transparent; font-weight: 600; }
.pagination .disabled span { opacity: 0.45; cursor: not-allowed; }

/* ========== 空状态 ========== */
.empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 42px 20px;
    color: var(--text-light);
    font-size: 13.5px;
    text-align: center;
}
.empty svg { width: 44px; height: 44px; color: #cbd5e1; }
.empty .empty-title { font-weight: 600; color: var(--text); font-size: 14.5px; }

/* ========== 布局骨架 ========== */
.admin-layout { display: flex; min-height: 100vh; }

/* ---- 侧边栏 ---- */
.admin-sidebar {
    width: 240px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    background: var(--sidebar-bg);
    z-index: 30;
}
.admin-sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); }

.admin-logo {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 18px 18px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    flex-shrink: 0;
}
.admin-logo-mark {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 11px;
    background: var(--grad-brand);
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}
.admin-logo-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.admin-logo-text b { font-size: 16px; font-weight: 800; letter-spacing: 0.5px; color: #fff; white-space: nowrap; }
.admin-logo-text small { font-size: 10.5px; color: var(--sidebar-text); letter-spacing: 1.5px; }

.admin-nav { padding: 12px 12px 16px; flex: 0 0 auto; }
.admin-nav-section {
    padding: 16px 10px 7px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #5c6b85;
    text-transform: uppercase;
}
.admin-nav-section:first-child { padding-top: 4px; }

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9.5px 12px;
    margin-bottom: 2px;
    border-radius: 9px;
    color: var(--sidebar-text);
    font-size: 13.5px;
    font-weight: 500;
    transition: all 0.15s ease;
}
.nav-item:hover { background: var(--sidebar-hover); color: var(--sidebar-text-active); }
.nav-item.active {
    background: var(--sidebar-active);
    color: var(--sidebar-text-active);
    font-weight: 600;
}
.nav-item.active::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 22px;
    border-radius: 0 3px 3px 0;
    background: var(--grad-brand);
}
.nav-icon { display: flex; align-items: center; justify-content: center; color: #74849d; flex-shrink: 0; transition: color 0.15s; }
.nav-item.active .nav-icon, .nav-item:hover .nav-icon { color: #a5b4fc; }
.nav-icon svg { width: 18px; height: 18px; }
.nav-item .nav-badge {
    margin-left: auto;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(244, 63, 94, 0.9);
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* 侧边栏底部用户区 */
.admin-sidebar-foot {
    margin-top: auto;
    padding: 14px 14px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.03);
    flex-shrink: 0;
}
.side-user { display: flex; align-items: center; gap: 10px; }
.side-user-avatar {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--grad-brand);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.35);
}
.side-user-info { flex: 1; min-width: 0; line-height: 1.3; }
.side-user-info b { display: block; font-size: 13px; font-weight: 600; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user-info span { display: block; font-size: 11px; color: var(--sidebar-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user-actions { display: flex; gap: 5px; flex: 0 0 auto; }
.side-user-actions form { margin: 0; padding: 0; display: flex; }
.side-user-actions a,
.side-user-actions button {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sidebar-text);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.15s;
    padding: 0;
    cursor: pointer;
    font: inherit;
    line-height: 1;
}
.side-user-actions a:hover,
.side-user-actions button:hover { color: #fff; background: rgba(255, 255, 255, 0.12); }
.side-user-actions a[title="退出登录"]:hover,
.side-user-actions button[title="退出登录"]:hover { color: #fda4af; border-color: rgba(244, 63, 94, 0.4); background: rgba(244, 63, 94, 0.15); }
.side-user-actions svg { width: 13.5px; height: 13.5px; }
.side-version {
    margin-top: 10px;
    font-size: 10.5px;
    color: #5c6b85;
    text-align: center;
    padding-top: 9px;
    border-top: 1px dashed rgba(255, 255, 255, 0.09);
}

/* ---- 主区域 ---- */
.admin-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 58px;
    padding: 0 24px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.topbar-left { display: flex; align-items: center; gap: 16px; min-width: 0; }

.crumb { display: flex; align-items: center; gap: 7px; font-size: 13.5px; white-space: nowrap; }
.crumb-root { color: var(--text-light); font-weight: 500; }
.crumb-sep { width: 14px; height: 14px; color: #c3cad6; }
.crumb-cur { color: var(--text-strong); font-weight: 600; }

.topbar-search {
    display: flex;
    align-items: center;
    gap: 7px;
    width: 230px;
    padding: 6px 12px;
    background: #f1f3f9;
    border: 1px solid transparent;
    border-radius: 9px;
    color: var(--text-light);
    font-size: 13px;
    transition: all 0.15s;
}
.topbar-search:focus-within { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12); }
.topbar-search svg { width: 15px; height: 15px; flex-shrink: 0; }
.topbar-search input { border: none; background: transparent; padding: 0; font-size: 13px; box-shadow: none; }
.topbar-search input:focus { box-shadow: none; }
.topbar-search input::placeholder { color: #9aa5b8; }

.topbar-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.topbar-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text);
    padding: 7px 12px;
    border-radius: 8px;
    transition: all 0.15s;
}
.topbar-link:hover { background: #f1f3f9; color: var(--primary); }
.topbar-link svg { width: 15px; height: 15px; }
.topbar-divider { width: 1px; height: 20px; background: var(--border); }

.user-menu { position: relative; }
.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 9px;
    transition: background 0.15s;
    font-family: inherit;
}
.user-menu-btn:hover { background: #f1f3f9; }
.topbar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--grad-brand);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.user-name { font-size: 13.5px; font-weight: 600; color: var(--text-strong); }
.user-chevron { width: 14px; height: 14px; color: var(--text-light); transition: transform 0.2s; }
.user-menu.open .user-chevron { transform: rotate(180deg); }

.user-menu-drop {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 180px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all 0.18s ease;
    z-index: 40;
}
.user-menu.open .user-menu-drop { opacity: 1; visibility: visible; transform: none; }
.user-menu-item {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 13.5px;
    color: var(--text);
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: background 0.13s;
}
.user-menu-item:hover { background: #f1f3f9; }
.user-menu-item svg { width: 15px; height: 15px; color: var(--text-light); }
.user-menu-item:hover svg { color: var(--primary); }
.user-menu-danger { color: var(--danger) !important; }
.user-menu-danger svg { color: var(--danger) !important; }
.user-menu-danger:hover { background: var(--danger-bg) !important; }

.admin-content { flex: 1; padding: 22px 26px 50px; min-width: 0; }

/* ---- 页脚版权 ---- */
.admin-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px 26px 22px;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-light);
    font-size: 12px;
    line-height: 1.9;
}
.admin-footer p { margin: 0; max-width: 100%; text-align: center; }
.admin-footer-copy { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; }
.admin-footer-beian { margin-top: 2px !important; }
.admin-footer-sep { margin: 0 6px; opacity: 0.6; }
.admin-footer a { color: var(--text-light); text-decoration: none; }
.admin-footer a:hover { color: var(--primary); }

/* ========== 工具栏 ========== */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.toolbar-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.toolbar-form input[type="text"], .toolbar-form select { width: auto; min-width: 160px; }
.page-title { font-size: 19px; font-weight: 700; color: var(--text-strong); }
.page-desc { font-size: 12.5px; color: var(--text-light); margin-top: 2px; }

/* ========== 模态框 ========== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(3px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}
.modal-overlay.show { opacity: 1; visibility: visible; }
.modal-box {
    width: 100%;
    max-width: 480px;
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    transform: translateY(16px) scale(0.98);
    transition: transform 0.22s ease;
    max-height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
}
.modal-overlay.show .modal-box { transform: none; }
.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 17px 22px 13px;
    border-bottom: 1px solid var(--border);
}
.modal-head h3 { font-size: 16px; font-weight: 700; color: var(--text-strong); }
.modal-close {
    width: 30px;
    height: 30px;
    border: none;
    background: #f1f3f9;
    border-radius: 8px;
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.modal-close:hover { background: var(--danger-bg); color: var(--danger); }
.modal-close svg { width: 15px; height: 15px; }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 22px 18px;
    border-top: 1px solid var(--border);
}

/* ========== Toast ========== */
.app-toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-16px);
    z-index: 200;
    padding: 11px 22px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 500;
    color: #fff;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    max-width: 80vw;
    text-align: center;
}
.app-toast.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.app-toast.success { background: linear-gradient(135deg, #10b981, #059669); }
.app-toast.error { background: linear-gradient(135deg, #f43f5e, #e11d48); }
.app-toast.info { background: linear-gradient(135deg, #3b82f6, #2563eb); }

/* ========== 登录页 ========== */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background:
        radial-gradient(700px 480px at 12% 15%, rgba(99, 102, 241, 0.28), transparent 60%),
        radial-gradient(760px 520px at 90% 85%, rgba(139, 92, 246, 0.25), transparent 60%),
        linear-gradient(135deg, #0d1526 0%, #171e3a 50%, #241b4e 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}
.login-body::before, .login-body::after {
    content: '';
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 50%;
}
.login-body::before { width: 500px; height: 500px; top: -180px; right: -140px; }
.login-body::after { width: 640px; height: 640px; bottom: -280px; left: -200px; }

.login-grid {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 60px;
    width: 100%;
    max-width: 900px;
}
.login-intro { flex: 1; color: #e2e8f0; display: none; }
.login-intro .logo-badge {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: var(--grad-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.45);
    margin-bottom: 22px;
}
.login-intro h1 { font-size: 30px; font-weight: 800; letter-spacing: 1px; margin-bottom: 12px; color: #fff; }
.login-intro p { font-size: 14.5px; color: #94a3b8; line-height: 1.9; }
.login-intro ul { margin-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.login-intro li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: #cbd5e1; }
.login-intro li svg { width: 18px; height: 18px; color: #818cf8; flex-shrink: 0; }

.login-box {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 400px;
    padding: 40px 38px 32px;
    animation: loginIn 0.5s ease;
}
@keyframes loginIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.login-logo {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--grad-brand);
    color: #fff;
    font-size: 27px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    box-shadow: 0 10px 24px rgba(99, 102, 241, 0.4);
}
.login-title { text-align: center; font-size: 21px; font-weight: 700; margin-bottom: 5px; color: var(--text-strong); }
.login-sub { text-align: center; font-size: 13px; color: var(--text-light); margin-bottom: 26px; }
.login-box .form-group label { font-weight: 600; }
.login-box .btn-block { margin-top: 10px; padding: 11px 16px; font-size: 15px; font-weight: 600; letter-spacing: 6px; border-radius: 10px; }
.login-foot { text-align: center; margin-top: 22px; font-size: 13px; }
.login-foot a { color: var(--text-light); transition: color 0.2s; }
.login-foot a:hover { color: var(--primary); }

@media (min-width: 900px) {
    .login-intro { display: block; }
}

/* ========== 仪表盘 ========== */
.dash-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    padding: 32px 36px;
    border-radius: 18px;
    background:
        radial-gradient(1200px 320px at 8% -40%, rgba(129, 140, 248, 0.38), transparent 60%),
        radial-gradient(900px 320px at 92% 130%, rgba(56, 189, 248, 0.30), transparent 55%),
        linear-gradient(115deg, #4338ca 0%, #6d28d9 48%, #7c3aed 100%);
    color: #fff;
    margin-bottom: 20px;
    box-shadow: 0 16px 40px rgba(79, 70, 229, 0.32);
    overflow: hidden;
}
.dash-hero-glow { position: absolute; border-radius: 50%; filter: blur(58px); pointer-events: none; }
.glow-a { width: 280px; height: 280px; right: -50px; top: -130px; background: rgba(255, 255, 255, 0.16); }
.glow-b { width: 200px; height: 200px; left: 36%; bottom: -150px; background: rgba(56, 189, 248, 0.32); }
.dash-hero-ring { position: absolute; border: 1.5px solid rgba(255, 255, 255, 0.14); border-radius: 50%; pointer-events: none; }
.ring-a { width: 340px; height: 340px; right: -70px; top: -150px; }
.ring-b { width: 230px; height: 230px; right: 130px; bottom: -170px; }
.dash-hero > *:not(.dash-hero-glow):not(.dash-hero-ring) { position: relative; z-index: 1; }
.dash-hero-main { display: flex; align-items: center; gap: 16px; }
.dash-avatar {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.32);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.dash-hero h1 { font-size: 22px; font-weight: 800; letter-spacing: 0.5px; }
.dash-hero p {
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.82);
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.dash-hero p b { color: #fff; }
.dash-dot { width: 4px; height: 4px; border-radius: 50%; background: rgba(255, 255, 255, 0.5); flex-shrink: 0; }
.dash-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.dash-hero .btn { border: none; }
.dash-hero .btn-primary {
    background: #fff;
    color: var(--primary-deep);
    font-weight: 700;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
    transition: all 0.18s ease;
}
.dash-hero .btn-primary:hover { background: #eef0ff; color: var(--primary-deep); transform: translateY(-1px); }
.hero-btn-outline {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    backdrop-filter: blur(4px);
}
.hero-btn-outline:hover { background: rgba(255, 255, 255, 0.22) !important; color: #fff !important; }
.hero-badge {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: #f43f5e;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 2px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}
.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px 22px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    transition: all 0.22s ease;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat-card::after {
    content: '';
    position: absolute;
    right: -34px;
    top: -34px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.06;
    transition: transform 0.3s ease;
}
.stat-card:hover::after { transform: scale(1.25); }
.c-indigo { color: #6366f1; }
.c-emerald { color: #10b981; }
.c-amber { color: #f59e0b; }
.c-sky { color: #0ea5e9; }
.stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}
.stat-icon svg { width: 21px; height: 21px; }
.c-indigo .stat-icon { background: linear-gradient(135deg, #6366f1, #8b5cf6); box-shadow: 0 6px 14px rgba(99, 102, 241, 0.35); }
.c-emerald .stat-icon { background: linear-gradient(135deg, #10b981, #34d399); box-shadow: 0 6px 14px rgba(16, 185, 129, 0.35); }
.c-amber .stat-icon { background: linear-gradient(135deg, #f59e0b, #fbbf24); box-shadow: 0 6px 14px rgba(245, 158, 11, 0.35); }
.c-sky .stat-icon { background: linear-gradient(135deg, #0ea5e9, #38bdf8); box-shadow: 0 6px 14px rgba(14, 165, 233, 0.35); }
.stat-info { min-width: 0; flex: 1; }
.stat-label { font-size: 12.5px; font-weight: 600; color: var(--text-light); }
.stat-num { font-size: 30px; font-weight: 800; color: var(--text-strong); line-height: 1.25; margin-top: 2px; letter-spacing: -0.5px; }
.stat-sub { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-light); margin-top: 7px; flex-wrap: wrap; }
.stat-sub b { color: var(--text-strong); font-weight: 700; }
.stat-chip { font-weight: 700; font-size: 11.5px; padding: 2px 9px; border-radius: 20px; }
.c-indigo .stat-chip { background: rgba(99, 102, 241, 0.12); color: #4f46e5; }
.c-emerald .stat-chip { background: rgba(16, 185, 129, 0.12); color: #059669; }
.c-amber .stat-chip { background: rgba(245, 158, 11, 0.14); color: #b45309; }
.c-sky .stat-chip { background: rgba(14, 165, 233, 0.12); color: #0284c7; }
.dash-sep { color: #d7dbe6; }

.panel-sub { font-size: 12px; color: var(--text-light); font-weight: 500; margin-left: 8px; }

/* 内容趋势图 */
.trend-body { padding: 10px 18px 14px; }
.trend-svg { width: 100%; height: 210px; display: block; }
.trend-gridline { stroke: #eef0f7; stroke-width: 1; stroke-dasharray: 4 5; }
.trend-gridline-base { stroke: #e5e7f0; stroke-width: 1; }
.trend-line { stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.tl-art { stroke: #6366f1; }
.tl-cmt { stroke: #10b981; }
.trend-xaxis { display: flex; justify-content: space-between; padding: 8px 4px 0; }
.trend-xaxis span { font-size: 11.5px; color: var(--text-light); }
.trend-legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--text-light); align-items: center; }
.trend-key { display: flex; align-items: center; gap: 6px; }
.k-dot { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.k-art { background: #6366f1; }
.k-cmt { background: #10b981; }

/* 待办事项 */
.todo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px 16px 8px; }
.todo-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fafbff;
    transition: all 0.18s ease;
}
.todo-item:hover { border-color: #c7d2fe; background: #fff; box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.todo-icon { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.todo-icon svg { width: 16px; height: 16px; }
.todo-draft .todo-icon { background: rgba(245, 158, 11, 0.13); color: #d97706; }
.todo-comment .todo-icon { background: rgba(244, 63, 94, 0.12); color: #e11d48; }
.todo-body { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.todo-body b { font-size: 20px; font-weight: 800; color: var(--text-strong); line-height: 1.15; }
.todo-body span { font-size: 11.5px; color: var(--text-light); }
.todo-arrow { color: #c4c8d6; font-size: 13px; flex-shrink: 0; }
.todo-drafts { border-top: 1px solid var(--border); margin-top: 10px; }
.todo-block-title { padding: 12px 20px 2px; font-size: 12px; font-weight: 700; color: var(--text-light); }
.feed-compact .feed-item { padding: 9px 20px; }

/* 分类分布 */
.catbar-list { padding: 10px 20px 16px; display: flex; flex-direction: column; gap: 13px; }
.catbar-head { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; margin-bottom: 6px; }
.catbar-name { font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.catbar-cnt { color: var(--text-light); font-size: 11.5px; flex-shrink: 0; }
.catbar-track { height: 8px; border-radius: 6px; background: #f1f3f9; overflow: hidden; }
.catbar-fill {
    height: 100%;
    border-radius: 6px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    transition: width 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.catbar:nth-child(2) .catbar-fill { background: linear-gradient(90deg, #0ea5e9, #38bdf8); }
.catbar:nth-child(3) .catbar-fill { background: linear-gradient(90deg, #10b981, #34d399); }
.catbar:nth-child(4) .catbar-fill { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.catbar:nth-child(5) .catbar-fill { background: linear-gradient(90deg, #f43f5e, #fb7185); }
.catbar:nth-child(6) .catbar-fill { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }

/* 浏览量徽标 */
.view-count { display: inline-flex; align-items: center; gap: 4px; color: var(--text-light); font-size: 12.5px; }
.view-count svg { width: 13px; height: 13px; }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.dash-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.dash-side { display: flex; flex-direction: column; gap: 18px; }

.feed-list { padding: 6px 0; }
.feed-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.feed-item:last-child { border-bottom: none; }
.feed-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}
.feed-body { min-width: 0; flex: 1; }
.feed-text { font-size: 13.5px; color: var(--text); margin-bottom: 5px; line-height: 1.55; }
.feed-text a { color: var(--text-strong); font-weight: 500; }
.feed-text a:hover { color: var(--primary); }
.feed-meta { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-light); flex-wrap: wrap; }
.feed-meta b { color: var(--text); font-weight: 600; }
.feed-link { color: var(--primary); }
.feed-link:hover { text-decoration: underline; }

.rank-list { padding: 8px 0; }
.rank-item { display: flex; align-items: flex-start; gap: 12px; padding: 10px 20px; border-bottom: 1px solid var(--border); }
.rank-item:last-child { border-bottom: none; }
.rank-num {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: #f1f3f9;
    color: var(--text-light);
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}
.rank-num.rank-top { background: var(--grad-brand); color: #fff; }
.rank-body { min-width: 0; }
.rank-title { display: block; font-size: 13.5px; font-weight: 600; color: var(--text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 0.15s; }
.rank-title:hover { color: var(--primary); }
.rank-meta { font-size: 12px; color: var(--text-light); margin-top: 2px; }
.rank-meta b { color: var(--primary-dark); }

.info-list { padding: 6px 0; }
.info-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 20px; font-size: 13px; }
.info-list li span { color: var(--text-light); }
.info-list li b { color: var(--text-strong); font-weight: 600; text-align: right; font-size: 12.5px; }

.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 14px 16px; }
.quick-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 14px 8px;
    border-radius: 10px;
    background: #f8faff;
    border: 1px solid var(--border);
    font-size: 12.5px;
    color: var(--text);
    transition: all 0.15s;
    text-align: center;
}
.quick-item svg { width: 20px; height: 20px; color: var(--primary); }
.quick-item:hover { border-color: var(--primary); background: var(--primary-50); color: var(--primary-dark); transform: translateY(-1px); }

/* ========== 两栏布局 ========== */
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }

/* ========== 文章编辑页 ========== */
.edit-form .form-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.form-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.form-side { display: flex; flex-direction: column; gap: 16px; }

.side-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 17px 18px;
    box-shadow: var(--shadow-sm);
}
.side-card > h4 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-strong);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.card-toggle {
    border: none;
    background: #f1f3f9;
    color: var(--text-light);
    font-size: 11.5px;
    padding: 3px 10px;
    border-radius: 999px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}
.card-toggle:hover { background: var(--primary-light); color: var(--primary-dark); }

.cover-uploader .cover-preview {
    width: 100%;
    height: 150px;
    border-radius: 10px;
    border: 1px dashed var(--border-strong);
    background: #fafbfe;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}
.cover-uploader .cover-preview img { width: 100%; height: 100%; object-fit: cover; }
.cover-placeholder { color: var(--text-light); font-size: 13px; }
.cover-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.ai-row { display: flex; gap: 8px; margin-bottom: 10px; }
.ai-row select { padding: 7px 10px; font-size: 12.5px; }
.ai-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 4px; }
.ai-action {
    padding: 7px 4px;
    font-size: 12.5px;
    border: 1px solid var(--border-strong);
    border-radius: 7px;
    background: #fff;
    color: var(--text);
    cursor: pointer;
    transition: all 0.14s;
    font-family: inherit;
}
.ai-action:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-50); }
.ai-loading { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--primary-dark); padding: 10px 0; }
.ai-loading::before { content: ''; width: 13px; height: 13px; border: 2px solid rgba(99, 102, 241, 0.3); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.7s linear infinite; }
.ai-output {
    max-height: 240px;
    overflow-y: auto;
    padding: 12px;
    background: #f8faff;
    border: 1px solid var(--border);
    border-radius: 9px;
    font-size: 13px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
    margin: 10px 0;
}
.ai-output-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ========== 设置页 ========== */
.setting-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 18px; align-items: start; }
.setting-nav { position: sticky; top: 76px; }
.setting-nav-list { display: flex; flex-direction: column; gap: 3px; }
.setting-nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 13px;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: all 0.15s;
    cursor: pointer;
}
.setting-nav-item:hover { background: #fff; border-color: var(--border); }
.setting-nav-item.active { background: var(--primary-50); border-color: rgba(99, 102, 241, 0.25); }
.setting-nav-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: #f1f3f9;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
}
.setting-nav-item.active .setting-nav-icon { background: var(--grad-brand); color: #fff; }
.setting-nav-icon svg { width: 16px; height: 16px; }
.setting-nav-text { display: flex; flex-direction: column; min-width: 0; }
.setting-nav-title { font-size: 13.5px; font-weight: 600; color: var(--text-strong); }
.setting-nav-desc { font-size: 11.5px; color: var(--text-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.setting-content { min-width: 0; }
.setting-panel { display: none; }
.setting-panel.active { display: block; animation: panelIn 0.22s ease; }
@keyframes panelIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.setting-form .form-group { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 16px; align-items: start; padding: 15px 0; border-bottom: 1px solid var(--border); margin: 0; }
.setting-form .form-group:last-child { border-bottom: none; }
.setting-form .form-label { padding-top: 7px; font-size: 13.5px; font-weight: 600; color: var(--text-strong); }
.setting-form .form-control { min-width: 0; }
.form-section { margin-top: 6px; }
.form-section-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.6px;
    color: var(--primary-dark);
    background: var(--primary-50);
    padding: 5px 12px;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 8px;
}
.setting-form .form-actions { padding: 16px 0 4px; border-top: 1px solid var(--border); }

.logo-input-row { display: flex; gap: 10px; align-items: center; }
.logo-input-row input { flex: 1; }
.logo-preview {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border-radius: 12px;
    border: 1px dashed var(--border-strong);
    background: #fafbfe;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #cbd5e1;
}
.logo-preview img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.logo-preview svg { width: 26px; height: 26px; }
.logo-tools { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.logo-upload-btn { cursor: pointer; }

.custom-tip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 9px;
    background: var(--primary-50);
    color: var(--primary-dark);
    font-size: 12.5px;
    margin-bottom: 14px;
}
.custom-tip svg { width: 16px; height: 16px; flex-shrink: 0; }
.custom-rows { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.custom-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 36px;
    gap: 10px;
    align-items: end;
}
.custom-col { display: flex; flex-direction: column; gap: 5px; }
.custom-col-label { font-size: 11.5px; color: var(--text-light); }
.custom-del {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: #fff;
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.custom-del:hover { border-color: #fda4af; background: var(--danger-bg); color: var(--danger); }
.custom-del svg { width: 15px; height: 15px; }

.ai-test-result { font-size: 12.5px; margin-left: 4px; }
.ai-test-result.testing { color: var(--info); }
.ai-test-result.ok { color: var(--success); }
.ai-test-result.err { color: var(--danger); }

/* ========== 文章编辑页编辑器 ========== */
#editor-container { height: 420px; border: 1px solid var(--border-strong); border-top: none; background: #fff; border-radius: 0 0 10px 10px; }
#toolbar-container { border: 1px solid var(--border-strong); border-bottom: none; border-radius: 10px 10px 0 0; z-index: 1; }
.w-e-text-container { height: 100% !important; }
.w-e-text-container [data-slate-editor] pre > code { white-space: pre-wrap; word-break: break-all; overflow-wrap: break-word; overflow-x: auto; max-width: 100%; }
.w-e-text-container .w-e-scroll { overflow-x: hidden; }

/* ========== 响应式 ========== */
@media (max-width: 1280px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1100px) {
    .dash-grid, .two-col { grid-template-columns: 1fr; }
    .dash-side { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; align-items: start; }
    .edit-form .form-grid { grid-template-columns: 1fr; }
    .setting-layout { grid-template-columns: 1fr; }
    .setting-nav { position: static; }
    .setting-nav-list { flex-direction: row; flex-wrap: wrap; }
    .setting-nav-item { flex: 1; min-width: 150px; }
}
@media (max-width: 900px) {
    .admin-sidebar { width: 72px; }
    .admin-logo { justify-content: center; padding: 16px 8px; }
    .admin-logo-text, .admin-nav-section, .nav-item span:not(.nav-icon), .nav-item .nav-badge { display: none; }
    .nav-item { justify-content: center; padding: 11px; }
    .nav-item.active::before { display: none; }
    .admin-sidebar-foot { padding: 10px 8px; }
    .side-user { justify-content: center; }
    .side-user-info, .side-user-actions, .side-version { display: none; }
    .admin-content { padding: 18px 16px 40px; }
    .admin-footer { padding: 14px 16px 20px; }
    .admin-topbar { padding: 0 14px; }
    .topbar-search { width: 150px; }
    .user-name, .user-chevron { display: none; }
    .topbar-link { font-size: 0; padding: 7px; }
    .topbar-link svg { width: 17px; height: 17px; }
    .setting-form .form-group { grid-template-columns: 1fr; gap: 6px; }
    .setting-form .form-label { padding-top: 0; }
    .custom-row { grid-template-columns: 1fr; align-items: stretch; }
    .custom-del { width: 100%; height: 32px; }
}
@media (max-width: 600px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .dash-side { grid-template-columns: 1fr; }
    .quick-grid { grid-template-columns: repeat(2, 1fr); }
    .toolbar-form input[type="text"], .toolbar-form select { width: 100%; min-width: 0; }
    .toolbar-form { width: 100%; }
    .topbar-search { display: none; }
    .topbar-new span { display: none; }
}

/* ============================================================
   藏青 × 金色 · 尊贵大气配色覆盖层（v3）
   大面积藏青蓝做正式基调，金色做克制点睛
   ============================================================ */
:root {
    --primary: #1b4f9c;
    --primary-dark: #143d7c;
    --primary-deep: #0e2f5e;
    --primary-bright: #2e6ac6;
    --accent: #2e6ac6;
    --gold: #c2a23e;
    --gold-bright: #e3c25f;
    --gold-soft: rgba(200, 168, 75, 0.16);
    --primary-light: #e9effa;
    --primary-50: #f4f7fc;
    --bg: #f1f5fb;
    --card: #ffffff;
    --text: #33425c;
    --text-strong: #13233f;
    --text-light: #8b9ab3;
    --border: #e3e9f3;
    --border-strong: #d0d9e8;
    --shadow-sm: 0 1px 2px rgba(19, 35, 63, 0.05), 0 1px 4px rgba(19, 35, 63, 0.06);
    --shadow: 0 6px 20px rgba(19, 35, 63, 0.08), 0 1px 4px rgba(19, 35, 63, 0.05);
    --shadow-lg: 0 24px 60px rgba(8, 24, 50, 0.24);
    --grad-brand: linear-gradient(135deg, #0f3169 0%, #1b4f9c 55%, #2e6ac6 100%);
    --grad-deep: linear-gradient(135deg, #0a2145 0%, #0f3169 100%);
    --grad-gold: linear-gradient(135deg, #b58f2f 0%, #e3c25f 100%);
    --sidebar-bg: #081b3a;
    --sidebar-hover: rgba(255, 255, 255, 0.055);
    --sidebar-active: rgba(46, 106, 198, 0.22);
    --sidebar-text: #86a0c9;
    --sidebar-text-active: #ffffff;
}

::selection { background: rgba(27, 79, 156, 0.18); }

::-webkit-scrollbar-thumb { background: #aab9d4; }
::-webkit-scrollbar-thumb:hover { background: #8ca0c6; }

/* 文本选中 / 提示 */
.help code { background: #f1f4fa; color: var(--text); }

/* 伪静态设置：URL 预览与 Web 服务器规则代码块 */
.rewrite-preview {
    display: inline-block;
    padding: 6px 12px;
    background: var(--primary-50, #eef3fb);
    color: var(--primary-dark, #1b4f9c);
    border-radius: 6px;
    font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
    font-size: 13px;
    word-break: break-all;
}
.rewrite-code-block {
    margin: 8px 0 0;
    padding: 14px 16px;
    background: #1e2330;
    color: #d4d8e3;
    border-radius: 8px;
    font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
    font-size: 12.5px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
    overflow-x: auto;
}

/* 按钮：藏青渐变 + 藏青光 */
.btn-primary { box-shadow: 0 4px 14px rgba(15, 49, 105, 0.3); }
.btn-primary:hover { box-shadow: 0 6px 18px rgba(15, 49, 105, 0.42); }
.btn-primary:active { box-shadow: 0 2px 8px rgba(15, 49, 105, 0.34); }
.btn-outline:hover { background: var(--primary-50); }

/* 输入聚焦环：藏青 */
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 3px rgba(27, 79, 156, 0.13); }
.switch input:focus-visible + .switch-track { box-shadow: 0 0 0 3px rgba(27, 79, 156, 0.25); }
.topbar-search:focus-within { box-shadow: 0 0 0 3px rgba(27, 79, 156, 0.13); }
.tag-indigo { background: var(--primary-light); color: var(--primary-dark); }
.tag-blue { background: #eaf0fb; color: #1b4f9c; }
.count-badge { background: var(--primary-light); color: var(--primary-dark); }

/* 分页 / 排名 */
.pagination li.current span { background: var(--grad-brand); color: #fff; border-color: transparent; }
.rank-num.rank-top { background: var(--grad-brand); }
.rank-meta b { color: var(--primary-dark); }

/* ===== 侧边栏（藏青 × 金点睛） ===== */
.admin-sidebar {
    background:
        radial-gradient(420px 300px at 20% -10%, rgba(46, 106, 198, 0.18), transparent 60%),
        linear-gradient(180deg, #0a2247 0%, #071732 100%);
}
.admin-sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.16); }

.admin-logo {
    border-bottom: 1px solid rgba(226, 193, 94, 0.24);
    background: linear-gradient(180deg, rgba(46, 106, 198, 0.12), transparent);
}
.admin-logo-mark {
    background: var(--grad-brand);
    box-shadow: 0 6px 18px rgba(15, 49, 105, 0.5), inset 0 0 0 1px rgba(226, 193, 94, 0.35);
    color: #fff;
}
.admin-logo-text small { color: #8fa9d6; letter-spacing: 2px; }

.admin-nav-section { color: #5f7bb0; }

.nav-item.active { background: linear-gradient(90deg, rgba(46, 106, 198, 0.28), rgba(46, 106, 198, 0.1)); }
.nav-item.active::before {
    background: var(--grad-gold);
    box-shadow: 0 0 10px rgba(227, 194, 95, 0.55);
    width: 3px;
}
.nav-icon { color: #6f8ab8; }
.nav-item.active .nav-icon, .nav-item:hover .nav-icon { color: #e8c968; }
.nav-item:hover { background: var(--sidebar-hover); color: #fff; }

.admin-sidebar-foot {
    background: rgba(46, 106, 198, 0.07);
    border-top: 1px solid rgba(226, 193, 94, 0.16);
}
.side-user-avatar { background: var(--grad-brand); box-shadow: 0 4px 12px rgba(15, 49, 105, 0.4); }
.side-user-actions a, .side-user-actions button { border: 1px solid rgba(226, 193, 94, 0.2); }
.side-user-actions a:hover, .side-user-actions button:hover { color: #ffd97a; border-color: rgba(226, 193, 94, 0.5); }
.side-version { color: #4f6695; }

/* ===== 顶栏 ===== */
.topbar-avatar { background: var(--grad-brand); }
.topbar-search { background: #eef2f9; }
.crumb-sep { color: #c3cedd; }
.user-menu-btn:hover { background: #f1f4fa; }
.user-menu-item:hover { background: #f1f4fa; }

/* ===== 数据表格 ===== */
.data-table th { background: #f7f9fd; }
.data-table tbody tr:hover { background: #f3f7fd; }

/* ===== 安全中心 ===== */
.sec-summary { display: flex; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.sec-summary-item {
    flex: 1; min-width: 110px; display: flex; align-items: baseline; gap: 6px;
    padding: 14px 16px; border-radius: 10px; border: 1px solid var(--border);
}
.sec-summary-item b { font-size: 26px; font-weight: 700; line-height: 1; }
.sec-summary-item span { font-size: 12.5px; color: var(--text-light); }
.sec-summary-item.sec-ok { background: rgba(16, 185, 129, 0.08); border-color: rgba(16, 185, 129, 0.3); }
.sec-summary-item.sec-ok b { color: var(--success); }
.sec-summary-item.sec-warn { background: rgba(245, 158, 11, 0.08); border-color: rgba(245, 158, 11, 0.3); }
.sec-summary-item.sec-warn b { color: var(--warning); }
.sec-summary-item.sec-danger { background: var(--danger-bg); border-color: rgba(225, 29, 72, 0.3); }
.sec-summary-item.sec-danger b { color: var(--danger); }

.sec-list { display: flex; flex-direction: column; margin: 10px 0 4px; }
.sec-item { display: flex; gap: 12px; padding: 13px 2px; border-bottom: 1px solid var(--border); align-items: flex-start; }
.sec-item:last-child { border-bottom: none; }
.sec-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex: 0 0 auto; }
.sec-dot.sec-ok { background: var(--success); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18); }
.sec-dot.sec-warn { background: var(--warning); box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18); }
.sec-dot.sec-danger { background: var(--danger); box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.15); }
.sec-main { min-width: 0; flex: 1; }
.sec-title { font-size: 13.5px; font-weight: 600; color: var(--text-strong); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sec-badge { font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; }
.sec-badge.sec-ok { background: rgba(16, 185, 129, 0.14); color: #059669; }
.sec-badge.sec-warn { background: rgba(245, 158, 11, 0.15); color: #b45309; }
.sec-badge.sec-danger { background: var(--danger-bg); color: var(--danger); }
.sec-note { font-size: 12.5px; color: var(--text); margin-top: 4px; line-height: 1.6; word-break: break-all; }
.sec-desc { font-size: 11.5px; color: var(--text-light); margin-top: 2px; line-height: 1.5; }
.sec-static { margin: 0 0 10px; }

.backup-time { font-size: 13px; color: var(--text-strong); background: var(--primary-50); border: 1px dashed var(--border-strong); padding: 8px 12px; border-radius: 8px; display: inline-block; }
.backup-form .btn svg { margin-right: 6px; vertical-align: -2px; }

/* ===== 面板标题金下划线 ===== */
.panel-head { background: linear-gradient(180deg, #fbfcfe, #fff); }

/* ===== 登录页：藏青 × 暗金 ===== */
.login-body {
    background:
        radial-gradient(640px 460px at 14% 12%, rgba(227, 194, 95, 0.12), transparent 60%),
        radial-gradient(820px 560px at 90% 92%, rgba(46, 106, 198, 0.34), transparent 62%),
        linear-gradient(152deg, #041022 0%, #0a2145 52%, #14407f 100%);
}
.login-body::before, .login-body::after { border: 1px solid rgba(226, 193, 94, 0.08); }
.login-intro .logo-badge { background: var(--grad-brand); box-shadow: 0 12px 34px rgba(15, 49, 105, 0.5); }
.login-intro p { color: #93a9ce; }
.login-intro li svg { color: #d8b94e; }
.login-intro ul li { color: #c7d6ee; }
.login-logo {
    background: var(--grad-brand);
    box-shadow: 0 12px 30px rgba(15, 49, 105, 0.55), inset 0 0 0 1.5px rgba(226, 193, 94, 0.5);
}
.login-box { position: relative; box-shadow: 0 34px 90px rgba(2, 10, 26, 0.55); }
.login-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 26px;
    right: 26px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #c2a23e 30%, #e3c25f 50%, #c2a23e 70%, transparent);
    opacity: 0.9;
    border-radius: 2px;
}
.login-foot a { color: var(--text-light); }

/* ===== 仪表盘 Hero：藏青渐变 + 金丝光晕 ===== */
.dash-hero {
    background:
        radial-gradient(1100px 320px at 6% -35%, rgba(46, 106, 198, 0.5), transparent 60%),
        radial-gradient(760px 300px at 96% 155%, rgba(226, 193, 94, 0.2), transparent 55%),
        linear-gradient(118deg, #0a2145 0%, #123a77 55%, #1b4f9c 100%);
    box-shadow: 0 16px 44px rgba(10, 33, 69, 0.36);
}
.dash-hero::after {
    content: '';
    position: absolute;
    left: 30px;
    right: 30px;
    top: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(226, 193, 94, 0.85), transparent);
    pointer-events: none;
}
.glow-a { background: rgba(227, 194, 95, 0.18); }
.glow-b { background: rgba(46, 106, 198, 0.5); }
.ring-a { border-color: rgba(226, 193, 94, 0.16); }
.ring-b { border-color: rgba(46, 106, 198, 0.4); }
.dash-hero .btn-primary { color: var(--primary-deep); }
.dash-hero .btn-primary:hover { background: #f7f3e4; color: var(--primary-deep); }
.hero-btn-outline { border-color: rgba(255, 255, 255, 0.32) !important; }

/* ===== 统计卡：主色藏青 ===== */
.c-indigo .stat-icon { background: linear-gradient(135deg, #0f3169, #2e6ac6); box-shadow: 0 6px 16px rgba(15, 49, 105, 0.38); }
.c-indigo .stat-chip { background: rgba(27, 79, 156, 0.12); color: #14428f; }
.c-indigo { color: #1b4f9c; }

/* ===== 趋势图 / 分类分布（金条点睛） ===== */
.tl-art { stroke: #1b4f9c; }
.k-art { background: #1b4f9c; }
.catbar-fill { background: linear-gradient(90deg, #1b4f9c, #2e6ac6); }
.catbar:nth-child(2) .catbar-fill { background: linear-gradient(90deg, #0ea5e9, #38bdf8); }
.catbar:nth-child(5) .catbar-fill { background: linear-gradient(90deg, #e0113f, #fb7185); }
.catbar:nth-child(6) .catbar-fill { background: linear-gradient(90deg, #b58f2f, #e3c25f); }

/* ===== 信息流 / 待办 ===== */
.feed-avatar { background: linear-gradient(135deg, #0f3169, #2e6ac6); }
.todo-item:hover { border-color: #9fb9e0; }
.quick-item svg { color: var(--primary); }
.quick-item:hover { color: var(--primary-dark); }
.quick-item { background: #f6f8fd; }
.empty svg { color: #b7c5dd; }
.rank-title:hover { color: var(--primary); }
.feed-text a:hover { color: var(--primary); }

/* ===== 编辑页 / 设置页 / 工具 ===== */
.card-toggle:hover { background: var(--primary-light); color: var(--primary-dark); }
.cover-uploader .cover-preview, .logo-preview { background: #f7f9fd; }
.ai-loading { color: var(--primary-dark); }
.ai-loading::before { border: 2px solid rgba(27, 79, 156, 0.28); border-top-color: var(--primary); }
.ai-action:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-50); }
.ai-output { background: #f6f8fd; }
.custom-tip { background: var(--primary-light); color: var(--primary-dark); }
.form-section-title { background: var(--primary-light); color: var(--primary-dark); }
.setting-nav-item.active { background: var(--primary-50); border-color: rgba(27, 79, 156, 0.3); }
.setting-nav-item.active .setting-nav-icon { background: var(--grad-brand); }
.alert-info { background: #eaf1fb; color: #14428f; border-color: #cfe0f7; }

/* ===== Toast 主色 ===== */
.app-toast.info { background: linear-gradient(135deg, #1b4f9c, #2e6ac6); }

/* 适配侧栏收起态（窄屏）时保留金色指示条 */
@media (max-width: 900px) {
    .admin-logo { background: transparent; }
    .admin-logo-mark { box-shadow: 0 4px 12px rgba(15, 49, 105, 0.4); }
}
