/* ============================================================
   auimlab 后台管理 — admin.css
   主题: 深色 + cyan/purple 强调色, 侧栏 + 卡片 + 表格 + 上传
   ============================================================ */

/* ============== 设计令牌 (local override) ============== */
:root {
  --ad-bg: #0a0e14;
  --ad-bg-1: #0d1117;
  --ad-bg-2: #161b22;
  --ad-bg-3: #1c2230;
  --ad-border: #21262d;
  --ad-border-strong: #30363d;
  --ad-text-1: #e6edf3;
  --ad-text-2: #b1bac4;
  --ad-text-3: #7d8590;
  --ad-cyan: #58a6ff;
  --ad-purple: #a371f7;
  --ad-green: #3fb950;
  --ad-red: #f85149;
  --ad-amber: #d29922;
  --ad-cyan-soft: rgba(88, 166, 255, 0.12);
  --ad-purple-soft: rgba(163, 113, 247, 0.12);
  --ad-green-soft: rgba(63, 185, 80, 0.12);
  --ad-red-soft: rgba(248, 81, 73, 0.12);
  --ad-amber-soft: rgba(210, 153, 34, 0.12);
  --ad-shadow-card: 0 1px 0 rgba(255, 255, 255, 0.03), 0 6px 16px rgba(0, 0, 0, 0.4);
  --ad-radius: 12px;
  --ad-radius-sm: 8px;
  --ad-radius-lg: 16px;
  --ad-sidebar-w: 240px;
  --ad-topbar-h: 64px;
  --ad-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, "Helvetica Neue", sans-serif;
  --ad-font-mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
}

/* ============== 重置 / 全局 ============== */
.admin-body {
  margin: 0;
  background: var(--ad-bg);
  color: var(--ad-text-1);
  font-family: var(--ad-font);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
.admin-body * { box-sizing: border-box; }
.admin-shell {
  display: grid;
  grid-template-columns: var(--ad-sidebar-w) 1fr;
  min-height: 100vh;
}

/* ============== 左侧栏 ============== */
.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: linear-gradient(180deg, #0d1117 0%, #0a0e14 100%);
  border-right: 1px solid var(--ad-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--ad-border);
}
.admin-brand-icon {
  width: 32px;
  height: 32px;
  color: var(--ad-cyan);
  filter: drop-shadow(0 0 8px rgba(88, 166, 255, 0.35));
}
.admin-brand-text { display: flex; flex-direction: column; gap: 1px; }
.admin-brand-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  background: linear-gradient(90deg, #58a6ff, #a371f7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.admin-brand-sub {
  font-family: var(--ad-font-mono);
  font-size: 10.5px;
  color: var(--ad-text-3);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.admin-nav {
  flex: 1;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--ad-radius-sm);
  color: var(--ad-text-2);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  width: 100%;
  font-family: inherit;
  transition: all 0.15s;
  position: relative;
}
.admin-nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.admin-nav-label { flex: 1; }
.admin-nav-count {
  font-family: var(--ad-font-mono);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 10px;
  background: var(--ad-bg-3);
  color: var(--ad-text-3);
  min-width: 24px;
  text-align: center;
  font-weight: 600;
}
.admin-nav-item:hover {
  background: var(--ad-bg-2);
  color: var(--ad-text-1);
}
.admin-nav-item.active {
  background: var(--ad-cyan-soft);
  color: var(--ad-cyan);
  border-color: rgba(88, 166, 255, 0.25);
  box-shadow: inset 2px 0 0 var(--ad-cyan);
}
.admin-nav-item.active .admin-nav-count {
  background: rgba(88, 166, 255, 0.2);
  color: var(--ad-cyan);
}

.admin-sidebar-foot {
  padding: 12px;
  border-top: 1px solid var(--ad-border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.admin-foot-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--ad-radius-sm);
  background: transparent;
  border: none;
  color: var(--ad-text-3);
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  transition: all 0.12s;
}
.admin-foot-link:hover {
  background: var(--ad-bg-2);
  color: var(--ad-text-1);
}
.admin-foot-logout:hover {
  color: var(--ad-red);
  background: var(--ad-red-soft);
}

/* ============== 主区 ============== */
.admin-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--ad-topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ad-border);
}
.admin-topbar-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 2px;
  color: var(--ad-text-1);
}
.admin-topbar-sub {
  font-size: 12px;
  color: var(--ad-text-3);
  font-family: var(--ad-font-mono);
  letter-spacing: 0.5px;
}
.admin-topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.admin-topbar-clock {
  font-family: var(--ad-font-mono);
  font-size: 12px;
  color: var(--ad-text-3);
  padding: 6px 12px;
  border-radius: var(--ad-radius-sm);
  background: var(--ad-bg-2);
  border: 1px solid var(--ad-border);
  letter-spacing: 1px;
}
.admin-icon-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ad-bg-2);
  border: 1px solid var(--ad-border);
  border-radius: var(--ad-radius-sm);
  color: var(--ad-text-2);
  cursor: pointer;
  transition: all 0.15s;
}
.admin-icon-btn:hover {
  color: var(--ad-cyan);
  border-color: var(--ad-cyan);
  background: var(--ad-cyan-soft);
}

.admin-content {
  padding: 24px 28px 40px;
  flex: 1;
}
.admin-panel { display: block; }
.admin-panel[hidden] { display: none; }

/* ============== 卡片 ============== */
.admin-card {
  background: var(--ad-bg-1);
  border: 1px solid var(--ad-border);
  border-radius: var(--ad-radius-lg);
  box-shadow: var(--ad-shadow-card);
  overflow: hidden;
}
.admin-card + .admin-card { margin-top: 20px; }
.admin-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--ad-border);
  gap: 16px;
}
.admin-card-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 2px;
  color: var(--ad-text-1);
}
.admin-card-desc {
  font-size: 12px;
  color: var(--ad-text-3);
  margin: 0;
  font-family: var(--ad-font-mono);
}

/* ============== 按钮 ============== */
.admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--ad-radius-sm);
  border: 1px solid var(--ad-border);
  background: var(--ad-bg-2);
  color: var(--ad-text-1);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.admin-btn:hover {
  background: var(--ad-bg-3);
  border-color: var(--ad-border-strong);
}
.admin-btn-primary {
  background: linear-gradient(180deg, #1f6feb, #1158c7);
  border-color: #1f6feb;
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1) inset, 0 2px 6px rgba(31, 111, 235, 0.3);
}
.admin-btn-primary:hover {
  background: linear-gradient(180deg, #388bfd, #1f6feb);
  border-color: #388bfd;
}
.admin-btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ad-text-2);
}
.admin-btn-ghost:hover { background: var(--ad-bg-2); color: var(--ad-text-1); }
.admin-btn-danger {
  background: var(--ad-bg-2);
  color: var(--ad-red);
  border-color: rgba(248, 81, 73, 0.3);
}
.admin-btn-danger:hover {
  background: var(--ad-red-soft);
  border-color: var(--ad-red);
}

/* ============== 表格 ============== */
.admin-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.admin-table thead th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--ad-text-3);
  font-size: 11.5px;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: var(--ad-bg-2);
  border-bottom: 1px solid var(--ad-border);
  white-space: nowrap;
}
.admin-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--ad-border);
  color: var(--ad-text-1);
  vertical-align: middle;
}
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr {
  transition: background 0.1s;
}
.admin-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}
.admin-table .col-id { width: 60px; color: var(--ad-text-3); font-family: var(--ad-font-mono); }
.admin-table .col-num { width: 80px; text-align: right; font-family: var(--ad-font-mono); color: var(--ad-text-2); }
.admin-table .col-time { width: 110px; font-family: var(--ad-font-mono); font-size: 12px; color: var(--ad-text-3); white-space: nowrap; }
.admin-table .col-actions { width: 160px; white-space: nowrap; }
.admin-table .col-flag { width: 60px; text-align: center; }

