:root {
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #1d2939;
  --muted: #667085;
  --primary: #2563eb;
  --success: #16a34a;
  --border: #d0d5dd;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
}
.container { width: min(1120px, calc(100% - 24px)); margin: 0 auto; }
.topbar { background: #111827; color: #fff; padding: 12px 0; }
.nav-shell { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { color: #fff; text-decoration: none; font-weight: 700; }
.nav-links { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.nav-links a, .link-button { color: #fff; text-decoration: none; background: none; border: 0; cursor: pointer; font: inherit; }
.page-shell { padding: 20px 0 40px; }
.hero-card, .panel, .auth-card, .driver-filter-card, .table-card { background: var(--card); border-radius: 20px; padding: 20px; box-shadow: 0 10px 30px rgba(16,24,40,.08); }
.hero-card { padding: 32px 24px; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; color: var(--primary); font-size: .8rem; font-weight: 700; }
.hero-copy { color: var(--muted); max-width: 620px; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 16px; border-radius: 12px; border: 0; text-decoration: none; cursor: pointer; font-weight: 700; }
.btn-block { width: 100%; }
.btn-primary { background: var(--primary); color: white; }
.btn-success { background: var(--success); color: white; }
.btn-secondary { background: #e5e7eb; color: #111827; }
.input, select.input { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: white; }
.stack-form { display: grid; gap: 12px; }
.auth-card, .narrow-panel { max-width: 520px; margin: 0 auto; }
.page-header, .section-title-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.order-grid { display: grid; gap: 16px; }
.line-items { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.line-items li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; background: #f8fafc; border-radius: 12px; }
.driver-shell { display: grid; gap: 16px; }
.driver-header { display: flex; justify-content: space-between; align-items: center; }
.driver-filter-card { display: grid; gap: 12px; position: sticky; top: 12px; z-index: 5; }
.driver-map { min-height: 120px; background: linear-gradient(135deg, #dbeafe, #eff6ff); border-radius: 20px; padding: 16px; }
.map-fallback ul { padding-left: 18px; margin-bottom: 0; }
.stop-list { display: grid; gap: 12px; }
.stop-card { background: var(--card); border-radius: 20px; padding: 16px; box-shadow: 0 10px 30px rgba(16,24,40,.08); }
.delivered-card { opacity: .92; }
.stop-topline { display: flex; gap: 14px; align-items: start; }
.stop-order { min-width: 40px; min-height: 40px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; background: #dbeafe; color: var(--primary); font-weight: 700; }
.stop-order.done { background: #dcfce7; color: var(--success); }
.stop-meta { display: grid; grid-template-columns: 1fr; gap: 10px; color: var(--muted); }
.compact-items { margin-top: 12px; }
.mobile-button-stack { display: grid; gap: 10px; margin-top: 14px; }
.button-row { display: flex; gap: 12px; flex-wrap: wrap; }
.checkbox-row { display: flex; align-items: center; gap: 8px; }
.text-danger { color: #b42318; }
small { color: var(--muted); }

@media (min-width: 768px) {
  .driver-shell { grid-template-columns: 360px 1fr; align-items: start; }
  .driver-header, .driver-map, .stop-list.delivered-list { grid-column: 1 / -1; }
  .stop-meta { grid-template-columns: repeat(3, 1fr); }
  .order-grid { grid-template-columns: repeat(2, 1fr); }
}
