:root {
  --bg: #080c18;
  --bg-soft: #0d1424;
  --panel: rgba(17, 25, 43, 0.86);
  --panel-solid: #111a2c;
  --border: rgba(120, 150, 210, 0.16);
  --border-strong: rgba(120, 160, 230, 0.3);
  --text: #e8eefc;
  --muted: #8b9bb8;
  --dim: #5f6d86;
  --accent: #4c8dff;
  --accent-2: #19c6b6;
  --success: #36d399;
  --warn: #f2b65a;
  --danger: #ff6b81;
  --radius: 16px;
  --mono: "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

[v-cloak] {
  display: none;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.55;
}

body {
  background:
    radial-gradient(1100px 600px at 12% -10%, rgba(55, 109, 255, 0.2), transparent 60%),
    radial-gradient(900px 600px at 95% 0%, rgba(25, 198, 182, 0.13), transparent 55%),
    radial-gradient(900px 700px at 50% 110%, rgba(93, 62, 214, 0.12), transparent 60%),
    var(--bg);
  min-height: 100vh;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.mono {
  font-family: var(--mono);
  font-size: 12.5px;
}

.muted {
  color: var(--muted);
}

.hint {
  color: var(--muted);
  font-size: 12.5px;
  margin: 10px 0 0;
}

.hint.error,
.error-text {
  color: var(--danger);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 17px;
  letter-spacing: 0.2px;
}

h2 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

/* 登录 */

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 400px;
  padding: 38px 34px 30px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(23, 33, 56, 0.96), rgba(11, 18, 32, 0.96));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  text-align: center;
}

.brand-mark {
  width: 54px;
  height: 54px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, #4c8dff, #19c6b6);
  color: #06111f;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: 0.5px;
  box-shadow: 0 12px 30px rgba(76, 141, 255, 0.4);
}

.brand-mark.small {
  width: 42px;
  height: 42px;
  margin: 0;
  border-radius: 12px;
  font-size: 15px;
  flex: none;
}

.login-card h1 {
  font-size: 22px;
  margin-bottom: 8px;
}

.login-card > .muted {
  font-size: 13px;
}

.login-form {
  margin-top: 26px;
  display: grid;
  gap: 12px;
}

.login-form input,
input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(7, 12, 24, 0.65);
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px rgba(76, 141, 255, 0.13);
}

input::placeholder,
textarea::placeholder {
  color: var(--dim);
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 30px;
}

.login-foot {
  margin-top: 20px;
  font-size: 11.5px;
  color: var(--dim);
}

/* 布局 */

.shell {
  max-width: 1380px;
  margin: 0 auto;
  padding: 18px 26px 30px;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(13, 20, 36, 0.72);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 14px;
  z-index: 20;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.28);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 240px;
}

.brand p {
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.2px;
}

.stats {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.stat {
  min-width: 74px;
  padding: 7px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.04);
  text-align: center;
}

.stat strong {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  line-height: 1.35;
  font-family: var(--mono);
}

.stat span {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.5px;
}

.top-actions {
  display: flex;
  gap: 8px;
}

.tabs {
  display: flex;
  gap: 6px;
  margin: 18px 0;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(13, 20, 36, 0.6);
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
}

.tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px 16px;
  border-radius: 9px;
  cursor: pointer;
  white-space: nowrap;
  font-size: 13px;
  transition: all 0.18s ease;
}

.tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.tab.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(76, 141, 255, 0.28), rgba(25, 198, 182, 0.18));
  box-shadow: inset 0 0 0 1px rgba(120, 170, 255, 0.24);
}

.tab-no {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--dim);
  margin-right: 7px;
}

.tab.active .tab-no {
  color: var(--accent);
}

.content {
  min-height: 40vh;
}

