.admin-body { margin: 0; background: #f0f2f5; }
.login-hint { font-size: 13px; color: #888; margin: 0 0 16px; line-height: 1.5; }
.login-extra-row { display: flex; justify-content: space-between; margin-top: 14px; font-size: 13px; }
.login-extra-row a { color: #1677ff; text-decoration: none; }
.login-extra-row a:hover { text-decoration: underline; }
.login-code-row { display: flex; gap: 8px; align-items: center; }
.login-code-row input { flex: 1; min-width: 0; }
.login-code-row .btn { flex-shrink: 0; white-space: nowrap; }
.admin-layout { display: flex; min-height: 100vh; --sider-w: 252px; }

/* ===== 高级侧栏 ===== */
.admin-sider {
  --sider-accent: #3b82f6;
  --sider-accent-soft: rgba(59, 130, 246, .18);
  --sider-glow: rgba(59, 130, 246, .35);
  width: var(--sider-w);
  flex-shrink: 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  color: rgba(255,255,255,.88);
  background:
    radial-gradient(ellipse 120% 80% at 0% 0%, rgba(59,130,246,.22) 0%, transparent 55%),
    radial-gradient(ellipse 80% 60% at 100% 100%, rgba(139,92,246,.12) 0%, transparent 50%),
    linear-gradient(180deg, #0b1220 0%, #070d18 48%, #050a14 100%);
  border-right: 1px solid rgba(255,255,255,.06);
  box-shadow: 4px 0 32px rgba(0,0,0,.28);
  overflow: hidden;
  z-index: 100;
}
.admin-sider::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 100% 28px;
  pointer-events: none;
  opacity: .5;
}

.sider-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 18px 18px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  background: linear-gradient(180deg, rgba(255,255,255,.04) 0%, transparent 100%);
}
.sider-brand-mark {
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  color: #93c5fd;
  background: linear-gradient(135deg, rgba(59,130,246,.28) 0%, rgba(99,102,241,.18) 100%);
  border: 1px solid rgba(147,197,253,.25);
  box-shadow: 0 4px 20px rgba(59,130,246,.25), inset 0 1px 0 rgba(255,255,255,.12);
}
.sider-brand-mark svg { width: 22px; height: 22px; }
.sider-brand-text { min-width: 0; }
.sider-brand-text strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .04em;
  color: #fff;
  line-height: 1.25;
}
.sider-brand-text small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(148,163,184,.85);
}

.admin-menu {
  position: relative;
  z-index: 1;
  flex: 1;
  overflow-y: auto;
  padding: 10px 10px 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.12) transparent;
}
.admin-menu::-webkit-scrollbar { width: 4px; }
.admin-menu::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 4px; }
.admin-menu .group { padding: 12px 20px 6px; font-size: 12px; color: rgba(255,255,255,.45); }

.menu-section {
  margin-bottom: 4px;
  border-radius: 10px;
  overflow: hidden;
  transition: background .2s;
}
.menu-section.open,
.menu-section.has-active {
  background: rgba(255,255,255,.03);
}
.menu-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  font-size: 13px;
  color: rgba(226,232,240,.72);
  cursor: pointer;
  user-select: none;
  border-radius: 10px;
  transition: color .2s, background .2s, box-shadow .2s;
}
.menu-section-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.menu-section-title {
  font-weight: 500;
  letter-spacing: .02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.menu-ico {
  width: 32px; height: 32px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 9px;
  color: rgba(148,163,184,.95);
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  transition: color .2s, background .2s, border-color .2s, box-shadow .2s, transform .2s;
}
.menu-ico svg { width: 17px; height: 17px; }
.menu-section-head:hover {
  color: #f8fafc;
  background: rgba(255,255,255,.05);
}
.menu-section-head:hover .menu-ico {
  color: #bfdbfe;
  border-color: rgba(147,197,253,.25);
  background: rgba(59,130,246,.12);
}
.menu-section.open > .menu-section-head,
.menu-section.has-active > .menu-section-head {
  color: #f1f5f9;
}
.menu-section.open > .menu-section-head .menu-ico,
.menu-section.has-active > .menu-section-head .menu-ico {
  color: #dbeafe;
  background: linear-gradient(135deg, rgba(59,130,246,.35) 0%, rgba(99,102,241,.22) 100%);
  border-color: rgba(147,197,253,.35);
  box-shadow: 0 2px 12px var(--sider-glow);
}

.menu-arrow {
  width: 7px; height: 7px;
  border-right: 1.5px solid rgba(148,163,184,.7);
  border-bottom: 1.5px solid rgba(148,163,184,.7);
  transform: rotate(-45deg);
  transition: transform .25s ease, border-color .2s;
  flex-shrink: 0;
  margin-right: 2px;
}
.menu-section.open .menu-arrow {
  transform: rotate(45deg);
  margin-top: -3px;
  border-color: rgba(147,197,253,.85);
}

.menu-section-body {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding: 0 6px;
  transition: max-height .32s ease, opacity .22s ease, padding .22s ease;
}
.menu-section.open .menu-section-body {
  max-height: 720px;
  opacity: 1;
  padding: 2px 6px 8px;
}

.admin-menu a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0;
  padding: 8px 12px 8px 38px;
  color: rgba(203,213,225,.78);
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  border-radius: 8px;
  transition: background .18s, color .18s, transform .15s;
}
.admin-menu a::before {
  content: '';
  position: absolute;
  left: 18px;
  top: 50%;
  width: 5px; height: 5px;
  margin-top: -2.5px;
  border-radius: 50%;
  background: rgba(148,163,184,.35);
  transition: background .18s, box-shadow .18s, transform .18s;
}
.admin-menu a:hover {
  background: rgba(255,255,255,.06);
  color: #f8fafc;
}
.admin-menu a:hover::before {
  background: rgba(147,197,253,.75);
  transform: scale(1.15);
}
.admin-menu a.active {
  color: #fff;
  background: linear-gradient(90deg, var(--sider-accent-soft) 0%, rgba(59,130,246,.06) 100%);
  box-shadow: inset 3px 0 0 var(--sider-accent);
}
.admin-menu a.active::before {
  background: #60a5fa;
  box-shadow: 0 0 8px rgba(96,165,250,.6);
}
.admin-menu a span { flex: 1; }

