/* ============================================================
 * Majorada Admin Console · 样式
 * ============================================================ */

:root {
  --adm-bg: #f4f7fb;
  --adm-panel: rgba(255, 255, 255, 0.88);
  --adm-panel-strong: rgba(255, 255, 255, 0.98);
  --adm-ink: #0b1220;
  --adm-ink-soft: rgba(51, 65, 85, 0.72);
  --adm-line: rgba(148, 163, 184, 0.18);
  --adm-accent: #0f766e;
  --adm-accent-2: #0f766e;
  --adm-shadow: 0 22px 52px rgba(15, 23, 42, 0.08);
  --adm-font: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

body {
  font-family: var(--adm-font);
  color-scheme: light;
  background:
    radial-gradient(circle at 16% 0%, rgba(37, 99, 235, 0.08), transparent 26%),
    radial-gradient(circle at 85% 0%, rgba(15, 118, 110, 0.08), transparent 22%),
    linear-gradient(180deg, #ffffff 0%, var(--adm-bg) 100%);
  color: var(--adm-ink);
}

.adm-body,
.adm-body * {
  font-family: var(--adm-font);
}

.adm-shell {
  background: transparent;
}

.adm-sidebar {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  border-right: 1px solid var(--adm-line);
}

.adm-sidebar-logo,
.adm-header {
  background: rgba(255, 255, 255, 0.88);
}

.adm-brand,
.adm-title {
  color: var(--adm-ink);
  letter-spacing: -0.03em;
}

.adm-brand-sub,
.adm-kicker,
.adm-subtitle,
.adm-sidebar-copy,
.adm-sidebar-foot {
  color: var(--adm-ink-soft);
}

.adm-sidebar-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.88);
  border: 1px solid var(--adm-line);
  color: var(--adm-accent);
  font-size: 11px;
  letter-spacing: 0.18em;
}

/* 侧边栏导航 */
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 24px;
  color: rgba(51, 65, 85, 0.78);
  font-size: 13.5px;
  font-weight: 600;
  border-left: 3px solid transparent;
  transition: all 0.18s;
  cursor: pointer;
}
.admin-nav-item:hover {
  background: rgba(15, 118, 110, 0.06);
  color: var(--adm-ink);
}
.admin-nav-item.active {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.1), rgba(255,255,255,0.35));
  color: var(--adm-ink);
  border-left-color: var(--adm-accent);
}
.admin-nav-item.active i {
  color: var(--adm-accent);
}

.admin-badge {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(37, 99, 235, 0.12);
  color: var(--adm-accent);
  min-width: 22px;
  text-align: center;
}

/* 卡片 */
.admin-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.98));
  border: 1px solid var(--adm-line);
  border-radius: 18px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
  box-shadow: var(--adm-shadow);
}
.admin-card:hover {
  border-color: rgba(37, 99, 235, 0.2);
}

/* 按钮 */
.admin-btn-primary {
  padding: 10px 16px;
  background: linear-gradient(135deg, #0b1220, #1d4ed8);
  color: #f8fafc;
  border-radius: 999px;
  font-weight: 700;
  transition: all 0.15s;
  border: none;
  cursor: pointer;
}
.admin-btn-primary:hover {
  box-shadow: 0 12px 26px -10px rgba(37, 99, 235, 0.32);
  transform: translateY(-1px);
}

.admin-btn-ghost {
  padding: 9px 14px;
  background: transparent;
  color: var(--adm-ink);
  border: 1px solid var(--adm-line);
  background: rgba(255,255,255,0.84);
  border-radius: 999px;
  font-weight: 600;
  transition: all 0.15s;
  cursor: pointer;
}
.admin-btn-ghost:hover {
  background: rgba(255,255,255,0.96);
  border-color: rgba(37, 99, 235, 0.24);
}

.admin-btn-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(71, 85, 105, 0.72);
  border-radius: 6px;
  transition: all 0.15s;
  cursor: pointer;
  font-size: 12px;
  border: none;
  background: transparent;
  margin-right: 2px;
}
.admin-btn-icon:hover {
  background: rgba(37, 99, 235, 0.08);
  color: var(--adm-ink);
}

/* 输入框 */
.admin-input, select.admin-input {
  padding: 10px 12px;
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--adm-line);
  border-radius: 14px;
  color: var(--adm-ink);
  outline: none;
  transition: border-color 0.15s;
}
.admin-input:focus {
  border-color: var(--adm-accent);
  box-shadow: 0 0 0 3px rgba(15,118,110,0.08);
}

.admin-overlay-panel {
  background: rgba(255,255,255,0.98);
  border: 1px solid var(--adm-line);
  box-shadow: 0 24px 64px rgba(15,23,42,0.16);
  backdrop-filter: blur(18px);
}

.admin-overlay-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(148,163,184,0.14);
  background: rgba(248,250,252,0.96);
}

.admin-overlay-panel__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--adm-ink);
}

.admin-overlay-panel__title i {
  color: var(--adm-accent);
}

.admin-overlay-panel__subbar {
  padding: 10px 16px;
  border-bottom: 1px solid rgba(148,163,184,0.12);
  background: rgba(248,250,252,0.92);
  color: var(--adm-ink-soft);
  font-size: 11px;
}

.admin-overlay-panel__foot {
  padding: 10px 16px;
  border-top: 1px solid rgba(148,163,184,0.12);
  background: rgba(248,250,252,0.96);
  text-align: center;
}

.admin-overlay-panel__close,
.admin-overlay-panel__icon-btn {
  color: #64748b;
}

.admin-overlay-panel__close:hover,
.admin-overlay-panel__icon-btn:hover {
  color: #0f766e;
}

.admin-login-mark {
  border-radius: 14px;
  box-shadow: 0 12px 28px -16px rgba(15,23,42,.25);
}

.admin-login-kicker {
  color: var(--adm-accent);
  letter-spacing: 0.30em;
}

.admin-login-note,
.admin-login-caption,
.admin-login-meta {
  color: var(--adm-ink-soft);
}

/* 表格 */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.admin-table thead th {
  background: rgba(241, 245, 249, 0.96);
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  color: rgba(51, 65, 85, 0.72);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  white-space: nowrap;
}
.admin-table tbody tr {
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  transition: background 0.12s;
}
.admin-table tbody tr:hover {
  background: rgba(37, 99, 235, 0.05);
}
.admin-table tbody td {
  padding: 11px 14px;
  vertical-align: middle;
  white-space: nowrap;
}
.admin-table tbody td:nth-child(2) {
  white-space: normal;
}

/* 表格区域允许横向滚动 */
.admin-card:has(.admin-table) {
  overflow: auto;
}

/* 子 Tab */
.sites-tab {
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(24, 20, 17, 0.58);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s;
  cursor: pointer;
}
.sites-tab:hover {
  color: #181411;
  background: rgba(168, 107, 66, 0.05);
}
.sites-tab.active {
  color: #334155;
  border-bottom-color: #334155;
  font-weight: 600;
}

