/* 以 ui优化 设计稿为视觉基准；Tabler 继续提供按钮、表单、弹窗、下拉菜单与折叠交互。 */
:root, [data-bs-theme="light"] {
    color-scheme: light;
    --tblr-primary: #1769e0; --tblr-primary-rgb: 23, 105, 224; --tblr-primary-lt: #eaf2ff;
    --tblr-body-bg: #f5f7fa; --tblr-body-color: #1b2430; --tblr-secondary: #667085; --tblr-secondary-rgb: 102, 112, 133;
    --tblr-border-color: #e4e8ee; --tblr-border-color-translucent: #eef1f5;
    --tblr-link-color: #1458c7; --tblr-link-hover-color: #1458c7;
    --tblr-font-sans-serif: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
    --tblr-border-radius: 8px; --tblr-card-border-radius: 12px; --tblr-sidebar-width: 232px;
    --admin-panel-gap: 16px; --admin-panel-padding: 20px;
}
body { margin: 0; font-family: var(--tblr-font-sans-serif); font-size: 14px; line-height: normal; color: #1b2430; background: #f5f7fa; letter-spacing: normal; }
a { text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.icon { display: inline-block; flex: 0 0 auto; width: 20px; height: 20px; vertical-align: middle; background: currentColor; mask: var(--icon) center / contain no-repeat; }
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 40px; padding: 9px 14px; border-radius: 8px; background-image: none; box-shadow: none; font-size: 14px; line-height: 20px; font-weight: 400; letter-spacing: normal; white-space: nowrap; }
.btn-primary { --tblr-btn-bg: #1769e0; --tblr-btn-border-color: #1769e0; --tblr-btn-hover-bg: #1458c7; --tblr-btn-hover-border-color: #1458c7; --tblr-btn-active-bg: #1458c7; --tblr-btn-active-border-color: #1458c7; --tblr-btn-color: #fff; }
.btn-outline-secondary { --tblr-btn-color: #1b2430; --tblr-btn-bg: #fff; --tblr-btn-border-color: #d0d7e2; --tblr-btn-hover-color: #1b2430; --tblr-btn-hover-bg: #f7f9fc; --tblr-btn-hover-border-color: #b9c3d0; }
.btn-outline-danger { --tblr-btn-color: #b42318; --tblr-btn-bg: #fff; --tblr-btn-border-color: #f0b6b0; --tblr-btn-hover-color: #b42318; --tblr-btn-hover-bg: #fef3f2; --tblr-btn-hover-border-color: #e69890; }
.btn-preview { color: #1458c7; border-color: transparent; background: transparent; }
.btn-preview:hover { color: #1458c7; background: #eaf2ff; }
.btn-restore { --tblr-btn-color: #1458c7; --tblr-btn-border-color: #b7d0fb; --tblr-btn-hover-color: #1458c7; --tblr-btn-hover-bg: #eaf2ff; }
.btn:focus-visible, .action-link:focus-visible, .nav-link:focus-visible, .account-menu:focus-visible { outline: 2px solid #1769e0; outline-offset: 3px; }
.text-danger { color: #b42318 !important; }
.text-success { color: #166a3a !important; }
.text-secondary { color: #667085 !important; }
/* 共用框架，桌面尺寸与设计稿一致。 */
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar { position: sticky; top: 0; align-self: flex-start; width: 232px; flex: 0 0 232px; height: 100vh; overflow-y: auto; background: #fff; border-right: 1px solid #e4e8ee; padding: 20px 12px; }
.admin-sidebar .navbar-brand { display: flex; justify-content: flex-start; gap: 12px; padding: 0 8px 12px; margin: 0 0 2px; height: 48px; font-size: 18px; font-weight: 700; color: #1b2430; }
.brandmark { display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 10px; background: #1769e0; color: #fff; }
.admin-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-group { padding: 16px 12px 6px; color: #667085; font-size: 12px; }
.admin-nav .nav-link { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: 8px; color: #3d4756; font-size: 14px; }
.admin-nav .nav-link:hover { background: #f2f4f7; }
.admin-nav .nav-link.active { background: #eaf2ff; color: #1458c7; font-weight: 600; }
.nav-count { margin-left: auto; padding: 1px 7px; border-radius: 10px; background: #d92d20; color: #fff; font-size: 12px; font-weight: 600; line-height: 18px; }
.admin-main { flex: 1; min-width: 0; }
.admin-topbar { display: flex; align-items: center; justify-content: flex-end; gap: 8px; height: 56px; padding: 0 32px; border-bottom: 1px solid #e4e8ee; background: #fff; }
.topbar-title { flex: 1; min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 22px; line-height: normal; font-weight: 700; }
.topbar-notification { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; color: #3d4756; }
.topbar-notification:hover { background: #f2f4f7; color: #3d4756; }
.account-menu { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 8px 0 4px; border: 0; background: none; border-radius: 20px; color: #1b2430; }
.account-menu:hover { background: #f2f4f7; }
.account-menu > .icon { width: 16px; height: 16px; }
.account-avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: #1458c7; background: #eaf2ff; font-size: 13px; font-weight: 600; }
.dropdown-menu { padding: 6px; border: 1px solid #e4e8ee; border-radius: 10px; box-shadow: 0 8px 24px rgb(16 24 40 / 10%); }
.dropdown-item { gap: 10px; border-radius: 6px; padding: 9px 12px; }
.mobile-nav-toggle { display: none; }
.admin-content { display: flex; flex-direction: column; gap: 20px; width: 100%; max-width: 1280px; padding: 28px 32px 48px; }
.admin-content > * { min-width: 0; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-summary { margin: 0; font-size: 14px; color: #667085; }
.heading-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.heading-actions .btn { height: 44px; padding: 0 20px; border-radius: 10px; font-weight: 600; }
.page-actions { display: flex; gap: 8px; }
/* 状态页沿用后台组件；故障时可独立展示，不依赖 CDN 或脚本。 */
.error-state { width: 100%; max-width: 560px; margin: 20px auto; padding: 40px; text-align: center; box-sizing: border-box; }
.error-status { color: #1769e0; font-size: 64px; line-height: 1.15; font-weight: 700; }
.error-message { margin: 20px 0 0; color: #667085; line-height: 1.7; overflow-wrap: anywhere; }
.error-reference { margin: 16px 0 0; color: #667085; font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.error-reference code { font-family: ui-monospace, monospace; color: inherit; }
.error-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 24px; }
.admin-error-main { display: grid; align-content: center; min-height: calc(100vh - 56px); padding: 28px 16px 48px; box-sizing: border-box; }
.admin-error .admin-topbar { box-sizing: border-box; }
.error-brand { color: #667085; white-space: nowrap; }
.admin-error .btn { box-sizing: border-box; border: 1px solid #d0d7e2; }
.admin-error .btn-primary { color: #fff; background: #1769e0; border-color: #1769e0; }
.admin-error .btn-primary:hover { background: #1458c7; border-color: #1458c7; }
.admin-error .btn-outline-secondary { color: #1b2430; background: #fff; }
.admin-error .btn-outline-secondary:hover { background: #f7f9fc; }
@media (max-width: 575px) {
    .error-state { padding: 28px 20px; }
    .error-brand { display: none; }
}
/* 统计、分类和卡片配色直接沿用参考稿。 */
.tone-mint { background: #e8f6ee; color: #166a3a; }
.tone-blue { background: #e8f0fe; color: #1458c7; }
.tone-amber { background: #fff4e0; color: #b54708; }
.tone-lavender { background: #f6eafe; color: #7a2a9a; }
.tone-red { background: #fee4e2; color: #b42318; }
.tone-neutral { background: #eef1f5; color: #475467; }
.card { border: 1px solid #e4e8ee; border-radius: 12px; background: #fff; box-shadow: none; }
.card-body { padding: 20px; }
.card-title { margin: 0; font-size: 16px; line-height: 24px; font-weight: 600; }
.card-header { padding: 20px; min-height: 0; gap: 12px; border-color: #eef1f5; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 16px; }
.config-card { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.config-card:hover { border-color: #c9d3e0; box-shadow: 0 2px 8px rgb(16 24 40 / 6%); }
.category-summary { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid #e4e8ee; }
.category-summary-item { display: inline-flex; align-items: center; height: 44px; padding: 0 14px; gap: 6px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: #667085; }
.category-summary-item.active { color: #1458c7; border-bottom-color: #1769e0; font-weight: 600; }
.category-summary-item > span, .count-chip { padding: 1px 7px; border-radius: 10px; font-size: 12px; font-weight: 500; background: #eef1f5; color: #475467; }
.category-summary-item.active > span, .count-chip { color: #1458c7; background: #eaf2ff; }
.category-heading { display: flex; align-items: center; gap: 12px; }
.category-icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 10px; }
.category-icon .icon { width: 22px; height: 22px; }
.category-name { min-width: 0; flex: 1; font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.category-name small { display: block; margin-top: 2px; color: #667085; font-size: 13px; font-weight: 400; }
.qualification-chip { display: table; margin-top: 4px; padding: 2px 8px; border-radius: 11px; color: #b54708; background: #fff4e0; font-size: 12px; font-weight: 500; }
.category-card.is-inactive .category-icon { opacity: .55; }
.category-card.is-inactive .category-name { color: #667085; }
.switch { display: block; position: relative; flex: none; width: 44px; height: 24px; padding: 0; border: 0; border-radius: 12px; background: #98a2b3; }
.switch::before { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; }
.switch[aria-checked="true"] { background: #1769e0; }
.switch[aria-checked="true"]::before { left: 22px; }
.switch:focus-visible { outline: 2px solid #1769e0; outline-offset: 3px; }
.locked-switch { opacity: .45; cursor: default; }
.category-metrics { display: flex; gap: 32px; padding: 12px 0; border-block: 1px solid #eef1f5; color: #667085; font-size: 13px; }
.category-metrics strong { display: block; margin-top: 2px; font-size: 18px; font-weight: 600; color: #1b2430; }
.pending-metric strong { color: #b54708; }
.category-lock { display: flex; align-items: center; gap: 8px; min-height: 74px; padding: 12px 0; border-block: 1px solid #eef1f5; color: #667085; font-size: 13px; }
.category-lock .icon { width: 16px; height: 16px; }
.category-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; color: #667085; font-size: 13px; min-height: 40px; }
.category-footer > span { padding: 0 8px; }
.category-footer .btn { height: 40px; }
.category-footer .icon { width: 16px; height: 16px; }
/* 概览 */
.dashboard-todos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 16px; }
.todo-card { display: flex; flex-direction: row; align-items: center; gap: 16px; padding: 20px; }
.todo-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; flex: none; }
.todo-icon .icon { width: 24px; height: 24px; }
.todo-value { font-size: 32px; font-weight: 700; line-height: 1.1; }
.todo-label { font-size: 14px; color: #667085; margin-top: 2px; }
.todo-card .btn { margin-left: auto; height: 44px; padding: 0 20px; border-radius: 10px; font-weight: 600; }
.dashboard-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; }
.kpi-card { padding: 20px; }
.kpi-label { display: flex; justify-content: space-between; align-items: center; color: #667085; }
.kpi-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; }
.kpi-value { margin: 6px 0 4px; font-size: 28px; font-weight: 700; line-height: normal; }
.kpi-note { color: #667085; font-size: 13px; }
.dashboard-panels { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; }
.dashboard-panel { display: flex; flex-direction: column; gap: 16px; padding: 20px; }
.panel-title { display: flex; align-items: center; gap: 8px; }
.panel-title h2 { margin: 0; font-size: 16px; font-weight: 600; line-height: normal; }
.panel-note, .panel-more { margin-left: auto; font-size: 13px; font-weight: 400; color: #667085; }
.panel-more { display: flex; align-items: center; gap: 2px; color: #1458c7; }
.panel-more .icon { width: 16px; height: 16px; }
.chart { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; }
.chart-column { display: flex; flex-direction: column; gap: 8px; align-items: center; min-width: 0; }
.bar-track { width: 100%; height: 210px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; border-bottom: 1px solid #d0d7e2; border-radius: 6px 6px 0 0; }
.bar { width: 56%; max-width: 64px; flex: none; background: #1769e0; border-radius: 6px 6px 0 0; }
.chart-value { font-size: 13px; font-weight: 600; color: #475467; padding-bottom: 2px; }
.chart-day { font-size: 13px; color: #667085; white-space: nowrap; }
.is-today .bar-track { background: #f2f7ff; }
.is-today .chart-day { color: #1458c7; font-weight: 600; }
.is-future .bar-track { border-bottom-style: dashed; }
.activity-day { font-size: 12px; color: #667085; }
.activity-item { display: flex; gap: 12px; align-items: flex-start; }
.activity-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: #475467; background: #f2f4f7; flex: none; }
.activity-icon .icon { width: 16px; height: 16px; }
.activity-copy { min-width: 0; overflow-wrap: anywhere; line-height: 32px; }
.activity-copy time { display: block; font-size: 13px; color: #667085; line-height: 20px; margin-top: -4px; }
.activity-count { display: inline-block; margin-left: 8px; padding: 1px 8px; font-size: 12px; line-height: 18px; border-radius: 10px; color: #475467; background: #eef1f5; }
/* 筛选和列表；仅展示已有功能的入口。 */
.posts-toolbar, .review-toolbar, .user-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.status-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-chip { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 6px 14px; border: 1px solid #d0d7e2; border-radius: 18px; background: #fff; font-size: 14px; color: #3d4756; white-space: nowrap; }
.filter-chip:hover { background: #f7f9fc; color: #3d4756; }
.filter-chip.active { background: #eaf2ff; border-color: #b7d0fb; color: #1458c7; font-weight: 600; }
.toolbar-hint { margin-left: auto; font-size: 13px; color: #667085; }
.list-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.posts-toolbar .list-toolbar, .user-toolbar .list-toolbar { margin-left: auto; }
.list-search-field { flex: 0 1 280px; width: 280px; min-width: 180px; }
.list-toolbar .form-control, .list-toolbar .form-select { height: 40px; min-height: 40px; }
.list-search-field .input-icon-addon { width: 38px; min-width: 38px; color: #667085; }
.list-search-field .form-control { padding-left: 38px; }
.list-toolbar .list-status { width: auto; min-width: 140px; }
.list-clear-filters { font-size: 13px; white-space: nowrap; }
.list-card { overflow: hidden; }
.table-responsive { overflow-x: auto; }
.table { width: 100%; margin: 0; font-size: 14px; color: #1b2430; border-collapse: collapse; --tblr-table-border-color: #eef1f5; }
.admin-content .table > thead > tr > th { height: 44px; padding: 0 12px; color: #667085; background: #fafbfc; border-bottom: 1px solid #e4e8ee; font-size: 13px; line-height: 20px; font-weight: 500; letter-spacing: normal; text-transform: none; white-space: nowrap; }
.admin-content .table > tbody > tr > td { height: 56px; padding: 8px 12px; border-bottom: 1px solid #eef1f5; vertical-align: middle; }
.admin-content .card-table > :not(caption) > * > :first-child { padding-left: 16px; }
.admin-content .card-table > :not(caption) > * > :last-child { padding-right: 16px; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #f9fafb; }
.post-table { min-width: 960px; }
.post-title-cell { min-width: 260px; }
.post-title { font-weight: 500; overflow-wrap: anywhere; }
.post-short-id { margin-left: 6px; color: #667085; font-weight: 400; white-space: nowrap; }
.demo-chip { margin-right: 8px; padding: 1px 6px; border-radius: 4px; background: #eef1f5; color: #475467; font-size: 12px; font-weight: 400; white-space: nowrap; }
.category-tag { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 13px; white-space: nowrap; }
.time-cell { color: #667085; white-space: nowrap; }
.row-actions { width: 1%; white-space: nowrap; }
.table-actions { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.table-actions .btn { min-height: 36px; height: 36px; min-width: 64px; padding: 0 14px; }
.table-actions .btn-preview { min-width: 56px; }
.screen-review .table-actions { justify-content: flex-end; }
.screen-review .actions-heading { text-align: right; }
.wait-time { font-weight: 600; white-space: nowrap; }
.wait-long { color: #b42318; }
.wait-medium { color: #b54708; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border: 0; border-radius: 12px; min-height: 24px; line-height: 20px; font-size: 13px; font-weight: 400; letter-spacing: normal; white-space: nowrap; }
.status-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-positive { color: #166a3a; background: #e8f6ee; }
.status-pending { color: #b54708; background: #fff4e0; }
.status-danger { color: #b42318; background: #fef0ee; }
.status-muted { color: #667085; background: #eef1f5; }
.admin-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid #e4e8ee; font-size: 13px; color: #667085; }
.pagination { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; }
.page-item .page-link { display: grid; place-items: center; min-width: 36px; height: 36px; padding: 0 8px; border: 1px solid #d0d7e2; border-radius: 8px !important; background: #fff; color: #3d4756; font-size: 14px; }
.page-item .page-link:hover { background: #f7f9fc; }
.page-item.active .page-link { background: #1769e0; border-color: #1769e0; color: #fff; }
.page-item.disabled .page-link { color: #98a2b3; background: #fff; opacity: .6; }
.page-link .icon { width: 16px; height: 16px; }
.page-gap { display: grid; place-items: center; min-width: 24px; }
.list-empty-state, .empty { padding: 48px 20px; text-align: center; color: #667085; margin: 0; }
.list-empty-reset { display: inline-block; margin-left: 12px; }
.user-table { min-width: 900px; }
.admin-content .user-table > tbody > tr > td { height: 64px; }
.user-identity { display: flex; align-items: center; gap: 12px; }
.user-avatar { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 50%; background: #eaf2ff; color: #1458c7; font-weight: 600; }
.user-name { font-weight: 500; }
.user-id { display: block; margin-top: 2px; padding: 0; background: none; color: #667085; font-size: 12px; }
.admin-content .user-table .number-cell { width: 96px; text-align: right; padding-right: 36px; font-weight: 600; }
.user-table .number-cell.is-zero { font-weight: 400; color: #667085; }
.user-state { display: flex; align-items: center; gap: 10px; }
.ban-note { display: block; max-width: 280px; color: #667085; font-size: 13px; overflow-wrap: anywhere; }
.ban-note strong { color: #b42318; font-weight: 600; }
.user-table .btn-preview { min-width: 80px; }
/* 其余后台页面使用相同的卡片、表格和控件规范。 */
.card-top, .card-meta, .notice-title, .detail header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-meta { padding-block: 12px; border-block: 1px solid #eef1f5; font-size: 13px; color: #667085; }
.banner-cover { height: 170px; position: relative; overflow: hidden; border-radius: 8px; background: #f2f4f7; }
.banner-cover img { width: 100%; height: 100%; object-fit: cover; }
.banner-cover h2 { position: absolute; inset: auto 0 0; margin: 0; padding: 32px 16px 12px; color: #fff; background: linear-gradient(transparent, #1b2430cc); }
.config-card > .d-flex { gap: 16px !important; margin-top: 0 !important; }
.action-link { padding: 0; border: 0; background: none; color: #1458c7; font: inherit; cursor: pointer; }
.action-link:hover { text-decoration: underline; }
.pending-summary { display: inline-flex; align-items: center; gap: 6px; color: #b54708; font-size: 13px; }
.pending-summary strong { font-weight: 600; }
.pending-summary.is-empty { color: #667085; }
.toolbar-queue { margin-left: auto; }
.multiline { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; }
.report-note { display: block; max-width: 300px; margin-top: 4px; }
.notice { padding: 20px 0; border-bottom: 1px solid #eef1f5; }
.notice:first-child { padding-top: 0; }
.notice:last-child { border: 0; padding-bottom: 0; }
.notice-title { justify-content: flex-start; flex-wrap: wrap; }
.notice-title time { margin-left: auto; color: #667085; font-size: 13px; }
.notice p { margin: 16px 0; }
.notice .action-link { min-height: 32px; }
.settings { gap: 0; }
.settings-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 24px; align-items: start; padding: 20px 0; border-bottom: 1px solid #eef1f5; margin: 0; }
.settings-row:first-of-type { padding-top: 0; }
.settings-row > strong, .settings-row > span { padding-top: 10px; line-height: 20px; font-weight: 500; }
.settings-row > .form-control { margin: 0; }
.settings > .btn { margin-top: 20px; align-self: flex-start; }
.list-line { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid #eef1f5; }
.list-line:last-child { border: 0; padding-bottom: 0; }
.list-line > span { min-width: 0; overflow-wrap: anywhere; }
.list-line .icon { width: 16px; height: 16px; color: #667085; margin-right: 8px; }
.list-line time { flex-shrink: 0; color: #667085; font-size: 13px; }
.account-name { overflow-wrap: anywhere; }
/* Tabler 表单与弹窗保留原有焦点、提交校验和关闭逻辑。 */
.form-label { display: block; font-size: 14px; font-weight: 500; }
.form-control, .form-select { min-height: 40px; padding: 9px 12px; border: 1px solid #d0d7e2; border-radius: 8px; font-size: 14px; line-height: 20px; background-color: #fff; color: #1b2430; box-shadow: none; }
.form-control::placeholder { color: #98a2b3; }
.form-control:focus, .form-select:focus { border-color: #1769e0; box-shadow: 0 0 0 3px rgb(23 105 224 / 12%); }
.form-label > .form-control, .form-label > .form-select { margin-top: 8px; font-weight: 400; }
textarea.form-control { line-height: 1.7; resize: vertical; }
.form-check-input:checked { background-color: #1769e0; border-color: #1769e0; }
.modal-content { border: 1px solid #e4e8ee; border-radius: 12px; box-shadow: 0 16px 48px rgb(16 24 40 / 16%); }
.modal .modal-header { min-height: 64px; padding: 20px 24px; gap: 12px; border-bottom: 1px solid #eef1f5; }
.modal .modal-body { padding: 24px; }
.modal .modal-title { font-size: 16px; line-height: 24px; font-weight: 600; overflow-wrap: anywhere; }
.modal .editor, .modal .operation { display: grid; gap: 20px; margin: 0; color: #1b2430; }
.modal .form-label, .modal .form-check { margin-bottom: 0; }
.modal .btn { min-height: 40px; }
.modal-form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 0; padding-top: 20px; border-top: 1px solid #eef1f5; }
.modal .editor > p, .modal .operation > p { margin: 0; }
.template-editor fieldset { display: grid; gap: 20px; padding: 20px; border: 1px solid #e4e8ee; border-radius: 8px; }
.template-editor legend { float: none; width: auto; padding-inline: 8px; font-size: 14px; margin: 0; }
.detail { padding: 20px; }
.detail header { flex-wrap: wrap; }
.detail > .text-secondary { margin: 12px 0 20px; }
.detail > .multiline { margin: 0 0 20px; }
.details { margin-top: 20px; padding-top: 20px; border-top: 1px solid #eef1f5; }
.details p { margin-bottom: 12px; }
.details p:last-child { margin-bottom: 0; }
.post-images { display: flex; flex-wrap: wrap; gap: 12px; }
.post-images img { width: 150px; height: 120px; object-fit: cover; border-radius: 8px; }
.post-preview-detail { padding: 0; }
.post-preview-detail .card-title { font-size: 18px; line-height: 1.5; overflow-wrap: anywhere; }
.user-posts-records { display: grid; gap: 20px; }
.post-preview-status { display: grid; place-items: center; min-height: 160px; color: #667085; }
.post-preview-actions { position: sticky; bottom: -24px; z-index: 1; justify-content: flex-end; margin: 24px -24px -24px; padding: 16px 24px; border-top: 1px solid #eef1f5; background: #fff; }
#post-preview [data-preview-panel] h3 { overflow-wrap: anywhere; }
.credential-copy { display: flex; gap: 12px; margin-bottom: 16px; }
.credential-copy input { min-width: 0; font-family: ui-monospace, monospace; }
.credential-copy .btn { flex-shrink: 0; }
/* 登录页沿用同一套配色和控件。 */
.admin-login { min-height: 100vh; }
.admin-login .page-center { min-height: 100vh; }
.login-brand { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 28px; color: #1b2430; font-size: 22px; font-weight: 700; }
.admin-login .card-body { padding: 32px; }
.admin-login .form-footer { margin-top: 24px; }
.admin-login .form-footer .btn { min-height: 44px; font-weight: 600; }
@media (min-width: 761px) { .admin-sidebar #sidebar-menu { display: block !important; } }
@media (max-width: 1000px) { .dashboard-panels { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
    .admin-shell { display: block; }
    .admin-sidebar { position: absolute; top: 56px; left: 0; z-index: 1030; width: 100%; height: auto; padding: 0; border: 0; }
    .admin-sidebar .navbar-brand { display: none; }
    .admin-sidebar #sidebar-menu.show, .admin-sidebar #sidebar-menu.collapsing { padding: 12px 16px; border-bottom: 1px solid #e4e8ee; box-shadow: 0 8px 16px rgb(16 24 40 / 8%); max-height: calc(100vh - 56px); overflow-y: auto; }
    .admin-topbar { padding: 0 16px; }
    .mobile-nav-toggle { display: inline-flex; width: 40px; flex: none; padding: 0; border: 0; color: #3d4756; background: transparent; }
    .admin-content { padding: 20px 16px 32px; }
    .page-heading { align-items: flex-start; }
    .posts-toolbar .list-toolbar, .user-toolbar .list-toolbar { margin-left: 0; width: 100%; }
    .list-search-field { flex: 1; width: auto; min-width: 0; }
    .toolbar-hint { margin-left: 0; }
    .user-state { align-items: flex-start; flex-direction: column; gap: 4px; }
    .table:not(.post-table):not(.user-table) { min-width: 700px; }
}
@media (max-width: 575px) {
    .heading-actions { width: 100%; }
    .dashboard-kpis { grid-template-columns: 1fr; }
    .todo-card { gap: 12px; padding: 16px; }
    .todo-card .btn { padding: 0 14px; }
    .settings-row { grid-template-columns: 1fr; gap: 12px; }
    .settings-row > strong, .settings-row > span { padding-top: 0; }
    .list-line { align-items: flex-start; flex-direction: column; gap: 4px; }
    .chart { gap: 6px; }
    .chart-day { font-size: 11px; }
    .panel-note { font-size: 12px; }
    .credential-copy { flex-wrap: wrap; }
    .post-images img { width: 120px; height: 100px; }
    .modal .modal-header { padding: 16px; }
    .modal .modal-body { padding: 20px; }
    .post-preview-actions { bottom: -20px; margin: 20px -20px -20px; padding: 16px 20px; }
}

/* 所有操作反馈悬浮于页面上方，不挤占列表或表单空间。 */
.admin-notifications { position: fixed; top: calc(72px + env(safe-area-inset-top, 0px)); inset-inline: 0; z-index: 1100; display: flex; justify-content: center; padding-inline: 16px; pointer-events: none; }
.admin-toast { display: flex; align-items: center; gap: 12px; width: max-content; max-width: min(640px, 100%); padding: 16px 24px; border: 1px solid var(--notification-border); border-radius: 12px; background: var(--notification-bg); color: var(--notification-color); box-shadow: 0 8px 28px rgb(24 36 51 / 10%); font-size: 15px; line-height: 1.6; pointer-events: auto; animation: notification-in .18s ease-out; }
.admin-toast-success { --notification-bg: #ecfdf5; --notification-border: #a7f3d0; --notification-color: #166534; }
.admin-toast-error { --notification-bg: #fef2f2; --notification-border: #fecaca; --notification-color: #b91c1c; }
.admin-toast-warning { --notification-bg: #fffbeb; --notification-border: #fde68a; --notification-color: #92400e; }
.admin-toast-info { --notification-bg: #eff6ff; --notification-border: #bfdbfe; --notification-color: #1d4ed8; }
.admin-toast-icon { flex: 0 0 20px; width: 20px; height: 20px; }
.admin-toast-message { min-width: 0; overflow-wrap: anywhere; }
.admin-toast-close { display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; margin: -4px -8px -4px 4px; padding: 5px; border: 0; border-radius: 6px; background: none; color: inherit; cursor: pointer; }
.admin-toast-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.admin-toast-close:hover { background: rgb(0 0 0 / 5%); }
.admin-toast-close:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.admin-toast-leaving { animation: notification-out .16s ease-in forwards; pointer-events: none; }
@keyframes notification-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes notification-out { to { opacity: 0; transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .admin-toast, .admin-toast-leaving { animation: none; } }

@media (max-width: 575px) { .admin-toast { gap: 10px; padding: 14px 16px; font-size: 14px; } }

.todo-value-amber { color: #b54708; }
.todo-value-red { color: #b42318; }
.todo-card .btn .icon { width: 16px; height: 16px; }
.btn .icon { margin: 0; }
.heading-actions .btn-primary, .todo-card .btn-primary { border-color: transparent; }
.todo-card .btn-outline-secondary { padding-inline: 14px; font-weight: 400; }

.user-state .ban-note { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
