/* Bin Clean palette (brand kit, Sep 2026): dark text on yellow/green; black only for type. */
:root {
  --yellow: #f5f220;
  --lime: #d5ec2f;
  --green: #81da55;
  --bin-green: #7cbb2e;
  --blue: #0aa8e0;
  --grey: #9aa0a8;
  --ink: #111;
  --paper: #fff;
  --error: #b00020;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font:
    16px/1.5 system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    sans-serif;
  color: var(--ink);
  background: #fafaf5;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(180deg, #f5f220 0%, #f5f220 30%, #a9e243 80%, #81da55 100%);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  font-size: 1.2rem;
}
.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}
/* Task 52 (scoping 13 Nov): on a phone the shared top menu wraps onto several lines instead of making every page scroll
   sideways. CSS only; computers unchanged. */
@media (max-width: 700px) {
  .topbar {
    flex-wrap: wrap;
  }
  .nav {
    flex-wrap: wrap;
    gap: 0.25rem 0.75rem;
  }
}
.page {
  max-width: 46rem;
  margin: 0 auto;
  padding: 1rem;
}
.card {
  background: var(--paper);
  border: 1px solid #ddd;
  border-radius: 0.5rem;
  padding: 1rem;
}
.field {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.field input {
  font-size: 1rem;
  padding: 0.7rem;
  border: 1px solid var(--grey);
  border-radius: 0.4rem;
}
.field.has-error input {
  border-color: var(--error);
}
.error {
  color: var(--error);
}
.notice {
  background: #eef9e6;
  border-left: 4px solid var(--bin-green);
  padding: 0.5rem 0.75rem;
}
.muted {
  color: #555;
  font-size: 0.9rem;
}
.button {
  background: var(--bin-green);
  color: var(--ink);
  font-weight: 700;
  border: 0;
  border-radius: 0.4rem;
  padding: 0.8rem 1.4rem;
  font-size: 1rem;
  width: 100%;
}
.link {
  background: none;
  border: 0;
  color: var(--ink);
  text-decoration: underline;
  cursor: pointer;
  font-size: 1rem;
}
.inline {
  display: inline;
}
@media (min-width: 40rem) {
  .button {
    width: auto;
  }
}
.attributions {
  max-width: 46rem;
  margin: 2rem auto 1rem;
  padding: 0 1rem;
  color: #555;
  font-size: 0.8rem;
}
.attributions ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.secret {
  white-space: pre-wrap;
  word-break: break-all;
  background: #fff;
  border: 2px solid var(--bin-green);
  padding: 1rem;
  font-size: 1rem;
}

/* Office forms and customer pages (DATA, Task 6): selects and text areas like inputs (16px: no zoom on focus), cards. */
.page select,
.page textarea,
.page input[type='search'] {
  font-size: 1rem;
  padding: 0.7rem;
  border: 1px solid var(--grey);
  border-radius: 0.4rem;
  width: 100%;
  box-sizing: border-box;
  margin: 0.25rem 0 1rem;
}
.page fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 1rem;
}
.page legend {
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.results {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.history {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.history td,
.history th {
  text-align: left;
  padding: 0.35rem 0.25rem;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}

/* --- public sign-up (MONEY T17; design/signup.html): phone-first, 52 px targets, black text on brand colours --- */
.signup {
  max-width: 36rem;
  margin: 0 auto;
}
.signup-head h1 {
  margin-bottom: 0.25rem;
}
.signup .steps {
  font-weight: 600;
}
.signup section {
  display: grid;
  gap: 0.6rem;
}
.signup input,
.signup select,
.signup textarea {
  min-height: 52px;
  font-size: 1rem;
}
.signup button:not(.link):not(.step-btn) {
  min-height: 52px;
}
.signup .choices {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.25rem;
}
.signup .choice {
  width: 100%;
  text-align: left;
  min-height: 48px;
}
.signup .pkg {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.25rem 0.5rem;
  align-items: center;
  padding: 0.6rem 0;
}
.signup .pkg .muted {
  grid-column: 2 / span 2;
}
.signup .stepper {
  display: grid;
  grid-template-columns: 1fr 48px 2.5rem 48px;
  align-items: center;
  gap: 0.5rem;
}
.signup .step-btn {
  min-width: 48px;
  min-height: 48px;
  font-size: 1.25rem;
}
.signup output {
  text-align: center;
  font-weight: 700;
}
.signup table.money {
  width: 100%;
  border-collapse: collapse;
}
.signup table.money td:last-child {
  text-align: right;
}
.signup table.money tr.total td {
  font-weight: 700;
  border-top: 2px solid #000;
}
.signup .banner {
  background: #fff3c4;
  color: #8a6100;
  padding: 0.75rem;
  border-radius: 0.5rem;
}
.signup .privacy-short {
  margin-top: 2rem;
  font-size: 0.9rem;
}
.privacy {
  max-width: 42rem;
  margin: 0 auto;
}

/* the "Start again" link must render as a full-width button (review FINAL 5 LOW) */
.signup a.button {
  display: block;
  text-align: center;
  min-height: 52px;
  line-height: 52px;
}
/* the steps use display:grid, which would override the hidden attribute: hidden always wins (found in the smoke test) */
.signup [hidden] {
  display: none !important;
}
/* forms nested inside a step stack like the steps themselves; without this their labels and boxes ran inline
   ("I can't find my address" form, "We don't clean bins there yet" form; found in the T17 test-copy screens 26 Oct) */
.signup #addr-manual,
.signup #day-away {
  display: grid;
  gap: 0.6rem;
}
/* action buttons as in the approved design (design/assets/sketch.css .btn.primary / .secondary / disabled): they were
   browser-default grey (requirements owner, T17 acceptance 26 Oct). Links, +/- steppers and address suggestions keep theirs. */
.signup button:not(.link):not(.step-btn):not(.choice) {
  width: 100%;
  padding: 10px 16px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: linear-gradient(180deg, #f5f220 0%, #f5f220 30%, #a9e243 80%, #81da55 100%);
  color: var(--ink);
  font: inherit;
  font-size: 1.08rem;
  font-weight: 800;
  cursor: pointer;
}
/* Task 49: the one-time choice cards (design/assets/sketch.css label.choice) */
.signup #onetime-options {
  display: grid;
  gap: 10px;
}
.signup #onetime-options label {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 2px solid #7a8087;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
}
.signup #onetime-options input {
  width: 24px;
  height: 24px;
  min-height: 0;
  margin: 2px 0 0;
  flex: 0 0 24px;
}
.signup button#code-apply {
  background: #fff;
}
.signup button:not(.link):not(.step-btn):not(.choice):disabled {
  background: #e3e5e1;
  border-color: #8b9096;
  color: #4a4f55;
  cursor: default;
}