/* Leaflet popup 浅色化 */
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}
.leaflet-popup-content {
  margin: 0 !important;
  padding: 0 !important;
}
.leaflet-container {
  background: #eef2f7 !important;
  font-family: var(--adm-font);
}
.leaflet-control-attribution {
  background: rgba(255, 255, 255, 0.92) !important;
  color: rgba(71, 85, 105, 0.68) !important;
  font-size: 10px !important;
}
.leaflet-control-attribution a {
  color: var(--adm-accent) !important;
}
.leaflet-control-zoom a {
  background: rgba(255, 255, 255, 0.98) !important;
  color: var(--adm-ink) !important;
  border: 1px solid var(--adm-line) !important;
}

/* 滚动条 */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: #eef4fb;
}
::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.28);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(37, 99, 235, 0.38);
}

/* ==================== 合同预览 — 标准合同样式 (modal 内显示) ==================== */
.ctp-page {
  max-width: 794px;
  margin: 0 auto 8px;
  background: #fff;
  color: #1a1a1a;
  padding: 40px 48px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
  font-family: "Songti SC", "SimSun", "Noto Serif SC", "Source Han Serif SC", serif;
  font-size: 13px;
  wechat-height: 1.85;
  border-top: 6px solid #0f766e;
  max-height: 65vh;
  overflow-y: auto;
}
.ctp-page * { box-sizing: border-box; }
.ctp-page .ctp-mono {
  font-family: "Courier New", Consolas, monospace;
  letter-spacing: 0.3px;
}

