* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 "Microsoft YaHei UI", "Segoe UI", sans-serif; color: #1c1915; background: #f6f3ee; }
.topbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; padding: 14px 28px; background: #231c16; color: #f6f3ee; }
.brand { font-weight: 700; }
.main-nav { display: flex; gap: 16px; }
.main-nav a { color: #f6f3ee; text-decoration: none; padding: 6px 0; }
.main-nav a.active { text-decoration: underline; }
.identity { margin-left: auto; }
.identity button, button { font: inherit; }
main { max-width: 1600px; margin: 0 auto; padding: 28px; }
.upstream-balances { margin-bottom: 26px; }
.balance-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin-bottom: 12px; }
.balance-heading h2 { margin: 0; font-size: 20px; }
.balance-heading span, .balance-time { color: #7a7168; font-size: 14px; }
.balance-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.balance-card { padding: 18px; border: 1px solid #eadfce; border-radius: 10px; background: white; }
.balance-card h3 { margin: 0 0 8px; font-size: 16px; }
.balance-amount { margin: 0 0 6px; font-size: 28px; font-weight: 700; overflow-wrap: anywhere; }
.balance-amount span { font-size: 13px; font-weight: 400; color: #7a7168; }
.balance-note, .balance-time { margin: 4px 0 0; }
.balance-warning .balance-note { color: #8a4b22; }
form.issue, form label { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
input, select { font: inherit; width: 100%; max-width: 420px; padding: 10px 12px; border: 1px solid #c8bfb2; border-radius: 6px; background: white; }
form.filters { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: end; }
form.filters label { margin: 0; }
form.filters input, form.filters select { width: 12em; }
td input[readonly] { width: 18em; max-width: 100%; font-family: Consolas, "Microsoft YaHei UI", monospace; }
form.edit { display: flex; flex-direction: column; gap: 6px; min-width: 12em; }
form.edit input, form.edit select { width: 12em; max-width: none; }
form.rate { display: flex; gap: 6px; align-items: center; }
form.rate input { width: 5em; max-width: none; }
form.rate span { color: #7a7168; }
button { padding: 10px 16px; border: 0; border-radius: 6px; background: #8a4b22; color: white; cursor: pointer; }
table { width: 100%; border-collapse: collapse; background: white; margin-top: 18px; }
th, td { padding: 10px 12px; border-bottom: 1px solid #eadfce; text-align: left; vertical-align: top; }
.actions form { display: inline-flex; gap: 6px; margin: 0 8px 8px 0; align-items: center; }
.actions input { width: 7em; max-width: none; }
fieldset.platforms { border: 0; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px 16px; max-width: 420px; }
fieldset.platforms legend { padding: 0; margin-bottom: 6px; }
label.check, form label.check { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; margin: 0; }
label.check input { width: auto; max-width: none; min-height: 0; padding: 0; }
fieldset.duration { border: 0; padding: 0; margin: 0 0 12px; max-width: 420px; }
fieldset.duration legend { padding: 0; margin-bottom: 6px; }
.duration-options { display: flex; flex-wrap: wrap; gap: 8px; }
.duration-options label.check { padding: 8px 12px; border: 1px solid #c8bfb2; border-radius: 6px; background: white; cursor: pointer; }
.duration-options label:has(input:checked) { border-color: #8a4b22; background: #fff1de; }
.duration .duration-custom { margin: 12px 0 0; }
.duration:has(input[name="duration_preset"]:checked:not([value="custom"])) .duration-custom { display: none; }
.duration > p { margin: 6px 0 0; }
.actions form.platform-edit { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.actions form.platform-edit fieldset.platforms { margin: 0; max-width: 16em; }
.error { color: #8d1d1d; }
.warn { color: #8a4b22; }
.up { color: #8d1d1d; font-weight: 700; }
.down { color: #1d6b3a; font-weight: 700; }
.flat { color: #7a7168; }
.code code { font-size: 18px; display: inline-block; max-width: 100%; word-break: break-all; }
code { background: white; padding: 4px 8px; border-radius: 6px; }
.main-nav { flex-wrap: wrap; }
.table-scroll { overflow-x: auto; }
.table-scroll td { overflow-wrap: anywhere; }
.table-scroll th { white-space: nowrap; }
.card-ledger { min-width: 1600px; }
.card-ledger td[data-label="到期"] { white-space: nowrap; min-width: 116px; }
.card-ledger td { overflow-wrap: normal; min-width: 70px; }
.card-ledger td[data-label="发放时间"] { min-width: 125px; }
.card-ledger td[data-label="平台"] { min-width: 150px; }
.card-ledger td[data-label="额度"], .card-ledger td[data-label="已花"], .card-ledger td[data-label="剩余"] { white-space: nowrap; }
.card-ledger td[data-label="剩余"] { min-width: 136px; }
.balance { display: block; font-weight: 700; }
.balance-when { display: block; max-width: 13em; white-space: normal; font-size: 14px; font-weight: 400; color: #5f564d; }
.balance-when.warn { color: #8a4b22; }
.card-ledger .actions, .card-ledger th:last-child { position: sticky; right: 0; background: white; min-width: 220px; box-shadow: -4px 0 6px #231c160a; }
details { margin: 8px 0; }
summary { cursor: pointer; color: #8a4b22; padding: 8px 0; }
.issue-panel { background: white; padding: 12px 20px; border: 1px solid #eadfce; border-radius: 10px; }
.issue-panel > summary { font-weight: 700; }
button.secondary { background: #eee4d6; color: #643918; }

@media (max-width: 720px) {
  .topbar { padding: 12px 16px; }
  .brand { flex: 1 1 auto; }
  .main-nav { order: 3; width: 100%; }
  .identity { margin-left: 0; }
  .identity button { min-height: 40px; }
  main { padding: 16px; }
  .table-scroll { overflow-x: visible; }
  .card-ledger { min-width: 0; }
  .card-ledger td { min-width: 0; }
  .card-ledger .actions { position: static; box-shadow: none; }
  form.filters input, form.filters select { width: 100%; }
  form.filters label { flex: 1 1 140px; min-width: 0; }
  td > input[readonly] { min-width: 0; }
  .balance-cards { grid-template-columns: 1fr; gap: 10px; }
  h1 { font-size: 1.35rem; }
  input, button { min-height: 44px; font-size: 16px; }
  form.issue button { width: 100%; max-width: 420px; }
  table, thead, tbody, tr, th, td { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table { background: transparent; }
  tr { background: white; border: 1px solid #eadfce; border-radius: 10px; margin: 0 0 12px; padding: 6px 0; }
  td { border: 0; display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
  td::before { content: attr(data-label); color: #7a7168; flex: 0 0 5.2em; }
  .balance { text-align: right; }
  .balance-when { margin-left: auto; }
  td.actions { display: block; }
  td.actions::before { content: none; }
  .actions form { display: flex; width: 100%; margin: 8px 0 0; }
  .actions input { flex: 1; width: auto; }
  .actions button { flex: 0 0 auto; }
}

.muted { color: #7a7168; font-size: 14px; }
.who { margin-right: 12px; }
.identity form { display: inline; }
.summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 16px 0 22px; }
.summary-card { padding: 18px; border: 1px solid #eadfce; border-radius: 10px; background: white; }
.summary-card.attention { border-color: #d9a066; }
.summary-card.hero { grid-column: 1 / -1; border-color: #8a4b22; background: #fffaf3; }
.summary-card.hero .summary-value { font-size: 40px; }
tr.voided td { color: #9a8f84; text-decoration: line-through; }
tr.flagged td { background: #fff1de; }
tr.machine-row td { padding-top: 0; background: transparent; }
.summary-card h3 { margin: 0 0 8px; font-size: 16px; }
.summary-value { margin: 0 0 6px; font-size: 28px; font-weight: 700; overflow-wrap: anywhere; }
.summary-note { margin: 4px 0 0; color: #5f564d; font-size: 14px; }
.summary-note a, p.more a { color: #8a4b22; }
.portal-ledger { min-width: 980px; }
.portal-ledger td[data-label="剩余"], .portal-ledger td[data-label="额度"], .portal-ledger td[data-label="已花"], .portal-ledger td[data-label="到期时间"] { white-space: nowrap; }
.extension-ok { padding: 10px 14px; border: 1px solid #b9d9c2; border-radius: 8px; background: #eef8f0; color: #1d6b3a; }
.actions form.extend { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.actions form.extend input { width: 11em; }
.login-panel { margin-top: 18px; padding: 12px 20px; border: 1px solid #eadfce; border-radius: 10px; background: white; }
.login-panel h2 { margin: 0 0 8px; font-size: 20px; }
.login-panel h3 { margin: 14px 0 4px; font-size: 16px; }
.login-panel ul { margin: 0; padding-left: 1.2em; color: #5f564d; font-size: 14px; }
form.login-action { display: inline-flex; flex-wrap: wrap; align-items: end; gap: 8px 12px; margin: 0 12px 10px 0; }
form.login-action label { margin: 0; }
pre.copy-box { margin: 14px 0; padding: 14px 18px; border: 1px solid #eadfce; border-radius: 10px; background: white; white-space: pre-wrap; overflow-wrap: anywhere; font: 16px/1.7 Consolas, "Microsoft YaHei UI", monospace; user-select: all; }

@media (max-width: 720px) {
  .summary { grid-template-columns: 1fr; gap: 10px; }
  .portal-ledger { min-width: 0; }
  .who { display: block; margin: 0 0 6px; }
  form.login-action { display: flex; margin-right: 0; }
}

/* 公告 (Decision 061): the list, the form, and the "how customers will see it" card. */
a.button { display: inline-block; padding: 10px 16px; border-radius: 6px; background: #8a4b22; color: white; text-decoration: none; }
textarea { font: inherit; width: 100%; max-width: 640px; padding: 10px 12px; border: 1px solid #c8bfb2; border-radius: 6px; background: white; resize: vertical; }
input[type="datetime-local"] { max-width: 260px; }
form.announcement-form { max-width: 680px; }
fieldset.link-box { border: 1px solid #eadfce; border-radius: 8px; padding: 8px 14px 4px; margin: 0 0 12px; background: white; }
fieldset.link-box legend { padding: 0 6px; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 13px; line-height: 1.6; background: #eee4d6; color: #643918; }
.badge-ok { background: #e3f3e8; color: #1d6b3a; }
.badge-wait { background: #fff1d6; color: #8a5a00; }
.badge-off { background: #ece8e2; color: #7a7168; }
.badge-important { background: #fbe3e0; color: #8d1d1d; }
.badge-pin { background: #e2ebf8; color: #214a85; }
table.announcements td.actions form { display: inline; margin: 0 0 0 6px; }
table.announcements td > div { min-width: 0; overflow-wrap: anywhere; }
.notice-preview { margin: 14px 0 20px; }
.notice-card { max-width: 640px; padding: 14px 18px; border: 1px solid #eadfce; border-radius: 10px; background: white; }
.notice-card-important { border-color: #d9a066; }
.notice-card-head { margin-bottom: 8px; }
.notice-card-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.notice-link { margin: 10px 0 0; }
.fake-button { display: inline-block; padding: 4px 12px; border-radius: 6px; background: #8a4b22; color: white; }
/* Feedback rewards use the site's existing responsive table and form controls. */
.reward-policy { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 18px 0; }
.reward-policy label { flex: 0 1 280px; }
/* 客户反馈 (Decision 069): the report's facts, its screenshots and the replies sent. */
table.feedback-facts { max-width: 900px; }
table.feedback-facts th { width: 9em; white-space: nowrap; color: #5f564d; font-weight: 400; }
.feedback-shots { display: flex; flex-wrap: wrap; gap: 14px; margin: 12px 0 20px; }
.feedback-shots figure { margin: 0; max-width: 480px; }
.feedback-shots img { display: block; max-width: 100%; height: auto; border: 1px solid #eadfce; border-radius: 6px; background: white; }
.feedback-shots figcaption { color: #7a7168; font-size: 14px; margin-top: 4px; }
table.feedback-replies td[data-label="内容"] { min-width: 18em; }
/* What the customer wrote back from the 公告 window (owner 2026-10-25): set apart from the replies. */
table.feedback-replies tr.feedback-answer td { background: #fff7e8; }
table.feedback-list td[data-label="编号"], table.feedback-list td[data-label="收到"] { white-space: nowrap; }
