/**
 * User Common Styles
 * 统一用户端所有页面的公共样式
 */

/* ========== 1. CSS Variables & Base ========== */
:root {
  --color-bg: #ffffff;
  --color-surface: #f7f8fa;
  --color-border: rgba(0,0,0,0.06);
  --color-text: #111111;
  --color-text-secondary: #666666;
  --color-text-muted: #999999;
  --color-primary: #000000;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --shadow: 0 4px 20px rgba(0,0,0,0.04);
  --shadow-hover: 0 8px 30px rgba(0,0,0,0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* Override Bootstrap 5 Reboot */
p, h1, h2, h3, h4, h5, h6, ul, ol, dl, address, pre, figure, blockquote {
  margin-bottom: 0;
}
ul, ol {
  padding-left: 0;
}

/* ========== 2. Layout (head.php) ========== */
.app {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background: var(--color-bg);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform .3s ease;
}

.sidebar-brand {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 24px;
  border-bottom: 1px solid var(--color-border);
}

.sidebar-brand i {
  width: 32px; height: 32px;
  background: #000;
  color: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.sidebar-brand span {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
}

.nav-section {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 16px 12px 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: all .2s ease;
  margin-bottom: 2px;
  cursor: pointer;
}

.nav-item:hover {
  background: var(--color-surface);
  color: var(--color-text);
}

.nav-item.active {
  background: var(--color-text);
  color: #fff;
}

.nav-item i {
  width: 20px;
  text-align: center;
  font-size: 15px;
}

.nav-item .label {
  margin-left: auto;
  background: #ff4d4f;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 20px;
}

.nav-sub {
  padding-left: 44px;
  overflow: hidden;
  max-height: 0;
  transition: max-height .3s ease;
}

.nav-item.open + .nav-sub,
.nav-sub.open {
  max-height: 500px;
}

.nav-sub .nav-item {
  padding: 8px 12px;
  font-size: 13px;
}

.nav-arrow {
  margin-left: auto;
  font-size: 12px;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--color-border);
  text-align: center;
  font-size: 12px;
  color: var(--color-text-muted);
}

.main {
  flex: 1;
  margin-left: 260px;
  display: flex;
  min-width: 0;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  height: 72px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 90;
}

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

.topbar-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  position: relative;
}

.topbar-user img {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.topbar-user span {
  font-size: 14px;
  font-weight: 600;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-hover);
  min-width: 160px;
  max-width: calc(100vw - 40px);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all .2s ease;
  z-index: 200;
}

.topbar-user:hover .dropdown-menu,
.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media (max-width: 576px) {
  .dropdown-menu {
    right: -10px;
    min-width: 140px;
  }
}

.dropdown-menu a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: all .15s;
}

.dropdown-menu a:hover {
  background: var(--color-surface);
  color: var(--color-text);
}

.dropdown-menu .divider {
  height: 1px;
  background: var(--color-border);
  margin: 6px 0;
}

.content {
  flex: 1;
  padding: 32px;
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

/* ========== 3. Components (head.php) ========== */
.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: box-shadow .2s ease;
  width: 100%;
  min-width: 0;
}

.card:hover {
  box-shadow: var(--shadow);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all .2s ease;
  font-family: inherit;
}

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

.btn-primary:hover { opacity: 0.9; transform: scale(0.98); }
.btn-success {
  background: #52c41a;
  color: #fff;
}
.btn-success:hover { opacity: 0.9; transform: scale(0.98); }
.btn-info {
  background: #1677ff;
  color: #fff;
}
.btn-info:hover { opacity: 0.9; transform: scale(0.98); }
.btn-danger {
  background: #ff4d4f;
  color: #fff;
}
.btn-danger:hover { opacity: 0.9; transform: scale(0.98); }

.btn-default {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-sm { padding: 6px 14px; font-size: 12px; border-radius: 8px; }
.btn-xs { padding: 4px 10px; font-size: 11px; border-radius: 6px; }

.btn-white-dark {
  background: #fff;
  color: #111;
}

.alert {
  display: block;
  padding: 14px 18px 14px 44px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 20px;
  line-height: 1.6;
  position: relative;
}
.alert > i:first-child {
  position: absolute;
  left: 18px;
  top: 15px;
  font-size: 14px;
}

.alert-danger {
  background: #fff1f0;
  color: #cf1322;
}

.alert-warning {
  background: #fffbe6;
  color: #d48806;
}

.alert-success {
  background: #f6ffed;
  color: #389e0d;
}
.alert-info {
  background: #e6f7ff;
  color: #0958d9;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: transform .2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
}

.stat-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  flex-shrink: 0;
}

.stat-info { flex: 1; min-width: 0; }

.stat-value {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 13px;
  color: var(--color-text-muted);
  font-weight: 500;
}

.table-wrap { overflow-x: auto; }

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}

.table th:first-child { border-radius: 10px 0 0 10px; }
.table th:last-child { border-radius: 0 10px 10px 0; }

.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  font-weight: 500;
}

.table tr:hover td {
  background: rgba(0,0,0,0.01);
  color: var(--color-text);
}

.row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}

.col-6 { grid-column: span 6; }
.col-12 { grid-column: span 12; }
.col-md-6 { grid-column: span 6; }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
}

.app-footer {
  padding: 20px 32px;
  border-top: 1px solid var(--color-border);
  font-size: 12px;
  color: var(--color-text-muted);
  display: flex;
  justify-content: space-between;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
  z-index: 500;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal.active { display: flex; }

.modal-content {
  background: #fff;
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-hover);
  overflow: hidden;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h4 { font-size: 16px; font-weight: 700; }

.modal-header .close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--color-text-muted);
}

