/* Partner (车队分润) additions on top of style.css */

/* --- tabs (used on login/register + main app nav) --- */
.tabs {
  display: flex; gap: 4px; margin-bottom: 22px;
  background: #f5efe4; border-radius: 12px; padding: 4px;
}
.tab {
  flex: 1; padding: 10px 12px; font-size: 14px; font-weight: 600;
  background: transparent; border: none; border-radius: 9px; cursor: pointer;
  color: #6b6055; transition: all .12s ease;
  font-family: inherit;
}
.tab:hover { color: #2c2419; }
.tab.active {
  background: #ffffff; color: #2c2419;
  box-shadow: 0 2px 8px rgba(75, 55, 30, .08);
}
.tab-body.hidden { display: none; }

/* --- app-shell nav (top bar with links to sub-views) --- */
.app-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px;
  padding: 12px 16px;
  background: #ffffff; border: 1px solid #efe6d8; border-radius: 14px;
  box-shadow: 0 4px 12px -6px rgba(75, 55, 30, .08);
}
.app-nav .nav-links { display: flex; gap: 4px; flex-wrap: wrap; }
.app-nav .nav-links a {
  padding: 8px 14px; font-size: 14px; font-weight: 500;
  color: #6b6055; border-radius: 9px; text-decoration: none;
  transition: all .12s;
}
.app-nav .nav-links a:hover { background: #f5efe4; color: #2c2419; text-decoration: none; }
.app-nav .nav-links a.active { background: #f39c6b; color: #ffffff; }
.app-nav .nav-me { font-size: 13px; color: #8a7f74; display: flex; align-items: center; gap: 12px; }
.app-nav .nav-me .qq { font-weight: 600; color: #2c2419; }

/* --- big stat cards (dashboard summary) --- */
.stats-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px; margin-bottom: 22px;
}
.stat-card {
  background: linear-gradient(135deg, #ffffff 0%, #fef7ec 100%);
  border: 1px solid #efe6d8; border-radius: 14px; padding: 18px 20px;
}
.stat-card .stat-label { font-size: 12px; color: #8a7f74; text-transform: uppercase; letter-spacing: .5px; }
.stat-card .stat-value { font-size: 26px; font-weight: 700; color: #2c2419; margin-top: 6px; }
.stat-card .stat-sub { font-size: 12px; color: #8a7f74; margin-top: 4px; }
.stat-card.highlight { background: linear-gradient(135deg, #fff5eb, #ffe4cc); border-color: #f0c99a; }
.stat-card.highlight .stat-value { color: #d97e42; }

/* --- token list rows --- */
.token-row {
  padding: 14px 16px; border: 1px solid #efe6d8; border-radius: 12px;
  margin-bottom: 10px; background: #fffdf9;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  flex-wrap: wrap;
}
.token-row .token-main { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 220px; }
.token-row .token-price {
  font-size: 20px; font-weight: 700; color: #2f9e75;
  min-width: 70px; text-align: center;
}
.token-row .token-info { flex: 1; min-width: 160px; }
.token-row .token-email { font-weight: 600; font-size: 14px; color: #2c2419; }
.token-row .token-meta { font-size: 12px; color: #8a7f74; margin-top: 3px; }
.token-row .token-stats { font-size: 13px; color: #6b6055; }
.token-row .token-stats b { color: #2c2419; }
.token-row .token-actions { display: flex; gap: 6px; }
.token-row .token-actions .btn { padding: 8px 12px; font-size: 13px; }

.status-badge {
  display: inline-block; font-size: 11px; padding: 3px 8px; border-radius: 6px;
  font-weight: 600; margin-left: 6px;
}
.status-badge.active { background: #e6f5ec; color: #2f9e75; }
.status-badge.paused { background: #f5efe4; color: #6b6055; }
.status-badge.invalid { background: #fbe7e7; color: #dc5a5a; }
.status-badge.seat_full { background: #fff3d8; color: #b6811d; }
.status-badge.disabled { background: #f5efe4; color: #8a7f74; }

/* --- modal (used for add-token, change-password, etc.) --- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(30, 20, 10, .35);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 20px;
}
.modal-backdrop.hidden { display: none; }
.modal {
  background: #ffffff; border-radius: 16px; padding: 24px;
  max-width: 500px; width: 100%; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(30, 20, 10, .3);
}
.modal h2 { margin: 0 0 6px; font-size: 18px; }
.modal .modal-sub { color: #8a7f74; font-size: 13px; margin-bottom: 20px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }

/* --- earnings table --- */
.data-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.data-table th {
  text-align: left; padding: 10px 12px; font-weight: 600; color: #6b6055;
  background: #f5efe4; border-bottom: 1px solid #efe6d8; font-size: 12px;
  text-transform: uppercase; letter-spacing: .3px;
}
.data-table td { padding: 12px; border-bottom: 1px solid #f5efe4; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #fffdf9; }

.pool-rank { font-family: ui-monospace, monospace; font-weight: 600; color: #6b6055; }
.pool-price-low { color: #2f9e75; font-weight: 700; }
.pool-price-mid { color: #b6811d; font-weight: 600; }
.pool-price-hi { color: #dc5a5a; }
.pool-me-tag {
  display: inline-block; background: #f39c6b; color: #fff;
  font-size: 10px; padding: 2px 7px; border-radius: 4px; margin-left: 6px;
  vertical-align: middle; font-weight: 700; letter-spacing: .3px;
}

/* --- QR upload area --- */
.qr-upload-box {
  border: 2px dashed #eee2ce; border-radius: 12px; padding: 24px;
  text-align: center; background: #fffdf9; cursor: pointer;
  transition: all .12s;
}
.qr-upload-box:hover { border-color: #f39c6b; background: #fff8ef; }
.qr-upload-box .icon { font-size: 32px; color: #8a7f74; }
.qr-upload-box .hint { color: #8a7f74; font-size: 12px; margin-top: 6px; }
.qr-preview { max-width: 180px; max-height: 180px; border-radius: 10px; display: block; margin: 0 auto; }

/* --- hint boxes --- */
.info-box {
  background: #f0f9f4; border: 1px solid #c9e6d5; border-radius: 10px;
  padding: 12px 14px; font-size: 13px; color: #326a4f; margin: 12px 0;
}
.warn-box {
  background: #fff7e0; border: 1px solid #f0dda1; border-radius: 10px;
  padding: 12px 14px; font-size: 13px; color: #7d5920; margin: 12px 0;
}

/* --- small helpers --- */
.text-muted { color: #8a7f74; }
.text-right { text-align: right; }
.mono-sm { font-family: ui-monospace, monospace; font-size: 12px; color: #6b6055; }

/* --- responsive tweaks --- */
@media (max-width: 640px) {
  .stats-row { grid-template-columns: 1fr 1fr; }
  .token-row { flex-direction: column; align-items: stretch; }
  .token-row .token-price { text-align: left; }
  .app-nav { flex-direction: column; align-items: flex-start; gap: 10px; }
}
