/* ===== 三角洲跑刀系统 - 跑手端样式 ===== */

:root {
  --bg-darkest: #060a12;
  --bg-dark: #0c1320;
  --bg-card: #131c2e;
  --bg-card-hi: #1a2640;
  --border: #2a3a52;
  --border-soft: #1e2a3e;
  --gold: #e8c468;
  --gold-bright: #ffd966;
  --gold-dim: #8a7a3e;
  --orange: #ff9520;
  --text: #dce4ee;
  --text-dim: #7a8a9e;
  --text-faint: #4a5670;
  --green: #4ade80;
  --red: #f55a5a;
  --blue: #3b9eff;
  --amber: #fbbf24;
  --mono: 'Cascadia Code', 'JetBrains Mono', 'Consolas', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  background: var(--bg-darkest); color: var(--text);
  font-family: -apple-system, 'Segoe UI', 'Microsoft YaHei', sans-serif;
  min-height: 100vh; overflow-x: hidden;
}
.mono { font-family: var(--mono); letter-spacing: .5px; }
.hidden { display: none !important; }

.bg-grid {
  position: fixed; inset: 0; z-index: -2;
  background-image: url('https://playerhub.df.qq.com/playerhub/fb1c3b7c-0ad9-466b-90e4-4b302a74e92c.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
.bg-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 600px 400px at 50% -10%, rgba(232,196,104,.10), transparent 70%),
    radial-gradient(ellipse 800px 500px at 100% 100%, rgba(59,158,255,.06), transparent 70%);
}

