:root {
  --orange: #f4511e;
  --ink: #1c1c1c;
  --muted: #5c5c5c;
  --line: #e6e6e6;
  --paper: #f7f7fa;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { height: 100%; }

body {
  margin: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: var(--paper);
  font: 18px/1.5 "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

a { color: inherit; }

.bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 8vw;
  background: var(--orange);
  color: #fff;
}

.mark {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.mark span { font-weight: 500; }

.by {
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

main { flex: 1; }

.top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 420px);
  gap: 28px;
  align-items: start;
  padding: 72px 8vw 8px;
}

.hero { padding: 0; max-width: none; }

.signin {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
}

.signin h2 { margin: 0 0 6px; }

#sign-in-lead { margin: 0 0 14px; color: var(--muted); font-size: 0.95rem; }

.signin label {
  display: block;
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--muted);
}

.signin input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  color: var(--ink);
}

.signin button,
.bar .by {
  font: inherit;
}

#email-submit,
#sign-out {
  margin-top: 16px;
  border: 0;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  padding: 10px 18px;
  font-weight: 650;
  cursor: pointer;
}

#email-submit:disabled { opacity: 0.55; cursor: default; }

#google-btn [role="button"] {
  width: auto !important;
  max-width: 100%;
  border: 1px solid #dadce0;
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
}

#google-btn [role="button"] > div:last-child {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
}

#google-btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

#google-btn #button-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.note { margin: 12px 0 0; color: var(--muted); font-size: 0.92rem; }

.status { margin: 0 0 8px; font-size: 0.92rem; }

#who { margin: 0; font-weight: 650; }

.eyebrow {
  margin: 0 0 12px;
  color: var(--orange);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.lead {
  margin: 20px 0 0;
  max-width: 38rem;
  color: var(--muted);
  font-size: 1.15rem;
}

.points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding: 28px 8vw 72px;
}

.points article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 22px 8px;
}

h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.points p { margin: 0 0 16px; color: var(--muted); }

.fleet { padding: 36px 8vw 72px; }

.customer {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 22px 8px;
}

.customer + .customer { margin-top: 18px; }

.customer-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px 24px;
}

.place { flex: 1 1 16rem; text-align: left; min-width: 12rem; }

.place .farm-label { white-space: nowrap; }

.place .name-line { justify-content: flex-start; }

.contact { text-align: right; margin-left: auto; max-width: 28rem; }

.contact .name-line { justify-content: flex-end; }

.contact .note { margin: 0 0 6px; }

.name-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
}

.name-line h2,
.name-line p { margin: 0; }

.farm-label { color: var(--muted); }

.pencil {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--orange);
  cursor: pointer;
  padding: 2px;
}

.pencil svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.name-line input {
  font: inherit;
  font-weight: 650;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 16rem;
  max-width: 100%;
}

.table-wrap { overflow-x: auto; margin: 14px -6px 16px; }

table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }

th, td { text-align: left; padding: 10px 12px; white-space: nowrap; }

th { color: var(--muted); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }

tbody tr { cursor: pointer; border-top: 1px solid var(--line); }

tbody tr:hover, tbody tr:focus { outline: 2px solid var(--orange); outline-offset: -2px; }