.grid-two {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.span-2 {
  grid-column: 1 / -1;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(165deg, rgba(19, 28, 48, 0.85), rgba(11, 18, 32, 0.9));
  padding: 20px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  margin-bottom: 18px;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.card-head p {
  margin-top: 3px;
}

.card-head > .row {
  margin: 0;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  color: var(--accent-2);
  background: rgba(25, 198, 182, 0.1);
  border: 1px solid rgba(25, 198, 182, 0.22);
  white-space: nowrap;
}

.pill.subtle {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.07);
}

.count {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  color: var(--accent);
  background: rgba(76, 141, 255, 0.14);
  margin-left: 6px;
  vertical-align: 2px;
}

.notice {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(76, 141, 255, 0.07);
  color: var(--muted);
  font-size: 12.5px;
  margin-bottom: 14px;
}

.notice.warn {
  border-color: rgba(242, 182, 90, 0.28);
  background: rgba(242, 182, 90, 0.09);
  color: #e9c382;
}

/* 按钮 */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 9px 15px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
  font-size: 13px;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.09);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn.primary {
  background: linear-gradient(135deg, #4c8dff, #3477f2);
  color: #fff;
  box-shadow: 0 8px 22px rgba(64, 124, 255, 0.3);
}

.btn.primary:hover {
  filter: brightness(1.08);
}

.btn.ghost {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
}

.btn.ghost:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.btn.small {
  padding: 6px 11px;
  font-size: 12px;
}

.btn.tiny {
  padding: 4px 8px;
  font-size: 11.5px;
  border-radius: 7px;
}

.btn.block {
  width: 100%;
}

.danger-text {
  color: var(--danger) !important;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.row.right {
  justify-content: flex-end;
  margin-top: 20px;
}

.empty {
  padding: 30px 20px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
  line-height: 1.8;
}

.card.empty {
  padding: 48px 30px;
  background: rgba(13, 20, 36, 0.35);
}

/* 二维码 */

.qr-stage {
  min-height: 286px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: radial-gradient(420px 220px at 50% 15%, rgba(76, 141, 255, 0.1), transparent 70%), rgba(5, 9, 18, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  gap: 14px;
}

.qr-stage.compact {
  min-height: 250px;
}

.qr-img {
  width: 218px;
  height: 218px;
  border-radius: 12px;
  background: #fff;
  padding: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.qr-img.small {
  width: 196px;
  height: 196px;
}

.qr-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dim);
  display: inline-block;
}

.dot.live {
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(54, 211, 153, 0.14);
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.qr-placeholder {
  text-align: center;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 13px;
  max-width: 360px;
}

.qr-placeholder p {
  font-size: 12.5px;
  line-height: 1.7;
}

.qr-placeholder.compact {
  padding: 26px;
}

.big-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  border: 1px solid var(--border-strong);
  background: rgba(76, 141, 255, 0.1);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.qr-placeholder.success .big-icon {
  color: var(--success);
  border-color: rgba(54, 211, 153, 0.4);
  background: rgba(54, 211, 153, 0.1);
}

.qr-grid {
  display: grid;
  grid-template-columns: repeat(4, 14px);
  gap: 7px;
  opacity: 0.4;
}

.qr-grid span {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: var(--accent);
}

.qr-grid span:nth-child(3n) {
  background: var(--accent-2);
  opacity: 0.65;
}

.qr-grid span:nth-child(5n) {
  opacity: 0.2;
}

.inline-form {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 340px;
}

.inline-form input {
  flex: 1;
  min-width: 0;
}

/* 批量 */

.batch-controls {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.batch-body {
  border-top: 1px dashed var(--border);
  padding-top: 16px;
}

.batch-progress {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 12px;
}

.batch-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.batch-slot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  font-size: 11.5px;
}

.slot-index {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  flex: none;
}

.slot-state {
  color: var(--muted);
}

.slot-detail {
  margin-left: auto;
  color: var(--dim);
  font-size: 10.5px;
}

.batch-slot.authorized {
  border-color: rgba(54, 211, 153, 0.3);
  background: rgba(54, 211, 153, 0.06);
}

.batch-slot.authorized .slot-state,
.batch-slot.authorized .slot-detail {
  color: var(--success);
}

.batch-slot.pending,
.batch-slot.starting {
  border-color: rgba(76, 141, 255, 0.3);
  background: rgba(76, 141, 255, 0.06);
}

.batch-slot.pending .slot-state,
.batch-slot.starting .slot-state {
  color: var(--accent);
}

.batch-slot.error {
  border-color: rgba(255, 107, 129, 0.3);
}

.batch-slot.error .slot-state {
  color: var(--danger);
}

/* 表单 */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.field.inline {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.field.inline input {
  width: 84px;
}

.field > span {
  letter-spacing: 0.3px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12.5px;
  cursor: pointer;
  white-space: nowrap;
}

.check input {
  width: 14px;
  height: 14px;
  accent-color: var(--accent);
  padding: 0;
}

.search-row,
.source-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.search-row .grow,
.source-row .grow {
  flex: 1;
  min-width: 220px;
}

.search-row select {
  width: 170px;
}

.search-row .check {
  padding-bottom: 9px;
}

.search-row .btn {
  height: 38px;
}

.source-row .check {
  padding-bottom: 9px;
}

/* 表格 */

.table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.table-wrap.tall {
  max-height: 520px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  vertical-align: middle;
  font-size: 12.5px;
}

th {
  color: var(--muted);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.025);
  position: sticky;
  top: 0;
  z-index: 1;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.empty-cell {
  color: var(--dim);
  text-align: center;
  padding: 30px 15px !important;
  font-size: 12.5px;
}

.actions {
  text-align: right;
  white-space: nowrap;
}

.check-col {
  width: 38px;
}

.check-col input {
  width: 14px;
  height: 14px;
  accent-color: var(--accent);
  padding: 0;
}

.cell-title {
  font-size: 13px;
  color: var(--text);
}

.cell-title a,
td a {
  font-size: 11.5px;
}

.verify {
  margin-left: 5px;
  font-size: 10px;
  color: var(--accent);
  border: 1px solid rgba(76, 141, 255, 0.3);
  border-radius: 4px;
  padding: 0 4px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  white-space: nowrap;
}

.tag.joined,
.tag.already {
  color: var(--success);
  background: rgba(54, 211, 153, 0.11);
}

.tag.new,
.tag.running {
  color: var(--accent);
  background: rgba(76, 141, 255, 0.12);
}

.tag.pending {
  color: var(--warn);
  background: rgba(242, 182, 90, 0.12);
}

.tag.failed {
  color: var(--danger);
  background: rgba(255, 107, 129, 0.11);
}

.tag.ignored {
  color: var(--dim);
  background: rgba(255, 255, 255, 0.03);
}

/* 一键加群 */

.target-input {
  min-height: 210px;
  resize: vertical;
  line-height: 1.7;
  font-family: var(--mono);
  font-size: 12px;
}

.join-options {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.join-options select {
  width: 100%;
}

.rule-list {
  display: grid;
  gap: 8px;
}

.rule {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  font-size: 12.5px;
}

.rule span {
  color: var(--muted);
}

.rule strong {
  font-weight: 500;
  font-family: var(--mono);
  font-size: 12px;
}

/* 采集 */

.switch {
  width: 34px;
  height: 19px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: all 0.16s ease;
}

.switch span {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--dim);
  transition: all 0.16s ease;
}

.switch.on {
  background: rgba(25, 198, 182, 0.25);
  border-color: rgba(25, 198, 182, 0.45);
}

.switch.on span {
  background: var(--accent-2);
  transform: translateX(14px);
}

.compact-select {
  width: auto;
  min-width: 118px;
  padding: 7px 28px 7px 10px;
  font-size: 12px;
}

/* 任务 */

.job-card {
  margin-top: 0;
}

.job-id {
  color: var(--dim);
  font-size: 11px;
  margin-left: 6px;
}

.progress {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  margin: 6px 0 12px;
}

.progress > div {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.3s ease;
}

.job-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}

.job-stats .ok { color: var(--success); }
.job-stats .warn { color: var(--warn); }
.job-stats .bad { color: var(--danger); }

.job-items {
  margin-top: 14px;
  border-top: 1px dashed var(--border);
  padding-top: 10px;
  display: grid;
  gap: 6px;
  max-height: 280px;
  overflow: auto;
}

.job-item {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11.5px;
  min-width: 0;
}

.job-item .target {
  color: var(--text);
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-item .muted {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 日志 */

.log-list {
  max-height: 620px;
  overflow: auto;
  border-top: 1px solid var(--border);
}

.log-line {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 8px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.035);
  font-size: 12px;
}

.log-time {
  color: var(--dim);
  flex: none;
  font-size: 11px;
}

.log-level {
  width: 54px;
  flex: none;
  font-size: 10px;
  letter-spacing: 0.6px;
  color: var(--muted);
  font-family: var(--mono);
}

.log-line.info .log-level { color: var(--accent); }
.log-line.warn .log-level { color: var(--warn); }
.log-line.error .log-level { color: var(--danger); }

.log-msg {
  min-width: 0;
  color: #b9c6dd;
}

/* 弹窗 */

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(3, 6, 14, 0.7);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 22px;
}

.modal-card {
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(165deg, #16203a, #0c1425);
  padding: 24px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
}

.settings-form {
  display: grid;
  gap: 12px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.settings-form .notice {
  margin: 4px 0 0;
}

/* Toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 200;
  max-width: min(90vw, 560px);
  padding: 11px 18px;
  border-radius: 11px;
  border: 1px solid rgba(120, 170, 255, 0.26);
  background: rgba(18, 28, 48, 0.96);
  color: var(--text);
  font-size: 12.5px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  animation: toast-in 0.2s ease;
}

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 18px 4px 0;
  color: var(--dim);
  font-size: 11px;
}

/* 滚动条 */

::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(120, 150, 210, 0.2);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(120, 150, 210, 0.34);
}

@media (max-width: 1080px) {
  .grid-two {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }

  .topbar {
    flex-wrap: wrap;
    position: static;
  }

  .stats {
    order: 3;
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
  }

  .stat {
    flex: 1;
  }

  .top-actions {
    margin-left: auto;
  }
}

@media (max-width: 720px) {
  .shell {
    padding: 12px 14px 24px;
  }

  .brand {
    min-width: 0;
  }

  .brand p {
    display: none;
  }

  .card {
    padding: 16px;
  }

  .join-options,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .search-row select {
    width: 100%;
  }

  .qr-img {
    width: 190px;
    height: 190px;
  }

  .footer {
    flex-direction: column;
    gap: 4px;
  }
}

/* ===== 多用户 / 计费 / 后台 扩展 ===== */

.auth-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 22px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(7, 12, 24, 0.5);
}

.auth-tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.16s ease;
}

.auth-tab.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(76, 141, 255, 0.3), rgba(25, 198, 182, 0.18));
  box-shadow: inset 0 0 0 1px rgba(120, 170, 255, 0.24);
}