.ctp-page .ctp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 2px solid #0f766e;
  padding-bottom: 14px;
  margin-bottom: 18px;
  gap: 20px;
}
.ctp-page .ctp-brand { display: flex; align-items: center; gap: 12px; }
.ctp-page .ctp-brand-mark {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0f766e, #0f766e);
  color: #fff;
  font-weight: 900;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 1px;
  font-family: Arial, sans-serif;
}
.ctp-page .ctp-brand-name { font-size: 14px; font-weight: 700; color: #1a1a1a; }
.ctp-page .ctp-brand-en { font-size: 11px; color: #666; margin-top: 2px; }
.ctp-page .ctp-meta { font-size: 11px; color: #444; text-align: right; wechat-height: 1.7; }
.ctp-page .ctp-meta-k { color: #888; margin-right: 6px; }
.ctp-page .ctp-meta-v { color: #1a1a1a; font-weight: 600; }

.ctp-page .ctp-title {
  text-align: center;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 6px;
  color: #1a1a1a;
  margin: 24px 0 4px;
}
.ctp-page .ctp-title-en {
  text-align: center;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  color: #666;
  margin: 0 0 22px;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
}

.ctp-page .ctp-preface {
  text-indent: 2em;
  margin: 14px 0;
  wechat-height: 2;
  font-size: 13px;
}
.ctp-page .ctp-parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 18px 0 10px;
}
.ctp-page .ctp-party {
  border: 1px solid rgba(148,163,184,0.22);
  border-top: 3px solid #0f766e;
  padding: 12px 14px;
  background: #faf8f1;
  page-break-inside: avoid;
}
.ctp-page .ctp-party-label {
  font-weight: 900;
  color: #0f766e;
  font-size: 13px;
  margin-bottom: 8px;
  letter-spacing: 1px;
  border-bottom: 1px dashed rgba(148,163,184,0.22);
  padding-bottom: 6px;
}
.ctp-page .ctp-party-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  wechat-height: 1.7;
}
.ctp-page .ctp-party-table .ctp-k {
  color: #666;
  width: 80px;
  padding: 3px 0;
  vertical-align: top;
  white-space: nowrap;
}
.ctp-page .ctp-party-table .ctp-v {
  color: #1a1a1a;
  padding: 3px 0;
  font-weight: 500;
  word-break: break-all;
}
.ctp-page .ctp-party-table .ctp-sub { color: #666; font-weight: 400; font-size: 11px; }

.ctp-page .ctp-article { margin: 18px 0; page-break-inside: avoid; }
.ctp-page .ctp-article-hl {
  background: #eff6fb;
  border-left: 3px solid #0f766e;
  padding: 8px 12px;
  margin-left: -12px;
  border-radius: 2px;
}
.ctp-page .ctp-art-title {
  font-size: 14px;
  font-weight: 900;
  color: #0f766e;
  margin: 18px 0 8px;
  letter-spacing: 1px;
  border-bottom: 1px solid #0f766e33;
  padding-bottom: 4px;
}
.ctp-page .ctp-clauses {
  padding-left: 0;
  margin: 6px 0;
  list-style: none;
  counter-reset: cl;
}
.ctp-page .ctp-clauses li {
  counter-increment: cl;
  text-indent: 2em;
  margin: 6px 0;
  wechat-height: 1.95;
  font-size: 13px;
  text-align: justify;
}
.ctp-page .ctp-clauses li::before {
  content: counter(cl) ". ";
  display: inline-block;
  color: #0f766e;
  font-weight: 700;
  margin-right: 0.2em;
}
.ctp-page .ctp-clause-text {
  text-indent: 2em;
  margin: 8px 0;
  font-size: 13px;
  wechat-height: 1.95;
}

.ctp-page .ctp-dev-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-size: 11px;
}
.ctp-page .ctp-dev-table th {
  background: #0f766e;
  color: #fff;
  padding: 8px 6px;
  text-align: center;
  font-weight: 700;
  border: 1px solid #0f766e;
}
.ctp-page .ctp-dev-table td {
  padding: 6px;
  text-align: center;
  border: 1px solid #d4d4d4;
  background: #fff;
  color: #1a1a1a;
}
.ctp-page .ctp-dev-table tr:nth-child(even) td { background: #faf8f1; }
.ctp-page .ctp-empty {
  padding: 14px;
  text-align: center;
  color: #aa6633;
  background: #fff5e0;
  border: 1px dashed #0f766e;
  border-radius: 3px;
  font-size: 12px;
  margin: 10px 0;
}

.ctp-page .ctp-sign {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin: 36px 0 18px;
  page-break-inside: avoid;
}
.ctp-page .ctp-sign-block { text-align: left; }
.ctp-page .ctp-sign-label {
  font-size: 13px;
  font-weight: 900;
  color: #1a1a1a;
  margin-bottom: 6px;
  letter-spacing: 1px;
}
.ctp-page .ctp-sign-stamp {
  height: 90px;
  border: 1px dashed #cc3333;
  border-radius: 50%;
  width: 120px;
  color: #cc3333;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  margin: 6px 0;
  opacity: 0.45;
}
.ctp-page .ctp-sign-stamp::after { content: "(此处加盖公章)"; }
.ctp-page .ctp-sign-wechat {
  font-size: 12px;
  color: #444;
  margin: 6px 0;
  font-family: "Courier New", monospace;
}
.ctp-page .ctp-sign-name {
  font-size: 12px;
  color: #0f766e;
  font-weight: 700;
  margin-top: 8px;
  border-top: 1px solid #ccc;
  padding-top: 6px;
}

.ctp-page .ctp-footer {
  margin-top: 30px;
  padding-top: 12px;
  border-top: 1px solid #d4d4d4;
  font-size: 10px;
  color: #888;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
}
.ctp-page .ctp-watermark {
  font-family: Arial, sans-serif;
  font-weight: 900;
  color: #cc3333;
  font-size: 14px;
  letter-spacing: 4px;
  border: 2px solid #cc3333;
  padding: 3px 10px;
  border-radius: 3px;
  opacity: 0.5;
  white-space: nowrap;
}

/* ========== Supply Chain Module ========== */
.sup-tab-btn {
  flex: 0 0 auto;
  padding: 14px 22px;
  font-size: 13px;
  font-weight: 500;
  color: #f5ecd7a0;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.sup-tab-btn:hover {
  color: #0f766e;
  background: rgba(201, 169, 97, 0.05);
}
.sup-tab-btn.active {
  color: #93c5fd;
  border-bottom-color: #0f766e;
  background: rgba(201, 169, 97, 0.08);
}
.sup-tab-pane {
  display: block;
}
.sup-tab-pane.hidden {
  display: none;
}

/* Print rules for PO detail */
@media print {
  aside, header.sticky, button, .sup-tab-btn { display: none !important; }
  .admin-card { border: 1px solid #ccc !important; background: #fff !important; color: #000 !important; }
  body { background: #fff !important; color: #000 !important; }
}

/* ============================================================
 * 主题系统 (CSS 变量)
 * 固定使用 Frontend 品牌亮色系统
 * ============================================================ */

:root, html[data-theme="dark"] {
  --cream: #eceff3;
  --cream-light: #eef2ef;
  --cream-dark: #e2e8f0;
  --coffee-300: #94a3b8;
  --coffee-400: #64748b;
  --coffee-500: #334155;
  --coffee-600: #0b1220;
  --terracotta: #0f766e;
  --sage: #0f766e;
  --sage-dark: #115e59;
  --olive: #1e293b;
  --bg: #f3f4f6;
  --bg-alt: #ffffff;
  --bg-deep: #e5e7eb;
  --text: #0b1220;
  --text-muted: rgba(51, 65, 85, 0.72);
  --text-faint: rgba(71, 85, 105, 0.56);
  --gold: #0f766e;
  --gold-text: #0b1220;
  --gold-deep: #0b1220;
  --border: rgba(148, 163, 184, 0.22);
  --border-strong: rgba(37, 99, 235, 0.24);
  --card-grad-from: rgba(255,255,255,0.96);
  --card-grad-to: rgba(248,250,252,0.96);
  --table-head: #eef2f7;
  --row-hover: #f8fafc;
  --input-bg: rgba(255,255,255,0.96);
  --panel-bg: rgba(255,255,255,0.96);
  --panel-head: #f8fafc;
  --panel-border: rgba(148, 163, 184, 0.2);
  --panel-divider: rgba(148, 163, 184, 0.16);
  --shadow: 0 24px 60px -34px rgba(15, 23, 42, 0.22);
}

/* ---- 基础应用变量 ---- */
.adm-body {
  background: var(--bg) !important;
  color: var(--text) !important;
  font-family: 'Noto Sans SC', 'Noto Sans SC', system-ui, sans-serif;
  transition: background-color 0.25s, color 0.25s;
}

.adm-shell {
  position: relative;
  background:
    radial-gradient(circle at top left, rgba(15,118,110,0.08), transparent 26%),
    radial-gradient(circle at bottom right, rgba(15,118,110,0.08), transparent 30%),
    var(--cream-light);
}

.adm-sidebar {
  background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(248,250,252,0.96)) !important;
  border-right: 1px solid rgba(148,163,184,0.16);
  transition: background-color 0.25s, border-color 0.25s;
  box-shadow: 22px 0 54px -46px rgba(15,23,42,0.18);
}
.adm-sidebar-logo {
  border-bottom: 1px solid rgba(148,163,184,0.14);
}
.adm-brand { color: var(--coffee-500); }
.adm-brand-sub { color: var(--terracotta); opacity: 0.9; }
.adm-sidebar-foot {
  border-top: 1px solid rgba(148,163,184,0.14);
  color: rgba(71,85,105,0.66);
}
.adm-sidebar-intro {
  border-bottom: 1px solid rgba(148,163,184,0.12);
}
.adm-sidebar-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(148,163,184,0.14);
  color: var(--coffee-500);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.adm-sidebar-copy {
  margin-top: 12px;
  color: rgba(71,85,105,0.66);
  font-size: 12px;
  line-height: 1.7;
}

.adm-header {
  background: rgba(255,255,255,0.78);
  border-bottom: 1px solid rgba(148,163,184,0.12);
  box-shadow: 0 12px 32px -28px rgba(15,23,42,0.18);
}
.adm-kicker {
  color: rgba(37,99,235,0.86);
  font-size: 10px;
  letter-spacing: 0.34em;
  margin-bottom: 6px;
}
.adm-title { color: var(--gold-text); }
.adm-subtitle { color: var(--text-muted); }
.adm-user-box { border-left: 1px solid var(--border); }
.adm-user-name { color: var(--gold-text); }
.adm-user-sub { color: var(--text-faint); }

.admin-page .admin-card canvas {
  filter: saturate(0.95);
}

.admin-page-dashboard .admin-table td,
.admin-page-applications .admin-table td,
.admin-page-sites .admin-table td,
.admin-page-machines .admin-table td,
.admin-page-terminal .admin-table td,
.admin-page-system .admin-table td {
  color: #0b1220;
}

.admin-page-dashboard .admin-table td.text-\[\#f59e0b\],
.admin-page-dashboard .admin-table td.text-\[\#0f766e\],
.admin-page-applications .admin-table td.text-\[\#0f766e\],
.admin-page-sites .admin-table td.text-\[\#0f766e\],
.admin-page-machines .admin-table td.text-\[\#0f766e\],
.admin-page-terminal .admin-table td.text-\[\#0f766e\] {
  color: #0f766e !important;
}

.admin-page-dashboard .admin-card,
.admin-page-applications .admin-card,
.admin-page-sites .admin-card,
.admin-page-machines .admin-card,
.admin-page-terminal .admin-card,
.admin-page-system .admin-card {
  box-shadow: 0 22px 54px rgba(15,23,42,0.08);
}

.admin-page-terminal textarea.admin-input {
  min-height: 112px;
  background: rgba(255,255,255,0.98);
}

.admin-page-sites #sites-map,
.admin-page-sites #ai-map,
.admin-page-machines #machines-batch-map {
  box-shadow: inset 0 0 0 1px rgba(148,163,184,0.16);
}

.admin-page-machines .btn-machine-city-filter,
.admin-page-sites .sites-tab,
.admin-page-applications .admin-btn-primary,
.admin-page-terminal .admin-btn-primary,
.admin-page-system .admin-btn-primary {
  letter-spacing: 0.02em;
}

.admin-section-note {
  border-radius: 20px;
  border: 1px solid rgba(58, 158, 199, 0.14);
  background: linear-gradient(180deg, rgba(237, 246, 250, 0.96), rgba(255, 255, 255, 0.9));
  padding: 14px 16px;
  color: #475569;
  font-size: 11px;
  line-height: 1.75;
}

.admin-soft-stat {
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.94));
  box-shadow: 0 16px 36px rgba(15,23,42,0.06);
}

.admin-soft-stat--info {
  border-color: rgba(58,158,199,0.18);
  background: linear-gradient(180deg, rgba(240,248,251,0.98), rgba(255,255,255,0.92));
}

.admin-soft-stat--success {
  border-color: rgba(34,197,94,0.18);
  background: linear-gradient(180deg, rgba(244,252,246,0.98), rgba(255,255,255,0.92));
}

.admin-soft-stat--warn {
  border-color: rgba(245,158,11,0.2);
  background: linear-gradient(180deg, rgba(255,250,242,0.98), rgba(255,255,255,0.92));
}

.admin-soft-stat__eyebrow {
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(71,85,105,0.56);
  text-transform: uppercase;
}

.admin-soft-stat__value {
  margin-top: 8px;
  font-size: 24px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #0b1220;
}

.admin-soft-stat__desc {
  margin-top: 8px;
  font-size: 11px;
  line-height: 1.7;
  color: rgba(71,85,105,0.76);
}

.admin-progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148,163,184,0.18);
}

.admin-progress-bar {
  height: 100%;
  border-radius: inherit;
}

.admin-segment-card {
  border-radius: 22px;
  border: 1px solid rgba(148,163,184,0.16);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.94));
  box-shadow: 0 16px 34px rgba(15,23,42,0.05);
}

.admin-segment-card:hover {
  border-color: rgba(37,99,235,0.2);
}

.admin-tier-tile {
  border-radius: 22px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.94));
  box-shadow: 0 16px 34px rgba(15,23,42,0.05);
}

.admin-tier-tile__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.admin-tier-tile__mark {
  font-size: 30px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.admin-tier-tile__label {
  margin-top: 10px;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(71,85,105,0.56);
}

.admin-tier-tile__count {
  text-align: right;
  font-size: 22px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.admin-tier-tile__count span {
  display: block;
  margin-top: 6px;
  font-size: 10px;
  line-height: 1.5;
  font-weight: 500;
  color: rgba(92,58,30,0.48);
  letter-spacing: 0;
}

.admin-tier-tile__meta {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-tier-tile__meta strong {
  font-size: 12px;
  color: #0b1220;
}

.admin-tier-tile__meta span {
  font-size: 10px;
  color: rgba(92,58,30,0.48);
}

.admin-tier-tile__desc {
  margin-top: 10px;
  font-size: 11px;
  line-height: 1.7;
  color: rgba(92,58,30,0.66);
}

.admin-side-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-side-list__item {
  border-radius: 18px;
  border: 1px solid rgba(139,100,56,0.1);
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,244,236,0.94));
  padding: 14px;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.admin-side-list__item:hover {
  border-color: rgba(139,100,56,0.2);
  transform: translateY(-1px);
}

.admin-side-list__item--warn {
  border-color: rgba(245,158,11,0.18);
  background: linear-gradient(180deg, rgba(255,252,247,0.98), rgba(255,246,236,0.94));
}

.admin-side-list__item--success {
  border-color: rgba(34,197,94,0.18);
  background: linear-gradient(180deg, rgba(246,253,248,0.98), rgba(244,252,246,0.94));
}

.admin-side-list__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-side-list__title {
  font-size: 14px;
  font-weight: 700;
  color: #0b1220;
}

.admin-side-list__meta {
  margin-top: 5px;
  font-size: 10px;
  color: rgba(92,58,30,0.54);
}

.admin-panel-shell {
  border-radius: 24px;
  border: 1px solid rgba(148,163,184,0.14);
  background: linear-gradient(180deg, rgba(255,255,255,0.97), rgba(248,250,252,0.94));
  box-shadow: 0 18px 44px rgba(15,23,42,0.07);
}

.admin-panel-shell__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(148,163,184,0.12);
  background: rgba(255,255,255,0.75);
}

.admin-panel-shell__title {
  font-size: 14px;
  font-weight: 700;
  color: #0b1220;
}

.admin-panel-shell__body {
  padding: 0;
}

.admin-mini-tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.84);
  border: 1px solid rgba(139,100,56,0.12);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.admin-inline-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.admin-inline-flow__step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 16px;
  border: 1px solid rgba(236,72,153,0.18);
  background: rgba(236,72,153,0.08);
  color: #be185d;
  padding: 9px 12px;
  font-size: 11px;
  font-weight: 700;
}

