﻿:root {
  --bg: #f4f7fb;
  --bg-soft: #ffffff;
  --panel: #ffffff;
  --ink: #0b1220;
  --muted: #5f6b7a;
  --accent: #ff6b35;
  --accent-strong: #e4572e;
  --accent-2: #14b8a6;
  --danger: #dc2626;
  --success: #16a34a;
  --warning: #f59e0b;
  --border: #e3e8f1;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 18px;
  --radius-sm: 12px;
  --transition: 0.2s ease;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", "Noto Sans SC", sans-serif;
  color: var(--ink);
  background: radial-gradient(1200px 700px at 10% -10%, #ffe7db 0%, transparent 55%),
    radial-gradient(1000px 600px at 90% 10%, #d9f5f2 0%, transparent 55%),
    linear-gradient(180deg, #f7f9fc 0%, #eff3f9 100%);
  min-height: 100vh;
}

h1,
h2,
h3 {
  font-family: "Sora", "Noto Sans SC", sans-serif;
  font-weight: 600;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 18px 12px;
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(244, 247, 251, 0.82);
  backdrop-filter: blur(14px);
}

.topbar.compact {
  padding-top: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  display: grid;
  place-items: center;
  letter-spacing: 1px;
}

.brand-title {
  font-size: 18px;
}

.brand-sub {
  font-size: 12px;
  color: var(--muted);
}

.topbar-actions {
  display: flex;
  gap: 8px;
}

.page {
  max-width: 980px;
  margin: 0 auto;
  padding: 12px 18px 110px;
}

.hero {
  margin: 12px 0 24px;
}

.hero-card {
  background: var(--panel);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.eyebrow {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--accent-2);
  margin: 0 0 6px;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

.hero-desc {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  background: rgba(20, 184, 166, 0.12);
  color: #0f766e;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.marketing {
  margin: 24px 0;
}

.marketing-simple {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  text-align: center;
}

.marketing-title h2 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 600;
}

.marketing-title p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 14px;
}

.marketing-features {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #f8fafc;
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink);
  border: 1px solid var(--border);
}

.feature-item svg {
  width: 16px;
  height: 16px;
  color: var(--accent-2);
}

.marketing-stats-simple {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.stat-item strong {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
}

.stat-item span {
  font-size: 12px;
  color: var(--muted);
}

.stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
}

.section {
  display: none;
  animation: fadeIn 0.12s ease-out;
}

.section.active {
  display: block;
}

.section-title {
  margin: 10px 0 16px;
}

.section-title h2 {
  margin: 0 0 4px;
  font-size: 20px;
}

.section-title p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.section-grid {
  display: grid;
  gap: 16px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.auth-tab {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
}

.auth-tab.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.auth-panels {
  display: grid;
  gap: 16px;
}

.auth-panel {
  display: none;
}

.auth-panel.active {
  display: block;
}

.panel {
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  border: 1px solid var(--border);
}

.panel-header {
  margin-bottom: 14px;
}

.panel-header h2,
.panel-header h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.panel-header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.form {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.form.compact {
  gap: 8px;
  margin-top: 10px;
}

.field {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  min-width: 0;
}

.field input,
.field select,
.field textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 14px;
  color: var(--ink);
  background: #f8fafc;
}

.input-split {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #f8fafc;
  overflow: hidden;
}

.input-split.has-at .input-suffix {
  display: none;
}

.input-split input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 11px 12px;
  font-size: 14px;
  color: var(--ink);
  outline: none;
}

.input-suffix {
  padding: 11px 12px;
  background: #eef2f7;
  color: var(--muted);
  font-size: 13px;
  border-left: 1px solid var(--border);
}

.field textarea {
  resize: vertical;
}

.field.inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.field.inline input[type="checkbox"] {
  transform: scale(1.2);
  width: auto;
  flex: 0 0 auto;
}

.btn {
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn.primary:hover {
  background: var(--accent-strong);
}

.btn.ghost {
  background: transparent;
}

.btn.danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.btn + .btn {
  margin-left: 6px;
}

.status {
  min-height: 18px;
  font-size: 12px;
  color: var(--muted);
}

.status.ok {
  color: var(--success);
}

.status.error {
  color: var(--danger);
}

.hint {
  font-size: 12px;
  color: var(--muted);
}

.hint.warn {
  color: #b45309;
}

.list {
  display: grid;
  gap: 10px;
}

.tenant-plan-wrap {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.panel-subtitle {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.item {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 6px;
  background: #f8fafc;
}

.item h3 {
  margin: 0;
  font-size: 15px;
}

.item p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.tenant-plan-option.active {
  border-color: var(--accent-2);
  background: rgba(20, 184, 166, 0.12);
}

.plan-current-tag {
  color: var(--success) !important;
  font-weight: 700;
}

.item-description {
  font-size: 13px;
  line-height: 1.6;
  color: #334155;
}

.item-description-preview {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.item-description-empty {
  color: var(--muted);
  font-style: italic;
}

.account-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: #f8fafc;
  transition: all var(--transition);
}

.account-item:hover {
  border-color: var(--accent);
}

.account-item.expanded {
  background: #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.account-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}

.account-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.account-qq {
  font-weight: 600;
  font-size: 15px;
}

.account-status {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #64748b;
}

.account-status.online {
  background: rgba(16, 185, 129, 0.16);
  color: #0f766e;
}

.account-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.account-quick-actions .btn + .btn {
  margin-left: 0;
}

.account-details {
  display: none;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.account-item.expanded .account-details {
  display: block;
}

/* 小按钮样式 */
.btn-sm {
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 8px;
}

.btn-success {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}

.btn-warning {
  background: var(--warning);
  color: #fff;
  border-color: var(--warning);
}

.item .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.item input {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 12px;
}

.stat {
  font-size: 14px;
  padding: 6px 0;
}

.notice {
  background: rgba(255, 107, 53, 0.12);
  color: #b45309;
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 12px;
  margin-bottom: 12px;
  display: none;
}

.notice.active {
  display: block;
}

.hidden {
  display: none !important;
}

.footer {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  margin-top: 18px;
}

.footer strong {
  color: var(--ink);
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.9);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 4px;
  padding: 10px 12px 20px;
  backdrop-filter: blur(12px);
  z-index: 20;
}

.nav-item {
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
  padding: 8px 4px;
  border-radius: 12px;
  transition: all var(--transition);
}

.nav-item:hover {
  color: var(--accent);
}

.nav-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.nav-item::before {
  content: "";
  width: 20px;
  height: 4px;
  border-radius: 999px;
  background: rgba(95, 107, 122, 0.25);
  transition: all var(--transition);
}

.nav-item:hover::before {
  background: rgba(255, 107, 53, 0.4);
}

.nav-item.active {
  color: var(--accent);
}

.nav-item.active::before {
  background: var(--accent);
  width: 24px;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.segmented-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.segmented-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.log-panel .log-layout {
  display: grid;
  gap: 14px;
}

.log-list .list .item {
  cursor: pointer;
  transition: all var(--transition);
}

.log-list .list .item:hover {
  border-color: var(--accent);
}

.log-list .list .item.active {
  border-color: var(--accent);
  background: rgba(255, 107, 53, 0.08);
}

.log-content {
  margin: 0;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #0b1220;
  color: #e5e7eb;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  max-height: 360px;
  overflow: auto;
}

.log-view .panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

@media (min-width: 900px) {
  .log-panel .log-layout {
    grid-template-columns: 280px 1fr;
  }

  .log-content {
    max-height: 520px;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 760px) {
  .page {
    padding: 18px 24px 120px;
  }

  .section-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-card {
    display: grid;
    gap: 6px;
  }

  .bottom-nav {
    max-width: 520px;
    margin: 0 auto 12px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 20px;
  }
}

@media (min-width: 1024px) {
  .section-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar-actions {
    gap: 12px;
  }
}

/* ===== Toast 通知组件 ===== */
.toast-container {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: 90vw;
}

.toast {
  background: var(--panel);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  pointer-events: auto;
  animation: toastIn 0.3s ease;
  min-width: 200px;
  max-width: 360px;
}

.toast.toast-out {
  animation: toastOut 0.2s ease forwards;
}

.toast svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.toast.success {
  border-left: 4px solid var(--success);
}

.toast.success svg {
  color: var(--success);
}

.toast.error {
  border-left: 4px solid var(--danger);
}

.toast.error svg {
  color: var(--danger);
}

.toast.warning {
  border-left: 4px solid var(--warning);
}

.toast.warning svg {
  color: var(--warning);
}

.toast.info {
  border-left: 4px solid var(--accent-2);
}

.toast.info svg {
  color: var(--accent-2);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

/* ===== Modal 确认框组件 ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 18, 32, 0.5);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.modal-out {
  animation: fadeOut 0.15s ease forwards;
}

.modal {
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 24px;
  max-width: 400px;
  width: 100%;
  animation: modalIn 0.25s ease;
}

.modal-overlay.modal-out .modal {
  animation: modalOut 0.15s ease forwards;
}

.modal-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
}

.modal-message {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.modal-actions .btn {
  min-width: 80px;
}

.modal-plugin-detail {
  max-width: 620px;
}

.plugin-detail-head {
  margin-bottom: 14px;
}

.plugin-detail-eyebrow {
  margin-bottom: 6px;
  font-size: 11px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--accent-2);
  font-weight: 700;
}

.plugin-detail-meta {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.plugin-detail-body {
  max-height: 50vh;
  overflow: auto;
  padding: 14px 16px;
  margin-bottom: 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #f8fafc;
  color: #334155;
  font-size: 14px;
  line-height: 1.75;
  white-space: normal;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes modalOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.95);
  }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* ===== 骨架屏加载动画 ===== */
.skeleton {
  background: linear-gradient(90deg, #eef2f7 25%, #f8fafc 50%, #eef2f7 75%);
  background-size: 200% 100%;
  animation: skeleton 1.5s infinite;
  border-radius: var(--radius-sm);
}

.skeleton-text {
  height: 16px;
  margin-bottom: 8px;
}

.skeleton-text:last-child {
  width: 60%;
  margin-bottom: 0;
}

.skeleton-title {
  height: 20px;
  width: 40%;
  margin-bottom: 12px;
}

.skeleton-item {
  height: 80px;
  margin-bottom: 10px;
}

.skeleton-stat {
  height: 24px;
  width: 50%;
}

.skeleton-title {
  height: 18px;
  width: 30%;
  border-radius: 8px;
}

.skeleton-item {
  height: 70px;
  border-radius: var(--radius-sm);
}

@keyframes skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== 按钮 Loading 状态 ===== */
.btn {
  position: relative;
  transition: all var(--transition);
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn.loading {
  color: transparent !important;
  pointer-events: none;
}

.btn.loading::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  left: 50%;
  top: 50%;
  margin: -9px 0 0 -9px;
}

.btn.primary.loading::after {
  border-top-color: #fff;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== 卡片 Hover 效果 ===== */
.panel {
  transition: transform var(--transition), box-shadow var(--transition);
}

.panel:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.15);
}

.item {
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  border-color: var(--accent);
}

/* ===== 表单状态反馈 ===== */
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
}

.field.error input,
.field.error select,
.field.error textarea {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.field.success input,
.field.success select,
.field.success textarea {
  border-color: var(--success);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.field .error-message {
  color: var(--danger);
  font-size: 12px;
  margin-top: 4px;
}

/* ===== 空状态样式 ===== */
.empty-state {
  text-align: center;
  padding: 32px 16px;
  color: var(--muted);
}

.empty-state svg {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.empty-state p {
  margin: 0;
  font-size: 14px;
}

/* ===== 表单输入框密码显示切换 ===== */
.field-password {
  position: relative;
}

.field-password .toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition);
}

.field-password .toggle-password:hover {
  color: var(--accent);
}

.field-password .toggle-password svg {
  width: 18px;
  height: 18px;
}

.field-password input {
  padding-right: 40px;
}

/* ===== 卡密复制按钮 ===== */
.copy-btn {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 6px;
  transition: all var(--transition);
}

.copy-btn:hover {
  background: rgba(255, 107, 53, 0.1);
}

.copy-btn.copied {
  color: var(--success);
}

/* ===== 批量输入框 ===== */
.field-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.field-row .field {
  flex: 1;
}

.field-row .field:last-child {
  flex: 0 0 100px;
}

.field-row.action-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
}

.field-row.action-row .btn {
  margin: 0;
  white-space: nowrap;
}

/* ===== 搜索框 ===== */
.search-box {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.search-box input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: #f8fafc;
  transition: all var(--transition);
}

.search-box input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
}

.search-box .btn {
  white-space: nowrap;
}

/* ===== 筛选标签 ===== */
.filter-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition);
}

.filter-tab:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ===== 卡密格式化显示 ===== */
.card-code {
  font-family: monospace;
  letter-spacing: 1px;
  word-break: break-all;
}

/* ===== 关于弹窗样式 ===== */
.modal-about {
  max-width: 360px;
  text-align: center;
}

.modal-about .about-logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  font-size: 20px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
}

.modal-about .about-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 4px;
}

.modal-about .about-version {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 16px;
}

.modal-about .about-section {
  text-align: left;
  background: #f8fafc;
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 12px;
}

.modal-about .about-section h4 {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 8px;
}

.modal-about .about-section p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}

.modal-about .about-section a {
  color: var(--accent);
  text-decoration: none;
}

.modal-about .about-section a:hover {
  text-decoration: underline;
}

.modal-about .about-qrcode {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 8px;
}

.modal-about .about-qrcode .qrcode-item {
  text-align: center;
}

.modal-about .about-qrcode .qrcode-item img {
  width: 100px;
  height: 100px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.modal-about .about-qrcode .qrcode-item span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.modal-about .about-copyright {
  font-size: 12px;
  color: var(--muted);
  margin: 16px 0 0;
}

/* ===== 移动端简约优化 ===== */
.form.compact {
  gap: 10px;
}

.form.compact .field span {
  font-size: 12px;
  color: var(--muted);
}

.section-title {
  margin: 6px 0 14px;
}

.section-title h2 {
  margin: 0;
  font-size: 18px;
}

.panel-header {
  margin-bottom: 10px;
}

.panel-header h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.field-row.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* ===== 概览卡片 ===== */
.overview-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.overview-card {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  text-align: center;
}

.overview-card.balance-card {
  background: linear-gradient(135deg, var(--accent) 0%, #ff8a5b 100%);
  border-color: var(--accent);
  color: #fff;
}

.overview-card.balance-card .overview-label {
  color: rgba(255, 255, 255, 0.85);
}

.overview-card.balance-card .overview-value {
  color: #fff;
  font-size: 32px;
}

.overview-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.overview-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.overview-meta {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.overview-meta:empty {
  display: none;
}

.plan-active .overview-value {
  color: var(--success);
}

.plan-inactive .overview-value {
  color: var(--muted);
}

@media (max-width: 480px) {
  .overview-cards {
    grid-template-columns: 1fr;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .field-row.action-row {
    grid-template-columns: 1fr;
  }

  .field-row.cols-3 {
    grid-template-columns: 1fr;
  }

  .topbar {
    padding: 14px 14px 10px;
  }

  .brand-title {
    font-size: 16px;
  }

  .topbar-actions .btn {
    padding: 8px 10px;
    font-size: 12px;
  }

  .panel {
    padding: 14px;
  }

  .form.compact .field input,
  .form.compact .field textarea {
    padding: 10px;
    font-size: 14px;
  }

  .btn {
    padding: 10px 14px;
    font-size: 14px;
  }

  .bottom-nav {
    padding: 8px 10px 18px;
  }

  .nav-item {
    font-size: 10px;
    padding: 6px 2px;
  }
}

/* ===== 2026 dark mobile-first refresh ===== */
:root {
  --bg: #080b10;
  --bg-soft: #0f141d;
  --panel: #121923;
  --panel-2: #172231;
  --ink: #f4f7fb;
  --muted: #99a6b8;
  --accent: #38bdf8;
  --accent-strong: #0ea5e9;
  --accent-2: #f6c177;
  --danger: #fb7185;
  --success: #34d399;
  --warning: #fbbf24;
  --border: rgba(148, 163, 184, 0.18);
  --border-strong: rgba(148, 163, 184, 0.32);
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
  --radius: 8px;
  --radius-sm: 8px;
}

html {
  color-scheme: dark;
}

body {
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.08) 0 1px, transparent 1px 46px),
    linear-gradient(180deg, #080b10 0%, #0b111a 48%, #111827 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 34%);
  z-index: -1;
}

h1,
h2,
h3 {
  letter-spacing: 0;
}

.topbar {
  padding: 14px 14px 10px;
  background: rgba(8, 11, 16, 0.82);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}

.brand {
  min-width: 0;
}

.brand-mark,
.modal-about .about-logo {
  border-radius: 8px;
  color: #051018;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 12px 30px rgba(56, 189, 248, 0.18);
}

.brand-title {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.2;
}

.brand-sub {
  color: var(--muted);
  max-width: 44vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions {
  flex: 0 0 auto;
}

.page {
  width: min(100%, 1180px);
  padding: 12px 14px 108px;
}

.hero {
  margin: 8px 0 16px;
}

.hero-card,
.marketing-simple,
.panel,
.overview-card,
.toast,
.modal {
  background: linear-gradient(180deg, rgba(18, 25, 35, 0.96), rgba(13, 18, 26, 0.96));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border-radius: 10px;
}

.hero-card::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 42%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-2));
}

.eyebrow,
.plugin-detail-eyebrow {
  color: var(--accent-2);
  letter-spacing: 1.2px;
}

.hero h1 {
  font-size: clamp(24px, 8vw, 42px);
  line-height: 1.12;
}

.hero-desc,
.section-title p,
.panel-header p,
.marketing-title p,
.item p,
.hint,
.status,
.footer,
.overview-label,
.overview-meta,
.modal-message,
.plugin-detail-meta {
  color: var(--muted);
}

.notice {
  background: rgba(246, 193, 119, 0.12);
  color: #ffd49a;
  border: 1px solid rgba(246, 193, 119, 0.22);
}

.chip {
  background: rgba(56, 189, 248, 0.12);
  color: #b8e9ff;
  border: 1px solid rgba(56, 189, 248, 0.22);
}

.marketing {
  margin: 16px 0 18px;
}

.marketing-simple {
  padding: 18px;
  text-align: left;
}

.marketing-features {
  justify-content: flex-start;
  gap: 8px;
}

.feature-item {
  background: rgba(23, 34, 49, 0.78);
  color: var(--ink);
  border-color: var(--border);
}

.feature-item svg {
  color: var(--accent);
}

.marketing-stats-simple {
  justify-content: space-between;
  gap: 10px;
  border-top-color: var(--border);
}

.stat-item strong,
.overview-value {
  color: var(--ink);
}

.stat-divider {
  background: var(--border);
}

.auth-tabs,
.segmented,
.filter-tabs {
  gap: 6px;
}

.auth-tab,
.segmented-btn,
.filter-tab,
.btn {
  border-color: var(--border);
  color: var(--ink);
  background: rgba(23, 34, 49, 0.72);
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}

.auth-tab,
.segmented-btn {
  border-radius: 8px;
}

.auth-tab.active,
.segmented-btn.active,
.filter-tab.active,
.btn.primary {
  color: #06121a;
  background: linear-gradient(135deg, var(--accent), #8be9ff);
  border-color: rgba(125, 211, 252, 0.8);
  box-shadow: 0 10px 24px rgba(56, 189, 248, 0.2);
}

.btn.primary:hover,
.auth-tab.active:hover,
.segmented-btn.active:hover,
.filter-tab.active:hover {
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
}

.btn:hover,
.auth-tab:hover,
.segmented-btn:hover,
.filter-tab:hover {
  border-color: var(--border-strong);
  background: rgba(30, 41, 59, 0.9);
}

.btn.ghost {
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.36);
}

.btn.danger {
  color: #fff;
  background: rgba(251, 113, 133, 0.16);
  border-color: rgba(251, 113, 133, 0.45);
}

.btn-success {
  color: #052016;
  background: var(--success);
  border-color: var(--success);
}

.btn-warning {
  color: #1f1300;
  background: var(--warning);
  border-color: var(--warning);
}

.panel {
  padding: 16px;
}

.panel:hover,
.item:hover {
  transform: none;
  box-shadow: var(--shadow);
}

.panel-header h2,
.panel-header h3,
.section-title h2,
.marketing-title h2,
.item h3,
.modal-title {
  color: var(--ink);
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 12px;
}

.section-title h2 {
  font-size: 20px;
}

.section-grid,
.auth-panels,
.list {
  gap: 10px;
}

.item,
.account-item {
  background: rgba(15, 23, 42, 0.72);
  border-color: var(--border);
}

.item-description,
.plugin-detail-body {
  color: #cbd5e1;
}

.account-item.expanded {
  background: rgba(23, 34, 49, 0.92);
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.12);
}

.account-status {
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.14);
}

