* { box-sizing: border-box; }
html, body, #root { height: 100%; margin: 0; }
body {
  background: #f4f6fb;
  color: #1f2937;
  -webkit-font-smoothing: antialiased;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
a { color: #2f6bff; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #d3dae7; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

.app-sider {
  border-right: 1px solid #eef1f7;
  box-shadow: 0 2px 12px rgba(31, 45, 61, 0.03);
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 20;
}
.app-sider .ant-layout-sider-children { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.app-sider .ant-menu { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; padding-bottom: 4px; }
.app-sider .ant-menu-item { height: 38px; line-height: 38px; margin-block: 1px; }
.app-sider .ant-menu-item-group-title { padding-top: 8px; padding-bottom: 2px; font-size: 11px; }
.app-mobile-drawer .ant-drawer-body { padding: 0; display: flex; flex-direction: column; height: 100%; }
.app-mobile-drawer .brand { flex: none; padding-right: 8px; }
.app-mobile-drawer .ant-menu { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; }
.app-mobile-drawer .sider-foot { flex: none; }
.sider-foot { flex: none; padding: 12px 20px 16px; color: #b6bfcc; font-size: 11px; border-top: 1px solid #f1f4f9; background: #fff; }
.brand {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  border-bottom: 1px solid #f1f4f9;
}
.brand-logo {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, #2f6bff 0%, #6d9bff 100%);
  color: #fff; font-weight: 700; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 14px rgba(47, 107, 255, 0.28);
  flex: none;
}
.brand-name { font-size: 15px; font-weight: 650; letter-spacing: 0.2px; line-height: 1.2; }
.brand-sub { font-size: 11px; color: #98a2b3; margin-top: 1px; }
.brand-text { min-width: 0; }
.drawer-close { margin-left: auto; flex: none; color: #98a2b3; }

.app-header {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  background: #fff;
  border-bottom: 1px solid #eef1f7;
  position: sticky;
  top: 0;
  z-index: 15;
}
.header-titles { min-width: 0; }
.header-title { font-size: 17px; font-weight: 620; }
.header-sub { font-size: 12px; color: #98a2b3; margin-top: 2px; }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.header-store-select { width: 210px; }
.header-store-select .ant-select-selector { padding-inline: 10px !important; }
.mobile-menu-btn { display: none; }
.ant-layout-content { min-width: 0; }

.page { padding: 22px 24px 40px; }

.page-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h2 { margin: 0; font-size: 19px; font-weight: 650; }
.page-head p { margin: 4px 0 0; color: #6b7280; font-size: 13px; }
.page-head .page-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.stat-card {
  background: #fff;
  border: 1px solid #eef1f7;
  border-radius: 14px;
  padding: 18px 20px;
  height: 100%;
  transition: box-shadow .2s, transform .2s;
}
.stat-card:hover { box-shadow: 0 10px 26px rgba(31, 45, 61, 0.07); transform: translateY(-1px); }
.stat-top { display: flex; align-items: center; justify-content: space-between; }
.stat-label { color: #6b7280; font-size: 13px; }
.stat-icon {
  width: 38px; height: 38px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.stat-value { font-size: 26px; font-weight: 680; margin-top: 10px; letter-spacing: -0.4px; font-variant-numeric: tabular-nums; }
.stat-foot { margin-top: 6px; color: #98a2b3; font-size: 12px; display: flex; align-items: center; gap: 6px; }

.soft-card {
  background: #fff; border: 1px solid #eef1f7; border-radius: 14px; padding: 18px 20px;
}
.soft-card + .soft-card { margin-top: 16px; }
.card-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 620; margin-bottom: 14px; }
.card-title .extra { margin-left: auto; font-weight: 400; font-size: 12px; color: #98a2b3; }

.hero {
  border-radius: 16px;
  padding: 22px 24px;
  color: #fff;
  background: radial-gradient(120% 160% at 0% 0%, #3b76ff 0%, #2f6bff 45%, #4a5bd6 100%);
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
}
.hero:after {
  content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px;
  border-radius: 50%; background: rgba(255, 255, 255, 0.12);
}
.hero h1 { margin: 0; font-size: 21px; font-weight: 680; }
.hero p { margin: 6px 0 0; opacity: .85; font-size: 13px; }
.hero-stats { display: flex; gap: 34px; margin-top: 18px; flex-wrap: wrap; }
.hero-stat .k { font-size: 12px; opacity: .8; }
.hero-stat .v { font-size: 22px; font-weight: 680; font-variant-numeric: tabular-nums; }

.auth-bg {
  min-height: 100vh;
  display: flex;
  background: linear-gradient(120deg, #f2f6ff 0%, #f7f9fd 42%, #eef3ff 100%);
}
.auth-left {
  flex: 1;
  padding: 64px 72px;
  display: flex; flex-direction: column; justify-content: center;
  background: radial-gradient(110% 120% at 10% 10%, #3b76ff 0%, #2f6bff 40%, #4a5bd6 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.auth-left:after {
  content: ""; position: absolute; left: -120px; bottom: -160px; width: 420px; height: 420px;
  border-radius: 50%; background: rgba(255, 255, 255, 0.10);
}
.auth-left h1 { font-size: 34px; line-height: 1.3; margin: 18px 0 14px; font-weight: 700; }
.auth-left p { opacity: .88; font-size: 14px; line-height: 1.8; max-width: 460px; }
.auth-points { margin-top: 30px; display: grid; gap: 14px; max-width: 460px; }
.auth-point { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; opacity: .95; }
.auth-right { width: 520px; display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card .ant-form-item { margin-bottom: 16px; }

.mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.muted { color: #98a2b3; }
.money-pos { color: #16a34a; }
.money-neg { color: #e5484d; }

.ant-table-tbody > tr > td { padding-top: 12px !important; padding-bottom: 12px !important; }
.ant-table-thead > tr > th { font-weight: 600 !important; font-size: 13px; }

.empty-hint { color: #98a2b3; text-align: center; padding: 26px 0; font-size: 13px; }

.legend-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #6b7280; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

.timeline-line { border-left: 2px dashed #e5eaf3; margin-left: 7px; padding-left: 18px; }

.kv { display: flex; gap: 12px; padding: 7px 0; font-size: 13.5px; }
.kv .k { color: #6b7280; width: 96px; flex: none; }
.kv .v { color: #1f2937; }

.report-card { border: 1px solid #eef1f7; border-radius: 12px; padding: 14px 16px; background: #fff; }
.report-card + .report-card { margin-top: 10px; }
.report-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.report-no { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: #98a2b3; }

@media (max-width: 1100px) {
  .auth-left { display: none; }
  .auth-right { width: 100%; }
}
/* code / json block used by audit & detail views */
.code-block {
  background: #0f172a0a;
  border: 1px solid #eef1f7;
  border-radius: 10px;
  padding: 10px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  line-height: 1.6;
  color: #334155;
  max-height: 260px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}

.approval-item { transition: box-shadow .2s ease; }
.approval-item:hover { box-shadow: 0 6px 18px rgba(15, 35, 95, .06); }

.hero { background: linear-gradient(120deg, #2f6bff 0%, #4f8bff 55%, #6aa8ff 100%); }

@media (max-width: 991.98px) {
  .app-sider { display: none; }
  .mobile-menu-btn { display: inline-flex; flex: none; margin-left: -6px; }
  .app-header { height: 58px; gap: 6px; padding: 0 10px; }
  .header-titles { flex: 1 1 auto; min-width: 0; }
  .header-title { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .header-sub { display: none; }
  .header-right { gap: 6px; flex: none; }
  .header-store-select { width: 118px; }
  .header-store-select .ant-select-selector { padding-inline: 8px !important; }
  .header-user-meta { display: none; }
  .page { padding: 12px 10px 28px; }
  .page-head .page-actions { margin-left: 0; width: 100%; }
  .stat-card { padding: 15px 16px; }
  .stat-value { font-size: 23px; }
  .soft-card { padding: 15px 14px; }
  .soft-card .ant-segmented { max-width: 100%; }
  .soft-card .ant-segmented-item-label { padding-inline: 7px; }
  .hero { padding: 18px; }
  .hero-stats { gap: 20px; }
  .ant-modal { max-width: calc(100vw - 24px); }
}
@media (max-width: 420px) {
  .app-header { gap: 4px; padding: 0 8px; }
  .header-store-select { width: 96px; }
  .header-title { max-width: 86px; }
}

/* ---------- 抢单大厅 ---------- */
.grab-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  border-radius: 18px;
  padding: 24px 28px;
  color: #fff;
  background: linear-gradient(118deg, #1e3a8a 0%, #2f6bff 52%, #7c9cff 100%);
  box-shadow: 0 16px 36px rgba(47, 107, 255, 0.22);
  position: relative;
  overflow: hidden;
}
.grab-hero:after {
  content: "";
  position: absolute;
  right: -70px;
  top: -110px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}
.grab-hero > div { position: relative; z-index: 1; }
.grab-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  font-size: 12px;
  letter-spacing: 0.3px;
}
.grab-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6ee7b7;
  box-shadow: 0 0 0 0 rgba(110, 231, 183, 0.7);
  animation: grabPulse 1.6s infinite;
}
@keyframes grabPulse {
  0% { box-shadow: 0 0 0 0 rgba(110, 231, 183, 0.65); }
  70% { box-shadow: 0 0 0 9px rgba(110, 231, 183, 0); }
  100% { box-shadow: 0 0 0 0 rgba(110, 231, 183, 0); }
}
.grab-hero h1 { margin: 14px 0 6px; font-size: 25px; font-weight: 720; letter-spacing: 0.2px; }
.grab-hero p { margin: 0; font-size: 13px; opacity: 0.86; max-width: 560px; line-height: 1.7; }
.grab-hero-side { display: flex; gap: 12px; flex: none; }
.grab-hero-side > div {
  min-width: 88px;
  padding: 10px 14px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
}
.grab-hero-side span { display: block; font-size: 11.5px; opacity: 0.82; }
.grab-hero-side b { display: block; font-size: 24px; font-weight: 720; margin-top: 3px; font-variant-numeric: tabular-nums; }

.grab-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  padding: 16px 18px;
  border: 1px solid #e8edf7;
  border-radius: 16px;
  background: #fff;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.grab-card:hover {
  transform: translateY(-2px);
  border-color: #c7d8ff;
  box-shadow: 0 12px 28px rgba(47, 107, 255, 0.1);
}
.grab-card-head { display: flex; align-items: center; gap: 12px; }
.grab-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  flex: none;
  box-shadow: 0 6px 14px rgba(31, 45, 61, 0.18);
}
.grab-title { font-size: 15px; font-weight: 650; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grab-amount { font-size: 20px; font-weight: 720; color: #ea580c; white-space: nowrap; margin-left: auto; font-variant-numeric: tabular-nums; }
.grab-meta { display: flex; align-items: center; gap: 8px; color: #6b7280; font-size: 12.5px; flex-wrap: wrap; }
.grab-dot-sep { width: 3px; height: 3px; border-radius: 50%; background: #cbd5e1; display: inline-block; }
.grab-note {
  background: #f8fafc;
  border: 1px dashed #e2e8f0;
  border-radius: 9px;
  padding: 8px 10px;
  font-size: 12.5px;
  color: #475569;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.grab-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed #eef1f7;
}
.grab-no { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; color: #98a2b3; }
.grab-tip { display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; color: #6b7280; line-height: 1.75; }
.grab-tip b { color: #1f2937; font-size: 13px; }
.grab-confirm-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 2px;
  border-bottom: 1px dashed #eef1f7;
  font-size: 13.5px;
}
.grab-confirm-line span { color: #6b7280; }
.grab-confirm-line b { color: #1f2937; text-align: right; }

@media (max-width: 768px) {
  .grab-hero { flex-direction: column; align-items: flex-start; padding: 20px; gap: 18px; }
  .grab-hero h1 { font-size: 21px; }
  .grab-hero-side { width: 100%; gap: 8px; }
  .grab-hero-side > div { flex: 1; min-width: 0; padding: 8px; }
  .grab-hero-side b { font-size: 20px; }
  .grab-amount { font-size: 17px; }
}
