/* =========================================================================
   index.css — Dashboard (light SaaS)
   Element IDs unchanged; only presentation.
   ========================================================================= */

/* ---- shared panel ---- */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 22px 24px;
}
.panel-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel-title::before {
  content: "";
  width: 4px; height: 15px;
  border-radius: 3px;
  background: var(--primary-grad);
}

/* ===== summary stat cards ===== */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  overflow: hidden;
  transition: box-shadow .18s, transform .18s;
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.stat-card::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
}
.stat-available::after { background: linear-gradient(#22c55e,#16a34a); }
.stat-freeze::after    { background: linear-gradient(#f59e0b,#d97706); }
.stat-pay::after       { background: linear-gradient(#6366f1,#4f46e5); }

.stat-ico {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex: 0 0 auto;
}
.stat-available .stat-ico { background: var(--success-50); }
.stat-freeze .stat-ico    { background: #fff7ed; }
.stat-pay .stat-ico       { background: var(--primary-50); }

.stat-label { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -.3px;
  word-break: break-all;
}
.stat-action { justify-content: center; padding: 12px; }
.btn-refresh {
  height: 44px;
  padding: 0 26px;
  border: none;
  border-radius: 12px;
  background: var(--primary-grad);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(79,70,229,.25);
  transition: filter .15s, transform .05s;
  white-space: nowrap;
}
.btn-refresh:hover { filter: brightness(1.05); }
.btn-refresh:active { transform: translateY(1px); }

/* ===== wallet + api ===== */
.dash-cols {
  display: grid;
  grid-template-columns: 1fr;   /* 开发者信息已隐藏，钱包卡片占满整行 */
  gap: 20px;
  margin-bottom: 20px;
}

.wallet-body { display: flex; gap: 24px; align-items: flex-start; }
.wallet-qr {
  width: 196px; height: 196px;
  flex: 0 0 auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  display: flex; align-items: center; justify-content: center;
}
.wallet-qr img { width: 180px; height: 180px; display: block; }
.wallet-info { flex: 1; min-width: 0; }
.wallet-addr-label { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.wallet-addr {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-50);
  border: 1px dashed var(--primary-100);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  word-break: break-all;
  margin-bottom: 14px;
}
.wallet-notes { margin: 0; padding-left: 0; list-style: none; }
.wallet-notes li {
  position: relative;
  padding-left: 20px;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.7;
}
.wallet-notes li::before {
  content: "";
  position: absolute;
  left: 4px; top: 10px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

.api-body { display: flex; flex-direction: column; gap: 2px; }
.api-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}
.api-label { font-size: 13px; color: var(--muted); flex: 0 0 auto; }
.api-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-align: right;
  word-break: break-all;
}
.api-link { color: var(--primary); text-decoration: underline; }
.api-actions { margin-top: 16px; }
.btn-outline {
  height: 40px;
  width: 100%;
  border: 1px solid var(--primary);
  background: var(--surface);
  color: var(--primary);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.btn-outline:hover { background: var(--primary-50); }

/* ===== price settings ===== */
.price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.price-block {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 16px 58px;
  background: var(--surface-2);
  transition: box-shadow .15s, border-color .15s;
}
.price-block:hover { box-shadow: var(--shadow); border-color: var(--primary-100); }
.price-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 14px;
}
.cur-badge {
  font-size: 12px; font-weight: 700;
  padding: 3px 9px; border-radius: 6px;
  color: #fff;
}
.cur-cny { background: #ef4444; }
.cur-vnd { background: #0ea5e9; }
.cur-thb { background: #8b5cf6; }
.price-kind {
  font-size: 13px; font-weight: 700;
}
.kind-sell { color: var(--success); }
.kind-buy  { color: var(--primary); }

.price-line {
  display: flex; align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.price-line label {
  width: 52px; flex: 0 0 auto;
  font-size: 13px; color: var(--muted);
}
.price-line input {
  flex: 1; min-width: 0;
  height: 36px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 0 10px;
  color: var(--text);
  font-size: 13.5px;
}
.price-line input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,.12); }
.price-tip { color: var(--text-2) !important; background: #f1f2f7 !important; }
.price-line-edit input { font-weight: 600; }

.price-save {
  position: absolute;
  right: 16px; bottom: 16px;
  height: 32px;
  padding: 0 18px;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: filter .15s;
}
.price-save:hover { filter: brightness(.94); }

/* ===== legacy classes kept harmless (in case other pages reuse) ===== */
.refresh-data {
  height: 40px; padding: 0 20px; border: none; border-radius: 8px;
  background: var(--primary); color: #fff; font-size: 14px; cursor: pointer;
}
.x-balance-content-tip { color: var(--muted); font-style: normal; }

/* ===== responsive ===== */
@media (max-width: 1100px) {
  .dash-cols { grid-template-columns: 1fr; }
  .price-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .dash-stats { grid-template-columns: 1fr 1fr; }
  .stat-action { grid-column: span 2; }
  .price-grid { grid-template-columns: 1fr; }
  .wallet-body { flex-direction: column; align-items: center; text-align: center; }
}
