/* 对账系统共用样式 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f5f6f8; color: #222; font-size: 15px;
}
.topbar {
  background: #1f2937; color: #fff; padding: 5px 14px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  position: sticky; top: 0; z-index: 10;
}
.topbar .brand { font-weight: 700; font-size: 16px; }
.topbar a { color: #9ca3af; text-decoration: none; font-size: 14px; }
.topbar a.active, .topbar a:hover { color: #fff; }
.topbar .who { margin-left: auto; font-size: 13px; color: #9ca3af; }
.topbar .who b { color: #fff; }
.topbar button.link { background: none; border: none; color: #9ca3af; cursor: pointer; font-size: 13px; }
.wrap { max-width: 1280px; margin: 8px auto; padding: 0 12px; }
.card { background: #fff; border-radius: 10px; padding: 12px; margin-bottom: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.card h3 { font-size: 15px; margin-bottom: 8px; color: #374151; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row + .row { margin-top: 10px; }
label { font-size: 13px; color: #6b7280; }
input[type=text], input[type=password], input[type=date], input[type=number], select, textarea {
  border: 1px solid #d1d5db; border-radius: 6px; padding: 8px 10px; font-size: 14px;
  background: #fff; font-family: inherit;
}
textarea { width: 100%; min-height: 160px; resize: vertical; font-size: 13px; line-height: 1.5; }
button {
  border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; cursor: pointer;
  background: #e5e7eb; color: #111;
}
button.primary { background: #2563eb; color: #fff; }
button.danger { background: #dc2626; color: #fff; }
button.success { background: #16a34a; color: #fff; }
button.warn { background: #d97706; color: #fff; }
button:disabled { opacity: .5; cursor: not-allowed; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 7px 8px; border-bottom: 1px solid #eef0f3; text-align: left; vertical-align: top; }
th { color: #6b7280; font-weight: 600; white-space: nowrap; background: #fafbfc; font-size: 11px; }
tr:hover td { background: #fafcff; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; white-space: nowrap; }
.tag.ok { background: #dcfce7; color: #166534; }
.tag.scale { background: #dbeafe; color: #1e40af; }
.tag.bad { background: #fee2e2; color: #991b1b; }
.tag.unknown { background: #fef9c3; color: #854d0e; }
.tag.manual { background: #f3e8ff; color: #6b21a8; }
.tag.grey { background: #e5e7eb; color: #374151; }
.tag.pending { background: #fef9c3; color: #854d0e; }
.tag.confirmed { background: #dcfce7; color: #166534; }
.tag.returned { background: #fee2e2; color: #991b1b; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.muted { color: #9ca3af; font-size: 12px; }
.bets { font-size: 12px; color: #4b5563; line-height: 1.6; }
.bets .amb { color: #d97706; }
.notes { font-size: 12px; color: #b45309; }
.hidden { display: none; }
.mt { margin-top: 12px; }
.big { font-size: 20px; font-weight: 700; }
.right { text-align: right; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.store-card { background: #fff; border-radius: 10px; padding: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.store-card .name { font-weight: 700; margin-bottom: 6px; }
.store-card .balance { font-size: 22px; font-weight: 700; }
.store-card .balance.low { color: #dc2626; }
.store-card .suggest { color: #d97706; font-size: 13px; margin-top: 4px; }
summary { cursor: pointer; color: #2563eb; font-size: 13px; }
details { margin-top: 8px; }
textarea.rawview { min-height: 90px; background: #f9fafb; font-size: 12px; }
/* 极简核对表 */
.orders-table td, .orders-table th { padding: 1px 4px; line-height: 1.25; font-size: 12px; }
tr.row-bad td { background: #fef2f2; }
tr.row-scale td { background: #eff6ff; }
tr.row-unknown td { background: #fffbeb; }
td.seq { color: #9ca3af; width: 24px; text-align: right; font-size: 11px; }
.orders-table .name-input { width: 68px; padding: 1px 4px; font-size: 11px; }
.orders-table input[type=number] { width: 70px; text-align: right; padding: 1px 4px; font-size: 11px; }
.hint { font-size: 11px; color: #b45309; margin-top: 1px; }
.detail-link { color: #2563eb; font-size: 12px; cursor: pointer; }
tr.detail-row td { background: #f9fafb; padding: 8px 14px; }
.paste-bar { display: flex; gap: 12px; align-items: center; padding: 6px 12px; font-size: 13px; }
/* 两栏并排（宽屏四栏） */
.two-col { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; align-items: start; }
@media (max-width: 1240px) { .two-col { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .two-col { grid-template-columns: 1fr; } }
.notice { padding: 6px 10px; border-radius: 8px; font-size: 12px; margin-bottom: 8px; }
.notice.ok { background: #dcfce7; color: #166534; }
.notice.err { background: #fee2e2; color: #991b1b; }
.notice.info { background: #dbeafe; color: #1e40af; }
@media (max-width: 640px) {
  .wrap { padding: 0 8px; }
  th, td { padding: 6px 4px; }
  .hide-m { display: none; }
}
