:root {
  --bg: #f4f6fb;
  --card: #fff;
  --line: #e4e8f0;
  --text: #1d2433;
  --muted: #7a8499;
  --primary: #3d6cff;
  --primary-2: #2f54d0;
  --ok: #16a34a;
  --warn: #d97706;
  --err: #dc2626;
  --radius: 12px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.6 "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}
.hidden { display: none !important; }

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(135deg, #eaf0ff 0%, #f7f9ff 60%, #eef6ff 100%);
}
.login-card {
  width: 400px;
  max-width: 100%;
  background: var(--card);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 18px 50px rgba(35, 60, 140, .12);
}
.login-card h1 { margin: 0 0 4px; font-size: 24px; }
.login-card .sub { color: var(--muted); margin: 0 0 20px; font-size: 12px; }
.tabs-mini { display: flex; gap: 8px; margin-bottom: 16px; }
.tab-mini {
  flex: 1; padding: 8px; border: 1px solid var(--line); background: #fff;
  border-radius: 8px; cursor: pointer; font-weight: 600;
}
.tab-mini.active { background: var(--primary); color: #fff; border-color: var(--primary); }
form input, form textarea, form select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  margin-bottom: 12px; font: inherit; background: #fff; color: var(--text);
}
textarea { min-height: 84px; resize: vertical; }
form input:focus, form textarea:focus, form select:focus { outline: none; border-color: var(--primary); }

.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 16px;
  background: #fff; border-bottom: 1px solid var(--line); padding: 10px 22px;
}
.brand { font-weight: 700; font-size: 16px; white-space: nowrap; }
#planBadge {
  display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 20px;
  margin-left: 8px; vertical-align: middle;
}
#planBadge.vip { background: #fff2d8; color: #a15c00; }
#planBadge.free { background: #e8ecf5; color: var(--muted); }
nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.nav-btn {
  border: 0; background: transparent; padding: 8px 14px; border-radius: 8px;
  font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap;
}
.nav-btn:hover { background: #f0f3fa; color: var(--text); }
.nav-btn.active { background: #eaf0ff; color: var(--primary); }
.user-box { display: flex; align-items: center; gap: 10px; color: var(--muted); white-space: nowrap; }

main { max-width: 1080px; margin: 0 auto; padding: 22px 18px 60px; }
.view h2 { margin: 0 0 14px; font-size: 19px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 18px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin-bottom: 14px;
}
.stat-card .num { font-size: 26px; font-weight: 800; }
.stat-card .lbl { color: var(--muted); font-size: 12px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.btn {
  border: 1px solid var(--line); background: #fff; padding: 8px 14px; border-radius: 8px;
  font: inherit; cursor: pointer; color: var(--text); transition: .15s;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn.primary:hover { background: var(--primary-2); color: #fff; }
.btn.danger { color: var(--err); border-color: #f2c5c5; }
.btn.danger:hover { background: #fef2f2; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.sm { padding: 4px 9px; font-size: 12px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { background: #f8faff; font-size: 12px; color: var(--muted); }
.table tr:last-child td { border-bottom: 0; }
.table .mono { font-family: Consolas, monospace; font-size: 12px; word-break: break-all; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 12px; }
.badge.ok { background: #e7f7ee; color: var(--ok); }
.badge.err { background: #fdeaea; color: var(--err); }
.badge.run { background: #e8f0ff; color: var(--primary); }
.badge.warn { background: #fdf1e2; color: var(--warn); }
.badge.gray { background: #eef1f6; color: var(--muted); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 760px) { .form-grid { grid-template-columns: 1fr; } }
.field label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 5px; color: var(--muted); }
.field input, .field textarea, .field select {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px;
  font: inherit; background: #fff; color: var(--text);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--primary); }
.dir-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dir-label label { margin-bottom: 0; }
.dir-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 8px 10px; background: #f8faff; border: 1px solid var(--line); border-radius: 8px; }
.crumb {
  border: 0; background: transparent; padding: 2px 6px; border-radius: 6px;
  font: inherit; color: var(--primary); cursor: pointer;
}
.crumb:hover { background: #e8f0ff; }
.crumb-sep { color: #c4ccda; }
.dir-actions { display: flex; justify-content: flex-end; margin: 8px 0; }
.dir-list {
  border: 1px solid var(--line); border-radius: 8px; max-height: 300px;
  overflow: auto; background: #fff;
}
.dir-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 11px; cursor: pointer;
  border-bottom: 1px solid #f0f3fa; user-select: none;
}
.dir-item:last-child { border-bottom: 0; }
.dir-item:hover { background: #f0f5ff; }
.dir-icon { flex: 0 0 auto; }
.dir-empty { padding: 22px 12px; text-align: center; }
.suffix-options { display: flex; flex-wrap: wrap; gap: 6px; }
.suffix-chip {
  border: 1px solid var(--line); background: #fff; color: var(--text);
  padding: 5px 11px; border-radius: 999px; cursor: pointer; font: inherit;
  transition: .12s;
}
.suffix-chip:hover { border-color: var(--primary); color: var(--primary); }
.suffix-chip.checked {
  background: #eaf0ff; border-color: var(--primary); color: var(--primary);
  font-weight: 600;
}
.dir-items { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 6px; }
.dir-item-sm {
  display: flex; align-items: center; gap: 8px; border: 1px solid var(--line);
  background: #f8faff; border-radius: 8px; padding: 6px 10px;
}
.dir-item-sm .dir-path { flex: 1; font-family: Consolas, monospace; font-size: 12px; word-break: break-all; }
.tip { font-size: 12px; color: var(--muted); margin-top: -6px; margin-bottom: 10px; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.divider { border-top: 1px dashed var(--line); margin: 18px 0; }

.modal-wrap {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: flex;
  align-items: center; justify-content: center; padding: 20px; z-index: 100;
}
.modal {
  background: #fff; border-radius: 14px; max-width: 820px; width: 100%;
  max-height: 88vh; overflow: auto; padding: 20px;
}
.modal h3 { margin: 0 0 12px; }
.log-list { font-family: Consolas, monospace; font-size: 12px; background: #10161f; color: #d6e2f0; border-radius: 8px; padding: 12px; max-height: 240px; overflow: auto; }
.log-list .err { color: #ff9d9d; }
.log-list .ok { color: #8ce99a; }
.copy-mini { padding: 1px 7px; font-size: 11px; margin-left: 4px; vertical-align: middle; }
.log-list .copy-mini { background: #1d2733; border-color: #3a4a5d; color: #cfe3ff; }
.log-list .copy-mini:hover { background: #2c3a4a; color: #fff; }
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 200;
  background: #1d2433; color: #fff; padding: 10px 18px; border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: 80vw;
}
.muted { color: var(--muted); }
.small { font-size: 12px; }
.price { font-size: 30px; font-weight: 800; color: var(--primary); }
.plan-actions { margin-top: 12px; display: flex; gap: 10px; }

/* ============ 整体视觉升级 ============ */
:root {
  --bg: #eef2fb;
  --card: rgba(255,255,255,.92);
  --line: #e3e9f5;
  --text: #172033;
  --muted: #66718a;
  --primary: #4f6df5;
  --primary-2: #3856e0;
  --ok: #17a866;
  --warn: #d9822b;
  --err: #e05252;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(23, 32, 51, .04), 0 4px 14px rgba(23, 32, 51, .05);
  --shadow-lg: 0 20px 48px rgba(40, 62, 126, .16);
}

html { scroll-behavior: smooth; }
body {
  background:
    radial-gradient(1100px 520px at 12% -8%, rgba(95, 130, 255, .14), transparent 60%),
    radial-gradient(900px 480px at 105% 0%, rgba(71, 208, 175, .10), transparent 55%),
    linear-gradient(180deg, #f6f8fd 0%, #eef2fb 45%, #eaf0fb 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(79, 109, 245, .18); }

/* 登录页 */
.login-wrap { background: transparent; }
.login-card {
  width: 420px;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 24px;
  padding: 38px 36px 32px;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-lg);
}
.login-card h1 { font-size: 27px; letter-spacing: .5px; }
.login-card .sub { font-size: 13px; }
.tab-mini { border-radius: 12px; padding: 10px; transition: .2s; }
.tab-mini.active { background: var(--primary); box-shadow: 0 6px 14px rgba(79,109,245,.28); }
form input, form textarea, form select {
  border-radius: 11px;
  border: 1px solid #dde4f1;
  background: rgba(255,255,255,.86);
  box-shadow: inset 0 1px 2px rgba(23,32,51,.03);
  transition: border-color .18s, box-shadow .18s, background .18s;
}
form input:focus, form textarea:focus, form select:focus,
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79,109,245,.13);
  background: #fff;
}

/* 顶栏 */
.topbar {
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(16px) saturate(1.5);
  border-bottom: 1px solid rgba(227,233,245,.8);
  padding: 12px 24px;
}
.brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 17px; font-weight: 800; letter-spacing: .3px;
  background: linear-gradient(120deg, #2c4de0, #6c8cff 65%, #22b6a2);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nav-btn { border-radius: 10px; padding: 9px 15px; transition: .18s; }
.nav-btn:hover { background: rgba(79,109,245,.08); color: var(--text); }
.nav-btn.active {
  background: linear-gradient(135deg, rgba(79,109,245,.12), rgba(79,109,245,.06));
  color: var(--primary); font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(79,109,245,.18);
}
#planBadge.vip { background: linear-gradient(120deg, #fff4d8, #ffe9bd); color: #8a5a00; }

/* 主体与卡片 */
main { max-width: 1160px; padding: 30px 22px 70px; }
.view h2 { font-size: 21px; font-weight: 750; margin-bottom: 18px; }
.cards { gap: 16px; margin-bottom: 22px; }
.card {
  border: 1px solid rgba(227,233,245,.9);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.card:hover {
  box-shadow: 0 10px 28px rgba(40,62,126,.08);
  border-color: rgba(79,109,245,.22);
}
.stat-card { position: relative; overflow: hidden; }
.stat-card::after {
  content: ""; position: absolute; width: 120px; height: 120px; right: -36px; top: -48px;
  background: radial-gradient(circle, rgba(79,109,245,.10), transparent 70%);
}
.stat-card .num { font-size: 30px; font-weight: 850; letter-spacing: -.5px; }
.stat-card .lbl { color: var(--muted); font-size: 12px; }

/* 按钮 */
.btn {
  border-radius: 10px;
  padding: 9px 16px;
  font-weight: 600;
  border: 1px solid #dbe2f0;
  box-shadow: 0 1px 2px rgba(23,32,51,.04);
  transition: transform .12s, box-shadow .18s, background .18s, color .18s, border-color .18s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary {
  background: linear-gradient(135deg, #5b7aff, #3e5ce8);
  box-shadow: 0 6px 16px rgba(79,109,245,.24);
}
.btn.primary:hover { box-shadow: 0 8px 20px rgba(79,109,245,.32); }
.btn.danger { color: var(--err); border-color: #f3c4c4; background: #fff; }
.btn.danger:hover { background: #fff4f4; border-color: var(--err); }
.btn.sm { padding: 5px 10px; border-radius: 8px; }
.btn:disabled { opacity: .5; transform: none; }

/* 表格 */
.table {
  border-radius: 14px;
  border: 1px solid rgba(227,233,245,.9);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(23,32,51,.03);
}
.table th {
  background: #f7f9ff;
  font-size: 12px; font-weight: 650; color: #58637d;
  letter-spacing: .2px;
}
.table th, .table td { padding: 12px 14px; border-color: #edf1f9; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: #f8faff; }
.table .mono { font-size: 12px; }
.badge { font-weight: 650; padding: 3px 9px; }
.badge.ok { background: #e5f8ef; color: #0c7a4a; }
.badge.run { background: #e9efff; color: #3556d8; }
.badge.err { background: #ffecec; color: #d43d3d; }
.badge.warn { background: #fff3e2; color: #b96a12; }
.badge.gray { background: #eef1f7; color: #67718a; }

/* 表单 */
.form-grid { gap: 16px; }
.field label { color: #4c5872; letter-spacing: .1px; }
.field input, .field textarea, .field select {
  border-radius: 10px;
  border: 1px solid #dde4f1;
  background: rgba(255,255,255,.9);
  transition: border-color .18s, box-shadow .18s, background .18s;
}

/* 目录选择器 */
.dir-crumbs { border-radius: 10px; background: #f7f9ff; }
.crumb { border-radius: 7px; font-weight: 600; }
.crumb:hover { background: #e6edff; }
.dir-list { border-radius: 12px; }
.dir-item { border-radius: 8px; margin: 3px; padding: 9px 12px; border: 1px solid transparent; }
.dir-item:hover { border-color: rgba(79,109,245,.16); background: #f5f8ff; }
.suffix-chip { border-radius: 999px; font-weight: 500; }
.suffix-chip.checked {
  background: linear-gradient(120deg, rgba(79,109,245,.10), rgba(79,109,245,.04));
  box-shadow: inset 0 0 0 1px rgba(79,109,245,.35);
}

/* 弹窗 */
.modal-wrap { background: rgba(23, 32, 51, .42); backdrop-filter: blur(6px); }
.modal {
  border-radius: 20px;
  padding: 24px;
  border: 1px solid rgba(255,255,255,.5);
  box-shadow: var(--shadow-lg);
}
.modal h3 { font-size: 18px; }

/* 日志与提示 */
.log-list {
  border-radius: 12px;
  background: #121a28;
  border: 1px solid rgba(255,255,255,.06);
  font-family: "SF Mono", Consolas, Menlo, monospace;
  font-size: 12px;
}
.toast {
  border-radius: 12px;
  background: rgba(23, 32, 51, .9);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 32px rgba(23,32,51,.28);
}

/* 滚动条 */
* { scrollbar-width: thin; scrollbar-color: #c7d2e8 transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #c7d2e8; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #aab9dd; }

@media (max-width: 720px) {
  main { padding: 20px 14px 50px; }
  .topbar { padding: 10px 14px; gap: 10px; }
  .card { padding: 16px; }
  .login-card { padding: 28px 22px; }
}

/* ============ 左侧导航布局 ============ */
#appView {
  display: flex;
  align-items: stretch;
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  left: 0;
  width: 238px;
  height: 100vh;
  flex: 0 0 238px;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 22px 14px 16px;
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(18px) saturate(1.4);
  border-right: 1px solid rgba(227,233,245,.9);
  border-bottom: 0;
  overflow-y: auto;
}

.topbar .brand {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 0 8px;
  font-size: 18px;
}

.topbar nav {
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  margin: 26px 0 18px;
  flex: none;
  overflow: visible;
}

.topbar .nav-btn {
  width: 100%;
  text-align: left;
  padding: 11px 14px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.topbar .user-box {
  margin-top: auto;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 8px 0;
  border-top: 1px solid rgba(227,233,245,.75);
  color: var(--muted);
}

main {
  flex: 1;
  min-width: 0;
  max-width: none;
  width: auto;
}

@media (max-width: 900px) {
  #appView { flex-direction: column; }
  .topbar {
    position: sticky;
    width: 100%;
    height: auto;
    flex: none;
    flex-direction: row;
    align-items: center;
    padding: 10px 14px;
    border-right: 0;
    border-bottom: 1px solid rgba(227,233,245,.9);
    overflow: visible;
  }
  .topbar .brand { min-height: auto; font-size: 16px; }
  .topbar nav {
    flex-direction: row;
    align-items: center;
    gap: 3px;
    margin: 0 8px;
    overflow-x: auto;
    flex: 1;
  }
  .topbar .nav-btn { width: auto; padding: 8px 11px; font-size: 13px; white-space: nowrap; }
  .topbar .user-box {
    margin-top: 0;
    flex-direction: row;
    align-items: center;
    padding: 0;
    border-top: 0;
  }
  main { width: 100%; }
}

/* ============ 网盘账号页 ============ */
.account-add-card {
  position: relative;
  overflow: hidden;
}
.account-add-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, #5b7aff, #43b7b0 70%, #f0a25b);
  opacity: .9;
}
.provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.provider-card {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 62px;
  padding: 11px 13px;
  border: 1px solid #dde4f2;
  border-radius: 13px;
  background: rgba(255,255,255,.9);
  font: inherit;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color .16s, box-shadow .16s, transform .12s, background .16s;
}
.provider-card:hover {
  transform: translateY(-1px);
  border-color: rgba(79,109,245,.45);
  box-shadow: 0 6px 16px rgba(40,62,126,.08);
}
.provider-card.active {
  border-color: rgba(79,109,245,.7);
  background: linear-gradient(135deg, rgba(79,109,245,.10), rgba(79,109,245,.03));
  box-shadow: inset 0 0 0 1px rgba(79,109,245,.28), 0 6px 16px rgba(79,109,245,.10);
}
.provider-card .provider-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.45;
}
.provider-card b { font-size: 14px; }
.provider-card .small { font-size: 11px; line-height: 1.3; }
.provider-icon,
.provider-avatar {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
}
.provider-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-size: 15px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
}
.provider-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 13px;
}
.av-quark, .pi-quark {
  background: linear-gradient(135deg, #4f8cff, #2f6ce0);
  box-shadow: 0 4px 10px rgba(79,140,255,.25);
}
.av-baidu, .pi-baidu {
  background: linear-gradient(135deg, #ec5f4d, #d23a2c);
  box-shadow: 0 4px 10px rgba(226,74,58,.22);
}
.av-mock, .pi-mock {
  background: linear-gradient(135deg, #8493ad, #5d6c86);
  box-shadow: 0 4px 10px rgba(93,108,134,.2);
}
.acc-name {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 168px;
}
.acc-name b { font-size: 14px; }
.acc-actions { flex-wrap: nowrap; }
.acc-field-tip { margin: 5px 0 0; }
.baidu-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.baidu-fields label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 650;
  color: #4c5872;
}
.baidu-fields input {
  font-family: ui-monospace, "SF Mono", Consolas, Menlo, monospace;
  font-size: 12px;
}
.baidu-guide {
  margin-top: 9px;
  padding: 9px 12px 4px;
  border: 1px solid #e1e7f4;
  border-radius: 10px;
  background: #f8faff;
  color: #4a5670;
}
.baidu-guide summary {
  cursor: pointer;
  font-weight: 650;
  color: #33529d;
  outline: none;
}
.baidu-guide ol { margin: 7px 0 6px; padding-left: 20px; }
.baidu-guide li, .baidu-guide p { font-size: 12px; margin-bottom: 4px; }
@media (max-width: 620px) {
  .provider-grid { grid-template-columns: 1fr; }
  .baidu-fields { grid-template-columns: 1fr; }
  .acc-actions { flex-wrap: wrap; }
}

/* ============ 页面标题 / 通用页面 UI 优化 ============ */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.page-head-text h2 {
  margin: 0 0 4px;
}
.page-desc {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.page-head-right {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.cards.two {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.empty-cell {
  padding: 30px 14px !important;
  text-align: center;
  color: var(--muted);
}
.empty-card {
  text-align: center;
  padding: 28px 20px;
}

/* 侧边栏品牌区：工具箱名称与会员徽标分行 */
.topbar .brand-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  width: 100%;
  padding: 0 8px 14px;
  border-bottom: 1px solid rgba(227,233,245,.8);
  margin-bottom: 10px;
}
.topbar .brand {
  min-height: auto;
  padding: 0;
  font-size: 19px;
  letter-spacing: .4px;
}
.topbar #planBadge {
  margin-left: 0;
  font-size: 11px;
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(23,32,51,.06);
}

/* 工作台快捷入口与账号概览 */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.quick-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid #e1e7f4;
  border-radius: 14px;
  background: rgba(255,255,255,.9);
  font: inherit;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .14s, box-shadow .18s, border-color .18s;
}
.quick-card:hover {
  transform: translateY(-2px);
  border-color: rgba(79,109,245,.35);
  box-shadow: 0 8px 20px rgba(40,62,126,.09);
}
.quick-card b { font-size: 15px; }
.quick-card span { color: var(--muted); font-size: 12px; }
.account-mini-list { display: grid; gap: 8px; }
.account-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid #edf1f9;
  border-radius: 11px;
  background: #fbfcff;
}
.account-mini-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.45;
}

/* 会员中心 */
.plan-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.plan-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 280px;
}
.plan-card.current {
  border-color: rgba(79,109,245,.45);
  box-shadow: 0 12px 30px rgba(79,109,245,.12), var(--shadow-sm);
}
.plan-card .price {
  margin: 10px 0 8px;
  font-size: 34px;
}
.plan-card .price .small { font-weight: 500; }
.plan-features {
  list-style: none;
  margin: 10px 0 16px;
  padding: 0;
  display: grid;
  gap: 6px;
  color: #4a5670;
  font-size: 13px;
}
.plan-features li { padding-left: 18px; position: relative; }
.plan-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--ok);
  font-weight: 800;
}

/* 管理后台 */
.code-result {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.code-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  border: 1px solid #e7ecf6;
  border-radius: 9px;
  background: #f8faff;
  margin-bottom: 6px;
}
.code-item .mono { font-size: 12px; flex: 1; min-width: 180px; }

@media (max-width: 900px) {
  .topbar .brand-block {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    width: auto;
    padding: 0;
    border-bottom: 0;
    margin-bottom: 0;
  }
  .topbar .brand { font-size: 16px; }
  .topbar nav { margin: 0 8px; }
}

/* 注册开关与登录页提示 */
.reg-closed {
  background: #fff6e6;
  color: #a15c00;
  border: 1px solid #f5dfba;
  padding: 8px 10px;
  border-radius: 9px;
  margin: 0 0 12px;
}
.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.switch input { display: none; }
.switch-track {
  position: relative;
  width: 42px;
  height: 23px;
  border-radius: 999px;
  background: #ccd4e3;
  transition: background .18s;
  flex: none;
}
.switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(23,32,51,.25);
  transition: transform .18s;
}
.switch input:checked + .switch-track {
  background: linear-gradient(135deg, #5b7aff, #3e5ce8);
}
.switch input:checked + .switch-track::after {
  transform: translateX(19px);
}

/* 顶栏用户操作 */
.user-box .user-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* 次要高亮按钮（如工作台“修改密码”） */
.btn.alt {
  color: #fff;
  border: 0;
  background: linear-gradient(135deg, #f6b64b, #e08a0f);
  box-shadow: 0 6px 16px rgba(217, 134, 34, .20);
}
.btn.alt:hover {
  color: #fff;
  background: linear-gradient(135deg, #f9c467, #ec9416);
  box-shadow: 0 8px 20px rgba(217, 134, 34, .30);
}

/* 工作台头部用户区：用户名 + 退出 + 修改密码 */
.head-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px 5px 14px;
  background: rgba(255,255,255,.82);
  border: 1px solid #e2e8f5;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.head-user-name {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 750;
  font-size: 13px;
  color: #2c3751;
}
.head-user-gap {
  width: 24px;
  flex: none;
}
@media (max-width: 760px) {
  .head-user-gap { width: 10px; }
}