.expired-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.ad-line {
  margin-bottom: 12px;
}

.ad-line a {
  margin-left: 6px;
  white-space: nowrap;
}

.notice.success {
  border-color: rgba(54, 211, 153, 0.3);
  background: rgba(54, 211, 153, 0.08);
  color: var(--success);
  display: grid;
  gap: 4px;
  margin-top: 14px;
  word-break: break-all;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}

.plan-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: radial-gradient(240px 140px at 50% 0%, rgba(76, 141, 255, 0.12), transparent 70%), rgba(9, 15, 28, 0.6);
  transition: border-color 0.16s ease, transform 0.16s ease;
}

.plan-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.plan-name {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.3px;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.plan-price strong {
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 700;
  color: #fff;
}

.plan-price span {
  font-size: 11px;
  color: var(--accent-2);
}

.plan-days {
  font-size: 12px;
  color: var(--dim);
  margin-bottom: 4px;
}

.pay-body {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.pay-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(5, 9, 18, 0.5);
}

.pay-info {
  display: grid;
  gap: 12px;
}

.pay-info .inline-form {
  max-width: none;
}

.pay-info .notice {
  margin-bottom: 0;
}

.admin-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.admin-tab {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  padding: 7px 14px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 12.5px;
  transition: all 0.16s ease;
}

.admin-tab:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.admin-tab.active {
  color: #fff;
  border-color: rgba(120, 170, 255, 0.35);
  background: linear-gradient(135deg, rgba(76, 141, 255, 0.26), rgba(25, 198, 182, 0.16));
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: linear-gradient(165deg, rgba(19, 28, 48, 0.8), rgba(11, 18, 32, 0.85));
}

.metric strong {
  display: block;
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 600;
  color: #fff;
}

.metric span {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.4px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

#app textarea {
  resize: vertical;
  min-height: 72px;
}

@media (max-width: 860px) {
  .pay-body {
    grid-template-columns: 1fr;
  }

  .pay-qr {
    max-width: 300px;
    margin: 0 auto;
  }
}
