/* 后台管理面板独立样式（不加载主应用样式，避免相互影响） */
:root {
  --adm-bg: #f4f6fb;
  --adm-panel: #ffffff;
  --adm-line: #e4e8f2;
  --adm-text: #1f2430;
  --adm-muted: #6b7385;
  --adm-primary: #2f6fed;
  --adm-primary-dark: #2559c9;
  --adm-danger: #d64545;
  --adm-radius: 10px;
  --adm-shadow: 0 1px 2px rgba(20, 30, 60, 0.05), 0 6px 20px rgba(20, 30, 60, 0.05);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--adm-bg);
  color: var(--adm-text);
  font-family: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

#admin-app {
  min-height: 100%;
}

/* ===== 登录页 ===== */
.adm-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(1200px 600px at 20% -10%, #dce7ff 0%, transparent 60%), var(--adm-bg);
}

.adm-login-card {
  width: 100%;
  max-width: 380px;
  background: var(--adm-panel);
  border: 1px solid var(--adm-line);
  border-radius: 14px;
  box-shadow: var(--adm-shadow);
  padding: 32px 28px 24px;
}

/* 品牌行：logo + 站点名称，靠左上角排一行（图标本身带底色，容器不再加框/加底） */
.adm-login-brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin-bottom: 22px;
}

.adm-login-mark {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 登录页品牌标识：与主站共用 /site/logo（站点管理上传的图）
   统一用 object-fit: contain 适配方图/横幅图/透明底图三种情况 */
.adm-login-mark .adm-login-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.adm-login-brand-name {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

.adm-login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.adm-login-msg:empty {
  display: none;
}

/* ===== 布局 ===== */
.adm-shell {
  display: flex;
  min-height: 100vh;
}

.adm-side {
  width: 216px;
  flex: 0 0 216px;
  background: #101728;
  color: #c9d3e6;
  display: flex;
  flex-direction: column;
  padding: 18px 14px 14px;
  gap: 18px;
}

.adm-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px 6px;
  /* 品牌区是指向主站首页的链接：去掉下划线/链接色，保持原有排版 */
  color: inherit;
  text-decoration: none;
}

.adm-brand-mark {
  width: 32px;
  height: 32px;
  /* 图标自带底色，容器不再加底/加框 */
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
}

/* 后台侧栏品牌标识：与主站共用 /site/logo */
.adm-brand-mark .adm-brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.adm-brand-name {
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

.adm-brand-sub {
  font-size: 11px;
  color: #7c8aa8;
  letter-spacing: 0.04em;
}

.adm-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.adm-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  color: #c9d3e6;
  text-decoration: none;
  font-size: 13.5px;
  transition: background 0.15s ease, color 0.15s ease;
}

.adm-nav-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.adm-nav-item.active {
  background: var(--adm-primary);
  color: #fff;
}

.adm-nav-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.adm-nav-icon svg {
  width: 18px;
  height: 18px;
}

.adm-side-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 4px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
}

.adm-link {
  color: #8fa1c2;
  text-decoration: none;
}

.adm-link:hover {
  color: #fff;
}

.adm-ver {
  color: #66748f;
}

.adm-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.adm-top {
  height: 56px;
  flex: 0 0 56px;
  background: var(--adm-panel);
  border-bottom: 1px solid var(--adm-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 12px;
}

.adm-top-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.adm-top-right {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--adm-muted);
}

.adm-user {
  white-space: nowrap;
}

.adm-badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef1f7;
  color: #5b6478;
  font-size: 12px;
  border: 1px solid var(--adm-line);
}

.adm-badge-on {
  background: #e8f1ff;
  color: var(--adm-primary);
  border-color: #c7dbff;
}

.adm-badge-off {
  background: #f3eaea;
  color: #9a6a6a;
  border-color: #e6cfcf;
}

.adm-btn-xs {
  padding: 2px 10px;
  font-size: 12px;
  line-height: 1.6;
}

.adm-keys-new {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: #fff7e6;
  border: 1px solid #ffe1a6;
  border-radius: var(--adm-radius);
}

.adm-keys-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  background: #1e2330;
  color: #e8f1ff;
  padding: 4px 10px;
  border-radius: 6px;
  word-break: break-all;
}

.adm-content {
  padding: 20px;
  flex: 1;
}