/* ===== 顶部导航 ===== */
.top-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px; height: 64px;
  background: rgba(12,19,32,.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.nav-brand { display: flex; align-items: baseline; gap: 8px; }
.brand-icon { color: var(--gold); font-size: 18px; }
.brand-text { font-weight: 800; letter-spacing: 2px; font-size: 17px; }
.brand-accent { color: var(--gold); }
.brand-sub { color: var(--text-dim); font-size: 12px; }
.club-badge {
  margin-left: 10px;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: .5px;
  color: #1a1206;
  background: linear-gradient(135deg, #ffd966, #e8a23a);
  box-shadow: 0 2px 10px rgba(232,162,58,.35);
  white-space: nowrap;
}
.nav-links { display: flex; gap: 4px; }
.nav-link {
  color: var(--text-dim); text-decoration: none;
  padding: 8px 18px; border-radius: 4px; font-size: 14px; font-weight: 500;
  transition: all .2s; border: 1px solid transparent;
}
.nav-link:hover { color: var(--text); background: var(--bg-card); }
.nav-link.active { color: var(--gold); border-color: var(--gold-dim); background: rgba(232,196,104,.08); }

/* ===== 登录卡片 ===== */
.container { max-width: 960px; margin: 0 auto; padding: 60px 24px; }
.auth-card {
  max-width: 420px; margin: 0 auto;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; padding: 40px 36px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.auth-badge {
  display: inline-block; padding: 4px 16px;
  border: 1px solid var(--gold-dim); border-radius: 2px;
  color: var(--gold); font-size: 11px; letter-spacing: 3px;
  font-weight: 600; margin-bottom: 20px; background: rgba(232,196,104,.06);
}
.auth-title { font-size: 26px; font-weight: 800; margin-bottom: 8px; }
.auth-desc { color: var(--text-dim); font-size: 14px; margin-bottom: 28px; }

.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 8px; font-weight: 500; }
.form-input {
  width: 100%; background: var(--bg-dark); border: 1px solid var(--border);
  border-radius: 4px; padding: 12px 16px; color: var(--text); font-size: 15px;
  outline: none; transition: border-color .2s;
}
.form-input:focus { border-color: var(--gold-dim); box-shadow: 0 0 0 1px rgba(232,196,104,.3); }
.form-input::placeholder { color: var(--text-faint); }

.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--orange) 100%);
  color: #1a1200; border: none; border-radius: 4px;
  padding: 14px 32px; font-size: 15px; font-weight: 700;
  cursor: pointer; transition: all .2s; letter-spacing: 1px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-primary:hover { box-shadow: 0 0 24px rgba(232,196,104,.4); transform: translateY(-1px); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-loader {
  width: 16px; height: 16px;
  border: 2px solid rgba(26,18,0,.3); border-top-color: #1a1200;
  border-radius: 50%; animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn-ghost {
  background: transparent; color: var(--text-dim);
  border: 1px solid var(--border); border-radius: 4px;
  padding: 8px 16px; font-size: 13px; cursor: pointer; transition: all .2s;
}
.btn-ghost:hover { color: var(--gold); border-color: var(--gold-dim); background: rgba(232,196,104,.05); }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.auth-hint { margin-top: 20px; text-align: center; color: var(--text-faint); font-size: 13px; }

/* ===== 工作台 ===== */
.workbench { max-width: 1100px; margin: 0 auto; padding: 24px; }

/* 数据概览条 */
.stats-bar {
  display: flex; gap: 16px; margin-bottom: 24px; flex-wrap: wrap;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; padding: 20px 24px; align-items: center;
}
.stat-mini { flex: 1; min-width: 100px; }
.stat-mini-label { font-size: 12px; color: var(--text-faint); margin-bottom: 6px; }
.stat-mini-val { font-size: 24px; font-weight: 800; color: var(--text); }
.stat-mini-val.gold { color: var(--gold); }
.btn-logout {
  background: transparent; color: var(--red); border: 1px solid rgba(245,90,90,.3);
  border-radius: 4px; padding: 8px 16px; font-size: 13px; cursor: pointer; transition: all .2s;
}
.btn-logout:hover { background: rgba(245,90,90,.1); }

/* Tab 导航 */
.tab-nav {
  display: flex; gap: 4px; margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.tab-btn {
  background: transparent; border: none; border-bottom: 2px solid transparent;
  color: var(--text-dim); padding: 12px 24px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all .2s;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--gold); border-bottom-color: var(--gold); }
.tab-panel { display: none; animation: fadeIn .3s ease; }
.tab-panel.active { display: block; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.panel-header h2 { font-size: 18px; font-weight: 700; }
.panel-header-actions { display: flex; align-items: center; gap: 8px; }
.mine-tabs { display: flex; gap: 8px; }
.mine-tab {
  background: transparent; border: 1px solid var(--border); border-radius: 4px;
  color: var(--text-dim); padding: 6px 16px; font-size: 13px; cursor: pointer; transition: all .2s;
}
.mine-tab.active { color: var(--gold); border-color: var(--gold-dim); background: rgba(232,196,104,.08); }

/* 订单卡片网格 */
.order-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.order-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; padding: 20px; transition: all .2s; position: relative;
}
.order-card:hover { border-color: var(--gold-dim); background: var(--bg-card-hi); transform: translateY(-2px); }
.order-card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.order-code { font-family: var(--mono); font-size: 15px; font-weight: 700; color: var(--gold); word-break: break-all; }
.order-type { font-size: 13px; color: var(--text-dim); margin-top: 4px; }
.order-meta { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.meta-row { display: flex; justify-content: space-between; font-size: 13px; }
.meta-label { color: var(--text-faint); }
.meta-value { color: var(--text); font-family: var(--mono); }
.meta-value.gold { color: var(--gold); }

/* 状态标签 */
.status-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 3px; font-size: 11px; font-weight: 600;
  letter-spacing: 1px; border: 1px solid; white-space: nowrap;
}
.status-tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; }
.status-pending { color: var(--amber); border-color: rgba(251,191,36,.4); background: rgba(251,191,36,.08); }
.status-pending::before { background: var(--amber); }
.status-in_progress { color: var(--blue); border-color: rgba(59,158,255,.4); background: rgba(59,158,255,.08); }
.status-in_progress::before { background: var(--blue); animation: pulse 1.5s infinite; }
.status-completed { color: var(--green); border-color: rgba(74,222,128,.4); background: rgba(74,222,128,.08); }
.status-completed::before { background: var(--green); }
.status-cancelled { color: var(--red); border-color: rgba(245,90,90,.4); background: rgba(245,90,90,.08); }
.status-cancelled::before { background: var(--red); }
.status-expired { color: var(--text-faint); border-color: var(--border); background: var(--bg-dark); }
.status-expired::before { background: var(--text-faint); }
.status-inactive { color: var(--orange); border-color: rgba(255,149,32,.4); background: rgba(255,149,32,.08); }
.status-inactive::before { background: var(--orange); animation: pulse 1.5s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

/* 提现状态标签 */
.status-wd-pending { color: var(--orange); border-color: rgba(255,149,32,.4); background: rgba(255,149,32,.08); }
.status-wd-pending::before { background: var(--orange); animation: pulse 1.5s infinite; }
.status-wd-approved { color: var(--green); border-color: rgba(74,222,128,.4); background: rgba(74,222,128,.08); }
.status-wd-approved::before { background: var(--green); }
.status-wd-rejected { color: var(--red); border-color: rgba(245,90,90,.4); background: rgba(245,90,90,.08); }
.status-wd-rejected::before { background: var(--red); }

/* 迷你进度条 */
.mini-progress { margin-bottom: 16px; }
.mini-progress-head { display: flex; justify-content: space-between; margin-bottom: 6px; }
.mini-progress-track { height: 8px; background: var(--bg-darkest); border-radius: 4px; overflow: hidden; border: 1px solid var(--border-soft); }
.mini-progress-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--green), var(--gold), var(--orange));
  transition: width .6s ease;
}