.cell-cyan { color: var(--ad-cyan); }
.cell-purple { color: var(--ad-purple); font-size: 12px; }
.cell-mono { font-family: var(--ad-font-mono); font-size: 12px; color: var(--ad-text-2); }
.cell-muted { color: var(--ad-text-3); }
.cell-name { font-weight: 500; }
.cell-sub { font-size: 11.5px; color: var(--ad-text-3); margin-top: 2px; font-family: var(--ad-font-mono); }
.cell-truncate {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cell-truncate-wide {
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  font-family: var(--ad-font-mono);
}
.status-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.status-pending  { background: var(--ad-amber-soft); color: var(--ad-amber); }
.status-approved { background: var(--ad-green-soft); color: var(--ad-green); }
.status-rejected { background: var(--ad-red-soft);   color: var(--ad-red); }
.role-user       { background: rgba(127, 67, 255, 0.18); color: #c4a4ff; }
.role-admin      { background: rgba(248, 81, 73, 0.18);  color: #ff8a82; }
.role-toggle { color: var(--jm-text-1, #ebf8ff); border-color: var(--ad-border-sub, rgba(255,255,255,0.12)); }
.role-toggle:hover { border-color: rgba(127, 67, 255, 0.5); background: rgba(127, 67, 255, 0.12); }
.role-toggle-elevate { color: #ff8a82; border-color: rgba(248, 81, 73, 0.35); }

/* ============== 操作日志 (2026-07-22) ============== */
.logs-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.logs-stat-card {
  padding: 14px 16px;
  background: rgba(13, 17, 23, 0.55);
  border: 1px solid rgba(127, 67, 255, 0.12);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.2s, transform 0.2s;
}
.logs-stat-card:hover {
  border-color: rgba(127, 67, 255, 0.3);
  transform: translateY(-1px);
}
.logs-stat-label {
  font-size: 11px;
  color: rgba(224, 245, 255, 0.55);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
}
.logs-stat-value {
  font-size: 22px;
  font-weight: 800;
  color: #7fd9ff;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -0.02em;
}
.logs-stat-ok  { color: #7ee787; }
.logs-stat-warn { color: #ffb572; }
.logs-stat-err { color: #ff8a82; }

.logs-stat-value.logs-stat-ok { color: #7ee787; }
.logs-stat-value.logs-stat-warn { color: #ffb572; }
.logs-stat-value.logs-stat-err { color: #ff8a82; }

.log-time { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: rgba(224, 245, 255, 0.85); white-space: nowrap; }
.log-ip { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; color: rgba(224, 245, 255, 0.55); }
.log-path { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; color: rgba(0, 202, 224, 0.75); max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-detail { font-size: 11.5px; color: rgba(248, 81, 73, 0.9); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.log-pill {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 10.5px;
  font-family: 'JetBrains Mono', monospace;
  margin-left: 6px;
  vertical-align: middle;
}
.log-pill-admin { background: rgba(248, 81, 73, 0.18); color: #ff8a82; }
.log-pill-user  { background: rgba(127, 67, 255, 0.18); color: #c4a4ff; }
.log-pill-anon  { background: rgba(255, 255, 255, 0.06); color: rgba(224, 245, 255, 0.45); }

.log-action-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  background: rgba(0, 202, 224, 0.15);
  color: #7fd9ff;
  border: 1px solid rgba(0, 202, 224, 0.3);
}
.log-action-login    { background: rgba(63, 185, 80, 0.15);  color: #7ee787; border-color: rgba(63, 185, 80, 0.3); }
.log-action-register { background: rgba(167, 139, 250, 0.15); color: #c4a4ff; border-color: rgba(167, 139, 250, 0.3); }
.log-action-create   { background: rgba(0, 202, 224, 0.15);  color: #7fd9ff; border-color: rgba(0, 202, 224, 0.3); }
.log-action-update   { background: rgba(255, 181, 114, 0.15); color: #ffb572; border-color: rgba(255, 181, 114, 0.3); }
.log-action-delete   { background: rgba(248, 81, 73, 0.15);  color: #ff8a82; border-color: rgba(248, 81, 73, 0.3); }
.log-action-role     { background: rgba(255, 121, 198, 0.15); color: #ff79c6; border-color: rgba(255, 121, 198, 0.3); }
.log-action-status   { background: rgba(255, 181, 114, 0.15); color: #ffb572; border-color: rgba(255, 181, 114, 0.3); }

.log-status {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  min-width: 32px;
  text-align: center;
}
.log-status-ok   { background: rgba(63, 185, 80, 0.18);  color: #7ee787; }
.log-status-err  { background: rgba(248, 81, 73, 0.18);  color: #ff8a82; }
.log-status-warn { background: rgba(255, 181, 114, 0.18); color: #ffb572; }

.admin-pagination {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4px 0;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .logs-stats { grid-template-columns: repeat(2, 1fr); }
}
.role-toggle-elevate:hover { background: rgba(248, 81, 73, 0.12); border-color: #ff8a82; }
.col-role { font-size: 12px; }

.row-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ad-cyan);
  border-color: rgba(88, 166, 255, 0.4);
  transition: all 0.12s;
}
.row-action:hover {
  background: var(--ad-cyan-soft);
  border-color: var(--ad-cyan);
}
.row-action + .row-action { margin-left: 4px; }
.row-action-edit   { color: var(--ad-cyan);   border-color: rgba(88, 166, 255, 0.25); }
.row-action-edit:hover   { background: var(--ad-cyan-soft); border-color: var(--ad-cyan); }
.row-action-danger { color: var(--ad-red);    border-color: rgba(248, 81, 73, 0.25); }
.row-action-danger:hover { background: var(--ad-red-soft); border-color: var(--ad-red); }
.row-action-approve { color: var(--ad-green); border-color: rgba(63, 185, 80, 0.25); }
.row-action-approve:hover { background: var(--ad-green-soft); border-color: var(--ad-green); }
.row-action-ghost  { color: var(--ad-text-3); border-color: var(--ad-border); }
.row-action-ghost:hover { color: var(--ad-text-1); background: var(--ad-bg-2); }
.row-action-primary { color: #7f43ff; border-color: rgba(127, 67, 255, 0.3); background: rgba(127, 67, 255, 0.08); }
.row-action-primary:hover { background: rgba(127, 67, 255, 0.18); border-color: #7f43ff; }
.row-action-primary:disabled { opacity: 0.5; cursor: not-allowed; }

/* §models-company-badge 2026-08-12: UseCase 公司名输入框
   复用 .admin-input 样式, 调宽度适配表格行 */
.usecase-company-input {
  width: 180px;
  padding: 5px 9px;
  font-size: 12px;
}
.usecase-company-input::placeholder {
  color: var(--ad-text-3);
  font-style: italic;
}

/* 海螺 panel: 已挂槽位列 */
.col-placed { white-space: normal; max-width: 220px; }
.col-placed .cell-badge { margin: 2px 4px 2px 0; }

/* 通用 12 槽位弹窗 (hero/feature/canvas 分组) */
.slot-pick-list { max-height: 60vh; overflow-y: auto; padding-right: 4px; }
.slot-pick-group { margin-bottom: 14px; }
.slot-pick-group:last-child { margin-bottom: 0; }
.slot-pick-group-label {
  font-size: 12px;
  color: var(--ad-text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  padding-left: 2px;
}
.slot-pick-group .slot-pick-grid { grid-template-columns: repeat(3, 1fr); }

/* ============== 空状态 / loading / 错误 ============== */
.admin-empty {
  padding: 60px 24px;
  text-align: center;
  color: var(--ad-text-3);
}
.admin-empty svg { color: var(--ad-text-3); opacity: 0.4; margin-bottom: 12px; }
.admin-empty .empty-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ad-text-2);
  margin-bottom: 4px;
}
.admin-empty .empty-sub {
  font-size: 12.5px;
  color: var(--ad-text-3);
}

.admin-skeleton { padding: 16px 24px; }
.sk-row {
  height: 44px;
  margin-bottom: 8px;
  border-radius: var(--ad-radius-sm);
  background: linear-gradient(90deg,
    var(--ad-bg-2) 0%,
    var(--ad-bg-3) 50%,
    var(--ad-bg-2) 100%);
  background-size: 200% 100%;
  animation: sk-shimmer 1.4s ease-in-out infinite;
}
.sk-row:nth-child(2) { animation-delay: 0.1s; }
.sk-row:nth-child(3) { animation-delay: 0.2s; }
@keyframes sk-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============== 上传 (视频 / 媒体) ============== */
.media-spec {
  background: linear-gradient(180deg, rgba(31, 111, 235, 0.06), rgba(163, 113, 247, 0.04));
  border: 1px solid rgba(88, 166, 255, 0.18);
  border-radius: var(--ad-radius);
  padding: 18px 22px;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
}
.media-spec::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--ad-cyan), var(--ad-purple));
}
.media-spec-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ad-text-1);
  margin-bottom: 14px;
}
.media-spec-head svg { color: var(--ad-cyan); width: 18px; height: 18px; }
.media-spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 20px;
}
.media-spec-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.media-spec-key {
  font-family: var(--ad-font-mono);
  font-size: 10.5px;
  color: var(--ad-text-3);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.media-spec-val {
  font-family: var(--ad-font-mono);
  font-size: 13px;
  color: var(--ad-text-1);
  font-weight: 600;
}
.media-spec-val.is-warn { color: var(--ad-amber); }
.media-spec-val.is-cyan { color: var(--ad-cyan); }

.media-uploader {
  padding: 0;
}
.media-drop {
  border: 2px dashed var(--ad-border-strong);
  border-radius: var(--ad-radius);
  margin: 20px 24px 0;
  padding: 40px 20px;
  background: rgba(255, 255, 255, 0.015);
  cursor: pointer;
  transition: all 0.18s;
  text-align: center;
}
.media-drop:hover, .media-drop.is-drag {
  border-color: var(--ad-cyan);
  background: var(--ad-cyan-soft);
  transform: translateY(-1px);
}
.media-drop-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ad-cyan-soft);
  color: var(--ad-cyan);
  border: 1px solid rgba(88, 166, 255, 0.3);
}
.media-drop-icon svg { width: 26px; height: 26px; }
.media-drop-text {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ad-text-1);
  margin-bottom: 4px;
}
.media-drop-text .link {
  color: var(--ad-cyan);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.media-drop-sub {
  font-size: 12px;
  color: var(--ad-text-3);
  font-family: var(--ad-font-mono);
}

.media-options {
  margin: 18px 24px 24px;
  padding: 18px;
  border: 1px solid var(--ad-border);
  border-radius: var(--ad-radius);
  background: var(--ad-bg-2);
}
.media-options-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.media-options-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ad-text-1);
  display: flex;
  align-items: center;
  gap: 6px;
}
.media-options-title svg { color: var(--ad-cyan); width: 16px; height: 16px; }
.media-options-desc {
  font-size: 12px;
  color: var(--ad-text-3);
  margin-bottom: 12px;
  line-height: 1.6;
}
.media-options-desc code {
  font-family: var(--ad-font-mono);
  font-size: 11.5px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--ad-purple-soft);
  color: var(--ad-purple);
}
.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.slot-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--ad-border);
  border-radius: var(--ad-radius-sm);
  cursor: pointer;
  font-size: 12.5px;
  background: var(--ad-bg-1);
  transition: all 0.12s;
}
.slot-row:hover {
  border-color: var(--ad-border-strong);
  background: var(--ad-bg-3);
}
.slot-row:has(input:checked) {
  border-color: var(--ad-cyan);
  background: var(--ad-cyan-soft);
  color: var(--ad-text-1);
}
.slot-row input { accent-color: var(--ad-cyan); }
.slot-row .slot-num {
  font-family: var(--ad-font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--ad-cyan);
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(88, 166, 255, 0.15);
}
.media-label-input {
  width: 100%;
  padding: 10px 12px;
  background: var(--ad-bg-1);
  border: 1px solid var(--ad-border);
  border-radius: var(--ad-radius-sm);
  color: var(--ad-text-1);
  font-size: 13px;
  font-family: inherit;
}
.media-label-input:focus {
  outline: none;
  border-color: var(--ad-cyan);
}

.media-pending {
  margin: 0 24px 16px;
  padding: 14px 16px;
  border-radius: var(--ad-radius-sm);
  background: var(--ad-bg-2);
  border: 1px solid var(--ad-border);
}
.media-pending-head {
  font-family: var(--ad-font-mono);
  font-size: 11px;
  color: var(--ad-text-3);
  margin-bottom: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.media-pending-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mpr-row {
  display: grid;
  grid-template-columns: 1fr auto 160px 80px;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--ad-bg-1);
  border: 1px solid var(--ad-border);
  font-size: 12.5px;
}
.mpr-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mpr-size {
  color: var(--ad-text-3);
  font-family: var(--ad-font-mono);
  font-size: 11.5px;
}
.mpr-bar {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.mpr-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--ad-cyan), var(--ad-purple));
  transition: width 0.2s;
  border-radius: 3px;
}
.mpr-status {
  font-family: var(--ad-font-mono);
  font-size: 11px;
  color: var(--ad-text-2);
  text-align: right;
}
.mpr-ok { color: var(--ad-green); font-weight: 600; }
.mpr-fail { color: var(--ad-red); font-weight: 600; }

/* ============== 媒体库 ============== */
.media-thumb {
  width: 56px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--ad-border);
  background: var(--ad-bg-3);
}
.media-thumb-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--ad-text-3);
}

/* ============== Toast ============== */
.admin-toast-wrap {
  position: fixed;
  top: 84px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.admin-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--ad-bg-2);
  border: 1px solid var(--ad-border);
  border-left: 3px solid var(--ad-cyan);
  border-radius: var(--ad-radius-sm);
  color: var(--ad-text-1);
  font-size: 13px;
  min-width: 240px;
  max-width: 360px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: auto;
}
.admin-toast.show { opacity: 1; transform: translateX(0); }
.admin-toast.toast-ok    { border-left-color: var(--ad-green); }
.admin-toast.toast-ok    .toast-icon { color: var(--ad-green); }
.admin-toast.toast-error { border-left-color: var(--ad-red); }
.admin-toast.toast-error .toast-icon { color: var(--ad-red); }
.admin-toast.toast-warn  { border-left-color: var(--ad-amber); }
.admin-toast.toast-warn  .toast-icon { color: var(--ad-amber); }
.toast-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--ad-cyan);
}
.toast-msg { flex: 1; }

/* ============== 首页媒体位标识 / 预览卡 ============== */
.media-placement-card { overflow: visible; }
.placement-count {
  flex: 0 0 auto; padding: 5px 10px; border: 1px solid rgba(88,166,255,.28);
  border-radius: 6px; color: var(--ad-cyan); background: var(--ad-cyan-soft);
  font-family: var(--ad-font-mono); font-size: 11px;
}
.placement-map {
  display: grid; grid-template-columns: repeat(3, minmax(220px, 1fr)); gap: 14px;
  padding: 20px 24px 24px; background: rgba(10,14,20,.55);
}
.placement-card { min-width: 0; padding: 13px; background: var(--ad-bg-2); border: 1px solid var(--ad-border); border-radius: 10px; transition: border-color .15s, box-shadow .15s; }
.placement-card:hover { border-color: rgba(88,166,255,.45); box-shadow: 0 8px 24px rgba(0,0,0,.22); }
.placement-card.is-custom { border-color: rgba(63,185,80,.38); }
.placement-card-top, .placement-actions { display: flex; align-items: center; gap: 7px; }
.placement-card-top { justify-content: space-between; margin-bottom: 10px; }
.placement-code { color: var(--ad-cyan); font: 700 10px var(--ad-font-mono); letter-spacing: .7px; }
.placement-state { display: inline-flex; align-items: center; gap: 5px; color: var(--ad-text-3); font: 11px var(--ad-font-mono); }
.placement-state i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: block; }
.placement-state.is-custom { color: var(--ad-green); }
.placement-preview-wrap { position: relative; aspect-ratio: 16 / 9; margin-bottom: 11px; border-radius: 7px; overflow: hidden; background: #05070b; border: 1px solid var(--ad-border); }
.placement-preview { width: 100%; height: 100%; display: block; object-fit: cover; background: #05070b; }
.placement-preview.preview-error { filter: grayscale(0.6) brightness(0.5); outline: 1px solid var(--ad-red); }
.placement-type { position: absolute; right: 7px; bottom: 6px; padding: 2px 6px; border-radius: 4px; color: #fff; background: rgba(0,0,0,.64); font: 10px var(--ad-font-mono); }
.placement-title { color: var(--ad-text-1); font-size: 14px; font-weight: 600; margin-bottom: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.placement-location { display: flex; align-items: flex-start; gap: 6px; color: var(--ad-text-2); font-size: 11.5px; line-height: 1.5; min-height: 34px; }
.location-pin { flex: 0 0 auto; padding: 1px 5px; border-radius: 3px; color: var(--ad-purple); background: var(--ad-purple-soft); font: 10px var(--ad-font-mono); }
.placement-desc { min-height: 32px; margin-top: 4px; color: var(--ad-text-3); font-size: 11px; line-height: 1.45; }
.placement-file { margin: 9px 0; padding: 6px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 5px; color: var(--ad-text-3); background: var(--ad-bg-1); font: 10.5px var(--ad-font-mono); }
.placement-actions { flex-wrap: wrap; }
.placement-select { min-width: 0; flex: 1 1 145px; height: 32px; padding: 0 8px; color: var(--ad-text-2); background: var(--ad-bg-1); border: 1px solid var(--ad-border); border-radius: 6px; font: 11px var(--ad-font-mono); }
.placement-select:focus { outline: none; border-color: var(--ad-cyan); }
.placement-actions .admin-btn { padding: 7px 9px; font-size: 11px; }
.placement-loading { grid-column: 1 / -1; }

/* ============== 成功弹窗 ============== */
.succ-card { max-width: 460px; text-align: center; padding: 28px 28px 22px; }
.succ-icon-wrap { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle, rgba(63,185,80,.22), transparent); }
.succ-icon { width: 32px; height: 32px; color: var(--ad-green); }
.succ-title { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.succ-msg { color: var(--ad-text-2); font-size: 13.5px; line-height: 1.65; white-space: pre-line; margin-bottom: 14px; }
.succ-msg b { color: var(--ad-text-1); }
.succ-file { display: flex; gap: 10px; align-items: center; padding: 9px 11px; margin-bottom: 15px; text-align: left; border: 1px solid var(--ad-border); border-radius: 7px; background: var(--ad-bg-2); }
.succ-file-name { min-width: 0; flex: 1; overflow-wrap: anywhere; color: var(--ad-text-1); font: 11px var(--ad-font-mono); }
.succ-file-link { flex: 0 0 auto; color: var(--ad-cyan); font-size: 11px; text-decoration: none; }
.succ-slot-chip { display: inline-flex; gap: 5px; align-items: center; margin-bottom: 9px; padding: 4px 9px; border: 1px solid rgba(88,166,255,.38); border-radius: 5px; color: #cfe6ff; background: var(--ad-cyan-soft); font: 11px var(--ad-font-mono); }
.succ-slot-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ad-cyan); }

/* ============== 媒体库 (cleanup & 孤儿徽章) ============== */
.admin-card-head-actions { display: flex; gap: 8px; align-items: center; }
.admin-btn-warn {
  background: var(--ad-bg-2); color: var(--ad-amber);
  border-color: rgba(210, 153, 34, 0.32);
}
.admin-btn-warn:hover { background: var(--ad-amber-soft); border-color: var(--ad-amber); }
.admin-btn-warn:disabled, .admin-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.cell-badge-orphan {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 7px; border-radius: 4px;
  background: rgba(248, 81, 73, 0.12); color: var(--ad-red);
  border: 1px solid rgba(248, 81, 73, 0.28);
  font: 700 10.5px var(--ad-font-mono); letter-spacing: 0.4px;
}
.cleanup-card { text-align: left; }
.cleanup-card .admin-confirm-msg { margin-bottom: 14px; }
.cleanup-title { font-size: 15px; font-weight: 700; color: var(--ad-text-1); margin-bottom: 8px; }
.cleanup-stat { color: var(--ad-text-2); font-size: 13px; line-height: 1.6; }
.cleanup-stat b { color: var(--ad-amber); }
.cleanup-stat-sub { color: var(--ad-text-3); font-size: 12px; margin-top: 4px; }
.cleanup-stat-sub code { color: var(--ad-text-2); background: var(--ad-bg-3); padding: 1px 5px; border-radius: 3px; }
.cleanup-list {
  list-style: none; margin: 10px 0 0; padding: 6px 8px;
  max-height: 200px; overflow-y: auto;
  background: var(--ad-bg-2); border: 1px solid var(--ad-border); border-radius: 6px;
  font: 11px var(--ad-font-mono);
}
.cleanup-list li {
  display: grid; grid-template-columns: 22px 1fr 60px auto;
  gap: 8px; align-items: center; padding: 4px 0;
  border-bottom: 1px dashed var(--ad-border);
}
.cleanup-list li:last-child { border-bottom: none; }
.cleanup-kind { color: var(--ad-cyan); font-weight: 700; }
.cleanup-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ad-text-1); }
.cleanup-size { color: var(--ad-text-3); text-align: right; }
.cleanup-empty { color: var(--ad-text-3); padding: 8px 0; text-align: center; font-style: italic; }
.cleanup-more { color: var(--ad-text-3); padding: 4px 8px; font-size: 11px; }
.cleanup-check { display: flex; gap: 6px; align-items: center; padding: 10px 0; color: var(--ad-text-2); font-size: 12.5px; cursor: pointer; }
.cleanup-check input[type=checkbox] { accent-color: var(--ad-amber); }
.cleanup-check code { color: var(--ad-text-2); background: var(--ad-bg-3); padding: 1px 5px; border-radius: 3px; font: 11px var(--ad-font-mono); }

/* Hero 文本块定位 (2026-08-07 加) - 4 方向 number input + 快捷按钮 */
.htp-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.htp-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ad-text-2);
  letter-spacing: 0.2px;
}
.htp-input-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.htp-unit {
  font: 600 11px var(--ad-font-mono);
  color: var(--ad-text-3);
  padding: 4px 6px;
  background: var(--ad-bg-3);
  border-radius: 4px;
  flex-shrink: 0;
}
.htp-hint {
  font-size: 10.5px;
  color: var(--ad-text-3);
  line-height: 1.4;
}

/* Hero 文本块定位 · 缩略图预览 (2026-08-09 加, v2 修 viewport, v3 1:1 还原)
   关键: iframe 内部 viewport 必须 == 用户电脑实际视口, 否则主页的 vw/vh 响应式
   (h1 font-size: clamp(28,5.2vw,56), .hero height: min(100vh,56.25vw), .hero-text
   bottom: calc(28%+80px)) 会算出不一样的 hero 高度 / 字号 / 文本块位置,
   导致缩略图里看到的文本搜索框位置和比例跟用户实际电脑端打开主页完全不同.

   v3 修法 (1:1 还原):
   - 主页 ?no_chrome=1 处理 (index.html 加了): 隐藏 nav/sections/footer, 只保留 hero
   - iframe CSS width/height = window.screen.availWidth/Height (用户电脑物理屏幕可用尺寸)
     ≈ 用户全屏访问主页时的 viewport → 1:1 还原
   - wrapper 宽固定 320, 高 = ih × (320/iw) (JS 动态算)
   - scale = 320/iw
   - 1920×1080 屏幕 → wrapper 320×180, iframe 视觉正好显示完整 hero */
.htp-preview-thumb {
  width: 320px;        /* JS 强制设 320 (兜底) */
  height: 180px;        /* JS 会按 ih × scale 重写 (1920×1080 → 180, 1366×768 → 180, 1440×900 → 200) */
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--ad-border);
  border-radius: 8px;
  background: #060c20;
  position: relative;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}
.htp-preview-thumb iframe {
  /* JS 在 DOMContentLoaded + matchMedia change + orientationchange 时同步写.
     这里给一个 "1920×1080 桌面参考" 的 fallback (如果 JS 没跑). */
  width: 1920px;
  height: 1080px;
  border: 0;
  display: block;
  transform: scale(0.1667);   /* 320 / 1920 */
  transform-origin: top left;
  background: #060c20;
}
@media (max-width: 1280px) {
  /* 小屏 admin 后台: wrapper 缩略图宽度限制不超过 100% */
  .htp-preview-thumb { max-width: 100%; }
}


.admin-filter-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 14px 24px;
  background: var(--ad-bg-2);
  border-bottom: 1px solid var(--ad-border);
}
.admin-select {
  padding: 8px 32px 8px 14px;
  background: var(--ad-bg-1);
  border: 1px solid var(--ad-border);
  border-radius: var(--ad-radius-sm);
  color: var(--ad-text-1);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237d8590' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
}
.admin-select:focus { outline: none; border-color: var(--ad-cyan); }

/* ============== 响应式 ============== */
@media (max-width: 960px) {
  .admin-shell { grid-template-columns: 64px 1fr; }
  .admin-brand-text,
  .admin-nav-label,
  .admin-nav-count,
  .admin-foot-link span { display: none; }
  .admin-brand { justify-content: center; padding: 18px 0; }
  .admin-nav-item { justify-content: center; padding: 12px; }
  .admin-foot-link { justify-content: center; padding: 12px; }
  .admin-topbar { padding: 0 16px; }
  .admin-content { padding: 16px; }
  .admin-card-head { flex-wrap: wrap; gap: 8px; }
  .media-spec-grid { grid-template-columns: 1fr 1fr; }
  .placement-map { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
  .mpr-row { grid-template-columns: 1fr; gap: 6px; }
}
@media (max-width: 600px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar {
    position: fixed;
    left: -100%;
    top: 0;
    z-index: 100;
    width: 240px;
    transition: left 0.25s;
  }
  .admin-sidebar.open { left: 0; }
  .admin-brand-text,
  .admin-nav-label,
  .admin-nav-count,
  .admin-foot-link span { display: revert; }
  .admin-foot-link { padding: 8px 12px; }
  .admin-nav-item { padding: 10px 12px; }
  .admin-brand { padding: 22px 20px 18px; }
  .media-spec-grid { grid-template-columns: 1fr; }
  .placement-map { grid-template-columns: 1fr; padding: 14px; }
  .admin-table thead { display: none; }
  .admin-table tbody td { display: block; padding: 6px 12px; border: none; }
  .admin-table tbody td::before {
    content: attr(data-label);
    font-family: var(--ad-font-mono);
    font-size: 10.5px;
    color: var(--ad-text-3);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-right: 8px;
  }
  .admin-table tbody tr {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--ad-border);
  }
}

/* ============== 自定义确认弹窗 ============== */
.admin-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.15s;
}
.admin-confirm-overlay.show { opacity: 1; }
.admin-confirm-card {
  background: var(--ad-bg-1);
  border: 1px solid var(--ad-border);
  border-radius: var(--ad-radius-lg);
  padding: 28px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  transform: scale(0.96);
  transition: transform 0.15s;
}
.admin-confirm-overlay.show .admin-confirm-card { transform: scale(1); }
.admin-confirm-msg {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ad-text-1);
  white-space: pre-line;
  margin-bottom: 22px;
}
.admin-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.admin-confirm-card-wide { min-width: 520px; max-width: 640px; text-align: left; }
.admin-confirm-title {
  font-size: 15.5px; font-weight: 700; color: var(--ad-text-1);
  margin-bottom: 14px; letter-spacing: 0.2px;
}
.rename-row { margin-bottom: 14px; }
.rename-label {
  display: block; font-size: 12.5px; font-weight: 600;
  color: var(--ad-text-2); margin-bottom: 6px;
}
.rename-stem-row {
  display: flex; align-items: center; gap: 8px;
}
.rename-ext {
  font: 600 13px var(--ad-font-mono);
  color: var(--ad-cyan); padding: 8px 10px;
  background: var(--ad-bg-3); border: 1px solid var(--ad-border);
  border-radius: var(--ad-radius-sm);
}
.rename-hint {
  font-size: 11.5px; color: var(--ad-text-3);
  margin-top: 5px; line-height: 1.5;
}
.rename-hint code {
  color: var(--ad-cyan); background: var(--ad-bg-3);
  padding: 1px 5px; border-radius: 3px;
  font: 11px var(--ad-font-mono);
}