.account-status.online {
  color: #a7f3d0;
  background: rgba(52, 211, 153, 0.16);
}

.account-details {
  border-top-color: var(--border);
}

.field {
  color: #cbd5e1;
}

.field input,
.field select,
.field textarea,
.input-split,
.search-box input,
.item input,
.modal-message input {
  color: var(--ink);
  background: rgba(8, 13, 20, 0.82);
  border-color: var(--border);
}

.field input::placeholder,
.field textarea::placeholder,
.search-box input::placeholder {
  color: rgba(153, 166, 184, 0.72);
}

.input-split input {
  color: var(--ink);
}

.input-suffix {
  color: #cbd5e1;
  background: rgba(23, 34, 49, 0.9);
  border-left-color: var(--border);
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}

input[type="file"]::file-selector-button {
  margin-right: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #06121a;
  background: var(--accent);
  padding: 8px 10px;
  font-weight: 700;
}

input[type="checkbox"] {
  accent-color: var(--accent);
}

.overview-cards {
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.overview-card {
  padding: 15px 12px;
  text-align: left;
}

.overview-card.balance-card {
  color: #06121a;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  border-color: transparent;
}

.overview-card.balance-card .overview-label,
.overview-card.balance-card .overview-meta {
  color: rgba(6, 18, 26, 0.72);
}

.overview-card.balance-card .overview-value {
  color: #06121a;
}

.plan-active .overview-value {
  color: var(--success);
}

.plan-inactive .overview-value {
  color: var(--muted);
}

.bottom-nav {
  left: 10px;
  right: 10px;
  bottom: 10px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(12, 18, 27, 0.9);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
}

.nav-item {
  min-width: 0;
  color: var(--muted);
  border-radius: 10px;
  padding: 8px 4px;
}

.nav-item::before {
  width: 18px;
  height: 3px;
  background: rgba(148, 163, 184, 0.3);
}

.nav-item:hover,
.nav-item.active {
  color: var(--accent);
  background: rgba(56, 189, 248, 0.08);
}

.nav-item.active::before {
  width: 24px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.log-content {
  color: #dbeafe;
  background: #05070b;
  border-color: rgba(56, 189, 248, 0.18);
}

.log-tools {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.log-filter-row {
  margin: 0;
}

.log-msg-filter {
  margin: 0;
}

.modal-overlay {
  background: rgba(3, 7, 18, 0.72);
}

.modal {
  max-height: min(86vh, 720px);
  overflow: auto;
}

.modal-message {
  line-height: 1.65;
}

.modal-message label {
  color: #cbd5e1;
}

.modal-message input {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 10px;
}

.plugin-detail-body,
.modal-about .about-section {
  background: rgba(8, 13, 20, 0.72);
  border-color: var(--border);
}

.modal-about .about-section a,
.copy-btn {
  color: var(--accent);
}

.copy-btn:hover {
  background: rgba(56, 189, 248, 0.12);
}

.toast-container {
  top: 14px;
}

.toast {
  color: var(--ink);
}

.toast.success {
  border-left-color: var(--success);
}

.toast.error {
  border-left-color: var(--danger);
}

.toast.warning {
  border-left-color: var(--warning);
}

.toast.info {
  border-left-color: var(--accent);
}

.skeleton {
  background: linear-gradient(90deg, rgba(30, 41, 59, 0.8) 25%, rgba(51, 65, 85, 0.9) 50%, rgba(30, 41, 59, 0.8) 75%);
  background-size: 200% 100%;
}

.empty-state {
  color: var(--muted);
}

.footer strong {
  color: #cbd5e1;
}

@media (max-width: 480px) {
  .topbar {
    gap: 10px;
  }

  .topbar-actions {
    gap: 6px;
  }

  .topbar-actions .btn {
    padding: 8px 9px;
    font-size: 12px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .brand-title {
    font-size: 15px;
  }

  .brand-sub {
    font-size: 11px;
  }

  .auth-tab {
    padding: 10px 6px;
  }

  .marketing-stats-simple {
    gap: 6px;
  }

  .stat-item strong {
    font-size: 21px;
  }

  .account-summary,
  .account-info {
    align-items: flex-start;
  }

  .account-summary {
    flex-direction: column;
  }

  .account-quick-actions,
  .actions {
    width: 100%;
  }

  .actions .btn,
  .account-quick-actions .btn {
    flex: 1 1 auto;
  }
}

@media (min-width: 760px) {
  .page {
    padding: 18px 24px 122px;
  }

  body[data-page="login"] .page {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.75fr);
    grid-template-areas:
      "hero tabs"
      "hero panels"
      "marketing panels"
      "footer footer";
    align-items: start;
    gap: 16px 18px;
  }

  body[data-page="login"] .hero {
    grid-area: hero;
    margin: 0;
  }

  body[data-page="login"] .auth-tabs {
    grid-area: tabs;
    margin-bottom: 0;
  }

  body[data-page="login"] .auth-panels {
    grid-area: panels;
  }

  body[data-page="login"] .marketing {
    grid-area: marketing;
    margin: 0;
  }

  body[data-page="login"] .footer {
    grid-area: footer;
  }

  .hero-card {
    min-height: 260px;
    align-content: end;
  }

  .bottom-nav {
    max-width: 620px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    margin: 0;
  }
}

@media (min-width: 1024px) {
  .topbar {
    padding: 16px 28px 12px;
  }

  .page {
    padding-bottom: 118px;
  }

  body[data-page="admin"] .overview-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body[data-page="tenant"] .section-grid,
  body[data-page="admin"] .section-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-page="admin"] .section[data-section="settings"].active {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 12px;
  }

  body[data-page="admin"] .section[data-section="settings"] .section-title,
  body[data-page="admin"] .section[data-section="settings"] > .actions {
    grid-column: 1 / -1;
  }

  body[data-page="admin"] .section[data-section="billing"].active,
  body[data-page="tenant"] .section[data-section="plugins"].active,
  body[data-page="tenant"] .section[data-section="accounts"].active {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  body[data-page="admin"] .section[data-section="billing"] .section-title,
  body[data-page="tenant"] .section[data-section="plugins"] .section-title,
  body[data-page="tenant"] .section[data-section="accounts"] .section-title {
    grid-column: 1 / -1;
  }
}

/* ===== 插件监管 ===== */
.sv-toggles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  margin: 2px 0 10px;
}

.sv-toggles label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}

.sv-toggles input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.sv-hits {
  margin: 8px 0 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(220, 38, 38, 0.07);
  border: 1px solid rgba(220, 38, 38, 0.22);
  font-size: 13px;
}

.sv-hits ul {
  margin: 6px 0 0;
  padding-left: 18px;
  line-height: 1.6;
}

.sv-hits code {
  font-size: 12px;
  color: var(--danger);
}

.modal-inspect {
  max-width: 760px;
  max-height: 84vh;
  overflow: auto;
}

.sv-inspect h4 {
  margin: 14px 0 6px;
  font-size: 14px;
}

.sv-inspect ul {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

.sv-inspect ul code {
  color: var(--ink);
}

.sv-code {
  margin: 6px 0 0;
  padding: 10px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.5;
  max-height: 260px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.sv-inspect details {
  margin: 6px 0;
}

.sv-inspect summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--ink);
}

/* ===== 后台日志 ===== */
.log-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  vertical-align: middle;
}