.admin-inline-flow__arrow {
  color: rgba(139,100,56,0.34);
  font-size: 11px;
}

.admin-modal-surface {
  border-radius: 24px;
  border: 1px solid rgba(139,100,56,0.12);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,244,236,0.94));
  box-shadow: 0 22px 54px rgba(42,31,24,0.16);
}

.admin-dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 18px;
}

.admin-hero-panel {
  border-radius: 26px;
  border: 1px solid rgba(148,163,184,0.16);
  background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(248,250,252,0.94));
  box-shadow: 0 22px 52px rgba(15,23,42,0.08);
}

.admin-hero-panel--accent {
  background:
    radial-gradient(circle at top right, rgba(15,118,110,0.12), transparent 34%),
    radial-gradient(circle at bottom left, rgba(15,118,110,0.10), transparent 30%),
    linear-gradient(135deg, rgba(255,255,255,0.98), rgba(248,250,252,0.94));
}

.admin-hero-kicker {
  font-size: 11px;
  letter-spacing: 0.28em;
  color: #0f766e;
}

.admin-hero-title {
  font-size: 30px;
  line-height: 1.1;
  font-weight: 800;
  color: #0b1220;
  letter-spacing: -0.04em;
}

.admin-hero-copy {
  font-size: 13px;
  line-height: 1.8;
  color: rgba(51,65,85,0.76);
}

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-kpi-tile {
  border-radius: 20px;
  border: 1px solid rgba(148,163,184,0.12);
  background: rgba(255,255,255,0.86);
  padding: 16px;
}

.admin-kpi-tile__label {
  font-size: 11px;
  color: rgba(100,116,139,0.78);
}

.admin-kpi-tile__value {
  margin-top: 8px;
  font-size: 28px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #0b1220;
}

.admin-kpi-tile__meta {
  margin-top: 8px;
  font-size: 11px;
  color: rgba(100,116,139,0.72);
}

.admin-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.admin-card-title {
  font-size: 18px;
  font-weight: 700;
  color: #0b1220;
}

.admin-card-copy {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.7;
  color: rgba(100,116,139,0.76);
}

.admin-product-glance {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.admin-product-tile {
  border-radius: 20px;
  border: 1px solid rgba(148,163,184,0.14);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.94));
  padding: 16px;
}

.admin-product-tile__eyebrow {
  font-size: 10px;
  letter-spacing: 0.22em;
  color: #0f766e;
}

.admin-product-tile__value {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.7;
  color: #0b1220;
}

.admin-detail-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: rgba(100,116,139,0.78);
}

.admin-detail-link {
  color: #0f766e;
  font-weight: 600;
}

.admin-detail-link:hover {
  color: #1d4ed8;
}

.admin-detail-sep {
  color: rgba(148,163,184,0.9);
}

.admin-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(148,163,184,0.18);
  background: rgba(255,255,255,0.92);
}

.admin-detail-hero {
  border-radius: 28px;
  border: 1px solid rgba(148,163,184,0.14);
  background:
    radial-gradient(circle at top right, rgba(37,99,235,0.10), transparent 34%),
    radial-gradient(circle at bottom left, rgba(15,118,110,0.09), transparent 28%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.94));
  box-shadow: 0 22px 52px rgba(15,23,42,0.08);
}

