:root {
  --ink: #16202a;
  --muted: #7b8798;
  --line: #e3e9f0;
  --bg: #eef3f8;
  --panel: #ffffff;
  --brand: #1f5fb8;
  --brand-soft: #eaf3ff;
  --warn-bg: #fff7e6;
  --warn-ink: #8a5a00;
  --ok-bg: #e8f7ef;
  --ok-ink: #1f7a4d;
  --alert: #b42318;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); }
.banner { padding: 8px 5%; background: #fff7e6; color: #8a5a00; font-size: 13px; }
header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 5% 12px; }
.eyebrow { color: var(--muted); font-size: 13px; letter-spacing: .12em; }
h1 { font-size: 26px; margin: 4px 0; }
h2 { font-size: 20px; margin: 0 0 4px; }
h3 { font-size: 16px; margin: 0 0 12px; }
h4 { font-size: 14px; margin: 18px 0 8px; color: var(--muted); }
.login { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
#login { display: flex; gap: 8px; }
#whoami { font-size: 14px; color: var(--muted); }

button, input, select, textarea { font: inherit; border: 1px solid #d5dde7; border-radius: 7px; padding: 8px 12px; }
button { cursor: pointer; background: white; color: #1f5fb8; }
button:hover { background: var(--brand-soft); }
button:disabled { opacity: .5; cursor: default; }
button.primary { background: var(--brand); color: white; border-color: var(--brand); }
input, select, textarea { background: white; max-width: 100%; }
textarea { width: 100%; min-height: 72px; font-family: ui-monospace, Menlo, monospace; font-size: 13px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; padding: 10px 5%; border-bottom: 1px solid var(--line); }
.toolbar label { display: flex; gap: 8px; align-items: center; }
nav { display: flex; gap: 6px; }
nav button.active { background: var(--brand); color: white; border-color: var(--brand); }
#sync, .note, .hint, small, .muted { font-size: 13px; color: var(--muted); }
#message { margin: 10px 5%; color: #a23b27; min-height: 24px; }
main { margin: 0 5% 50px; }
.empty { padding: 30px; color: #7b8798; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: var(--panel); padding: 12px 18px; border-radius: 10px; border: 1px solid var(--line); }
.stat span { display: block; font-size: 13px; color: var(--muted); }
.stat strong { font-size: 22px; }

.layout { display: grid; grid-template-columns: minmax(250px, 1fr) minmax(0, 2.4fr); gap: 20px; margin-top: 18px; align-items: start; }
.list { display: flex; flex-direction: column; gap: 8px; }
.list-title { font-size: 15px; color: var(--muted); margin: 0; }
.card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel); padding: 12px 14px; text-align: left; width: 100%; }
.card.selected { border-color: var(--brand); box-shadow: inset 4px 0 var(--brand); }
.card .mode { font-size: 12px; color: var(--muted); }
.reasons { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.chip { display: inline-block; background: #eef2f6; border-radius: 20px; padding: 2px 10px; font-size: 12px; color: var(--ink); }
.chip.warn { background: var(--warn-bg); color: var(--warn-ink); }
.chip.ok { background: var(--ok-bg); color: var(--ok-ink); }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px 22px; margin-bottom: 14px; }
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.figure { background: var(--bg); border-radius: 9px; padding: 10px 14px; display: flex; flex-direction: column; }
.figure span { font-size: 13px; color: var(--muted); }
.figure strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.figure.alert strong { color: var(--alert); }
.warnings { margin: 10px 0 0; padding-left: 20px; color: var(--warn-ink); font-size: 13px; }

.carry { background: var(--warn-bg); border-radius: 9px; padding: 12px 14px; margin-bottom: 14px; }
.carry .note { color: var(--warn-ink); }
.carry-note { background: var(--brand-soft); border-radius: 8px; padding: 8px 12px; }
.segmented { display: flex; gap: 0; margin-bottom: 14px; }
.segmented button { border-radius: 0; margin-left: -1px; min-width: 72px; }
.segmented button:first-child { border-radius: 7px 0 0 7px; margin-left: 0; }
.segmented button:last-child { border-radius: 0 7px 7px 0; }
.segmented button.on { background: var(--brand); color: white; border-color: var(--brand); position: relative; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.field input { width: 100%; }
.field-label { font-size: 13px; color: var(--muted); }
.inline { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.people { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.person { border: 1px dashed #d5dde7; border-radius: 9px; padding: 10px 12px; display: flex; flex-direction: column; }
.person span { font-size: 13px; color: var(--muted); }
.person.ok { border: 1px solid #a9dbbf; background: var(--ok-bg); }
.person.ok span { color: var(--ok-ink); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 4px; }

details { margin: 6px 0; border-top: 1px solid #edf1f4; padding-top: 6px; }
summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
table { border-collapse: collapse; width: 100%; font-size: 14px; margin: 6px 0; }
td { padding: 6px 8px; border-bottom: 1px solid #edf1f4; vertical-align: top; }
td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.rights td { color: var(--muted); }
pre { white-space: pre-wrap; word-break: break-word; font-size: 12px; max-height: 360px; overflow: auto; background: var(--bg); padding: 10px; border-radius: 8px; }

.payments { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.payment { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin: 8px 0; }
.more .payment { background: var(--bg); border: 0; }
.payment-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.pay-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 8px 0; }
.paid-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14px; margin: 6px 0; }
.upload { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 6px 0; }

@media (max-width: 860px) {
  header { display: block; }
  .layout { grid-template-columns: 1fr; }
  .form, .people { grid-template-columns: 1fr; }
  main { margin: 0 16px 30px; }
  .toolbar, .banner, header { padding-left: 16px; padding-right: 16px; }
  #message { margin: 10px 16px; }
}

/* ---- simplified review & payments (2026-10-17 feedback) ---- */
.waiting { background: #fffaf0; border: 1px solid #f3dfb3; border-radius: 12px; padding: 12px 16px; margin: 0 0 16px; }
.waiting h3 { margin: 0 0 8px; color: var(--warn-ink); }
.waiting-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid #f5ead0; }
.waiting-row:first-of-type { border-top: 0; }
.waiting-row span { flex: 1; font-size: 14px; color: var(--muted); }
.card-top { display: flex; justify-content: space-between; width: 100%; align-items: baseline; }
.card-line { font-size: 13px; color: var(--muted); }
.card-line.done { color: var(--ok-ink); font-weight: 600; }
.card-line.loss, .figure.loss strong { color: var(--alert); }
.figure.gain strong { color: var(--ok-ink); }
.figures + .figures { margin-top: 10px; }
.title-row { display: flex; align-items: baseline; gap: 10px; }
.title-row .mode { font-size: 13px; color: var(--muted); }
.warn-text { color: var(--warn-ink); }
.recipient { background: var(--bg); border-radius: 9px; padding: 10px 14px; margin-bottom: 12px; }
.recipient-line { font-weight: 600; }
.recipient-line.missing { color: var(--alert); }
.recipient select { margin: 6px 0; }
.pay-section { margin-top: 20px; }
.pay-section h2 { font-size: 17px; margin-bottom: 4px; }
.amount-row { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.amount-row .big { font-size: 24px; font-variant-numeric: tabular-nums; }
.recipient-pay { background: var(--bg); border-radius: 9px; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.recipient-pay .account { font-variant-numeric: tabular-nums; letter-spacing: .04em; font-weight: 600; }
.recipient-pay button { margin-top: 6px; }
.payment.deferred { border-style: dashed; }

/* ---- 欧阳小程序管理员工作台视觉语言（miniprogram-vxcloud pages/admin/home） ---- */
:root { --title: #11243f; --text: #223142; --shadow: 0 5px 12px rgba(23, 48, 84, 0.08); }
header { margin: 12px 5% 0; padding: 18px 20px; border-radius: 14px; color: #ffffff;
  background: linear-gradient(135deg, #11243f 0%, #1e395f 100%); box-shadow: 0 8px 16px rgba(17, 36, 63, 0.16); }
header .eyebrow { color: rgba(255, 255, 255, 0.72); }
header h1 { color: #ffffff; font-size: 22px; font-weight: 700; }
header #whoami { color: rgba(255, 255, 255, 0.78); }
header select { border-color: rgba(255, 255, 255, 0.3); }
header button.primary { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.3); color: #ffffff; }
.toolbar { border-bottom: 0; }
nav button.active { background: var(--brand); border-color: var(--brand); color: #ffffff; }
h2, h3 { color: var(--title); font-weight: 700; }
.panel h3, .pay-section h2, .list-title { padding-left: 8px; border-left: 3px solid var(--brand); line-height: 1.2; }
.panel, .stat, .card, .payment, .waiting { border: 0; box-shadow: var(--shadow); border-radius: 12px; }
.card.selected { box-shadow: inset 3px 0 var(--brand), var(--shadow); }
.figure { background: #f7f9fb; }
.figure span, .stat span, .field-label { color: #7b8798; }
.figure strong, .stat strong { color: var(--title); }
.figure.gain strong, .card-line.done { color: #1f7a4d; }
.figure.loss strong, .card-line.loss { color: #b42318; }
.chip { background: #eef2f6; color: #64748b; font-weight: 600; }
.chip.ok { background: #e8f7ef; color: #1f7a4d; }
.chip.warn { background: #fff4ef; color: #a23b27; }
.segmented button.on { background: var(--brand); border-color: var(--brand); }
button { color: var(--brand); }
button.primary:hover { background: #1a4f9c; }
.person.ok { background: #e8f7ef; border-color: #a9dbbf; }
.waiting { background: #fffaf0; }
.recipient, .recipient-pay { background: #f7f9fb; }
.card strong, .payment-head strong, .waiting-row strong { color: var(--title); }

/* ---- month / date pickers and toolbar buttons ---- */
.toolbar { gap: 12px; }
.month-picker { display: flex; align-items: center; background: #ffffff; border-radius: 999px; box-shadow: var(--shadow); padding: 3px; }
.month-picker button { border: 0; background: transparent; border-radius: 999px; }
.icon-button { width: 34px; height: 34px; padding: 0; font-size: 20px; line-height: 1; color: var(--brand); border-radius: 999px; }
.icon-button:hover { background: #eaf3ff; }
.month-button { padding: 6px 14px; font-weight: 700; color: var(--title); min-width: 120px; text-align: center; }
.month-button:hover, .month-button[aria-expanded="true"] { background: #eaf3ff; }
.tabs-segmented { display: flex; gap: 0; background: #ffffff; border-radius: 999px; padding: 3px; box-shadow: var(--shadow); }
.tabs-segmented button { border: 0; border-radius: 999px; padding: 7px 18px; background: transparent; color: #516173; font-weight: 600; }
.tabs-segmented button.active { background: var(--brand); color: #ffffff; }
.refresh-button { border: 0; border-radius: 999px; background: #ffffff; box-shadow: var(--shadow); padding: 7px 16px; color: var(--brand); font-weight: 600; }
.popover { position: absolute; z-index: 50; width: 288px; background: #ffffff; border-radius: 14px; padding: 12px;
  box-shadow: 0 16px 36px rgba(17, 36, 63, 0.18); }
.popover-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.popover-head strong { color: var(--title); font-size: 15px; }
.popover .icon-button { border: 0; background: transparent; }
.month-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.month-grid button, .day-grid button { border: 0; border-radius: 9px; background: #f7f9fb; color: var(--text); padding: 8px 0; text-align: center; }
.day-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.day-grid button { padding: 6px 0; font-size: 13px; }
.weekday { text-align: center; font-size: 12px; color: #7b8798; padding: 2px 0; }
.month-grid button:hover, .day-grid button:hover { background: #eaf3ff; color: var(--brand); }
.month-grid button.today, .day-grid button.today { box-shadow: inset 0 0 0 1px var(--brand); }
.month-grid button.on, .day-grid button.on { background: var(--brand); color: #ffffff; font-weight: 700; }
.link-button { border: 0; background: transparent; color: var(--brand); padding: 8px 4px 0; font-weight: 600; }
.quick-dates { display: flex; justify-content: flex-end; }
.date-button { width: 100%; text-align: left; background: #ffffff; border: 1px solid #d5dde7; border-radius: 7px; padding: 8px 12px; color: var(--text); }
.date-button:hover { border-color: var(--brand); background: #ffffff; }
table.stores th { text-align: left; font-size: 12px; color: #7b8798; font-weight: 600; padding: 6px 8px; border-bottom: 1px solid #edf1f4; }
table.stores tr.inactive td { color: #a0aab6; }
td.mono { font-variant-numeric: tabular-nums; font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