/* ===== 页面块 ===== */
.adm-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.adm-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 14px;
}

.adm-stat {
  background: var(--adm-panel);
  border: 1px solid var(--adm-line);
  border-radius: var(--adm-radius);
  box-shadow: var(--adm-shadow);
  padding: 16px 18px;
}

.adm-stat-label {
  font-size: 12.5px;
  color: var(--adm-muted);
}

.adm-stat-value {
  font-size: 26px;
  font-weight: 600;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}

.adm-stat-hint {
  font-size: 12px;
  color: var(--adm-muted);
}

/* 需紧急处理的统计卡：仅在确有未拦截命中时高亮 */
.adm-stat-danger {
  border-color: #f3c8c8;
  background: #fdf3f3;
}

.adm-stat-danger .adm-stat-value {
  color: var(--adm-danger);
}

.adm-panel {
  background: var(--adm-panel);
  border: 1px solid var(--adm-line);
  border-radius: var(--adm-radius);
  box-shadow: var(--adm-shadow);
  padding: 16px 18px 18px;
}

.adm-panel-title {
  margin: 0 0 12px;
  font-size: 14.5px;
  font-weight: 600;
}

.adm-hint {
  margin: 0 0 12px;
  font-size: 12.5px;
  color: var(--adm-muted);
}

.adm-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.adm-toolbar .adm-input {
  max-width: 300px;
}

/* ===== 表格 ===== */
.adm-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--adm-line);
  border-radius: 8px;
}

.adm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.adm-table th,
.adm-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--adm-line);
  white-space: nowrap;
}

.adm-table th {
  background: #f8fafd;
  color: var(--adm-muted);
  font-weight: 500;
  font-size: 12.5px;
}

.adm-table tbody tr:last-child td {
  border-bottom: none;
}

.adm-table tbody tr:hover td {
  background: #fafcff;
}

.adm-empty {
  text-align: center !important;
  color: var(--adm-muted);
  padding: 28px 12px !important;
}

/* ===== 分页 ===== */
.adm-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--adm-muted);
}

.adm-pager-btns {
  display: flex;
  gap: 8px;
}

/* ===== 表单控件 ===== */
.adm-btn {
  font: inherit;
  border-radius: 8px;
  padding: 7px 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.adm-btn-primary {
  background: var(--adm-primary);
  color: #fff;
}

.adm-btn-primary:hover {
  background: var(--adm-primary-dark);
}

.adm-btn-ghost {
  background: #fff;
  border-color: var(--adm-line);
  color: #39414f;
}

.adm-btn-ghost:hover {
  border-color: #c3cddf;
  background: #f7f9fd;
}

.adm-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.adm-btn-block {
  width: 100%;
  padding: 9px 14px;
}

.adm-input {
  font: inherit;
  width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--adm-line);
  border-radius: 8px;
  background: #fff;
  color: var(--adm-text);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.adm-input:focus {
  border-color: var(--adm-primary);
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.12);
}

/* 登录锁定期间输入框禁用：明确表达「现在不能输入」 */
.adm-input:disabled {
  background: #f2f4f9;
  color: var(--adm-muted);
  cursor: not-allowed;
}

.adm-select {
  max-width: 160px;
}

.adm-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.adm-field-label {
  font-size: 12.5px;
  color: var(--adm-muted);
}

.adm-field-hint {
  font-size: 12px;
  color: var(--adm-muted);
}

.adm-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 380px;
}

.adm-form-actions {
  display: flex;
  gap: 8px;
}

.adm-form-msg:empty {
  display: none;
}

/* 站点管理：字段较多，表单放宽一些 */
.adm-form-wide {
  max-width: 640px;
}

.adm-textarea {
  min-height: 88px;
  resize: vertical;
  line-height: 1.6;
}

/* ===== 站点管理：图标 / logo 上传 ===== */
.adm-assets {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.adm-asset-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.adm-asset-preview {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--adm-line);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.adm-asset-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* logo 多为彩色底图，给一点内边距避免贴边 */
.adm-asset-logo {
  padding: 8px;
  background: #f8fafd;
}

.adm-asset-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.adm-asset-title {
  font-size: 13.5px;
  font-weight: 600;
}

.adm-asset-hint {
  font-size: 12px;
  color: var(--adm-muted);
}

.adm-asset-status {
  font-size: 12px;
  color: var(--adm-muted);
  font-variant-numeric: tabular-nums;
}

.adm-asset-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.adm-asset-file {
  font: inherit;
  font-size: 12.5px;
  max-width: 260px;
  color: var(--adm-text);
}

/* ===== 用户管理：用户单元格（用户名 / 邮箱 / sub 三行）===== */
.adm-user-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.4;
}

