:root {
  --bg: #faf7f8;
  --bg-accent: radial-gradient(circle at 12% 0%, rgba(244, 63, 94, 0.08), transparent 40%),
    radial-gradient(circle at 88% 4%, rgba(245, 158, 11, 0.08), transparent 36%);
  --surface: #ffffff;
  --surface-soft: #f8f5f6;
  --border: rgba(24, 24, 27, 0.08);
  --border-strong: rgba(24, 24, 27, 0.14);
  --text: #18181b;
  --text-secondary: #52525b;
  --text-muted: #71717a;

  --primary: #e11d48;
  --primary-hover: #be123c;
  --primary-soft: #fff1f2;
  --primary-grad: linear-gradient(135deg, #fb7185 0%, #e11d48 100%);

  --weibo: #e6162d;
  --weibo-bg: #fff1f2;
  --douban: #009c49;
  --douban-bg: #ecfdf5;
  --proxy: #7c3aed;
  --proxy-bg: #f5f3ff;

  --verified: #059669;
  --verified-bg: #ecfdf5;
  --warn: #d97706;
  --warn-bg: #fffbeb;
  --danger: #dc2626;
  --danger-bg: #fef2f2;

  --gold: #f59e0b;
  --gold-bg: linear-gradient(180deg, #fffbeb 0%, #ffffff 72%);
  --silver: #64748b;
  --silver-bg: linear-gradient(180deg, #f8fafc 0%, #ffffff 72%);
  --bronze: #c27848;
  --bronze-bg: linear-gradient(180deg, #fff7ed 0%, #ffffff 72%);

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(24, 24, 27, 0.04), 0 2px 8px rgba(24, 24, 27, 0.03);
  --shadow-md: 0 8px 24px rgba(24, 24, 27, 0.08);
  --shadow-lg: 0 20px 48px rgba(24, 24, 27, 0.16);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  background-image: var(--bg-accent);
  background-attachment: fixed;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--primary);
  text-decoration: none;
}

.num {
  font-variant-numeric: tabular-nums;
}

.hidden {
  display: none !important;
}

/* ==================== Header ==================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--primary-grad);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 6px 14px rgba(225, 29, 72, 0.28);
}

.brand-text {
  min-width: 0;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #059669;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  animation: pulseDot 1.8s infinite;
}

@keyframes pulseDot {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.brand-sub {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  max-width: 170px;
}

.user-chip-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==================== Buttons ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
  transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--primary-grad);
  color: #fff;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.28);
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.04);
  box-shadow: 0 6px 16px rgba(225, 29, 72, 0.34);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--surface-soft);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(24, 24, 27, 0.05);
  color: var(--text);
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: rgba(220, 38, 38, 0.2);
}

.btn-danger:hover:not(:disabled) {
  background: #fee2e2;
}

.btn-success {
  background: var(--verified-bg);
  color: var(--verified);
  border-color: rgba(5, 150, 105, 0.22);
}

.btn-success:hover:not(:disabled) {
  background: #d1fae5;
}

.btn-sm {
  padding: 6px 11px;
  font-size: 12.5px;
}

.btn-block {
  width: 100%;
  padding: 11px 16px;
  border-radius: 12px;
  font-size: 15px;
}

/* ==================== Main Container ==================== */
.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 18px 16px 64px;
}

/* Announcement */
.notice-bar {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 14px;
  margin-bottom: 16px;
  border-radius: var(--radius-md);
  background: #fffbeb;
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: #92400e;
  font-size: 13px;
}

.notice-bar.paused {
  background: #fef2f2;
  border-color: rgba(220, 38, 38, 0.25);
  color: #991b1b;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.stat-card.highlight {
  background: var(--primary-grad);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 24px rgba(225, 29, 72, 0.22);
}

.stat-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.stat-card.highlight .stat-label {
  color: rgba(255, 255, 255, 0.85);
}

.stat-value {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.stat-sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.stat-card.highlight .stat-sub {
  color: rgba(255, 255, 255, 0.8);
}

/* My Rank Banner */
.my-rank-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 14px;
  border-radius: var(--radius-md);
  background: linear-gradient(90deg, #fff1f2 0%, #fff7ed 100%);
  border: 1px solid rgba(225, 29, 72, 0.16);
  flex-wrap: wrap;
}

.my-rank-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13.5px;
}

.my-rank-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 12.5px;
}

.my-rank-gap {
  color: var(--primary);
  font-weight: 700;
}

/* Live Ticker */
.ticker-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 9px 14px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.ticker-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.ticker-list {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
}

.ticker-list::-webkit-scrollbar {
  display: none;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  font-size: 12.5px;
  white-space: nowrap;
  color: var(--text-secondary);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.ticker-item:hover {
  border-color: rgba(225, 29, 72, 0.3);
  background: #fff;
  color: var(--text);
}

.ticker-amt {
  color: var(--primary);
  font-weight: 700;
}

/* ==================== Top 3 Podium ==================== */
.podium-section {
  margin-bottom: 20px;
}

.podium-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  align-items: end;
}

.podium-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 14px 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  position: relative;
}

