/* The console stylesheet. Hand-written, no framework.
   The brand colour arrives from the generated inline block (--brand-primary), everything
   else is neutral on purpose: a white-label channel changes one file and gets their colour.
   No CJK and no brand name belong in this file - the gate scans it. */

:root {
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --line: #e3e6ec;
  --text: #1c2230;
  --muted: #5f6b80;
  --ok: #177245;
  --ok-bg: #e8f5ee;
  --warn: #8a5a00;
  --warn-bg: #fdf3e0;
  --err: #a3231f;
  --err-bg: #fdeceb;
  --radius: 10px;
  --gap: 16px;
  --shadow: 0 1px 2px rgba(20, 26, 38, 0.06), 0 8px 24px rgba(20, 26, 38, 0.05);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--surface-2);
  color: var(--text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a { color: var(--brand-primary); }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---- top bar ---- */

.topbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 24px; min-height: 60px; flex-wrap: wrap; }
.wordmark { font-weight: 650; font-size: 17px; letter-spacing: -0.01em; text-decoration: none; color: var(--text); }
.wordmark::before {
  content: "";
  display: inline-block;
  width: 10px; height: 10px;
  margin-right: 8px;
  border-radius: 3px;
  background: var(--brand-primary);
  vertical-align: 1px;
}
.topbar nav { display: flex; gap: 18px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.topbar nav a { text-decoration: none; color: var(--muted); font-size: 14px; }
.topbar nav a:hover, .topbar nav a[aria-current="page"] { color: var(--text); }
.topbar form { margin: 0; }

/* ---- page ---- */

main { padding: 28px 0 56px; }
h1 { font-size: 24px; line-height: 1.25; margin: 0 0 6px; letter-spacing: -0.01em; }
h2 { font-size: 17px; margin: 0 0 14px; }
h3 { font-size: 15px; margin: 0 0 8px; }
.lede { color: var(--muted); margin: 0 0 22px; max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card + .card { margin-top: var(--gap); }
.card-narrow { max-width: 460px; }
.section { margin-top: 28px; }

.grid { display: grid; gap: var(--gap); }
.grid-plans { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* ---- forms ---- */

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.field .help { font-size: 12px; color: var(--muted); margin-top: 5px; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], select {
  width: 100%;
  padding: 9px 11px;
  font: inherit;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}
input:focus, select:focus { outline: 2px solid var(--brand-primary); outline-offset: 1px; border-color: var(--brand-primary); }
.row { display: flex; gap: var(--gap); flex-wrap: wrap; }
.row > * { flex: 1 1 220px; }

.btn {
  display: inline-block;
  padding: 9px 16px;
  font: inherit;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--brand-primary);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { filter: brightness(1.08); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); filter: none; }
.btn-danger { background: var(--surface); color: var(--err); border-color: #e9c6c4; }
.btn-danger:hover { background: var(--err-bg); filter: none; }
.btn-link { background: none; border: 0; padding: 0; color: var(--brand-primary); cursor: pointer; font: inherit; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---- flash ---- */

.flash { border-radius: var(--radius); padding: 12px 14px; margin-bottom: 18px; border: 1px solid; }
.flash-ok { background: var(--ok-bg); border-color: #bfe0cd; color: var(--ok); }
.flash-err { background: var(--err-bg); border-color: #efc9c7; color: var(--err); }
.flash-info { background: var(--surface); border-color: var(--line); color: var(--muted); }

/* ---- tables ---- */

table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }
td form { margin: 0; }

/* ---- badges ---- */

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-muted { background: var(--surface-2); color: var(--muted); }

/* ---- key/value list (service overview) ---- */

.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.kv div { border-left: 3px solid var(--line); padding-left: 12px; }
.kv dt { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.kv dd { margin: 2px 0 0; font-size: 16px; font-weight: 600; }

/* ---- pairing code ---- */

.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 34px;
  letter-spacing: 0.18em;
  font-weight: 600;
  margin: 6px 0 4px;
}

/* ---- plans ---- */

.plan { display: flex; flex-direction: column; }
.plan .price { font-size: 22px; font-weight: 650; margin: 8px 0 2px; }
.plan .price-pending { font-size: 15px; font-weight: 600; color: var(--warn); }
.plan .price-was { margin: 2px 0 0; font-size: 14px; font-weight: 400; color: var(--muted); text-decoration: line-through; }
.plan ul { margin: 12px 0 18px; padding-left: 18px; color: var(--muted); font-size: 14px; }
.plan .actions { margin-top: auto; }

.empty { color: var(--muted); padding: 14px 0; }

footer.site { border-top: 1px solid var(--line); background: var(--surface); padding: 20px 0; color: var(--muted); font-size: 13px; }
footer.site .wrap { display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }

@media (max-width: 720px) {
  .topbar .wrap { min-height: 0; padding-top: 12px; padding-bottom: 12px; }
  .topbar nav { margin-left: 0; gap: 14px; }
  h1 { font-size: 21px; }
  .code { font-size: 28px; }
  th, td { padding: 9px 8px; }
}

/* 收款凭证要能直接"打印成 PDF"：纸上不该出现导航、提示条和按钮。 */
@media print {
  .topbar, footer.site, .flash, .actions, .no-print { display: none !important; }
  body { background: #fff; }
  .wrap { max-width: none; padding: 0; }
  .card { border: 0; box-shadow: none; padding: 0; }
  .kv dt { color: #444; }
}