.admin-detail-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.14);
  background: rgba(255,255,255,0.82);
  color: #0f766e;
  font-size: 11px;
  letter-spacing: 0.24em;
}

.admin-detail-kicker i {
  color: #0f766e;
}

.admin-detail-title {
  font-size: 32px;
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #0b1220;
}

.admin-detail-copy {
  font-size: 13px;
  line-height: 1.85;
  color: rgba(51,65,85,0.76);
}

.admin-detail-facts {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-detail-fact {
  border-radius: 20px;
  border: 1px solid rgba(148,163,184,0.14);
  background: rgba(255,255,255,0.84);
  padding: 14px 16px;
  box-shadow: 0 14px 32px rgba(15,23,42,0.06);
}

.admin-detail-fact__label {
  font-size: 12px;
  font-weight: 700;
  color: #0b1220;
}

.admin-detail-fact__value {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.75;
  color: rgba(51,65,85,0.74);
}

.admin-detail-aside {
  border-radius: 26px;
  border: 1px solid rgba(148,163,184,0.14);
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.94));
  box-shadow: 0 20px 44px rgba(15,23,42,0.08);
}

.admin-detail-aside__eyebrow {
  font-size: 11px;
  letter-spacing: 0.24em;
  color: rgba(100,116,139,0.72);
}

.admin-detail-stat {
  border-radius: 20px;
  border: 1px solid rgba(148,163,184,0.12);
  background: rgba(255,255,255,0.84);
  padding: 14px 16px;
}

.admin-detail-stat--soft {
  background: rgba(248,250,252,0.92);
}

.admin-detail-muted {
  color: rgba(100,116,139,0.72);
}

.admin-detail-note {
  font-size: 11px;
  line-height: 1.7;
  color: rgba(100,116,139,0.76);
}

.admin-detail-section {
  border: 1px solid rgba(148,163,184,0.14);
  background: linear-gradient(180deg, rgba(255,255,255,0.97), rgba(248,250,252,0.94));
}

.admin-detail-log {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,0.12);
  background: rgba(248,250,252,0.88);
}

.admin-detail-log__dot {
  margin-top: 6px;
  font-size: 8px;
}

.admin-detail-log__title {
  font-size: 13px;
  color: #0b1220;
}

.admin-detail-log__meta,
.admin-detail-table-muted {
  font-size: 11px;
  color: rgba(100,116,139,0.74);
}

@media (max-width: 1024px) {
  .admin-dashboard-hero,
  .admin-product-glance,
  .admin-detail-facts {
    grid-template-columns: 1fr;
  }
}

.admin-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

/* ---- MAJORADA 官网风格统一覆盖 ---- */
html[data-theme],
html[data-theme="light"],
html[data-theme="dark"] {
  color-scheme: light;
}

.adm-body {
  background:
    radial-gradient(at 5% 5%, rgba(194, 104, 62, 0.04) 0, transparent 50%),
    radial-gradient(at 95% 95%, rgba(156, 174, 131, 0.05) 0, transparent 50%),
    var(--cream-light) !important;
}

.admin-nav-item {
  color: rgba(67,41,19,0.72);
  border-left: 0;
  border-radius: 1.1rem;
  margin: 0.125rem 1rem;
  padding: 0.78rem 1rem;
}

.admin-nav-item:hover {
  background: rgba(194, 104, 62, 0.08);
  color: var(--coffee-500);
}

.admin-nav-item.active {
  background: linear-gradient(135deg, rgba(194,104,62,0.16), rgba(156,174,131,0.16));
  color: var(--coffee-500);
  border-left-color: transparent;
  box-shadow: 0 18px 36px -22px rgba(194, 104, 62, 0.45);
}

.admin-nav-item.active i {
  color: #0f766e;
}

.admin-badge {
  background: rgba(15,118,110,0.12);
  color: #1d4ed8;
}

.adm-header {
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
}

.adm-title,
.adm-user-name,
.admin-card h2 {
  color: #0b1220 !important;
}

.adm-subtitle,
.adm-user-sub {
  color: var(--text-muted);
}

.admin-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.98)) !important;
  border-color: rgba(148, 163, 184, 0.18) !important;
  color: var(--text);
  box-shadow: 0 22px 48px -34px rgba(15, 23, 42, 0.22);
}

.admin-card:hover {
  border-color: rgba(37, 99, 235, 0.28) !important;
}