/* ============================================================
   Hailuo 海螺 AI 生成视频对话框 (hailuo- 前缀)
   ============================================================ */

/* ---- AI 生成面板 hero 大卡 ---- */
.hailuo-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 24px;
  background:
    linear-gradient(135deg, rgba(127, 67, 255, 0.10), rgba(0, 202, 224, 0.06)),
    rgba(13, 17, 35, 0.55);
  border: 1px solid rgba(127, 67, 255, 0.30);
  border-radius: 14px;
  box-shadow: 0 6px 24px rgba(127, 67, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.hailuo-hero-icon {
  flex-shrink: 0;
  width: 48px; height: 48px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #7f43ff, #00cae0);
  color: #fff;
  box-shadow: 0 6px 18px rgba(127, 67, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.hailuo-hero-icon svg { width: 22px; height: 22px; }
.hailuo-hero-body { flex: 1; min-width: 0; }
.hailuo-hero-title {
  font-size: 16px;
  font-weight: 600;
  color: #ebf8ff;
  margin-bottom: 4px;
  letter-spacing: 0.3px;
}
.hailuo-hero-sub {
  font-size: 12.5px;
  color: rgba(224, 245, 255, 0.62);
  line-height: 1.55;
  margin-bottom: 10px;
}
.hailuo-hero-sub code {
  background: rgba(127, 67, 255, 0.15);
  border: 1px solid rgba(127, 67, 255, 0.30);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 11.5px;
  color: #c4a4ff;
  font-family: 'JetBrains Mono', monospace;
}
.hailuo-hero-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: rgba(224, 245, 255, 0.55);
}
.hailuo-hero-stats b {
  color: #7fd9ff;
  font-weight: 600;
  margin-right: 4px;
}
.hailuo-stat-sep {
  width: 1px;
  height: 12px;
  background: rgba(127, 67, 255, 0.30);
}
.hailuo-hero-btn {
  flex-shrink: 0;
  padding: 10px 18px;
  font-size: 13.5px;
}

@media (max-width: 720px) {
  .hailuo-hero { flex-direction: column; align-items: stretch; text-align: left; }
  .hailuo-hero-btn { width: 100%; }
  .hailuo-hero-stats { flex-wrap: wrap; }
}

/* ---- 弹窗表单 ---- */
.hailuo-label {
  display: block;
  font-size: 12px;
  color: rgba(224, 245, 255, 0.65);
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}
.hailuo-textarea,
.hailuo-input,
.hailuo-select {
  width: 100%;
  background: rgba(13, 17, 35, 0.65);
  border: 1px solid rgba(127, 67, 255, 0.22);
  border-radius: 8px;
  color: #ebf8ff;
  font-family: inherit;
  font-size: 13px;
  padding: 9px 11px;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.hailuo-textarea {
  resize: vertical;
  min-height: 70px;
  line-height: 1.5;
  font-family: 'JetBrains Mono', 'PingFang SC', monospace;
}
.hailuo-textarea:focus,
.hailuo-input:focus,
.hailuo-select:focus {
  border-color: rgba(127, 67, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(127, 67, 255, 0.12);
}
.hailuo-counter {
  font-size: 11px;
  color: rgba(224, 245, 255, 0.40);
  text-align: right;
  margin-top: 4px;
  font-family: 'JetBrains Mono', monospace;
}
.hailuo-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(224, 245, 255, 0.70);
  cursor: pointer;
}
.hailuo-check input { cursor: pointer; }
.hailuo-progress {
  margin-top: 14px;
  padding: 12px;
  background: rgba(13, 17, 35, 0.55);
  border: 1px solid rgba(127, 67, 255, 0.20);
  border-radius: 8px;
}
.hailuo-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}
.hailuo-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #7f43ff, #00cae0);
  transition: width 0.4s ease;
}
.hailuo-progress-text {
  font-size: 11.5px;
  color: rgba(224, 245, 255, 0.65);
  margin-top: 8px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.3px;
}
.hailuo-error {
  margin-top: 12px;
  padding: 10px 12px;
  background: rgba(248, 81, 73, 0.10);
  border: 1px solid rgba(248, 81, 73, 0.35);
  border-radius: 8px;
  color: #ff8a82;
  font-size: 12px;
  line-height: 1.5;
  word-break: break-word;
}

/* 额度耗尽: 醒目紫色卡片 + 图标 + 标题 + 链接 */
.hailuo-error-quota {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background:
    linear-gradient(135deg, rgba(127, 67, 255, 0.18), rgba(248, 81, 73, 0.12)),
    rgba(13, 17, 35, 0.55);
  border: 1.5px solid rgba(127, 67, 255, 0.45);
  border-radius: 10px;
  color: #ebf8ff;
  box-shadow: 0 6px 18px rgba(127, 67, 255, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.hailuo-error-quota .hailuo-error-icon {
  flex-shrink: 0;
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #7f43ff, #f85149);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(127, 67, 255, 0.40);
}
.hailuo-error-quota .hailuo-error-body {
  flex: 1; min-width: 0;
}
.hailuo-error-quota .hailuo-error-title {
  font-size: 14px;
  font-weight: 600;
  color: #ff8a82;
  margin-bottom: 4px;
  letter-spacing: 0.3px;
}
.hailuo-error-quota .hailuo-error-msg {
  font-size: 12.5px;
  color: rgba(224, 245, 255, 0.75);
  line-height: 1.55;
  margin-bottom: 8px;
}
.hailuo-error-quota .hailuo-error-link {
  display: inline-block;
  font-size: 12px;
  color: #7fd9ff;
  background: rgba(127, 67, 255, 0.18);
  border: 1px solid rgba(127, 67, 255, 0.40);
  border-radius: 6px;
  padding: 5px 10px;
  text-decoration: none;
  transition: all 0.18s;
}
.hailuo-error-quota .hailuo-error-link:hover {
  background: rgba(127, 67, 255, 0.28);
  border-color: rgba(127, 67, 255, 0.60);
  color: #c4a4ff;
}

/* 隐藏老 admin 系统的 navbar/header/tabs (保留 .main-layout 仅作无害容器) */
.admin-body .main-layout > .navbar,
.admin-body .admin-header,
.admin-body .admin-tabs,
.admin-body .admin-panel-header { display: none !important; }

/* ============================================================
   海螺生成 — 模板 chip 一键填入 (2026-07-30)
   ============================================================ */
.hailuo-templates {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.hailuo-template-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: rgba(127, 67, 255, 0.10);
  border: 1px solid rgba(127, 67, 255, 0.30);
  border-radius: 14px;
  font-size: 11.5px;
  color: #c4a4ff;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.hailuo-template-chip:hover {
  background: rgba(127, 67, 255, 0.22);
  border-color: rgba(127, 67, 255, 0.55);
  color: #ebf8ff;
  transform: translateY(-1px);
}
.hailuo-template-chip:active { transform: translateY(0); }
.hailuo-template-chip svg { width: 12px; height: 12px; flex-shrink: 0; }

/* ============================================================
   海螺生成 — 4 阶段进度指示器 (提交 / 排队 / 生成 / 下载)
   ============================================================ */
.hailuo-stages {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 10px;
  padding: 10px 12px;
  background: rgba(13, 17, 35, 0.45);
  border: 1px solid rgba(127, 67, 255, 0.15);
  border-radius: 8px;
}
.hailuo-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px 2px;
  font-size: 10.5px;
  color: rgba(224, 245, 255, 0.45);
  text-align: center;
  position: relative;
  transition: color 0.2s;
}
.hailuo-stage::after {
  content: '';
  position: absolute;
  top: 12px;
  left: calc(50% + 14px);
  width: calc(100% - 28px);
  height: 1px;
  background: rgba(127, 67, 255, 0.20);
  z-index: 0;
}
.hailuo-stage:last-child::after { display: none; }
.hailuo-stage-dot {
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(13, 17, 35, 0.8);
  border: 1.5px solid rgba(127, 67, 255, 0.30);
  color: rgba(224, 245, 255, 0.40);
  font-size: 11px;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  z-index: 1;
  transition: all 0.2s;
}
.hailuo-stage.is-done .hailuo-stage-dot {
  background: linear-gradient(135deg, #00cae0, #7f43ff);
  border-color: #00cae0;
  color: #fff;
}
.hailuo-stage.is-done::after { background: linear-gradient(90deg, #00cae0, rgba(127, 67, 255, 0.20)); }
.hailuo-stage.is-active .hailuo-stage-dot {
  background: rgba(127, 67, 255, 0.25);
  border-color: #7f43ff;
  color: #c4a4ff;
  box-shadow: 0 0 0 4px rgba(127, 67, 255, 0.15);
  animation: hailuo-pulse 1.4s ease-in-out infinite;
}
.hailuo-stage.is-active { color: #c4a4ff; }
.hailuo-stage-label {
  font-family: 'JetBrains Mono', 'PingFang SC', monospace;
  letter-spacing: 0.2px;
}
@keyframes hailuo-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(127, 67, 255, 0.15); }
  50%      { box-shadow: 0 0 0 8px rgba(127, 67, 255, 0.05); }
}

/* ============================================================
   海螺生成 — 续查 / 配额 / 友好错误 (2026-07-30)
   ============================================================ */
.hailuo-task-id {
  margin-top: 8px;
  padding: 6px 10px;
  background: rgba(0, 202, 224, 0.06);
  border: 1px dashed rgba(0, 202, 224, 0.35);
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #7fd9ff;
  word-break: break-all;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hailuo-task-id-label {
  color: rgba(224, 245, 255, 0.55);
  font-family: 'PingFang SC', sans-serif;
  flex-shrink: 0;
}
.hailuo-task-id-value {
  color: #7fd9ff;
  font-weight: 600;
}
.hailuo-task-id-actions {
  margin-left: auto;
  display: flex;
  gap: 6px;
}
.hailuo-task-id-actions button {
  font-size: 10.5px;
  padding: 3px 8px;
  background: rgba(0, 202, 224, 0.18);
  border: 1px solid rgba(0, 202, 224, 0.40);
  border-radius: 4px;
  color: #7fd9ff;
  cursor: pointer;
  font-family: 'PingFang SC', sans-serif;
  transition: all 0.15s;
}
.hailuo-task-id-actions button:hover {
  background: rgba(0, 202, 224, 0.30);
  color: #ebf8ff;
}
.hailuo-task-id-actions button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 海螺超时/续查: 紫色玻璃卡片 (区别于配额耗尽) */
.hailuo-warning {
  margin-top: 12px;
  padding: 12px 14px;
  background:
    linear-gradient(135deg, rgba(0, 202, 224, 0.12), rgba(127, 67, 255, 0.08)),
    rgba(13, 17, 35, 0.55);
  border: 1.5px solid rgba(0, 202, 224, 0.45);
  border-radius: 10px;
  color: #ebf8ff;
  box-shadow: 0 6px 18px rgba(0, 202, 224, 0.12);
}
.hailuo-warning-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: #7fd9ff;
  margin-bottom: 6px;
}
.hailuo-warning-msg {
  font-size: 12px;
  color: rgba(224, 245, 255, 0.78);
  line-height: 1.55;
  margin-bottom: 8px;
}
.hailuo-warning-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.hailuo-warning-actions button {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  font-family: 'PingFang SC', sans-serif;
  transition: all 0.15s;
}
.hailuo-warning-btn-primary {
  background: linear-gradient(135deg, #7f43ff, #00cae0);
  border: 1px solid rgba(127, 67, 255, 0.55);
  color: #fff;
  font-weight: 500;
}
.hailuo-warning-btn-primary:hover { filter: brightness(1.1); }
.hailuo-warning-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: none;
}
.hailuo-warning-btn-ghost {
  background: transparent;
  border: 1px solid rgba(127, 67, 255, 0.40);
  color: #c4a4ff;
}
.hailuo-warning-btn-ghost:hover {
  background: rgba(127, 67, 255, 0.15);
  color: #ebf8ff;
}
/* ============================================================
   Roadmap 路线图看板 (rm-* 前缀, 不污染其他面板)
   ============================================================ */
.rm-toolbar {
  display: flex; gap: 12px; align-items: center;
  padding: 12px 14px;
  background: var(--db-bg-2, #eef2f7);
  border: 1px solid var(--db-border, #d8dfe8);
  border-radius: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.rm-toolbar select.rm-select {
  padding: 6px 10px;
  border: 1px solid var(--db-border, #d8dfe8);
  border-radius: 6px;
  background: #fff;
  color: var(--db-text, #1a2c3e);
  font-size: 13px;
  cursor: pointer;
}
.rm-toolbar .rm-meta {
  margin-left: auto;
  color: var(--db-text-3, #8a98a8);
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
}
.rm-toolbar .rm-btn {
  padding: 7px 14px;
  border: 1px solid var(--db-accent, #2d5b8c);
  background: var(--db-accent, #2d5b8c);
  color: #fff;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.rm-toolbar .rm-btn:hover { filter: brightness(1.1); }
.rm-toolbar .rm-btn-ghost {
  background: #fff;
  color: var(--db-accent, #2d5b8c);
}
.rm-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.rm-col {
  background: var(--db-bg-2, #eef2f7);
  border: 1px solid var(--db-border, #d8dfe8);
  border-radius: 10px;
  padding: 12px;
  min-height: 300px;
}
.rm-col-h {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 2px solid var(--db-border, #d8dfe8);
}
.rm-col-h .rm-col-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--db-text, #1a2c3e);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.rm-col-h .rm-col-count {
  background: var(--db-accent, #2d5b8c);
  color: #fff;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
}
.rm-cards { display: flex; flex-direction: column; gap: 10px; }
.rm-card {
  background: #fff;
  border: 1px solid var(--db-border, #d8dfe8);
  border-radius: 8px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}
.rm-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(45, 91, 140, 0.12);
  border-color: var(--db-accent, #2d5b8c);
}
.rm-card-h {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.rm-card-prio {
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.02em;
}
.rm-card-prio.rm-p0 { background: #fee; color: #c44536; border: 1px solid #c44536; }
.rm-card-prio.rm-p1 { background: #fef4e5; color: #d97706; border: 1px solid #d97706; }
.rm-card-prio.rm-p2 { background: #f0f3f7; color: #6e7681; border: 1px solid #d8dfe8; }
.rm-card-cat {
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 10.5px;
  background: var(--db-bg-3, #e0e7ef);
  color: var(--db-text-2, #4a5868);
}
.rm-card-eff {
  font-size: 10.5px;
  color: var(--db-text-3, #8a98a8);
  font-family: 'JetBrains Mono', monospace;
}
.rm-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--db-text, #1a2c3e);
  margin-bottom: 6px;
  line-height: 1.4;
}
.rm-card-desc {
  font-size: 12px;
  color: var(--db-text-2, #4a5868);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
}
.rm-card-f {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  border-top: 1px dashed var(--db-border, #d8dfe8);
  font-size: 11px;
  color: var(--db-text-3, #8a98a8);
}
.rm-card-status {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--db-bg-3, #e0e7ef);
  cursor: pointer;
  font-size: 11px;
  color: var(--db-text-2, #4a5868);
  font-family: 'JetBrains Mono', monospace;
  transition: background 0.15s;
}
.rm-card-status:hover { background: var(--db-accent, #2d5b8c); color: #fff; }
.rm-card-del {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  border: none;
  background: transparent;
  color: var(--db-text-3, #8a98a8);
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  opacity: 0;
  transition: all 0.15s;
}
.rm-card:hover .rm-card-del { opacity: 1; }
.rm-card-del:hover { background: #c44536; color: #fff; }

/* 详情 modal */
.rm-modal-mask {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(26, 44, 62, 0.5);
  display: none;
  align-items: center; justify-content: center;
  padding: 20px;
}
.rm-modal-mask.is-show { display: flex; }
.rm-modal {
  background: #fff;
  border-radius: 12px;
  padding: 28px;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.rm-modal-h {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--db-accent, #2d5b8c);
}
.rm-modal-h-title { font-size: 18px; font-weight: 700; color: var(--db-text, #1a2c3e); }
.rm-modal-close {
  background: transparent; border: none;
  font-size: 22px; cursor: pointer; color: var(--db-text-3, #8a98a8);
  width: 28px; height: 28px;
}
.rm-modal-row { margin-bottom: 14px; }
.rm-modal-row label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--db-text-3, #8a98a8);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.rm-modal-row input,
.rm-modal-row select,
.rm-modal-row textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--db-border, #d8dfe8);
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  color: var(--db-text, #1a2c3e);
  background: #fff;
}
.rm-modal-row textarea { min-height: 100px; resize: vertical; }
.rm-modal-actions {
  display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--db-border, #d8dfe8);
}
.rm-modal-actions button {
  padding: 9px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--db-border, #d8dfe8);
  background: #fff;
  color: var(--db-text, #1a2c3e);
}
.rm-modal-actions button:hover { background: var(--db-bg-2, #eef2f7); }
.rm-modal-actions .rm-primary {
  background: var(--db-accent, #2d5b8c);
  color: #fff;
  border-color: var(--db-accent, #2d5b8c);
}

@media (max-width: 1100px) {
  .rm-board { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .rm-board { grid-template-columns: 1fr; }
}

/* ============== 首页配置 (hero 浮现动画参数) ============== */
.hero-anim-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.hero-anim-row {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 16px;
  align-items: center;
  padding: 12px 14px;
  background: var(--ad-bg-2);
  border: 1px solid var(--ad-border);
  border-radius: 8px;
  transition: border-color 0.15s ease;
}
.hero-anim-row:hover { border-color: rgba(127, 67, 255, 0.35); }
.hero-anim-row-highlight {
  border-color: rgba(127, 67, 255, 0.25);
  background: rgba(127, 67, 255, 0.04);
}
.hero-anim-label {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.hero-anim-label > label {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ad-text-1);
  cursor: pointer;
}
.hero-anim-hint {
  font-size: 11.5px;
  color: var(--ad-text-3);
  line-height: 1.45;
}
.hero-anim-control {
  display: flex;
  align-items: center;
  gap: 6px;
}
.hero-anim-control input[type="number"] {
  flex: 1;
  background: var(--ad-bg-1);
  border: 1px solid var(--ad-border);
  color: var(--ad-text-1);
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 14px;
  font-family: 'JetBrains Mono', 'SF Mono', 'Menlo', monospace;
  font-variant-numeric: tabular-nums;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.hero-anim-control input[type="number"]:focus {
  border-color: #7f43ff;
  background: var(--ad-bg-2);
  box-shadow: 0 0 0 3px rgba(127, 67, 255, 0.18);
}
.hero-anim-unit {
  font-size: 12px;
  color: var(--ad-text-3);
  font-family: 'JetBrains Mono', 'SF Mono', 'Menlo', monospace;
  min-width: 24px;
  text-align: left;
}
@media (max-width: 768px) {
  .hero-anim-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* ============== hero 动画实时预览区 (admin 内部) ============== */
.hero-anim-preview {
  margin-top: 18px;
  border: 1px solid var(--ad-border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--ad-bg-1);
}
.hero-anim-preview-label {
  padding: 8px 14px;
  background: var(--ad-bg-2);
  font-size: 12px;
  color: var(--ad-text-3);
  border-bottom: 1px solid var(--ad-border);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.hero-anim-preview-stage {
  position: relative;
  height: 220px;
  overflow: hidden;
  background:
    radial-gradient(80% 100% at 70% 30%, #1375c8 0%, #157acd 30%, #0c3560 70%, #060c20 100%);
}
.ha-prev-bg {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
}
.ha-prev-h1 {
  position: absolute;
  left: 24px;
  top: 32px;
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.ha-prev-form {
  position: absolute;
  left: 24px;
  top: 84px;
  display: flex;
  align-items: center;
  gap: 0;
  width: 360px;
  padding: 5px 5px 5px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}
.ha-prev-input {
  flex: 1;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12.5px;
  padding: 4px 0;
}
.ha-prev-btn {
  background: linear-gradient(180deg, rgba(127, 67, 255, 0.95), rgba(95, 35, 240, 0.95));
  color: #fff;
  font-size: 12px;
  padding: 5px 14px;
  border-radius: 6px;
  border: 1px solid rgba(127, 67, 255, 0.4);
  letter-spacing: 0.04em;
}
.ha-prev-sound {
  position: absolute;
  right: 18px;
  bottom: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

/* ============================================================
   Hero 视频轮播列表 (hp- 前缀, 2026-07-30 加)
   9 个 hero 槽位 chip + 实时顺序预览
   ============================================================ */
.hp-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 8px 0 12px;
}
.hp-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: rgba(127, 67, 255, 0.08);
  border: 1.5px solid rgba(127, 67, 255, 0.25);
  border-radius: 18px;
  font-size: 12.5px;
  color: rgba(224, 245, 255, 0.55);
  cursor: pointer;
  user-select: none;
  transition: all 0.15s;
}
.hp-chip:hover {
  background: rgba(127, 67, 255, 0.18);
  border-color: rgba(127, 67, 255, 0.5);
  color: #ebf8ff;
}
.hp-chip:active { transform: scale(0.97); }
.hp-chip.is-active {
  background: linear-gradient(135deg, rgba(127, 67, 255, 0.45), rgba(0, 202, 224, 0.35));
  border-color: rgba(0, 202, 224, 0.7);
  color: #fff;
  box-shadow: 0 4px 14px rgba(127, 67, 255, 0.30);
}
.hp-chip-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  background: rgba(255, 255, 255, 0.10);
  border-radius: 11px;
  font-size: 11.5px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: #fff;
}
.hp-chip-title {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* 顺序标号 (1/2/3...) 选中后右上角显示点击顺序 */
.hp-chip-order {
  display: none;
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: linear-gradient(135deg, #00cae0, #7f43ff);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  border-radius: 9px;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #060c20;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
.hp-chip.is-active .hp-chip-order { display: inline-flex; }
.hp-chip { position: relative; }

.hp-sequence-preview {
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.20);
  border: 1px solid rgba(127, 67, 255, 0.18);
  border-radius: 8px;
}
.hp-sequence-label {
  font-size: 11.5px;
  color: rgba(224, 245, 255, 0.55);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}
.hp-sequence-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.hp-sequence-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: rgba(0, 202, 224, 0.15);
  border: 1px solid rgba(0, 202, 224, 0.4);
  border-radius: 14px;
  font-size: 12px;
  color: #7fd9ff;
  font-family: 'JetBrains Mono', monospace;
}
.hp-sequence-arrow {
  color: rgba(224, 245, 255, 0.4);
  font-size: 14px;
  user-select: none;
}
.hp-sequence-loop {
  margin-left: 4px;
  padding: 2px 7px;
  background: rgba(127, 67, 255, 0.18);
  border: 1px solid rgba(127, 67, 255, 0.4);
  border-radius: 10px;
  font-size: 10.5px;
  color: #c4a4ff;
  font-family: 'JetBrains Mono', monospace;
}

/* ========== 工厂大脑 3D 椭圆轨道配置 (2026-08-03 加) ==========
   28 个参数按 7 个语义组展示, 每组一个网格. 每个 field 是一个
   "slider + 数字输入" 双控件 (slider 拖改实时联动到 number).
   预览 iframe 在卡片底部, 自适应卡片宽度. */
.mo-group {
  margin-bottom: 18px;
  padding: 14px 16px 12px;
  border: 1px solid rgba(127, 67, 255, 0.10);
  border-radius: 7px;
  background: rgba(11, 17, 27, 0.4);
}
.mo-group:last-child { margin-bottom: 0; }

.mo-group-title {
  font-size: 12px;
  font-weight: 600;
  color: #c4a4ff;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px dashed rgba(127, 67, 255, 0.18);
}

.mo-fields-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 8px 14px;
}

.mo-field {
  display: grid;
  grid-template-columns: 1fr;
  padding: 8px 10px;
  border: 1px solid rgba(127, 67, 255, 0.10);
  border-radius: 5px;
  background: rgba(7, 12, 20, 0.5);
  transition: border-color .2s, background .2s;
}
.mo-field:hover { border-color: rgba(127, 67, 255, 0.35); background: rgba(11, 17, 27, 0.65); }
.mo-field.is-dirty { border-color: rgba(240, 136, 62, 0.55); background: rgba(60, 30, 0, 0.4); }
.mo-field.is-changed { border-color: rgba(63, 185, 80, 0.55); }

.mo-field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.mo-field-label {
  font-size: 12px;
  color: #e8edf5;
  font-weight: 500;
}
.mo-field-key {
  font-size: 10px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  color: #6f7886;
  background: rgba(127, 67, 255, 0.10);
  padding: 1px 5px;
  border-radius: 3px;
}
.mo-field-hint {
  font-size: 11px;
  color: #6f7886;
  margin-top: -2px;
  margin-bottom: 4px;
  line-height: 1.4;
}
.mo-field-controls {
  display: grid;
  grid-template-columns: 1fr 76px;
  gap: 8px;
  align-items: center;
}
.mo-field-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(127, 67, 255, 0.3), rgba(88, 166, 255, 0.3));
  outline: none;
  cursor: pointer;
}
.mo-field-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #7f43ff;
  border: 2px solid #1a1f2e;
  box-shadow: 0 0 8px rgba(127, 67, 255, 0.6);
  cursor: pointer;
}
.mo-field-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #7f43ff;
  border: 2px solid #1a1f2e;
  box-shadow: 0 0 8px rgba(127, 67, 255, 0.6);
  cursor: pointer;
}
.mo-field-slider:hover::-webkit-slider-thumb { box-shadow: 0 0 12px rgba(127, 67, 255, 0.9); }

.mo-field-number {
  width: 76px;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(127, 67, 255, 0.18);
  border-radius: 4px;
  color: #e8edf5;
  font: 500 11.5px 'JetBrains Mono', ui-monospace, monospace;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.mo-field-number:focus { outline: none; border-color: #7f43ff; box-shadow: 0 0 0 2px rgba(127, 67, 255, 0.2); }
.mo-field-unit {
  font-size: 10px;
  color: #6f7886;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  margin-left: -4px;
}
.mo-field-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: #e8edf5;
  cursor: pointer;
}
.mo-field-checkbox input { accent-color: #7f43ff; width: 14px; height: 14px; cursor: pointer; }

/* 预览 iframe: 16:9, 自动占满卡片宽度 */
.mo-preview-block {
  margin-top: 18px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(127, 67, 255, 0.20);
  border-radius: 8px;
}
.mo-preview-label {
  font-size: 11.5px;
  color: #c4a4ff;
  margin-bottom: 8px;
  font-weight: 500;
}
.mo-preview-iframe {
  width: 100%;
  height: 720px;
  border: 1px solid rgba(127, 67, 255, 0.10);
  border-radius: 6px;
  background: #02040c;
  display: block;
}

@media (max-width: 1280px) {
  .mo-preview-iframe { height: 600px; }
}

/* ============================================================
   工厂大脑 17 张分类卡片 CRUD (2026-08-03 加)
   表格沿用 .admin-table 的样式 (admin.css 已有 ~330 行),
   这里只补 input + 操作按钮 + dirty 标记.
   ============================================================ */
.mc-input {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  color: var(--ad-text-1, #e6edf3);
  font: 400 12.5px/1.4 "Inter", "PingFang SC", system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  outline: none;
  transition: border-color .15s, background .15s;
}
.mc-input:hover { border-color: rgba(127, 67, 255, 0.30); background: rgba(127, 67, 255, 0.04); }
.mc-input:focus { border-color: rgba(127, 67, 255, 0.55); background: rgba(127, 67, 255, 0.06); }
.mc-input.mc-id {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  color: #66d9ef;
  letter-spacing: 0.02em;
}
.mc-input.mc-num { font-family: "JetBrains Mono", monospace; text-align: right; }

.admin-table tbody td.mc-idx {
  text-align: center;
  color: var(--ad-text-3, #7d8590);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  width: 48px;
}
.admin-table tbody td.mc-actions {
  white-space: nowrap;
  text-align: right;
  padding-right: 8px;
}
.mc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  margin-left: 3px;
  font: 600 13px/1 "JetBrains Mono", monospace;
  color: var(--ad-text-2, #adbac7);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 4px;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.mc-btn:hover {
  color: #fff;
  border-color: rgba(88, 166, 255, 0.55);
  background: rgba(88, 166, 255, 0.12);
}
.mc-btn:disabled {
  opacity: 0.32;
  cursor: not-allowed;
}
.mc-btn:disabled:hover {
  color: var(--ad-text-2);
  border-color: rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.035);
}
.mc-btn.mc-btn-danger:hover {
  color: #ff7b72;
  border-color: rgba(255, 123, 114, 0.55);
  background: rgba(255, 123, 114, 0.12);
}
@media (max-width: 768px) {
  .mo-fields-grid { grid-template-columns: 1fr; }
  .mo-preview-iframe { height: 480px; }
}

/* === 2026-08-04 新增: 卡片上下移快捷按钮 (geom 组顶部) === */
.mo-quick-btn {
  padding: 4px 12px;
  font: 600 12px/1.4 "JetBrains Mono", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  color: #e8edf5;
  background: rgba(127, 67, 255, 0.10);
  border: 1px solid rgba(127, 67, 255, 0.28);
  border-radius: 4px;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .08s;
  min-width: 56px;
  text-align: center;
}
.mo-quick-btn:hover {
  background: rgba(127, 67, 255, 0.22);
  border-color: rgba(127, 67, 255, 0.55);
  color: #fff;
}
.mo-quick-btn:active { transform: translateY(1px); }
.mo-quick-btn:focus-visible {
  outline: 2px solid rgba(127, 67, 255, 0.65);
  outline-offset: 2px;
}


/* ============================================================
   Gitee 仓库监控 (2026-08-06 加) — cyan/purple 配色 (auimlab 主色)
   ============================================================ */

/* ----- 通用 admin-form-* 缺失样式 (admin.html 已用但 admin.css 没写) ----- */
.admin-form-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--ad-border);
}
.admin-form-row:last-child { border-bottom: 0; }
.admin-form-label {
  font-size: 13px;
  color: var(--ad-text-2);
  font-weight: 500;
  min-width: 180px;
  flex-shrink: 0;
}
.admin-form-label input[type="checkbox"] {
  margin-right: 6px;
  accent-color: var(--ad-cyan);
}
.admin-form-label code {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--ad-cyan);
  background: var(--ad-bg-3);
  padding: 1px 6px;
  border-radius: 3px;
}
.admin-form-hint {
  font-size: 12px;
  color: var(--ad-text-3);
  margin-left: auto;
}
.admin-input {
  padding: 7px 11px;
  background: var(--ad-bg-2);
  border: 1px solid var(--ad-border);
  border-radius: 6px;
  color: var(--ad-text-1);
  font: 500 13px/1.3 "JetBrains Mono", monospace;
  width: 140px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.admin-input:focus {
  outline: none;
  border-color: var(--ad-cyan);
  box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.18);
}
.admin-form-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--ad-border);
}

/* ----- 4 stat 行 + stat 卡 ----- */
.gitee-stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 18px 4px 4px;
}
.gitee-stat-card {
  position: relative;
  padding: 16px 18px 14px;
  background: var(--ad-bg-2);
  border: 1px solid var(--ad-border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.15s;
}
.gitee-stat-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: currentColor;
  opacity: 0.6;
}
.gitee-stat-card:hover { transform: translateY(-1px); }
.gitee-stat-num {
  font: 700 32px/1.1 "JetBrains Mono", monospace;
  color: currentColor;
  letter-spacing: -1px;
  text-shadow: 0 0 12px currentColor;
}
.gitee-stat-num.is-zero { opacity: 0.4; text-shadow: none; }
.gitee-stat-label {
  font-size: 12px;
  color: var(--ad-text-3);
  margin-top: 6px;
  letter-spacing: 0.3px;
}
.gitee-stat--total   { color: var(--ad-cyan);    border-color: rgba(88, 166, 255, 0.3); background: linear-gradient(135deg, rgba(88, 166, 255, 0.06), transparent); }
.gitee-stat--used    { color: var(--ad-green);   border-color: rgba(63, 185, 80, 0.3);  background: linear-gradient(135deg, rgba(63, 185, 80, 0.06), transparent); }
.gitee-stat--archive { color: var(--ad-amber);   border-color: rgba(210, 153, 34, 0.3); background: linear-gradient(135deg, rgba(210, 153, 34, 0.06), transparent); }
.gitee-stat--delete  { color: var(--ad-red);     border-color: rgba(248, 81, 73, 0.3);  background: linear-gradient(135deg, rgba(248, 81, 73, 0.06), transparent); }

/* ----- 表格: checkbox 列 + 状态 badge + size 列 ----- */
.admin-table .col-check { width: 36px; text-align: center; }
.admin-table input[type="checkbox"] {
  accent-color: var(--ad-cyan);
  cursor: pointer;
  width: 14px;
  height: 14px;
}
.col-num { text-align: right; font-variant-numeric: tabular-nums; }
.gitee-name-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.gitee-name-cell strong {
  color: var(--ad-text-1);
  font-size: 13px;
  font-family: "JetBrains Mono", monospace;
}
.gitee-name-cell a {
  color: var(--ad-text-3);
  font-size: 11px;
  text-decoration: none;
}
.gitee-name-cell a:hover { color: var(--ad-cyan); }
.gitee-desc {
  font-size: 11.5px;
  color: var(--ad-text-3);
  margin-top: 2px;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gitee-used-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
}
.gitee-used-badge.is-yes {
  background: rgba(63, 185, 80, 0.12);
  color: var(--ad-green);
  border: 1px solid rgba(63, 185, 80, 0.35);
}
.gitee-used-badge.is-no {
  background: rgba(125, 133, 144, 0.12);
  color: var(--ad-text-3);
  border: 1px solid rgba(125, 133, 144, 0.25);
}
.gitee-used-badge.is-private {
  background: rgba(163, 113, 247, 0.12);
  color: var(--ad-purple);
  border: 1px solid rgba(163, 113, 247, 0.35);
  margin-left: 6px;
}
.gitee-reco-badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 6px;
  font-family: "JetBrains Mono", monospace;
}
.gitee-reco-badge.is-keep    { background: rgba(63, 185, 80, 0.12);  color: var(--ad-green); border: 1px solid rgba(63, 185, 80, 0.3); }
.gitee-reco-badge.is-archive { background: rgba(210, 153, 34, 0.12); color: var(--ad-amber); border: 1px solid rgba(210, 153, 34, 0.3); }
.gitee-reco-badge.is-delete  { background: rgba(248, 81, 73, 0.14);  color: var(--ad-red);   border: 1px solid rgba(248, 81, 73, 0.3); }

/* ----- Gitee 清理二次确认 modal ----- */
.gitee-modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: giteeModalFade 0.18s ease;
}
.gitee-modal-mask[hidden] { display: none; }
@keyframes giteeModalFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.gitee-modal {
  width: 560px;
  max-width: 92vw;
  max-height: 88vh;
  background: linear-gradient(180deg, #0d1117 0%, #0a0e14 100%);
  border: 1px solid var(--ad-border-strong);
  border-radius: 14px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(248, 81, 73, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: giteeModalSlide 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes giteeModalSlide {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.gitee-modal-h {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--ad-border);
}
.gitee-modal-h > div:first-of-type { flex: 1; }
.gitee-modal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ad-text-1);
}
.gitee-modal-sub {
  font-size: 12px;
  color: var(--ad-text-3);
  margin-top: 2px;
}
.gitee-modal-close {
  background: transparent;
  border: 1px solid var(--ad-border);
  color: var(--ad-text-3);
  font-size: 18px;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.gitee-modal-close:hover {
  background: var(--ad-red-soft);
  border-color: var(--ad-red);
  color: var(--ad-red);
  transform: rotate(90deg);
}
.gitee-modal-body {
  padding: 18px 22px;
  overflow-y: auto;
  flex: 1;
}
.gitee-warn-box {
  padding: 12px 14px;
  background: rgba(248, 81, 73, 0.08);
  border: 1px solid rgba(248, 81, 73, 0.3);
  border-radius: 8px;
  color: var(--ad-text-1);
  font-size: 13px;
  line-height: 1.6;
}
.gitee-warn-box ul {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--ad-text-2);
}
.gitee-confirm-row {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--ad-border);
}
.gitee-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 22px;
  background: var(--ad-bg-1);
  border-top: 1px solid var(--ad-border);
}

/* ----- admin-btn-danger (admin.css 已存在但 .admin-btn-danger:disabled 需补) ----- */
.admin-btn-danger:disabled,
.admin-btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ----- 响应式 (窄屏堆叠) ----- */
@media (max-width: 768px) {
  .gitee-stat-row { grid-template-columns: repeat(2, 1fr); }
  .admin-form-row { flex-direction: column; align-items: stretch; gap: 6px; }
  .admin-form-label { min-width: 0; }
}

/* === v12 屏幕适配预设 + 智能诊断 (2026-08-10) === */

/* 预设按钮组 */
.mo-presets {
  margin: 0 0 16px 0;
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(0, 202, 224, 0.04) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(0, 202, 224, 0.12);
  border-radius: 8px;
}
.mo-presets-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.mo-presets-icon { font-size: 16px; }
.mo-presets-title {
  font-size: 13px;
  font-weight: 600;
  color: #f7f8f8;
  letter-spacing: 0.04em;
}
.mo-presets-hint {
  font-size: 11px;
  color: #8a8f98;
  margin-left: auto;
}
.mo-presets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.mo-preset-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 10px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #d0d6e0;
  font-family: inherit;
}
.mo-preset-btn:hover {
  background: rgba(0, 202, 224, 0.08);
  border-color: rgba(0, 202, 224, 0.4);
  transform: translateY(-1px);
}
.mo-preset-btn:active {
  transform: translateY(0);
}
.mo-preset-btn.preset-safezone {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.25);
}
.mo-preset-btn.preset-safezone:hover {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.5);
}
.mo-preset-icon { font-size: 18px; line-height: 1; }
.mo-preset-name {
  font-size: 12px;
  font-weight: 600;
  color: #f7f8f8;
  letter-spacing: -0.011em;
}
.mo-preset-desc {
  font-size: 10px;
  color: #8a8f98;
  font-weight: 400;
}

/* 智能诊断面板 */
.mo-diagnostics {
  margin: 0 0 16px 0;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
}
.mo-diag-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.mo-diag-icon { font-size: 16px; }
.mo-diag-title {
  font-size: 13px;
  font-weight: 600;
  color: #f7f8f8;
  letter-spacing: 0.04em;
}
.mo-diag-status {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
}
.mo-diag-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mo-diag-item {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 5px;
  font-size: 12px;
  line-height: 1.5;
  transition: all 0.2s ease;
}
.mo-diag-item.mo-diag-high {
  background: rgba(239, 68, 68, 0.08);
  border-left: 3px solid #ef4444;
}
.mo-diag-item.mo-diag-medium {
  background: rgba(245, 158, 11, 0.08);
  border-left: 3px solid #f59e0b;
}
.mo-diag-item.mo-diag-low {
  background: rgba(148, 163, 184, 0.05);
  border-left: 3px solid #94a3b8;
}
.mo-diag-item.mo-diag-ok {
  background: rgba(16, 185, 129, 0.04);
  border-left: 3px solid #10b981;
  color: #8a8f98;
}
.mo-diag-item-icon {
  font-size: 14px;
  line-height: 1.5;
}
.mo-diag-item-text {
  color: #d0d6e0;
  font-weight: 500;
}
.mo-diag-item.mo-diag-ok .mo-diag-item-text {
  color: #8a8f98;
  font-weight: 400;
}
.mo-diag-item-fix {
  margin-top: 4px;
  color: #8a8f98;
  font-size: 11px;
}

/* 响应式: 预设按钮 3 列 → 2 列 */
@media (max-width: 768px) {
  .mo-presets-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ========== 2026-08-10 §sgp-admin-tab: SGP 服务 tab 样式 ========== */
.sgp-stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 12px;
}
.sgp-stat-card {
  background: var(--ad-bg-2);
  border: 1px solid var(--ad-border);
  border-radius: 8px;
  padding: 14px 16px;
}
.sgp-stat-label {
  font-size: 12px;
  color: var(--ad-text-3);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.sgp-stat-val {
  font-size: 14px;
  color: var(--ad-text-1);
  font-weight: 500;
  font-family: 'SF Mono', 'Cascadia Mono', 'Consolas', monospace;
  word-break: break-all;
  line-height: 1.4;
}
@media (max-width: 768px) {
  .sgp-stat-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================================
   §admin-modal-styles 2026-08-12: 文章 / 项目 弹窗样式
   Bug: 之前 admin.css 没定义 .modal-overlay / .modal-card 等,
   <div class="modal-overlay"> 默认 display:block, 导致 articleModal
   和 projectModal 一直在 admin.html 末尾裸显示. 用户切到 usecases
   tab 时 (面板内容短), 弹窗的"项目名称/技术栈/封面/演示URL..."表单
   就直接出现在 tab 下方, 误以为是 usecases tab 的内容.
   Fix: 补全整套 modal 样式, 默认 .modal-overlay 隐藏, show*Modal()
   显式 style.display='flex' 打开, close*Modal() 改回 'none'.
   ============================================================ */

/* overlay — 默认隐藏, 弹窗时 flex 居中 */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 20px 40px;
  overflow-y: auto;
  animation: modalFade 0.18s ease;
}
@keyframes modalFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* 弹窗主体卡片 */
.modal-card {
  width: 640px;
  max-width: 100%;
  background: linear-gradient(180deg, #0d1117 0%, #0a0e14 100%);
  border: 1px solid var(--ad-border-strong);
  border-radius: 14px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(88, 166, 255, 0.08);
  overflow: hidden;
  animation: modalSlide 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes modalSlide {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* 弹窗标题 */
.modal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ad-text-1);
  padding: 18px 22px 14px;
  margin: 0;
  border-bottom: 1px solid var(--ad-border);
}

/* 表单容器 */
.modal-form {
  padding: 18px 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* 双列 / 三列 网格 */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}

/* 表单标签 + 控件组 (label 在上, input 在下) */
.modal-form > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--ad-text-3);
  letter-spacing: 0.04em;
}
.form-input,
.modal-form input[type="text"],
.modal-form input[type="number"],
.modal-form input[type="url"],
.modal-form textarea {
  padding: 8px 11px;
  background: var(--ad-bg-2);
  border: 1px solid var(--ad-border);
  border-radius: 6px;
  color: var(--ad-text-1);
  font: 500 13px/1.4 var(--ad-font);
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus,
.modal-form input:focus,
.modal-form textarea:focus {
  outline: none;
  border-color: var(--ad-cyan);
  box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.18);
}
.form-input::placeholder {
  color: var(--ad-text-3);
  font-style: italic;
}
.form-textarea-fixed {
  resize: vertical;
  min-height: 48px;
  font-family: inherit;
}
.form-textarea-vertical {
  resize: vertical;
  min-height: 160px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12.5px;
  line-height: 1.5;
}

/* 复选框行 */
.form-checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}
.form-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--ad-cyan);
  cursor: pointer;
}
.form-checkbox-label {
  font-size: 13px;
  color: var(--ad-text-2);
  cursor: pointer;
}

/* 底部操作栏 */
.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 12px;
  margin-top: 4px;
  border-top: 1px solid var(--ad-border);
}
.btn-cancel {
  padding: 7px 16px;
  background: var(--ad-bg-3);
  border: 1px solid var(--ad-border-strong);
  border-radius: 6px;
  color: var(--ad-text-1);
  font: 500 13px var(--ad-font);
  cursor: pointer;
  transition: all 0.15s;
}
.btn-cancel:hover {
  border-color: var(--ad-cyan);
  color: var(--ad-cyan);
  background: var(--ad-bg-2);
}
.btn-send {
  padding: 7px 18px;
  background: linear-gradient(180deg, var(--ad-cyan), #1158c7);
  border: 1px solid var(--ad-cyan);
  border-radius: 6px;
  color: #fff;
  font: 600 13px var(--ad-font);
  cursor: pointer;
  transition: all 0.15s;
}
.btn-send:hover {
  background: linear-gradient(180deg, #79b8ff, var(--ad-cyan));
  box-shadow: 0 2px 8px rgba(88, 166, 255, 0.4);
}

/* 响应式: 窄屏弹窗全宽 */
@media (max-width: 640px) {
  .modal-overlay { padding: 20px 12px; }
  .modal-card { width: 100%; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .form-grid-3 { grid-template-columns: 1fr; }
}
