/* billing.css — /billing 页专属样式。
   按 feedback_dashboard_minimal.md：dashboard 极简，只管账单和设备，不暴露采集数据。 */

/* === Active nav link === */
.nav-links a.active { color: var(--ink); font-weight: 500; }

/* === Status banner (Stripe checkout return) === */
.banner {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 24px;
  margin: 24px auto 0;
  max-width: 1104px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border-left: 4px solid var(--muted);
  box-shadow: var(--shadow);
}
.banner-success { border-left-color: #2EB872; background: rgba(46, 184, 114, 0.06); }
.banner-cancel  { border-left-color: var(--muted); background: var(--bg-soft); }
.banner-error   { border-left-color: var(--accent); background: var(--accent-soft); }
.banner-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.banner-success .banner-icon { color: #2EB872; }
.banner-cancel  .banner-icon { color: var(--muted); }
.banner-error   .banner-icon { color: var(--accent); }
.banner > div { flex: 1; }
.banner strong { font-size: 15px; font-weight: 600; display: block; margin-bottom: 2px; }
.banner p { font-size: 14px; color: var(--ink-soft); margin: 0; line-height: 1.5; }
.banner code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
  background: var(--bg-soft);
  padding: 1px 6px;
  border-radius: 4px;
}
.banner-close {
  background: transparent;
  border: none;
  font-size: 22px;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  width: 28px;
  height: 28px;
  line-height: 1;
}
.banner-close:hover { color: var(--ink); }

/* === Balance hero === */
.balance-hero {
  text-align: center;
  padding: 80px 48px 60px;
  max-width: 720px;
  margin: 0 auto;
}
.balance-label {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}
.balance-big {
  font-size: 96px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 24px;
  color: var(--ink);
}
.balance-big .big-amount { color: var(--accent); }
.balance-equiv {
  font-size: 17px;
  color: var(--ink-soft);
  margin-bottom: 36px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}
.balance-equiv strong { color: var(--ink); font-weight: 600; }
.balance-equiv .dot { color: var(--muted); }

/* === Ledger === */
.ledger { max-width: 960px; }
.ledger-table {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 24px;
}
.ledger-head, .ledger-row {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 2fr 1fr 0.8fr;
  align-items: center;
  padding: 18px 28px;
  gap: 16px;
}
.ledger-head {
  background: var(--bg-soft);
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ledger-row {
  font-size: 15px;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
}
.ledger-row.credit { background: rgba(46, 184, 114, 0.04); }
.right { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; color: var(--ink); }
.plus { color: #2EB872; }

.role-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}
.role-copy { background: rgba(217, 98, 74, 0.12); color: var(--accent); }
.role-asst { background: rgba(70, 130, 180, 0.12); color: #3D6F9E; }
.role-credit { background: rgba(46, 184, 114, 0.14); color: #1F8F58; }

.ledger-summary {
  display: flex;
  gap: 32px;
  justify-content: flex-end;
  padding: 20px 28px;
  background: var(--bg-soft);
  border-radius: var(--radius);
  font-size: 15px;
}
.ledger-summary strong { color: var(--accent); font-size: 17px; }

/* === Settings === */
.settings { max-width: 760px; }
.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.setting-row:last-child { border-bottom: none; }
.setting-row h3 { font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.setting-row p { font-size: 14px; line-height: 1.5; }

/* === Toggle === */
.toggle { position: relative; display: inline-block; cursor: pointer; }
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-track {
  display: block;
  width: 48px;
  height: 28px;
  background: var(--line);
  border-radius: 999px;
  position: relative;
  transition: background 0.2s;
}
.toggle-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.toggle input:checked + .toggle-track { background: var(--accent); }
.toggle input:checked + .toggle-track::after { transform: translateX(20px); }

/* === Responsive === */
@media (max-width: 768px) {
  .balance-hero { padding: 48px 24px 40px; }
  .balance-big { font-size: 64px; }
  .balance-equiv { font-size: 15px; flex-direction: column; gap: 4px; }
  .balance-equiv .dot { display: none; }
  .ledger-head, .ledger-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 16px 20px;
  }
  .ledger-head > div:nth-child(3),
  .ledger-head > div:nth-child(4),
  .ledger-row > div:nth-child(3),
  .ledger-row > div:nth-child(4) { display: none; }
  .ledger-summary { flex-direction: column; gap: 8px; align-items: flex-start; }
  .setting-row { flex-direction: column; align-items: flex-start; }
}