.adm-user-name {
  font-weight: 600;
}

.adm-user-sub {
  font-size: 12px;
  color: var(--adm-muted);
}

.adm-user-id {
  font-size: 12px;
  color: var(--adm-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* 导图数 + 存储占用：「9 (123KB)」 */
.adm-maps-cell {
  display: flex;
  align-items: baseline;
  gap: 1px;
  font-variant-numeric: tabular-nums;
}

/* ===== 提示条 ===== */
.adm-alert {
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
  border: 1px solid transparent;
}

.adm-alert-info {
  background: #eff5ff;
  border-color: #cfe0ff;
  color: #2454b8;
}

.adm-alert-warn {
  background: #fff8e8;
  border-color: #ffe2b0;
  color: #96610b;
}

.adm-alert-error {
  background: #fdf1f1;
  border-color: #f6d3d3;
  color: var(--adm-danger);
}

/* ===== 键值列表 / 加载态 ===== */
.adm-kv {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.adm-kv-row {
  display: flex;
  gap: 16px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--adm-line);
  font-size: 13px;
}

.adm-kv-row:last-child {
  border-bottom: none;
}

.adm-kv-row dt {
  width: 96px;
  flex: 0 0 96px;
  color: var(--adm-muted);
}

.adm-kv-row dd {
  margin: 0;
}

.adm-loading {
  padding: 28px 0;
  text-align: center;
  color: var(--adm-muted);
  font-size: 13px;
}

/* ===== 页内选项卡（日志管理等多视图页）===== */
.adm-tabs-root {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.adm-tabs {
  display: flex;
  gap: 4px;
  background: var(--adm-panel);
  border: 1px solid var(--adm-line);
  border-radius: var(--adm-radius);
  box-shadow: var(--adm-shadow);
  padding: 4px;
  align-self: flex-start;
  flex-wrap: wrap;
}

.adm-tab {
  font: inherit;
  font-size: 13.5px;
  border: none;
  background: transparent;
  color: var(--adm-muted);
  padding: 7px 16px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.adm-tab:hover {
  color: var(--adm-text);
  background: #f4f7fd;
}

.adm-tab.active {
  background: var(--adm-primary);
  color: #fff;
}

.adm-tab-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ===== 标签 / 状态徽标 ===== */
.adm-tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.6;
  border: 1px solid transparent;
  white-space: nowrap;
}

.adm-tag-ok {
  background: #eaf7ee;
  border-color: #c8e8d3;
  color: #23713f;
}

.adm-tag-info {
  background: #eef4ff;
  border-color: #cfe0ff;
  color: #2454b8;
}

.adm-tag-warn {
  background: #fff7e6;
  border-color: #ffe0ae;
  color: #94600a;
}

.adm-tag-danger {
  background: #fdeeee;
  border-color: #f7d2d2;
  color: var(--adm-danger);
}

.adm-tag-muted {
  background: #f1f3f8;
  border-color: var(--adm-line);
  color: var(--adm-muted);
}

/* ===== 日志表格辅助 ===== */
.adm-input-sm {
  max-width: 150px !important;
  flex: 0 0 150px;
}

.adm-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--adm-muted);
  white-space: nowrap;
  padding: 0 4px;
}

.adm-path {
  display: inline-block;
  max-width: 380px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12.5px;
}

.adm-row-click {
  cursor: pointer;
}

.adm-form-msg {
  font-size: 12.5px;
  color: var(--adm-muted);
  margin: 0 0 10px;
}

.adm-form-msg:empty {
  display: none;
}

/* ===== 请求量趋势 ===== */
.adm-trend {
  margin-bottom: 6px;
}

.adm-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 96px;
  padding: 0 2px;
  border-bottom: 1px solid var(--adm-line);
}

.adm-chart-col {
  flex: 1 1 0;
  min-width: 3px;
  height: 100%;
  display: flex;
  align-items: flex-end;
}