.log-badge-info {
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
}

.log-badge-warning {
  background: rgba(245, 158, 11, 0.18);
  color: #f59e0b;
}

.log-badge-danger {
  background: rgba(239, 68, 68, 0.18);
  color: #ef4444;
}

/* ===== 租户账号状态 ===== */
.tenant-status-active {
  color: #22c55e;
}

.tenant-status-warning {
  color: #f59e0b;
}

.tenant-status-disabled,
.tenant-status-blocked {
  color: #ef4444;
}

/* ===== 上传警告条（租户端） ===== */
.warn-banner {
  margin: 0 0 14px;
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #ef4444;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
}

/* ===== 白名单徽标 ===== */
.wl-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(34, 197, 94, 0.18);
  color: #22c55e;
}

/* ===== 每日签到（租户端概览卡） ===== */
.checkin-card .overview-value {
  color: var(--accent);
}

.checkin-card .btn {
  width: 100%;
  margin-top: 10px;
}

.checkin-card .status {
  margin-top: 6px;
}

.checkin-card .status:empty {
  display: none;
}

/* ===== 后台「设置」页：可折叠面板 ===== */
/* 设置项太多，堆成一长条很难找。改成列表：每项一个标题行，点一下展开内容。
   折叠逻辑在 app.js 的 initSettingsAccordion()，这里只管样式。 */
.panel.collapsible > .panel-header {
  cursor: pointer;
  user-select: none;
  position: relative;
  padding-right: 26px;
}

.panel.collapsible > .panel-header::after {
  content: "\25BE";
  position: absolute;
  top: 2px;
  right: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
}

.panel.collapsible.collapsed > .panel-header::after {
  content: "\25B8";
}

/* 收起时只留标题行；header 里的说明文字也一起藏掉，否则照样占地方 */
.panel.collapsible.collapsed > .panel-header p {
  display: none;
}

.panel.collapsible.collapsed > .panel-header {
  margin-bottom: 0;
}

.panel.collapsible.collapsed > *:not(.panel-header) {
  display: none;
}

/* 折叠面板不做 hover 上浮，否则点一下整块跳一下 */
.panel.collapsible:hover {
  transform: none;
  box-shadow: var(--shadow);
  border-color: var(--accent);
}
