.nav-count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  margin-left: 4px;
  border-radius: 999px;
  background: #b73a32;
  color: #fff;
  font-size: 11px;
}
.permit-alert {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  text-align: left;
  border: 1px solid #e0b555;
  background: #fff2cb;
  color: #5b4310;
  border-radius: 16px;
  padding: 15px 18px;
  margin: 0 0 18px;
}
.permit-alert strong { font-size: 15px; }
.permit-alert span { font-size: 13px; }
.permit-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 4px 0 20px;
}
.permit-stats > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #e5f1eb;
  border: 1px solid #cce0d6;
  border-radius: 16px;
  padding: 14px 16px;
  color: #315a4d;
}
.permit-stats strong { font-size: 24px; }
.permit-stats .expiring { background: #fff2cb; border-color: #ecd07a; color: #76570d; }
.permit-stats .expired { background: #fde5e2; border-color: #edb6b0; color: #9a302b; }
.permit-card { position: relative; overflow: hidden; }
.permit-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: #4b9a76; }
.permit-card.expiring::before { background: var(--gold); }
.permit-card.expired::before { background: var(--red); }
.status.permit-valid { background: #dcece7; color: #176141; }
.status.permit-expiring { background: #fff1ce; color: #805d10; }
.status.permit-expired { background: #fde1df; color: var(--red); }
.renewal-state {
  display: grid;
  gap: 3px;
  background: #e9f0ed;
  border-left: 4px solid var(--green2);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 12px 0;
  font-size: 13px;
}
.renewal-state span { color: var(--muted); }
.permit-check {
  display: grid;
  gap: 4px;
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 16px;
  border: 1px solid;
}
.permit-check strong { font-size: 16px; }
.permit-check span { font-size: 14px; }
.permit-check.valid { background: #e4f3eb; border-color: #acd1bd; color: #145939; }
.permit-check.expiring { background: #fff2cb; border-color: #ecd07a; color: #76570d; }
.permit-check.expired,
.permit-check.missing { background: #fde5e2; border-color: #edb6b0; color: #8e2e29; }
.report-toolbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.report-toolbar h3 { margin-bottom: 6px; }
.report-toolbar p { color: var(--muted); margin-bottom: 10px; }
.report-date { min-width: 170px; margin: 0; }
.daily-reports h4 { margin: 4px 0 10px; color: var(--green); }
.live-title { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.live-title h3 { margin: 0; }
.live-badge,
.history-badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 5px 9px; font-size: 12px; font-weight: 850; }
.live-badge { background: #dff1e7; color: #176141; }
.live-badge i { width: 8px; height: 8px; border-radius: 50%; background: #279b63; box-shadow: 0 0 0 4px #279b6318; }
.history-badge { background: #edf1ef; color: var(--muted); }
.live-site-list { display: grid; gap: 14px; margin-top: 10px; }
.live-site-avizo { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.live-site-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; background: #f1f6f3; border-bottom: 1px solid var(--line); }
.live-site-head h4 { margin: 0 0 5px; font-size: 17px; color: var(--green); }
.live-site-head p { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 0; color: var(--muted); font-size: 13px; }
.live-site-head p strong { color: var(--ink); }
.live-site-head p span { color: var(--green2); font-weight: 850; }
.live-avizo-table { min-width: 690px; margin: 0; }
.live-avizo-table th { background: #fbfcfb; font-size: 12px; white-space: nowrap; }
.live-avizo-table td { vertical-align: top; }
.live-avizo-table td:nth-child(1),
.live-avizo-table td:nth-child(2),
.live-avizo-table td:nth-child(3) { white-space: nowrap; }
.live-empty { padding: 18px 16px; color: var(--muted); font-size: 14px; }
.site-quantity { padding: 12px 16px; background: #fbfcfb; border-bottom: 1px solid var(--line); }
.site-quantity > div:first-child { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 13px; }
.site-quantity > div:first-child strong { color: var(--ink); }
.site-quantity > div:first-child > strong { color: #176141; }
.site-quantity .site-over { color: var(--red); }
.site-quantity .site-transit { color: #8a5f09; }
.transit-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.transit-list span { border-radius: 999px; background: #fff2cb; color: #76570d; padding: 6px 9px; font-size: 12px; }
.transit-remove { margin-left: 7px; border: 1px solid #c76a64; border-radius: 999px; background: #fff; color: #9a302b; font-size: 11px; font-weight: 900; padding: 4px 8px; }
.transit-remove:hover { background: #fde9e7; }
.vehicle-plan { display: grid; grid-template-columns: minmax(0, .9fr) minmax(280px, 1.1fr); gap: 22px; align-items: start; margin: 14px 0; }
.vehicle-plan h3 { margin-bottom: 5px; }
.vehicle-plan p { color: var(--muted); }
.vehicle-plan form .field { margin-top: 0; }
.site-quantity .progress { height: 7px; margin: 9px 0 0; }
.load-guidance { border-radius: 10px; background: #e4f3eb; color: #176141; padding: 9px 11px; margin-top: 4px; font-size: 13px; font-weight: 800; }
.load-guidance.warning { background: #fff2cb; color: #76570d; }
.load-guidance.complete { background: #edf1ef; color: var(--muted); }
.next-trip { border: 1px solid #cce0d6; background: #f1f6f3; border-radius: 14px; padding: 12px; }
.daily-download { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.daily-download > div { display: grid; gap: 3px; }
.daily-download span { color: var(--muted); font-size: 13px; }
.span-full { grid-column: 1 / -1; }
.allocation-grid { display: grid; gap: 9px; margin: 10px 0; }
.allocation-row { display: grid; grid-template-columns: 1fr minmax(120px, 170px); align-items: center; gap: 12px; border-bottom: 1px solid var(--line); padding: 8px 0; }
.allocation-row span { font-size: 13px; color: var(--muted); }
.allocation-row strong { color: var(--ink); }
.allocation-row small { display: block; color: var(--green2); font-weight: 750; }
.allocation-row input { width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 11px; }
.allocation-summary { border-radius: 12px; background: #edf3f0; color: var(--muted); padding: 11px 13px; font-weight: 750; }
.allocation-summary.ok { background: #dff1e7; color: #176141; }
.allocation-summary.error { background: #fde1df; color: var(--red); }
.task-reference { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.notice-badge { border-radius: 999px; background: #b73a32; color: #fff; padding: 5px 9px; font-size: 11px; font-weight: 850; }
.task-notices { display: grid; gap: 10px; margin: 14px 0; }
.task-notices article { display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid #e0b555; background: #fff2cb; color: #5b4310; border-radius: 16px; padding: 15px 18px; }
.task-notices p { margin: 4px 0; }
.task-notices small { opacity: .8; }
.wagon-access-card,
.planner-site-card { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin: 14px 0; }
.wagon-access-card h3,
.planner-site-card h3 { margin-bottom: 5px; }
.wagon-access-card p,
.planner-site-card p { margin: 0; color: var(--muted); }
.wagon-access-card p span { color: #176141; font-weight: 850; }
.wagon-access-card form { display: flex; align-items: end; gap: 10px; min-width: min(100%, 350px); }
.wagon-access-card form .field { flex: 1; margin: 0; }
.site-edit-row { border: 1px solid var(--line); border-radius: 16px; margin: 14px 0; padding: 10px 14px; }
.site-edit-row legend { color: var(--green); font-weight: 850; padding: 0 7px; }
.site-editor-actions { position: sticky; bottom: -22px; background: #fff; border-top: 1px solid var(--line); padding: 14px 0 4px; }
.access-meta { background: #eef5f1; border-radius: 10px; padding: 8px; }
@media (max-width: 650px) {
  .nav-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
  .nav-tabs button { width: 100%; }
  .permit-stats { grid-template-columns: 1fr; }
  .permit-alert { align-items: flex-start; display: grid; }
  .permit-card .actions .btn { width: 100%; }
  .report-toolbar { display: grid; }
  .report-date { min-width: 0; width: 100%; }
  .live-site-head { align-items: stretch; display: grid; }
  .live-site-head .btn { width: 100%; }
  .daily-download { align-items: stretch; display: grid; }
  .daily-download .btn { width: 100%; }
  .allocation-row { grid-template-columns: 1fr 120px; }
  .task-notices article,
  .wagon-access-card,
  .planner-site-card,
  .vehicle-plan,
  .wagon-access-card form { display: grid; align-items: stretch; }
  .task-notices .btn,
  .wagon-access-card .btn,
  .planner-site-card .btn { width: 100%; }
  .task-reference { align-items: flex-end; display: grid; text-align: right; }
}
