:root {
  --bg: #0e1621;
  --bg2: #17212b;
  --card: #1b2733;
  --border: #2a3947;
  --text: #e8eef4;
  --muted: #8aa0b3;
  --accent: #229ed9;
  --accent-hover: #3cb0e8;
  --green: #4fae4e;
  --red: #e64545;
  --yellow: #e8a33d;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}
header {
  display: flex; align-items: center; gap: 32px;
  padding: 14px 24px; background: var(--bg2);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.logo { font-weight: 700; font-size: 17px; color: var(--accent); }
nav { display: flex; gap: 6px; }
.tab-btn {
  background: transparent; border: none; color: var(--muted);
  padding: 8px 16px; border-radius: 8px; font-size: 14px; cursor: pointer;
  transition: all .15s;
}
.tab-btn:hover { color: var(--text); background: var(--card); }
.tab-btn.active { color: #fff; background: var(--accent); }
main { max-width: 980px; margin: 24px auto; padding: 0 20px; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.count { color: var(--muted); font-size: 13px; }
.batch-progress { margin: -2px 0 14px; padding: 10px 12px; background: var(--card); border: 1px solid var(--border); border-radius: 8px; }
.batch-progress-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.batch-progress-track { height: 6px; overflow: hidden; background: var(--bg2); border-radius: 999px; }
.batch-progress-track > div { width: 0; height: 100%; background: var(--accent); border-radius: inherit; transition: width .25s ease; }
.batch-errors { margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--border); color: var(--red); font-size: 12px; line-height: 1.6; max-height: 180px; overflow-y: auto; }
.batch-errors-title { font-weight: 600; margin-bottom: 3px; }
.batch-error-row { word-break: break-word; }

.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 20px; margin-bottom: 16px;
}
.card h3 { font-size: 15px; margin-bottom: 14px; color: var(--accent); }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
input, select, textarea {
  width: 100%; margin-top: 6px; padding: 9px 12px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); font-size: 14px;
  outline: none; font-family: inherit;
}
textarea { resize: vertical; min-height: 90px; font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
.setting-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 14px;
  margin-bottom: 16px;
  background: rgba(34,158,217,.07);
  border: 1px solid rgba(34,158,217,.28);
  border-radius: 10px;
  cursor: pointer;
}
.setting-toggle-copy { display: grid; gap: 4px; min-width: 0; }
.setting-toggle-title { color: var(--text); font-size: 14px; font-weight: 600; }
.setting-toggle-desc { color: var(--muted); font-size: 12px; line-height: 1.5; }
.setting-toggle-control {
  appearance: none;
  flex: 0 0 auto;
  width: 42px;
  height: 24px;
  margin: 0;
  padding: 0;
  background: var(--border);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background .18s ease;
}
.setting-toggle-control::after {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  margin: 3px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
  transition: transform .18s ease;
}
.setting-toggle-control:checked { background: var(--accent); }
.setting-toggle-control:checked::after { transform: translateX(18px); }
.setting-toggle-control:focus-visible { outline: 2px solid var(--accent-hover); outline-offset: 2px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
.auto-result { font-size: 13px; padding: 7px 10px; border-radius: 7px; margin-top: 6px; border: 1px solid var(--border); }
.auto-result.ok { border-color: rgba(79,174,78,.4); color: var(--green); }
.auto-result.err { border-color: rgba(230,69,69,.4); color: var(--red); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 900px) { .grid3 { grid-template-columns: 1fr; } }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hint { font-size: 12px; color: var(--muted); }
.hint.ok { color: var(--green); }
.hint.err { color: var(--red); }
.hint a, .banner a { color: var(--accent); }

.banner { border-radius: 10px; padding: 12px 16px; font-size: 14px; margin-bottom: 16px; }
.banner.warning { background: rgba(232,163,61,.12); border: 1px solid rgba(232,163,61,.4); color: var(--yellow); }

.btn {
  border: none; border-radius: 8px; padding: 9px 18px;
  font-size: 14px; cursor: pointer; transition: all .15s;
  background: var(--border); color: var(--text);
}
.btn:hover { filter: brightness(1.15); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.ghost { background: transparent; border: 1px solid var(--border); }
.btn.danger { background: transparent; border: 1px solid var(--red); color: var(--red); }
.btn.sm { padding: 5px 10px; font-size: 12px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 500; font-size: 13px; }
tbody tr:hover { background: rgba(34,158,217,.05); }
td .ops { display: flex; gap: 6px; flex-wrap: wrap; }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.dot.online { background: var(--green); box-shadow: 0 0 6px var(--green); }
.dot.offline { background: var(--muted); }
.dot.pending { background: var(--yellow); box-shadow: 0 0 6px var(--yellow); }
.dot.logged_out { background: var(--red); }
.status-name { font-size: 13px; }
.check-status { font-size: 12px; white-space: nowrap; }
.check-status.good { color: var(--green); }
.check-status.bad { color: var(--red); }
.check-status.unknown { color: var(--muted); }
.acc-name { font-weight: 600; }
.acc-uname { color: var(--muted); font-size: 13px; }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: 13px; }

.empty { text-align: center; color: var(--muted); padding: 60px 0; font-size: 14px; }
.hidden { display: none !important; }

#toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--bg2); border: 1px solid var(--border); color: var(--text);
  padding: 11px 22px; border-radius: 10px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 99;
  max-width: 80vw;
}
#toast.show { opacity: 1; }
#toast.err { border-color: var(--red); color: var(--red); }
#toast.ok { border-color: var(--green); color: var(--green); }

dialog {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; color: var(--text); padding: 24px;
  width: min(440px, 92vw);
}
dialog::backdrop { background: rgba(0,0,0,.55); }
.dialog-body h3 { margin-bottom: 16px; color: var(--accent); }
code { background: var(--bg2); padding: 2px 6px; border-radius: 5px; font-size: 12px; }

#chats-dialog { width: min(560px, 94vw); max-height: 82vh; }
#edit-dialog { width: min(460px, 92vw); }
.note-sec { font-size: 13px; color: var(--muted); margin: 14px 0 8px; border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.acc-note { font-size: 12px; color: var(--yellow); margin-top: 3px; }

.dd { position: relative; display: inline-block; }
.dd-menu {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 50;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 10px;
  min-width: 130px; padding: 5px; box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.dd-item {
  display: block; width: 100%; text-align: left; background: none; border: none;
  color: var(--text); padding: 8px 12px; font-size: 13px; border-radius: 7px; cursor: pointer;
}
.dd-item:hover { background: rgba(34,158,217,.15); }
.dd-item:disabled { opacity: .45; cursor: not-allowed; }
.dd-item.danger { color: var(--red); }
.dd-item.danger:hover { background: rgba(230,69,69,.12); }
#chats-list { max-height: 55vh; overflow-y: auto; border-top: 1px solid var(--border); }
.chat-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 10px; border-bottom: 1px solid var(--border); cursor: pointer;
  border-radius: 8px;
}
.chat-row:hover { background: rgba(34,158,217,.08); }
.chat-title { font-size: 14px; font-weight: 600; }
.chat-meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.chat-side { font-size: 12px; }
.badge {
  background: var(--accent); color: #fff; border-radius: 10px;
  padding: 2px 8px; font-size: 12px; font-weight: 600;
}
.muted { margin-left: 8px; }
.msg-row { padding: 10px; border-bottom: 1px solid var(--border); }
.msg-row:hover { background: rgba(34,158,217,.04); }
.msg-head { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 4px; }
.msg-sender { color: var(--accent); font-weight: 600; }
.msg-date { color: var(--muted); }
.msg-text { font-size: 13px; white-space: pre-wrap; word-break: break-word; }

/* ---------------- TG营销王视觉主题 ---------------- */
:root {
  --bg: #08111f;
  --bg2: #101d30;
  --card: rgba(17, 31, 50, .86);
  --border: rgba(137, 177, 214, .16);
  --text: #edf6ff;
  --muted: #8da5bc;
  --accent: #35aee8;
  --accent-hover: #59c1f2;
  --green: #54d596;
  --red: #ff727b;
  --yellow: #f4bf63;
  --shadow: 0 18px 48px rgba(0, 0, 0, .22);
}

html { background: var(--bg); }
body {
  background:
    radial-gradient(circle at 8% -8%, rgba(41, 159, 224, .19), transparent 32%),
    radial-gradient(circle at 96% 4%, rgba(107, 85, 220, .14), transparent 28%),
    linear-gradient(145deg, #08111f 0%, #0b1727 52%, #091321 100%);
  letter-spacing: .01em;
}
header {
  padding: 15px clamp(18px, 4vw, 52px);
  background: rgba(8, 17, 31, .78);
  border-bottom: 1px solid rgba(137, 177, 214, .15);
  box-shadow: 0 10px 32px rgba(0, 0, 0, .14);
  backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; gap: 11px; min-width: max-content; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 11px; color: #fff; font-size: 19px;
  background: linear-gradient(145deg, #42c2f3, #3678e8);
  box-shadow: 0 7px 20px rgba(53, 174, 232, .28);
}
.brand-copy { display: flex; flex-direction: column; gap: 1px; }
.logo { color: #f5fbff; font-size: 17px; letter-spacing: .04em; }
.brand-subtitle { color: var(--muted); font-size: 10px; letter-spacing: .04em; }
nav { margin-left: auto; gap: 5px; padding: 4px; border: 1px solid var(--border); border-radius: 12px; background: rgba(16, 29, 48, .68); }
.tab-btn { padding: 8px 15px; border-radius: 8px; font-size: 13px; }
.tab-btn:hover { color: var(--text); background: rgba(53, 174, 232, .1); }
.tab-btn.active { color: #fff; background: linear-gradient(135deg, #299dd8, #347ee7); box-shadow: 0 5px 14px rgba(41, 157, 216, .22); }
main { max-width: 1180px; margin: 32px auto 54px; padding: 0 clamp(14px, 3vw, 30px); }
.toolbar {
  padding: 14px; margin-bottom: 16px; gap: 9px;
  border: 1px solid var(--border); border-radius: 14px;
  background: rgba(17, 31, 50, .76); box-shadow: var(--shadow);
}
.toolbar .count {
  padding: 7px 10px; border: 1px solid var(--border); border-radius: 999px;
  background: rgba(137, 177, 214, .06); font-size: 12px;
}
.btn { border-radius: 9px; padding: 9px 15px; font-weight: 550; box-shadow: 0 4px 12px rgba(0, 0, 0, .1); }
.btn.primary { background: linear-gradient(135deg, #2ca6dd, #337de5); }
.btn.primary:hover { background: linear-gradient(135deg, #54c3f0, #4a93ef); transform: translateY(-1px); }
.btn.ghost { background: rgba(137, 177, 214, .04); }
.btn.ghost:hover { border-color: rgba(53, 174, 232, .58); background: rgba(53, 174, 232, .1); }
.batch-progress { margin: 0 0 16px; padding: 14px 16px; border-radius: 14px; background: rgba(17, 31, 50, .82); box-shadow: var(--shadow); }
.batch-progress-track { height: 8px; background: rgba(137, 177, 214, .1); }
.batch-progress-track > div { background: linear-gradient(90deg, #36b8e9, #547fed); box-shadow: 0 0 14px rgba(53, 174, 232, .45); }
.card {
  background: linear-gradient(145deg, rgba(21, 38, 60, .91), rgba(14, 27, 45, .91));
  border-color: var(--border); border-radius: 16px; padding: clamp(18px, 3vw, 25px);
  box-shadow: var(--shadow);
}
.card h3 { display: flex; align-items: center; gap: 9px; font-size: 16px; color: var(--text); }
.card h3::before { content: ""; width: 4px; height: 17px; border-radius: 99px; background: linear-gradient(#46c6f2, #347de7); }
input, select, textarea { background: rgba(8, 17, 31, .58); border-color: rgba(137, 177, 214, .2); border-radius: 9px; }
input:hover, select:hover, textarea:hover { border-color: rgba(137, 177, 214, .38); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(53, 174, 232, .12); }
.table-shell { overflow: auto; border: 1px solid var(--border); border-radius: 15px; background: rgba(17, 31, 50, .78); box-shadow: var(--shadow); }
table { min-width: 930px; }
th, td { padding: 14px 15px; border-bottom-color: rgba(137, 177, 214, .11); }
th { background: rgba(137, 177, 214, .045); color: #a8bed1; font-size: 12px; letter-spacing: .04em; }
tbody tr { transition: background .16s ease, transform .16s ease; }
tbody tr:hover { background: rgba(53, 174, 232, .08); }
.check-status { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 999px; font-weight: 600; font-size: 11px; }
.check-status.good { color: var(--green); background: rgba(84, 213, 150, .1); border: 1px solid rgba(84, 213, 150, .2); }
.check-status.bad { color: var(--red); background: rgba(255, 114, 123, .1); border: 1px solid rgba(255, 114, 123, .2); }
.check-status.unknown { color: var(--muted); background: rgba(137, 177, 214, .08); border: 1px solid rgba(137, 177, 214, .13); }
.acc-name { color: #f4f9ff; }
.acc-note { color: var(--yellow); }
.empty { margin-top: 4px; padding: 72px 20px; border: 1px dashed rgba(137, 177, 214, .2); border-radius: 15px; background: rgba(17, 31, 50, .44); }
dialog { background: linear-gradient(145deg, #152a43, #0e1d31); border-color: rgba(137, 177, 214, .25); box-shadow: 0 24px 80px rgba(0, 0, 0, .48); }
dialog::backdrop { background: rgba(2, 8, 17, .72); backdrop-filter: blur(4px); }
.dd-menu { background: #12253c; border-color: rgba(137, 177, 214, .24); box-shadow: 0 14px 34px rgba(0, 0, 0, .42); }
#toast { background: #142943; border-color: rgba(137, 177, 214, .25); box-shadow: 0 12px 30px rgba(0, 0, 0, .3); }

@media (max-width: 700px) {
  header { align-items: flex-start; flex-direction: column; gap: 13px; }
  nav { width: 100%; margin-left: 0; }
  .tab-btn { flex: 1; padding-left: 8px; padding-right: 8px; }
  main { margin-top: 20px; }
  .automation-modules { grid-template-columns: 1fr; }
  .toolbar { align-items: stretch; }
  .toolbar .btn { flex: 1 1 100%; }
  .toolbar .count { flex: 1; text-align: center; }
  .grid2 { grid-template-columns: 1fr; gap: 0; }
}

/* ---------------- 简洁后台版 ---------------- */
:root {
  --bg: #f3f5f7;
  --bg2: #f8fafb;
  --card: #ffffff;
  --border: #e2e7ec;
  --text: #25313d;
  --muted: #748292;
  --accent: #2487b8;
  --accent-hover: #1d729d;
  --green: #23885d;
  --red: #c94a50;
  --yellow: #a97520;
  --shadow: 0 1px 3px rgba(25, 42, 58, .06);
}
html { background: var(--bg); }
body {
  background: var(--bg);
  color: var(--text);
  letter-spacing: 0;
}
header {
  padding: 13px clamp(18px, 4vw, 52px);
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: none;
  backdrop-filter: none;
}
.brand { gap: 10px; }
.brand-mark {
  width: 31px; height: 31px; border-radius: 6px;
  color: #1f729c; font-size: 11px; font-weight: 700;
  letter-spacing: -.04em; background: #e8f3f9;
  border: 1px solid #cde5f0; box-shadow: none;
}
.logo { color: #22303d; font-size: 16px; letter-spacing: 0; }
.brand-subtitle { color: #8a96a2; font-size: 10px; }
nav { margin-left: auto; gap: 3px; padding: 0; border: 0; background: transparent; }
.tab-btn { padding: 9px 14px; border-radius: 5px; color: #687786; }
.tab-btn:hover { color: var(--accent); background: #f2f7fa; }
.tab-btn.active { color: var(--accent); background: transparent; box-shadow: inset 0 -2px 0 var(--accent); }
main { max-width: 1220px; margin: 25px auto 48px; }
.toolbar {
  padding: 11px 13px; margin-bottom: 13px; gap: 8px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--card); box-shadow: var(--shadow);
}
.toolbar .count {
  padding: 6px 5px; border: 0; border-radius: 0;
  background: transparent; font-size: 12px;
}
.toolbar .count + .count { padding-left: 12px; border-left: 1px solid var(--border); }
.btn { border-radius: 5px; padding: 8px 13px; font-weight: 500; box-shadow: none; }
.btn:hover { transform: none; filter: none; }
.btn.primary, .btn.primary:hover { background: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.ghost { background: #fff; border-color: #d5dde4; color: #526170; }
.btn.ghost:hover { border-color: #9fc8dc; background: #f3f8fb; }
.batch-progress { margin: 0 0 13px; padding: 12px 14px; border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.batch-progress-track { height: 6px; background: #edf1f4; }
.batch-progress-track > div { background: var(--accent); box-shadow: none; }
.batch-errors { color: var(--red); }
.card {
  background: #fff; border-color: var(--border); border-radius: 8px;
  padding: 21px; box-shadow: var(--shadow);
}
.card h3 { font-size: 15px; color: #344452; }
.card h3::before { width: 3px; height: 15px; background: var(--accent); }
input, select, textarea { background: #fff; border-color: #d8e0e6; border-radius: 5px; color: var(--text); }
input:hover, select:hover, textarea:hover { border-color: #b7c7d2; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(36, 135, 184, .12); }
.table-shell { border-color: var(--border); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
th, td { padding: 12px 13px; }
th { background: #f7f9fa; color: #697887; font-size: 12px; letter-spacing: 0; }
tbody tr:hover { background: #f6fafc; }
.check-status { padding: 3px 6px; border-radius: 4px; font-size: 11px; }
.check-status.good { color: var(--green); background: #eef8f3; border: 1px solid #d8eee3; }
.check-status.bad { color: var(--red); background: #fff1f2; border: 1px solid #f5dadd; }
.check-status.unknown { color: var(--muted); background: #f2f4f6; border: 1px solid #e6eaed; }
.acc-name { color: #263642; }
.acc-note { color: var(--yellow); }
.empty { margin-top: 4px; padding: 65px 20px; border: 1px dashed #cfd9e0; border-radius: 8px; background: #fff; }
dialog { background: #fff; border-color: var(--border); border-radius: 9px; color: var(--text); box-shadow: 0 12px 38px rgba(25, 42, 58, .2); }
dialog::backdrop { background: rgba(25, 42, 58, .3); backdrop-filter: none; }
.dialog-body h3 { color: #344452; }
.dd-menu { background: #fff; border-color: var(--border); border-radius: 6px; box-shadow: 0 7px 20px rgba(25, 42, 58, .14); }
.dd-item { color: var(--text); }
.dd-item:hover { background: #f2f7fa; }
#toast { background: #263746; border-color: #263746; box-shadow: 0 8px 20px rgba(25, 42, 58, .2); }

@media (max-width: 700px) {
  header { gap: 11px; }
  main { margin-top: 17px; }
}

/* ---------------- 柔和灰蓝预览版 ---------------- */
:root {
  --bg: #dfe6eb;
  --bg2: #e8eef2;
  --card: #edf2f5;
  --border: #cbd5dc;
  --text: #2c3944;
  --muted: #6d7c88;
  --accent: #267fa9;
  --accent-hover: #1f6d91;
  --shadow: 0 1px 3px rgba(35, 52, 66, .08);
}
html, body { background: var(--bg); }
body { background: #dfe6eb; }
header { background: #e5ebef; border-bottom-color: #cbd5dc; }
.brand-mark { color: #226d8f; background: #d6e7ee; border-color: #bdd5df; }
.logo { color: #293742; }
.brand-subtitle { color: #71808b; }
.tab-btn:hover { background: #dbe7ed; }
.tab-btn.active { color: #226d8f; box-shadow: inset 0 -2px 0 #267fa9; }
.toolbar, .batch-progress, .card, .table-shell, .empty {
  background: #edf2f5;
  border-color: #cbd5dc;
}
.toolbar .count + .count { border-left-color: #cbd5dc; }
.btn.ghost { background: #e7edf1; border-color: #c5d0d8; }
.btn.ghost:hover { background: #dce8ee; border-color: #9dbdcd; }
.account-summary {
  display: flex;
  align-items: center;
  min-height: 42px;
  margin: -5px 0 14px;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  box-shadow: var(--shadow);
  color: var(--muted);
  font-size: 13px;
}
.account-selection-expression { margin: 0; }
.account-selection-preview {
  word-break: break-word;
}
.account-selection-preview.err { color: var(--red); }
#account-selection-preview + .toolbar { margin-top: 14px; }

/* 顶部导航居中，品牌图标固定在左侧 */
header { justify-content: center; }
.brand { position: absolute; left: clamp(18px, 4vw, 52px); }
nav { margin-left: 0; }

@media (max-width: 700px) {
  header {
    align-items: center;
    flex-direction: row;
    padding-left: 60px;
    padding-right: 12px;
  }
  .brand { left: 18px; }
  nav {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }
}
.batch-progress-track { background: #d6e0e6; }
.card h3 { color: #354550; }
input, select, textarea { background: #e4eaee; border-color: #c6d1d8; }
input:hover, select:hover, textarea:hover { border-color: #aebfc9; }
th { background: #e5ebef; }
tbody tr:hover { background: #e4edf2; }
.check-status.unknown { background: #e1e7eb; border-color: #d0d9df; }
dialog { background: #edf2f5; border-color: #c5d0d8; }
.dd-menu { background: #edf2f5; border-color: #c5d0d8; }
.dd-item:hover { background: #dfeaf0; }
#batch-proxy-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(560px, 92vw);
  margin: 0;
  transform: translate(-50%, -50%);
}
#batch-twofa-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(460px, 92vw);
  margin: 0;
  transform: translate(-50%, -50%);
}
#claim-username-dialog { width: min(480px, 92vw); }
.detection-description { margin: -5px 0 16px; }
.detection-account-line { margin-bottom: 17px; padding: 10px 12px; border-left: 3px solid var(--accent); background: #e3ebef; color: var(--text); }
.detection-account-line strong { font-size: 13px; font-weight: 600; }
.detection-actions { margin-top: 4px; }
.detection-current { margin-top: 9px; }
.detection-results-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.detection-results-head h3 { margin-bottom: 0; }
.detection-table-shell { box-shadow: none; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 14px; }
.pagination .hint { min-width: 92px; text-align: center; }
.automation-modules { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 4px 0 18px; }
.automation-module { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: rgba(137, 177, 214, .04); cursor: pointer; }
.automation-module input { width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--accent); }
.automation-module span { display: flex; flex-direction: column; gap: 4px; color: var(--text); }
.automation-module strong { font-size: 13px; }
.automation-module small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.automation-actions { margin-top: 14px; }
#automation-result { display: none !important; }
@media (max-width: 700px) {
  .automation-modules { grid-template-columns: 1fr; }
}
#detection-results-table, #username-pool-table { min-width: 860px; }
.automation-log-toolbar { margin: 0 0 8px; }
.automation-log-box { margin-bottom: 14px; }
.automation-log-output {
  max-height: 320px;
  overflow: auto;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #e4eaee;
  color: var(--text);
  font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}
.automation-log-line { padding: 2px 0; border-bottom: 1px solid rgba(120, 145, 160, .16); }
.automation-log-line:last-child { border-bottom: 0; }
.automation-log-line.error { color: var(--red); }
.auto-progress-line { display: block; margin-top: 8px; min-height: 18px; }
.automation-account-copy { min-width: 0; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.automation-account-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.automation-account-expression-field { margin: 12px 0 0; }
.automation-account-dialog-hint { margin: -6px 0 14px; }
#automation-account-dialog { width: min(560px, 94vw); }
.automation-account-expression-hint { margin: -5px 0 12px; line-height: 1.5; }
.automation-account-selector { margin-bottom: 16px; }
.automation-account-preview {
  min-height: 38px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(137, 177, 214, .06);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  word-break: break-word;
}
.automation-account-preview.err { border-color: rgba(230, 69, 69, .4); color: var(--red); }
.automation-account-picker-actions { margin-bottom: 10px; }
.automation-account-list {
  max-height: min(52vh, 460px);
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(137, 177, 214, .04);
}
.automation-account-option {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.automation-account-option:last-child { border-bottom: 0; }
.automation-account-option:hover { background: rgba(34, 158, 217, .07); }
.automation-account-option input { flex: 0 0 auto; width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.automation-account-option input:disabled { cursor: not-allowed; opacity: .45; }
.automation-account-option.is-disabled { cursor: not-allowed; opacity: .55; }
.automation-account-option-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.automation-account-option-title { color: var(--text); font-size: 13px; font-weight: 600; }
.automation-account-option-meta { color: var(--muted); font-size: 12px; word-break: break-all; }
.automation-account-option-status { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.automation-account-empty { padding: 28px 14px; color: var(--muted); font-size: 13px; text-align: center; }
@media (max-width: 700px) {
  .automation-account-line { align-items: flex-start; }
  .automation-account-option-status { margin-left: 0; }
}

/* ---------------- 登录页 ---------------- */
.app-user-bar {
  position: absolute;
  left: clamp(18px, 4vw, 52px);
  display: flex;
  align-items: center;
  gap: 10px;
}
.app-user-name { color: var(--muted); font-size: 12px; }
.auth-page { background: #dfe6eb; }
.auth-main {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}
.auth-card {
  width: min(420px, 100%);
  padding: 30px;
  background: #edf2f5;
  border: 1px solid #cbd5dc;
  border-radius: 10px;
  box-shadow: 0 12px 38px rgba(35, 52, 66, .12);
}
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.auth-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: #226d8f;
  background: #d6e7ee;
  border: 1px solid #bdd5df;
  font-size: 12px;
  font-weight: 700;
}
.auth-brand h1 { color: #293742; font-size: 20px; }
.auth-brand p { color: #71808b; font-size: 12px; margin-top: 3px; }
.auth-tabs { display: flex; gap: 22px; margin-bottom: 20px; border-bottom: 1px solid #cbd5dc; }
.auth-tab {
  padding: 0 1px 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #71808b;
  cursor: pointer;
  font-size: 14px;
}
.auth-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.auth-submit { width: 100%; margin-top: 7px; }
.auth-result { min-height: 18px; margin-top: 12px; text-align: center; }

@media (max-width: 700px) {
  .app-user-bar { position: static; order: 2; width: 100%; justify-content: space-between; }
  header { flex-wrap: wrap; }
  .auth-card { padding: 24px 20px; }
}
