:root {
  --green:#173c25;
  --green-light:#315f3b;
  --orange:#c85b00;
  --paper:#f4f6f2;
  --border:#d7ded8;
  --muted:#647064;
  --ink:#213429;
}
* {
  box-sizing:border-box;
}
body {
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:'Segoe UI',system-ui,sans-serif;
  font-size:15px;
  line-height:1.5;
}
a {
  color:inherit;
}
button,input,select {
  font:inherit;
}
button,a,input,summary,select {
  -webkit-tap-highlight-color:transparent;
}
button {
  cursor:pointer;
}
button:disabled {
  cursor:wait;
}
button:focus-visible,a:focus-visible,summary:focus-visible {
  outline:3px solid #ee9b49;
  outline-offset:4px;
}
.topbar {
  background:linear-gradient(110deg,var(--green),var(--green-light));
  color:white;
}
.topbar-inner {
  max-width:1160px;
  margin:auto;
  padding:12px 28px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
}
.brand {
  display:flex;
  align-items:center;
  gap:18px;
  text-decoration:none;
}
.brand picture {
  width:154px;
  height:52px;
  display:block;
  flex:0 0 auto;
  overflow:hidden;
  border-radius:9px;
  background:#fff;
}
.brand img {
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
}
.brand span {
  border-left:1px solid #ffffff50;
  padding-left:18px;
  font-size:14px;
}
nav {
  display:flex;
  align-items:center;
  gap:20px;
}
nav a {
  text-decoration:none;
  font-size:14px;
}
nav form {
  margin:0;
}
.nav-button {
  background:none;
  border:0;
  padding:6px 0;
  color:white;
}
main {
  max-width:1160px;
  margin:0 auto;
  padding:36px 28px 64px;
  min-height:calc(100vh - 150px);
}
footer {
  text-align:center;
  color:var(--muted);
  padding:20px;
  font-size:12px;
  border-top:1px solid var(--border);
}
h1 {
  font-size:34px;
  line-height:1.15;
  letter-spacing:-1px;
  margin:8px 0 14px;
}
h2 {
  font-size:19px;
  margin:0 0 12px;
}
p {
  margin:0 0 16px;
}
.eyebrow {
  font-size:11px;
  font-weight:750;
  letter-spacing:1.8px;
  color:var(--orange);
  margin:0;
}
.muted {
  color:var(--muted);
}
.small {
  font-size:12px;
}
.missing {
  font-size:12px;
  font-weight:400;
  color:var(--muted);
}
.page-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  margin-bottom:22px;
}
.page-heading p:last-child {
  margin-bottom:0;
}
.manual {
  font-size:12px;
  color:var(--muted);
  white-space:nowrap;
}
.manual:before {
  content:'↻';
  margin-right:6px;
}
.card {
  background:white;
  border:1px solid var(--border);
  border-radius:16px;
  box-shadow:0 3px 16px #173c2505;
}
.filters {
  display:flex;
  gap:16px;
  flex-wrap:wrap;
  align-items:end;
  padding:22px;
  margin-bottom:28px;
}
.filters>div {
  flex:1;
  min-width:140px;
}
.filters .client-filter {
  flex:2;
  min-width:200px;
}
.filters .filter-help {
  flex-basis:100%;
  font-size:12px;
  color:var(--muted);
  margin:0;
}
label {
  display:block;
  font-size:12px;
  font-weight:650;
  margin-bottom:6px;
}
input,select {
  display:block;
  width:100%;
  padding:11px 12px;
  border:1px solid #cbd4cc;
  border-radius:8px;
  background:#fff;
  min-height:44px;
  color:var(--ink);
}
input:focus,select:focus {
  outline:2px solid #b7cabb;
  border-color:var(--green);
}
input[readonly] {
  background:var(--paper);
}
.primary {
  background:var(--orange);
  color:#fff;
  border:1px solid var(--orange);
  border-radius:8px;
  padding:11px 20px;
  font-weight:650;
  white-space:nowrap;
  min-height:44px;
}
.primary:hover {
  background:#a74d00;
}
.secondary {
  background:#edf3ed;
  border:1px solid var(--border);
  border-radius:8px;
  padding:10px 18px;
}
.button {
  text-decoration:none;
  display:inline-block;
}
.full {
  width:100%;
  display:flex;
  justify-content:space-between;
}
.text-link,.text-button {
  color:var(--orange);
  text-decoration:none;
  font-weight:650;
  font-size:13px;
  white-space:nowrap;
}
.text-link:hover,.text-button:hover {
  text-decoration:underline;
}
.filters>.text-link {
  padding:12px 0;
}
.text-button {
  background:none;
  border:0;
  padding:6px 0;
}
.results-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin:26px 0 14px;
}
.results-heading h2,.results-heading p {
  margin:0;
}
.count {
  font-size:12px;
  border-radius:20px;
  background:#e5ece5;
  padding:3px 9px;
  margin-left:5px;
}
.truck {
  margin-bottom:16px;
  overflow:hidden;
}
summary {
  cursor:pointer;
  list-style:none;
}
summary::-webkit-details-marker {
  display:none;
}
.truck>summary {
  display:flex;
  align-items:center;
  gap:22px;
  padding:20px 24px;
}
.chevron {
  font-size:26px;
  line-height:1;
  color:#728573;
  transition:transform .12s;
}
.truck[open]>summary>.chevron,.load[open]>summary>.chevron,.variety[open]>summary>.chevron {
  transform:rotate(90deg);
}
.plate-group {
  min-width:140px;
  display:flex;
  flex-direction:column;
}
.date {
  font-size:11px;
  color:var(--muted);
}
.plate {
  font-size:20px;
  letter-spacing:1px;
}
.driver {
  display:flex;
  flex-direction:column;
  flex:1;
}
.driver strong {
  font-size:14px;
}
.truck-count {
  font-size:12px;
  color:var(--green-light);
  background:#eef3ed;
  border-radius:6px;
  padding:5px 10px;
}
.plate-actions {
  display:flex;
  align-items:center;
  gap:8px;
  margin-left:auto;
}
.pdf-link {
  display:inline-flex;
  width:34px;
  height:34px;
  align-items:center;
  justify-content:center;
  border:1px solid var(--border);
  border-radius:7px;
  color:var(--green);
  background:#fff;
  text-decoration:none;
}
.pdf-link:hover,.pdf-link:focus-visible {
  color:#fff;
  background:var(--green);
  border-color:var(--green);
}
.pdf-link svg {
  width:18px;
  height:18px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.truck-body {
  padding:0 24px 24px 58px;
}
.contact {
  display:flex;
  align-items:center;
  gap:16px;
  border-top:1px solid #e9ede7;
  padding:14px 0;
}
.whatsapp {
  font-size:13px;
  text-decoration:none;
  color:#285c38;
  font-weight:650;
  display:flex;
  gap:12px;
}
.whatsapp span {
  font-size:11px;
  font-weight:400;
}
.customer-group {
  margin-top:18px;
}
.customer-heading {
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:16px;
  padding:0 4px 8px;
  border-bottom:1px solid #e2e8e1;
}
.customer-heading>div {
  display:flex;
  flex-direction:column;
  min-width:0;
}
.customer-heading strong {
  font-size:14px;
  overflow-wrap:anywhere;
}
.property-name {
  display:inline-block;
  margin-left:8px;
  color:var(--muted);
  font-size:12px;
  font-weight:500;
}
.customer-count {
  flex:0 0 auto;
  color:var(--green-light);
  background:#eef3ed;
  border-radius:20px;
  padding:3px 9px;
  font-size:11px;
}
.customer-group .load-card {
  margin-top:8px;
}
.load-card {
  border:1px solid var(--border);
  border-radius:10px;
  margin-top:12px;
  overflow:hidden;
}
.load>summary {
  padding:16px;
  display:flex;
  gap:14px;
  align-items:center;
  background:#f7f9f5;
}
.load>summary>div {
  display:flex;
  flex-direction:column;
  flex:1;
}
.load>summary strong {
  font-size:14px;
}
.load-form {
  margin:0;
}
.load-actions {
  display:flex;
  align-items:center;
  gap:10px;
  flex:0 0 auto;
}
.load-actions .text-button {
  font-size:12px;
}
.status {
  font-size:11px;
  border-radius:20px;
  padding:5px 9px;
  background:#edf0ec;
  color:#5e6c5f;
  white-space:nowrap;
}
.status.delivered {
  background:#e5f1e5;
  color:#24502b;
}
.status.transit {
  background:#fff0d9;
  color:#855713;
}
.status.unavailable {
  background:#f5e7e3;
  color:#8b3e2e;
}
.variety {
  border:1px solid var(--border);
  border-radius:8px;
  margin-top:8px;
  overflow:hidden;
}
.variety>summary {
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 14px;
  background:#f8faf7;
}
.variety>summary>div {
  display:flex;
  flex:1;
  flex-direction:column;
  min-width:0;
}
.variety>summary strong {
  font-size:13px;
  overflow-wrap:anywhere;
}
.variety-total {
  flex:0 0 auto;
  color:var(--green);
  font-size:12px;
  font-weight:700;
  white-space:nowrap;
}
.variety-loads {
  padding:0 10px 10px 38px;
}
.items-wrap {
  padding:16px;
  overflow-x:auto;
}
.items-wrap p {
  margin:0 0 12px;
}
table {
  width:100%;
  border-collapse:collapse;
  font-size:13px;
}
th {
  text-align:left;
  font-size:11px;
  color:var(--muted);
  font-weight:600;
  background:#fafbf9;
}
td,th {
  padding:12px 10px;
  border-bottom:1px solid #edf0e9;
}
tbody tr:last-child td {
  border:0;
}
.number {
  text-align:right;
  font-variant-numeric:tabular-nums;
}
.notice {
  padding:14px 18px;
  border-radius:10px;
  background:#edf3ed;
  border:1px solid var(--border);
  margin-bottom:20px;
  font-size:14px;
}
.notice.error {
  background:#fff0e9;
  border-color:#ebc6b2;
  color:#923816;
}
.notice.success {
  background:#eaf3e8;
  color:#26552b;
}
.empty {
  text-align:center;
  padding:55px 24px;
}
.empty h1 {
  font-size:26px;
}
.empty p {
  color:var(--muted);
}
.empty-icon {
  font-size:32px;
  display:block;
  color:#819681;
  margin-bottom:16px;
}
.login-layout {
  display:grid;
  grid-template-columns:1.2fr 1fr;
  align-items:center;
  gap:90px;
  max-width:980px;
  margin:8vh auto;
}
.login-intro h1 {
  font-size:45px;
  line-height:1.2;
  margin:20px 0;
}
.login-intro>p:not(.eyebrow) {
  max-width:370px;
  color:var(--muted);
  font-size:17px;
}
.login-card {
  padding:32px;
}
.login-card h2 {
  font-size:23px;
}
.admin-login {
  margin:20px 0;
}
.admin-login summary {
  font-size:13px;
  color:var(--green-light);
  padding:8px 0;
}
.admin-login label {
  margin-top:12px;
}
.login-card .small {
  margin:22px 0 0;
}
.admin-card {
  padding:22px;
  margin-bottom:16px;
}
.admin-card>summary {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}
.admin-card>summary h2 {
  display:flex;
  justify-content:space-between;
  width:100%;
  margin:0;
}
.admin-card>summary>div {
  display:flex;
  flex-direction:column;
}
.admin-card>form {
  margin-top:24px;
}
.form-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
  margin-bottom:20px;
}
.reset {
  border-top:1px solid var(--border);
  margin-top:24px;
  padding-top:16px;
}
.reset summary {
  color:var(--orange);
  font-size:13px;
}
.reset form {
  margin-top:16px;
  max-width:400px;
}
.reset button {
  margin-top:12px;
}
.sr-only {
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
}
@media(max-width:760px) {
  .topbar-inner {
    padding:9px 16px;
  }
  .brand {
    gap:10px;
  }
  .brand picture {
    width:48px;
    height:48px;
    border-radius:50%;
  }
  .brand img {
    object-fit:contain;
  }
  .brand span {
    font-size:11px;
    padding-left:10px;
    max-width:90px;
    line-height:1.3;
  }
  nav {
    gap:12px;
  }
  nav a,.nav-button {
    font-size:12px;
  }
  main {
    padding:24px 14px 40px;
  }
  h1 {
    font-size:29px;
  }
  .manual {
    display:none;
  }
  .page-heading {
    margin-bottom:20px;
  }
  .page-heading p.muted {
    font-size:13px;
  }
  .filters {
    padding:16px;
    gap:12px;
  }
  .filters>div {
    min-width:0;
    flex-basis:40%;
  }
  .filters .client-filter {
    flex-basis:100%;
  }
  .filters>.primary {
    flex:1;
  }
  .filters>.text-link {
    padding:12px;
  }
  .results-heading {
    align-items:start;
  }
  .results-heading p {
    display:none;
  }
  .truck>summary {
    padding:16px;
    gap:12px;
    flex-wrap:wrap;
  }
  .plate-group {
    min-width:100px;
  }
  .driver {
    min-width:110px;
  }
  .driver strong {
    font-size:12px;
  }
  .plate-actions {
    margin-left:auto;
  }
  .truck-count {
    margin-left:0;
    font-size:11px;
    padding:3px 8px;
  }
  .truck-body {
    padding:0 12px 14px;
  }
  .contact {
    padding:12px 4px;
    gap:8px;
    flex-wrap:wrap;
  }
  .contact>.small {
    flex-basis:100%;
  }
  .load>summary {
    padding:12px;
    gap:10px;
    flex-wrap:wrap;
  }
  .load>summary>div {
    min-width:160px;
  }
  .status {
    margin-left:20px;
    font-size:10px;
  }
  .load-actions {
    margin-left:20px;
    gap:8px;
  }
  .load-actions .status {
    margin-left:0;
  }
  .variety>summary {
    padding:10px;
    gap:8px;
  }
  .variety-loads {
    padding:0 4px 4px 20px;
  }
  .items-wrap {
    padding:12px 8px;
  }
  td,th {
    padding:10px 6px;
  }
  .items-wrap table {
    font-size:12px;
    min-width:0;
  }
  .items-wrap td:first-child {
    overflow-wrap:anywhere;
  }
  .login-layout {
    display:flex;
    flex-direction:column;
    gap:24px;
    margin:12px auto;
    max-width:480px;
    align-items:stretch;
  }
  .login-intro h1 {
    font-size:32px;
    margin:12px 0;
  }
  .login-intro>p:not(.eyebrow) {
    font-size:14px;
  }
  .login-card {
    padding:24px;
  }
  .form-grid {
    grid-template-columns:1fr;
  }
  .admin-card {
    padding:16px;
  }
  .admin-card>summary .status {
    margin-left:0;
  }
}
@media(max-width:360px) {
  .topbar-inner {
    flex-wrap:wrap;
  }
  nav {
    width:100%;
    justify-content:flex-end;
  }
}