.order-actions { display: flex; gap: 8px; }
.order-actions .btn-primary { flex: 1; padding: 10px; font-size: 13px; }

/* 空状态 */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-faint); }
.empty-state-icon { font-size: 48px; margin-bottom: 16px; opacity: .3; }
.empty-state-text { font-size: 14px; }

/* ===== 弹窗 ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(6,10,18,.8);
  backdrop-filter: blur(4px); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fadeIn .2s ease;
}
.modal-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; width: 100%; max-width: 460px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
  animation: modalIn .3s ease;
}
@keyframes modalIn { from { opacity: 0; transform: scale(.95) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 24px; border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 18px; font-weight: 700; }
.modal-close {
  background: transparent; border: none; color: var(--text-dim);
  font-size: 18px; cursor: pointer; padding: 4px 8px; border-radius: 4px; transition: all .2s;
}
.modal-close:hover { color: var(--red); background: rgba(245,90,90,.1); }
.modal-body { padding: 24px; }

.modal-order-info {
  background: var(--bg-darkest); border: 1px solid var(--border-soft);
  border-radius: 6px; padding: 16px; margin-bottom: 20px;
}
.modal-info-row { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 13px; }
.modal-info-row:last-child { margin-bottom: 0; }
.modal-info-label { color: var(--text-faint); }
.modal-info-value { color: var(--text); font-family: var(--mono); }

.progress-input-group { margin-bottom: 16px; }
.progress-input-group label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 8px; }
.progress-input-group input,
.progress-input-group textarea {
  width: 100%; background: var(--bg-dark); border: 1px solid var(--border);
  border-radius: 4px; padding: 12px 16px; color: var(--text); font-size: 15px;
  outline: none; transition: border-color .2s; resize: vertical; font-family: inherit;
}
.progress-input-group input:focus,
.progress-input-group textarea:focus { border-color: var(--gold-dim); box-shadow: 0 0 0 1px rgba(232,196,104,.3); }
.progress-input-group input { font-family: var(--mono); }
.progress-input-group .hint { font-size: 12px; color: var(--text-faint); margin-top: 6px; }

/* ===== 提现 ===== */
.wd-balance-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 20px;
}
.wd-balance-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; padding: 16px 18px;
}
.wd-balance-label { font-size: 12px; color: var(--text-faint); margin-bottom: 8px; }
.wd-balance-val { font-size: 22px; font-weight: 800; color: var(--text); }
.wd-balance-val.gold { color: var(--gold); }

.wd-form-card,
.wd-history-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; padding: 20px 24px; margin-bottom: 20px;
}
.wd-section-title {
  font-size: 16px; font-weight: 700; margin-bottom: 16px;
  padding-bottom: 12px; border-bottom: 1px solid var(--border-soft);
}
.wd-limit-hint {
  background: rgba(255,149,32,.1); border: 1px solid rgba(255,149,32,.4);
  color: var(--orange); padding: 10px 14px; border-radius: 4px;
  font-size: 13px; margin-bottom: 16px; line-height: 1.6;
}
.wd-form-body.disabled { opacity: .5; pointer-events: none; }

.wd-qr-upload { position: relative; }
.wd-qr-file {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
  width: 100%; height: 100%; z-index: 2;
}
.wd-qr-preview {
  width: 100%; min-height: 120px;
  background: var(--bg-dark); border: 1px dashed var(--border);
  border-radius: 6px; display: flex; align-items: center; justify-content: center;
  overflow: hidden; transition: border-color .2s;
}
.wd-qr-preview:hover { border-color: var(--gold-dim); }
.wd-qr-placeholder {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--text-faint); font-size: 13px;
}
.wd-qr-icon { font-size: 28px; }
.wd-qr-img { max-width: 100%; max-height: 200px; display: block; }

.wd-history-list { display: flex; flex-direction: column; gap: 12px; }
.wd-history-item {
  background: var(--bg-darkest); border: 1px solid var(--border-soft);
  border-radius: 6px; padding: 14px 16px;
}
.wd-history-top {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;
}
.wd-history-amount { font-size: 18px; font-weight: 800; }
.wd-history-meta { display: flex; flex-direction: column; gap: 6px; }
.wd-history-qr {
  max-width: 100px; max-height: 100px; margin-top: 10px;
  border-radius: 4px; border: 1px solid var(--border);
}

