:root {
  color-scheme: light;
  --ink: #242830;
  --muted: #626b76;
  --line: #dfe5eb;
  --bg: #eef3f7;
  --brand: #5969c8;
  --active: #dfe3ff;
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  letter-spacing: 0;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body, h1, h2, p, dl, dd, form { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 1px solid transparent; background: transparent; padding: 7px 12px; border-radius: 5px; font-size: 13px; white-space: nowrap; }
button:hover { background: #f2f3fb; }
button:disabled { opacity: .54; cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
button.primary { background: var(--brand); color: #fff; }
button.primary:hover:not(:disabled) { background: #4453af; }
.secondary { background: white; border-color: #ccd4dd; }
.quiet { color: var(--muted); }
.link { color: #4553a4; padding: 4px 6px; }
h1 { font-size: 22px; font-weight: 650; line-height: 1.45; }
h2 { font-size: 16px; line-height: 1.5; }
.top { height: 56px; background: white; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 22px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand i { width: 9px; height: 21px; background: var(--brand); transform: skewX(-16deg); }
.brand strong { font-size: 19px; }
.brand span { border-left: 1px solid var(--line); padding-left: 12px; color: var(--muted); font-size: 13px; }
#identity { min-width: 0; }
#operator { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--muted); }
.login { background: white; border: 1px solid var(--line); border-radius: 6px; padding: 30px; display: grid; gap: 15px; width: min(406px, calc(100% - 32px)); margin: 12vh auto; }
.login h1 { margin-bottom: 3px; }
.hint, .meta { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.shell { display: grid; grid-template-columns: 170px minmax(0, 1fr); min-height: calc(100vh - 56px); }
aside { background: white; border-right: 1px solid var(--line); padding: 22px 12px; }
.rail-title { font-size: 13px; font-weight: 650; padding: 0 12px 15px; }
nav { display: grid; gap: 4px; }
nav button { width: 100%; text-align: left; padding: 10px 12px; }
nav button[aria-current="page"] { background: var(--active); color: #34429d; font-weight: 650; }
.workspace { min-width: 0; padding: 22px 28px 48px; }
.heading, .section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.heading { margin-bottom: 18px; }
.section-head { padding: 16px 20px; border-bottom: 1px solid var(--line); }
.sheet { background: #fff; border: 1px solid var(--line); border-radius: 5px; min-width: 0; }
.sheet + .sheet { margin-top: 16px; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.notice { border-left: 3px solid #5969c8; background: #f1f2ff; color: #414d8b; padding: 9px 12px; font-size: 13px; overflow-wrap: anywhere; }
.workspace > .notice { margin: 0 0 14px; }
.notice.error { border-color: #aa4551; color: #812c38; background: #fff2f1; }
.notice.ok { border-color: #338062; color: #296648; background: #edf7f1; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
th, td { padding: 11px 16px; border-bottom: 1px solid #e8edf0; vertical-align: middle; }
th { color: var(--muted); font-size: 12px; font-weight: 550; white-space: nowrap; background: #f8fafb; }
td { overflow-wrap: anywhere; }
tbody tr:last-child td { border-bottom: 0; }
td .meta { display: block; }
.state { padding: 26px 20px; color: var(--muted); text-align: center; }
.pad { padding: 18px 20px; }
.filter { background: #f8fafb; border-bottom: 1px solid var(--line); padding: 15px 20px; display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.filter label:first-child { min-width: min(210px, 100%); }
label { display: grid; align-content: start; gap: 4px; min-width: 0; color: #515d6b; font-size: 13px; }
input:not([type="checkbox"]), textarea, select { background: #fff; border: 1px solid #cbd3dd; border-radius: 4px; width: 100%; min-width: 0; padding: 7px 9px; line-height: 1.5; }
textarea { resize: vertical; }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--brand); }
.check { display: flex; gap: 7px; align-items: center; }
.editor { display: grid; gap: 15px; }
.editor > label { max-width: 640px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,175px),1fr)); align-items: end; gap: 12px; }
fieldset { min-width: 0; border: 1px solid var(--line); border-radius: 4px; padding: 13px; margin: 0; }
legend { padding: 0 5px; font-weight: 600; }
.editor details { margin-top: 12px; }
.editor details summary { cursor: pointer; color: var(--muted); }
.editor details .grid { margin-top: 10px; }
.price-preview { margin: 0; }
.readout { display: grid; grid-template-columns: minmax(110px, auto) minmax(0,1fr); gap: 0 18px; }
.readout dt, .readout dd { padding: 7px 0; border-bottom: 1px solid #ebeff2; }
.readout dt { color: var(--muted); }
.readout dd { overflow-wrap: anywhere; }
.receipt-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.thumb { width: 46px; height: 54px; object-fit: cover; border-radius: 3px; background: #eef1f3; }
.name { font-weight: 600; }
.positive { color: #246e50; }
.warn { color: #9a5d14; }
.pager { border-top: 1px solid var(--line); display: flex; justify-content: flex-end; padding: 10px 16px; }
.review-detail { padding: 16px 20px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, .8fr); gap: 20px; align-items: start; border-bottom: 1px solid var(--line); }
.review-image { display: block; background: #f4f6f8; object-fit: contain; width: 100%; height: min(56vh, 490px); }
@media(max-width: 720px) {
  .top { padding: 0 14px; }
  .top .actions { flex-wrap: nowrap; gap: 2px; }
  .brand { gap: 7px; }
  .shell { grid-template-columns: 1fr; align-content: start; }
  aside { padding: 7px 10px; border: 0; border-bottom: 1px solid var(--line); }
  .rail-title { display: none; }
  nav { display: flex; flex-wrap: wrap; }
  nav button { width: auto; padding: 6px 9px; }
  .workspace { padding: 17px 12px 36px; }
  .section-head, .pad, .filter { padding: 13px; }
  th, td { padding: 9px 10px; }
  .table-scroll table { min-width: 560px; }
  .login { padding: 22px; }
  .review-detail { grid-template-columns: 1fr; padding: 13px; }
}