.podium-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.podium-card.rank-1 {
  background: var(--gold-bg);
  border-color: rgba(245, 158, 11, 0.4);
  padding-top: 24px;
  padding-bottom: 20px;
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.14);
}

.podium-card.rank-2 {
  background: var(--silver-bg);
  border-color: rgba(100, 116, 139, 0.25);
}

.podium-card.rank-3 {
  background: var(--bronze-bg);
  border-color: rgba(194, 120, 72, 0.28);
}

.podium-crown {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-weight: 800;
  font-size: 16px;
  margin-bottom: 8px;
}

.rank-1 .podium-crown {
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, #fde047, #f59e0b);
  color: #78350f;
  box-shadow: 0 6px 14px rgba(245, 158, 11, 0.35);
  font-size: 19px;
}

.rank-2 .podium-crown {
  background: linear-gradient(135deg, #e2e8f0, #94a3b8);
  color: #1e293b;
}

.rank-3 .podium-crown {
  background: linear-gradient(135deg, #fed7aa, #c27848);
  color: #431407;
}

.podium-handle {
  font-size: 15.5px;
  font-weight: 800;
  margin: 6px 0 4px;
  word-break: break-all;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.podium-amount {
  font-size: 22px;
  font-weight: 900;
  color: var(--primary);
  margin: 6px 0 4px;
  letter-spacing: -0.02em;
}

.rank-1 .podium-amount {
  font-size: 26px;
}

.podium-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.podium-cta {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(24, 24, 27, 0.05);
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 600;
}

/* ==================== Badges ==================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.3;
  flex-shrink: 0;
}

.badge-weibo {
  background: var(--weibo-bg);
  color: var(--weibo);
}

.badge-douban {
  background: var(--douban-bg);
  color: var(--douban);
}

.badge-proxy {
  background: var(--proxy-bg);
  color: var(--proxy);
}

.badge-verified {
  background: var(--verified-bg);
  color: var(--verified);
}

.badge-unverified {
  background: #f4f4f5;
  color: #52525b;
}

.badge-flagged {
  background: var(--warn-bg);
  color: var(--warn);
}

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

.badge-small {
  background: #eff6ff;
  color: #2563eb;
}

/* ==================== Toolbar & Board Card ==================== */
.board-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.toolbar {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pill-btn {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  transition: all 0.15s ease;
}

.pill-btn:hover {
  background: var(--surface-soft);
}

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

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: flex-end;
  min-width: 220px;
}

.search-box {
  position: relative;
  flex: 1;
  max-width: 240px;
}

.search-box input {
  width: 100%;
  padding: 7px 12px 7px 32px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface-soft);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.search-box input:focus {
  border-color: var(--primary);
  background: #fff;
}

.search-box svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.sort-select {
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  outline: none;
}

/* ==================== Leaderboard Rows ==================== */
.rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rank-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.14s ease;
}

.rank-row:last-child {
  border-bottom: none;
}

.rank-row:hover {
  background: #fff8f9;
}

.rank-row.is-me {
  background: linear-gradient(90deg, #fff1f2 0%, #ffffff 70%);
}

.rank-num {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  color: var(--text-secondary);
  background: var(--surface-soft);
  margin: 0 auto;
}

.rank-num.top-1 {
  background: #fef3c7;
  color: #b45309;
}

.rank-num.top-2 {
  background: #e2e8f0;
  color: #334155;
}

.rank-num.top-3 {
  background: #ffedd5;
  color: #9a3412;
}

.rank-user {
  min-width: 0;
}

.rank-user-top {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.rank-handle {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  word-break: break-all;
}

.rank-user-sub {
  margin-top: 3px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.rank-metrics {
  text-align: right;
}

.rank-amount {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}

.rank-copies {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-top: 2px;
}

.rank-inspect {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  transition: all 0.15s ease;
}

.rank-row:hover .rank-inspect {
  background: var(--primary-soft);
  border-color: rgba(225, 29, 72, 0.25);
  color: var(--primary);
}

.empty-state {
  text-align: center;
  padding: 56px 20px;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 40px;
  margin-bottom: 10px;
}

.empty-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.load-more-wrap {
  padding: 14px;
  text-align: center;
  border-top: 1px solid var(--border);
}

/* ==================== Footer ==================== */
.footer {
  max-width: 1040px;
  margin: 0 auto;
  padding: 20px 16px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ==================== Modals ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.16s ease;
}

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

.modal {
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.18s ease;
}

.modal.modal-lg {
  max-width: 680px;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

.modal-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--surface-soft);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.modal-close:hover {
  background: rgba(24, 24, 27, 0.1);
}

.modal-body {
  padding: 18px 20px;
  overflow-y: auto;
  flex: 1;
}

/* ==================== Forms ==================== */
.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  background: var(--surface-soft);
  border-radius: 12px;
  margin-bottom: 18px;
}

.tab-btn {
  padding: 8px 10px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 14px;
  transition: all 0.15s ease;
}

.tab-btn.active {
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.platform-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.platform-opt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--surface);
  font-weight: 700;
  font-size: 14px;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.platform-opt.active-weibo {
  border-color: var(--weibo);
  background: var(--weibo-bg);
  color: var(--weibo);
}

.platform-opt.active-douban {
  border-color: var(--douban);
  background: var(--douban-bg);
  color: var(--douban);
}

.form-group {
  margin-bottom: 14px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-control {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.12);
}

/* ==================== Uploader & Previews ==================== */
.upload-zone {
  border: 2px dashed var(--border-strong);
  border-radius: 14px;
  padding: 18px 14px;
  text-align: center;
  background: var(--surface-soft);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.upload-zone-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}

.upload-zone-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.preview-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
}

.preview-thumb-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #f4f4f5;
  overflow: hidden;
}

.preview-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.preview-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-footer {
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.preview-size {
  font-size: 10.5px;
  color: var(--verified);
  font-weight: 600;
  text-align: center;
}

.preview-mask-btn {
  width: 100%;
  padding: 4px 6px;
  border-radius: 7px;
  border: 1px solid var(--border-strong);
  background: var(--surface-soft);
  color: var(--text);
  font-size: 11.5px;
  font-weight: 600;
}

.preview-mask-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ==================== Verification Order Cards ==================== */
.detail-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.detail-amount {
  font-size: 24px;
  font-weight: 900;
  color: var(--primary);
}

.order-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
  background: #fff;
}

.order-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.order-card-amt {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}

.order-card-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.order-note {
  margin: 6px 0 10px;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--surface-soft);
  font-size: 13px;
  color: var(--text-secondary);
}

.order-img-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.order-img-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 3 / 4;
  background: #f4f4f5;
  cursor: zoom-in;
}