.admin-btn-primary {
  background: linear-gradient(135deg, #0b1220, #0f766e) !important;
  color: var(--cream-light) !important;
  border-radius: 999px;
}

.admin-btn-ghost,
.admin-btn-icon {
  color: #334155 !important;
  border-color: rgba(148, 163, 184, 0.22) !important;
  background: rgba(255, 255, 255, 0.78);
}

.admin-btn-ghost:hover,
.admin-btn-icon:hover {
  background: rgba(37, 99, 235, 0.08) !important;
  border-color: rgba(37, 99, 235, 0.28) !important;
}

.admin-input,
select.admin-input,
textarea.admin-input {
  background: #fff !important;
  color: #0b1220 !important;
  border-color: rgba(148, 163, 184, 0.22) !important;
}

.admin-table thead th {
  background: #eef2f7 !important;
  color: #475569 !important;
  border-bottom-color: rgba(148, 163, 184, 0.18) !important;
}

.admin-table tbody tr {
  border-bottom-color: rgba(148, 163, 184, 0.10) !important;
}

.admin-table tbody tr:hover {
  background: rgba(37, 99, 235, 0.05) !important;
}

.sites-tab,
.sup-tab-btn {
  color: rgba(51, 65, 85, 0.72) !important;
}

.sites-tab:hover,
.sup-tab-btn:hover {
  color: #0b1220 !important;
  background: rgba(15, 118, 110, 0.06) !important;
}

.sites-tab.active,
.sup-tab-btn.active {
  color: #0f766e !important;
  border-bottom-color: #0f766e !important;
}

html[data-theme] .text-\[\#f5ecd7\] { color: #0b1220 !important; }
html[data-theme] .text-\[\#f5ecd7\]\/90,
html[data-theme] .text-\[\#f5ecd7\]\/85,
html[data-theme] .text-\[\#f5ecd7\]\/80,
html[data-theme] .text-\[\#f5ecd7\]\/75,
html[data-theme] .text-\[\#f5ecd7\]\/70 { color: rgba(15, 23, 42, 0.86) !important; }
html[data-theme] .text-\[\#f5ecd7\]\/65,
html[data-theme] .text-\[\#f5ecd7\]\/60,
html[data-theme] .text-\[\#f5ecd7\]\/55,
html[data-theme] .text-\[\#f5ecd7\]\/50,
html[data-theme] .text-\[\#f5ecd7\]\/45,
html[data-theme] .text-\[\#f5ecd7\]\/40,
html[data-theme] .text-\[\#f5ecd7\]\/30 { color: rgba(71, 85, 105, 0.62) !important; }
html[data-theme] .text-\[\#93c5fd\],
html[data-theme] .text-\[\#0f766e\] { color: #0f766e !important; }
html[data-theme] .text-\[\#0f766e\]\/90,
html[data-theme] .text-\[\#0f766e\]\/80,
html[data-theme] .text-\[\#0f766e\]\/70,
html[data-theme] .text-\[\#0f766e\]\/60,
html[data-theme] .text-\[\#0f766e\]\/50,
html[data-theme] .text-\[\#0f766e\]\/40 { color: rgba(37, 99, 235, 0.74) !important; }
html[data-theme] .bg-\[\#0a0e0d\],
html[data-theme] .bg-\[\#0a0e0d\]\/90,
html[data-theme] .bg-\[\#0a0e0d\]\/80,
html[data-theme] .bg-\[\#0a0e0d\]\/60,
html[data-theme] .bg-\[\#0a0e0d\]\/50,
html[data-theme] .bg-\[\#0a0e0d\]\/40,
html[data-theme] .bg-\[\#0a0e0d\]\/55,
html[data-theme] .bg-\[\#0a0e0d\]\/45,
html[data-theme] .bg-\[\#0d1412\],
html[data-theme] .bg-\[\#071311\],
html[data-theme] .bg-\[\#0f1614\],
html[data-theme] .bg-\[\#1a1f1d\],
html[data-theme] .bg-\[\#252b29\],
html[data-theme] .bg-\[\#0d141220\] {
  background-color: var(--cream-light) !important;
}
html[data-theme] .border-\[\#0f766e\]\/10,
html[data-theme] .border-\[\#0f766e\]\/12,
html[data-theme] .border-\[\#0f766e\]\/15,
html[data-theme] .border-\[\#0f766e\]\/20 {
  border-color: rgba(148, 163, 184, 0.2) !important;
}
html[data-theme] .border-\[\#f59e0b\]\/15 {
  border-color: rgba(245, 158, 11, 0.18) !important;
}
html[data-theme] .text-\[\#22c55e\] {
  color: #16a34a !important;
}
html[data-theme] .text-\[\#3a9ec7\] {
  color: #0ea5e9 !important;
}
html[data-theme] .text-\[\#ef4444\] {
  color: #dc2626 !important;
}
html[data-theme] .text-\[\#f59e0b\] {
  color: #d97706 !important;
}
html[data-theme] .hover\:text-\[\#93c5fd\]:hover,
html[data-theme] .hover\:text-\[\#0f766e\]:hover {
  color: var(--terracotta) !important;
}
html[data-theme] .hover\:bg-\[\#0f766e\]\/5:hover,
html[data-theme] .hover\:bg-\[\#0f766e\]\/10:hover,
html[data-theme] .hover\:bg-\[\#0f766e\]\/15:hover {
  background-color: rgba(37, 99, 235, 0.08) !important;
}
html[data-theme] .line-clamp-2 {
  color: inherit;
}

/* ---- 亮色主题: 重写关键组件 ---- */
html[data-theme="light"] .admin-nav-item {
  color: rgba(42, 36, 25, 0.75);
}
html[data-theme="light"] .admin-nav-item:hover {
  background: rgba(168, 132, 58, 0.08);
  color: #6e5320;
}
html[data-theme="light"] .admin-nav-item.active {
  background: linear-gradient(90deg, rgba(168, 132, 58, 0.18), transparent);
  color: #6e5320;
  border-left-color: #0f766e;
}
html[data-theme="light"] .admin-nav-item.active i {
  color: #0f766e;
}

html[data-theme="light"] .admin-badge {
  background: rgba(168, 132, 58, 0.18);
  color: #6e5320;
}

html[data-theme="light"] .admin-card {
  background: linear-gradient(180deg, var(--card-grad-from), var(--card-grad-to));
  border-color: var(--border);
  color: var(--text);
  box-shadow: var(--shadow);
}
html[data-theme="light"] .admin-card:hover {
  border-color: var(--border-strong);
}

html[data-theme="light"] .admin-btn-primary {
  background: linear-gradient(135deg, #0f766e, #0f766e);
  color: #fff;
}
html[data-theme="light"] .admin-btn-primary:hover {
  box-shadow: 0 6px 20px -4px rgba(168, 132, 58, 0.5);
}

html[data-theme="light"] .admin-btn-ghost {
  color: #6e5320;
  border-color: rgba(168, 132, 58, 0.4);
  background: rgba(255, 255, 255, 0.6);
}
html[data-theme="light"] .admin-btn-ghost:hover {
  background: rgba(168, 132, 58, 0.1);
  border-color: rgba(168, 132, 58, 0.7);
}

html[data-theme="light"] .admin-btn-icon {
  color: rgba(110, 83, 32, 0.7);
}
html[data-theme="light"] .admin-btn-icon:hover {
  background: rgba(168, 132, 58, 0.12);
  color: #4d3911;
}

html[data-theme="light"] .admin-input,
html[data-theme="light"] select.admin-input {
  background: #ffffff;
  border-color: rgba(168, 132, 58, 0.3);
  color: #2a2419;
}
html[data-theme="light"] .admin-input::placeholder {
  color: rgba(42, 36, 25, 0.4);
}
html[data-theme="light"] .admin-input:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(168, 132, 58, 0.15);
}

html[data-theme="light"] .admin-table thead th {
  background: var(--table-head);
  color: #6e5320;
  border-bottom: 1px solid rgba(168, 132, 58, 0.3);
}
html[data-theme="light"] .admin-table tbody tr {
  border-bottom: 1px solid rgba(168, 132, 58, 0.08);
}
html[data-theme="light"] .admin-table tbody tr:hover {
  background: var(--row-hover);
}

html[data-theme="light"] .sites-tab {
  color: rgba(42, 36, 25, 0.65);
}
html[data-theme="light"] .sites-tab:hover {
  color: #0b1220;
  background: rgba(15, 118, 110, 0.06);
}
html[data-theme="light"] .sites-tab.active {
  color: #0f766e;
  border-bottom-color: #0f766e;
}

html[data-theme="light"] .sup-tab-btn {
  color: rgba(42, 36, 25, 0.7);
  border-bottom-color: transparent;
}
html[data-theme="light"] .sup-tab-btn:hover {
  background: rgba(15, 118, 110, 0.06);
}
html[data-theme="light"] .sup-tab-btn.active {
  color: #0f766e;
  border-bottom-color: #0f766e;
  background: rgba(15, 118, 110, 0.1);
}

/* ---- 亮色: Tailwind 任意值类强制覆盖 (主要文本色) ---- */
html[data-theme="light"] .text-\[\#f5ecd7\] { color: #0b1220 !important; }
html[data-theme="light"] .text-\[\#f5ecd7\]\/90,
html[data-theme="light"] .text-\[\#f5ecd7\]\/85,
html[data-theme="light"] .text-\[\#f5ecd7\]\/80,
html[data-theme="light"] .text-\[\#f5ecd7\]\/75,
html[data-theme="light"] .text-\[\#f5ecd7\]\/70 { color: rgba(15, 23, 42, 0.85) !important; }
html[data-theme="light"] .text-\[\#f5ecd7\]\/65,
html[data-theme="light"] .text-\[\#f5ecd7\]\/60,
html[data-theme="light"] .text-\[\#f5ecd7\]\/55 { color: rgba(71, 85, 105, 0.66) !important; }
html[data-theme="light"] .text-\[\#f5ecd7\]\/50,
html[data-theme="light"] .text-\[\#f5ecd7\]\/45,
html[data-theme="light"] .text-\[\#f5ecd7\]\/40 { color: rgba(71, 85, 105, 0.52) !important; }
html[data-theme="light"] .text-\[\#f5ecd7\]\/30 { color: rgba(71, 85, 105, 0.4) !important; }

html[data-theme="light"] .text-\[\#93c5fd\] { color: #334155 !important; }
html[data-theme="light"] .text-\[\#0f766e\] { color: #0f766e !important; }
html[data-theme="light"] .text-\[\#0f766e\]\/90,
html[data-theme="light"] .text-\[\#0f766e\]\/80,
html[data-theme="light"] .text-\[\#0f766e\]\/70 { color: rgba(37, 99, 235, 0.88) !important; }
html[data-theme="light"] .text-\[\#0f766e\]\/60,
html[data-theme="light"] .text-\[\#0f766e\]\/50,
html[data-theme="light"] .text-\[\#0f766e\]\/40 { color: rgba(37, 99, 235, 0.72) !important; }

/* 任意值背景: 深背景 → 米白 */
html[data-theme="light"] .bg-\[\#0a0e0d\],
html[data-theme="light"] .bg-\[\#0a0e0d\]\/90,
html[data-theme="light"] .bg-\[\#0a0e0d\]\/80,
html[data-theme="light"] .bg-\[\#0a0e0d\]\/60,
html[data-theme="light"] .bg-\[\#0a0e0d\]\/50,
html[data-theme="light"] .bg-\[\#0a0e0d\]\/40 { background-color: rgba(247, 249, 247, 0.7) !important; }
html[data-theme="light"] .bg-\[\#0d1412\] { background-color: #ffffff !important; }
html[data-theme="light"] .bg-\[\#0f1614\] { background-color: #f6fbfa !important; }
html[data-theme="light"] .bg-\[\#1a1f1d\] { background-color: #edf4f2 !important; }
html[data-theme="light"] .bg-\[\#252b29\] { background-color: #e3ecea !important; }

/* 任意值边框 */
html[data-theme="light"] .border-\[\#0f766e\]\/15,
html[data-theme="light"] .border-\[\#0f766e\]\/10 { border-color: rgba(148, 163, 184, 0.18) !important; }
html[data-theme="light"] .border-\[\#0f766e\]\/20 { border-color: rgba(148, 163, 184, 0.25) !important; }
html[data-theme="light"] .border-\[\#0f766e\]\/30 { border-color: rgba(37, 99, 235, 0.24) !important; }
html[data-theme="light"] .border-\[\#0f766e\]\/40 { border-color: rgba(37, 99, 235, 0.34) !important; }

/* 滚动条 */
html[data-theme="light"] ::-webkit-scrollbar-track { background: #edf2ef; }
html[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(15, 118, 110, 0.34); }
html[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: rgba(15, 118, 110, 0.56); }

/* 通用 wechat-clamp 工具 */
.wechat-clamp-2 {
  display: -webkit-box;
  -webkit-wechat-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
 * 通知中心 / 设置面板 / Toast / 模态
 * ============================================================ */

#notif-panel, #settings-panel {
  background: var(--panel-bg) !important;
  border-color: var(--panel-border) !important;
}

.notif-item {
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  margin-bottom: 6px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.notif-item:hover {
  background: var(--row-hover);
  border-color: var(--border);
}
.notif-item.unread {
  background: rgba(201, 169, 97, 0.06);
}
.notif-item.unread::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ef4444;
  margin-top: 8px;
  flex-shrink: 0;
}
html[data-theme="light"] .notif-item.unread {
  background: rgba(168, 132, 58, 0.08);
}

.adm-toast-success { background: #22c55e; color: #fff; }
.adm-toast-error { background: #ef4444; color: #fff; }
.adm-toast-warn { background: #f59e0b; color: #fff; }
.adm-toast-info { background: #3a9ec7; color: #fff; }

.welcome-card {
  background: linear-gradient(145deg, var(--panel-bg), var(--bg-alt));
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  padding: 32px;
  max-width: 540px;
  width: 100%;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
html[data-theme="light"] .welcome-card {
  background: #ffffff;
  box-shadow: 0 30px 80px rgba(110, 83, 32, 0.18);
}

/* 设置面板组 */
.setting-group { margin-bottom: 18px; }
.setting-group-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 4px;
  font-size: 13px;
  color: var(--text);
}
.setting-row .label-block { flex: 1; }
.setting-row .label-text { font-weight: 500; }
.setting-row .label-hint { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* 主题选择切片 */
.theme-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 2px solid var(--border);
  cursor: pointer;
  flex: 1;
  transition: all 0.15s;
  background: var(--bg-alt);
}
.theme-chip:hover { border-color: var(--gold); }
.theme-chip.active {
  border-color: var(--gold);
  background: color-mix(in srgb, var(--gold) 12%, transparent);
}
.theme-chip-preview {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.theme-chip-preview.dark { background: linear-gradient(135deg, #0d1412, #0f766e); }
.theme-chip-preview.light { background: linear-gradient(135deg, #ffffff, #0f766e); }

/* 语言切换切片 (Language chips) */
.lang-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  cursor: pointer;
  flex: 1;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  background: var(--bg-alt);
  transition: all 0.15s;
  white-space: nowrap;
  justify-content: center;
}
.lang-chip:hover { border-color: var(--gold); color: var(--gold-text); }
.lang-chip.active {
  border-color: var(--gold);
  background: color-mix(in srgb, var(--gold) 14%, transparent);
  color: var(--gold-text);
}

/* Switch */
.adm-switch {
  position: relative;
  width: 38px;
  height: 22px;
  display: inline-block;
  cursor: pointer;
}
.adm-switch input { display: none; }
.adm-switch-slider {
  position: absolute;
  inset: 0;
  background: rgba(120, 120, 120, 0.4);
  border-radius: 999px;
  transition: 0.2s;
}
.adm-switch-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.2s;
}
.adm-switch input:checked + .adm-switch-slider {
  background: var(--gold);
}
.adm-switch input:checked + .adm-switch-slider::before {
  transform: translateX(16px);
}

/* 管理后台旧暖色类兼容映射 */
.text-\[\#0b1220\],
.text-\[\#432913\] {
  color: #0b1220 !important;
}

.text-\[\#64748b\],
.text-\[\#64748b\]\/55,
.text-\[\#64748b\]\/60,
.text-\[\#64748b\]\/65,
.text-\[\#64748b\]\/68,
.text-\[\#64748b\]\/70,
.text-\[\#64748b\]\/72,
.text-\[\#64748b\]\/75,
.text-\[\#64748b\]\/78,
.text-\[\#64748b\]\/80 {
  color: #64748b !important;
}

.text-\[\#0f766e\],
.text-\[\#0f766e\] {
  color: #0f766e !important;
}

.text-\[\#93c5fd\] {
  color: #334155 !important;
}

.border-\[\#64748b\]\/10,
.border-\[\#64748b\]\/12,
.border-\[\#64748b\]\/15,
.border-\[\#64748b\]\/18,
.border-\[\#0f766e\]\/15,
.border-\[\#0f766e\]\/18,
.border-\[\#0f766e\]\/40,
.border-\[\#0f766e\]\/10,
.border-\[\#0f766e\]\/15,
.border-\[\#0f766e\]\/40 {
  border-color: rgba(148, 163, 184, 0.22) !important;
}

.bg-\[\#f8fafc\],
.bg-\[\#fff7f1\],
.bg-\[\#fff8ef\],
.bg-\[\#fffaf2\] {
  background: rgba(255, 255, 255, 0.94) !important;
}

.hover\:bg-\[\#0f766e\]\/8:hover,
.hover\:bg-\[\#0f766e\]\/10:hover {
  background: rgba(15, 118, 110, 0.06) !important;
}

.hover\:border-\[\#0f766e\]\/20:hover,
.hover\:border-\[\#0f766e\]\/35:hover,
.hover\:border-\[\#0f766e\]\/80:hover {
  border-color: rgba(37, 99, 235, 0.22) !important;
}

/* 最终后台统一覆盖，压住旧暖色二次覆盖 */
.adm-body {
  background:
    radial-gradient(circle at 8% 8%, rgba(15, 118, 110, 0.06), transparent 26%),
    radial-gradient(circle at 92% 92%, rgba(15, 118, 110, 0.06), transparent 28%),
    #eef2ef !important;
}

.adm-sidebar {
  background: rgba(255, 255, 255, 0.84) !important;
  border-right: 1px solid rgba(148, 163, 184, 0.14) !important;
  box-shadow: 18px 0 48px -42px rgba(15, 23, 42, 0.16) !important;
}

.admin-nav-item {
  color: rgba(51, 65, 85, 0.8) !important;
  border-left: 0 !important;
  border-radius: 18px;
  margin: 2px 12px;
  padding: 12px 16px !important;
}

.admin-nav-item:hover {
  background: rgba(15, 118, 110, 0.06) !important;
  color: #0b1220 !important;
}

.admin-nav-item.active {
  background: linear-gradient(135deg, rgba(15,118,110,0.12), rgba(15,118,110,0.08)) !important;
  color: #0b1220 !important;
  box-shadow: inset 0 0 0 1px rgba(15,118,110,0.12);
}

.admin-nav-item.active i,
.adm-sidebar-chip,
.adm-kicker {
  color: #0f766e !important;
}

.admin-card,
.admin-soft-stat,
.admin-tier-tile,
.admin-side-list__item,
.admin-modal-surface {
  border-color: rgba(148, 163, 184, 0.14) !important;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.95)) !important;
  box-shadow: 0 18px 42px rgba(15,23,42,0.07) !important;
}

.admin-side-list__item--warn {
  background: linear-gradient(180deg, rgba(255,251,235,0.96), rgba(255,255,255,0.96)) !important;
}

.admin-btn-primary {
  background: linear-gradient(135deg, #0b1220, #0f766e) !important;
  color: #f8fafc !important;
}

.admin-btn-ghost {
  background: rgba(255,255,255,0.88) !important;
  border-color: rgba(148,163,184,0.16) !important;
  color: #0b1220 !important;
}

.admin-btn-ghost:hover {
  border-color: rgba(15,118,110,0.24) !important;
  color: #0f766e !important;
}

.admin-input,
select.admin-input {
  background: rgba(255,255,255,0.94) !important;
  border-color: rgba(148,163,184,0.18) !important;
  color: #0b1220 !important;
}

.admin-input:focus,
select.admin-input:focus {
  border-color: #0f766e !important;
  box-shadow: 0 0 0 3px rgba(15,118,110,0.08) !important;
}


/* === MAJORADA THEME LOCK === */
html[data-theme] .adm-body,
html[data-theme] .adm-shell,
html[data-theme] .adm-sidebar,
html[data-theme] .adm-header,
html[data-theme] .admin-card,
html[data-theme] .admin-soft-stat,
html[data-theme] .admin-tier-tile,
html[data-theme] .admin-side-list__item,
html[data-theme] .admin-modal-surface,
html[data-theme] .admin-btn-primary,
html[data-theme] .admin-btn-ghost,
html[data-theme] .admin-input,
html[data-theme] select.admin-input {
  border-color: rgba(148, 163, 184, 0.18) !important;
}

html[data-theme] .adm-body {
  background:
    radial-gradient(circle at 10% 10%, rgba(15, 118, 110, 0.07), transparent 26%),
    radial-gradient(circle at 90% 90%, rgba(51, 65, 85, 0.05), transparent 28%),
    #eef2ef !important;
  color: #0b1220 !important;
}

html[data-theme] .adm-sidebar,
html[data-theme] .adm-header,
html[data-theme] .admin-card,
html[data-theme] .admin-soft-stat,
html[data-theme] .admin-tier-tile,
html[data-theme] .admin-side-list__item,
html[data-theme] .admin-modal-surface {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.96)) !important;
  box-shadow: 0 18px 42px rgba(11, 18, 32, 0.08) !important;
}

html[data-theme] .admin-nav-item:hover {
  background: rgba(15,118,110,0.06) !important;
}

html[data-theme] .admin-nav-item.active {
  background: linear-gradient(135deg, rgba(15,118,110,0.10), rgba(51,65,85,0.05)) !important;
  box-shadow: inset 0 0 0 1px rgba(15,118,110,0.14) !important;
}

html[data-theme] .admin-nav-item.active i,
html[data-theme] .adm-sidebar-chip,
html[data-theme] .adm-kicker,
html[data-theme] .admin-btn-primary,
html[data-theme] .admin-btn-primary:hover,
html[data-theme] .admin-badge,
html[data-theme] .sites-tab.active,
html[data-theme] .sup-tab-btn.active,
html[data-theme] .text-[#0f766e],
html[data-theme] .text-[#0f766e],
html[data-theme] .text-[#93c5fd] {
  color: #0f766e !important;
}

html[data-theme] .admin-btn-primary {
  background: linear-gradient(135deg, #0b1220, #0f766e) !important;
  color: #f8fafc !important;
}

html[data-theme] .admin-btn-ghost:hover,
html[data-theme] .admin-input:focus,
html[data-theme] select.admin-input:focus,
html[data-theme] .sites-tab:hover,
html[data-theme] .sup-tab-btn:hover {
  border-color: rgba(15,118,110,0.26) !important;
}

html[data-theme] .admin-table thead th {
  background: #eef5f4 !important;
}

html[data-theme] .admin-table tbody tr:hover {
  background: rgba(15,118,110,0.05) !important;
}

html[data-theme] ::-webkit-scrollbar-track {
  background: #edf2ef !important;
}
html[data-theme] ::-webkit-scrollbar-thumb {
  background: rgba(15,118,110,0.34) !important;
}
html[data-theme] ::-webkit-scrollbar-thumb:hover {
  background: rgba(15,118,110,0.56) !important;
}

html[data-theme] .gold-gradient,
html[data-theme] .sunset-gradient {
  background: linear-gradient(135deg, #0b1220 0%, #0f766e 58%, #334155 100%) !important;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}
