:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172033;
  background: #f4f7fc;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; }
.topbar { height: 72px; padding: 0 max(24px, calc((100% - 1120px) / 2)); display: flex; align-items: center; justify-content: space-between; background: #fff; border-bottom: 1px solid #e5eaf2; }
.brand { color: #1d376b; font-size: 24px; font-weight: 850; letter-spacing: -1.2px; text-decoration: none; }
.brand span { color: #155eef; }
.store-link { color: #38537f; font-size: 14px; font-weight: 650; text-decoration: none; }
.portal { width: min(100% - 32px, 1000px); margin: 40px auto 72px; }
.login-card, .panel { padding: 26px; border: 1px solid #e4e9f2; border-radius: 16px; background: #fff; box-shadow: 0 8px 26px #18325b0a; }
.login-card { max-width: 440px; margin: 10vh auto; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(26px, 5vw, 36px); letter-spacing: -1px; }
h2 { margin-bottom: 8px; font-size: 20px; letter-spacing: -.3px; }
h3 { margin: 0; font-size: 16px; }
.eyebrow { margin-bottom: 8px; color: #155eef; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.muted { color: #6b7890; font-size: 14px; line-height: 1.5; }
.stack, .user-form, .assign-form { display: grid; gap: 14px; }
label { display: grid; gap: 7px; color: #3e4b63; font-size: 13px; font-weight: 700; }
input, select { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #d5deeb; border-radius: 9px; color: #172033; background: #fff; font: inherit; }
input:focus, select:focus { outline: 3px solid #155eef2b; border-color: #155eef; }
button { min-height: 42px; padding: 0 16px; border: 0; border-radius: 9px; font: inherit; font-size: 13px; font-weight: 750; cursor: pointer; }
.primary { color: #fff; background: #155eef; }
.primary:hover { background: #0c4bd1; }
.secondary { color: #24416f; background: #edf3ff; }
.notice { min-height: 20px; margin: 12px 0 0; color: #24744d; font-size: 13px; }
.notice.error { color: #bd3434; }
.welcome { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.welcome h1 { margin: 0; }
.welcome-actions { display: flex; align-items: center; gap: 14px; color: #55647b; font-size: 13px; }
.panel { margin-bottom: 20px; }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 12px; }
.panel-heading .muted, .panel > .muted { margin-bottom: 12px; }
.user-form { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; }
.assign-form { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; }
.orders { display: grid; gap: 12px; }
.order-card { padding: 17px; border: 1px solid #e6ebf3; border-radius: 12px; background: #fcfdff; }
.order-card > p { margin: 10px 0 0; line-height: 1.45; overflow-wrap: anywhere; }
.order-heading, .location-row, .tracking-controls { display: flex; align-items: center; gap: 10px; }
.order-heading { justify-content: space-between; }
.badge { padding: 5px 9px; border-radius: 20px; color: #38537f; background: #edf3ff; font-size: 11px; font-weight: 800; text-transform: capitalize; }
.status-in_transit { color: #8c4e00; background: #fff2d6; }
.status-delivered { color: #24744d; background: #e4f7ec; }
.order-total { color: #1d376b; font-size: 16px; font-weight: 800; }
.location-row { margin-top: 12px; }
.live-dot { color: #22734b; font-size: 11px; font-weight: 850; }
.live-dot::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; background: #2eae70; }
.map-link { margin-left: auto; color: #155eef; font-size: 13px; font-weight: 750; }
.tracking-controls { flex-wrap: wrap; margin-top: 14px; }
.privacy-note { color: #697890; font-size: 12px; line-height: 1.6; }

@media (max-width: 760px) {
  .portal { margin-top: 24px; }
  .user-form, .assign-form { grid-template-columns: 1fr 1fr; }
  .welcome { align-items: flex-start; flex-direction: column; }
  .welcome-actions { width: 100%; justify-content: space-between; }
}
@media (max-width: 480px) {
  .topbar { height: 62px; padding: 0 16px; }
  .login-card, .panel { padding: 19px; }
  .user-form, .assign-form { grid-template-columns: 1fr; }
  .panel-heading { align-items: center; }
}
