:root {
  --bg: #f4f6f9;
  --card: #ffffff;
  --line: #e8ecf1;
  --text: #18212f;
  --muted: #7e8999;
  --primary: #1f6feb;
  --primary-soft: #eaf2ff;
  --green: #16865b;
  --green-soft: #e9f8f1;
  --orange: #b86a12;
  --orange-soft: #fff4e2;
  --red: #c33d3d;
  --red-soft: #fff0f0;
  --purple: #6651bd;
  --purple-soft: #efecff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

button,
input { font: inherit; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 248px;
  padding: 28px 20px;
  background: #18212f;
  color: #fff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 8px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(135deg, #4b8df8, #1f6feb);
  font-weight: 800;
}

.brand-name { font-size: 17px; font-weight: 800; }
.brand-sub { margin-top: 3px; color: rgba(255, 255, 255, 0.55); font-size: 12px; }

nav { display: grid; gap: 8px; margin-top: 28px; }

.nav-item {
  padding: 13px 16px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.62);
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
}

.nav-item.active,
.nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.sidebar-note {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 12px;
  line-height: 1.7;
}

.main {
  min-height: 100vh;
  margin-left: 248px;
  padding: 34px 36px 70px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
}

h1 { margin: 0; font-size: 28px; }
.topbar p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.auto-refresh { color: #5e6b7e; font-size: 13px; }

.button {
  border: none;
  border-radius: 10px;
  padding: 11px 18px;
  cursor: pointer;
  font-weight: 700;
  transition: 0.16s ease;
}

.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--primary); color: #fff; }
.button.secondary { background: #fff; color: #344054; border: 1px solid var(--line); }
.button.danger { background: var(--red-soft); color: var(--red); }
.button.small { padding: 8px 13px; font-size: 12px; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 10px 28px rgba(24, 33, 47, 0.04);
}

.stat-label { color: var(--muted); font-size: 13px; }
.stat-value { margin-top: 10px; font-size: 31px; font-weight: 850; }

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.filters { display: flex; flex-wrap: wrap; gap: 9px; }

.filter {
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #6b7687;
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
}

.filter.active { border-color: var(--primary); background: var(--primary); color: #fff; }
.last-updated { color: var(--muted); font-size: 12px; }

.orders {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.order-card {
  border: 1px solid var(--line);
  border-radius: 4px;
  border-radius: 17px;
  background: var(--card);
  box-shadow: 0 10px 28px rgba(24, 33, 47, 0.04);
  overflow: hidden;
}

.order-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line);
}

.order-type { font-size: 17px; font-weight: 800; }
.order-no { margin-top: 5px; color: var(--muted); font-size: 11px; }

.status {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef1f5;
  color: #5d6879;
  font-size: 12px;
  font-weight: 750;
}

.status-PENDING { background: var(--orange-soft); color: var(--orange); }
.status-ACCEPTED { background: var(--primary-soft); color: var(--primary); }
.status-PICKED_UP { background: var(--purple-soft); color: var(--purple); }
.status-DELIVERED { background: var(--green-soft); color: var(--green); }
.status-COMPLETED { background: #e8f7ed; color: #167c3b; }
.status-CANCELLED { background: #f1f2f4; color: #7c8799; }

.order-body { padding: 19px 22px; }

.route { display: grid; gap: 13px; }
.route-item { display: flex; gap: 10px; }
.route-dot { width: 9px; height: 9px; margin-top: 5px; border-radius: 50%; flex: none; }
.route-dot.pickup { background: var(--primary); }
.route-dot.delivery { background: #20a464; }
.route-label { color: var(--muted); font-size: 11px; }
.route-place { margin-top: 2px; font-size: 13px; font-weight: 700; }

.description {
  margin-top: 17px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f8f9fb;
  color: #5e6b7e;
  font-size: 12px;
  line-height: 1.55;
}

.meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 12px;
}

.meta strong { display: block; margin-top: 3px; color: #344054; font-size: 13px; }

.order-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 22px;
  border-top: 1px solid var(--line);
  background: #fbfcfd;
}

.amount { color: #e66029; font-size: 22px; font-weight: 850; }
.actions { display: flex; gap: 8px; }

.empty {
  grid-column: 1 / -1;
  padding: 80px 20px;
  border: 1px dashed #cfd6df;
  border-radius: 16px;
  background: #fff;
  text-align: center;
  color: var(--muted);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  z-index: 20;
  transform: translate(-50%, 20px);
  opacity: 0;
  padding: 11px 18px;
  border-radius: 10px;
  background: #18212f;
  color: #fff;
  font-size: 13px;
  pointer-events: none;
  transition: 0.2s ease;
}

.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 1000px) {
  .sidebar { width: 190px; }
  .main { margin-left: 190px; padding: 28px 24px 60px; }
  .orders { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .sidebar { position: static; width: 100%; padding: 18px; }
  nav, .sidebar-note { display: none; }
  .brand { padding-bottom: 0; border: none; }
  .main { margin-left: 0; padding: 22px 16px 50px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .topbar, .toolbar { align-items: flex-start; flex-direction: column; gap: 14px; }
}


.section-block {
  margin-top: 38px;
  scroll-margin-top: 30px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 17px;
}

.section-heading h2 {
  margin: 0;
  font-size: 22px;
}

.section-heading p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.review-count {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--orange-soft);
  color: var(--orange);
  font-size: 12px;
  font-weight: 750;
}

.runner-applications {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.runner-card {
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--card);
  box-shadow: 0 10px 28px rgba(24, 33, 47, 0.04);
}

.runner-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}

.runner-name {
  font-size: 17px;
  font-weight: 800;
}

.runner-id {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.runner-status {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
}

.runner-status-PENDING { background: var(--orange-soft); color: var(--orange); }
.runner-status-APPROVED { background: var(--green-soft); color: var(--green); }
.runner-status-REJECTED { background: var(--red-soft); color: var(--red); }

.runner-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
  margin-top: 17px;
  color: var(--muted);
  font-size: 11px;
}

.runner-grid strong {
  display: block;
  margin-top: 4px;
  color: #344054;
  font-size: 13px;
}

.runner-reason {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f8f9fb;
  color: #5e6b7e;
  font-size: 12px;
  line-height: 1.55;
}

.runner-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 17px;
}

.settings-placeholder {
  padding-bottom: 50px;
}

@media (max-width: 1000px) {
  .runner-applications { grid-template-columns: 1fr; }
}


.proof-images {
  margin-top: 16px;
}

.proof-title {
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.proof-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.proof-list a {
  display: block;
  width: 96px;
  height: 96px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f5f7fa;
}

.proof-list img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


.dispatch-area {
  display: flex;
  align-items: center;
  gap: 8px;
}

.runner-select {
  max-width: 170px;
  height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #344054;
  font-size: 12px;
}

.no-runner {
  color: var(--muted);
  font-size: 12px;
}


.runner-status-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
}

.runner-online {
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
}

.runner-online.online {
  background: var(--green-soft);
  color: var(--green);
}

.runner-online.offline {
  background: #f1f2f4;
  color: #7c8799;
}