.order-img-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease;
}

.order-img-item:hover img {
  transform: scale(1.03);
}

.order-card-actions {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

/* ==================== Mosaic Privacy Editor ==================== */
.mosaic-stage {
  position: relative;
  background: #18181b;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 58vh;
  touch-action: none;
}

.mosaic-stage canvas {
  max-width: 100%;
  max-height: 58vh;
  cursor: crosshair;
  display: block;
  touch-action: none;
}

.mosaic-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

/* ==================== Lightbox ==================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.lightbox img {
  max-width: 96vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-bar {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ==================== Toast ==================== */
.toast-container {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: min(92vw, 420px);
}

.toast {
  pointer-events: auto;
  padding: 11px 16px;
  border-radius: 12px;
  background: #18181b;
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  text-align: center;
  animation: slideUp 0.16s ease;
}

.toast.success {
  background: #065f46;
}

.toast.error {
  background: #991b1b;
}

/* ==================== Admin Specific ==================== */
.admin-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 16px;
}

.admin-tab {
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
}

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

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

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

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.admin-table th {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--surface-soft);
  white-space: nowrap;
}

.mini-thumbs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.mini-thumb {
  width: 44px;
  height: 56px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--border);
  cursor: zoom-in;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  margin-bottom: 12px;
}

/* ==================== Responsive ==================== */
@media (max-width: 720px) {
  .topbar-inner {
    padding: 10px 12px;
  }

  .brand-sub {
    display: none;
  }

  .user-chip {
    display: none;
  }

  .stats-grid {
    gap: 8px;
  }

  .stat-card {
    padding: 12px 10px;
    border-radius: 14px;
  }

  .stat-value {
    font-size: 19px;
  }

  .podium-grid {
    gap: 8px;
  }

  .podium-card {
    padding: 12px 8px 12px;
    border-radius: 14px;
  }

  .podium-card.rank-1 {
    padding-top: 16px;
    padding-bottom: 14px;
  }

  .podium-handle {
    font-size: 13px;
  }

  .podium-amount {
    font-size: 16px;
  }

  .rank-1 .podium-amount {
    font-size: 18px;
  }

  .podium-cta {
    font-size: 10.5px;
    padding: 3px 7px;
  }

  .rank-row {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 12px;
  }

  .rank-inspect {
    display: none;
  }

  .rank-amount {
    font-size: 16px;
  }

  .toolbar {
    padding: 12px;
  }

  .toolbar-right {
    width: 100%;
    min-width: 0;
  }

  .search-box {
    max-width: none;
  }

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

  .modal-backdrop {
    padding: 10px;
    align-items: flex-end;
  }

  .modal {
    max-height: 92vh;
    border-radius: 18px 18px 12px 12px;
  }
}