/* T18 agent booking: placement panel */
.placement-panel {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border: 1px solid #d0d7de;
  border-radius: 6px;
}
.placement-option {
  display: block;
  margin: 0.5rem 0;
}
.placement-option small {
  display: block;
  color: #555;
}
.badge.warn {
  background: #fff3cd;
  color: #7a4d00;
  padding: 0 0.4rem;
  border-radius: 4px;
  font-weight: 600;
}
table.compact td,
table.compact th {
  padding: 0.2rem 0.6rem;
  text-align: left;
}
.button.secondary {
  background: #fff;
  color: inherit;
  border: 1px solid currentColor;
}

/* Task 40: the driver's Clock in / Clock out button (big, phone thumb) and a flagged open shift on the timesheet */
.clock .button.big {
  display: block;
  width: 100%;
  max-width: 24rem;
  padding: 1.1rem 1.5rem;
  font-size: 1.4rem;
}
tr.flagged td {
  background: #fff4e5;
}

/* Task 45 (FR-31, D36): commercial visits in the office colour (from /calendar/colours.css), green once paid. The words
   "Commercial" / "Paid" always go with the colour (never colour alone). Task 52: the border is on .stop-box (see below). */
.cal-commercial .kind-label {
  font-weight: 600;
  color: #1a1a1a;
  border-bottom: 3px solid var(--commercial-colour, #f28c28);
}
.cal-paid .kind-label {
  border-bottom-color: #2e7d32;
}
.badge {
  display: inline-block;
  padding: 0 0.4em;
  border-radius: 0.6em;
  font-size: 0.85em;
}
.badge-commercial {
  /* review L1: the office colour only as an outline, so any colour stays readable */
  background: #fff;
  color: #1a1a1a;
  border: 2px solid var(--commercial-colour, #f28c28);
}
.badge-paid {
  background: #2e7d32;
  color: #fff;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Task 48: address suggestions on the office address forms */
.address-suggest .suggestions {
  list-style: none;
  margin: 0.25rem 0;
  padding: 0;
  max-width: 40rem;
}
.address-suggest .suggestions .choice {
  display: block;
  width: 100%;
  text-align: left;
  margin: 0.15rem 0;
  padding: 0.5rem 0.75rem;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
}
.address-suggest .suggestions .choice:hover,
.address-suggest .suggestions .choice:focus {
  border-color: #333;
}

/* D49 / FR-42 (AC-93): a message that stops the sign-up is unmissable: boxed, bold, dark red on pale red (contrast > 7:1) */
.signup .stop {
  background: #fdecee;
  border: 2px solid var(--error);
  border-radius: 0.5rem;
  padding: 0.75rem;
  color: #7a0016;
  font-weight: 700;
}
.signup .stop:focus {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

/* Task 47 (D38): the note for the driver keeps its line breaks (a class, not an inline style: CSP style-src 'self') */
.driver-note {
  white-space: pre-line;
}

/* T47 follow-up: driver list layout. The note has its own full-width row under its stop, at every width (labelled by
   data-label, no inline styles: CSP style-src 'self'). */
table.driver-stops {
  width: 100%;
}
table.driver-stops tr.stop-note td {
  overflow-wrap: anywhere;
  padding-bottom: 0.75rem;
}
table.driver-stops td.driver-note::before {
  content: attr(data-label) ':';
  display: block;
  font-weight: 700;
}
/* On a phone every stop is a block: address, name, the three bin counts side by side, the kind, then the note. Nothing
   scrolls sideways and nothing is cut off. */
@media (max-width: 600px) {
  table.driver-stops,
  table.driver-stops tbody,
  table.driver-stops tr.stop-note,
  table.driver-stops tr.stop-note td {
    display: block;
  }
  table.driver-stops thead {
    display: none;
  }
  table.driver-stops tr.stop {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 2px solid #333;
    padding-top: 0.5rem;
  }
  table.driver-stops tr.stop td {
    display: block;
    padding: 0.15rem 0;
  }
  table.driver-stops tr.stop td.stop-wide {
    grid-column: 1 / -1;
  }
  table.driver-stops tr.stop td.stop-kind:empty {
    display: none;
  }
  table.driver-stops tr.stop td[data-label]::before {
    content: attr(data-label) ' ';
    font-weight: 700;
  }
  table.driver-stops tr.stop-note td {
    padding: 0.25rem 0 0.75rem;
  }
}

/* Task 52 (FR-37, D41c, AC-88): the calendar day shows one box per stop instead of a table; readable on a computer and a
   phone. The commercial colour and paid green (Tasks 45 / 60 / 63) carry over as the box's left border. */
.day-stops {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.stop-box {
  border: 1px solid #c8c8c8;
  border-left: 6px solid #c8c8c8;
  border-radius: 0.4rem;
  padding: 0.5rem 0.75rem;
  background: #fff;
  overflow-wrap: anywhere;
}
.stop-box.cal-commercial {
  border-left-color: var(--commercial-colour, #f28c28);
}
.stop-box.cal-paid {
  border-left-color: #2e7d32;
}
.stop-box p {
  margin: 0.2rem 0;
}
.stop-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: baseline;
  font-weight: 600;
}
.stop-bins .bin::before {
  content: '';
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  margin-right: 0.25em;
  border-radius: 0.15em;
  vertical-align: -0.05em;
}
.stop-bins .bin-garbage::before {
  background: #222;
}
.stop-bins .bin-green::before {
  background: #2e7d32;
}
.stop-bins .bin-recycling::before {
  background: #1565c0;
}
.stop-meta,
.stop-paid {
  font-size: 0.95em;
}
.stop-box .actions select,
.stop-box .actions input[type='date'] {
  width: auto;
}
.stop-box .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.4rem;
}
.paid-form select.paid-method {
  width: auto;
  max-width: 14rem;
}

/* Task 54 (D41e): the office receipt page. The email's receipt block carries inline styles for mail clients, which CSP
   drops here, so the same table is styled by class. Printing gives just the receipt (no top bar or links). */
.receipt-email table {
  border-collapse: collapse;
  width: 100%;
  max-width: 32rem;
}
.receipt-email td {
  padding: 0.3rem 0.4rem;
}
.receipt-email td[align='right'] {
  text-align: right;
}
.receipt-email tr:last-child td {
  font-weight: bold;
  border-top: 2px solid #111;
}
@media print {
  .topbar,
  .back-link {
    display: none;
  }
  .receipt-page,
  .card {
    border: 0;
    box-shadow: none;
  }
}