.adm-chart-bar {
  position: relative;
  width: 100%;
  background: #cfe0ff;
  border-radius: 3px 3px 0 0;
  min-height: 2px;
  transition: background 0.15s ease;
}

.adm-chart-col:hover .adm-chart-bar {
  background: var(--adm-primary);
}

.adm-chart-err {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: #e88383;
  border-radius: 0 0 2px 2px;
}

.adm-chart-axis {
  margin-top: 6px;
  font-size: 12px;
  color: var(--adm-muted);
}

/* 分时段图的横轴刻度（每 3 小时一个标签，与柱子一一对齐） */
.adm-chart-ticks {
  display: flex;
  gap: 3px;
  padding: 0 2px;
  margin-top: 4px;
}

.adm-chart-tick {
  flex: 1 1 0;
  min-width: 3px;
  font-size: 11px;
  line-height: 1;
  color: var(--adm-muted);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ===== 用户统计：粒度切换 / 占比条 / 双列布局 ===== */
.adm-toolbar-flat {
  margin-bottom: 0;
  align-items: center;
}

.adm-hint-inline {
  font-size: 12.5px;
  color: var(--adm-muted);
}

.adm-seg {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--adm-line);
  border-radius: 8px;
  background: var(--adm-panel);
}

.adm-seg-btn {
  font: inherit;
  font-size: 13px;
  border: none;
  background: transparent;
  color: var(--adm-muted);
  padding: 5px 14px;
  border-radius: 6px;
  cursor: pointer;
}

.adm-seg-btn:hover {
  color: var(--adm-text);
  background: #f4f7fd;
}

.adm-seg-btn.active {
  background: var(--adm-primary);
  color: #fff;
}

.adm-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.adm-barlist {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.adm-bar-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.adm-bar-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 60%;
}

.adm-bar-value {
  color: var(--adm-muted);
  font-size: 12.5px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.adm-bar-track {
  margin-top: 4px;
  height: 6px;
  border-radius: 999px;
  background: #eef1f7;
  overflow: hidden;
}

.adm-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #6f9cf5, var(--adm-primary));
}

.adm-chart-new {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: #6cc48c;
  border-radius: 0 0 2px 2px;
}

.adm-chart-legend {
  display: flex;
  gap: 16px;
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--adm-muted);
}

.adm-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.adm-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  display: inline-block;
}

.adm-legend-active {
  background: #cfe0ff;
}

.adm-legend-new {
  background: #6cc48c;
}

/* ===== 详情弹层 ===== */
.adm-modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(16, 23, 40, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 60;
}

.adm-modal {
  width: 100%;
  max-width: 720px;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  background: var(--adm-panel);
  border: 1px solid var(--adm-line);
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(16, 23, 40, 0.28);
  overflow: hidden;
}

.adm-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--adm-line);
}

.adm-modal-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.adm-modal-close {
  font: inherit;
  font-size: 20px;
  line-height: 1;
  border: none;
  background: transparent;
  color: var(--adm-muted);
  cursor: pointer;
  padding: 0 4px;
}

.adm-modal-close:hover {
  color: var(--adm-text);
}

.adm-modal-body {
  padding: 14px 18px 18px;
  overflow: auto;
}

.adm-modal-body .adm-kv-row dd {
  word-break: break-all;
}

/* ===== 错误报告（用户反馈）===== */
.adm-select-sm {
  max-width: 104px;
  padding: 4px 8px;
  font-size: 13px;
}

