:root {
  font-family: Inter, "Microsoft YaHei", system-ui, sans-serif;
  color: #242e27;
  background: #f4f3eb;
  font-size: 15px;
  --surface: #fffef8;
  --line: #dedfd2;
  --muted: #5b685d;
  --green: #355342;
  --green-dark: #284334;
  --soft: #e9eee4;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
a { color: inherit; }
:focus-visible { outline: 3px solid #97632d; outline-offset: 3px; }
header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { width: min(1120px, calc(100% - 48px)); min-height: 76px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; }
.brand img { display: block; width: 139px; height: auto; }
.brand span { color: var(--muted); border-left: 1px solid var(--line); padding-left: 14px; white-space: nowrap; font-size: .85rem; }
nav { display: flex; align-items: center; gap: 4px; }
nav a { text-decoration: none; color: var(--muted); padding: 9px 12px; border-radius: 7px; white-space: nowrap; }
nav a.active, nav a:hover { background: var(--soft); color: var(--green-dark); }
nav .btn { margin-left: 5px; }
main { width: min(1120px, calc(100% - 48px)); margin: 38px auto 64px; }
.page-title, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(24px, 3vw, 34px); line-height: 1.35; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
p { line-height: 1.65; }
.muted, small { color: var(--muted); }
small { display: block; margin-top: 5px; font-size: .83rem; line-height: 1.55; }
.hero { background: #e6ede0; border: 1px solid #d6e0d2; color: var(--green-dark); padding: 26px 30px; border-radius: 12px; margin-bottom: 16px; }
.hero p { margin: 9px 0 0; }
.hero .balance { font-size: clamp(29px, 5vw, 43px); font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; margin-top: 5px; }
.account-summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 22px; align-items: center; }
.account-summary .actions { margin-top: 14px; }
.account-id { color: var(--muted); }
.account-id strong { color: var(--green-dark); font-variant-numeric: tabular-nums; letter-spacing: .06em; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 235px), 1fr)); gap: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px; margin-bottom: 16px; }
.panel > h2 { margin-bottom: 14px; }
.panel > p + form, .panel > p + .actions { margin-top: 14px; }
.panel > p + p { margin-top: 10px; }
.grid .panel { margin: 0; }
.grid + .panel { margin-top: 16px; }
.stat b { font-size: 25px; display: block; margin-top: 7px; font-variant-numeric: tabular-nums; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; border: 1px solid #c9d3c6; background: var(--surface); color: var(--green-dark); padding: 8px 14px; border-radius: 7px; text-decoration: none; }
.btn:hover { background: var(--soft); }
.btn.primary { color: #fffef8; background: var(--green); border-color: var(--green); }
.btn.primary:hover { background: var(--green-dark); }
.actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.tag { display: inline-flex; flex: none; padding: 4px 8px; border-radius: 5px; background: var(--soft); font-size: .8rem; color: var(--green-dark); }
.tag.pending { background: #f5e7cf; color: #764515; }
.order { padding: 15px 0; border-bottom: 1px solid var(--line); }
.order:last-child { border-bottom: 0; }
.order-head, .order-body { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.order-body { margin: 11px 0; }
.order-body .money { text-align: right; }
.money { font-variant-numeric: tabular-nums; font-weight: 700; }
.money small { font-weight: 400; }
.auth { width: min(440px, calc(100% - 32px)); margin: clamp(24px, 8vh, 88px) auto 42px; background: var(--surface); padding: clamp(22px, 5vw, 34px); border: 1px solid var(--line); border-radius: 12px; }
.auth h1 { font-size: 25px; margin: 22px 0 13px; }
.tabs { display: flex; gap: 19px; margin-bottom: 13px; border-bottom: 1px solid var(--line); }
.tabs button { border: 0; background: transparent; padding: 8px 4px; color: var(--muted); }
.tabs button.active { border-bottom: 2px solid var(--green); color: var(--green-dark); font-weight: 650; }
label { display: block; margin: 14px 0; color: var(--muted); font-size: .93rem; }
input, textarea, select { display: block; width: 100%; padding: 10px 11px; border: 1px solid #c8d1c5; border-radius: 7px; margin-top: 6px; color: #242e27; background: var(--surface); }
textarea { min-height: 88px; resize: vertical; }
.form-error { color: #9b302a; font-size: .88rem; margin: 0 0 9px; }
.form-error:empty { display: none; }
.auth .primary { width: 100%; margin-top: 5px; }
.profile-panel { max-width: 520px; }
.notice { background: var(--soft); color: var(--green-dark); border: 1px solid #d6e0d2; border-radius: 8px; padding: 11px 14px; margin: 12px 0 16px; line-height: 1.6; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .93rem; }
th, td { padding: 11px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; }
dialog { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 23px; width: min(490px, calc(100% - 32px)); max-height: 90vh; color: inherit; }
dialog::backdrop { background: #24372b70; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.close { border: 0; background: transparent; min-width: 32px; min-height: 32px; font-size: 22px; color: var(--muted); }
.loading, .empty { text-align: center; padding: 24px; color: var(--muted); }
#boss-toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--green-dark); color: white; border-radius: 8px; padding: 10px 16px; display: none; max-width: 90vw; }
#boss-toast.visible { display: block; }
@media (max-width: 760px) {
  .header-inner, main { width: calc(100% - 32px); }
  .header-inner { flex-direction: column; align-items: stretch; gap: 8px; padding: 14px 0 10px; }
  .header-inner nav { overflow-x: auto; padding-bottom: 3px; }
  nav a { padding: 8px; font-size: .85rem; }
  nav .btn { flex: none; }
  main { margin-top: 22px; }
  .hero, .panel { padding: 17px; }
}
@media (max-width: 450px) {
  .account-summary { grid-template-columns: 1fr; gap: 13px; }
  .grid { grid-template-columns: 1fr; }
  .page-title { margin-bottom: 13px; }
}

.category { display:block; text-decoration:none; }
.category:hover { border-color:#a2b9d0; background:#f2f6fa; }
.category span { color:#405c75; }
.panel > .actions, .dialog-head + .order-head + .actions, .topup-qr + p + small + .actions { margin-top:12px; }
.topup-qr { display:block; margin:16px auto 10px; max-width:100%; height:auto; }
.filing { padding:15px 20px 25px; display:flex; justify-content:center; align-items:center; gap:14px 24px; flex-wrap:wrap; color:var(--muted); font-size:.82rem; }
.filing a { display:inline-flex; gap:5px; align-items:center; text-decoration:none; }
.filing a:hover { text-decoration:underline; }
.profile-page { width:min(540px, calc(100% - 32px)); text-align:center; }
.profile-page .page-title, .profile-page .actions { justify-content:center; }
.profile-page form { max-width:360px; margin:16px auto 0; }
.profile-page input { text-align:center; }