/* ===== Toast ===== */
.toast {
  position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%);
  padding: 12px 28px; border-radius: 4px; font-size: 14px; font-weight: 500;
  z-index: 9999; animation: toastIn .3s ease; border: 1px solid; backdrop-filter: blur(8px);
}
.toast.success { background: rgba(74,222,128,.15); border-color: var(--green); color: var(--green); }
.toast.error { background: rgba(245,90,90,.15); border-color: var(--red); color: var(--red); }
.toast.info { background: rgba(59,158,255,.15); border-color: var(--blue); color: var(--blue); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 20px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ===== 消息日志 ===== */
.msg-list { display: flex; flex-direction: column; gap: 12px; }
.msg-item {
  display: flex; gap: 14px; padding: 16px 18px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px;
  border-left: 3px solid var(--text-faint);
}
.msg-item.level-success { border-left-color: var(--green); }
.msg-item.level-info { border-left-color: var(--blue); }
.msg-item.level-warning { border-left-color: var(--orange); }
.msg-item.level-error { border-left-color: var(--red); }
.msg-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; margin-top: 6px;
  background: var(--text-faint);
}
.msg-item.level-success .msg-dot { background: var(--green); box-shadow: 0 0 8px rgba(74,222,128,.6); }
.msg-item.level-info .msg-dot { background: var(--blue); box-shadow: 0 0 8px rgba(59,158,255,.6); }
.msg-item.level-warning .msg-dot { background: var(--orange); box-shadow: 0 0 8px rgba(255,149,32,.6); }
.msg-item.level-error .msg-dot { background: var(--red); box-shadow: 0 0 8px rgba(245,90,90,.6); }
.msg-body { flex: 1; min-width: 0; }
.msg-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.msg-title { font-size: 15px; font-weight: 700; color: var(--text); }
.msg-type-badge {
  font-size: 11px; padding: 1px 9px; border-radius: 10px; font-weight: 600;
  border: 1px solid var(--border); color: var(--text-dim);
}
.msg-type-badge.type-order { background: rgba(59,158,255,.1); border-color: rgba(59,158,255,.4); color: var(--blue); }
.msg-type-badge.type-withdraw { background: rgba(232,196,104,.1); border-color: rgba(232,196,104,.4); color: var(--gold); }
.msg-type-badge.type-runner { background: rgba(74,222,128,.1); border-color: rgba(74,222,128,.4); color: var(--green); }
.msg-type-badge.type-system { background: rgba(122,138,158,.1); border-color: var(--border); color: var(--text-dim); }
.msg-content { font-size: 13px; color: var(--text-dim); line-height: 1.6; }
.msg-time { font-size: 12px; color: var(--text-faint); font-family: var(--mono); margin-top: 6px; }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .top-nav { padding: 0 14px; }
  .brand-sub { display: none; }
  .brand-text { font-size: 15px; }
  .container { padding: 32px 16px; }
  .auth-card { padding: 28px 20px; }
  .workbench { padding: 14px; }

  /* 概览条：4 项改为 2×2 网格，按钮全宽置于下方 */
  .stats-bar {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 16px;
  }
  .stat-mini { min-width: 0; }
  .stats-bar > button { width: 100%; }
  #refreshIncomeBtn { grid-column: 1; }
  #logoutBtn { grid-column: 2; }
  .stat-mini-val { font-size: 20px; }

  /* Tab 等分，杜绝溢出 */
  .tab-nav { gap: 2px; }
  .tab-btn { flex: 1 1 0; min-width: 0; padding: 12px 4px; font-size: 13px; white-space: nowrap; min-height: 44px; }

  .panel-header { flex-wrap: wrap; gap: 12px; }
  .panel-header-actions { width: 100%; }
  .panel-header-actions .btn-ghost { flex: 1; }

  .order-grid { grid-template-columns: 1fr; }
  .order-actions .btn-primary { padding: 12px; }

  .wd-balance-grid { grid-template-columns: repeat(2, 1fr); }
  .wd-balance-val { font-size: 18px; }
  .wd-balance-card, .wd-form-card, .wd-history-card { padding: 16px; }

  .modal-body { padding: 18px 16px; }
  .modal-header { padding: 16px; }

  /* 触控目标 ≥44px，输入框 16px 防 iOS 缩放 */
  .btn-primary, .btn-ghost, .btn-logout, .mine-tab, .option-btn, .msg-filter-btn { min-height: 44px; }
  .form-input { min-height: 44px; font-size: 16px; }
}

@media (max-width: 480px) {
  .club-badge { display: none; }
  .auth-title { font-size: 22px; }
  .tab-btn { font-size: 12px; }
  .wd-balance-grid { grid-template-columns: 1fr; }
}