.band-green { background: #e5f6ea; }
.band-yellow { background: #fff4cc; }
.band-red { background: #fde8e4; }
.band-grey { background: #ececec; color: #5c5c5c; }

td.days { font-weight: 800; font-size: 1.15rem; font-variant-numeric: tabular-nums; }

td.order-none { color: #b42318; font-weight: 700; }

td.order-open { color: #1a75d1; font-weight: 700; }

td.order-confirmed { color: #137333; font-weight: 700; }

td.order-locked { color: var(--muted); font-weight: 700; }

td.seen-live { color: #137333; font-weight: 700; }

td.seen-stale { color: #b42318; font-weight: 700; }

.level { display: flex; align-items: center; gap: 8px; min-width: 240px; }

.level-end {
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.level-track.level-open { border-style: dashed; }

.level-track {
  position: relative;
  flex: 1;
  min-width: 150px;
  height: 36px;
  background: #fff;
  border: 1px solid #cfcfcf;
  border-radius: 999px;
  overflow: hidden;
}

.level-fill {
  display: block;
  height: 100%;
  width: 0;
  background: #ffd3c4;
}

.level-now {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
  pointer-events: none;
}

.flags { white-space: nowrap; }

.flag {
  display: inline-block;
  margin: 0 6px 0 0;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #d0d0d0;
  font-size: 0.78rem;
  font-weight: 650;
  white-space: nowrap;
}

td.level-cell { white-space: nowrap; }

.bin-page { padding: 48px 8vw 72px; }

.bin-page h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 8px; }

.bin-block { margin: 28px 0 8px; }

.bin-block h2 { font-size: 1.15rem; }

.bin-note { margin: 0 0 12px; color: var(--muted); font-size: 0.9rem; }

tr.day-delivery { background: #fff1ec; }

tr.day-delivery td:first-child { box-shadow: inset 3px 0 0 var(--orange); }

.bin-page td:last-child { white-space: normal; min-width: 9rem; }

.chart { width: 100%; height: auto; display: block; }

.chart-grid { stroke: #eee; }

.chart-axis { stroke: #c8c8c8; }

.chart-fit { fill: none; stroke: var(--orange); stroke-width: 2; }

.chart-dot { fill: var(--ink); }

.chart-dot-delivery { fill: var(--orange); }

.chart-cap { fill: none; stroke: #8a8a8a; stroke-dasharray: 5 4; }

.chart text { font-size: 12px; fill: var(--muted); }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
}

.stat .k {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stat .v { margin: 2px 0 0; font-size: 1.15rem; font-weight: 800; overflow-wrap: anywhere; }

.stat .d { margin: 2px 0 0; color: var(--muted); font-size: 0.85rem; }

.stat.acc-excellent .v, .stat.acc-good .v { color: #137333; }

.stat.acc-uneven .v { color: #b42318; }

.stat.acc-locked .v { color: var(--muted); }

footer {
  padding: 18px 8vw 28px;
  color: var(--muted);
  font-size: 0.9rem;
}

footer p { margin: 0; }

@media (max-width: 860px) {
  .top { grid-template-columns: 1fr; padding-top: 40px; }
  .points { grid-template-columns: 1fr; }
}

.level-fill.p0 { width: 0%; }
.level-fill.p1 { width: 1%; }
.level-fill.p2 { width: 2%; }
.level-fill.p3 { width: 3%; }
.level-fill.p4 { width: 4%; }
.level-fill.p5 { width: 5%; }
.level-fill.p6 { width: 6%; }
.level-fill.p7 { width: 7%; }
.level-fill.p8 { width: 8%; }
.level-fill.p9 { width: 9%; }
.level-fill.p10 { width: 10%; }
.level-fill.p11 { width: 11%; }
.level-fill.p12 { width: 12%; }
.level-fill.p13 { width: 13%; }
.level-fill.p14 { width: 14%; }
.level-fill.p15 { width: 15%; }
.level-fill.p16 { width: 16%; }
.level-fill.p17 { width: 17%; }
.level-fill.p18 { width: 18%; }
.level-fill.p19 { width: 19%; }
.level-fill.p20 { width: 20%; }
.level-fill.p21 { width: 21%; }
.level-fill.p22 { width: 22%; }
.level-fill.p23 { width: 23%; }
.level-fill.p24 { width: 24%; }
.level-fill.p25 { width: 25%; }
.level-fill.p26 { width: 26%; }
.level-fill.p27 { width: 27%; }
.level-fill.p28 { width: 28%; }
.level-fill.p29 { width: 29%; }
.level-fill.p30 { width: 30%; }
.level-fill.p31 { width: 31%; }
.level-fill.p32 { width: 32%; }
.level-fill.p33 { width: 33%; }
.level-fill.p34 { width: 34%; }
.level-fill.p35 { width: 35%; }
.level-fill.p36 { width: 36%; }
.level-fill.p37 { width: 37%; }
.level-fill.p38 { width: 38%; }
.level-fill.p39 { width: 39%; }
.level-fill.p40 { width: 40%; }
.level-fill.p41 { width: 41%; }
.level-fill.p42 { width: 42%; }
.level-fill.p43 { width: 43%; }
.level-fill.p44 { width: 44%; }
.level-fill.p45 { width: 45%; }
.level-fill.p46 { width: 46%; }
.level-fill.p47 { width: 47%; }
.level-fill.p48 { width: 48%; }
.level-fill.p49 { width: 49%; }
.level-fill.p50 { width: 50%; }
.level-fill.p51 { width: 51%; }
.level-fill.p52 { width: 52%; }
.level-fill.p53 { width: 53%; }
.level-fill.p54 { width: 54%; }
.level-fill.p55 { width: 55%; }
.level-fill.p56 { width: 56%; }
.level-fill.p57 { width: 57%; }
.level-fill.p58 { width: 58%; }
.level-fill.p59 { width: 59%; }
.level-fill.p60 { width: 60%; }
.level-fill.p61 { width: 61%; }
.level-fill.p62 { width: 62%; }
.level-fill.p63 { width: 63%; }
.level-fill.p64 { width: 64%; }
.level-fill.p65 { width: 65%; }
.level-fill.p66 { width: 66%; }
.level-fill.p67 { width: 67%; }
.level-fill.p68 { width: 68%; }
.level-fill.p69 { width: 69%; }
.level-fill.p70 { width: 70%; }
.level-fill.p71 { width: 71%; }
.level-fill.p72 { width: 72%; }
.level-fill.p73 { width: 73%; }
.level-fill.p74 { width: 74%; }
.level-fill.p75 { width: 75%; }
.level-fill.p76 { width: 76%; }
.level-fill.p77 { width: 77%; }
.level-fill.p78 { width: 78%; }
.level-fill.p79 { width: 79%; }
.level-fill.p80 { width: 80%; }
.level-fill.p81 { width: 81%; }
.level-fill.p82 { width: 82%; }
.level-fill.p83 { width: 83%; }
.level-fill.p84 { width: 84%; }
.level-fill.p85 { width: 85%; }
.level-fill.p86 { width: 86%; }
.level-fill.p87 { width: 87%; }
.level-fill.p88 { width: 88%; }
.level-fill.p89 { width: 89%; }
.level-fill.p90 { width: 90%; }
.level-fill.p91 { width: 91%; }
.level-fill.p92 { width: 92%; }
.level-fill.p93 { width: 93%; }
.level-fill.p94 { width: 94%; }
.level-fill.p95 { width: 95%; }
.level-fill.p96 { width: 96%; }
.level-fill.p97 { width: 97%; }
.level-fill.p98 { width: 98%; }
.level-fill.p99 { width: 99%; }
.level-fill.p100 { width: 100%; }
