/* ===== 企业浅色主题 ===== */
:root {
  --glass: #ffffff;
  --glass-strong: #ffffff;
  --glass-border: #ece9f8;
  --primary: #7c6cf6;
  --primary-dark: #6553e8;
  --primary-soft: #f2efff;
  --green: #16a34a;
  --amber: #d97706;
  --red: #e11d48;
  --cyan: #0891b2;
  --violet: #7c3aed;
  --text: #1f2937;
  --text-2: #4b5563;
  --text-3: #8a94a6;
  --shadow: 0 2px 6px rgba(139, 92, 246, .06), 0 6px 20px rgba(139, 92, 246, .07);
  --radius: 14px;
}

* { box-sizing: border-box; }

body.modal-open { overflow: hidden; }

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(160deg, #fdf4fb 0%, #f4f3fe 45%, #eef4ff 100%) fixed;
  color: var(--text);
  font-family: "Inter", -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

/* ===== 布局 ===== */
.layout { display: flex; min-height: 100vh; }

.sidebar, .sidebar.px-panel {
  width: 220px; flex-shrink: 0;
  display: flex; flex-direction: column; padding: 0 12px 14px;
  position: sticky; top: 0; height: 100vh;
  background: linear-gradient(180deg, #fdf6fd 0%, #f3f0ff 60%, #eef2ff 100%);
  border: 0; border-right: 1px solid #ece7fa;
  border-radius: 0; box-shadow: none;
}
.logo {
  display: flex; gap: 11px; align-items: center;
  margin: 14px 4px 16px; padding: 12px 6px 18px;
  border-bottom: 1px solid #ece7fa;
}
.logo-icon {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #f472b6, #8b5cf6 55%, #6366f1);
  box-shadow: 0 4px 14px rgba(139, 92, 246, .45);
  color: #fff; font-weight: 800; font-size: 17px;
}
.logo-text {
  font-weight: 800; font-size: 16px; letter-spacing: .6px; line-height: 1.25;
  background: linear-gradient(90deg, #ec4899, #8b5cf6);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.logo-text span { display: none; }
.menu-group {
  margin: 2px 10px 8px; font-size: 11px; letter-spacing: 2px;
  color: #b3a8d9; user-select: none;
}

#menu { display: flex; flex-direction: column; gap: 7px; }
.menu-item {
  display: flex; align-items: center; gap: 12px;
  padding: 7px 9px; cursor: pointer;
  text-decoration: none;
  color: #6d6490; border-radius: 13px; user-select: none;
  font-size: 13.5px; font-weight: 500; letter-spacing: .3px;
  transition: background .18s, color .18s, transform .18s, box-shadow .18s;
}
.menu-item svg {
  width: 30px; height: 30px; padding: 7px; flex-shrink: 0;
  border-radius: 10px; fill: currentColor;
  background: #fff; box-shadow: 0 1px 4px rgba(139, 92, 246, .15);
  transition: background .18s, fill .18s, transform .18s;
}
#menu .menu-item:nth-of-type(1) svg { fill: #0284c7; background: #e0f2fe; }
#menu .menu-item:nth-of-type(2) svg { fill: #db2777; background: #fce7f3; }
#menu .menu-item:nth-of-type(3) svg { fill: #7c3aed; background: #ede9fe; }
#menu .menu-item:nth-of-type(4) svg { fill: #d97706; background: #fef3c7; }
#menu .menu-item:nth-of-type(5) svg { fill: #16a34a; background: #dcfce7; }
.menu-item:hover:not(.active) {
  background: rgba(255, 255, 255, .85);
  color: var(--primary);
  transform: translateX(3px);
  box-shadow: 0 2px 10px rgba(139, 92, 246, .12);
}
.menu-item:hover:not(.active) svg { transform: scale(1.08); }
.menu-item.active {
  position: relative; overflow: hidden;
  background: linear-gradient(115deg, #f472b6, #c084fc 35%, #818cf8 70%, #f472b6);
  background-size: 280% 100%;
  animation: menu-flow 7s linear infinite;
  color: #fff; font-weight: 600;
  box-shadow: 0 8px 20px rgba(167, 139, 250, .55), inset 0 1px 0 rgba(255, 255, 255, .45);
}
@keyframes menu-flow {
  0% { background-position: 0% 0; }
  100% { background-position: 280% 0; }
}
.menu-item.active::before {
  content: ""; position: absolute; top: 0; left: -70%;
  width: 45%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .5), transparent);
  transform: skewX(-20deg);
  animation: menu-shine 3.2s ease-in-out infinite;
}
@keyframes menu-shine {
  0%, 55% { left: -70%; }
  85%, 100% { left: 130%; }
}
.menu-item.active::after {
  content: ""; position: absolute; right: 13px; top: 50%;
  width: 6px; height: 6px; margin-top: -3px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 8px rgba(255, 255, 255, .9);
  animation: menu-dot 1.6s ease-in-out infinite;
}
@keyframes menu-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: .6; }
}
#menu .menu-item.active svg,
.menu-item.active svg {
  fill: #fff !important; background: rgba(255, 255, 255, .24) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
  animation: icon-pop .4s cubic-bezier(.34, 1.56, .64, 1);
}
@keyframes icon-pop {
  0% { transform: scale(.6); }
  100% { transform: scale(1); }
}
.sidebar-foot { margin-top: auto; color: #b3a8d9; font-size: 11px; text-align: center; letter-spacing: .5px; }

.main { flex: 1; padding: 24px 28px 28px; min-width: 0; }
.page-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 19px; margin: 0 0 20px; font-weight: 700; letter-spacing: .2px;
}
.page-title::before {
  content: ""; width: 4px; height: 18px; border-radius: 2px;
  background: linear-gradient(180deg, #f472b6, #8b5cf6);
}

.blink { display: none; }

/* ===== 面板 ===== */
.px-panel {
  background: #fff;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.dash-recent { padding: 20px 22px; margin-top: 10px; }
.dash-recent h2 { margin: 0 0 14px; font-size: 15px; font-weight: 600; }

/* 旧的 settings-panel 已由 settings-card 取代 */

/* ===== 统计卡片 ===== */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat-box {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: box-shadow .15s, border-color .15s;
}
.stat-box:hover { border-color: #cdd8ef; box-shadow: 0 4px 18px rgba(23, 43, 99, .1); }
.stat-num { font-size: 26px; font-weight: 800; letter-spacing: -.5px; }
.stat-label { margin-top: 4px; color: var(--text-3); font-size: 12.5px; }
.stat-ico {
  width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 19px;
}
.stat-box.blue   .stat-num { color: var(--primary); }
.stat-box.blue   .stat-ico { background: rgba(79, 110, 247, .14); color: var(--primary); }
.stat-box.amber  .stat-num { color: var(--amber); }
.stat-box.amber  .stat-ico { background: rgba(217, 119, 6, .13); color: var(--amber); }
.stat-box.green  .stat-num { color: var(--green); }
.stat-box.green  .stat-ico { background: rgba(22, 163, 74, .13); color: var(--green); }
.stat-box.red    .stat-num { color: var(--red); }
.stat-box.red    .stat-ico { background: rgba(225, 29, 72, .12); color: var(--red); }
.stat-box.cyan   .stat-num { color: var(--cyan); }
.stat-box.cyan   .stat-ico { background: rgba(8, 145, 178, .13); color: var(--cyan); }
.stat-box.violet .stat-num { color: var(--violet); }
.stat-box.violet .stat-ico { background: rgba(124, 58, 237, .13); color: var(--violet); }

/* ===== 工具栏 ===== */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar .search { flex: 1; min-width: 220px; }

.px-input {
  padding: 9px 13px; color: var(--text);
  background: #fff;
  border: 1px solid #d7deea; border-radius: 8px;
  outline: none; font-family: inherit; font-size: 13.5px;
  transition: border-color .15s, box-shadow .15s;
}
.px-input::placeholder { color: var(--text-3); }
input.px-input, select.px-input { height: 36px; padding-top: 0; padding-bottom: 0; }
.px-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124, 108, 246, .16); }
select.px-input option { background: #fff; }

/* ===== 自定义下拉框 ===== */
.px-select { position: relative; display: inline-block; min-width: 128px; }
.px-select > select { display: none; }
.px-select-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  height: 36px; padding: 0 13px 0 14px; cursor: pointer;
  font-family: inherit; font-size: 13.5px; color: var(--text);
  background: #fff; border: 1px solid #d7deea; border-radius: 8px;
  transition: border-color .15s, box-shadow .15s;
}
.px-select-btn:hover { border-color: #b9c6e0; }
.px-select.open .px-select-btn { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124, 108, 246, .16); }
.px-select-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.px-select-arrow { width: 16px; height: 16px; fill: var(--text-3); flex-shrink: 0; transition: transform .18s; }
.px-select.open .px-select-arrow { transform: rotate(180deg); }
.px-select-menu {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60;
  display: none; padding: 5px; max-height: 300px; overflow-y: auto;
  background: #fff;
  border: 1px solid var(--glass-border); border-radius: 8px;
  box-shadow: 0 10px 30px rgba(23, 43, 99, .12);
}
.px-select.open .px-select-menu { display: block; }
.px-select-opt {
  padding: 8px 12px; border-radius: 8px; cursor: pointer;
  font-size: 13px; color: var(--text-2); white-space: nowrap;
}
.px-select-opt:hover { background: #f2f5fa; color: var(--primary); }
.px-select-opt.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }

.px-btn {
  height: 36px; padding: 0 15px; cursor: pointer; color: var(--text-2);
  background: #fff;
  border: 1px solid #d7deea; border-radius: 8px;
  font-family: inherit; font-size: 13.5px; font-weight: 500; user-select: none;
  transition: all .15s;
}
.px-btn:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); }
.px-btn.primary {
  background: linear-gradient(135deg, #d8b4fe, #a78bfa 55%, #818cf8);
  border-color: transparent; color: #fff;
  box-shadow: 0 3px 10px rgba(167, 139, 250, .4);
}
.px-btn.primary:hover { background: linear-gradient(135deg, #c084fc, #8b5cf6 55%, #6366f1); border-color: transparent; color: #fff; }
.px-btn.danger { color: var(--red); }
.px-btn.danger:hover { border-color: rgba(225, 29, 72, .45); background: rgba(255, 240, 244, .8); color: var(--red); }

/* ===== 表格 ===== */
.table-wrap { overflow-x: auto; }
.px-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: #fff;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow);
}
.dash-recent .px-table { box-shadow: none; }
.px-table th, .px-table td { padding: 13px 16px; text-align: left; border-bottom: 1px solid #edf1f7; }
.px-table th {
  background: #faf8ff; color: #7d739f; font-weight: 600;
  font-size: 12.5px;
}
.px-table td { color: var(--text-2); }
.px-table td:first-child { color: var(--text-3); }
.px-table tbody tr:last-child td { border-bottom: none; }
.px-table tbody tr { transition: background .12s; }
.px-table tbody tr:hover td { background: #faf8ff; }

/* ===== 状态徽章 ===== */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 11px; border-radius: 99px; font-size: 12px; font-weight: 500;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.success  { color: var(--green);  background: rgba(22, 163, 74, .13); }
.badge.failed   { color: var(--red);    background: rgba(225, 29, 72, .12); }
.badge.unused   { color: var(--cyan);   background: rgba(8, 145, 178, .13); }
.badge.used     { color: var(--green);  background: rgba(22, 163, 74, .13); }
.badge.banned   { color: var(--red);    background: rgba(225, 29, 72, .12); }
.badge.credited { color: var(--green);  background: rgba(22, 163, 74, .13); }
.badge.invalid  { color: var(--red);    background: rgba(225, 29, 72, .12); }

/* ===== 分页 ===== */
.pager { display: flex; align-items: center; gap: 6px; justify-content: center; margin: 18px 0; }
.pg-btn {
  min-width: 32px; height: 32px; padding: 0 8px; cursor: pointer;
  font-family: inherit; font-size: 13px; color: var(--text-2);
  background: #fff; border: 1px solid #d7deea; border-radius: 7px;
  transition: border-color .15s, color .15s, background .15s;
}
.pg-btn:hover:not([disabled]):not(.active) { border-color: var(--primary); color: var(--primary); }
.pg-btn.active {
  background: var(--primary);
  border-color: var(--primary); color: #fff; font-weight: 700; cursor: default;
}
.pg-btn[disabled] { opacity: .4; cursor: default; }
.pg-dots { color: var(--text-3); padding: 0 2px; font-size: 12px; letter-spacing: 1px; }

/* ===== 弹窗 ===== */
.modal-mask {
  position: fixed; inset: 0; background: rgba(23, 32, 60, .4);
  display: flex; align-items: center; justify-content: center; z-index: 10;
}
.modal {
  width: 480px; max-width: 92vw; padding: 28px 32px 26px; max-height: 90vh; overflow-y: auto;
  background: #fff;
  border: 1px solid var(--glass-border); border-radius: 14px;
  box-shadow: 0 20px 60px rgba(23, 43, 99, .2);
}
.modal h2 { margin: 0 0 22px; font-size: 18px; font-weight: 700; letter-spacing: .2px; }
.modal label {
  display: block; margin: 15px 0 7px; color: var(--text-2);
  font-size: 12.5px; font-weight: 600; letter-spacing: .3px;
}
.modal label:first-of-type { margin-top: 0; }
.modal .px-input { width: 100%; }
.modal .px-select { display: block; width: 100%; }

.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 26px; }
.modal-actions .px-btn { padding: 0 22px; }

.import-sub { margin: -14px 0 14px; font-size: 12.5px; color: var(--text-3); }
.import-sub code, .import-formats code {
  font-family: Consolas, Menlo, monospace; font-size: 12px;
  color: var(--primary); background: rgba(79, 110, 247, .1);
  padding: 1px 7px; border-radius: 6px;
}
.import-formats {
  display: flex; flex-direction: column; gap: 7px; align-items: flex-start;
  margin: 0 0 14px; padding: 13px 15px; border-radius: 10px;
  background: #f7f9fc; border: 1px solid #edf1f7;
}
.import-textarea {
  font-family: Consolas, Menlo, monospace; font-size: 12.5px; line-height: 1.7;
  resize: none;
}
.import-count { margin-right: auto; font-size: 12.5px; color: var(--text-3); }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; padding: 0; margin-right: 2px;
  border: none; border-radius: 9px; cursor: pointer;
  color: var(--text-3); background: transparent;
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: rgba(79, 110, 247, .12); color: #4f6ef7; }
.icon-btn.danger:hover { background: rgba(240, 80, 90, .12); color: #f0505a; }

.col-check { width: 46px; text-align: center; padding-left: 16px; }
.col-check input {
  -webkit-appearance: none; appearance: none; margin: 0;
  width: 18px; height: 18px; cursor: pointer; vertical-align: middle;
  border: 1.5px solid #c3cddf; border-radius: 5px;
  background: #fff;
  transition: all .15s; position: relative;
}
.col-check input:hover { border-color: var(--primary); }
.col-check input:checked {
  background: var(--primary);
  border-color: var(--primary);
}
.col-check input:checked::after {
  content: ''; position: absolute; left: 5px; top: 1.5px;
  width: 4px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.px-table tr.row-sel td { background: var(--primary-soft); }

.provider-tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1.6;
  color: #2563eb; background: rgba(79, 110, 247, .12);
  border: 1px solid rgba(79, 110, 247, .18);
}
.provider-tag::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: #4f6ef7;
}

.batch-bar {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px; padding: 10px 12px 10px 18px;
  background: var(--primary-soft);
  border: 1px solid #d4e0f7;
  border-radius: 10px;
  animation: batch-in .18s ease;
}
@keyframes batch-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.batch-bar #mb-batch-count {
  margin-right: auto; font-weight: 600; font-size: 13.5px; color: var(--primary);
  display: inline-flex; align-items: center; gap: 7px;
}
.batch-bar #mb-batch-count::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary);
}
.batch-bar .px-btn {
  height: 32px; padding: 0 16px; border: 0; border-radius: 8px; font-size: 13px; font-weight: 500;
}
.batch-bar .px-btn:not(.primary):not(.danger):not(.ghost) {
  background: var(--primary);
  color: #fff;
}
.batch-bar .px-btn:not(.primary):not(.danger):not(.ghost):hover {
  filter: brightness(1.06); color: #fff;
}
.batch-bar .px-btn.danger {
  background: rgba(240, 80, 90, .12); color: #e11d48; box-shadow: none;
}
.batch-bar .px-btn.danger:hover { background: rgba(240, 80, 90, .2); color: #e11d48; }
.batch-bar .px-btn.ghost {
  background: transparent; color: var(--text-3); box-shadow: none;
}
.batch-bar .px-btn.ghost:hover { background: rgba(120, 130, 160, .14); color: var(--text-2); }
.px-btn.ghost { background: transparent; color: var(--text-2); }
.import-textarea.drag {
  background: rgba(79, 110, 247, .08);
  box-shadow: 0 0 0 3.5px rgba(79, 110, 247, .2);
}

/* ===== Toast ===== */
.toast {
  position: fixed; top: 24px; left: 50%; transform: translateX(-50%);
  background: #fff;
  border: 1px solid rgba(22, 163, 74, .4); color: var(--green);
  padding: 11px 22px; border-radius: 10px; font-weight: 500;
  box-shadow: 0 10px 30px rgba(23, 43, 99, .15); z-index: 20;
}
.toast.err { border-color: rgba(225, 29, 72, .4); color: var(--red); }

/* ===== 邮箱七态徽章 ===== */
.badge.unverified      { color: var(--amber);  background: rgba(217, 119, 6, .13); }
.badge.verifying       { color: var(--cyan);   background: rgba(8, 145, 178, .13); }
.badge.verify_failed   { color: var(--red);    background: rgba(225, 29, 72, .12); }
.badge.verified        { color: var(--green);  background: rgba(22, 163, 74, .13); }

/* ===== 账户生产态徽章 ===== */
.badge.pending         { color: var(--amber);  background: rgba(217, 119, 6, .13); }
.badge.registering     { color: var(--cyan);   background: rgba(8, 145, 178, .13); }
.badge.registered      { color: var(--green);  background: rgba(22, 163, 74, .13); }
.badge.register_failed { color: var(--red);    background: rgba(225, 29, 72, .12); }
.badge.already_registered { color: var(--amber); background: rgba(217, 119, 6, .13); }

/* ===== 生产进度条 ===== */
.produce-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 18px; margin-bottom: 16px; border-radius: 14px;
  background: var(--panel, #fff); border: 1px solid var(--border, #e6e8ef);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.produce-stat { display: flex; align-items: baseline; gap: 6px; }
.produce-num { font-size: 22px; font-weight: 700; color: var(--text-1, #1f2430); line-height: 1; }
.produce-num.running { color: var(--cyan); }
.produce-num.ok { color: var(--green); }
.produce-num.bad { color: var(--red); }
.produce-lbl { font-size: 13px; color: var(--text-3, #8a90a2); }
.produce-dot { color: var(--text-3, #c4c9d6); font-weight: 700; }
.produce-msg { flex: 1; min-width: 120px; font-size: 12.5px; color: var(--text-3, #8a90a2); }
.produce-actions { display: flex; gap: 8px; margin-left: auto; }

/* ===== 生产数量输入 ===== */
.produce-field { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; }
.produce-field > span { font-size: 13.5px; color: var(--text-2, #4a5266); font-weight: 500; }

/* ===== 日志弹窗 ===== */
.log-body {
  max-height: 60vh; overflow: auto; margin: 12px 0 0;
  padding: 14px 16px; border-radius: 10px;
  background: #0f1420; color: #d6dbe6;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px; line-height: 1.7; white-space: pre-wrap; word-break: break-all;
}
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }

/* ===== 浏览器下载横幅 ===== */
.browser-banner {
  background: linear-gradient(90deg, #eef2ff, #f5f3ff);
  border: 1px solid #dfe3ff; border-radius: 12px;
  padding: 14px 18px; margin-bottom: 18px;
}
.browser-banner.err { background: #fef2f2; border-color: #fecaca; }
.bb-row { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #4338ca; font-weight: 600; }
.browser-banner.err .bb-row { color: #b91c1c; }
.bb-ico { font-size: 16px; }
.bb-msg { flex: 1; }
.bb-pct { font-variant-numeric: tabular-nums; }
.bb-progress { height: 8px; border-radius: 999px; background: #e0e3f5; overflow: hidden; margin-top: 10px; }
.bb-progress-bar { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #6366f1, #818cf8); transition: width .4s ease; }
.browser-banner.err .bb-progress { display: none; }

/* ===== 仪表盘 ===== */
.dash-panel-title, .dash-produce h2, .dash-grid .px-panel h2, .dash-recent h2 {
  margin: 0 0 16px; font-size: 15px; font-weight: 700; color: var(--text); letter-spacing: .2px;
}

/* 生产任务 */
.dash-produce { padding: 20px 22px; margin-bottom: 16px; }
.dash-produce-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.dash-produce-head h2 { margin: 0; }
.dash-produce-state {
  font-size: 12px; font-weight: 600; padding: 4px 13px; border-radius: 999px;
  color: var(--text-3); background: rgba(138, 144, 162, .12);
}
.dash-produce-state.on { color: var(--green); background: rgba(22, 163, 74, .14); }
.dash-produce-body { display: flex; align-items: center; gap: 24px; }
@media (max-width: 760px) { .dash-produce-body { flex-direction: column; align-items: stretch; gap: 16px; } }

.dp-main { flex: 0 0 auto; text-align: center; padding-right: 22px; border-right: 1px solid var(--glass-border); }
.dp-main-num { display: flex; align-items: baseline; gap: 4px; justify-content: center; }
.dp-main-num b { font-size: 34px; font-weight: 800; color: var(--green); letter-spacing: -1px; line-height: 1; }
.dp-main-num i { font-size: 18px; font-style: normal; color: var(--text-3); }
.dp-main-lbl { margin-top: 6px; font-size: 12px; color: var(--text-3); }

.dash-progress-wrap { flex: 1; min-width: 0; }
.dash-progress { height: 10px; border-radius: 999px; background: #eef0f5; overflow: hidden; }
.dash-progress-bar { height: 100%; border-radius: 999px; transition: width .5s ease; background: linear-gradient(90deg, #16a34a, #34d399); }
.dash-produce-msg { margin-top: 10px; font-size: 12.5px; color: var(--text-3); min-height: 16px; }

.dp-pills { display: flex; gap: 10px; flex: 0 0 auto; }
.dp-pill {
  min-width: 66px; padding: 10px 12px; border-radius: 12px; text-align: center;
  background: #f6f7fb; border: 1px solid var(--glass-border);
}
.dp-pill b { display: block; font-size: 20px; font-weight: 700; line-height: 1.1; }
.dp-pill span { font-size: 11px; color: var(--text-3); }
.dp-pill.amber b { color: var(--amber); }
.dp-pill.amber { background: rgba(217, 119, 6, .07); border-color: rgba(217, 119, 6, .18); }
.dp-pill.cyan b { color: var(--cyan); }
.dp-pill.cyan { background: rgba(8, 145, 178, .07); border-color: rgba(8, 145, 178, .18); }
.dp-pill.red b { color: var(--red); }
.dp-pill.red { background: rgba(225, 29, 72, .06); border-color: rgba(225, 29, 72, .16); }

.dash-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
@media (max-width: 980px) { .dash-grid { grid-template-columns: 1fr; } }
.dash-grid .px-panel { padding: 20px 22px; }

/* 环形图 */
.donut-wrap { display: flex; align-items: center; gap: 22px; }
.donut {
  width: 132px; height: 132px; border-radius: 50%; flex: 0 0 auto;
  background: conic-gradient(#eef0f5 0 100%); display: grid; place-items: center;
}
.donut-hole { width: 90px; height: 90px; border-radius: 50%; background: #fff; display: grid; place-items: center; text-align: center; box-shadow: inset 0 0 0 1px #f0f2f7; }
.donut-total { font-size: 28px; font-weight: 800; color: var(--text); line-height: 1; }
.donut-sub { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.donut-legend { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.lg-item { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-2); }
.lg-dot { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; }
.lg-item b { margin-left: auto; color: var(--text); font-weight: 600; }
.lg-pct { color: var(--text-3); width: 36px; text-align: right; font-size: 12px; }

/* 柱状图 */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding-top: 6px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 5px; }
.bar-val { font-size: 12px; font-weight: 700; color: var(--text-2); }
.bar { width: 66%; max-width: 32px; border-radius: 7px 7px 0 0; background: linear-gradient(180deg, #818cf8, #6366f1); min-height: 4px; transition: height .4s ease; }
.bar-lbl { font-size: 11px; color: var(--text-3); }

/* 小列表 */
.mini-rows { display: flex; flex-direction: column; }
.mini-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 2px; border-bottom: 1px solid #f0f2f7; font-size: 13.5px; color: var(--text-2); }
.mini-row:last-child { border-bottom: none; }
.mini-row b { color: var(--text); font-weight: 700; }
.mini-title { font-size: 12.5px; color: var(--text-3); margin: 18px 0 4px; font-weight: 700; letter-spacing: .3px; }
.mini-empty { font-size: 13px; color: var(--text-3); padding: 10px 2px; }
.dash-recent .px-table { margin-top: 2px; }
/* ===== 登录页 ===== */
.login-body {
  display: block; overflow: hidden; position: relative;
  background: radial-gradient(1200px 600px at 15% -10%, #efeaff 0%, transparent 55%),
              radial-gradient(1000px 620px at 100% 110%, #e6f0ff 0%, transparent 55%),
              linear-gradient(160deg, #f7f5ff 0%, #f1f4fb 50%, #eef4ff 100%);
}
/* 背景柔光装饰 */
.login-body::before, .login-body::after {
  content: ""; position: fixed; border-radius: 50%; filter: blur(20px);
  pointer-events: none; z-index: 0;
}
.login-body::before {
  width: 420px; height: 420px; top: -120px; left: -120px;
  background: radial-gradient(circle, rgba(124, 108, 246, .28), transparent 70%);
}
.login-body::after {
  width: 460px; height: 460px; right: -140px; bottom: -160px;
  background: radial-gradient(circle, rgba(8, 145, 178, .20), transparent 70%);
}
.login-wrap {
  position: relative; z-index: 1;
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 20px;
}
.login-card {
  width: 400px; max-width: 92vw;
  padding: 40px 40px 36px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 20px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset,
              0 18px 48px rgba(79, 70, 160, .16),
              0 6px 16px rgba(79, 70, 160, .08);
}
.login-head {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 14px; padding-bottom: 26px;
}
.login-logo {
  width: 58px; height: 58px; border-radius: 16px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 800; color: #fff; letter-spacing: .5px;
  background: linear-gradient(135deg, #8b7bff 0%, #6553e8 100%);
  box-shadow: 0 10px 22px rgba(101, 83, 232, .38);
}
.login-title { font-size: 20px; font-weight: 700; color: var(--text); letter-spacing: .2px; }
.login-desc { margin-top: 5px; font-size: 13px; color: var(--text-3); }
.login-form { margin-top: 4px; text-align: left; }
.login-label {
  display: block; margin: 0 0 8px; color: var(--text-2);
  font-size: 13px; font-weight: 600;
}
.login-input {
  width: 100%; height: 46px; font-size: 14px;
  border-radius: 12px; background: #fff;
}
.login-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(124, 108, 246, .18);
}
.login-btn {
  width: 100%; margin-top: 24px; padding: 13px 0; font-size: 15px; font-weight: 600;
  color: #fff; border: none; border-radius: 12px; cursor: pointer;
  font-family: inherit; letter-spacing: .5px;
  background: linear-gradient(135deg, #8b7bff 0%, #6553e8 100%);
  box-shadow: 0 10px 24px rgba(101, 83, 232, .32);
  transition: transform .12s ease, box-shadow .18s ease, filter .18s ease;
}
.login-btn:hover { filter: brightness(1.05); box-shadow: 0 14px 30px rgba(101, 83, 232, .42); transform: translateY(-1px); }
.login-btn:active { transform: translateY(0); box-shadow: 0 6px 16px rgba(101, 83, 232, .3); }
.login-copyright { color: var(--text-3); font-size: 12px; }
.login-hint { margin-top: 20px; color: var(--text-3); font-size: 12px; }

/* ===== 侧边栏退出 ===== */
.logout-item { margin-top: auto; }

/* ===== 系统设置页 ===== */
.page-sub { margin: -6px 0 22px; color: var(--text-3); font-size: 13.5px; }
.settings-grid { display: flex; flex-direction: column; gap: 20px; }
.settings-card { padding: 24px 26px 20px; }
.settings-head { display: flex; align-items: center; gap: 13px; margin-bottom: 20px; }
.settings-head h2 { margin: 0; font-size: 16px; font-weight: 700; color: var(--text-1); }
.settings-head p { margin: 2px 0 0; font-size: 12.5px; color: var(--text-3); }
.settings-icon {
  flex: none; width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.settings-icon svg { width: 20px; height: 20px; }
.settings-icon.blue { background: var(--primary); }
.settings-icon.violet { background: #8b5cf6; }
.settings-icon.amber { background: #f59e0b; }

.field { margin-bottom: 16px; }
.field-label-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.field-label-row > label { margin-bottom: 0; }
.count-badge {
  font-size: 11.5px; font-weight: 600; color: var(--primary); line-height: 1;
  background: rgba(79, 110, 247, .1); padding: 5px 10px; border-radius: 999px;
}
.field > label { display: block; margin-bottom: 6px; color: var(--text-2); font-size: 13px; font-weight: 600; }
.field-hint { display: block; margin: -2px 0 9px; color: var(--text-3); font-size: 11.5px; line-height: 1.5; }
.settings-card .px-input { width: 100%; }
.settings-card textarea.px-input { resize: none; font-family: inherit; line-height: 1.6; }
.proxy-textarea { font-weight: 700; font-size: 12.5px; }
.input-suffix { position: relative; }
.input-suffix .suffix {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-3); font-size: 13px; pointer-events: none;
}
.input-suffix .px-input { padding-right: 34px; }

.settings-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* 自定义开关 */
.switch-row {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  margin-bottom: 18px; user-select: none;
}
.switch-row input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-ui {
  position: relative; width: 40px; height: 22px; border-radius: 999px;
  background: rgba(120,130,160,.28); transition: background .2s ease; flex: none;
}
.switch-ui::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.2);
  transition: transform .2s ease;
}
.switch-row input:checked + .switch-ui { background: var(--primary); }
.switch-row input:checked + .switch-ui::after { transform: translateX(18px); }
.switch-label { font-size: 13.5px; color: var(--text-2); font-weight: 500; }
/* 表格出库列：开关垂直/水平居中 */
.ship-cell { text-align: center; }
.ship-cell .switch-row { margin-bottom: 0; vertical-align: middle; }

/* 代理测试结果 */
.proxy-result {
  display: flex; align-items: center; gap: 8px;
  margin-top: 4px; padding: 10px 14px; border-radius: 10px; font-size: 13px;
}
.proxy-result.testing { background: rgba(120,130,160,.1); color: var(--text-2); }
.proxy-result.ok { background: rgba(34,197,94,.12); color: #16a34a; }
.proxy-result.ok b { color: #15803d; }
.proxy-result.fail { background: rgba(240,80,90,.1); color: #e11d48; word-break: break-all; }
.proxy-result .spinner {
  width: 15px; height: 15px; border-radius: 50%; flex: none;
  border: 2px solid rgba(120,130,160,.3); border-top-color: var(--primary);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 取件弹窗 ===== */
.mail-modal {
  width: 980px; max-width: 96vw; height: 660px; max-height: 92vh;
  display: flex; flex-direction: column; padding: 0; overflow: hidden;
  background: #fff;
}
.mail-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 22px;
  background: #fff; border-bottom: 1px solid var(--glass-border);
  color: var(--text);
}
.mail-head h2 { margin: 0; font-size: 16px; color: var(--text); }
.mail-sub { color: var(--text-3); font-size: 12px; margin-top: 3px; }
.mail-body { flex: 1; display: flex; min-height: 0; }
.mail-list {
  width: 310px; flex-shrink: 0; overflow-y: auto;
  scrollbar-width: none;
  border-right: 1px solid rgba(31, 38, 90, .08);
  background: #f6f7fb; padding: 10px;
}
.mail-list::-webkit-scrollbar { width: 0; height: 0; }
.mail-item {
  padding: 11px 13px; border-radius: 10px; cursor: pointer; margin-bottom: 7px;
  background: #fff; border: 1px solid rgba(31, 38, 90, .07);
  box-shadow: 0 1px 3px rgba(31, 38, 90, .05);
  transition: border-color .15s, box-shadow .15s;
}
.mail-item:hover { border-color: rgba(79, 110, 247, .4); }
.mail-item.active {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.mail-item-from { font-weight: 600; font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-item-subject { font-size: 12px; color: var(--text-2); margin: 3px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-item-time { font-size: 11px; color: var(--text-3); }
.mail-otp {
  display: inline-block; padding: 1px 7px; border-radius: 6px;
  background: rgba(22, 163, 74, .12); color: var(--green); font-weight: 700;
}
.mail-empty { color: var(--text-3); font-size: 13px; text-align: center; padding: 34px 10px; }
.mail-empty.err { color: var(--red); }
.mail-detail { flex: 1; display: flex; flex-direction: column; min-width: 0; background: #fff; }
.mail-meta { padding: 14px 20px; border-bottom: 1px solid rgba(31, 38, 90, .08); background: #fbfcfe; }
.mail-meta:empty { display: none; }
.mail-subject { font-weight: 700; font-size: 15px; color: var(--text); }
.mail-from { font-size: 12px; color: var(--text-2); margin-top: 5px; }
.mail-time { font-size: 11px; color: var(--text-3); margin-top: 2px; }
#mail-frame { flex: 1; width: 100%; border: 0; background: #fff; }