.sider-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(100,116,139,.9);
  border-top: 1px solid rgba(255,255,255,.06);
  background: rgba(0,0,0,.18);
}
.sider-footer-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34,197,94,.65);
  animation: sider-pulse 2.4s ease-in-out infinite;
}
@keyframes sider-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .65; transform: scale(.88); }
}

.admin-main { flex: 1; margin-left: var(--sider-w); display: flex; flex-direction: column; }
.admin-topbar {
  height: 48px; background: #fff; border-bottom: 1px solid #f0f0f0;
  display: flex; align-items: center; justify-content: space-between; padding: 0 24px;
  position: sticky; top: 0; z-index: 10;
}
.admin-topbar-right { display: flex; align-items: center; gap: 12px; }
.admin-search-wrap { position: relative; }
.admin-search-wrap input {
  width: 220px; padding: 6px 12px; border: 1px solid #d9d9d9; border-radius: 6px; font-size: 13px;
}
.admin-search-drop {
  display: none; position: absolute; top: 100%; right: 0; margin-top: 4px;
  width: 320px; max-height: 360px; overflow-y: auto; background: #fff;
  border: 1px solid #eee; border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.12); z-index: 100;
}
.admin-search-drop.open { display: block; }
.admin-search-drop a {
  display: block; padding: 10px 14px; font-size: 13px; color: #333; border-bottom: 1px solid #f5f5f5; cursor: pointer;
}
.admin-search-drop a:hover { background: #f5f9ff; }
.admin-search-type { display: inline-block; font-size: 11px; color: #1677ff; background: #e6f4ff; padding: 1px 6px; border-radius: 4px; margin-right: 6px; }
.admin-search-empty { padding: 16px; text-align: center; color: #999; font-size: 13px; }
.admin-content { padding: 20px 24px; }
.admin-panel { display: none; }
.admin-panel.active { display: block; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.panel-head h2 { font-size: 18px; margin: 0; border: none; padding: 0; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat-card { background: #fff; border-radius: 8px; padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.stat-card .n { font-size: 24px; font-weight: 700; color: #1677ff; }
.stat-card .l { font-size: 12px; color: #999; margin-top: 4px; }
.stat-card.warn .n { color: #fa8c16; }
.stat-card.ok .n { color: #52c41a; }
.update-card {
  background: #fff; border-radius: 8px; padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.06);
  border: 1px solid #e8e8e8; min-width: 220px;
}
.update-card.has-update { border-color: #91caff; background: linear-gradient(135deg, #f0f7ff, #fff); }
.update-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.update-card-title { font-size: 14px; font-weight: 600; color: #333; }
.update-card-ver { font-size: 12px; color: #1677ff; font-weight: 600; }
.update-card-msg { font-size: 12px; color: #666; line-height: 1.5; min-height: 18px; }
.update-card-log { font-size: 12px; color: #888; margin-top: 8px; max-height: 72px; overflow: auto; white-space: pre-wrap; }
.update-card-actions { margin-top: 12px; }
.system-status-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.toolbar { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; align-items: center; }
.toolbar input, .toolbar select { width: auto; margin: 0; min-width: 140px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.pf-field-hidden { display: none !important; }
.pf-stock-readonly input[type="number"]#pf-stock-qty {
  background: #f5f5f5;
  color: #666;
  cursor: not-allowed;
}
.pf-stock-hint {
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.6;
  margin-top: -4px;
}
.pf-stock-hint.upstream {
  background: #e6f4ff;
  border: 1px solid #91caff;
  color: #0958d9;
}
.pf-stock-hint.local {
  background: #f6ffed;
  border: 1px solid #b7eb8f;
  color: #389e0d;
}
.logo-upload-field label { display: block; margin-bottom: 6px; font-size: 13px; color: #555; }
.logo-upload-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.logo-upload-row input[type=text] { flex: 1; min-width: 200px; }
.logo-preview { display: none; margin-top: 8px; max-height: 56px; max-width: 220px; border: 1px solid #eee; border-radius: 6px; padding: 4px; background: #fafafa; }
.site-brand-tabs { display: flex; gap: 8px; margin-bottom: 16px; border-bottom: 1px solid #eee; padding-bottom: 8px; }
.site-brand-tab { border: none; background: none; padding: 6px 12px; cursor: pointer; color: #666; border-radius: 4px; }
.site-brand-tab.active { background: #e6f4ff; color: #1677ff; font-weight: 600; }
.site-brand-panel.hidden { display: none; }
.inline-form { background: #fafafa; padding: 16px; border-radius: 8px; margin-bottom: 16px; display: none; }
.inline-form.show { display: block; }
.desc-color-editor { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.desc-color-empty { font-size: 13px; color: #aaa; margin: 0; padding: 12px; background: #fafafa; border-radius: 8px; text-align: center; }
.desc-color-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px; background: #fafafa; border: 1px solid #eee; border-radius: 8px;
}
.desc-color-preview { font-size: 13px; line-height: 1.55; color: #333; min-height: 28px; }
.desc-preview-col {
  flex: 1; min-width: 200px; padding: 10px 12px; background: #fff;
  border: 2px solid #e6f4ff; border-radius: 8px;
}
.desc-preview-tip { font-size: 11px; color: #aaa; margin: 6px 0 0; }
.desc-scope-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.desc-scope-chip {
  height: 26px; padding: 0 10px; border: 2px solid #e8e8e8; border-radius: 6px;
  background: #fff; font-size: 12px; cursor: pointer; color: #555;
}
.desc-scope-chip:hover { border-color: #1677ff; }
.desc-scope-chip.active { border-color: #1677ff; background: #e6f4ff; color: #1677ff; font-weight: 600; }
.desc-font-select {
  flex: 1; min-width: 100px; height: 28px; padding: 2px 8px; font-size: 12px;
  border: 1px solid #d9d9d9; border-radius: 6px; background: #fff;
}
.desc-style-tools {
  flex: 0 1 220px; min-width: 200px; display: flex; flex-direction: column; gap: 8px;
  padding: 8px 10px; background: #fff; border: 1px dashed #d9d9d9; border-radius: 8px;
}
.desc-tool-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.desc-tool-group.desc-tool-art { align-items: flex-start; }
.desc-tool-label { font-size: 12px; color: #888; white-space: nowrap; min-width: 42px; }
.desc-size-select {
  flex: 1; min-width: 100px; height: 28px; padding: 2px 8px; font-size: 12px;
  border: 1px solid #d9d9d9; border-radius: 6px; background: #fff;
}
.desc-art-chips { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
.desc-art-chip {
  min-width: 40px; height: 26px; padding: 0 8px; border: 2px solid #e8e8e8; border-radius: 6px;
  background: #fff; font-size: 12px; cursor: pointer; color: #555; font-weight: 600;
  transition: all .15s;
}
.desc-art-chip:hover { border-color: #1677ff; }
.desc-art-chip.active { border-color: #1677ff; background: #e6f4ff; box-shadow: 0 0 0 1px #1677ff inset; }
.desc-color-chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; flex: 0 1 auto; }
.desc-chip {
  min-width: 36px; height: 28px; padding: 0 10px; border: 2px solid #e8e8e8; border-radius: 6px;
  background: #fff; font-size: 12px; cursor: pointer; color: #555; transition: all .15s;
}
.desc-chip::before {
  content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  margin-right: 4px; vertical-align: middle; background: var(--chip, #ccc);
}
.desc-chip:hover { border-color: #1677ff; }
.desc-chip.active { border-color: #1677ff; background: #e6f4ff; color: #1677ff; font-weight: 600; }
.desc-chip-custom { position: relative; display: inline-flex; align-items: center; gap: 4px; padding: 0 10px; }
.desc-chip-custom input[type=color] {
  position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer;
}
.desc-chip-custom span { pointer-events: none; font-size: 12px; }
.ticket-thread { max-height: 300px; overflow-y: auto; background: #fafafa; padding: 12px; border-radius: 8px; margin: 12px 0; }
.ticket-msg { margin-bottom: 10px; padding: 8px 12px; border-radius: 6px; background: #fff; font-size: 13px; }
.ticket-msg.admin { border-left: 3px solid #1677ff; }
.ticket-msg .meta { font-size: 11px; color: #999; margin-bottom: 4px; }

.registrar-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-bottom: 8px;
}
.registrar-toolbar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px;
}
.registrar-actions .reg-btn-del { border-color: #ff4d4f55; color: #ff7875; }
.registrar-actions .reg-btn-del:hover { border-color: #ff4d4f; color: #ff4d4f; background: #ff4d4f15; }

.plugin-toolbar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px;
}
.plugin-btn-del { border-color: #ff4d4f55 !important; color: #ff7875 !important; }
.plugin-btn-del:hover { border-color: #ff4d4f !important; color: #ff4d4f !important; background: #ff4d4f15 !important; }
.registrar-card {
  background: linear-gradient(145deg, #1a2332 0%, #0f1419 100%);
  border-radius: 12px; padding: 20px; color: #e8eaed;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
}
.registrar-card-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.registrar-card-head h4 { margin: 0; font-size: 18px; color: #fff; }
.reg-badges { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.reg-badge { font-size: 11px; padding: 2px 8px; border-radius: 4px; white-space: nowrap; }
.reg-badge-on { background: #52c41a33; color: #95de64; border: 1px solid #52c41a55; }
.reg-badge-off { background: #6663; color: #aaa; }
.reg-badge-prod { background: #ff4d4f33; color: #ff7875; border: 1px solid #ff4d4f55; }
.reg-badge-sandbox { background: #fa8c1633; color: #ffc069; }
.reg-badge-default { background: #1677ff33; color: #69b1ff; border: 1px solid #1677ff55; }
.registrar-balance { font-size: 28px; font-weight: 700; color: #fff; margin: 8px 0; }
.registrar-balance small { font-size: 14px; color: #888; font-weight: 400; }
.registrar-meta { font-size: 13px; color: #888; margin-bottom: 16px; }
.registrar-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.registrar-actions .btn { font-size: 12px; padding: 4px 10px; }
.registrar-actions .btn-outline { background: transparent; border-color: #444; color: #ccc; }
.registrar-actions .btn-outline:hover { border-color: #1677ff; color: #69b1ff; }

.domain-search-bar { display: flex; gap: 8px; margin-bottom: 12px; max-width: 560px; }
.domain-search-bar input { flex: 1; margin: 0; }
.domain-search-bar .btn-domain-query {
  height: 38px; padding: 0 22px; border: none; color: #fff; font-weight: 500; flex-shrink: 0;
  background: linear-gradient(135deg, #1677ff 0%, #4096ff 55%, #36cfc9 100%);
  box-shadow: 0 2px 8px rgba(22, 119, 255, .32);
}
.domain-search-bar .btn-domain-query:hover {
  background: linear-gradient(135deg, #4096ff 0%, #69b1ff 55%, #5cdbd3 100%);
  box-shadow: 0 4px 12px rgba(22, 119, 255, .42);
}

.sort-move-btns {
  display: inline-flex;
  gap: 2px;
  margin-right: 4px;
  vertical-align: middle;
}
.sort-move-btn {
  min-width: 28px;
  padding: 2px 6px !important;
  font-size: 12px;
  line-height: 1.2;
}
.sort-move-btn:disabled {
  opacity: .35;
  cursor: not-allowed;
}
.domain-result-table { width: 100%; margin-top: 12px; }
.domain-result-table .domain-avail { color: #52c41a; }
.domain-result-table .domain-taken { color: #999; }
.domain-result-empty { padding: 24px; text-align: center; color: #999; }
.domain-status-0 { color: #fa8c16; }
.domain-status-1 { color: #52c41a; }
.domain-status-2 { color: #ff4d4f; }
.domain-status-3 { color: #999; }
.domain-tip { font-size: 13px; color: #888; margin-bottom: 16px; line-height: 1.6; }
.domain-placeholder { padding: 32px; text-align: center; background: #fafafa; border-radius: 8px; color: #666; }
.domain-placeholder h4 { margin: 0 0 8px; color: #333; }

.husk-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.husk-stat { background: #fff; border-radius: 8px; padding: 16px 20px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.husk-stat .n { font-size: 28px; font-weight: 700; color: #1677ff; line-height: 1.2; }
.husk-stat .l { font-size: 13px; color: #888; margin-top: 4px; }
.husk-stat.ok .n { color: #52c41a; }
.husk-stat.warn .n { color: #fa8c16; }
.husk-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.husk-toolbar input { width: 180px; margin: 0; min-width: 120px; }
.husk-toolbar select { width: auto; margin: 0; min-width: 120px; }
.husk-toolbar-right { margin-left: auto; display: flex; gap: 8px; }
.batch-th, .batch-td { width: 40px; text-align: center; vertical-align: middle; }
.batch-th input, .batch-td input { cursor: pointer; width: 16px; height: 16px; }
.batch-tip { font-size: 12px; color: #888; }
.husk-table-wrap { overflow-x: auto; }
.husk-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.husk-table th { background: #fafafa; padding: 10px 12px; text-align: left; font-weight: 600; white-space: nowrap; }
.husk-table td { padding: 10px 12px; border-top: 1px solid #f0f0f0; vertical-align: middle; }
.husk-avatar { display: inline-flex; width: 32px; height: 32px; border-radius: 50%; background: #1677ff; color: #fff; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; }
.husk-tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.husk-tag-green { background: #f6ffed; color: #52c41a; border: 1px solid #b7eb8f; }
.husk-tag-orange { background: #fff7e6; color: #fa8c16; border: 1px solid #ffd591; }
.husk-tag-gray { background: #f5f5f5; color: #999; }
.husk-actions a { color: #1677ff; cursor: pointer; margin-right: 8px; font-size: 12px; text-decoration: none; }
.husk-actions a:hover { text-decoration: underline; }
.husk-actions a.danger { color: #ff4d4f; }
.husk-domains-cell { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: #666; }
.husk-switch { position: relative; display: inline-block; width: 36px; height: 20px; }
.husk-switch input { opacity: 0; width: 0; height: 0; }
.husk-switch span { position: absolute; inset: 0; background: #ccc; border-radius: 20px; cursor: pointer; transition: .2s; }
.husk-switch span:before { content: ''; position: absolute; width: 16px; height: 16px; left: 2px; bottom: 2px; background: #fff; border-radius: 50%; transition: .2s; }
.husk-switch input:checked + span { background: #1677ff; }
.husk-switch input:checked + span:before { transform: translateX(16px); }
.husk-dropdown { position: relative; display: inline-block; }
.husk-dropdown-menu { display: none; position: absolute; right: 0; top: 100%; z-index: 20; min-width: 140px; background: #fff; border: 1px solid #eee; border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,.12); padding: 4px 0; }
.husk-dropdown-menu.open { display: block; }
.husk-dropdown-menu a { display: block; padding: 8px 14px; font-size: 13px; color: #333; cursor: pointer; text-decoration: none; white-space: nowrap; }
.husk-dropdown-menu a:hover { background: #f5f5f5; }
.husk-dropdown-menu a.danger { color: #ff4d4f; }
.btn-outline { background: transparent; border: 1px solid #d9d9d9; color: #333; }
.btn-outline:hover { border-color: #1677ff; color: #1677ff; }
.husk-dropdown-sep { height: 1px; background: #f0f0f0; margin: 4px 0; }
.husk-table-wrap { overflow-x: auto; margin-top: 12px; }
.husk-actions a { margin-right: 10px; cursor: pointer; color: #1677ff; font-size: 13px; }
.husk-actions a.danger, .husk-link-danger { color: #ff4d4f !important; }
.husk-link-ok { color: #52c41a !important; cursor: pointer; margin-right: 10px; font-size: 13px; }
.husk-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 9999; display: none; align-items: center; justify-content: center; padding: 16px; }
.husk-modal-overlay.open { display: flex !important; }
.husk-modal { background: #1f1f1f; color: #eee; border-radius: 10px; width: 420px; max-width: 100%; box-shadow: 0 8px 32px rgba(0,0,0,.4); }
.husk-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid #333; }
.husk-modal-head h4 { margin: 0; font-size: 16px; }
.husk-modal-close { background: none; border: none; color: #999; font-size: 22px; cursor: pointer; line-height: 1; }
.husk-modal-body { padding: 20px; }
.husk-modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 16px; border-top: 1px solid #333; }
.stock-json-modal .husk-modal-body { max-height: 70vh; overflow: auto; }
.stock-detail-summary { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px 16px; margin-bottom: 14px; font-size: 13px; }
.stock-detail-summary span { display: block; color: #999; font-size: 12px; margin-bottom: 2px; }
.stock-json-tip { font-size: 12px; color: #999; margin: 0 0 8px; }
.stock-json-pre { background: #111; color: #d4d4d4; border: 1px solid #333; border-radius: 6px; padding: 12px; font-size: 12px; line-height: 1.5; overflow: auto; max-height: 360px; white-space: pre-wrap; word-break: break-all; margin: 0; }
.stock-json-extra { margin-top: 12px; font-size: 13px; color: #ccc; }
.stock-json-extra summary { cursor: pointer; margin-bottom: 8px; }
.pf-stock-actions { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-left: 6px; vertical-align: middle; }
.pf-stock-hint.upstream .btn { margin-top: 0; }
.husk-form-row { margin-bottom: 18px; }

/* ===== 商品分类树形视图 ===== */
.cat-view-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.cat-view-toolbar .cat-view-tip { font-size: 12px; color: #888; margin-left: auto; }
.cat-view-toggle { display: inline-flex; border: 1px solid #d9d9d9; border-radius: 6px; overflow: hidden; }
.cat-view-toggle button { border: none; background: #fff; padding: 5px 12px; font-size: 13px; cursor: pointer; color: #666; }
.cat-view-toggle button.active { background: #1677ff; color: #fff; }
.cat-tree-stats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.cat-stat-card { flex: 1; min-width: 120px; background: linear-gradient(135deg, #f0f5ff, #fff); border: 1px solid #d6e4ff; border-radius: 8px; padding: 12px 14px; }
.cat-stat-card .n { font-size: 22px; font-weight: 700; color: #1677ff; line-height: 1.2; }
.cat-stat-card .l { font-size: 12px; color: #888; margin-top: 4px; }
.cat-tree-list { display: flex; flex-direction: column; gap: 10px; }
.cat-tree-group { border: 1px solid #e8e8e8; border-radius: 10px; background: #fff; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.04); }
.cat-tree-group.open { border-color: #91caff; }
.cat-tree-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; user-select: none; background: #fafafa; transition: background .15s; }
.cat-tree-head:hover { background: #f0f5ff; }
.cat-tree-arrow { width: 16px; font-size: 11px; color: #999; transition: transform .2s; flex-shrink: 0; }
.cat-tree-group.open > .cat-tree-head .cat-tree-arrow { transform: rotate(90deg); color: #1677ff; }
.cat-tree-icon { font-size: 18px; line-height: 1; flex-shrink: 0; }
.cat-tree-title { font-size: 15px; font-weight: 600; color: #222; flex: 1; min-width: 0; }
.cat-tree-meta { font-size: 12px; color: #888; white-space: nowrap; }
.cat-tree-actions { display: flex; gap: 6px; flex-shrink: 0; }
.cat-tree-body { display: none; padding: 0 14px 14px 38px; border-top: 1px solid #f0f0f0; }
.cat-tree-group.open > .cat-tree-body { display: block; }
.cat-tree-sub { margin-top: 10px; border: 1px dashed #e8e8e8; border-radius: 8px; background: #fcfcfc; overflow: hidden; }
.cat-tree-sub.open > .cat-tree-sub-head .cat-tree-arrow { transform: rotate(90deg); color: #1677ff; }
.cat-tree-sub-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; cursor: pointer; }
.cat-tree-sub-head:hover { background: #eef5ff; }
.cat-tree-sub-title { font-size: 14px; font-weight: 500; color: #333; flex: 1; }
.cat-tree-products { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 12px 12px; }
.cat-tree-products.empty { padding: 8px 12px; }
.cat-prod-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; background: #fff; border: 1px solid #d9d9d9; border-radius: 20px; font-size: 12px; color: #333; cursor: default; transition: border-color .15s, box-shadow .15s; }
.cat-prod-chip:hover { border-color: #1677ff; box-shadow: 0 2px 6px rgba(22,119,255,.12); }
.cat-prod-chip .pid { color: #999; font-size: 11px; }
.cat-prod-chip .pname { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-prod-chip .pprice { color: #1677ff; font-weight: 500; }
.cat-prod-chip.off { opacity: .55; border-style: dashed; }
.cat-prod-chip .mv-out { border: none; background: none; color: #1677ff; cursor: pointer; font-size: 11px; padding: 0 2px; }
.cat-prod-chip .mv-out:hover { text-decoration: underline; }
.cat-tree-empty { color: #bbb; font-size: 12px; font-style: italic; padding: 4px 0; }
.cat-tree-orphan { margin-top: 14px; padding-top: 14px; border-top: 1px dashed #e8e8e8; }
.cat-tree-orphan-title { font-size: 13px; color: #888; margin-bottom: 10px; }

/* ===== 商品列表按分类分组 ===== */
.prod-group-list { display: flex; flex-direction: column; gap: 10px; }
.prod-cat-group { border: 1px solid #e8e8e8; border-radius: 10px; background: #fff; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.04); }
.prod-cat-group.open { border-color: #91caff; }
.prod-cat-head { display: flex; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer; user-select: none; background: linear-gradient(90deg, #fafafa, #fff); transition: background .15s; }
.prod-cat-head:hover { background: #f0f5ff; }
.prod-cat-group.open > .prod-cat-head { background: #f0f5ff; border-bottom: 1px solid #e6f4ff; }
.prod-cat-group.open > .prod-cat-head .cat-tree-arrow { transform: rotate(90deg); color: #1677ff; }
.prod-cat-title { font-size: 14px; font-weight: 600; color: #222; flex: 1; min-width: 0; }
.prod-cat-meta { font-size: 12px; color: #888; }
.prod-cat-head-actions { display: flex; gap: 6px; flex-shrink: 0; }
.prod-cat-body { display: none; overflow-x: auto; }
.prod-cat-group.open > .prod-cat-body { display: block; }
.prod-cat-body table { margin: 0; width: 100%; border-collapse: collapse; }
.prod-cat-body table tr:first-child td, .prod-cat-body table tr:first-child th { border-top: none; }
.prod-cat-body .prod-row:hover { background: #fafcff; }

@media (max-width: 768px) {
  .cat-tree-head { flex-wrap: wrap; }
  .cat-tree-meta { width: 100%; margin-left: 26px; }
  .cat-tree-actions { width: 100%; margin-left: 26px; margin-top: 4px; }
  .cat-tree-body { padding-left: 14px; }
}

.husk-form-row > label:first-child { display: block; margin-bottom: 8px; color: #aaa; font-size: 13px; }
.husk-radio { display: inline-flex; align-items: center; gap: 6px; margin-right: 20px; font-size: 14px; cursor: pointer; }
.husk-stepper { display: flex; align-items: center; gap: 8px; }
.husk-stepper button { width: 32px; height: 32px; border: 1px solid #444; background: #2a2a2a; color: #eee; border-radius: 6px; cursor: pointer; }
.husk-stepper input { width: 100px; padding: 6px 10px; border: 1px solid #444; background: #2a2a2a; color: #eee; border-radius: 6px; text-align: center; }
@media (max-width: 900px) { .husk-stats { grid-template-columns: repeat(2, 1fr); } }

/* ===== 手机 / 平板自适应（纯 CSS，不改业务逻辑） ===== */
.admin-sider-toggle {
  position: fixed;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
  margin: 0;
}
.admin-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-right: 4px;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  background: #fff;
  color: #333;
  cursor: pointer;
  flex-shrink: 0;
}
.admin-menu-btn svg { width: 20px; height: 20px; }
.admin-menu-btn .icon-close { display: none; }
.admin-search-icon-mobile { display: none; }
.admin-topbar-icon,
.admin-topbar-avatar { display: none; }
.admin-topbar-flag { display: none; }
.admin-topbar-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.admin-topbar-text-link { color: #1677ff; text-decoration: none; font-size: 13px; }
.admin-topbar-text-link:hover { text-decoration: underline; }
.admin-sider-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  cursor: pointer;
}

.dash-mobile-home { display: none; }

@media (max-width: 992px) {
  .admin-layout { --sider-w: 0; }
  .admin-body { background: var(--am-page-bg, #eef0f3); }

  .admin-menu-btn {
    display: inline-flex;
    border: none;
    background: transparent;
    color: var(--am-topbar-icon, #fff);
    width: 36px;
    height: 36px;
    margin-right: 0;
    padding: 0;
  }
  .admin-sider-toggle:checked ~ .admin-main .admin-menu-btn .icon-menu { display: none; }
  .admin-sider-toggle:checked ~ .admin-main .admin-menu-btn .icon-close { display: block; }

  .admin-topbar {
    height: auto;
    min-height: 52px;
    padding: 10px 12px;
    padding-top: max(10px, env(safe-area-inset-top));
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    background: var(--am-topbar-bg, linear-gradient(135deg, #1677ff 0%, #0958d9 100%));
    border-bottom: none;
    box-shadow: var(--am-topbar-shadow, 0 2px 8px rgba(9, 88, 217, .25));
  }
  .admin-topbar > strong { display: none; }
  .admin-topbar-right {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }
  .admin-search-wrap {
    order: 0;
    flex: 1;
    width: auto;
    margin: 0;
    position: relative;
  }
  .admin-search-icon-mobile {
    display: block;
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--am-topbar-icon, rgba(255, 255, 255, .85));
    pointer-events: none;
    z-index: 1;
  }
  .admin-search-wrap input {
    width: 100%;
    box-sizing: border-box;
    height: 36px;
    padding: 0 14px 0 36px;
    border-radius: 18px;
    border: 1px solid var(--am-search-border, rgba(255, 255, 255, .45));
    background: var(--am-search-bg, rgba(255, 255, 255, .12));
    color: var(--am-search-text, #fff);
    font-size: 14px;
  }
  .admin-search-wrap input::placeholder { color: var(--am-search-ph, rgba(255, 255, 255, .72)); }
  .admin-search-wrap input:focus {
    outline: none;
    background: rgba(255, 255, 255, .2);
    border-color: rgba(255, 255, 255, .65);
  }
  .admin-search-drop {
    left: 0;
    right: 0;
    width: auto;
    top: calc(100% + 6px);
  }
  .admin-topbar-text-link { display: none; }
  .admin-topbar-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
  }
  .admin-topbar-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: var(--am-topbar-icon, #fff);
    text-decoration: none;
    flex-shrink: 0;
  }
  .admin-topbar-icon svg { width: 20px; height: 20px; }
  .admin-topbar-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--am-avatar-bg, rgba(255, 255, 255, .22));
    color: var(--am-topbar-icon, #fff);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
  }

  .admin-sider {
    width: min(300px, 72vw);
    transform: translateX(-100%);
    transition: transform .28s ease;
    z-index: 200;
    background: var(--am-sider-bg, #fff);
    color: var(--am-sider-text, #333);
    border-right: 1px solid var(--am-sider-border, #eee);
    box-shadow: 4px 0 24px rgba(0, 0, 0, .12);
  }
  .admin-sider::before { display: none; }
  .sider-brand {
    background: var(--am-sider-bg, #fff);
    border-bottom: 1px solid var(--am-sider-border, #f0f0f0);
    padding: 16px 18px;
  }
  .sider-brand-mark {
    background: var(--am-accent-soft, #e6f4ff);
    border-color: #91caff;
    color: var(--am-accent, #1677ff);
    box-shadow: none;
  }
  .sider-brand-text strong { color: var(--am-sider-text, #1f1f1f); }
  .sider-brand-text small { color: var(--am-text-sub, #999); letter-spacing: .06em; text-transform: none; }
  .menu-section.open,
  .menu-section.has-active { background: var(--am-sider-hover, #fafafa); }
  .menu-section-head { color: var(--am-sider-text, #333); font-size: 14px; padding: 12px 14px; }
  .menu-section-head:hover { background: var(--am-sider-hover, #f5f5f5); color: var(--am-sider-active, #1677ff); }
  .menu-ico {
    background: var(--am-sider-hover, #f5f5f5);
    border-color: var(--am-sider-border, #eee);
    color: var(--am-sider-muted, #666);
  }
  .menu-section.open > .menu-section-head .menu-ico,
  .menu-section.has-active > .menu-section-head .menu-ico {
    background: var(--am-accent-soft, #e6f4ff);
    border-color: #91caff;
    color: var(--am-sider-active, #1677ff);
    box-shadow: none;
  }
  .menu-arrow { border-color: #bbb; width: 8px; height: 8px; }
  .menu-section.open .menu-arrow { border-color: var(--am-sider-active, #1677ff); }
  .admin-menu a {
    color: var(--am-sider-muted, #444);
    font-size: 14px;
    padding: 10px 12px 10px 42px;
  }
  .admin-menu a::before { background: #d9d9d9; left: 22px; }
  .admin-menu a:hover { background: var(--am-sider-hover, #f5f5f5); color: var(--am-sider-active, #1677ff); }
  .admin-menu a.active {
    color: var(--am-sider-active, #1677ff);
    background: var(--am-sider-active-bg, #e6f4ff);
    box-shadow: inset 3px 0 0 var(--am-sider-active, #1677ff);
  }
  .admin-menu a.active::before { background: var(--am-sider-active, #1677ff); }
  .sider-footer {
    background: var(--am-sider-hover, #fafafa);
    color: var(--am-text-sub, #999);
    border-top: 1px solid var(--am-sider-border, #f0f0f0);
    text-transform: none;
    letter-spacing: 0;
    font-size: 12px;
  }
  .sider-footer-dot { background: var(--am-accent, #1677ff); box-shadow: none; animation: none; }

  .admin-sider-backdrop { display: block; }
  .admin-sider-toggle:checked ~ .admin-sider-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
  .admin-sider-toggle:checked ~ .admin-sider {
    transform: translateX(0);
  }

  .admin-main {
    margin-left: 0;
    width: 100%;
    min-width: 0;
    background: var(--am-page-bg, #eef0f3);
  }

  .admin-content {
    padding: 12px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  /* 手机工作台首页（图1：未打开菜单） */
  .dash-mobile-home { display: block; }
  .dash-desktop-home { display: none; }
  .dash-mobile-greet {
    margin: 0 0 12px;
    padding: 4px 2px;
    text-align: center;
    font-size: 14px;
    color: var(--am-greet, #666);
    line-height: 1.6;
  }
  .dash-m-card {
    background: var(--am-card-bg, #fff);
    border-radius: 10px;
    box-shadow: var(--am-card-shadow, 0 1px 4px rgba(0, 0, 0, .06));
    margin-bottom: 12px;
    overflow: hidden;
  }
  .dash-m-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--am-card-head, #333);
  }
  .dash-m-dots {
    color: var(--am-text-sub, #bbb);
    font-size: 18px;
    line-height: 1;
    letter-spacing: 1px;
  }
  .dash-m-order-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid var(--am-grid-line, #f0f0f0);
  }
  .dash-m-order-cell {
    padding: 16px 12px 18px;
    text-align: center;
    border-right: 1px solid var(--am-grid-line, #f0f0f0);
    border-bottom: 1px solid var(--am-grid-line, #f0f0f0);
  }
  .dash-m-order-cell:nth-child(2n) { border-right: none; }
  .dash-m-order-cell:nth-last-child(-n+2) { border-bottom: none; }
  .dash-m-order-label {
    font-size: 13px;
    color: var(--am-text-muted, #666);
    margin-bottom: 10px;
    line-height: 1.4;
  }
  .dash-m-order-n {
    font-size: 28px;
    font-weight: 700;
    color: var(--am-accent, #1677ff);
    line-height: 1.2;
    margin-bottom: 6px;
  }
  .dash-m-order-sub {
    font-size: 12px;
    color: var(--am-text-sub, #999);
  }
  .dash-m-expire-body {
    padding: 8px 16px 18px;
    text-align: center;
    background: var(--am-expire-bg, linear-gradient(135deg, #fff7e6 0%, #fff 100%));
  }
  .dash-m-expire-n {
    font-size: 36px;
    font-weight: 700;
    color: var(--am-expire-accent, #fa8c16);
    line-height: 1.2;
    margin-bottom: 6px;
  }
  .dash-m-expire-sub {
    font-size: 13px;
    color: var(--am-text-muted, #666);
    margin-bottom: 12px;
  }
  .dash-m-expire-btn {
    display: inline-block;
    padding: 8px 20px;
    border: 1px solid var(--am-expire-accent, #fa8c16);
    border-radius: 20px;
    background: transparent;
    color: var(--am-expire-accent, #fa8c16);
    font-size: 13px;
    cursor: pointer;
  }
  .dash-m-todo-list {
    padding: 0 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .dash-m-todo-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    border: none;
    border-radius: 8px;
    background: var(--am-todo-bg, #f5f6f8);
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    color: var(--am-text, #333);
  }
  .dash-m-todo-ico {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
  }
  .dash-m-todo-blue { background: #e6f4ff; }
  .dash-m-todo-green { background: #f6ffed; }
  .dash-m-todo-orange { background: #fff7e6; }
  .dash-m-todo-purple { background: #f9f0ff; }
  .dash-m-todo-text { flex: 1; }
  .dash-m-todo-num {
    font-size: 16px;
    font-weight: 600;
    color: var(--am-accent, #1677ff);
    min-width: 24px;
    text-align: right;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .stat-card {
    padding: 20px 16px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
    border: none;
  }
  .stat-card .n { font-size: 32px; font-weight: 700; line-height: 1.2; }
  .stat-card .l { font-size: 13px; color: #666; margin-top: 6px; }
  .husk-stat { text-align: center; border-radius: 10px; }
  .husk-stat .n { font-size: 28px; }

  .form-grid { grid-template-columns: 1fr; }
  .panel-head { flex-wrap: wrap; gap: 8px; }
  .toolbar { gap: 6px; }
  .toolbar input, .toolbar select,
  .husk-toolbar input, .husk-toolbar select {
    min-width: 0;
    flex: 1 1 auto;
    max-width: 100%;
  }
  .husk-toolbar-right { margin-left: 0; width: 100%; }

  .admin-panel .card,
  .admin-content .card {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
    border: none;
  }
  .admin-panel .card h2 { font-size: 16px; color: #333; }

  .registrar-grid,
  .theme-grid { grid-template-columns: 1fr; }
  .domain-search-bar { max-width: none; flex-wrap: wrap; }

  .admin-body .container { padding: 0; margin: 0; max-width: none; }
  .login-box {
    margin: 0;
    max-width: none;
    border-radius: 0;
    min-height: 100vh;
    box-shadow: none;
    padding: 0;
    display: flex;
    flex-direction: column;
  }
  .login-box h2,
  .login-box .form-row,
  .login-box .login-extra-row,
  .login-box .login-hint,
  .login-box #login-msg,
  .login-box #forgot-msg,
  .login-box > button {
    padding-left: 20px;
    padding-right: 20px;
  }
  .login-box h2 {
    margin: 0;
    padding: 48px 20px 24px;
    background: linear-gradient(135deg, #1677ff 0%, #0958d9 100%);
    color: #fff;
    font-size: 20px;
    border: none;
  }
  .login-box .login-hint { padding-top: 16px; }
  .login-box > button { margin: 8px 20px 0; width: calc(100% - 40px) !important; }
  .login-box .login-extra-row { padding-bottom: 24px; }
}

@media (max-width: 480px) {
  .stat-card .n,
  .husk-stat .n { font-size: 28px; }
  .admin-panel .card .btn,
  .admin-panel .card .btn-sm {
    margin-bottom: 4px;
  }
}

/* 主题装修 */
.theme-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.theme-toolbar-hint { font-size: 12px; color: #888; }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.theme-card { border: 1px solid #303030; border-radius: 10px; overflow: hidden; background: #1a1a1a; transition: box-shadow .2s; }
.theme-card.is-default { border-color: #1677ff; box-shadow: 0 0 0 1px #1677ff; }
.theme-preview { height: 88px; display: flex; align-items: center; justify-content: center; font-size: 36px; }
.theme-card-body { padding: 14px; }
.theme-card-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.theme-card-title .badge { font-size: 11px; background: #1677ff; color: #fff; padding: 2px 8px; border-radius: 4px; margin-left: 6px; }
.theme-card-code { font-size: 12px; color: #888; margin-bottom: 6px; }
.theme-card-desc { font-size: 12px; color: #aaa; margin-bottom: 10px; line-height: 1.5; }
.theme-swatches { display: flex; gap: 6px; margin-bottom: 12px; }
.theme-swatches span { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #333; }
.theme-card-actions { display: flex; gap: 8px; }

/* 客户等级 / 信用额管理 */
.credit-mgmt-table .credit-level-select {
  min-width: 96px; padding: 4px 8px; border: 1px solid #d9d9d9; border-radius: 4px;
  font-size: 13px; background: #fff;
}
.credit-mgmt-table .credit-level-select:focus { border-color: #1677ff; outline: none; }
.credit-mgmt-table .credit-limit-input {
  padding: 4px 8px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 13px;
}
.credit-mgmt-table .credit-limit-input:focus { border-color: #1677ff; outline: none; }
.credit-level-tag {
  display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 4px;
  font-size: 12px; font-weight: 500; vertical-align: middle;
}
.credit-level-tag.level-tag-0 { background: #f5f5f5; color: #595959; }
.credit-level-tag.level-tag-1 { background: #f0f0f0; color: #8c8c8c; }
.credit-level-tag.level-tag-2 { background: #fff7e6; color: #d48806; }
.credit-level-tag.level-tag-3 { background: #f9f0ff; color: #722ed1; }