.modal-body { padding: 24px; font-size: 14px; line-height: 1.7; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ========== 4. Dashboard (index.php) ========== */
.dashboard { width: 100%; }

.hero {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, #111 0%, #2a2a2a 100%);
  border-radius: 20px; padding: 28px 32px; margin-bottom: 24px;
  color: #fff; gap: 20px; flex-wrap: wrap;
}
.hero-main { display: flex; align-items: center; gap: 18px; }
.hero-avatar {
  width: 64px; height: 64px; border-radius: 50%; object-fit: cover;
  border: 3px solid rgba(255,255,255,0.15);
}
.hero-greeting { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.hero-meta { font-size: 13px; color: rgba(255,255,255,0.6); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hero-badge {
  background: rgba(255,255,255,0.12); padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.85);
}
.hero-sep { width: 1px; height: 12px; background: rgba(255,255,255,0.2); }
.hero-status { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.hero-status i { font-size: 8px; }
.hero-status-success { color: #52c41a; }
.hero-status-warning { color: #faad14; }
.hero-status-danger  { color: #ff4d4f; }
.hero-actions { display: flex; gap: 10px; }

.btn-white-dark {
  background: #fff; color: #111; border: 1px solid rgba(0,0,0,0.06);
}
.btn-white-dark:hover { background: #f7f8fa; }

.dashboard-stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px;
}
.dashboard-stat-card {
  border-radius: 18px; padding: 22px; position: relative; overflow: hidden;
  transition: transform .2s ease;
}
.dashboard-stat-card:hover { transform: translateY(-2px); }
.dashboard-stat-card.dark {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  color: #fff;
}
.dashboard-stat-card.light {
  background: #fff; border: 1px solid rgba(0,0,0,0.06);
}
.dashboard-stat-card-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 16px; margin-bottom: 14px;
}
.dashboard-stat-card.dark .dashboard-stat-card-icon { background: rgba(255,255,255,0.1); color: #fff; }
.dashboard-stat-card.light .dashboard-stat-card-icon { background: #f7f8fa; color: #333; }
.dashboard-stat-card-label { font-size: 12px; font-weight: 600; margin-bottom: 6px; opacity: .65; text-transform: uppercase; letter-spacing: .5px; }
.dashboard-stat-card-value { font-size: 24px; font-weight: 700; letter-spacing: -0.5px; }

.quick-actions {
  display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 24px;
  scrollbar-width: none;
}
.quick-actions::-webkit-scrollbar { display: none; }
.qa-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; background: #fff; border: 1px solid rgba(0,0,0,0.06);
  border-radius: 12px; font-size: 13px; font-weight: 600; color: #333;
  white-space: nowrap; transition: all .2s ease;
  flex-shrink: 0;
}
.qa-item:hover { background: #f7f8fa; border-color: rgba(0,0,0,0.12); transform: translateY(-1px); }
.qa-item i { font-size: 14px; }

.chart-header-right { display: flex; align-items: center; gap: 16px; }
.chart-legend {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap; justify-content: flex-end;
}
.chart-legend-item {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: #666; font-weight: 500;
}
.chart-legend-item i {
  width: 8px; height: 8px; border-radius: 50%;
}
.chart-legend-item.disabled { opacity: 0.4; }
@media (max-width: 576px) {
  .chart-legend-item { font-size: 11px; }
}
.chart-tabs { display: flex; gap: 4px; background: #f7f8fa; border-radius: 8px; padding: 3px; flex-shrink: 0; }
.chart-tab {
  border: none; background: transparent; padding: 5px 12px; border-radius: 6px;
  font-size: 12px; font-weight: 600; color: #666; cursor: pointer; transition: all .2s;
  font-family: inherit;
}
.chart-tab:hover { color: #111; }
.chart-tab.active { background: #111; color: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.12); }

#trendChart {
  border-radius: 12px;
}

.revenue-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
.revenue-item {
  display: flex; align-items: center; gap: 12px;
  padding: 16px; background: #f7f8fa; border-radius: 14px;
}
.revenue-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
  flex-shrink: 0;
}
.revenue-value { font-size: 18px; font-weight: 700; margin-bottom: 2px; }
.revenue-label { font-size: 12px; color: #999; font-weight: 500; }

.channel-list { display: flex; flex-direction: column; gap: 10px; }
.channel-loading { text-align: center; padding: 30px; color: #999; font-size: 13px; }
.channel-item {
  display: flex; align-items: center; gap: 14px;
  padding: 16px; border-radius: 14px; background: #fff;
  border: 1px solid rgba(0,0,0,0.06); transition: all .2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.channel-item:hover { border-color: rgba(0,0,0,0.1); box-shadow: 0 4px 12px rgba(0,0,0,0.04); transform: translateY(-1px); }
.channel-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 18px;
}
.channel-icon img { width: 22px; height: 22px; display: block; }
.channel-body { flex: 1; min-width: 0; }
.channel-name { font-size: 15px; font-weight: 600; margin-bottom: 4px; color: #111; }
.channel-meta { font-size: 12px; color: #999; font-weight: 500; }
.channel-tag {
  padding: 6px 12px; border-radius: 20px; font-size: 12px; font-weight: 700;
  background: #111; color: #fff; letter-spacing: 0.3px;
}
.channel-tag.free {
  background: #f6ffed; color: #389e0d;
}
.channel-tag.paid {
  background: #fff1f0; color: #cf1322;
}

.modal-dialog.modal-lg { max-width: 680px; }
.modal-body .help-text {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #999;
}
.modal-body .page-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.modal-body .page-form .form-group {
  margin-bottom: 0;
}
.modal-body .page-form .form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #333;
}
.modal-body .page-form .form-control {
  margin-bottom: 0;
}
.modal-body .input-group {
  display: flex;
  align-items: center;
  width: 100%;
}
.modal-body .input-group .form-control {
  flex: 1;
  border-radius: 10px 0 0 10px;
  border-right: none;
}
.modal-body .input-group-addon {
  padding: 0 14px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f7f8fa;
  border: 1px solid rgba(0,0,0,0.08);
  border-left: none;
  border-radius: 0 10px 10px 0;
  font-size: 13px;
  color: #666;
  font-weight: 500;
}
.modal-body .input-group-addon.tips {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  padding: 0;
  cursor: pointer;
  color: #999;
  transition: color .2s;
}
.modal-body .input-group-addon.tips:hover { color: #1677ff; }
.modal-body .input-group-addon.btn-code {
  background: #111;
  color: #fff;
  border-color: #111;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  padding: 0 12px;
  font-size: 12px;
}
.modal-body .input-group-addon.btn-code:hover {
  background: #333;
}
.modal-body .input-group-addon.btn-code:disabled,
.modal-body .input-group-addon.btn-code[data-lock="true"] {
  background: #999;
  border-color: #999;
  cursor: not-allowed;
}
.modal-body .btn-block {
  width: 100%;
  margin-top: 8px;
}
.modal-body .verify-target {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px;
  background: #f7f8fa;
  border-radius: 10px;
  font-size: 14px;
  color: #333;
  font-weight: 500;
  margin-bottom: 16px;
}
.modal-body .verify-target i {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e6f7ff;
  color: #1677ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.modal-body .receiver-section {
  background: #f7f8fa;
  border-radius: 12px;
  padding: 16px;
  margin-top: 16px;
}
.modal-body .receiver-section .section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
  color: #111;
  margin-bottom: 12px;
  text-align: left;
}
.modal-body .receiver-section .receiver-count {
  font-size: 12px;
  color: #999;
  font-weight: 500;
  background: #fff;
  padding: 2px 8px;
  border-radius: 10px;
}
.modal-body .receiver-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 10px;
  margin-bottom: 12px;
}
.modal-body .receiver-table-wrap::-webkit-scrollbar { height: 4px; }
.modal-body .receiver-table-wrap::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 2px; }
.modal-body .receiver-table {
  width: 100%;
  min-width: 460px;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  border-collapse: collapse;
}
.modal-body .receiver-table th,
.modal-body .receiver-table td {
  padding: 10px;
  font-size: 13px;
  text-align: center;
  border: 1px solid rgba(0,0,0,0.06);
}
.modal-body .receiver-table th {
  background: #fafafa;
  font-weight: 600;
  color: #666;
}
.modal-body .receiver-table .form-control {
  margin-bottom: 0;
  height: 36px;
}
.modal-body .receiver-table .input-group-addon {
  background: #f7f8fa;
  border: 1px solid rgba(0,0,0,0.08);
  border-left: none;
  padding: 0 10px;
}
.modal-body .btn-add-receiver {
  background: #f6ffed;
  color: #389e0d;
  border: 1px solid #e4f8d6;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  transition: all .15s ease;
}
.modal-body .btn-add-receiver:hover {
  background: #e4f8d6;
}
.modal-body .btn-add-receiver:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.modal-body .modal-tips {
  margin-top: 14px;
  padding: 12px 14px;
  background: #f6ffed;
  border: 1px solid #e4f8d6;
  border-radius: 10px;
  color: #389e0d;
  font-size: 12px;
  line-height: 1.6;
}
.modal-body .modal-tips p {
  margin-bottom: 4px;
}
.modal-body .modal-tips p:last-child {
  margin-bottom: 0;
}

@media (max-width: 576px) {
  .modal-dialog.modal-lg { max-width: 100%; }
  .modal-body .receiver-section {
    padding: 12px;
    border-radius: 10px;
  }
  .modal-body .receiver-table {
    min-width: 400px;
  }
  .modal-body .receiver-table th,
  .modal-body .receiver-table td { padding: 6px 4px; font-size: 12px; }
  .modal-body .receiver-table .form-control {
    height: 32px;
    padding: 0 6px;
    font-size: 12px;
  }
  .modal-body .receiver-table .input-group-addon {
    padding: 0 6px;
    font-size: 12px;
  }
  .modal-body .input-group-addon.tips {
    width: 36px;
  }
}

.anno-list { display: flex; flex-direction: column; gap: 12px; }
.anno-item { display: flex; gap: 12px; align-items: flex-start; }
.anno-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.anno-body { flex: 1; }
.anno-text { font-size: 13px; font-weight: 500; line-height: 1.5; }
.anno-time { font-size: 11px; color: #bbb; margin-top: 4px; }
.anno-empty { text-align: center; padding: 24px; color: #bbb; font-size: 13px; }

.dashboard-row { align-items: start !important; }

.chart-wrap {
  position: relative;
  height: 300px;
  background: #fafafa;
  border-radius: 14px;
  padding: 10px;
}
.chart-empty {
  position: absolute;
  inset: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafafa;
  border-radius: 12px;
}
.chart-empty .empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: #bbb;
  font-size: 13px;
}
.chart-empty .empty-state i { font-size: 36px; }

/* ========== 5. Auth Pages (login, reg, findpwd, oauth, test, connect, wxlogin) ========== */
.auth-page {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: #f7f8fa; color: #111; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; -webkit-font-smoothing: antialiased;
}

.auth-wrap { width: 100%; max-width: 420px; }
.auth-wrap-wide { width: 100%; max-width: 480px; }
.auth-wrap-narrow { width: 100%; max-width: 380px; }

.auth-card {
  background: #fff; border-radius: 20px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.04); border: 1px solid rgba(0,0,0,0.06);
}
.auth-card-padding-lg { padding: 40px 36px; }
.auth-card-padding-md { padding: 32px; }
.auth-card-padding-sm { padding: 36px; }

.auth-brand { text-align: center; }
.auth-brand-margin-lg { margin-bottom: 32px; }
.auth-brand-margin-md { margin-bottom: 28px; }
.auth-brand-margin-sm { margin-bottom: 24px; }

.auth-brand i {
  width: 48px; height: 48px; background: #000; color: #fff;
  border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px; margin-bottom: 16px;
}
.auth-brand h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.3px; }
.auth-brand h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.3px; }
.auth-brand p { font-size: 14px; color: #999; margin-top: 6px; font-weight: 500; }

.auth-tabs {
  display: flex; gap: 8px; margin-bottom: 24px;
  background: #f7f8fa; border-radius: 12px; padding: 4px;
}
.auth-tab {
  flex: 1; text-align: center; padding: 10px; border-radius: 10px;
  font-size: 14px; font-weight: 600; color: #666; cursor: pointer;
  transition: all .2s ease; border: none; background: transparent; font-family: inherit;
}
.auth-tab.active { background: #fff; color: #111; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }

.auth-form .form-group { margin-bottom: 16px; }
.auth-form label {
  display: block; font-size: 13px; font-weight: 600; color: #333; margin-bottom: 6px;
}
.auth-form .form-control {
  width: 100%; padding: 12px 14px; border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px; font-size: 14px; font-family: inherit; background: #fff;
  transition: all .2s ease; outline: none;
}
.auth-form .form-control:focus { border-color: #111; box-shadow: 0 0 0 3px rgba(0,0,0,0.04); }
.auth-form select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23666' stroke-width='1.5' fill='none' fill-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px;
}

.auth-input-group { display: flex; gap: 8px; }
.auth-input-group .form-control { flex: 1; }

.auth-btn-send {
  padding: 0 16px; background: #f7f8fa; border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px; font-size: 13px; font-weight: 600; cursor: pointer;
  white-space: nowrap; transition: all .2s; font-family: inherit;
}
.auth-btn-send:disabled { opacity: 0.6; cursor: not-allowed; }

.auth-btn {
  width: 100%; padding: 14px; background: #000; color: #fff; border: none;
  border-radius: 12px; font-size: 15px; font-weight: 600; cursor: pointer;
  transition: all .2s ease; font-family: inherit; display: inline-flex;
  align-items: center; justify-content: center; gap: 6px; text-decoration: none;
}
.auth-btn:active { transform: scale(0.98); }
.auth-btn-margin-top { margin-top: 8px; }
.auth-btn-margin-top-sm { margin-top: 4px; }

.auth-btn-default {
  width: 100%; padding: 14px; background: #fff; color: #666; border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px; font-size: 15px; font-weight: 600; cursor: pointer;
  transition: all .2s ease; font-family: inherit; margin-top: 10px;
  display: block; text-align: center; text-decoration: none;
}

.auth-footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 20px; font-size: 13px;
}
.auth-footer a { color: #666; font-weight: 600; transition: color .2s; }
.auth-footer a:hover { color: #111; }

.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 24px 0; color: #bbb; font-size: 12px; font-weight: 600;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: rgba(0,0,0,0.06);
}

.auth-oauth { display: flex; justify-content: center; gap: 16px; }
.auth-oauth-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.08);
  background: #fff; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .2s ease; font-size: 18px;
}
.auth-oauth-btn:hover { background: #f7f8fa; transform: scale(1.05); }

.auth-checkbox {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: #666; margin: 16px 0;
}
.auth-checkbox input { width: 16px; height: 16px; accent-color: #000; }
.auth-checkbox a { color: #111; font-weight: 600; text-decoration: underline; }

.auth-status {
  margin-top: 20px; padding: 14px; background: #f7f8fa; border-radius: 12px;
  font-size: 13px; color: #666; font-weight: 500;
}
.auth-status-green {
  padding: 12px 16px; background: #f6ffed; border-radius: 12px;
  font-size: 13px; color: #389e0d; font-weight: 500; margin-bottom: 20px;
}
.auth-status-dot {
  display: inline-block; width: 8px; height: 8px; background: #389e0d;
  border-radius: 50%; margin-right: 6px; animation: pulse 1.5s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.auth-copyright {
  text-align: center; margin-top: 32px; font-size: 12px; color: #bbb; font-weight: 500;
}
.auth-copyright a { color: #999; }

.auth-btn-group { display: flex; gap: 10px; justify-content: center; }
.auth-btn-small {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px; border-radius: 10px; font-size: 13px;
  font-weight: 600; cursor: pointer; transition: all .2s ease;
  font-family: inherit; border: none; text-decoration: none;
}
.auth-btn-small-primary { background: #000; color: #fff; }
.auth-btn-small-default { background: #f7f8fa; color: #333; border: 1px solid rgba(0,0,0,0.08); }

/* QR / Mobile */
.auth-qr img { margin: 0 auto; border-radius: 12px; }
.auth-qr canvas, .auth-qr img { margin: 0 auto; border-radius: 12px; }

/* Modal (reg) */
.auth-modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.45); backdrop-filter: blur(4px);
  z-index: 500; justify-content: center; align-items: center; padding: 20px;
}
.auth-modal-overlay.active { display: flex; }
.auth-modal-box {
  background: #fff; border-radius: 18px; max-width: 480px; width: 100%;
  max-height: 80vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.auth-modal-header {
  padding: 20px 24px; border-bottom: 1px solid rgba(0,0,0,0.06);
  display: flex; justify-content: space-between; align-items: center;
  position: sticky; top: 0; background: #fff;
}
.auth-modal-header h4 { font-size: 16px; font-weight: 700; }
.auth-modal-header .close {
  background: none; border: none; font-size: 20px; cursor: pointer; color: #999;
}
.auth-modal-body { padding: 24px; font-size: 14px; line-height: 1.7; }
.auth-modal-footer {
  padding: 16px 24px; border-top: 1px solid rgba(0,0,0,0.06);
  display: flex; justify-content: flex-end;
}

/* Test pay page specific */
.test-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid rgba(0,0,0,0.06);
}
.test-card-header h4 { font-size: 18px; font-weight: 700; }
.test-card-header a { font-size: 13px; color: #666; font-weight: 500; }

.test-input-wrap {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px; background: #fff; transition: all .2s ease;
}
.test-input-wrap:focus-within { border-color: #111; box-shadow: 0 0 0 3px rgba(0,0,0,0.04); }
.test-input-wrap i { color: #999; font-size: 14px; width: 18px; text-align: center; }
.test-input-wrap input {
  flex: 1; border: none; outline: none; font-size: 14px;
  font-family: inherit; background: transparent;
}
.test-input-wrap input:disabled { color: #999; }

.test-alert-success {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; border-radius: 12px; font-size: 14px; font-weight: 500;
  background: #f6ffed; color: #389e0d; margin-bottom: 20px;
}

.pay-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 4px; }
.pay-method {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px; background: #f7f8fa; border: 1px solid transparent;
  border-radius: 12px; font-size: 13px; font-weight: 600; color: #333;
  cursor: pointer; transition: all .2s ease; font-family: inherit;
}
.pay-method:hover { background: #fff; border-color: #111; }
.pay-method img { width: 18px; height: 18px; border-radius: 4px; }

/* Loading */
.loading { display:flex; gap:6px; justify-content:center; padding:12px; }
.loading-dot { width:8px; height:8px; border-radius:50%; background:#ccc; animation: bounce 1.4s infinite ease-in-out both; }
.loading-dot:nth-child(1) { animation-delay: -0.32s; }
.loading-dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes bounce { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1); } }

/* Captcha */
#captcha { margin: 16px 0; }

/* ========== 6. Utility Classes ========== */
.hide { display: none !important; }
.ml-auto { margin-left: auto; }
.mr-sm { margin-right: 6px; }
.text-center { text-align: center; }
.text-danger { color: #ff4d4f; }
.text-warning { color: #faad14; }
.text-success { color: #52c41a; }
.text-muted { color: #999; }
.text-primary { color: #1677ff; }
.text-2x-muted { font-size: 32px; color: #ddd; }
.flex-col-gap { display: flex; flex-direction: column; gap: 20px; }
.fw-600 { font-weight: 600; }
.link-underline { text-decoration: underline; font-weight: 600; }
.text-brand { color: #5279F6; }
.text-cyan { color: #13c2c2; }
.text-purple { color: #722ed1; }
.revenue-icon-blue { background: #e6f7ff; color: #1890ff; }
.revenue-icon-green { background: #f6ffed; color: #52c41a; }
.revenue-icon-red { background: #fff1f0; color: #ff4d4f; }
.revenue-icon-orange { background: #fff7e6; color: #fa8c16; }
.text-dark { color: #111; }
.text-qq { color: #0BB2FF; }
.text-wechat { color: #07c160; }
.auth-oauth-btn img { width: 20px; height: 20px; border-radius: 50%; vertical-align: middle; }
.auth-btn-modal { width: auto; padding: 10px 24px; }
.notice-tip {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 12px 14px; border-radius: 10px;
  background: #fff7e6; color: #ad6800; font-size: 13px; line-height: 1.6;
  margin-bottom: 16px;
}
.notice-tip i { margin-top: 3px; }
.notice-tip b { color: #111; }
.notice-tip em { color: #cf1322; font-style: normal; font-weight: 700; }
.notice-title { margin: 0 0 10px; font-size: 13px; font-weight: 700; color: #333; }
.notice-list { list-style: none; margin: 0 0 12px; padding: 0; }
.notice-list li {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; margin-bottom: 8px; border-radius: 8px;
  background: #f7f8fa; font-size: 13px; color: #555;
}
.notice-list li i { color: #cf1322; }
.notice-list li b { color: #333; font-weight: 600; }
.notice-warn { margin: 0 0 16px; font-size: 12px; color: #cf1322; }
.notice-contact { text-align: center; padding: 14px; border-radius: 10px; background: #f7f8fa; }
.notice-contact p { margin: 0 0 10px; font-size: 13px; color: #666; }
.notice-contact .auth-qr { margin: 0 auto 10px; }
.notice-qr-tip { margin: 0; font-size: 12px; color: #999 !important; }
.reg-price { text-align: center; margin-bottom: 20px; font-size: 13px; color: #666; }
.reg-price-value { font-size: 18px; font-weight: 700; color: #111; }
.auth-status-plain { padding: 12px 16px; background: #f7f8fa; border-radius: 12px; font-size: 13px; color: #666; font-weight: 500; margin-bottom: 20px; }
.auth-mobile { display: none; margin-bottom: 16px; }
.auth-qr { margin: 0 auto 20px; }
.w-100 { width: 100%; }
.mr-xs { margin-right: 4px; }
.text-qq-dark { color: #790909; }

/* ========== 6.5 Internal Page Forms ========== */
.page-form .form-group { margin-bottom: 20px; }
.page-form .form-label {
  display: block; font-size: 13px; font-weight: 600; color: #333; margin-bottom: 8px;
}
.page-form .form-control {
  width: 100%; padding: 12px 14px; border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px; font-size: 14px; font-family: inherit; background: #fff;
  transition: all .2s ease; outline: none; color: #111;
}
.page-form .form-control:focus { border-color: #111; box-shadow: 0 0 0 3px rgba(0,0,0,0.04); }
.page-form .form-control:disabled { background: #f7f8fa; color: #999; cursor: not-allowed; }
.page-form select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23666' stroke-width='1.5' fill='none' fill-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px;
}
.page-form .form-input-group { display: flex; gap: 8px; }
.page-form .form-input-group .form-control { flex: 1; }
.page-form .form-input-group .btn { flex-shrink: 0; }
.page-form .form-hint {
  margin-top: 6px; font-size: 12px; color: #999; font-weight: 500; line-height: 1.5;
}
.page-form .form-hint strong { color: #111; font-weight: 600; }
.page-form .form-divider,
.form-divider {
  height: 1px; background: var(--color-border); margin: 24px 0;
}
.page-form .form-actions { display: flex; gap: 10px; margin-top: 8px; }

.pay-method-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-top: 4px;
}
.pay-method-card {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px; background: #f7f8fa; border: 1px solid transparent;
  border-radius: 12px; font-size: 13px; font-weight: 600; color: #333;
  cursor: pointer; transition: all .2s ease; font-family: inherit;
}
.pay-method-card:hover { background: #fff; border-color: #111; }
.pay-method-card.active { background: #fff; border-color: #111; color: #111; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.pay-method-card input { display: none; }

.info-list { display: flex; flex-direction: column; gap: 14px; }
.info-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: #f7f8fa; border-radius: 12px;
}
.info-item-label { font-size: 13px; color: #999; font-weight: 500; }
.info-item-value { font-size: 14px; font-weight: 600; color: #111; }

/* ========== 6.6 Tabs & Transfer Forms ========== */
.tab-nav {
  display: flex; gap: 4px; background: #f7f8fa; border-radius: 12px; padding: 4px;
  margin-bottom: 24px;
}
.tab-item {
  flex: 1; text-align: center; padding: 10px; border-radius: 10px;
  font-size: 14px; font-weight: 600; color: #666; cursor: pointer;
  transition: all .2s ease; border: none; background: transparent; font-family: inherit;
  text-decoration: none; display: block;
}
.tab-item:hover { color: #111; }
.tab-item.active { background: #fff; color: #111; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }

.invite-link-wrap {
  display: flex; gap: 10px; align-items: center;
  padding: 14px 16px; background: #f7f8fa; border-radius: 12px;
}
.invite-link-wrap input {
  flex: 1; border: none; background: transparent; font-size: 14px; font-weight: 500;
  color: #111; outline: none; font-family: inherit;
}

.stat-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 4px;
}
.stat-row-item {
  text-align: center; padding: 16px 10px; background: #f7f8fa; border-radius: 14px;
}
.stat-row-value { font-size: 22px; font-weight: 700; color: #111; margin-bottom: 4px; }
.stat-row-label { font-size: 12px; color: #999; font-weight: 500; }

.page-form .form-addon {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px; background: #fff; transition: all .2s ease;
}
.page-form .form-addon:focus-within { border-color: #111; box-shadow: 0 0 0 3px rgba(0,0,0,0.04); }
.page-form .form-addon-label {
  font-size: 13px; font-weight: 600; color: #999; white-space: nowrap; flex-shrink: 0;
}
.page-form .form-addon input {
  flex: 1; border: none; outline: none; font-size: 14px;
  font-family: inherit; background: transparent; color: #111;
}
.page-form .form-addon input:disabled { color: #999; }
.page-form .form-addon-btn {
  padding: 6px 14px; background: #f7f8fa; border: 1px solid rgba(0,0,0,0.08);
  border-radius: 10px; font-size: 12px; font-weight: 600; cursor: pointer;
  white-space: nowrap; transition: all .2s; font-family: inherit; color: #333;
  text-decoration: none; display: inline-flex; align-items: center;
}
.page-form .form-addon-btn:hover { background: #fff; border-color: #111; }

/* 修复 form-addon 内嵌 form-control */
.page-form .form-addon .form-control {
  border: none;
  background: transparent;
  padding: 0;
  box-shadow: none;
  border-radius: 0;
}
.page-form .form-addon textarea.form-control {
  resize: vertical;
  min-height: 60px;
  line-height: 1.6;
}

/* 密钥展示 */
.key-display {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 4px;
  background: #f7f8fa;
  border-radius: 12px;
}
.key-display-value {
  flex: 1;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 600;
  color: #111;
  word-break: break-all;
  font-family: monospace;
}
.key-display-btn {
  padding: 10px 16px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}
.key-display-btn:hover {
  border-color: #111;
}

/* 代码块 */
.code-block {
  position: relative;
  background: #f7f8fa;
  border-radius: 12px;
  padding: 4px;
}
.code-block-area {
  width: 100%;
  padding: 14px 50px 14px 14px;
  border: none;
  background: transparent;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 12px;
  line-height: 1.7;
  color: #333;
  outline: none;
  resize: vertical;
  min-height: 100px;
  border-radius: 10px;
}
.code-block-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 6px 12px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
}
.code-block-btn:hover {
  border-color: #111;
}

/* ========== 认证步骤条 ========== */
.cert-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}
.cert-step {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.cert-step::after {
  content: '';
  width: 60px;
  height: 2px;
  background: #eee;
  margin: 0 20px;
  border-radius: 1px;
  flex-shrink: 0;
}
.cert-step:last-child::after {
  display: none;
}
.cert-step.done::after {
  background: #111;
}
.cert-step-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f0f0f0;
  color: #999;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  transition: all .2s;
}
.cert-step.active .cert-step-icon,
.cert-step.done .cert-step-icon {
  background: #111;
  color: #fff;
}
.cert-step-title {
  font-size: 14px;
  font-weight: 600;
  color: #999;
  white-space: nowrap;
}
.cert-step.active .cert-step-title,
.cert-step.done .cert-step-title {
  color: #111;
}
@media screen and (max-width: 768px) {
  .cert-steps {
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .cert-steps::-webkit-scrollbar {
    display: none;
  }
  .cert-step-title { font-size: 12px; }
  .cert-step::after { width: 24px; margin: 0 8px; }
}

/* ========== 认证类型选择卡片 ========== */
.cert-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.cert-type-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all .2s;
  background: #fff;
}
.cert-type-card:hover {
  border-color: #ddd;
  box-shadow: var(--shadow-hover);
}
.cert-type-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 24px;
}
.cert-type-icon.personal {
  background: #eef2ff;
  color: #4f6ef7;
}
.cert-type-icon.enterprise {
  background: #fff3e0;
  color: #ff9800;
}
.cert-type-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #111;
}
.cert-type-desc {
  font-size: 13px;
  color: #999;
  margin-bottom: 16px;
}
.cert-type-features {
  list-style: none;
  margin-bottom: 20px;
}
.cert-type-features li {
  font-size: 13px;
  color: #666;
  line-height: 2;
}
.cert-type-features li i {
  color: #111;
  margin-right: 4px;
}

/* API Field - 短文本密钥展示 */
.api-field { margin-bottom: 22px; }
.api-field:last-child { margin-bottom: 0; }
.api-field-label {
  font-size: 13px;
  font-weight: 600;
  color: #666;
  margin-bottom: 10px;
}
.api-field-box {
  display: flex;
  align-items: center;
  gap: 0;
  background: #f7f8fa;
  border-radius: 14px;
  padding: 5px;
  transition: all .2s;
  border: 1px solid transparent;
}
.api-field-box:hover {
  background: #f0f1f3;
  border-color: rgba(0,0,0,0.04);
}
.api-field-value {
  flex: 1;
  padding: 14px 18px;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 15px;
  font-weight: 500;
  color: #111;
  word-break: break-all;
}
.api-field-btn {
  padding: 12px 18px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}
.api-field-btn:hover { border-color: #111; color: #000; }

/* Code Panel - 浅色代码块 */
.code-panel {
  position: relative;
  background: #f7f8fa;
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 16px;
  border: 1px solid var(--color-border);
}
.code-panel:last-child { margin-bottom: 0; }
.code-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.code-panel-title {
  font-size: 13px;
  font-weight: 600;
  color: #666;
}
.code-panel-btn {
  padding: 6px 14px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
}
.code-panel-btn:hover { border-color: #111; }
.code-panel-area {
  width: 100%;
  background: transparent;
  border: none;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 13px;
  line-height: 1.7;
  color: #444;
  outline: none;
  resize: vertical;
  min-height: 90px;
}

/* Bind List - 第三方账号绑定 */
.bind-list { display: flex; flex-direction: column; gap: 10px; }
.bind-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: #f7f8fa;
  border-radius: 12px;
  transition: all .2s;
}
.bind-item:hover { background: #f0f1f3; }
.bind-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.bind-icon.qq { background: #e6f4ff; }
.bind-icon.wx { background: #e6f7ed; }
.bind-icon.alipay { background: #e6f2ff; }
.bind-icon img { width: 22px; height: 22px; object-fit: contain; display: block; }
.bind-body { flex: 1; min-width: 0; }
.bind-name { font-size: 14px; font-weight: 600; color: #111; margin-bottom: 2px; }
.bind-status { font-size: 12px; font-weight: 500; }
.bind-status.on { color: #389e0d; }
.bind-status.off { color: #999; }
.bind-action {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
  border: 1px solid transparent;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.bind-action.bind {
  background: #111;
  color: #fff;
  border-color: #111;
}
.bind-action.bind:hover { opacity: 0.9; }
.bind-action.unbind {
  background: #fff;
  color: #333;
  border-color: rgba(0,0,0,0.08);
}
.bind-action.unbind:hover { border-color: #111; }

/* ========== 7. Legacy Page Styles ========== */
.fixed-table-toolbar, .fixed-table-pagination { padding: 15px; }
.dates { max-width: 120px; }
#orderItem .orderTitle { word-break: keep-all; }
#orderItem .orderContent { word-break: break-all; }
.type-logo { width: 18px; margin-top: -2px; padding-right: 4px; }
.app-overflow { overflow-x: unset; }

/* complain_info */
.img-complain { display: inline-block; overflow: hidden; margin: 4px 4px 0 0; padding: 5px; width: 135px; height: 135px; border: 1px solid #ccc; border-radius: 4px; background-color: #fff; }
.img-complain img { width: 100%; height: 100%; object-fit: cover; }
.img-reply { width: 110px; height: 110px; }
button.pull-right { margin-top: -5px; }
.timeline { position: relative; margin: 15px 0; padding: 0; list-style: none; }
.timeline:before { position: absolute; top: 0; bottom: 0; left: 31px; width: 4px; border-radius: 2px; background: #ddd; content: ""; }
.timeline>li { position: relative; margin-right: 10px; margin-bottom: 15px; }
.timeline>li:after, .timeline>li:before { display: table; content: " "; }
.timeline>li:after { clear: both; }
.timeline>li>.timeline-item { position: relative; margin-top: 0; margin-right: 15px; margin-left: 60px; padding: 0; border-radius: 3px; background: #fff; box-shadow: 0 1px 1px rgba(0,0,0,.1); color: #444; }
.timeline>li>.timeline-item>.time { float: right; padding: 10px; color: #777; font-size: 12px; }
.timeline>li>.timeline-item>.timeline-header { margin: 0; padding: 10px; border-bottom: 1px solid #f4f4f4; color: #23527c; font-weight: 600; font-size: 14px; }
.timeline>li>.timeline-item>.timeline-body { padding: 10px; }
.timeline>li>.fa { position: absolute; top: 0; left: 18px; width: 30px; height: 30px; border-radius: 50%; background: #d2d6de; color: #fff; text-align: center; font-size: 15px; line-height: 30px; }
.bg-merchat { background-color: #f39c12 !important; }
.bg-user { background-color: #00c0ef !important; }
.bg-system { background-color: #00a65a !important; }
.image-list { display: none; margin-bottom: -5px; padding: 10px 0; }
.image-list li { position: relative; display: block; margin-bottom: 5px; padding: 0 10px; height: 25px; background: #f2f2f2; line-height: 25px; }
.image-list span { display: inline-block; margin-right: 20px; vertical-align: middle; }
.image-list .file-type { margin-right: 5px; }
.image-list .file-txt { overflow: hidden; max-width: 70%; color: #666; text-overflow: ellipsis; white-space: nowrap; }
.image-list a { position: absolute; top: 0; right: 10px; display: inline-block; }

/* applyments_merchant */
.form-inline .form-control { display: inline-block; width: auto; vertical-align: middle; }
.form-inline .form-group { display: inline-block; margin-bottom: 0; vertical-align: middle; }
.channel-box { display: flex; flex-wrap: wrap; justify-content: space-between; }
.channel-item { margin-bottom: 10px; padding: 10px; border: 1px solid #e5e5e5; border-radius: 5px; cursor: pointer; font-size: 14px; color: #777; }
.channel-item:hover { background-color: #f5f5f5; }
.channel-name { font-size: 16px; font-weight: 700; margin-bottom: 3px; color: #555; }
.channel-item .channel-name img { width: 18px; height: 18px; margin-right: 5px; margin-top: -2px; }
.channel-item .channel-price { font-size: 12px; color: #ad35e3; padding-top: 3px; }
.tips-warning { color: #f6a838; padding-left: 5px; }
.tips-pointer { cursor: pointer; }
.footer-link { font-weight: 600; color: var(--color-text); }

.table tbody td { vertical-align: middle; }

.label {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}
.label-primary { background: #e6f7ff; color: #0958d9; }
.label-success { background: #f6ffed; color: #389e0d; }
.label-danger  { background: #fff1f0; color: #cf1322; }
.label-info    { background: #e6f7ff; color: #1677ff; }
.label-warning { background: #fff7e6; color: #d48806; }

/* ========== 7.5 Legacy Modal / Timeline / Dropdown ========== */
.modal { display: none; position: fixed; inset: 0; z-index: 1000; align-items: center; justify-content: center; padding: 20px; }
.modal.in,
.modal.show { display: flex !important; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 999; }
.modal-dialog { background: #fff; border-radius: 16px; max-width: 560px; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.18); position: relative; z-index: 1001; margin: auto; }
.modal-content { border-radius: 16px; border: none; box-shadow: none; background: #fff; }
.modal-header { padding: 18px 22px; border-bottom: 1px solid var(--color-border); display: flex; justify-content: space-between; align-items: center; }
.modal-header h4 { font-size: 15px; font-weight: 600; margin: 0; }
.modal-header .close { background: none; border: none; font-size: 22px; cursor: pointer; color: #999; line-height: 1; }
.modal-body { padding: 22px; font-size: 13px; }
.modal-footer { padding: 14px 22px; border-top: 1px solid var(--color-border); display: flex; justify-content: flex-end; gap: 10px; }
.modal-body .form-control { width: 100%; padding: 10px 12px; border: 1px solid rgba(0,0,0,0.08); border-radius: 10px; font-size: 13px; font-family: inherit; margin-bottom: 10px; }
.modal-body textarea.form-control { resize: vertical; }
.modal-body select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23666' stroke-width='1.5' fill='none' fill-rule='evenodd'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.modal-body .radio-inline { display: inline-flex; align-items: center; gap: 6px; margin-right: 16px; font-size: 13px; font-weight: 500; cursor: pointer; }
.modal-body .radio-inline input { cursor: pointer; }

@media (max-width: 576px) {
  .modal { padding: 16px; align-items: flex-end; }
  .modal-dialog { max-width: 100%; margin: 0; border-radius: 16px 16px 0 0; max-height: calc(100vh - 32px); overflow: hidden; }
  .modal-content { border-radius: 16px 16px 0 0; }
  .modal-body { overflow-x: hidden; }
}

.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline:before { content: ''; position: absolute; left: 20px; top: 0; bottom: 0; width: 2px; background: var(--color-border); }
.timeline li { position: relative; padding-left: 50px; margin-bottom: 18px; }
.timeline li > i { position: absolute; left: 8px; top: 0; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; }
.bg-user { background: #1677ff; }
.bg-merchat { background: #07c160; }
.bg-system { background: #111; }
.timeline-item { background: #fff; border-radius: 12px; padding: 14px 18px; border: 1px solid var(--color-border); }
.timeline-item .time { font-size: 12px; color: #999; float: right; font-weight: 500; }
.timeline-item h3 { font-size: 14px; font-weight: 600; margin: 0 0 6px; }
.timeline-body { font-size: 13px; color: #555; line-height: 1.6; }

.dropdown { position: relative; display: inline-block; }
.dropdown-menu { display: none; position: absolute; top: 100%; left: 0; background: #fff; border: 1px solid var(--color-border); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,0.08); padding: 6px; min-width: 160px; z-index: 1001; margin-top: 6px; }
.open > .dropdown-menu,
.dropdown-menu.show { display: block; }
.dropdown-menu > li { list-style: none; }
.dropdown-menu > li > a { display: block; padding: 8px 12px; font-size: 13px; color: #333; border-radius: 8px; text-decoration: none; font-weight: 500; }
.dropdown-menu > li > a:hover { background: #f7f8fa; }
.dropdown-menu > .active > a,
.dropdown-menu > .active > a:hover {
  background: #111;
  color: #fff;
}
.dropdown-menu .divider {
  height: 1px;
  background: var(--color-border);
  margin: 6px 0;
  overflow: hidden;
}
.dropdown-menu-right {
  left: auto;
  right: 0;
}
.caret { display: inline-block; width: 0; height: 0; margin-left: 4px; vertical-align: middle; border-top: 4px solid; border-right: 4px solid transparent; border-left: 4px solid transparent; }

.panel-legacy { background: #fff; border-radius: 14px; border: 1px solid var(--color-border); margin-bottom: 20px; overflow: hidden; }
.panel-legacy .panel-heading { padding: 16px 20px; border-bottom: 1px solid var(--color-border); font-weight: 600; font-size: 14px; display: flex; justify-content: space-between; align-items: center; }
.panel-legacy .panel-body { padding: 20px; font-size: 13px; line-height: 1.8; }
.panel-legacy .panel-body p { margin: 0 0 10px; }

.img-complain { display: inline-block; margin: 0 8px 8px 0; border-radius: 8px; overflow: hidden; border: 1px solid var(--color-border); }
.img-complain img { width: 100px; height: 100px; object-fit: cover; display: block; }

.channel-tag-sm { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; background: #f7f8fa; border-radius: 8px; font-size: 12px; font-weight: 500; color: #555; margin: 0 4px 4px 0; }
.channel-tag-sm img { width: 14px; height: 14px; vertical-align: middle; }

/* ========== 7.6 New Components ========== */
.group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.group-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all .2s ease;
}
.group-card:hover {
  box-shadow: var(--shadow);
  border-color: rgba(0,0,0,0.1);
}
.group-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.group-card-name {
  font-size: 16px;
  font-weight: 700;
}
.group-card-price {
  font-size: 24px;
  font-weight: 700;
  color: #f35a1f;
  letter-spacing: -0.5px;
}
.group-card-price-unit {
  font-size: 13px;
  color: #999;
  font-weight: 500;
}
.group-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.group-card-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--color-border);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  background: #f7f8fa;
  border-radius: 12px;
}
.detail-item.full {
  grid-column: 1 / -1;
}
.detail-item-label {
  font-size: 12px;
  color: #999;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.detail-item-value {
  font-size: 14px;
  font-weight: 600;
  color: #111;
  word-break: break-all;
  line-height: 1.5;
}

/* ========== 8. Responsive ========== */
@media (max-width: 991px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.show { transform: translateX(0); }
  .main { margin-left: 0; }
  .menu-toggle { display: block; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .col-md-6 { grid-column: span 12; }
  .dashboard-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 576px) {
  .content { padding: 20px; }
  .topbar { padding: 0 20px; }
  .stats-grid { grid-template-columns: 1fr; }
  .dashboard-stats-grid { grid-template-columns: 1fr; }
  .revenue-grid { grid-template-columns: 1fr; }
  .quick-actions { gap: 8px; }
  .qa-item { padding: 8px 12px; font-size: 12px; }
  .app-footer { flex-direction: column; gap: 4px; text-align: center; }
  .auth-wrap, .auth-wrap-wide, .auth-wrap-narrow { padding: 0; }
  .detail-grid { grid-template-columns: 1fr; }
  .group-grid { grid-template-columns: 1fr; }
  .hero { padding: 22px; border-radius: 16px; }
  .hero-avatar { width: 52px; height: 52px; }
  .hero-greeting { font-size: 17px; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1; }
  .card-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .chart-header-right { width: 100%; justify-content: space-between; }
  .chart-legend { order: 2; justify-content: flex-end; }
  .chart-tabs { order: 1; }
  .chart-wrap { height: 240px; padding: 6px; }
}

@media (max-width: 400px) {
  .pay-methods { grid-template-columns: repeat(2, 1fr); }
}