/* 列表里的内容摘要：单行截断，避免长文本把表格撑开 */
.adm-fb-summary {
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.adm-fb-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

/* 详情里的完整内容：保留用户输入的换行 */
.adm-fb-content {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 13.5px;
  line-height: 1.7;
  background: #f8fafd;
  border: 1px solid var(--adm-line);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
}

/* 正文里的内联截图：与文字同流排版，点击查看原图 */
.adm-fb-inline-img {
  display: inline-block;
  vertical-align: bottom;
  margin: 3px 4px;
  line-height: 0;
}

.adm-fb-inline-img img {
  max-width: 240px;
  max-height: 150px;
  display: block;
  border: 1px solid var(--adm-line);
  border-radius: 8px;
}

.adm-fb-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.adm-fb-thumb {
  position: relative;
  width: 104px;
  height: 104px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--adm-line);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

/* 未插入正文的图片（老数据）按序号标注，和正文里的「图片 N」对应 */
.adm-fb-thumb-no {
  position: absolute;
  left: 4px;
  bottom: 4px;
  padding: 0 5px;
  border-radius: 6px;
  background: rgba(16, 23, 40, 0.62);
  color: #fff;
  font-size: 11px;
  line-height: 16px;
}

.adm-fb-thumb:hover {
  border-color: var(--adm-primary);
}

.adm-fb-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.adm-fb-form {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 12px;
  margin: 14px 0 12px;
}

/* 详情底部：左侧「已处理」勾选框，右侧删除 / 保存 */
.adm-fb-footer {
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.adm-fb-footer-btns {
  display: flex;
  gap: 8px;
}

/* ===== 窄屏 ===== */
@media (max-width: 780px) {
  .adm-shell {
    flex-direction: column;
  }

  .adm-side {
    width: 100%;
    flex: 0 0 auto;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    overflow-x: auto;
  }

  .adm-brand {
    padding: 0;
  }

  .adm-nav {
    flex-direction: row;
    gap: 6px;
  }

  .adm-nav-item {
    white-space: nowrap;
  }

  .adm-side-foot {
    border-top: none;
    padding: 0;
    gap: 8px;
  }

  .adm-top {
    height: auto;
    flex: 0 0 auto;
    flex-wrap: wrap;
    padding: 10px 14px;
  }

  .adm-content {
    padding: 14px;
  }

  .adm-user {
    display: none;
  }

  .adm-grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ===== 深色模式 ===== */
@media (prefers-color-scheme: dark) {
  :root {
    --adm-bg: #12151c;
    --adm-panel: #191d27;
    --adm-line: #272d3b;
    --adm-text: #e6e9f2;
    --adm-muted: #98a1b5;
    --adm-shadow: none;
  }

  .adm-login {
    background: radial-gradient(900px 500px at 20% -10%, #1b2a4a 0%, transparent 60%), var(--adm-bg);
  }

  .adm-input {
    background: #141822;
    color: var(--adm-text);
  }

  .adm-table th {
    background: #141822;
  }

  .adm-table tbody tr:hover td {
    background: #1d2230;
  }

  .adm-btn-ghost {
    background: #1b2130;
    color: #d3d9e8;
  }

  .adm-btn-ghost:hover {
    background: #222a3b;
    border-color: #354055;
  }

  .adm-badge {
    background: #202634;
    color: #a8b2c8;
  }

  .adm-badge-on {
    background: #16243d;
    color: #86b0ff;
    border-color: #294268;
  }

  .adm-alert-info {
    background: #14213a;
    border-color: #234069;
    color: #a9c8ff;
  }

  .adm-alert-warn {
    background: #2a2314;
    border-color: #4a3c1b;
    color: #e8c67a;
  }

  .adm-alert-error {
    background: #2c1719;
    border-color: #4c2629;
    color: #f09a9a;
  }

  .adm-tag-ok {
    background: #15281c;
    border-color: #26492f;
    color: #7fd7a0;
  }

  .adm-tag-info {
    background: #16243d;
    border-color: #294268;
    color: #86b0ff;
  }

  .adm-tag-warn {
    background: #2a2314;
    border-color: #4a3c1b;
    color: #e8c67a;
  }

  .adm-tag-danger {
    background: #2c1719;
    border-color: #4c2629;
    color: #f09a9a;
  }

  .adm-tag-muted {
    background: #202634;
    border-color: #2b3341;
    color: #98a1b5;
  }

  .adm-tab:hover {
    background: #202634;
  }

  .adm-chart-bar {
    background: #2b3d5e;
  }

  .adm-chart-col:hover .adm-chart-bar {
    background: #3d6ea8;
  }

  .adm-chart-err {
    background: #9a4a4a;
  }

  .adm-chart-new {
    background: #3f7f57;
  }

  .adm-seg-btn:hover {
    background: #202634;
  }

  .adm-bar-track {
    background: #242a38;
  }

  .adm-fb-content {
    background: #1b2130;
  }

  .adm-fb-thumb {
    background: #1b2130;
  }
}

/* 反馈详情里的「重要程度 + 备注」在窄屏改为上下排列 */
@media (max-width: 640px) {
  .adm-fb-form {
    grid-template-columns: minmax(0, 1fr);
  }
}
